/* The 2027 sign-in: loaded AFTER login-split.css and only adds / overrides. Palette: School Teal (brand), Ink Blue (headings), Chalk (page), Marigold (the one accent: focus and the live signal).
   The memorable part is the role strip and the live service signal; everything else stays quiet. Light and dark both follow the person's choice (html[data-theme]). */

:root {
    --lg-brand: #1d6f6a;
    --lg-brand-dark: #14524e;
    --lg-ink: #1b2559;
    --lg-muted: #566074;
    --lg-line: #d5dcdf;
    --lg-accent: #f5b800;
    --lg-page: #f6f8f7;
    --lg-card: #ffffff;
    --lg-field: #ffffff;
    --lg-text: #17202c;
    --lg-ok: #0f8a5a;
    --lg-warn: #9a6200;
    --lg-bad: #b3261e;
    --lg-ring: rgba(29, 111, 106, .28);
    color-scheme: light;
}

html[data-theme="dark"] {
    --lg-brand: #4fb8ae;
    --lg-brand-dark: #6fcfc5;
    --lg-ink: #e8eefc;
    --lg-muted: #a1b0ad;
    --lg-line: #2c3f3d;
    --lg-page: #0e1b1a;
    --lg-card: #142624;
    --lg-field: #102120;
    --lg-text: #e7f0ee;
    --lg-ok: #5fd8a2;
    --lg-warn: #f3c75b;
    --lg-bad: #ff8a80;
    --lg-ring: rgba(79, 184, 174, .35);
    color-scheme: dark;
}

body.login-page { background: var(--lg-page); }
.lg-split { font-family: "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.lg-left { background: var(--lg-page); transition: background .2s; }
.lg-form-wrap { max-width: 440px; }

/* ---- top bar: logo and the light / dark switch ---- */
.lg-brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg-logo { color: var(--lg-ink); }
html[data-theme="dark"] .lg-logo img { filter: brightness(0) invert(1); }   /* the dark mark would vanish on the dark page */
.lg-logo span { font-family: Outfit, "Source Sans Pro", system-ui, sans-serif; font-weight: 700; }
.lg-theme { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--lg-line); background: var(--lg-card); color: var(--lg-ink); cursor: pointer; display: grid; place-items: center; transition: border-color .15s, background .15s; }
.lg-theme:hover { border-color: var(--lg-brand); }

/* ---- title ---- */
.lg-title { font-family: Outfit, "Source Sans Pro", system-ui, sans-serif; font-size: clamp(1.7rem, 3.2vw, 2.15rem); font-weight: 700; color: var(--lg-ink); letter-spacing: -.01em; margin: 18px 0 4px; }
.lg-sub { color: var(--lg-muted); font-weight: 400; font-size: 1rem; margin: 0 0 18px; }
.lg-sub small { color: var(--lg-muted); }

/* ---- the live service signal ---- */
.lg-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 11px; border-radius: 999px; font-size: .84rem; font-weight: 600; margin: 0 0 18px; background: var(--lg-card); border: 1.5px solid var(--lg-line); color: var(--lg-muted); }
.lg-pill-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.lg-pill[data-state="success"] { color: var(--lg-ok); border-color: color-mix(in srgb, var(--lg-ok) 40%, transparent); }
.lg-pill[data-state="warning"] { color: var(--lg-warn); border-color: color-mix(in srgb, var(--lg-warn) 45%, transparent); }
.lg-pill[data-state="danger"], .lg-pill[data-state="offline"] { color: var(--lg-bad); border-color: color-mix(in srgb, var(--lg-bad) 45%, transparent); }
.lg-pill[data-state="success"] .lg-pill-dot { animation: lgSignal 2.4s ease-out infinite; }   /* the one orchestrated motion: the service is alive */
@keyframes lgSignal { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lg-ok) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

