/* css/login.css - Design Elegante Moderno com Funcionalidades Integradas */

:root {
    /* Cores principais baseadas no seu novo padrão */
    --primary-color: #0095FF; 
    --primary-hover: #007bb5;
    
    /* Cores do gradiente (Azul Claro para Azul Escuro) */
    --brand-grad-start: #0095FF;
    --brand-grad-end: #002685;

    --bg-dark: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #001b6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Container do Design Dividido */
.login-split-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden; /* Garante que os cantos arredondados cortem o fundo */
}

/* =======================================
   LADO ESQUERDO: BRANDING DA MARCA
   ======================================= */
.login-branding {
    flex: 1;
    /* Gradiente Azul Claro para Azul Escuro */
    background: linear-gradient(135deg, var(--brand-grad-start) 0%, var(--brand-grad-end) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white; 
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Detalhe visual elegante no fundo da marca */
.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: pulse 8s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.branding-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logo-container-lateral {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container-lateral img {
    /* Logo aumentada e sem sombra conforme solicitado */
    max-height: 150px; 
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
}

.branding-content h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 700;
    margin: 0; 
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-description {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    max-width: 85%;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

/* =======================================
   LADO DIREITO: FORMULÁRIO BRANCO
   ======================================= */
.login-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 60px;
    background: #ffffff;
}

.form-wrapper {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.form-wrapper h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin: 0 0 5px 0;
    font-weight: 700;
}

.form-wrapper .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 35px;
}

.input-group {
    margin-bottom: 20px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .icon-left {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 15px;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 45px; /* Espaço pro ícone nas duas laterais */
    border: 1px solid #cbd5e1;
    border-radius: 8px; 
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-wrapper input::placeholder { color: #94a3b8; }

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 149, 255, 0.15);
    outline: none;
}

.input-wrapper input:focus ~ .icon-left {
    color: var(--primary-color);
}

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

/* =======================================
   OPÇÕES DO FORMULÁRIO
   ======================================= */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: 5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
}

.remember-me input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-password {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* =======================================
   BOTÃO ENTRAR E FOOTER
   ======================================= */
.login-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:hover {
    background: var(--primary-hover);
}

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

.login-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    min-height: 20px;
}

.login-footer {
    margin-top: 50px;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* =======================================
   RESPONSIVIDADE (CELULARES E TABLETS)
   ======================================= */
@media (max-width: 850px) {
    .login-split-container {
        flex-direction: column; 
        height: auto;
        max-width: 420px;
    }
    
    .login-branding {
        padding: 40px 20px;
    }

    .logo-container-lateral {
        margin-bottom: 0; 
    }

    .logo-container-lateral img {
        /* Logo ajustada proporcionalmente no mobile e sem sombra */
        max-height: 110px; 
    }

    .brand-title-group, 
    .brand-description {
        display: none; 
    }

    .login-form-section {
        padding: 40px 30px;
    }
    
    .login-footer {
        margin-top: 30px;
    }
}

/* =================================================================
   MODAL DE ASSINATURA BLOQUEADA
   ================================================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.visible { opacity: 1; visibility: visible; }
.subscription-card {
    background: #fff; width: 90%; max-width: 420px; border-radius: 20px; overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.visible .subscription-card { transform: translateY(0); }
.sub-header.late { background: #fef2f2; padding: 35px 20px 25px; display: flex; justify-content: center; }
.sub-icon { 
    width: 65px; height: 65px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    color: #ef4444; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15);
}
.sub-icon span { font-size: 32px; }
.sub-body { padding: 30px 30px 20px; text-align: center; color: #1e293b;}
.sub-body h3 { margin: 0 0 12px 0; color: #0f172a; font-size: 22px; font-weight: 700; letter-spacing: -0.5px;}
.sub-body p { margin: 0; color: #475569; font-size: 15px; line-height: 1.6; }
.sub-invoice-details { margin-top: 25px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; }
.sub-val-box { display: flex; justify-content: space-between; align-items: center; }
.sub-val-label { font-size: 14px; color: #64748b; font-weight: 500; }
.sub-val-amt { font-size: 18px; color: #ef4444; font-weight: 700; }
.sub-footer { padding: 20px 30px 30px; background: #fff; display: flex; gap: 15px; justify-content: center; }
.btn-cancel-modern { flex: 1; padding: 14px; border: 1px solid #cbd5e1; background: #fff; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; color: #475569; transition: all 0.2s; }
.btn-cancel-modern:hover { background: #f8fafc; color: #0f172a;}
.btn-confirm-modern { flex: 1; padding: 14px; border: none; background: #10b981; color: white; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: background 0.2s; text-decoration: none;}
.btn-confirm-modern:hover { background: #059669; }
.hidden { display: none !important; }

/* =======================================
   BOTÃO DE INSTALAR APP (PWA)
   ======================================= */
.install-button {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    background: rgba(0, 149, 255, 0.05);
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.install-button:hover {
    background: rgba(0, 149, 255, 0.1);
    transform: translateY(-2px);
}