/* static/css/login.css */

/* --- CONFIGURAÇÃO GERAL --- */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --text-light: #ffffff;
    --text-muted: #cbd5e1;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    
    /* MELHORIA 1: Fundo moderno e sofisticado (Deep Ocean Gradient) */
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animação suave do fundo */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* MELHORIA 2: Efeito Glassmorphism (Vidro Fosco) */
.login-card {
    /* Fundo translúcido */
    background: rgba(255, 255, 255, 0.05); 
    
    /* O segredo do desfoque (Blur) */
    backdrop-filter: blur(16px);            
    -webkit-backdrop-filter: blur(16px);    /* Compatibilidade Safari */
    
    /* Borda sutil de vidro */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px; /* Bordas bem arredondadas */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); /* Sombra profunda para destacar */
    text-align: center;
    color: var(--text-light);
}

/* --- ELEMENTOS INTERNOS DO CARD --- */
.logo {
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(13, 110, 253, 0.6)); /* Brilho neon no ícone */
}

.login-card h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    margin: 10px 0 30px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

/* INPUTS CUSTOMIZADOS PARA DARK GLASS */
.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.input-group .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    transition: color 0.3s;
    z-index: 10;
}

.input-group input {
    width: 100%;
    padding: 14px 14px 14px 45px; /* Espaço para o ícone */
    
    /* Fundo do input escuro e transparente */
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    
    color: var(--text-light);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Quando foca no input, o ícone brilha */
.input-group input:focus + .icon {
    color: var(--primary-color);
}

/* --- CHECKBOX CUSTOMIZADO --- */
.remember-container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha à esquerda */
    margin-bottom: 20px;
    padding-left: 2px;
}

.remember-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.remember-container input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.4);
}

/* Ícone de check (feito com CSS puro) */
.remember-container input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-container label {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.remember-container input[type="checkbox"]:checked + label {
    color: var(--text-light);
}

/* BOTÃO DE ENTRAR */
.login-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

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

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #ff6b6b; /* Vermelho claro para ler no fundo escuro */
    font-size: 13px;
    margin-top: 15px;
    min-height: 20px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* =================================================================
   MODAL DE ASSINATURA SUSPENSA (BLOQUEIO DE LOGIN)
   ================================================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.visible { opacity: 1; visibility: visible; }

.subscription-card {
    background: white; width: 90%; max-width: 420px; border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4); display: flex; flex-direction: column;
    overflow: hidden; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.visible .subscription-card { transform: scale(1); }

.sub-header.late { background: #fee2e2; padding: 25px; text-align: center; border-bottom: 1px solid #fecaca; }
.sub-icon {
    width: 65px; height: 65px; background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto;
    color: #ef4444; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}
.sub-icon .material-icons { font-size: 32px; }

.sub-body { padding: 25px 20px; text-align: center; color: #1e293b; }
.sub-body h3 { margin: 0 0 10px 0; color: #1e293b; font-size: 20px; font-weight: 700; }
.sub-body p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.5; }

.sub-invoice-details { margin-top: 20px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 15px; }
.sub-val-box { display: flex; justify-content: space-between; align-items: center; }
.sub-val-label { font-size: 14px; color: #475569; font-weight: 500; }
.sub-val-amt { font-size: 18px; color: #ef4444; font-weight: 700; }

.sub-footer { padding: 20px; background: #f8fafc; display: flex; gap: 15px; justify-content: center; border-top: 1px solid #f1f5f9; }
.hidden { display: none !important; }

.btn-cancel-modern { 
    padding: 12px 20px; border: 1px solid #cbd5e1; background: white; color: #475569; 
    border-radius: 10px; cursor: pointer; font-weight: 600; font-family: 'Poppins', sans-serif; transition: all 0.2s; 
}
.btn-cancel-modern:hover { background: #f1f5f9; }

.btn-confirm-modern { 
    padding: 12px 20px; border: none; background: #0d6efd; color: white; 
    border-radius: 10px; cursor: pointer; font-weight: 600; font-family: 'Poppins', sans-serif; transition: all 0.2s; 
    display: flex; align-items: center; gap: 8px; 
}
.btn-confirm-modern:hover { filter: brightness(0.9); }

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