:root {
    /* Cores de Identidade */
    --primary: #00331a;
    --primary-dark: #002212;
    --accent: #4db34d;
    --orange: #ffa500;
    
    /* Cores de Interface */
    --white: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --input-bg: #ffffff;
    --input-border: #e0e6ed;
}

/* 1. RESET E ESTRUTURA BASE */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(77, 179, 77, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(255, 165, 0, 0.1) 0%, transparent 40%);
    /* Permite scroll em telas muito pequenas ou quando o teclado abre */
    overflow-y: auto;
}

/* 2. CARD DE LOGIN */
.auth-card {
    background: var(--white);
    width: 90%;
    max-width: 400px;
    padding: 50px 40px;
    border-radius: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    margin: 20px; /* Margem para não encostar nas bordas do celular */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.auth-card.success-state {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
}

/* 3. TIPOGRAFIA */
.brand-logo { font-size: 52px; margin-bottom: 10px; display: block; }
.brand-name { font-size: 28px; font-weight: 700; color: var(--primary); letter-spacing: -1px; margin: 0; }
h2 { font-size: 15px; color: var(--text-muted); font-weight: 400; margin-top: 5px; margin-bottom: 35px; }

/* 4. FORMULÁRIO */
.form-group { text-align: left; margin-bottom: 20px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; }
.form-group input { 
    width: 100%; 
    padding: 16px 18px; 
    border: 2px solid var(--input-border); 
    border-radius: 16px; 
    font-size: 16px; /* Font-size 16px evita o zoom automático do iOS no foco */
    box-sizing: border-box; 
    background: var(--input-bg); 
    transition: all 0.2s ease; 
    color: var(--text-main); 
}
.form-group input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(77, 179, 77, 0.15); }

/* 5. BOTÕES */
.btn-primary { width: 100%; padding: 18px; border: none; border-radius: 16px; background: var(--primary); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 10px 15px -3px rgba(0, 51, 26, 0.2); }
.btn-primary:active { transform: scale(0.98); }

.auth-footer { margin-top: 25px; }
.btn-secondary { color: var(--accent); text-decoration: none; font-size: 14px; font-weight: 700; padding: 10px; display: inline-block; }

/* 6. RESPONSIVIDADE (CELULAR) */
@media (max-width: 480px) {
    .auth-card {
        padding: 35px 25px;
        border-radius: 24px;
    }
    .brand-logo { font-size: 40px; }
    .brand-name { font-size: 24px; }
    h2 { margin-bottom: 25px; font-size: 13px; }
    .form-group input { padding: 14px 15px; }
}

/* 7. SWEETALERT MOBILE FRIENDLY */
.swal2-popup {
    width: 90% !important;
    max-width: 350px !important;
    padding: 1.2em !important;
    border-radius: 20px !important;
}

.swal2-title { font-size: 1.2em !important; }
.swal2-confirm { width: 100% !important; margin: 10px 0 0 0 !important; border-radius: 12px !important; }

/* 8. LOADER DOTS */
.loader-dots { display: flex; justify-content: center; align-items: center; gap: 5px; height: 20px; }
.loader-dots span { width: 8px; height: 8px; background: #fff; border-radius: 50%; animation: dots 1.4s infinite ease-in-out both; }
.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes dots { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }