/* =============================================================================
   SiM Hub · Login (v0.14.27.23 — redesign corporativo)
   Tela dividida: formulário sóbrio à esquerda + painel institucional de saúde
   à direita. Sem blobs/glassmorphism. IDs preservados (login-form, etc).
   ============================================================================= */

.login-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    overflow: hidden;
}

.login-split {
    display: grid;
    grid-template-columns: minmax(400px, 1fr) 1.1fr;
    height: 100%;
}

/* ---------- ESQUERDA: formulário ---------- */
.login-pane {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    background: var(--bg);
    overflow-y: auto;
}

.login-box {
    width: 100%;
    max-width: 360px;
}

/* Selo "Exclusivo · Flua" — contexto ACIMA do logo do produto (não compete com ele) */
.login-box .exclusive-badge,
.login-box .platform-tag {
    margin-bottom: 24px;
}

/* Logo Flua do selo: 140px de largura = mínimo digital do brandbook */
.platform-tag-flua { width: 140px; height: auto; display: block; }

/* Logo TratativasCX — PROTAGONISTA: maior elemento de marca da tela */
.login-box .tcx-logo { display: block; width: 260px; height: auto; margin-bottom: 18px; }

.login-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 16px 0 4px;
    color: var(--text-main);
    white-space: nowrap;   /* "Portal de backoffice da Flua." em uma linha só */
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin: 0 0 28px;
}

/* ---------- Form ---------- */
.login-form {
    display: flex;
    flex-direction: column;
}

.login-field {
    margin-bottom: 16px;
}

.login-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    margin-bottom: 7px;
}

.login-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Estado de erro (app.js adiciona .input-error quando o login falha) */
.login-input.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-soft);
}

/* Mensagem de erro (preenchida pelo app.js) */
.login-error {
    font-size: 0.8rem;
    color: var(--danger);
    min-height: 18px;
    margin: 0 0 8px;
}

.login-submit {
    width: 100%;
    margin-top: 4px;
    padding: 12px 20px;
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 150ms ease;
}

.login-submit:hover { background: var(--primary-hover); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.login-help {
    margin-top: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
.login-help strong { color: var(--text-sub); font-weight: 600; }

/* ---------- Rodapé do form ---------- */
.login-foot {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-foot-powered {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 600;
}
.login-foot-powered img { height: 18px; opacity: 0.8; }
.login-foot-version {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
}

/* ---------- DIREITA: painel institucional (saúde) ---------- */
.login-brand-pane {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 64px;
    color: #FFFFFF;
    /* Azul-escuro Flua — constante nos dois temas (âncora de marca) */
    background: linear-gradient(160deg, #0B2C45 0%, #06192A 100%);
}

/* Grafismo "u" (brandbook Flua p.32). Desenha-se na entrada; sem animação em movimento reduzido. */
.login-brand-curva { position: absolute; top: 0; right: 72px; pointer-events: none; }   /* longe do botão de tema */
.login-brand-curva-traco {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: curvaEntra 1.4s cubic-bezier(.4, 0, .2, 1) .2s forwards;
}
@keyframes curvaEntra { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .login-brand-curva-traco { animation: none; stroke-dashoffset: 0; }
}

.login-brand-content { position: relative; z-index: 1; max-width: 460px; }

/* ===== Login Central: carrossel dinâmico da lateral (cobre o institucional quando ativo) ===== */
.lc-carousel { position: absolute; inset: 0; z-index: 3; overflow: hidden; }
.lc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; display: flex; flex-direction: column; }
.lc-slide.on { opacity: 1; }
.lc-slide.pos-topo { justify-content: flex-start; }
.lc-slide.pos-centro { justify-content: center; }
.lc-slide.pos-rodape { justify-content: flex-end; }
.lc-img { position: absolute; inset: 0; background-repeat: no-repeat; }
.lc-scrim { position: absolute; inset: 0; }
.lc-content { position: relative; padding: 48px; max-width: 560px; }
.lc-eyebrow { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.16); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.lc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; line-height: 1.14; margin: 0 0 10px; color: #fff; letter-spacing: -.02em; }
.lc-text { font-size: .98rem; line-height: 1.5; color: rgba(255,255,255,.88); margin: 0 0 20px; }
.lc-cta { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #0B2C45; font-family: var(--font-display); font-weight: 600; font-size: .88rem; padding: 10px 18px; border-radius: 999px; text-decoration: none; }
.lc-ico { font-size: 2.2rem; margin-bottom: 12px; }
.lc-dots { position: absolute; bottom: 26px; left: 48px; display: flex; gap: 7px; z-index: 4; }
.lc-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; transition: .2s; }
.lc-dot.on { background: #fff; width: 22px; }

.login-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #CCEEF0;
    margin-bottom: 22px;
}
.login-brand-eyebrow::before {
    content: '';
    width: 22px; height: 2px;
    background: #CCEEF0;
    border-radius: 2px;
}

.login-brand-headline {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0 0 16px;
}
.login-brand-headline em { color: var(--accent); font-style: normal; }

.login-brand-text {
    font-size: 0.98rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.78);
    margin: 0 0 40px;
}

.login-brand-seals { display: flex; flex-direction: column; gap: 18px; }
.login-brand-seal { display: flex; align-items: flex-start; gap: 14px; }
/* Ícones em contorno (brandbook Flua p.30): traço teal com um segmento em laranja */
.login-brand-seal-icon { flex-shrink: 0; display: flex; padding-top: 1px; }
.login-brand-seal-icon svg { width: 24px; height: 24px; }
.login-brand-seal-icon .ic-base { stroke: #CCEEF0; }
.login-brand-seal-icon .ic-destaque { stroke: #FE7C45; }
.login-brand-seal-title { font-weight: 600; font-size: 0.92rem; color: #FFFFFF; margin-bottom: 2px; }
.login-brand-seal-desc { font-size: 0.82rem; color: rgba(255,255,255,0.65); line-height: 1.4; }


/* ---------- Toggle de tema (canto superior direito, sobre o painel azul) ----------
   Ícone de lâmpada, estilo "glass" claro — contraste garantido nos dois temas. */
.login-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 5;
    padding: 9px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
}
.login-theme-toggle svg { width: 18px; height: 18px; display: block; }
.login-theme-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
}
/* Em telas estreitas o painel azul some — aí o toggle volta ao estilo padrão. */
@media (max-width: 900px) {
    .login-theme-toggle {
        background: var(--surface-hover);
        border-color: var(--border-strong);
        color: var(--text-sub);
    }
}

/* =============================================================================
   RESPONSIVO
   ============================================================================= */

/* Telas estreitas: esconde o painel, form ocupa tudo */
@media (max-width: 900px) {
    .login-split { grid-template-columns: 1fr; }
    .login-brand-pane { display: none; }
}

/* Telas médias (notebook escala 150% / call center): tudo um degrau menor */
@media (min-width: 901px) and (max-width: 1440px) {
    .login-pane { padding: 36px 32px; }
    .login-box { max-width: 330px; }
    .login-box .exclusive-badge { margin-bottom: 24px; }
    .login-title { font-size: 1rem; }
    .login-subtitle { font-size: 0.85rem; margin-bottom: 22px; }
    .login-input { padding: 9px 12px; font-size: 0.9rem; }
    .login-submit { padding: 10px 18px; font-size: 0.9rem; }
    .login-foot { margin-top: 26px; padding-top: 16px; }

    .login-brand-pane { padding: 40px 44px; }
    .login-brand-headline { font-size: 1.7rem; }
    .login-brand-text { font-size: 0.9rem; margin-bottom: 30px; }
    .login-brand-seals { gap: 14px; }
}
