/*
 * Login — layout específico desta página.
 * Painel de acesso à esquerda (acompanha o tema claro/escuro) e hero
 * institucional à direita (sempre escuro, sobre os tokens de navegação).
 * Mesma composição do login do Lumina Clinic; a ilustração troca a cruz
 * e o batimento por um gráfico de barras e uma linha de tendência.
 * Cores, tipografia e tema vêm inteiramente de v3.css (tokens Lumina) —
 * este arquivo NÃO define nenhuma cor nova, só layout.
 */

.login-v3-page {
    min-height: 100vh;
    display: flex;
    background: var(--nav-bg);
}

/* ── Painel de acesso ─────────────────────────────────────────────── */
.login-v3-panel {
    position: relative;
    z-index: 1;
    flex: 0 0 clamp(360px, 25vw, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 40px;
    background: var(--surface);
    box-shadow: 12px 0 40px var(--shadow-color);
}

.login-v3-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.login-v3-card {
    width: 100%;
    max-width: 330px;
    animation: login-v3-fade-up .4s var(--ease);
}

@keyframes login-v3-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-v3-logo-wrap {
    text-align: center;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.login-v3-logo { height: 66px; width: auto; max-width: 100%; display: inline-block; }

.login-v3-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--danger-soft);
    color: var(--danger);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    font-size: 13.5px;
    margin-bottom: 20px;
}
.login-v3-alert svg { flex-shrink: 0; }

.login-v3-field { margin-bottom: 18px; }

.login-v3-label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 7px;
}
.login-v3-required { color: var(--danger); }

.login-v3-input {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.login-v3-input:hover { border-color: color-mix(in srgb, var(--primary) 38%, var(--border-strong)); }
.login-v3-input:focus {
    border-color: var(--focus-ring);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.login-v3-input::placeholder { color: var(--text-subtle); }

.login-v3-submit {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px var(--shadow-color);
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.login-v3-submit:hover  { background: var(--primary-hover); transform: translateY(-1px); }
.login-v3-submit:active { transform: translateY(1px); }
.login-v3-submit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.login-v3-submit:disabled { opacity: .55; cursor: not-allowed; }

/* ── Hero institucional (sempre escuro) ───────────────────────────── */
.login-v3-hero {
    --hero-line: color-mix(in srgb, var(--nav-text-active) 9%, transparent);
    --hero-line-strong: color-mix(in srgb, var(--nav-text-active) 16%, transparent);

    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px clamp(40px, 6vw, 88px) 48px;
    color: var(--nav-text-active);
    background:
        linear-gradient(115deg, transparent 0 34%, color-mix(in srgb, var(--nav-text-active) 2.5%, transparent) 34% 46%, transparent 46% 58%, color-mix(in srgb, var(--nav-text-active) 2%, transparent) 58% 66%, transparent 66%),
        linear-gradient(150deg, var(--nav-bg) 0%, var(--nav-item-active) 62%, color-mix(in srgb, var(--chart-1) 22%, var(--nav-item-active)) 100%);
}

/* Malha de pontos discreta, mais visível à esquerda. */
.login-v3-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--hero-line) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
    mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
    pointer-events: none;
}

.login-v3-hero__art {
    position: absolute;
    top: 50%;
    right: -9%;
    height: min(92%, 980px);
    width: auto;
    transform: translateY(-48%);
    pointer-events: none;
}
.login-v3-hero__rings path { stroke: var(--hero-line-strong); stroke-width: 2; }
.login-v3-hero__rings path:nth-child(n+4) { stroke: var(--hero-line); }
.login-v3-hero__bars rect {
    fill: color-mix(in srgb, var(--nav-text-active) 6%, transparent);
    stroke: var(--hero-line-strong);
    stroke-width: 2;
}

.login-v3-hero__trend {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 64px;
    width: 100%;
    height: 180px;
    pointer-events: none;
}
.login-v3-hero__trend-line {
    fill: none;
    stroke: url(#loginTrendStroke);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.login-v3-hero__trend-fade  { stop-color: var(--nav-text-active); stop-opacity: 0; }
.login-v3-hero__trend-solid { stop-color: var(--nav-text); stop-opacity: .55; }
.login-v3-hero__trend-dots circle { fill: var(--nav-item-active); stroke: var(--nav-text); stroke-opacity: .55; stroke-width: 2; }
.login-v3-hero__trend-peak { fill: var(--luz); }

.login-v3-hero__content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin-bottom: 96px;
}
.login-v3-hero__eyebrow {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--nav-text);
    margin-bottom: 18px;
}
.login-v3-hero__title {
    font-size: clamp(36px, 3.6vw, 58px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.03em;
    color: var(--nav-text-active);
}
.login-v3-hero__highlight { color: var(--luz); }
.login-v3-hero__lead {
    margin-top: 22px;
    max-width: 470px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--nav-text);
}
.login-v3-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}
.login-v3-hero__chips li {
    padding: 9px 16px;
    border: 1px solid var(--hero-line-strong);
    border-radius: 999px;
    background: color-mix(in srgb, var(--nav-text-active) 4%, transparent);
    font-size: 14px;
    font-weight: 500;
    color: var(--nav-text-active);
}

.login-v3-hero__footer {
    position: absolute;
    left: clamp(40px, 6vw, 88px);
    right: clamp(40px, 6vw, 88px);
    bottom: 28px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--nav-text);
}

/* ── Responsivo: abaixo de 900px só o painel de acesso ───────────── */
@media (max-width: 899.98px) {
    .login-v3-hero { display: none; }
    .login-v3-panel { flex: 1 1 auto; padding: 72px 24px 40px; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    .login-v3-card { animation: none; }
}

/* ADM-R1.1 — variantes do MESMO login (template app/layout/login-page.php):
   selo de contexto sob o logo e dica de campo. O login dos clientes não os usa. */
.login-v3-context {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -12px 0 22px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.login-v3-context__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--luz);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--luz) 25%, transparent);
}
.login-v3-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-subtle);
}
