/*
 * Nosso Lar Gourmet — Auth Pages Brand Identity
 * Palette extraída da logo:
 *   Verde fita  → #1e8c3c / #135f28
 *   Preto lacre → #0d0d0d
 *   Dourado pizza → #c9932a
 *   Branco texto  → #ffffff
 */

/* ── Reset mínimo ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Variáveis ────────────────────────────────────────── */
:root {
    --brand:        #1e8c3c;   /* verde da fita */
    --brand-dark:   #135f28;   /* verde escuro   */
    --brand-mid:    #27a84a;   /* verde médio    */
    --brand-light:  #e8f5ec;   /* verde claro    */
    --gold:         #c9932a;   /* dourado pizza  */
    --gold-light:   #f5e6c0;   /* dourado claro  */
    --dark:         #0d0d0d;   /* preto lacre    */
    --text:         #1a1a1a;
    --muted:        #6b7280;
    --border:       #e5e7eb;
    --radius-card:  16px;
    --radius-input: 10px;
    --shadow:       0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ── Corpo / fundo ────────────────────────────────────── */
body {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(30, 140, 60, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 147, 42, 0.06) 0%, transparent 55%),
        linear-gradient(160deg, #080808 0%, #0f1a10 50%, #080808 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: 'Nunito', 'Roboto', sans-serif;
}

/* ── Wrapper e card ───────────────────────────────────── */
.auth-wrap { width: 100%; max-width: 460px; }

.auth-card {
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.04);
}

/* ── Header do card ───────────────────────────────────── */
.auth-header {
    background: linear-gradient(145deg, var(--brand-mid) 0%, var(--brand-dark) 100%);
    padding: 32px 32px 28px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Decoração: círculos concêntricos sutis (remetem ao lacre da logo) */
.auth-header::before,
.auth-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}
.auth-header::before { width: 160px; height: 160px; top: -60px; right: -50px; }
.auth-header::after  { width: 100px; height: 100px; bottom: -40px; left: -30px; }

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 14px;
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
    position: relative;
    z-index: 1;
}

.auth-header h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 5px;
    letter-spacing: -.3px;
    position: relative;
    z-index: 1;
}

.auth-header p {
    font-size: .87rem;
    margin: 0;
    opacity: .82;
    position: relative;
    z-index: 1;
}

/* Badge de etapa (passo 1/3, 2/3…) */
.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 4px 13px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
}

/* ── Corpo do card ────────────────────────────────────── */
.auth-body { padding: 28px 32px 22px; }

/* ── Campos de input ──────────────────────────────────── */
.field-wrap          { position: relative; margin-bottom: 16px; }

.field-wrap .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .9rem;
    pointer-events: none;
}

.field-wrap .field-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .9rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color .2s;
}
.field-wrap .field-toggle:hover { color: var(--brand); }

.field-wrap input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    padding: 12px 42px 12px 40px;
    font-size: .95rem;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: 'Nunito', sans-serif;
    background: #fff;
}
.field-wrap input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30, 140, 60, 0.14);
}
.field-wrap input::placeholder { color: #c5c5c5; }

/* ── Botão principal ──────────────────────────────────── */
.btn-auth {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-input);
    padding: 13px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    letter-spacing: .3px;
    box-shadow: 0 4px 16px rgba(30, 140, 60, 0.3);
}
.btn-auth:hover  { opacity: .9; box-shadow: 0 6px 20px rgba(30, 140, 60, 0.42); }
.btn-auth:active { transform: scale(.985); }
.btn-auth:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ── Alertas inline ───────────────────────────────────── */
.auth-alert {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .87rem;
    margin-bottom: 14px;
    display: none;
    line-height: 1.4;
}
.auth-alert.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── Caixa de dica (hint) ─────────────────────────────── */
.auth-hint {
    background: var(--brand-light);
    border: 1px solid #a7d9b3;
    border-radius: 9px;
    padding: 10px 13px;
    font-size: .82rem;
    color: #155f28;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}
.auth-hint i    { margin-top: 1px; flex-shrink: 0; }
.auth-hint a    { color: #0e4620; font-weight: 700; text-decoration: underline; }

/* ── Caixa de destino (onde o código foi enviado) ─────── */
.destino-info {
    background: var(--gold-light);
    border: 1px solid #e8c97a;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .87rem;
    color: #7a5200;
    margin-bottom: 22px;
    text-align: center;
    line-height: 1.5;
}
.destino-info .destino-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

/* ── Input de código OTP ──────────────────────────────── */
.codigo-input-wrap  { margin-bottom: 18px; }
.codigo-input-wrap label {
    font-size: .84rem;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 9px;
    text-align: center;
}
.codigo-input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px 12px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 12px;
    text-align: center;
    color: var(--brand-dark);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: 'Courier New', monospace;
    background: #f9fafb;
}
.codigo-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30, 140, 60, 0.14);
    background: #fff;
}
.codigo-input::placeholder {
    color: #d1d5db;
    letter-spacing: 6px;
    font-size: 1.5rem;
    font-weight: 400;
}