/* ---- role strip ---- */
.lg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.lg-tab { border: 1.5px solid var(--lg-line); background: var(--lg-card); color: var(--lg-muted); border-radius: 999px; padding: 7px 15px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.lg-tab:hover { color: var(--lg-ink); border-color: var(--lg-brand); }
.lg-tab[aria-selected="true"] { background: var(--lg-brand); border-color: var(--lg-brand); color: #fff; }
html[data-theme="dark"] .lg-tab[aria-selected="true"] { color: #07302c; }

.rs-panel { display: block; }
.rs-panel-tip { margin: 0 0 14px; color: var(--lg-muted); font-size: .9rem; }
#panelSlot[aria-busy="true"] { min-height: 190px; }

/* ---- fields: the label floats up when there is something to say ---- */
.lg-field { margin-bottom: 20px; }
.lg-field input[type="text"], .lg-field input[type="password"] { height: 58px; padding: 24px 46px 6px 15px; border: 1.5px solid var(--lg-line); border-radius: 12px; background: var(--lg-field); color: var(--lg-text); font-size: 1.02rem; }
.lg-field input:focus { border-color: var(--lg-brand); box-shadow: 0 0 0 4px var(--lg-ring); outline: none; }
.lg-field label { left: 15px; top: 19px; font-size: 1rem; color: var(--lg-muted); transition: top .14s ease, font-size .14s ease, color .14s; }
.lg-field input:focus + label, .lg-field input:not(:placeholder-shown) + label { top: 8px; font-size: .72rem; color: var(--lg-brand); }
.lg-field .lg-eye { top: 13px; color: var(--lg-muted); }
.lg-field .lg-eye:hover { background: color-mix(in srgb, var(--lg-brand) 12%, transparent); color: var(--lg-brand); }
.lg-hint { display: block; margin: 5px 4px 0; font-size: .78rem; color: var(--lg-muted); min-height: 1em; }
.lg-hint-warn { color: var(--lg-warn); font-weight: 600; }

/* ---- actions ---- */
.lg-actions { margin-top: 6px; }
.lg-btn { height: 52px; border-radius: 12px; }
.lg-btn-primary { background: var(--lg-brand); border-color: var(--lg-brand); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--lg-brand) 30%, transparent); transition: background .15s, transform .08s, box-shadow .15s; }
html[data-theme="dark"] .lg-btn-primary { color: #07302c; }
.lg-btn-primary:hover:not(:disabled) { background: var(--lg-brand-dark); }
.lg-btn-primary:disabled { opacity: .62; cursor: not-allowed; box-shadow: none; }
.lg-btn-primary.is-busy { position: relative; color: transparent; }
.lg-btn-primary.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2.5px solid #fff; border-right-color: transparent; border-radius: 50%; animation: lgSpin .7s linear infinite; }
html[data-theme="dark"] .lg-btn-primary.is-busy::after { border-color: #07302c; border-right-color: transparent; }
@keyframes lgSpin { to { transform: rotate(360deg); } }
.lg-btn-ghost { background: transparent; color: var(--lg-brand); border-color: var(--lg-line); }
.lg-btn-ghost:hover { background: color-mix(in srgb, var(--lg-brand) 10%, transparent); color: var(--lg-brand-dark); }

/* ---- messages, small print ---- */
.lg-alert { border-radius: 12px; padding: 11px 15px; font-size: .92rem; margin-bottom: 16px; border: 1.5px solid transparent; }
.lg-alert[hidden] { display: none; }
.lg-alert-danger { background: color-mix(in srgb, var(--lg-bad) 10%, var(--lg-card)); color: var(--lg-bad); border-color: color-mix(in srgb, var(--lg-bad) 30%, transparent); }
.lg-row { margin: 2px 0 22px; justify-content: flex-end; }
.lg-row a { color: var(--lg-bad); }
.lg-note, .lg-foot { color: var(--lg-muted); }
.lg-links { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 14px; font-size: .88rem; }
.lg-links a { color: var(--lg-brand); font-weight: 600; }

/* ---- leaving, keyboard, motion, contrast ---- */
.is-leaving { opacity: .0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease; }
:focus-visible { outline: 3px solid var(--lg-accent); outline-offset: 2px; }
.lg-field input:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) {
    .lg-pill-dot, .lg-btn-primary.is-busy::after { animation: none !important; }
    .lg-field label, .is-leaving { transition: none; }
}
@media (forced-colors: active) {
    .lg-tab[aria-selected="true"] { outline: 2px solid Highlight; }
    .lg-pill { border-color: CanvasText; }
}
@media (max-width: 575.98px) {
    .lg-left { padding: 18px 5%; }
    .lg-actions { flex-direction: column; gap: 10px; }
    .lg-btn { flex: none; width: 100%; }   /* in a column, flex:1 would squash the height */
    .lg-tab { padding: 8px 13px; }
}
