@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =========================================================
   VARIÁVEIS E RESET
========================================================= */
:root {
    --primary: #053868;
    --primary-dark: #042b50;
    --text: #18202b;
    --muted: #7b8794;
    --border: #dce3eb;
    --white: #ffffff;
    --milk: #fdfcfb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fundo Desktop */
    background: linear-gradient(135deg, rgba(5, 20, 38, .80), rgba(0, 0, 0, .45)), url("../img/1.jpeg") center / cover no-repeat;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   ESTRUTURA GERAL
========================================================= */
.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 24px 16px;
}

/* Cartão no Desktop */
.auth-box {
    background: var(--white);
    padding: 40px 32px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, .14);
    animation: fadeUp .3s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   LOGOTIPO E CABEÇALHO
========================================================= */
.auth-brand {
    text-align: center;
}
.auth-brand img {
    height: 80px;
    max-width: 220px;
    object-fit: contain;
}

.auth-heading {
    text-align: center;
    margin-bottom: 8px;
}

.auth-heading h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.auth-heading p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

/* =========================================================
   FORMULÁRIO
========================================================= */
.field-group {
    margin-bottom: 18px;
}

.field-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 0 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 56, 104, .08);
}

.btn-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #8490a0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.btn-eye:hover { background: #f1f5f9; }

/* =========================================================
   RECUPERAR PASSWORD E BOTÃO
========================================================= */
.auth-forgot {
    text-align: right;
    margin-bottom: 22px;
}
.auth-forgot a {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.auth-forgot a:hover { text-decoration: underline; }

.btn-submit {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s;
}
.btn-submit:hover { background: var(--primary-dark); }
.btn-submit:disabled { opacity: .7; cursor: wait; }

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   RODAPÉ DO FORMULÁRIO
========================================================= */
.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 10px;
    color: var(--muted);
}
.auth-secure i { color: #39805c; font-size: 12px; }

.auth-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf0f4;
    text-align: center;
    font-size: 10px;
    color: var(--muted);
}

/* =========================================================
   RESPONSIVIDADE (MOBILE)
========================================================= */
@media (max-width: 768px) {
    
    /* Fundo branco leite */
    body {
        background: var(--milk) !important;
        display: block;
    }

    .auth-wrapper {
        max-width: 100%;
        padding: 30px 24px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Remove o cartão e as sombras */
    .auth-box {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        animation: none;
    }

    /* Ajustes de tamanhos para mobile */
    .auth-brand { margin-bottom: 30px; }
    .auth-brand img { height: 70px; }

    .auth-heading h1 { font-size: 24px; }
    .auth-heading p { font-size: 13px; }

    .field-group label { font-size: 13px; }
    
    .input-wrapper input {
        height: 52px;
        font-size: 14px;
        background: #ffffff;
        border-color: #e2e8f0;
    }

    .btn-submit {
        height: 52px;
        font-size: 14px;
    }

    .auth-footer {
        border-top: none;
        margin-top: 30px;
    }
}