/* ==========================================
   LOGIN — Identidade unificada com
   raioxescala.css e escala.css
   ------------------------------------------
   Identidade Visual: VERSALITY CLIN
   Paleta e tipografia atualizadas conforme
   Manual de IDV (roxo/azul + Montserrat/Inter).
   Estrutura, medidas e comportamento inalterados.
   ========================================== */
:root {
    /* ── Marca Versalyti Clin ── */
    --brand-primary:       #7E2171;   /* Roxo Versalyti — títulos e CTA principal */
    --brand-accent:        #25A8CD;   /* Azul Versalyti — foco e detalhes (não-texto) */
    --brand-accent-strong: #187C9C;   /* Azul acessível (AA 4.77:1 em branco) — links/botão */
    --brand-accent-hover:  #146A82;   /* Hover dos elementos em azul */
    --brand-accent-light:  #F3E7F0;   /* Tint roxo suave — fundo de selo/badge */
    --bg-app:              #F5F4F4;   /* Cinza fundo Versalyti */
    --card-bg:             #ffffff;
    --text-main:           #353541;   /* Cinza escuro Versalyti */
    --text-muted:          #707172;   /* Cinza claro Versalyti */
    --border-soft:         #E6E3EA;   /* Borda neutra alinhada ao roxo */
    --shadow-md: 0 4px 12px -2px rgba(53,53,65,.10), 0 2px 6px -2px rgba(53,53,65,.05);
    --shadow-lg: 0 20px 40px -8px rgba(53,53,65,.14), 0 8px 16px -4px rgba(53,53,65,.07);
    --radius-lg: 12px;
    --radius-md: 8px;
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    /* ── Tipografia Versalyti ── */
    --font-title: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   ESTRUTURA SPLIT-SCREEN
   ========================================== */
.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ── Lado esquerdo — Branding ── */
.login-brand {
    flex: 1;
    /* ✅ Gradiente-assinatura Versalyti: roxo → azul → azul claro (Manual de IDV) */
    background: linear-gradient(135deg, #7E2171 0%, #25A8CD 76%, #43BFE8 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    position: relative;
    overflow: hidden;
}

/* Círculos decorativos de fundo — elegância sem peso */
.login-brand::before,
.login-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: #ffffff;
}
.login-brand::before {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}
.login-brand::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -60px;
}

.brand-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Marca branca (alternativa do Manual de IDV) aplicada direto sobre o gradiente */
.brand-icon {
    display: inline-flex;
    align-items: center;
    margin-bottom: 28px;
}

.brand-icon img {
    height: 54px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Wordmark VERSALITY CLIN — caixa-alta com dois pesos (Manual de IDV) */
.login-brand h1 {
    font-family: var(--font-title);
    font-size: 32px;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    line-height: 1.2;
    color: #ffffff;
    white-space: normal;
    overflow-wrap: anywhere;
}
.login-brand h1 .wm-strong { font-weight: 800; }
.login-brand h1 .wm-thin   { font-weight: 300; }
.login-brand h1 .wm-sub {
    font-size: 0.62em;
    letter-spacing: 2px;
    margin-left: 0.55em;
}

.login-brand > .brand-content > p {
    font-size: 15px;
    color: rgba(255,255,255,.72);
    max-width: 380px;
    line-height: 1.7;
    margin: 0 0 40px;
}

/* Badges de funcionalidades */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    font-weight: 500;
}

.brand-feature__icon {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

/* Rodapé do branding */
.brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255,255,255,.55);
    font-weight: 500;
}

