/* ==========================================================================
   WebChat - Clean Minimalist Login Theme (Branco & Azul)
   Baseado nas Cores Oficiais do Sistema e no Layout Clean da Referência
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Cores do Sistema: Branco e Azul */
    --sys-blue-deep: #1e3a8a;
    --sys-blue-primary: #2563eb;
    --sys-blue-hover: #1d4ed8;
    --sys-blue-light: #38bdf8;
    --sys-blue-glow: rgba(37, 99, 235, 0.18);
    
    --sys-bg-right: #f8fafc;
    --sys-card-bg: #ffffff;
    --sys-card-border: #e2e8f0;
    --sys-card-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
    
    --sys-text-main: #0f172a;
    --sys-text-secondary: #334155;
    --sys-text-muted: #64748b;
    
    --sys-input-bg: #f8fafc;
    --sys-input-border: #cbd5e1;
    --sys-input-focus: #2563eb;
    
    --sys-danger: #e11d48;
    --sys-danger-bg: #fff1f2;
    --sys-danger-border: #fecdd3;
    
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: var(--sys-bg-right);
    color: var(--sys-text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Layout Split Screen Full Bleed ────────────────────────────────── */
.login-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ─── LADO ESQUERDO: Painel Azul Oficial do Sistema ────────────────── */
.screen-left {
    flex: 1.15;
    background: 
        radial-gradient(ellipse 90% 80% at 20% 30%, #1e40af 0%, #1d4ed8 45%, #1e3a8a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 80px;
    position: relative;
    color: #ffffff;
}

.left-content {
    max-width: 580px;
}

.left-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.left-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sys-blue-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.left-brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.left-headline {
    font-family: var(--font-heading);
    font-size: 3.1rem;
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 22px;
}

.left-description {
    font-size: 1.08rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    max-width: 480px;
}

/* ─── LADO DIREITO: Portal de Login Branco e Limpo ──────────────────── */
.screen-right {
    flex: 0.95;
    background-color: var(--sys-bg-right);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    position: relative;
}

/* Card Branco Minimalista */
.login-card {
    width: 100%;
    max-width: 410px;
    background: var(--sys-card-bg);
    border: 1px solid var(--sys-card-border);
    border-radius: 20px;
    padding: 38px 34px;
    box-shadow: var(--sys-card-shadow);
    position: relative;
}

.card-header {
    text-align: center;
    margin-bottom: 28px;
}

.card-tag {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sys-blue-primary);
    margin-bottom: 8px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--sys-text-main);
    letter-spacing: -0.02em;
}

/* Feedback e Alertas Visuais em HTML/CSS */
.feedback-box {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.82rem;
    line-height: 1.45;
    animation: fadeIn 0.25s ease-out forwards;
}

.feedback-box.show {
    display: flex;
}

.feedback-error {
    background: var(--sys-danger-bg);
    border: 1px solid var(--sys-danger-border);
    color: var(--sys-danger);
}

.feedback-error svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--sys-danger);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Campos de Input */
.field-group {
    margin-bottom: 18px;
    position: relative;
}

.clean-input {
    width: 100%;
    height: 48px;
    background: var(--sys-input-bg);
    border: 1px solid var(--sys-input-border);
    border-radius: 10px;
    padding: 0 16px;
    color: var(--sys-text-main);
    font-size: 0.92rem;
    font-family: var(--font-body);
    transition: var(--transition);
    outline: none;
}

.clean-input::placeholder {
    color: var(--sys-text-muted);
}

.clean-input:focus {
    background: #ffffff;
    border-color: var(--sys-input-focus);
    box-shadow: 0 0 0 3px var(--sys-blue-glow);
}

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

.clean-input.has-toggle {
    padding-right: 44px;
}

.btn-eye {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--sys-text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-eye:hover {
    color: var(--sys-text-main);
}

/* Google reCAPTCHA Enterprise */
.recaptcha-box {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    background: #f8fafc;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--sys-card-border);
}

/* Botão de Login Estilo Pill Azul da Referência */
.btn-submit {
    width: 100%;
    height: 48px;
    background: var(--sys-blue-primary);
    color: #ffffff;
    border: none;
    border-radius: 9999px; /* Formato pílula elegante igual ao mockup */
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-submit:hover {
    background: var(--sys-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

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

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

/* Links do Card */
.card-links {
    margin-top: 18px;
    text-align: center;
}

.link-muted {
    font-size: 0.82rem;
    color: var(--sys-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-muted:hover {
    color: var(--sys-blue-primary);
    text-decoration: underline;
}

/* Rodapé Minimalista */
.right-footer {
    position: absolute;
    bottom: 24px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--sys-text-muted);
}

.right-footer a {
    color: var(--sys-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.right-footer a:hover {
    color: var(--sys-blue-primary);
}

.footer-sep {
    margin: 0 6px;
    color: #cbd5e1;
}

/* ─── Modal de Recuperação de Acesso em HTML/CSS (Clean Branco) ─────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-content {
    background: #ffffff;
    border: 1px solid var(--sys-card-border);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 26px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    animation: modalPop 0.2s ease-out forwards;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sys-text-main);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--sys-text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--sys-text-main);
}

.modal-body p {
    font-size: 0.85rem;
    color: var(--sys-text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

/* ─── Responsividade ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .login-screen {
        flex-direction: column;
    }
    
    .screen-left {
        flex: none;
        padding: 48px 32px 32px;
        text-align: center;
        align-items: center;
    }
    
    .left-brand {
        margin-bottom: 20px;
    }
    
    .left-headline {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .left-description {
        font-size: 0.95rem;
        margin: 0 auto;
    }
    
    .screen-right {
        flex: 1;
        padding: 40px 20px 60px;
    }
    
    .right-footer {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .screen-left {
        padding: 36px 20px 24px;
    }
    
    .left-headline {
        font-size: 1.75rem;
    }
    
    .login-card {
        padding: 28px 20px;
        border-radius: 16px;
    }
}
