:root {
    --primary-color: #002b5c;
    --secondary-color: #4a90e2;
    --accent-yellow: #f1c40f;
    --accent-red: #ce181e;
    --text-color: #333;
    --light-gray: #f4f7fa;
    --border-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Gradiente vibrante da marca */
    background: linear-gradient(135deg, #ce181e 0%, #002b5c 50%, #f1c40f 100%);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    /* Animação sutil no fundo */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- CARD DE LOGIN --- */
.login-card {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;

    /* Animação de entrada */
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Detalhe decorativo no topo do card */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ce181e, #002b5c, #f1c40f);
}

.logo-area {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.logo-img {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.welcome-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* --- FORMULÁRIO --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: color 0.3s;
}

.form-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    /* Espaço para o ícone */
    border: 2px solid transparent;
    background-color: var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    color: var(--text-color);
}

.form-input:focus {
    background-color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.1);
}

.form-input:focus+.input-icon {
    color: var(--secondary-color);
}

/* Toggle de Senha (olho) */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
    font-size: 0.9rem;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Checkbox customizado */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary-color);
}

/* Botão */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.btn-login:hover {
    background: #001f42;
    /* Um tom mais escuro */
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
}

/* Footer do card */
.card-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #999;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-card {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 43, 92, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    animation: scaleUp 0.3s forwards;
}

.modal-icon {
    font-size: 3rem;
    color: #ce181e;
    /* Error red */
    margin-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    color: #002b5c;
    margin-bottom: 10px;
    font-weight: 700;
}

.modal-message {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-close {
    background: linear-gradient(135deg, #002b5c 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 43, 92, 0.3);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    to {
        transform: scale(1);
    }
}