/* auth.css — GestMais authentication pages (login + register) */
/* Fonts: Sora (headings) + Outfit (body) via pwa_head.php */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0b1c13;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ── Split Layout ─────────────────────────────── */
.auth-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Left branding panel ─────────────────────── */
.auth-left {
    flex: 1;
    background: #0b1c13;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0);
    background-size: 28px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -120px; left: -120px;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(45,90,69,0.38) 0%, transparent 65%);
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(76,175,80,0.14) 0%, transparent 65%);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-brand-logo {
    width: 154px;
    height: auto;
    margin-bottom: 44px;
    filter: brightness(1.05) drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.auth-brand-headline {
    font-family: 'Sora', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: #e8f0ea;
    line-height: 1.18;
    margin-bottom: 18px;
    letter-spacing: -0.025em;
}

.auth-brand-headline span { color: #5ec970; }

.auth-brand-tagline {
    font-size: 16px;
    color: rgba(232,240,234,0.55);
    line-height: 1.65;
    margin-bottom: 48px;
}

/* Feature list */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 52px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(232,240,234,0.75);
    font-size: 15px;
}

.auth-feature-icon {
    width: 40px; height: 40px;
    background: rgba(45,90,69,0.35);
    border: 1px solid rgba(45,90,69,0.55);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Stats strip */
.auth-stats {
    display: flex;
    gap: 36px;
}

.auth-stat-value {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #e8f0ea;
    letter-spacing: -0.02em;
}

.auth-stat-label {
    font-size: 11px;
    color: rgba(232,240,234,0.4);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 3px;
}

/* ── Planos pills ──────────────────────────────────────────── */
.auth-plans {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.auth-plan-pill {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 20px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.35);
    flex: 1;
    min-width: 120px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-plan-pill-premium {
    background: linear-gradient(135deg, rgba(76,175,80,0.35), rgba(115,217,151,0.22));
    border-color: rgba(115,217,151,0.7);
    box-shadow: 0 0 20px rgba(76,175,80,0.2);
}

.auth-plan-name {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.auth-plan-pill-premium .auth-plan-name {
    color: #73ffaa;
    text-shadow: 0 0 12px rgba(115,217,151,0.6);
}

.auth-plan-price {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ── Right form panel ─────────────────────────── */
.auth-right {
    width: 480px;
    flex-shrink: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 364px;
}

.auth-form-title {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #0b1c13;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-form-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Social buttons ───────────────────────────── */
.social-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border: 1.5px solid #e0e6e3;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.social-btn:hover:not(:disabled) {
    border-color: #2d5a45;
    background: #f0f7f3;
    transform: translateY(-1px);
}

.social-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Divider ──────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 13px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ── Form fields ──────────────────────────────── */
.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e6e3;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #111827;
    background: #f8faf9;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    height: 46px;
    -webkit-appearance: none;
    appearance: none;
    display: block;
    line-height: 1.4;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    border-color: #2d5a45;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,90,69,0.1);
}

input::placeholder { color: #9ca3af; }

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.5;
}

/* 2_entrar.php uses inputs directly (no .form-group wrapper) */
input[type="email"] + label,
input[type="email"]:not(.form-group input) {
    margin-bottom: 14px;
}

/* ── Forgot password ──────────────────────────── */
.forgot-password {
    text-align: right;
    margin-top: -4px;
    margin-bottom: 18px;
}

.forgot-password a {
    font-size: 13px;
    color: #2d5a45;
    font-weight: 500;
    text-decoration: none;
}

.forgot-password a:hover { text-decoration: underline; }

/* ── Primary submit button ────────────────────── */
.btn-submit,
button[type="submit"] {
    width: 100%;
    background: #1e3a2e;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 6px;
    letter-spacing: 0.01em;
}

.btn-submit:hover,
button[type="submit"]:hover {
    background: #0f2318;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15,35,24,0.3);
}

.btn-submit:active,
button[type="submit"]:active { transform: translateY(0); }

/* ── Login alternatives (2_entrar.php) ───────── */
.login-alternativo {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.google-btn, .apple-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.google-btn {
    background: #fff;
    border: 1.5px solid #e0e6e3;
    color: #374151;
}

.google-btn:hover {
    border-color: #2d5a45;
    background: #f0f7f3;
    transform: translateY(-1px);
}

.apple-btn {
    background: #111;
    border: 1.5px solid #111;
    color: #fff;
}

.apple-btn:hover:not(:disabled) {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.apple-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.apple-btn:disabled:hover { transform: none; background: #111; }

/* ── Bottom nav links ─────────────────────────── */
.login-link, .link {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: #6b7280;
}

.login-link a, .link a {
    color: #2d5a45;
    font-weight: 600;
    text-decoration: none;
}

.login-link a:hover, .link a:hover { text-decoration: underline; }

/* ── Messages ─────────────────────────────────── */
.mensagem {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: authFadeIn 0.3s ease;
}

.mensagem.erro    { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.mensagem.sucesso { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Password show/hide toggle ─────────────────── */
.pw-wrap {
    position: relative;
}

.pw-wrap input[type="password"],
.pw-wrap input[type="text"] {
    padding-right: 44px;
}

.pw-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    transition: color 0.2s;
    line-height: 0;
}

.pw-toggle:hover {
    color: #2d5a45;
    background: none;
    transform: translateY(-50%);
    box-shadow: none;
}

.pw-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ── Terms / Privacy checkbox ──────────────────── */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 6px;
}

.terms-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin-top: 2px;
    accent-color: #2d5a45;
    cursor: pointer;
}

.terms-check label {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.5;
    cursor: pointer;
    margin-bottom: 0;
}

.terms-check label a {
    color: #2d5a45;
    font-weight: 600;
    text-decoration: underline;
}

.terms-check label a:hover { color: #1e3a2e; }

/* ── Legal modal (Termos & Privacidade) ─────────── */
.lm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.lm-box {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(0,0,0,0.35);
    animation: lmIn 0.22s ease;
}

@keyframes lmIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 4px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.lm-tabs { display: flex; }

.lm-tab {
    padding: 15px 14px 13px;
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.18s, border-color 0.18s;
    width: auto;
    margin-top: 0;
    line-height: 1;
}

.lm-tab.active {
    color: #1e3a2e;
    border-bottom-color: #2d5a45;
    background: none;
    transform: none;
    box-shadow: none;
}

.lm-tab:hover:not(.active) {
    color: #374151;
    background: none;
    transform: none;
    box-shadow: none;
}

.lm-tab-done::after {
    content: ' ✓';
    color: #16a34a;
    font-size: 11px;
}

.lm-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.lm-close:hover {
    background: #e5e7eb;
    color: #111;
    transform: none;
    box-shadow: none;
}

.lm-body {
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
    min-height: 0;
    font-size: 13.5px;
    line-height: 1.7;
}

.lm-body h3 {
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    margin: 20px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.lm-body h3:first-child { margin-top: 0; }

.lm-body p { margin-bottom: 10px; color: #6b7280; }

.lm-body ul {
    padding-left: 18px;
    margin-bottom: 10px;
    color: #6b7280;
}

.lm-body ul li { margin-bottom: 4px; }

.lm-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: #f9fafb;
}

.lm-scroll-hint {
    flex: 1;
    font-size: 12px;
    color: #9ca3af;
}

.lm-accept-btn {
    padding: 10px 22px;
    border-radius: 9px;
    border: none;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
    background: #1e3a2e;
    color: #fff;
    white-space: nowrap;
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.lm-accept-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lm-accept-btn:not(:disabled):hover {
    background: #0f2318;
    transform: none;
    box-shadow: none;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 960px) {
    .auth-left { display: none; }

    .auth-right {
        width: 100%;
        background: #0b1c13;
        background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.045) 1px, transparent 0);
        background-size: 28px 28px;
        align-items: flex-start;
        padding: 40px 20px;
        padding-top: 56px;
    }

    /* Card-like wrapper on mobile */
    .auth-form-wrapper {
        background: #fff;
        border-radius: 20px;
        padding: 32px 24px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.35);
        max-width: 100%;
    }

    /* Show logo inside form on mobile */
    .auth-form-wrapper::before {
        content: '';
        display: block;
        width: 120px;
        height: 60px;
        background: url('../imagens/logo5.png') center/contain no-repeat;
        margin: 0 auto 24px;
    }
}

@media (max-width: 480px) {
    .auth-right { padding: 24px 14px; padding-top: 36px; }

    .auth-form-wrapper { padding: 28px 20px; }

    .auth-form-title { font-size: 22px; }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"] {
        font-size: 16px; /* prevent iOS zoom */
    }
}