/* ── Lado direito — Formulário ── */
.login-panel {
    flex: 1;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-panel__container {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.4s ease-out;
}

/* ==========================================
   CABEÇALHO DO FORMULÁRIO
   ========================================== */
.login-header {
    margin-bottom: 32px;
}

/* Faixa de acento no topo */
.login-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-accent-light);
    color: var(--brand-primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.login-header h2 {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 800;
    color: var(--brand-primary);
    margin: 0 0 6px;
    letter-spacing: -0.4px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================
   FORMULÁRIO
   ========================================== */
.corporate-form .form-label {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.corporate-form .form-control {
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-fast);
    background: #FAFAFB;
    color: var(--text-main);
    width: 100%;
}

.corporate-form .form-control::placeholder { color: #A6A6AD; }

.corporate-form .form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(37,168,205,.18);
    background: #ffffff;
    outline: none;
}

/* ── Botões ── */
.btn-corporate {
    height: 44px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    letter-spacing: 0.2px;
}
.btn-corporate:active { transform: scale(0.99); }

/* Botão principal — gradiente-assinatura roxo → azul (texto branco AA em toda a extensão) */
.btn-corporate--dark {
    background: linear-gradient(135deg, #7E2171 0%, #187C9C 100%);
    color: #ffffff;
}
.btn-corporate--dark:hover {
    background: linear-gradient(135deg, #6A1B60 0%, #146A82 100%);
    box-shadow: 0 4px 12px rgba(126,33,113,.30);
}

/* Botão primeiro acesso — azul acessível */
.btn-corporate--primary {
    background: var(--brand-accent-strong);
    color: #ffffff;
}
.btn-corporate--primary:hover {
    background: var(--brand-accent-hover);
    box-shadow: 0 4px 12px rgba(28,134,168,.30);
}

/* ── Rodapé e links ── */
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--brand-accent-strong);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}
.login-footer a:hover { color: var(--brand-accent-hover); }

/* Divisor visual entre botão e link */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--border-soft);
    font-size: 12px;
    color: #A6A6AD;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */
.d-none { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 768px) {

    /* ✅ Permite rolagem — evita conteúdo cortado em telas
       baixas ou quando o teclado do celular abre */
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .login-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        width: 100%;
    }

    /* ✅ NÃO esconde mais — vira cabeçalho compacto com a marca */
    .login-brand {
        display: flex;
        flex: 0 0 auto;           /* não estica mais pra ocupar a tela */
        width: 100%;
        padding: 16px 20px;
        min-height: 0;
    }

    /* Remove os círculos decorativos — não sobra espaço pra eles
       respirarem num cabeçalho curto */
    .login-brand::before,
    .login-brand::after {
        display: none;
    }

    /* Ícone + título lado a lado, em vez de empilhados */
    .brand-content {
        flex: none;
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        justify-content: flex-start;
    }

    .brand-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .brand-icon img {
        height: 36px;
    }

    .login-brand h1 {
        font-size: 18px;
        line-height: 1.15;
        margin: 0;
    }

    /* Tagline longa, lista de funcionalidades e rodapé não cabem
       num cabeçalho compacto — o espaço fica todo pro formulário */
    .login-brand > .brand-content > p,
    .brand-features,
    .brand-footer {
        display: none;
    }

    .login-panel {
        align-items: flex-start;
        padding: 16px;
        background: var(--bg-app);
        flex: 1;
    }

    .login-panel__container {
        background: var(--card-bg);
        padding: 28px 20px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }

    .corporate-form .form-control {
        min-height: 48px;
        font-size: 16px;
    }

    .btn-corporate {
        min-height: 48px;
        height: auto;
        padding: 12px 16px;
    }
}

@media (max-width: 360px) {
    .login-brand {
        padding: 14px 16px;
    }

    .brand-content {
        gap: 10px;
    }

    .brand-icon img {
        height: 32px;
    }

    .login-brand h1 {
        font-size: 16px;
    }

    .login-panel {
        padding: 12px;
    }

    .login-panel__container {
        padding: 24px 16px;
    }

    .login-header {
        margin-bottom: 24px;
    }

    .login-header h2 {
        font-size: 22px;
    }

    .corporate-form .form-control,
    .btn-corporate {
        min-height: 48px;
        height: 48px;
    }
}