.expira-info {
    text-align: center;
    font-size: .79rem;
    color: var(--muted);
    margin-bottom: 4px;
}
.expira-info i { color: var(--gold); }

/* ── Botão reenviar ───────────────────────────────────── */
.reenviar-wrap { text-align: center; margin-top: 16px; }
.btn-reenviar {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brand);
    font-size: .87rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    padding: 0;
    text-decoration: underline;
    transition: color .2s;
}
.btn-reenviar:disabled { color: var(--muted); text-decoration: none; cursor: not-allowed; }
#countdown { font-size: .81rem; color: var(--muted); display: none; }

/* ── Seleção de canal (WhatsApp / E-mail) ─────────────── */
.canal-label {
    font-size: .86rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.canal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }

.canal-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
    position: relative;
    user-select: none;
    display: block;
}
.canal-card:hover {
    border-color: var(--brand);
    background: var(--brand-light);
}
.canal-card.selected {
    border-color: var(--brand);
    background: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(30, 140, 60, 0.15);
}
.canal-card input[type="radio"] { display: none; }

.canal-icon { font-size: 1.7rem; display: block; margin-bottom: 5px; }
.canal-name { font-size: .87rem; font-weight: 700; color: var(--text); display: block; }
.canal-desc { font-size: .74rem; color: var(--muted); display: block; margin-top: 2px; }

.check-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--brand);
    display: none;
    align-items: center;
    justify-content: center;
}
.check-dot i { color: #fff; font-size: .58rem; }
.canal-card.selected .check-dot { display: flex; }

/* ── Indicador de força da senha ──────────────────────── */
.forca-wrap { margin-bottom: 18px; }
.forca-barra {
    height: 5px;
    border-radius: 5px;
    background: var(--border);
    margin-top: 6px;
    overflow: hidden;
}
.forca-fill {
    height: 100%;
    border-radius: 5px;
    transition: width .35s ease, background .35s ease;
    width: 0%;
}
.forca-label { font-size: .77rem; color: var(--muted); margin-top: 4px; font-weight: 600; }

.requisitos {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 14px;
    font-size: .79rem;
    color: var(--muted);
    margin-bottom: 14px;
}
.req-item { display: flex; align-items: center; gap: 7px; margin: 4px 0; transition: color .2s; }
.req-item i { font-size: .68rem; width: 12px; }
.req-item.ok i { color: var(--brand); }
.req-item.ok   { color: #166534; }

/* ── Seção de links (abaixo do card) ──────────────────── */
.auth-links {
    padding: 15px 32px 22px;
    border-top: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.auth-links a {
    color: var(--muted);
    font-size: .87rem;
    text-decoration: none;
    transition: color .2s;
}
.auth-links a:hover  { color: var(--brand); }
.auth-links a strong { color: var(--brand); font-weight: 700; }

/* ── Rodapé externo ───────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: .77rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Nunito', sans-serif;
}

/* ── Responsivo ───────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-body, .auth-links { padding-left: 18px; padding-right: 18px; }
    .auth-header            { padding: 24px 18px 20px; }
    .auth-logo              { width: 66px; height: 66px; }
    .auth-header h1         { font-size: 1.25rem; }
    .codigo-input           { font-size: 1.7rem; letter-spacing: 8px; }
}
