/*
  ALSOps shell: ESC's structure (title bar, menu bar, big-icon toolbar, tabs, status bar,
  Center/List screens) with a refreshed surface in Alberta Lock Solid's colours
  (albertalocksolid.com: red #EA3324, ink #1E1E1E, gold #D58F47). Light by default, closest to
  what staff know; dark per person (rebuild-plan 5b, "Look and feel").
  Fonts: Oswald 600 (SIL OFL, as ALS's site) for the brand and headings; the system UI font
  (Segoe UI on the shop PCs) for everything else, so nothing waits on a download.
*/
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/oswald-600-latin.woff2") format("woff2");
}

:root, [data-bs-theme="light"] {
  --als-red: #ea3324;
  --als-red-strong: #c8281b;   /* buttons and links on white: 5:1 contrast */
  --als-red-deep: #a71000;
  --als-ink: #1e1e1e;
  --als-ink-2: #2a2a2a;
  --als-ink-text: #f5f3f0;
  --als-gold: #d58f47;
  --als-gold-text: #8a5420;
  --als-gold-soft: #fbefe2;
  --als-bg: #f3f2f0;
  --als-surface: #ffffff;
  --als-surface-2: #faf9f7;
  --als-border: #e3e1dd;
  --als-border-strong: #cfccc6;
  --als-text: #1f1f1f;
  --als-muted: #696661;
  --als-hover: #f0eeea;
  --als-select: #fdeceb;
  --als-ok: #237a3b;
  --als-ok-soft: #e7f4ea;
  --als-warn-soft: #fdf3e2;
  --als-shadow: 0 6px 24px rgba(20, 16, 12, .12), 0 1px 3px rgba(20, 16, 12, .08);
  --als-radius: 8px;
  --bs-body-bg: var(--als-bg);
  --bs-body-color: var(--als-text);
  --bs-border-color: var(--als-border);
  --bs-secondary-color: var(--als-muted);
  --bs-link-color: var(--als-red-strong);
  --bs-link-color-rgb: 200, 40, 27;
  --bs-link-hover-color: var(--als-red-deep);
  --bs-link-hover-color-rgb: 167, 16, 0;
  --bs-primary: var(--als-red-strong);
  --bs-primary-rgb: 200, 40, 27;
  --bs-focus-ring-color: rgba(234, 51, 36, .3);
  --bs-font-sans-serif: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --als-red: #ff5b4d;
  --als-red-strong: #e0412f;
  --als-red-deep: #ff7a6e;
  --als-ink: #0b0b0b;
  --als-ink-2: #1d1d1d;
  --als-ink-text: #ece9e4;
  --als-gold: #e5a564;
  --als-gold-text: #f0bf8a;
  --als-gold-soft: #3a2b1c;
  --als-bg: #121212;
  --als-surface: #1a1a1a;
  --als-surface-2: #1f1f1f;
  --als-border: #2d2c2a;
  --als-border-strong: #3d3b38;
  --als-text: #e9e6e1;
  --als-muted: #a29e97;
  --als-hover: #252422;
  --als-select: #3a1f1c;
  --als-ok: #6fcf86;
  --als-ok-soft: #1c3322;
  --als-warn-soft: #3a2e1a;
  --als-shadow: 0 8px 28px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
  --bs-body-bg: var(--als-bg);
  --bs-body-color: var(--als-text);
  --bs-border-color: var(--als-border);
  --bs-secondary-color: var(--als-muted);
  --bs-link-color: #ff7b6f;
  --bs-link-color-rgb: 255, 123, 111;
  --bs-link-hover-color: #ff9d94;
  --bs-tertiary-bg: var(--als-surface-2);
  color-scheme: dark;
}

html, body { height: 100%; }
body { margin: 0; background: var(--als-bg); color: var(--als-text); font-size: .9rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .panel-title, .auth-title, .cl-title { font-family: "Oswald", var(--bs-font-sans-serif); font-weight: 600; letter-spacing: .01em; }
a { text-underline-offset: 2px; }
kbd { background: var(--als-ink-2); color: var(--als-ink-text); font-size: .78rem; padding: .1rem .35rem; border-radius: 4px; }
.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Buttons in the brand red; danger keeps Bootstrap's own. */
.btn-primary {
  --bs-btn-bg: var(--als-red-strong); --bs-btn-border-color: var(--als-red-strong);
  --bs-btn-hover-bg: var(--als-red-deep); --bs-btn-hover-border-color: var(--als-red-deep);
  --bs-btn-active-bg: var(--als-red-deep); --bs-btn-active-border-color: var(--als-red-deep);
  --bs-btn-disabled-bg: var(--als-red-strong); --bs-btn-disabled-border-color: var(--als-red-strong);
  --bs-btn-focus-shadow-rgb: 234, 51, 36;
}
.btn-outline-primary {
  --bs-btn-color: var(--als-red-strong); --bs-btn-border-color: var(--als-red-strong);
  --bs-btn-hover-bg: var(--als-red-strong); --bs-btn-hover-border-color: var(--als-red-strong); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--als-red-deep); --bs-btn-active-border-color: var(--als-red-deep);
}
.btn { border-radius: 6px; }
.form-control, .form-select { border-radius: 6px; }
.form-control:focus, .form-select:focus { border-color: var(--als-red); box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--als-red-strong); border-color: var(--als-red-strong); }
:focus-visible { outline: 2px solid var(--als-red); outline-offset: 2px; }

/* ------------------------------------------------------------ the shell */
.shell { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
.shell > * { flex: none; }
.shell > .workarea { flex: 1 1 auto; }

.titlebar {
  display: flex; align-items: center; gap: 1rem; height: 44px; padding: 0 .75rem 0 1rem;
  background: var(--als-ink); color: var(--als-ink-text); view-transition-name: titlebar;
  /* Its own layer above the page, so the user menu opens over the toolbar (view-transition-name makes
     the title bar a stacking context, and the toolbar's buttons came later and painted over it). Below dialogs. */
  position: relative; z-index: 1030;
}
.brand { display: flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { width: 24px; height: 24px; }
.brand-name { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
.brand-app { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--als-gold); border-left: 1px solid rgba(255,255,255,.2); padding-left: .55rem; }
.station-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; background: rgba(213, 143, 71, .18); color: #f3c48f; padding: .15rem .55rem; border-radius: 999px; }
.titlebar-right { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.titlebar-btn { border: 0; background: none; color: inherit; width: 34px; height: 34px; border-radius: 6px; opacity: .85; display: grid; place-items: center; }
.titlebar-btn:hover { background: rgba(255,255,255,.1); opacity: 1; }
.titlebar-btn .icon { width: 18px; height: 18px; }
[data-bs-theme="light"] .when-dark, [data-bs-theme="dark"] .when-light { display: none; }
.titlebar-user { border: 0; background: none; color: inherit; display: flex; align-items: center; gap: .45rem; padding: .2rem .45rem .2rem .25rem; border-radius: 999px; }
.titlebar-user:hover, .titlebar-user[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.titlebar-user .icon { width: 14px; opacity: .7; }

.face {
  --hue: 210;
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: hsl(var(--hue) 45% 42%); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .02em; padding: 0; line-height: 1;
}
button.face { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
button.face:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--als-surface), 0 0 0 4px hsl(var(--hue) 45% 55%); }
.face-active { box-shadow: 0 0 0 2px var(--als-surface), 0 0 0 3px var(--als-ok); }
.face-lg { width: 44px; height: 44px; font-size: .95rem; }
.face-none { background: var(--als-border-strong); color: var(--als-text); }
.face-legacy { background: var(--als-ink-2); color: var(--als-gold); }
.face-legacy .icon { width: 20px; height: 20px; }

.menubar { display: flex; flex-wrap: wrap; padding: 0 .4rem; background: var(--als-surface); border-bottom: 1px solid var(--als-border); }
.menubar-item { border: 0; background: none; color: inherit; padding: .32rem .7rem; border-radius: 5px; font-size: .86rem; }
.menubar-item:hover, .menubar-item[aria-expanded="true"] { background: var(--als-hover); }
.dropdown-menu { --bs-dropdown-font-size: .87rem; --bs-dropdown-link-active-bg: var(--als-red-strong); border-color: var(--als-border); box-shadow: var(--als-shadow); border-radius: 8px; padding: .3rem; }
.dropdown-item { display: flex; justify-content: space-between; align-items: center; gap: 2rem; border-radius: 5px; padding: .32rem .65rem; }
.dropdown-item > span { display: inline-flex; align-items: center; gap: .45rem; }
.dropdown-item.disabled { opacity: .5; }
/* ESC's "Reports >" submenus (slice 8): open to the right on hover or keyboard focus. */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu { top: -.35rem; left: calc(100% - .2rem); margin: 0; }
.dropdown-submenu:hover > .dropdown-menu, .dropdown-submenu:focus-within > .dropdown-menu { display: block; }
.submenu-arrow { color: var(--als-muted); font-size: .8rem; }
.fkey { color: var(--als-muted); font-size: .74rem; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: stretch; flex-wrap: wrap; gap: .1rem; padding: .3rem .5rem; background: var(--als-surface); border-bottom: 1px solid var(--als-border); }
.toolbar-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  min-width: 5.6rem; padding: .35rem .45rem .3rem; border: 0; border-radius: 7px; background: none;
  color: var(--als-text); text-decoration: none; font-size: .76rem; line-height: 1.1;
}
.toolbar-btn:hover:not(.disabled) { background: var(--als-hover); color: var(--als-text); }
.toolbar-btn:active:not(.disabled) { transform: translateY(1px); }
.toolbar-btn.disabled { opacity: .42; cursor: default; }
.toolbar-btn .toolbar-icon { width: 26px; height: 26px; stroke-width: 1.6; color: var(--als-ink-2); }
[data-bs-theme="dark"] .toolbar-btn .toolbar-icon { color: var(--als-text); }
.toolbar-btn:hover:not(.disabled) .toolbar-icon { color: var(--als-red); }
.fkey-badge { position: absolute; top: 2px; right: 5px; font-size: .62rem; color: var(--als-muted); font-weight: 600; }
.toolbar-sep { width: 1px; margin: .45rem .3rem; background: var(--als-border); }
.toolbar-spacer { flex: 1; }
.toolbar-whatsnew .toolbar-icon { color: var(--als-gold) !important; fill: var(--als-gold); fill-opacity: .18; }
.count-badge { position: absolute; top: 1px; right: 18px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--als-red); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }

.quickfind { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; padding: .45rem .9rem; background: var(--als-surface-2); border-bottom: 1px solid var(--als-border); font-size: .8rem; }
.quickfind[hidden] { display: none; }
.quickfind label { display: flex; flex-direction: column; gap: .15rem; color: var(--als-muted); }
.quickfind input { width: 11rem; }

.tabstrip { display: flex; align-items: flex-end; gap: .5rem; padding: .35rem .5rem 0; background: var(--als-bg); border-bottom: 1px solid var(--als-border); min-height: 38px; }
.tabs { display: flex; align-items: flex-end; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: thin; }
.tab {
  display: inline-flex; align-items: center; gap: .4rem; max-width: 14rem; padding: .38rem .55rem .42rem .75rem; margin-bottom: -1px;
  border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; color: var(--als-muted); text-decoration: none;
  white-space: nowrap; font-size: .84rem; user-select: none;
}
.tab:hover { background: var(--als-hover); color: var(--als-text); }
.tab.active { background: var(--als-surface); color: var(--als-text); border-color: var(--als-border); box-shadow: inset 0 3px 0 var(--als-red); font-weight: 600; }
.tab .icon { width: 15px; height: 15px; }
.tab-label { overflow: hidden; text-overflow: ellipsis; }
.tab-x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--als-muted); opacity: .55; }
.tab:hover .tab-x, .tab.active .tab-x { opacity: 1; }
.tab-x:hover { background: var(--als-border); color: var(--als-text); }
.tab-x .icon { width: 13px; height: 13px; }
.tab.pinned { padding-right: .75rem; }
.tabstrip-tools { display: flex; gap: 2px; padding-bottom: 4px; }
.tabstrip-btn { border: 0; background: none; color: var(--als-muted); width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; }
.tabstrip-btn:hover { background: var(--als-hover); color: var(--als-text); }

.workarea { min-height: 0; overflow: auto; padding: 1rem 1.1rem 2rem; background: var(--als-surface-2); view-transition-name: workarea; }
.workarea.fill { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.workarea > .flash { margin-bottom: .75rem; }
.workarea.fill > .flash { margin: .5rem .75rem 0; }

.panel { background: var(--als-surface); border: 1px solid var(--als-border); border-radius: var(--als-radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.panel-title { font-size: 1.15rem; color: var(--als-text); margin-bottom: .7rem; display: flex; align-items: center; gap: .45rem; }
.panel-title .icon { color: var(--als-red); }
.page-narrow { max-width: 44rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--als-muted); }
.facts dd { margin: 0; }
/* ------------------------------------------------------------ Dashboard: each person's own cards */
.dash-page { max-width: 1500px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .35rem; }
.dash-greeting { font-size: 1.55rem; margin: 0; }
.dash-date { color: var(--als-muted); font-size: .88rem; }
.dash-tools { display: flex; gap: .4rem; align-items: center; }
.dash-hint { color: var(--als-muted); font-size: .8rem; margin: 0 0 .8rem; }
.dash-hint .icon { width: 13px; height: 13px; vertical-align: -2px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; align-items: start; }
.dash-card { background: var(--als-surface); border: 1px solid var(--als-border); border-radius: var(--als-radius); min-width: 0; transition: box-shadow .15s ease, opacity .15s ease; }
.dash-card.wide { grid-column: span 2; }
@media (max-width: 760px) { .dash-card.wide { grid-column: auto; } }
.dash-card-head { display: flex; align-items: center; gap: .45rem; padding: .55rem .5rem .5rem .55rem; border-bottom: 1px solid var(--als-border); cursor: grab; user-select: none; touch-action: none; }
.dash-grip { width: 15px; height: 15px; color: var(--als-muted); opacity: .45; flex: none; }
.dash-card-icon { width: 18px; height: 18px; color: var(--als-red); flex: none; }
.dash-card-title { font-size: 1rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card-title a, .dash-title-btn { color: var(--als-text); text-decoration: none; }
.dash-title-btn { border: 0; background: none; padding: 0; font: inherit; }
.dash-card-title a:hover, .dash-title-btn:hover { color: var(--als-red-strong); text-decoration: underline; }
.dash-icon-btn { border: 0; background: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--als-muted); flex: none; }
.dash-icon-btn:hover, .dash-icon-btn[aria-expanded="true"] { background: var(--als-hover); color: var(--als-text); }
.dash-icon-btn .icon { width: 16px; height: 16px; }
/* The x shows on hover or focus, always on touch screens. */
.dash-close { opacity: 0; }
.dash-card:hover .dash-close, .dash-card:focus-within .dash-close { opacity: 1; }
@media (hover: none) { .dash-close { opacity: 1; } }
.dash-card-body { padding: .75rem .9rem .85rem; font-size: .88rem; }
.dash-card.is-loading .dash-card-body { opacity: .65; }
.dash-loading { color: var(--als-muted); font-size: .82rem; padding: .6rem 0; }
.dash-none { color: var(--als-muted); margin: .2rem 0; }
.dash-line { margin: 0 0 .5rem; }
.dash-sub { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--als-muted); margin: .8rem 0 .3rem; font-family: var(--bs-font-sans-serif); }
.dash-foot { margin-top: .75rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
/* Numbers across the top of a card. */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .45rem; margin-bottom: .6rem; }
.dash-kpi { display: flex; flex-direction: column; gap: .1rem; padding: .45rem .6rem; border-radius: 7px; background: var(--als-surface-2); border: 1px solid var(--als-border); color: var(--als-text); text-decoration: none; min-width: 0; }
a.dash-kpi:hover { border-color: var(--als-red); color: var(--als-text); }
.dash-kpi b { font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: "Oswald", var(--bs-font-sans-serif); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-kpi span { font-size: .74rem; color: var(--als-muted); }
.dash-kpi.kpi-alert { background: var(--als-warn-soft); border-color: color-mix(in srgb, var(--als-gold) 45%, transparent); }
.dash-kpi.kpi-alert b { color: var(--als-gold-text); }
.dash-kpi.kpi-done b { color: var(--als-ok); }
.dash-kpi.kpi-travel b { color: var(--als-gold-text); }
.dash-kpi.kpi-work b { color: var(--als-red-strong); }
/* Records in a card read as text; the link shows on hover. */
.dash-rows a, .dash-card .fkeys-list a { color: var(--als-text); text-decoration: none; }
.dash-rows a:hover, .dash-card .fkeys-list a:hover { color: var(--als-red-strong); text-decoration: underline; }
/* The wide board card lists the technicians in two columns. */
.dash-card.wide .dash-techs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.4rem; }
.dash-card.wide .dash-techs li:nth-child(2) { border-top: 0; }
@media (max-width: 1100px) { .dash-card.wide .dash-techs { grid-template-columns: 1fr; } .dash-card.wide .dash-techs li:nth-child(2) { border-top: 1px solid var(--als-border); } }
/* Lists of records. */
.dash-rows { list-style: none; margin: 0; padding: 0; }
.dash-rows li { display: flex; align-items: center; gap: .55rem; padding: .38rem 0; border-top: 1px solid var(--als-border); min-width: 0; }
.dash-rows li:first-child { border-top: 0; }
.dash-row-icon { width: 16px; height: 16px; color: var(--als-muted); flex: none; }
.dash-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-row-main > a, .dash-row-main > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-row-meta { color: var(--als-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-row-end { font-variant-numeric: tabular-nums; color: var(--als-muted); font-size: .8rem; flex: none; }
.dash-techs li.late .dash-row-icon, .dash-techs li.late .dash-row-meta { color: var(--als-gold-text); }
.dash-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.dash-chip { display: inline-flex; align-items: center; gap: .3rem; flex: none; padding: .08rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 600; border: 1px solid rgba(0, 0, 0, .08); }
.dash-empty-all { text-align: center; padding: 3rem 1rem; color: var(--als-muted); border: 2px dashed var(--als-border); border-radius: var(--als-radius); }
/* Dragging: the card stays as the gap, a copy follows the pointer. */
.dash-dragging, .dash-dragging * { cursor: grabbing !important; user-select: none; }
.dash-card.dash-gap { opacity: .35; outline: 2px dashed var(--als-border-strong); outline-offset: -2px; box-shadow: none; }
.dash-ghost { position: fixed; z-index: 1500; pointer-events: none; overflow: hidden; box-shadow: var(--als-shadow); opacity: .95; margin: 0; }
/* Add a card. */
.dash-add-modal .modal-title { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.dash-add-modal .modal-title .icon { color: var(--als-red); }
.dash-add-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .5rem; }
.dash-add-item { display: flex; align-items: center; gap: .7rem; padding: .65rem .75rem; border: 1px solid var(--als-border); border-radius: 9px; }
.dash-add-icon { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--als-gold-soft); color: var(--als-gold-text); }
.dash-add-main { flex: 1; min-width: 0; }
.dash-add-name { font-weight: 600; font-size: .92rem; }
.dash-add-desc { font-size: .78rem; color: var(--als-muted); }
.fkeys-list kbd { min-width: 2.2rem; display: inline-block; text-align: center; }

.flash { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: 7px; border: 1px solid; font-size: .88rem; }
.flash-ok { background: var(--als-ok-soft); border-color: color-mix(in srgb, var(--als-ok) 30%, transparent); }
.flash-ok .icon { color: var(--als-ok); }
.flash-error { background: var(--als-select); border-color: color-mix(in srgb, var(--als-red) 35%, transparent); }
.flash-error .icon { color: var(--als-red); }

.statusbar { display: flex; gap: 1rem; align-items: center; min-height: 32px; padding: .2rem .9rem; background: var(--als-surface); border-top: 1px solid var(--als-border); color: var(--als-muted); font-size: .78rem; }
.statusbar-spacer { flex: 1; }
.status-company { font-weight: 600; color: var(--als-text); }
.status-user, .status-active { display: inline-flex; align-items: center; gap: .4rem; color: var(--als-text); }
.status-station { display: inline-flex; align-items: center; gap: .6rem; }
.status-faces { display: inline-flex; gap: .25rem; }
.status-btn { border: 1px solid var(--als-border); background: var(--als-surface); color: var(--als-text); border-radius: 999px; padding: .1rem .55rem; font-size: .75rem; display: inline-flex; align-items: center; gap: .3rem; }
.status-btn:hover { border-color: var(--als-red); color: var(--als-red-strong); }
.status-tour { border-color: var(--als-gold); color: var(--als-gold-text); background: var(--als-gold-soft); }
.status-clock, .statusbar-version { font-variant-numeric: tabular-nums; }

.toast-host { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; flex-direction: column; gap: .4rem; z-index: 2000; pointer-events: none; }
.toast-item { pointer-events: auto; display: flex; align-items: center; gap: .55rem; padding: .55rem .9rem; border-radius: 8px; background: var(--als-ink-2); color: var(--als-ink-text); box-shadow: var(--als-shadow); font-size: .86rem; max-width: 34rem; animation: als-rise .16s ease-out; }
.toast-item.error { background: var(--als-red-deep); color: #fff; }
.toast-item .btn { --bs-btn-padding-y: .1rem; }
@keyframes als-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.new-tag { display: inline-block; vertical-align: middle; margin-left: .35rem; padding: .05rem .38rem; border-radius: 4px; background: var(--als-gold); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; cursor: pointer; font-family: var(--bs-font-sans-serif); }

/* Step-up: an inline password prompt next to what asked for it. */
.stepup { display: flex; gap: .65rem; align-items: flex-start; margin: .6rem 0; padding: .7rem .8rem; border: 1px solid var(--als-gold); background: var(--als-gold-soft); border-radius: 8px; animation: als-rise .14s ease-out; }
.stepup > .icon { width: 22px; height: 22px; color: var(--als-gold-text); margin-top: 2px; }
.stepup-title { font-weight: 600; }
.stepup-text { font-size: .8rem; color: var(--als-muted); margin-bottom: .4rem; }
.stepup-form { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.stepup-form input { width: 13rem; }
.stepup-error { color: var(--als-red-strong); font-size: .8rem; margin-top: .3rem; }
.stepup.floating { position: fixed; left: 50%; bottom: 56px; transform: translateX(-50%); z-index: 2100; box-shadow: var(--als-shadow); background: var(--als-surface); }
.temp-password { border: 1px dashed var(--als-gold); background: var(--als-gold-soft); padding: .6rem .8rem; border-radius: 8px; margin-bottom: .8rem; }
.temp-password code { font-size: 1.15rem; color: var(--als-text); cursor: copy; letter-spacing: .03em; }

/* ------------------------------------------------------------ Center/List */
.center-list { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cl-band { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .55rem; padding: .5rem .8rem; background: var(--als-ink-2); color: var(--als-ink-text); }
.cl-title { font-size: 1.05rem; margin: 0 .6rem 0 0; color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.cl-label { font-size: .78rem; opacity: .75; }
.cl-band .form-select, .cl-band .form-control { background-color: #fff; color: #1f1f1f; border-color: transparent; }
[data-bs-theme="dark"] .cl-band .form-select, [data-bs-theme="dark"] .cl-band .form-control { background-color: #2d2d2d; color: var(--als-text); }
.cl-preset { width: auto; min-width: 12rem; }
.cl-search { position: relative; }
.cl-search .icon { position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); color: #8a8680; pointer-events: none; }
.cl-search input { padding-left: 1.85rem; width: 19rem; }
.cl-btn { --bs-btn-color: var(--als-ink-text); --bs-btn-border-color: rgba(255,255,255,.22); --bs-btn-hover-bg: rgba(255,255,255,.1); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: rgba(255,255,255,.4); --bs-btn-disabled-color: rgba(255,255,255,.4); --bs-btn-disabled-border-color: rgba(255,255,255,.12); display: inline-flex; align-items: center; gap: .3rem; }
.cl-add { --bs-btn-bg: var(--als-red-strong); --bs-btn-border-color: var(--als-red-strong); --bs-btn-hover-bg: var(--als-red); --bs-btn-hover-border-color: var(--als-red); }
.cl-band-form { display: inline; margin: 0; }
.cl-tools { display: inline-flex; gap: .15rem; margin-left: auto; }
.cl-tool { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--als-ink-text); opacity: .8; }
.cl-tool:hover { background: rgba(255,255,255,.12); opacity: 1; color: #fff; }
.cl-count { font-size: .8rem; opacity: .85; margin-left: .3rem; white-space: nowrap; }
.cl-body { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; flex: 1; min-height: 0; }
.cl-grid-wrap { overflow: auto; min-height: 0; background: var(--als-surface); position: relative; }
.center-list.cl-loading .cl-grid tbody { opacity: .55; transition: opacity .15s .1s; }
.cl-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.cl-grid:focus { outline: none; }
.cl-grid thead th { position: sticky; top: 0; z-index: 1; background: var(--als-surface-2); border-bottom: 1px solid var(--als-border-strong); font-weight: 600; text-align: left; padding: 0; white-space: nowrap; }
.cl-grid thead th > span, .cl-sort { display: flex; align-items: center; gap: .3rem; width: 100%; padding: .45rem .65rem; border: 0; background: none; color: var(--als-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
.cl-sort:hover { color: var(--als-text); background: var(--als-hover); }
.cl-arrow::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: .15rem; }
th[aria-sort="ascending"] .cl-arrow::after { border: 4px solid transparent; border-bottom: 5px solid var(--als-red); transform: translateY(-2px); }
th[aria-sort="descending"] .cl-arrow::after { border: 4px solid transparent; border-top: 5px solid var(--als-red); transform: translateY(2px); }
th[aria-sort="ascending"] .cl-sort, th[aria-sort="descending"] .cl-sort { color: var(--als-text); }
.cl-grid tbody td { padding: .42rem .65rem; border-bottom: 1px solid var(--als-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.cl-grid tbody tr { cursor: default; }
.cl-grid tbody tr:hover td { background: var(--als-hover); }
.cl-grid tbody tr.selected td { background: var(--als-select); }
.cl-grid tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--als-red); }
.cl-grid td.num, .cl-grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cl-grid td.chk, .cl-grid th.chk { text-align: center; }
.cl-grid td.muted, .cl-row-muted td { color: var(--als-muted); }
.cl-check { color: var(--als-ok); width: 16px; height: 16px; stroke-width: 2.4; }
.cl-group td { background: var(--als-surface-2); font-weight: 600; padding-top: .55rem !important; border-bottom-color: var(--als-border-strong) !important; cursor: pointer; }
.cl-group-detail { font-weight: 400; color: var(--als-muted); margin-left: .6rem; font-size: .78rem; }
.cl-badge { display: inline-block; padding: .08rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--als-hover); color: var(--als-muted); border: 1px solid var(--als-border); }
.cl-badge-active { background: var(--als-ok-soft); color: var(--als-ok); border-color: transparent; }
.cl-badge-waiting, .cl-badge-temporary-password { background: var(--als-warn-soft); color: var(--als-gold-text); border-color: transparent; }
.cl-badge-disabled, .cl-badge-locked, .cl-badge-revoked { background: var(--als-select); color: var(--als-red-strong); border-color: transparent; }
.cl-empty, .cl-more { padding: 1.5rem; color: var(--als-muted); text-align: center; }
.cl-empty[hidden], .cl-more[hidden] { display: none; }
.cl-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--als-border); background: var(--als-surface); }
.cl-tabs { display: flex; gap: .2rem; padding: .45rem .6rem 0; border-bottom: 1px solid var(--als-border); background: var(--als-surface-2); }
.cl-tab { border: 1px solid transparent; border-bottom: 0; background: none; padding: .35rem .7rem; border-radius: 6px 6px 0 0; margin-bottom: -1px; color: var(--als-muted); font-size: .82rem; display: inline-flex; gap: .3rem; align-items: center; }
.cl-tab.active { background: var(--als-surface); border-color: var(--als-border); color: var(--als-text); font-weight: 600; }
.cl-details, .cl-refine { flex: 1; overflow: auto; padding: .9rem 1rem; min-height: 0; }
.cl-refine[hidden], .cl-details[hidden] { display: none; }
.cl-placeholder { color: var(--als-muted); text-align: center; padding: 2.5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.cl-placeholder .icon { width: 34px; height: 34px; opacity: .45; }
.cl-big-action { width: 100%; display: flex; align-items: center; justify-content: center; gap: .45rem; }
.cl-side > .cl-big-action { width: auto; margin: .7rem 1rem 1rem; }
.cl-big-action-form { margin-top: 1rem; position: sticky; bottom: -.9rem; padding: .7rem 0 .9rem; background: linear-gradient(transparent, var(--als-surface) 30%); }
.cl-d-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.cl-d-title { flex: 1; min-width: 0; }
.cl-d-title h2 { font-size: 1.1rem; margin: 0; }
.cl-d-title .muted, .cl-facts .muted { color: var(--als-muted); font-size: .78rem; }
.cl-facts { display: grid; grid-template-columns: 7.5rem 1fr; gap: .35rem .8rem; font-size: .84rem; margin-bottom: 1rem; }
.cl-facts dt { color: var(--als-muted); font-weight: 600; font-size: .78rem; padding-top: .1rem; }
.cl-facts dd { margin: 0; }
.cl-d-label { font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--als-muted); margin-bottom: .35rem; }
.cl-roles { margin-bottom: 1rem; }
.cl-role { display: flex; gap: .55rem; align-items: flex-start; padding: .32rem .2rem; border-radius: 6px; cursor: pointer; }
.cl-role:hover { background: var(--als-hover); }
.cl-role .form-check-input { margin-top: .2rem; flex: none; }
.cl-role strong { display: block; font-size: .84rem; }
.cl-role small { display: block; color: var(--als-muted); font-size: .74rem; line-height: 1.3; }
.cl-d-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.cl-d-actions form { margin: 0; }
.cl-mini { --bs-table-bg: transparent; }
.cl-mini td, .cl-mini th { padding: .2rem .3rem; }
.cl-summary { margin: 0; padding: .3rem .9rem; font-size: .76rem; color: var(--als-muted); border-top: 1px solid var(--als-border); background: var(--als-surface-2); }

@media (max-width: 1100px) {
  .cl-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 45%); }
  .cl-side { border-left: 0; border-top: 1px solid var(--als-border); }
  .cl-search input { width: 13rem; }
}

/* ------------------------------------------------------------ Tour Centre (What's New and tours) */
.wn-modal .modal-content { border: 0; border-radius: 12px; overflow: hidden; background: var(--als-surface); }
.wn-modal .modal-dialog { max-width: 980px; }
.wn-modal .modal-header { background: var(--als-ink); color: var(--als-ink-text); border: 0; gap: .8rem; }
.wn-modal .modal-header .icon { color: var(--als-gold); fill: var(--als-gold); fill-opacity: .25; width: 22px; height: 22px; }
.wn-modal .modal-title { font-size: 1.25rem; display: flex; gap: .5rem; align-items: center; }
.wn-sub { font-size: .82rem; opacity: .7; }
.wn-modal .btn-close { filter: invert(1); margin-left: auto; }
.wn-body { display: grid; grid-template-columns: 14rem 1fr; padding: 0; min-height: 0; height: min(70vh, 640px); }
/* Areas on the left: one is shown at a time. */
.wn-areas { padding: .8rem .55rem; border-right: 1px solid var(--als-border); background: var(--als-surface-2); display: flex; flex-direction: column; gap: .15rem; overflow: auto; }
.wn-area-btn { border: 0; background: none; text-align: left; padding: .5rem .65rem; border-radius: 7px; color: var(--als-text); display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .88rem; position: relative; }
.wn-area-btn:hover { background: var(--als-hover); }
.wn-area-btn.active { background: var(--als-surface); box-shadow: 0 0 0 1px var(--als-border); font-weight: 600; }
.wn-area-btn.active::before { content: ""; position: absolute; left: 0; top: .45rem; bottom: .45rem; width: 3px; border-radius: 2px; background: var(--als-red); }
.wn-area-btn .n { flex: none; color: var(--als-gold-text); background: var(--als-gold-soft); border-radius: 999px; font-size: .68rem; padding: .05rem .45rem; font-weight: 600; }
/* The shown area. */
.wn-items { padding: 1rem 1.4rem 1.4rem; overflow: auto; }
.tc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.tc-head h2 { font-size: 1.15rem; margin: 0; }
.tc-head span { font-size: .8rem; color: var(--als-muted); }
.tc-sec { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--als-muted); margin: 1.1rem 0 .45rem; }
.tc-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem; }
.tc-tour { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border: 1px solid var(--als-border); border-radius: 9px; background: var(--als-surface); }
.tc-tour-icon { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--als-gold-soft); color: var(--als-gold-text); }
.tc-tour-main { flex: 1; min-width: 0; }
.tc-tour-name { font-weight: 600; font-size: .9rem; }
.tc-tour-meta { font-size: .76rem; color: var(--als-muted); }
.tc-items { border: 1px solid var(--als-border); border-radius: 9px; overflow: hidden; }
.tc-item + .tc-item { border-top: 1px solid var(--als-border); }
.tc-item summary { list-style: none; display: flex; align-items: center; gap: .3rem; padding: .6rem .85rem; cursor: pointer; font-size: .9rem; }
.tc-item summary::-webkit-details-marker { display: none; }
.tc-item summary:hover { background: var(--als-hover); }
.tc-item.unread summary { box-shadow: inset 3px 0 0 var(--als-gold); }
.tc-item-title { font-weight: 500; }
.tc-item .new-tag { margin-left: .4rem; }
.tc-chev { margin-left: auto; width: 16px; height: 16px; color: var(--als-muted); transition: transform .15s ease; }
.tc-item[open] .tc-chev { transform: rotate(180deg); }
.tc-item[open] summary { background: var(--als-surface-2); }
.tc-item-body { padding: .55rem .95rem .8rem; }
.tc-item-body p { margin: 0 0 .4rem; font-size: .86rem; }
.tc-item-body .btn { margin-top: .2rem; }
.wn-label { display: inline-block; min-width: 3.6rem; font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--als-muted); }
.wn-now { color: var(--als-ok); }
.wn-why { color: var(--als-gold-text); }
.wn-empty { color: var(--als-muted); padding: 2rem; text-align: center; }
/* Help > Tour Centre as a page: every area, one after another. */
.wn-area-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--als-muted); margin: 1.4rem 0 .3rem; padding-bottom: .3rem; border-bottom: 1px solid var(--als-border); }
.tc-page .tc-item { border: 1px solid var(--als-border); border-radius: 9px; margin-bottom: .35rem; overflow: hidden; }
.tc-page .tc-item + .tc-item { border-top: 1px solid var(--als-border); }
@media (max-width: 720px) {
  .wn-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 80vh; }
  .wn-areas { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--als-border); padding: .45rem; }
  .wn-area-btn { white-space: nowrap; }
  .wn-area-btn.active::before { display: none; }
}

/* Driver.js popovers in ALS's colours. */
.driver-popover.als-tour { background: var(--als-surface); color: var(--als-text); border-radius: 12px; border-top: 4px solid var(--als-red); box-shadow: var(--als-shadow); max-width: 23rem; padding: 1rem 1.1rem .85rem; font-family: var(--bs-font-sans-serif); }
.driver-popover.als-tour .driver-popover-title { font-family: "Oswald", sans-serif; font-size: 1.15rem; font-weight: 600; }
.driver-popover.als-tour .driver-popover-description { font-size: .9rem; line-height: 1.45; color: var(--als-text); }
.driver-popover.als-tour .driver-popover-progress-text { color: var(--als-muted); font-size: .75rem; }
.driver-popover.als-tour .driver-popover-footer button { text-shadow: none; border-radius: 6px; font-size: .82rem; padding: .3rem .7rem; border: 1px solid var(--als-border-strong); background: var(--als-surface); color: var(--als-text); }
.driver-popover.als-tour .driver-popover-footer .driver-popover-next-btn { background: var(--als-red-strong); border-color: var(--als-red-strong); color: #fff; }
.driver-popover.als-tour .driver-popover-close-btn { color: var(--als-muted); }
.driver-popover.als-tour .tour-extra { display: flex; gap: .7rem; margin-top: .6rem; font-size: .76rem; }
.driver-popover.als-tour .tour-extra button { border: 0 !important; background: none !important; padding: 0 !important; color: var(--als-muted) !important; text-decoration: underline; }
.driver-popover.als-tour .tour-try { display: block; margin-top: .45rem; font-weight: 600; color: var(--als-gold-text); }
.driver-popover.als-tour .driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: var(--als-surface); }
.driver-popover.als-tour .driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: var(--als-red); }
.driver-popover.als-tour .driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: var(--als-surface); }
.driver-popover.als-tour .driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: var(--als-surface); }

/* ------------------------------------------------------------ shared stations: the PIN pad */
.pinpad {
  position: fixed; right: 14px; bottom: 40px; z-index: 1900; width: 19rem; padding: .8rem .9rem .7rem;
  background: var(--als-surface); color: var(--als-text); border: 1px solid var(--als-border); border-radius: 14px; box-shadow: var(--als-shadow);
  animation: als-rise .14s ease-out;
}
.pinpad[hidden] { display: none; }
.pinpad-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .55rem; }
.pinpad-station { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--als-muted); display: flex; gap: .3rem; align-items: center; }
.pinpad-who { font-weight: 600; font-size: .98rem; }
.pinpad-close { border: 0; background: none; color: var(--als-muted); width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; }
.pinpad-close:hover { background: var(--als-hover); }
.pinpad-faces { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .6rem; }
.pinpad-faces:empty { display: none; }
.pinpad-faces .face-lg { display: inline-flex; flex-direction: column; width: 52px; height: 52px; border-radius: 12px; gap: 0; }
.pinpad-faces .face-lg small { font-size: .55rem; font-weight: 500; opacity: .9; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinpad-faces .face-lg.chosen { box-shadow: 0 0 0 2px var(--als-surface), 0 0 0 4px var(--als-red); }
.pin-dots { display: flex; justify-content: center; gap: .8rem; margin: .4rem 0 .3rem; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--als-border-strong); transition: background .08s, border-color .08s, transform .08s; }
.pin-dots i.on { background: var(--als-red); border-color: var(--als-red); transform: scale(1.08); }
.pinpad.busy .pin-dots i.on { animation: als-pulse .6s ease-in-out infinite alternate; }
@keyframes als-pulse { to { opacity: .4; } }
.pinpad.shake .pin-dots { animation: als-shake .32s; }
@keyframes als-shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
.pin-msg { min-height: 1.2rem; text-align: center; font-size: .8rem; color: var(--als-red-strong); margin-bottom: .35rem; }
.pin-msg.ok { color: var(--als-ok); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pin-key { height: 46px; border-radius: 10px; border: 1px solid var(--als-border); background: var(--als-surface-2); color: var(--als-text); font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pin-key:hover { background: var(--als-hover); border-color: var(--als-border-strong); }
.pin-key:active { transform: scale(.97); background: var(--als-select); }
.pin-key-text { font-size: .76rem; font-weight: 600; color: var(--als-muted); }
.pin-password, .pin-find { margin-top: .55rem; }
.pin-password[hidden], .pin-find[hidden] { display: none; }
.pin-find-results { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.pin-find-results button { border: 1px solid var(--als-border); background: var(--als-surface-2); color: var(--als-text); border-radius: 999px; padding: .2rem .6rem .2rem .2rem; display: inline-flex; gap: .35rem; align-items: center; font-size: .82rem; }
.pinpad-foot { display: flex; justify-content: space-between; margin-top: .6rem; font-size: .72rem; }
.pinpad-foot .text-body-secondary { display: none; }

/* Locked: the work blurs behind the PIN pad; same pad, centred and larger. */
.lock-overlay { position: fixed; inset: 0; z-index: 1800; background: color-mix(in srgb, var(--als-ink) 45%, transparent); display: grid; place-items: start center; padding-top: 7vh; }
.lock-overlay[hidden] { display: none; }
.lock-clock { color: #fff; font-family: "Oswald", sans-serif; font-size: 3.2rem; text-shadow: 0 2px 12px rgba(0,0,0,.4); font-variant-numeric: tabular-nums; }
body.locked .shell { filter: blur(14px) saturate(.8); pointer-events: none; user-select: none; transition: filter .2s; }
body.locked .pinpad, .pinpad.pinpad-locked { right: auto; left: 50%; bottom: auto; top: 50%; transform: translate(-50%, -45%); width: 22rem; padding: 1.1rem 1.2rem 1rem; animation: none; }
body.locked .pin-key { height: 54px; font-size: 1.3rem; }
body.locked .pin-key-text { font-size: .8rem; }
.lock-brand { display: flex; align-items: center; justify-content: center; gap: .5rem; color: rgba(255,255,255,.85); font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .95rem; margin-bottom: .2rem; }
.lock-brand img { width: 22px; height: 22px; }
body.lock-page .auth-main { display: none; }
body.lock-page .lock-overlay { background: transparent; }

/* ------------------------------------------------------------ sign-in screens */
.auth-body { min-height: 100vh; background: #111 radial-gradient(circle at 20% 0%, #3a3a3a 0, #1e1e1e 55%, #111 100%) fixed; color: var(--als-text); }
.auth-main { max-width: 27rem; margin: 0 auto; padding: 6vh 1rem 2rem; }
.auth-main.auth-wide { max-width: 46rem; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-bottom: 1.2rem; }
.auth-logo { width: 146px; height: auto; border-radius: 8px; box-shadow: 0 6px 22px rgba(0,0,0,.45); }
.auth-app { color: var(--als-gold); font-size: .78rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.auth-card { background: var(--als-surface); border-radius: 14px; padding: 1.5rem 1.6rem; box-shadow: 0 18px 48px rgba(0,0,0,.45); border-top: 4px solid var(--als-red); }
.auth-title { font-size: 1.5rem; margin-bottom: .6rem; }
.auth-note { color: var(--als-muted); font-size: .9rem; }
.auth-note .icon { color: var(--als-gold-text); }
.auth-help { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--als-border); font-size: .84rem; color: var(--als-muted); }
.auth-foot { text-align: center; color: rgba(255,255,255,.45); font-size: .75rem; margin-top: 1.2rem; }
.auth-main > .flash { margin-bottom: .75rem; }
.lock-intro { text-align: center; color: #fff; }
.lock-intro .auth-title { color: #fff; }
.lock-intro .auth-note { color: rgba(255,255,255,.7); }
.ca-step { border: 0; margin: 0 0 1.2rem; padding: 0; }
.ca-step legend { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.ca-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--als-red-strong); color: #fff; font-size: .78rem; font-weight: 700; }
.ca-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .4rem; max-height: 17rem; overflow: auto; padding: .15rem; }
.ca-person { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border: 1px solid var(--als-border); border-radius: 9px; cursor: pointer; transition: opacity .12s, border-color .12s; }
.ca-person:hover { border-color: var(--als-border-strong); background: var(--als-hover); }
.ca-person input { position: absolute; opacity: 0; pointer-events: none; }
.ca-person:has(input:checked) { border-color: var(--als-red); background: var(--als-select); box-shadow: 0 0 0 1px var(--als-red); }
.ca-person:has(input:focus-visible) { outline: 2px solid var(--als-red); }
.ca-person strong { display: block; font-size: .86rem; }
.ca-person small { display: block; font-size: .72rem; color: var(--als-muted); }
.ca-person .face { width: 30px; height: 30px; }
.ca-person.ca-dim { opacity: .35; }
.ca-none { border-style: dashed; }
.ca-pin { margin-top: 1rem; padding: .7rem .85rem; border: 1px solid var(--als-border); border-radius: 9px; background: var(--als-surface-2); }
.ca-pin summary { font-weight: 600; cursor: pointer; }
.pin-input { width: 7rem; letter-spacing: .5em; font-size: 1.1rem; text-align: center; }

/* Quick, quiet page transitions (Chrome and Edge), with the shell standing still. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 90ms; }
::view-transition-old(workarea) { animation: 90ms ease-out both als-fade-out; }
::view-transition-new(workarea) { animation: 140ms ease-out both als-fade-in; }
@keyframes als-fade-out { to { opacity: 0; } }
@keyframes als-fade-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } * { animation: none !important; transition: none !important; } }

/* Printing a screen prints its content only. */
@media print {
  .titlebar, .menubar, .toolbar, .quickfind, .tabstrip, .statusbar, .cl-band .cl-tools, .cl-side, .pinpad, .lock-overlay, .toast-host { display: none !important; }
  .shell { display: block; height: auto; }
  .workarea, .workarea.fill, .cl-grid-wrap { overflow: visible; padding: 0; }
  .cl-body { display: block; }
  .cl-band { background: none; color: #000; }
  .cl-grid thead th { position: static; }
}
