@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #060d1f;
    --card-bg: rgba(15, 23, 42, 0.85);
    --input-bg: rgba(6, 13, 31, 0.9);
    --accent-blue: #38bdf8;
    --accent-royal: #2563eb;
    --accent-gold: #eab308;
    --accent-gold-hover: #facc15;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-subtle: rgba(56, 189, 248, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.2) 0%, transparent 60%), repeating-linear-gradient(to right, rgba(56, 189, 248, 0.03) 0px, rgba(56, 189, 248, 0.03) 1px, transparent 1px, transparent 50px), repeating-linear-gradient(to bottom, rgba(56, 189, 248, 0.03) 0px, rgba(56, 189, 248, 0.03) 1px, transparent 1px, transparent 50px);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    width: 180px;
    max-width: 70%;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
}

.login-container {
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--accent-gold);
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(37, 99, 235, 0.15);
}

    .login-container h2 {
        text-align: center;
        font-size: 1.75rem;
        font-weight: 700;
        margin-bottom: 25px;
        color: var(--text-light);
        letter-spacing: -0.5px;
    }

.login-title {
    color: transparent;
    user-select: none;
}

/* --- Inputs --- */
.input-group {
    margin-bottom: 18px;
    text-align: left;
}

    .input-group label {
        display: block;
        font-size: 0.88rem;
        font-weight: 500;
        color: var(--text-muted);
        margin-bottom: 6px;
    }

    .input-group input {
        width: 100%;
        padding: 12px 15px;
        background-color: var(--input-bg);
        border: 1px solid rgba(56, 189, 248, 0.3);
        border-radius: 8px;
        color: var(--text-light);
        font-size: 0.95rem;
        font-family: inherit;
        transition: all 0.25s ease;
        outline: none;
    }

        .input-group input::placeholder {
            color: #475569;
        }

        .input-group input:focus {
            border-color: var(--accent-gold);
            box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18);
        }

/* --- Links e Termos --- */
.link-esqueci {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 20px;
    transition: color 0.2s;
}

    .link-esqueci:hover {
        color: var(--accent-gold);
        text-decoration: underline;
    }

.termos-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 22px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

    .termos-wrapper input[type="checkbox"] {
        width: 17px;
        height: 17px;
        accent-color: var(--accent-gold);
        cursor: pointer;
    }

    .termos-wrapper a {
        color: var(--accent-blue);
        text-decoration: underline;
        cursor: pointer;
        font-weight: 500;
    }

        .termos-wrapper a:hover {
            color: var(--accent-gold);
        }

/* --- Botão Principal --- */
button[type="submit"],
.modal-content button:not(.btn-fechar-modal) {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #ca8a04 0%, #eab308 50%, #facc15 100%);
    color: #060d1f;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 18px rgba(234, 179, 8, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    button[type="submit"]:hover,
    .modal-content button:not(.btn-fechar-modal):hover {
        background: linear-gradient(135deg, #eab308 0%, #fef08a 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(250, 204, 21, 0.6);
    }

    button[type="submit"]:active {
        transform: translateY(0);
    }

/* --- Link de Cadastro / Login --- */
.register-link {
    text-align: center;
    margin-top: 22px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

    .register-link a {
        color: var(--accent-gold);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s;
    }

        .register-link a:hover {
            color: var(--accent-blue);
            text-decoration: underline;
        }

/* --- Modais (Recuperação de Senha e Termos de Uso) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 8, 20, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Oculto por padrão */
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 20px;
}

    /* Força a exibição correta quando o JS injetar as classes de visibilidade */
    .modal-overlay.visivel,
    .modal-overlay.active,
    .modal-overlay[style*="display: flex"],
    .modal-overlay[style*="display: block"] {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

.modal-content {
    position: relative;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    overflow-y: auto;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-top: 3px solid var(--accent-gold);
    border-radius: 16px;
    padding: 30px;
    text-align: left;
    color: var(--text-light);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(37, 99, 235, 0.2);
}

    .modal-content h2,
    .modal-content h3 {
        color: var(--accent-gold) !important;
        margin-bottom: 14px;
        font-size: 1.4rem;
    }

    .modal-content p {
        font-size: 0.92rem;
        color: var(--text-muted);
        line-height: 1.6;
        margin-bottom: 14px;
    }

    .modal-content strong {
        color: var(--accent-blue);
    }

    /* Ajuste específico para o modal menor de recuperação de senha */
    .modal-content.modal-recuperacao {
        max-width: 400px;
        text-align: center;
    }

.btn-fechar-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

    .btn-fechar-modal:hover {
        color: var(--accent-gold);
    }

/* Barra de rolagem estilizada para o modal de termos */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #060d1f;
    border-radius: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(234, 179, 8, 0.5);
    border-radius: 8px;
}

@media (max-width: 480px) {
    .login-container {
        padding: 28px 20px;
    }

    .login-logo {
        width: 150px;
    }
}
