/* AFI IT Helpdesk — night rail, moonlight accent, status shown as moon phases */
:root {
  --night: #1c2e93;
  --night-2: #36438f;
  --night-deep: #172575;
  --night-ink: #d3d7ea;
  --paper: #f3f4f7;
  --surface: #ffffff;
  --ink: #1d2433;
  --muted: #646c82;
  --line: #dfe2ea;
  --moon: #fdb902;
  --moon-soft: #fff6d2;
  --focus: #fdb902;
  --urgent: #b8432f;
  --high: #b9761c;
  --normal: #3f6aa6;
  --low: #7d859a;
  --note: #fff7e3;
  --radius-s: 6px;
  --radius-m: 10px;
  --font: Calibri, Carlito, "Segoe UI", system-ui, -apple-system, sans-serif; /* Calibri (Carlito, its metric-compatible twin, where Calibri isn't installed) */
  --font-display: Calibri, Carlito, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --night: #172575;
    --night-2: #2236a3;
    --paper: #12163a;
    --surface: #12205f;
    --ink: #e7e9f0;
    --muted: #9aa1b5;
    --line: #2e3670;
    --moon-soft: #3a3622;
    --note: #2f2a1b;
    --normal: #8fb0ec;
    --low: #a3abbf;
    --urgent: #ff8f7a;
    --high: #f5b54a;
    color-scheme: dark; }
}
:root[data-theme="dark"] { --night: #172575;
    --night-2: #2236a3;
    --paper: #12163a;
    --surface: #12205f;
    --ink: #e7e9f0;
    --muted: #9aa1b5;
    --line: #2e3670;
    --moon-soft: #3a3622;
    --note: #2f2a1b;
    --normal: #8fb0ec;
    --low: #a3abbf;
    --urgent: #ff8f7a;
    --high: #f5b54a;
    color-scheme: dark; }

/* Selected-option colours: navy in light mode, moon yellow in dark mode so choices are always visible. */
:root { --sel-bg: #1c2e93; --sel-fg: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sel-bg: #fdb902; --sel-fg: #12205f; } }
:root[data-theme="dark"] { --sel-bg: #fdb902; --sel-fg: #12205f; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.005em; }
h2 { font-size: 1.05rem; font-weight: 600; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.rail {
  background: var(--night);
  color: var(--night-ink);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: block; text-decoration: none; padding: 2px 8px 0; }
.brand img { display: block; width: 100%; max-width: 190px; height: auto; }
.brand small { display: block; color: var(--night-ink); font-size: .82rem; letter-spacing: .02em; margin-top: 8px; padding-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: var(--radius-s); text-decoration: none; color: var(--night-ink);
}
.nav a:hover { background: var(--night-2); color: #fff; }
.nav a[aria-current="page"] { background: var(--night-2); color: #fff; box-shadow: inset 3px 0 0 var(--focus); }
.nav .count { font-size: .78rem; color: var(--focus); }
.nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 4px; }
.nav-head { font-size: .78rem; color: #8790b0; padding: 0 10px 4px; }
.rail .new-btn {
  display: block; text-align: center; text-decoration: none; font-weight: 600;
  background: var(--moon); color: #1c2e93; border-radius: var(--radius-s); padding: 9px 12px;
}
.rail .new-btn:hover { background: #ffd93d; }
.who { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.who b { display: block; color: #fff; font-weight: 500; }
.who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a { display: inline-block; margin-top: 8px; color: var(--focus); }

.view { padding: 40px clamp(18px, 4vw, 56px) 80px; max-width: 1120px; width: 100%; }
.view:focus { outline: none; }
.loading { color: var(--muted); padding: 40px 0; }

/* ---------- moon phase status ---------- */
.moon { width: 16px; height: 16px; flex: none; }
.moon .ring { fill: none; stroke: var(--night); stroke-width: 1.4; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .moon .ring { stroke: var(--night-ink); }
}
:where(:root[data-theme="dark"]) .moon .ring { stroke: var(--night-ink); }
.moon .lit { fill: var(--moon); }
.moon.closed .lit { fill: var(--low); }
.moon.closed .ring { stroke: var(--low); }
.moon.new .ring { stroke-width: 1.8; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-s); padding: 8px 14px; cursor: pointer; text-decoration: none; font-weight: 500;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--night); border-color: var(--night); color: #fff; }
.btn-primary:hover { background: var(--night-2); border-color: var(--night-2); }
.btn[disabled] { opacity: .55; cursor: progress; }
.field { display: grid; gap: 6px; margin-bottom: 22px; }
.field > label, .field > legend { font-weight: 600; }
.hint { color: var(--muted); font-size: .86rem; margin: 0; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="time"], input[type="date"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); padding: 9px 11px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--night-2); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input, .impact input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: pointer;
}
.chip input:checked + span { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-fg); font-weight: 600; }
.chip input:checked + span::after { content: "✓"; font-weight: 700; margin-left: 2px; }
.chip span:hover { border-color: var(--sel-bg); }
.chip input:focus-visible + span, .impact input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.impact { --pc: var(--night); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .impact { --pc: var(--moon); }
}
:where(:root[data-theme="dark"]) .impact { --pc: var(--moon); }
.impact.p-low { --pc: var(--low); }
.impact.p-normal { --pc: var(--normal); }
.impact.p-high { --pc: var(--high); }
.impact.p-urgent { --pc: var(--urgent); }
.impact span {
  display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--surface); cursor: pointer;
}
.impact b { display: block; font-weight: 600; }
.impact b.with-ico { display: flex; align-items: center; gap: 6px; }
.impact small { color: var(--muted); }
.impact span { position: relative; padding-right: 40px; transition: border-color .12s, background-color .12s; }
.impact span::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); box-sizing: border-box; background: var(--surface);
}
.impact span:hover { border-color: var(--pc); }
.impact input:checked + span {
  border-color: var(--pc); box-shadow: inset 0 0 0 2px var(--pc);
  background: color-mix(in srgb, var(--pc) 9%, var(--surface));
}
.impact input:checked + span::after { border-color: var(--pc); background: var(--pc); box-shadow: inset 0 0 0 3px var(--surface); }
.prio-card span { border-left: 5px solid var(--pc); }
.impact .urg { font-style: normal; font-weight: 700; color: var(--pc); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .impact span { transition: none; } }

.form-narrow { max-width: 720px; }
.page-head { margin-bottom: 28px; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- home ---------- */
.hello { margin-bottom: 36px; display: flex; gap: 24px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.hello h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); max-width: 22ch; }
.hello p { color: var(--muted); margin: 10px 0 0; max-width: 52ch; }
.block { margin-bottom: 34px; }
.block > h2 { margin-bottom: 10px; }
.quiet { color: var(--muted); }

/* ---------- ticket list ---------- */
.tlist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.tlist li + li { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 13px 16px; text-decoration: none; }
.trow:hover { background: color-mix(in srgb, var(--paper) 60%, var(--surface)); }
.tsub { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.tright { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.prio { font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.prio.urgent { color: var(--urgent); }
.prio.high { color: var(--high); }
.prio.normal { color: var(--normal); }
.prio.low { color: var(--low); }

/* ---------- queue ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 3px; }
.tabs button { border: 0; background: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); font-weight: 600; }
.filters { display: flex; gap: 8px; flex: 1 1 420px; justify-content: flex-end; flex-wrap: wrap; }
.filters input { flex: 1 1 220px; max-width: 320px; }
.filters select { width: auto; }

/* ---------- ticket detail ---------- */
.crumb { display: inline-block; color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.t-head { margin-bottom: 26px; }
.t-head h1 { font-size: 1.6rem; max-width: 40ch; }
.t-num { color: var(--muted); font-size: .9rem; margin-bottom: 6px; display: flex; gap: 12px; align-items: center; }
.t-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; align-items: start; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; }
.msg.mine { border-left: 3px solid var(--normal); }
.msg.it { border-left: 3px solid var(--moon); }
.msg.note { background: var(--note); border-style: dashed; border-left: 3px solid var(--high); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.msg-head b { color: var(--ink); font-weight: 600; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file { font-size: .84rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; background: var(--paper); }
.file:hover { border-color: var(--muted); }
.event { display: flex; gap: 8px; align-items: center; font-size: .84rem; color: var(--muted); padding: 0 16px; }
.event::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex: none; }

.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-top: 6px; }
.composer textarea { min-height: 110px; margin: 8px 0 10px; }
.composer.is-note { background: var(--note); }
.kind-switch { display: flex; gap: 4px; }
.kind-switch button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 5px 11px; cursor: pointer; font-size: .88rem; }
.kind-switch button[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); font-weight: 600; }
.composer-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; }
.file-input { font-size: .85rem; color: var(--muted); max-width: 100%; }

.callout { border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 14px; background: var(--moon-soft); border: 1px solid var(--moon); }
.callout p { margin: 0 0 10px; }

.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; position: sticky; top: 20px; }
.side h2 { font-size: .95rem; margin-bottom: 12px; }
.side dl { margin: 0; display: grid; gap: 12px; }
.side dt { font-size: .8rem; color: var(--muted); }
.side dd { margin: 2px 0 0; }
.side .field { margin-bottom: 12px; gap: 4px; }
.side .field > label { font-weight: 500; font-size: .84rem; color: var(--muted); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- overview ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 30px; }
.stat { background: var(--surface); padding: 16px 18px; text-decoration: none; display: block; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: var(--night); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .stat b { color: var(--ink); }
}
:where(:root[data-theme="dark"]) .stat b { color: var(--ink); }
.stat span { color: var(--muted); font-size: .86rem; }
a.stat:hover { background: var(--paper); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.trow > span { min-width: 0; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 150px 1fr 32px; gap: 10px; align-items: center; font-size: .9rem; }
/* bars and charts are SVG so they work under the strict CSP (no inline styles) */
.hbar { width: 100%; height: 8px; display: block; }
.hbar-track { fill: var(--line); }
.hbar-fill { fill: var(--night-2); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .hbar-fill { fill: var(--moon); }
}
:where(:root[data-theme="dark"]) .hbar-fill { fill: var(--moon); }
.mb { margin-bottom: 12px; }

.empty { text-align: left; padding: 30px 0; }
.empty p { color: var(--muted); }

/* ---------- SLA ---------- */
.sla { font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.sla-risk { background: #fff3c4; color: #7a5a00; border-color: #f2d36b; }
.sla-breached { background: #fbe4df; color: #9a2f1d; border-color: #eab3a8; }
.side dd.warn { color: #8a6500; font-weight: 600; }
.side dd.bad { color: var(--urgent); font-weight: 600; }
.stat-bad b { color: var(--urgent) !important; }
.stat-warn b { color: #a87800 !important; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .sla-risk { background: #3d3412; color: #ffd15a; border-color: #6b5a1c; }
  :where(:root:not([data-theme="light"])) .sla-breached { background: #3f1f1a; color: #ff9f8c; border-color: #6e3329; }
  :where(:root:not([data-theme="light"])) .side dd.warn, :where(:root:not([data-theme="light"])) .stat-warn b { color: #ffd15a !important; }
  :where(:root:not([data-theme="light"])) .side dd.bad, :where(:root:not([data-theme="light"])) .stat-bad b { color: #ff9f8c !important; }
}
:where(:root[data-theme="dark"]) .sla-risk { background: #3d3412; color: #ffd15a; border-color: #6b5a1c; }
:where(:root[data-theme="dark"]) .sla-breached { background: #3f1f1a; color: #ff9f8c; border-color: #6e3329; }
:where(:root[data-theme="dark"]) .side dd.warn, :where(:root[data-theme="dark"]) .stat-warn b { color: #ffd15a !important; }
:where(:root[data-theme="dark"]) .side dd.bad, :where(:root[data-theme="dark"]) .stat-bad b { color: #ff9f8c !important; }

/* ---------- admin center ---------- */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -8px 0 24px; overflow-x: auto; }
.subnav a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--moon); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px; margin-bottom: 24px; }
.panel h2 { margin-bottom: 12px; }
.panel > .hint { margin-bottom: 14px; }
.panel h2:not(:first-child) { margin-top: 26px; }
.two-col .panel { margin-bottom: 0; }
.two-col { margin-bottom: 24px; }
.toolbar > .quiet { margin: 0; max-width: 60ch; font-size: .9rem; }
.stats + .stats { margin-top: -18px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .84rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.muted-row td { color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .b-created { fill: var(--night); }
.chart .b-resolved { fill: var(--moon); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .chart .b-created { fill: #8fa0f0; }
}
:where(:root[data-theme="dark"]) .chart .b-created { fill: #8fa0f0; }
.legend { display: flex; gap: 18px; font-size: .86rem; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-created { background: var(--night); }
.lg-resolved { background: var(--moon); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .lg-created { background: #8fa0f0; }
}
:where(:root[data-theme="dark"]) .lg-created { background: #8fa0f0; }
.dur { display: flex; align-items: center; gap: 6px; }
.dur input { width: 72px; padding: 7px 8px; }
.dur span { color: var(--muted); font-size: .88rem; }
.sla-table select { width: auto; }
.narrow-field { max-width: 420px; margin-top: 20px; }
.time-row { display: flex; gap: 16px; flex-wrap: wrap; }
.time-row .field { width: 170px; }
.holiday-add { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.holiday-add input { width: auto; }
.holidays { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; max-width: 420px; }
.holidays li { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.btn-small { padding: 3px 10px; font-size: .84rem; }
#hol-list { margin-bottom: 20px; }

/* ---------- request types ---------- */
.type-pick { display: grid; gap: 14px; }
.type-card {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px;
}
.type-card:hover { border-color: var(--night); box-shadow: inset 4px 0 0 var(--moon); }
.type-card svg { width: 44px; height: 44px; }
.type-card .tc-ring { fill: none; stroke: var(--night); stroke-width: 2.2; }
.type-card .tc-mark { fill: none; stroke: var(--night); stroke-width: 2.6; stroke-linecap: round; }
.type-card .tc-dot { fill: var(--night); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .type-card .tc-ring, :where(:root:not([data-theme="light"])) .type-card .tc-mark { stroke: var(--moon); }
  :where(:root:not([data-theme="light"])) .type-card .tc-dot { fill: var(--moon); }
}
:where(:root[data-theme="dark"]) .type-card .tc-ring, :where(:root[data-theme="dark"]) .type-card .tc-mark { stroke: var(--moon); }
:where(:root[data-theme="dark"]) .type-card .tc-dot { fill: var(--moon); }
.type-card b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.type-card small { display: block; color: var(--muted); font-size: .95rem; margin-top: 4px; max-width: 56ch; }
.type-card em { display: inline-block; font-style: normal; font-size: .8rem; font-weight: 600; color: var(--night); background: var(--moon-soft); border-radius: 999px; padding: 2px 9px; margin-top: 10px; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .type-card em { color: var(--moon); }
}
:where(:root[data-theme="dark"]) .type-card em { color: var(--moon); }
.type-tag { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.type-incident { background: #e6e9f6; color: var(--night); }
.type-service { background: var(--moon-soft); color: #6b5300; border: 1px solid var(--moon); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .type-incident { background: var(--night-2); color: #fff; }
  :where(:root:not([data-theme="light"])) .type-service { color: var(--moon); }
}
:where(:root[data-theme="dark"]) .type-incident { background: var(--night-2); color: #fff; }
:where(:root[data-theme="dark"]) .type-service { color: var(--moon); }
.hw-hint { margin: -6px 0 20px; }
.impact-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.field-row .field { min-width: 150px; }
.field-row .grow { flex: 1 1 220px; }
.field-row .qty { width: 110px; min-width: 0; }
.opt { font-weight: 400; color: var(--muted); font-size: .86rem; }
textarea.short { min-height: 80px; }
.hw-details { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--moon); border-radius: var(--radius-m); padding: 12px 16px; margin-bottom: 14px; }
.hw-details dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; }
.hw-details dt { font-size: .8rem; color: var(--muted); }
.hw-details dd { margin: 2px 0 0; font-weight: 500; }
.linkbar { background: #e9ecf8; border: 1px solid #c7cdea; border-radius: var(--radius-m); padding: 12px 16px; margin-bottom: 14px; }
.linkbar p { margin: 0; }
.linkbar a { font-weight: 600; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .linkbar { background: var(--night-2); border-color: var(--line); }
}
:where(:root[data-theme="dark"]) .linkbar { background: var(--night-2); border-color: var(--line); }
.convert-form { border-color: var(--night); margin-bottom: 14px; }
.convert-form h2 { margin-bottom: 4px; }
.convert-form > .hint { margin-bottom: 16px; }
.dash-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.mix { color: var(--muted); margin: -4px 0 14px; font-size: .92rem; }
.mix b { color: var(--ink); }
@media (max-width: 760px) { .impact-grid.three { grid-template-columns: 1fr; } }

/* ---------- roles, view switch, IT options ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.view-switch {
  display: block; width: 100%; margin: 0 0 12px; padding: 7px 10px; border-radius: var(--radius-s);
  border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; font-size: .86rem; text-align: center;
}
.view-switch:hover { background: var(--night-2); }
.view-switch.on { background: var(--moon); color: #1c2e93; border-color: var(--moon); font-weight: 600; }
.view-note { font-size: .8rem; color: var(--night-ink); margin-bottom: 6px; }
.role-pill { display: inline-block !important; margin-top: 6px; font-size: .74rem; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); color: var(--night-ink); }
.who .role-pill + a { display: block; }
.who .role-pill + .role-pill { margin-left: 4px; }
.it-options { border-left: 3px solid var(--moon); }
.it-options h2 { margin-bottom: 10px; }
.it-options .field { margin-bottom: 8px; }
.picked { margin: 0; padding: 8px 10px; background: var(--moon-soft); border-radius: var(--radius-s); line-height: 1.6; }
.picked .btn { margin-left: 6px; }
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 6px 18px rgba(20,28,70,.14); max-height: 260px; overflow: auto;
}
.combo-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 9px; border-radius: 4px; cursor: pointer; }
.combo-list button:hover, .combo-list button:focus-visible { background: var(--paper); }
.combo-list small { display: block; color: var(--muted); }
.combo-list .none { padding: 8px 9px; color: var(--muted); font-size: .9rem; }
.team-table select { width: auto; min-width: 190px; }
.team-table .hint { margin-top: 4px; }
.count-n { opacity: .7; font-size: .85em; }

/* ---------- notifications page ---------- */
.kv th { width: 220px; color: var(--muted); font-weight: 500; text-align: left; vertical-align: top; }
.state { display: inline-block; font-size: .74rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 6px; }
.state-ok { background: #e3f4e8; color: #1d6b3a; }
.state-bad { background: #fbe4df; color: #9a2f1d; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .state-ok { background: #1d3a28; color: #8fe0aa; }
  :where(:root:not([data-theme="light"])) .state-bad { background: #3f1f1a; color: #ff9f8c; }
}
:where(:root[data-theme="dark"]) .state-ok { background: #1d3a28; color: #8fe0aa; }
:where(:root[data-theme="dark"]) .state-bad { background: #3f1f1a; color: #ff9f8c; }
.result { padding: 12px 14px; border-radius: var(--radius-s); margin: 4px 0 20px; max-width: 70ch; }
.result-ok { background: #e3f4e8; color: #1d4d2e; }
.result-bad { background: #fbe4df; color: #6e2416; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .result-ok { background: #1d3a28; color: #c7f0d4; }
  :where(:root:not([data-theme="light"])) .result-bad { background: #3f1f1a; color: #ffd2c8; }
}
:where(:root[data-theme="dark"]) .result-ok { background: #1d3a28; color: #c7f0d4; }
:where(:root[data-theme="dark"]) .result-bad { background: #3f1f1a; color: #ffd2c8; }
.result details { margin-top: 6px; font-size: .86rem; }
.result code, .kv code { font-size: .86rem; }
.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
#test-to { width: min(340px, 100%); }

/* ---------- reopen ---------- */
.tag-reopen {
  display: inline-block; vertical-align: 1px; margin-left: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  padding: 1px 8px; border-radius: 999px; background: #fdecc8; color: #7a4b00; border: 1px solid #f0c060; white-space: nowrap;
}
.t-num .tag-reopen, .tright .tag-reopen { margin-left: 0; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .tag-reopen { background: #3d3212; color: #ffd36b; border-color: #6b5a1c; }
}
:where(:root[data-theme="dark"]) .tag-reopen { background: #3d3212; color: #ffd36b; border-color: #6b5a1c; }
.callout-quiet { background: var(--surface); border-color: var(--line); }
.reopen-form { margin-top: 14px; display: grid; gap: 8px; }
.reopen-form label { font-weight: 600; }

/* ---------- theme switch (top right) ---------- */
.theme-toggle {
  position: fixed; top: calc(14px + var(--tm, 0px)); right: 18px; z-index: 30;
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: .84rem; font-weight: 500; cursor: pointer; box-shadow: 0 2px 10px rgba(20, 28, 70, .10);
}
.theme-toggle:hover { border-color: var(--muted); }
.tt-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #d9dcea; transition: background-color .18s; flex: none; }
.tt-knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.tt-knob svg { width: 12px; height: 12px; fill: none; stroke: #b98a00; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle[aria-checked="true"] .tt-track { background: var(--night-2); }
.theme-toggle[aria-checked="true"] .tt-knob { transform: translateX(18px); background: var(--moon); }
.theme-toggle[aria-checked="true"] .tt-knob svg { fill: #1c2e93; stroke: none; }
@media (prefers-reduced-motion: reduce) { .tt-track, .tt-knob { transition: none; } }
@media (max-width: 760px) {
  .theme-toggle { position: static; box-shadow: none; order: 2; margin-left: auto; padding: 4px; border-color: rgba(255,255,255,.25); background: transparent; color: #fff; }
  .rail .new-btn { order: 3; margin-left: 0 !important; padding: 8px 12px; }
  .rail .nav { order: 4; }
  .rail .who { order: 5; }
  .brand img { max-width: 132px !important; }
  .tt-label { display: none; }
}

/* ---------- icons ---------- */
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav a { justify-content: flex-start; gap: 10px; }
.nav a .ico { opacity: .85; }
.with-ico { display: inline-flex; align-items: center; gap: 6px; }
.chip span { display: inline-flex; align-items: center; gap: 7px; }
.chip .ico { opacity: .8; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 16px 14px;
  text-decoration: none; color: var(--ink); overflow: hidden;
}
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--night-2); }
.tile.good::before { background: #2e8b57; }
.tile.warn::before { background: var(--high); }
.tile.bad::before { background: var(--urgent); }
.tile b { grid-column: 1; font-family: var(--font-display); font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.05; white-space: nowrap; }
.tile span { grid-column: 1; color: var(--muted); font-size: .86rem; }
.tile.bad b { color: var(--urgent); }
.tile.warn b { color: var(--high); }
.tile .tile-icon, .tile .tile-ring, .tile > .moon { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.tile .tile-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--night-2); }
.tile .tile-icon .ico { width: 20px; height: 20px; }
.tile .tile-ring svg { width: 58px; height: 58px; display: block; }
.tile > .moon { width: 34px; height: 34px; }
a.tile:hover { border-color: var(--muted); }
:where(:root[data-theme="dark"]) .tile .tile-icon { color: var(--moon); }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .tile .tile-icon { color: var(--moon); } }
.home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- dashboard grid ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head p { margin: 6px 0 0; max-width: 70ch; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dash-filters-bar { margin: -6px 0 20px; }
.dash-actions .btn .ico, .btn svg { width: 16px; height: 16px; }
.btn svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.dash-grid .panel { margin: 0; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.panel-head h2 { margin: 0 !important; }
.panel-head .hint { margin: 4px 0 0; }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-box .tlist { border-radius: var(--radius-s); }
.icon-btn {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[disabled] { opacity: .5; cursor: progress; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.table.compact { margin-top: 10px; }
.good-note { color: #2e8b57; }

/* compact list for narrow panels */
.mini-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 12px 10px 16px; text-decoration: none; }
.mini-top .sla { flex: none; }
.mini-list a:hover { background: var(--paper); }
.mini-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mini-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini-list li.pe { box-shadow: inset 4px 0 0 var(--pe, transparent); }
.mini-list .tmeta .prio { padding: 0 6px; font-size: .74rem; }

/* add member + invitations */
.member-form { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px 6px; margin-bottom: 18px; background: var(--paper); }
.member-form h3, #invites h3 { font-size: .98rem; margin: 0 0 10px; }
.member-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.member-row .field { margin-bottom: 8px; }
.member-row .grow { flex: 1 1 260px; }
.member-row select { width: auto; min-width: 190px; }
.member-row .btn { margin-bottom: 8px; }
.member-form .hint { margin: 0 0 8px; }
#invites:not(:empty) { margin-bottom: 18px; }
.invite-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-s); }
.invite-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; }
.invite-list li + li { border-top: 1px solid var(--line); }
.invite-list li > span { display: grid; gap: 2px; min-width: 0; }
.invite-list b { font-weight: 600; overflow-wrap: anywhere; }
.invite-list .quiet { font-size: .86rem; }

/* permissions save bar */
.save-bar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: 0 0 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: .92rem;
}
.save-bar.dirty { background: var(--moon-soft); border-color: var(--moon); color: var(--ink); box-shadow: 0 4px 14px rgba(20, 28, 70, .12); }
.save-actions { display: inline-flex; gap: 8px; }
.perm-cell.changed { background: color-mix(in srgb, var(--moon) 28%, transparent); box-shadow: inset 0 0 0 2px var(--moon); }

/* organization zoom */
.org-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.org-toolbar .ico { width: 17px; height: 17px; }
.zoom-level { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .9rem; }
.zoom-tip { margin: 0 0 0 auto; font-size: .8rem; }
.org-toolbar .btn-small { display: inline-flex; align-items: center; gap: 5px; }
.org-toolbar .icon-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* roles & permissions grid */
.perm-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius-m); }
.perm-table { border-collapse: separate; border-spacing: 0; min-width: 760px; }
.perm-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); vertical-align: bottom; border-bottom: 2px solid var(--line); }
.perm-table .perm-col { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 260px; max-width: 340px; white-space: normal; }
.perm-table thead .perm-col { z-index: 3; }
.perm-table tbody th.perm-col { font-weight: 400; }
.perm-table tbody th.perm-col b { display: block; font-weight: 600; color: var(--ink); }
.perm-table tbody th.perm-col .hint { display: block; font-size: .8rem; margin-top: 2px; }
.role-col { text-align: center !important; min-width: 128px; white-space: normal !important; }
.role-col.is-custom { background: color-mix(in srgb, var(--moon) 10%, var(--surface)) !important; }
.rc-name { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; }
.rc-meta { display: block; font-weight: 400; font-size: .76rem; color: var(--muted); margin: 2px 0 4px; }
.rc-actions { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.perm-group th { background: var(--paper) !important; text-align: left; font-size: .8rem; letter-spacing: .02em; color: var(--muted); padding: 6px 10px; }
.perm-cell { text-align: center; }
.perm-tick { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; padding: 4px; }
.perm-tick input { width: 18px; height: 18px; accent-color: var(--night-2); cursor: pointer; }
.perm-tick.locked { cursor: not-allowed; }
.perm-tick .lock, .hint .lock { width: 13px; height: 13px; color: var(--muted); vertical-align: -2px; }
.custom-role { font-style: normal; }

/* organization chart */
.org-scroll { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); padding: 6px; margin: 6px 0 10px; }
.org-scroll svg { display: block; margin: 0 auto; max-width: none; }
.org-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lead-bar .actions { margin-top: 10px; }
.panel-head .dash-actions { flex-wrap: nowrap; flex: none; }
@media (max-width: 760px) { .panel-head { flex-wrap: wrap; } .panel-head .dash-actions { flex-wrap: wrap; } }

/* role tick boxes */
.role-ticks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.member-row .role-ticks { margin-bottom: 8px; padding-bottom: 9px; }
.role-ticks legend { font-weight: 600; margin-bottom: 6px; width: 100%; }
.role-ticks .check { white-space: nowrap; }
.role-ticks input:disabled + * , .role-ticks .check:has(input:disabled) { opacity: .75; }
.row-ticks { flex-direction: column; align-items: flex-start; gap: 2px; }

/* team leads */
.lead-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--moon-soft); color: var(--ink); border: 1px solid var(--moon); vertical-align: 1px; }
.lead-bar { border-left: 4px solid var(--moon); }
.member-cards { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.member-card {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 10px 12px; color: var(--ink);
}
.member-card:hover { border-color: var(--muted); }
.member-card.on { border-color: var(--moon); box-shadow: inset 4px 0 0 var(--moon); }
.mc-name { display: grid; gap: 2px; min-width: 0; }
.mc-name b, .mc-name .quiet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-name .quiet { font-size: .84rem; }
.mc-stats { display: flex; gap: 6px; flex: none; }
.mc-stat { display: grid; justify-items: center; min-width: 52px; padding: 4px 6px; border-radius: 8px; background: var(--paper); }
.mc-stat b { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.mc-stat small { font-size: .7rem; color: var(--muted); }
.mc-stat.warn b { color: var(--high); }
.mc-stat.good b { color: #2e8b57; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; margin-top: 6px; }
.team-card { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; background: var(--surface); display: grid; gap: 10px; align-content: start; }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tc-lead { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.tc-lead > .ico { width: 22px; height: 22px; color: var(--night-2); margin-top: 2px; }
.tc-lead > span, .tc-person { display: grid; gap: 1px; min-width: 0; }
.tc-lead .quiet, .tc-person .quiet { font-size: .84rem; overflow-wrap: anywhere; }
.tc-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tc-head .btn, .tc-members .btn { white-space: nowrap; flex: none; }
.tc-members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-add { display: flex; gap: 8px; }
.tc-add input { flex: 1; min-width: 0; padding: 7px 10px; }

/* refresh */
.updated { white-space: nowrap; opacity: .85; }
#refresh-btn svg { transition: transform .5s; }
#refresh-btn.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #refresh-btn.spinning svg { animation: none; } }

/* engineer filter */
.eng-filter { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); }
.eng-filter select { border: 0; background: transparent; padding: 8px 6px; width: auto; min-width: 150px; max-width: 220px; color: var(--ink); }
.eng-filter:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.eng-filter select:focus-visible { outline: none; }

/* ---------- export dialog ---------- */
.export-dlg {
  width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(10, 14, 40, .35);
}
.export-dlg::backdrop { background: rgba(14, 18, 45, .55); }
.export-dlg > .loading { padding: 30px; }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 8px; }
.dlg-head h2 { margin: 0; }
.dlg-head .hint { margin: 4px 0 0; }
.slide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 12px 22px; overflow: auto; max-height: calc(100vh - 230px); }
.slide-card { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.slide-thumb { aspect-ratio: 16 / 9; background: #fff; }
.slide-thumb svg { width: 100%; height: 100%; display: block; }
.slide-card figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 600; font-size: .9rem; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- ticket progress tracker ---------- */
.stepper { list-style: none; margin: 16px 0 0; padding: 0; display: flex; max-width: 620px; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: .82rem; color: var(--muted); text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--moon); }
.stepper .moon { width: 18px; height: 18px; position: relative; z-index: 1; background: var(--paper); border-radius: 50%; }
.stepper li.current { color: var(--ink); font-weight: 700; }
.stepper li.current .moon { box-shadow: 0 0 0 4px color-mix(in srgb, var(--moon) 30%, transparent); }

/* ---------- priority edges in IT lists ---------- */
.tlist li.pe { box-shadow: inset 4px 0 0 var(--pe, transparent); }
.tlist li.pe-urgent { --pe: var(--urgent); }
.tlist li.pe-high { --pe: var(--high); }
.tlist li.pe-normal { --pe: var(--normal); }
.tlist li.pe-low { --pe: var(--low); }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid > .panel { grid-column: 1 / -1; }
  .home-tiles { grid-template-columns: 1fr; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--night); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--urgent); }

/* ---------- login ---------- */
.login-body { background: var(--night); min-height: 100vh; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-brand {
  background: #1c2e93; color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(32px, 7vw, 96px);
}
.tagline {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.08; letter-spacing: .01em;
  max-width: 16ch; margin: 0;
}
.login-arc { width: min(420px, 90%); height: 46px; margin-top: 28px; }
.login-card { background: #fff; color: #1d2433; padding: clamp(32px, 7vw, 96px); display: flex; flex-direction: column; justify-content: center; }
.login-logo { width: min(380px, 100%); height: auto; margin-bottom: 40px; }
.login-card h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: #1c2e93; }
.login-lead { font-size: 1.08rem; color: #5b6380; max-width: 40ch; margin: 12px 0 28px; }
.ms-btn {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  background: #1c2e93; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.02rem;
  padding: 12px 20px; border-radius: var(--radius-s); border-bottom: 3px solid #fdb902;
}
.ms-btn:hover { background: #36438f; }
.ms-btn svg { width: 20px; height: 20px; }
.login-help { color: #5b6380; font-size: .9rem; max-width: 44ch; margin-top: 24px; }
.login-error { background: #fbe9e5; color: #7a2617; padding: 10px 14px; border-radius: var(--radius-s); max-width: 48ch; margin: 0 0 18px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .t-grid, .two-col { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; order: 3; }
  .nav-sep, .nav-head { display: none; }
  .rail .new-btn { margin-left: auto; }
  .brand img { max-width: 150px; }
  .brand small { display: none; }
  .who { margin: 0; padding: 0; border: 0; order: 4; flex: 1 1 100%; display: flex; gap: 12px; align-items: baseline; }
  .who span { display: none; }
  .who a { margin: 0; }
  .view { padding-top: 24px; }
  .trow { grid-template-columns: 22px 1fr; }
  .tright { grid-column: 2; }
  .filters { justify-content: stretch; }
  .filters input { max-width: none; }
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 28px 24px; }
  .tagline { font-size: 1.6rem; }
  .login-arc { height: 28px; margin-top: 14px; }
  .login-logo { margin-bottom: 28px; }
  .bars li { grid-template-columns: 110px 1fr 28px; }
  .impact-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- guest access (sign-in page + public request page) ---------- */
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.guest-btn { margin-top: 0; }
.login-card .ms-btn { min-width: 274px; justify-content: center; }
.guest-btn svg { fill: initial; stroke: none; }
.guest-body { background: var(--paper); min-height: 100vh; }
.guest-top {
  display: flex; align-items: center; gap: 14px; padding: 12px clamp(14px, 4vw, 40px); background: var(--night); color: #fff;
  border-bottom: 3px solid var(--moon); flex-wrap: wrap;
}
.guest-logo img { height: 40px; width: auto; display: block; background: #fff; border-radius: 8px; padding: 4px 8px; }
.guest-top-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.guest-top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.guest-top .theme-toggle { position: static; }
.guest-main { max-width: 880px; margin: 0 auto; padding: 28px clamp(14px, 4vw, 32px) 60px; }
.guest-main h1 { margin: 6px 0 6px; }
.guest-main .lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 18px; max-width: 70ch; }
.guest-form h2 { font-size: 1.1rem; margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.guest-form h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }
.guest-form fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.guest-form legend { font-weight: 600; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-bottom: 10px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.center { text-align: center; justify-content: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .92rem; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 8px 0 20px; }
.choice-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1.5px solid var(--line); border-radius: var(--radius-m);
  background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .12s, transform .12s, box-shadow .12s;
}
.choice-card:hover, .choice-card:focus-visible { border-color: var(--moon); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 28, 70, .12); }
.choice-card b { font-size: 1.15rem; }
.choice-card span:last-child { color: var(--muted); }
.cc-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--moon-soft); color: var(--night-2); }
.cc-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.country-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.country-card { --pc: var(--moon); }
.flag { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); flex: none; object-fit: cover; vertical-align: -2px; }
.guest-form > .actions { margin-top: 18px; }
.ack-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.ack-steps { margin: 0 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.ack-steps .btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.ack-steps .btn svg, .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sent-panel { text-align: center; max-width: 620px; margin: 30px auto; padding: 32px; }
.sent-tick { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; background: var(--moon); display: grid; place-items: center; }
.sent-tick svg { width: 34px; height: 34px; fill: none; stroke: #12205f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sent-panel .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.track-steps { display: flex; list-style: none; padding: 0; margin: 10px 0 16px; gap: 0; counter-reset: s; }
.track-steps li { flex: 1; text-align: center; font-size: .85rem; color: var(--muted); position: relative; padding-top: 26px; }
.track-steps li::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); z-index: 1; }
.track-steps li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.track-steps li:first-child::after { display: none; }
.track-steps li.done::before { background: var(--moon); border-color: var(--moon); }
.track-steps li.done::after, .track-steps li.now::after { background: var(--moon); }
.track-steps li.now { color: var(--ink); font-weight: 700; }
.track-steps li.now::before { border-color: var(--moon); box-shadow: 0 0 0 4px var(--moon-soft); }
.meta-line { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.crumbs { color: var(--muted); margin: 0; font-weight: 600; }
.guest-main .composer { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.guest-main .composer label { font-weight: 600; }
.composer-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) {
  .grid-2, .check-grid, .choice-cards, .country-cards { grid-template-columns: 1fr; }
  .guest-top-actions .btn { display: none; }
}

/* guest details on tickets (IT view) */
.req-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; letter-spacing: .02em; }
.req-tag.guest { background: var(--moon-soft); color: var(--ink); border: 1px solid var(--moon); }
.req-tag.starter { background: color-mix(in srgb, var(--low) 18%, transparent); color: var(--ink); border: 1px solid var(--low); }
.onboard { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin: 0 0 14px; }
.onboard h3 { margin: 0; padding: 9px 14px; font-size: .95rem; background: var(--paper); border-top: 1px solid var(--line); }
.onboard h3:first-child { border-top: 0; background: var(--night); color: #fff; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.onboard dl { margin: 0; display: grid; grid-template-columns: minmax(150px, 34%) 1fr; }
.onboard dt, .onboard dd { margin: 0; padding: 7px 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.onboard dt { color: var(--muted); }
.onboard dd { overflow-wrap: anywhere; }

/* attachment chips + in-ticket viewer */
.file { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); overflow: hidden; max-width: 100%; }
.file-open { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .88rem; min-width: 0; }
.file-open:hover, .file-open:focus-visible { background: color-mix(in srgb, var(--moon) 16%, transparent); }
.file-open .ico { width: 15px; height: 15px; flex: none; color: var(--muted); }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.file-size { color: var(--muted); font-size: .8rem; flex: none; }
.file-dl { display: inline-flex; align-items: center; padding: 0 9px; border-left: 1px solid var(--line); color: var(--muted); }
.file-dl:hover, .file-dl:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--moon) 16%, transparent); }
.file-dl .ico { width: 15px; height: 15px; }
body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 13, 35, .82); display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px)); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface); color: var(--ink); border-radius: var(--radius-m) var(--radius-m) 0 0; }
.viewer-title { display: flex; flex-direction: column; min-width: 0; }
.viewer-title .file-name { font-weight: 600; max-width: 60vw; }
.viewer-meta { color: var(--muted); font-size: .82rem; }
.viewer-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.viewer-actions .btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.viewer-actions .ico { width: 16px; height: 16px; }
.viewer-body { flex: 1; min-height: 0; background: var(--paper); border-radius: 0 0 var(--radius-m) var(--radius-m); overflow: auto; display: flex; }
.viewer-body.image { align-items: center; justify-content: center; background: repeating-conic-gradient(var(--paper) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.viewer-body img.zoomed { max-width: none; max-height: none; cursor: zoom-out; margin: auto; }
.viewer-body.pdf iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.viewer-text { margin: 0; padding: 16px; width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: .86rem/1.5 ui-monospace, Consolas, monospace; color: var(--ink); }
.viewer-none { margin: auto; text-align: center; padding: 30px; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.viewer-none > .ico { width: 54px; height: 54px; color: var(--muted); }
.viewer-none .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.guest-main .thread p.event { margin: 0; }

/* satisfaction ratings */
.rate-card { border: 1px solid var(--moon); background: var(--moon-soft); border-radius: var(--radius-m); padding: 14px 16px; margin: 0 0 14px; }
.rate-card.done { background: var(--surface); border-color: var(--line); }
.rate-intro { margin: 0 0 6px; color: var(--muted); }
.rate-done { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rate-form { display: flex; flex-direction: column; gap: 6px; }
.rate-stars { border: 0; padding: 0; margin: 0 0 4px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rate-stars legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; width: 100%; color: var(--ink); }
.rate-label { margin-left: 10px; font-weight: 600; color: var(--ink); min-width: 9ch; }
.rate-comment-label { font-weight: 600; }
.rate-form textarea { min-height: 64px; }
.stars-static { display: inline-flex; gap: 1px; vertical-align: -3px; }
.rate-quote { margin: 6px 0 4px; padding: 6px 10px; border-left: 3px solid var(--moon); background: var(--paper); border-radius: 0 6px 6px 0; font-size: .92rem; white-space: pre-wrap; }
.rate-chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 0 6px; border-radius: 999px; margin-left: 4px; background: var(--moon-soft); color: var(--ink); border: 1px solid var(--moon); white-space: nowrap; }
.rate-chip.r1, .rate-chip.r2 { background: color-mix(in srgb, var(--urgent, #c0392b) 16%, transparent); border-color: var(--urgent, #c0392b); }
.feedback-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feedback-list a { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.feedback-list a:hover { border-color: var(--moon); background: var(--paper); }
.fb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-top .quiet { margin-left: auto; font-size: .8rem; }
.fb-comment { font-size: .92rem; }
.fb-who { font-size: .8rem; }

.csat-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 12px; }
.csat-big { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.csat-side { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.csat-side .stars-static .star { width: 20px; height: 20px; }

/* reports */
.report-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.report-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; }
.report-tabs button:hover { border-color: var(--sel-bg); }
.report-tabs button.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.rep-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; align-items: end; padding-bottom: 4px; }
.rep-filters .field { margin-bottom: 12px; }
.rep-filters label { font-size: .82rem; }
.rf-reset { align-self: end; }
.export-bar .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.export-bar .ico { width: 16px; height: 16px; }
.rep-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.rep-stat { background: var(--paper); border-left: 3px solid var(--moon); border-radius: var(--radius-s); padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rep-stat b { font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-stat span { color: var(--muted); font-size: .8rem; }
.rep-table-wrap { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.rep-table { font-size: .86rem; min-width: 100%; }
.rep-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); white-space: nowrap; padding: 0; border-bottom: 2px solid var(--line); }
.rep-table thead th button { all: unset; display: block; padding: 8px 10px; cursor: pointer; font-weight: 700; color: var(--ink); }
.rep-table thead th button:hover { color: var(--night-2); text-decoration: underline; }
.rep-table thead th button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.rep-table td { white-space: nowrap; padding: 6px 10px; vertical-align: top; }
.rep-table td.wrap { white-space: normal; min-width: 240px; max-width: 420px; }
.rep-table .num { text-align: right; }
.rep-table thead th.num button { text-align: right; }
.rep-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--paper) 60%, transparent); }
.rep-table tr.total td { font-weight: 700; border-top: 2px solid var(--line); background: var(--paper); }
.rep-more, .rep-count { margin: 10px 0 0; font-size: .88rem; }
.rep-more { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.rep-empty { padding: 20px 0; }
@media (max-width: 760px) { .export-bar { flex-wrap: wrap; } }
.rep-filters select, .rep-filters input { height: 40px; box-sizing: border-box; }

/* stars with halves: an outline star plus a filled copy clipped to the right width */
.sw { position: relative; display: inline-block; line-height: 0; }
.sw > .star { fill: transparent; stroke: var(--muted); stroke-width: 1.6; }
.sw .sf { position: absolute; left: 0; top: 0; height: 100%; overflow: hidden; pointer-events: none; width: 0; }
.sw .sf.f50 { width: 50%; }
.sw .sf.f100 { width: 100%; }
.sw .sf .star { fill: #fdb902; stroke: #d9a800; stroke-width: 1.6; }
.stars-static .sw > .star, .stars-static .sw .sf .star { width: 15px; height: 15px; }
.rate-row { display: inline-flex; gap: 3px; }
.rate-row .sw > .star, .rate-row .sw .sf .star { width: 36px; height: 36px; }
.rate-row .sw { transition: transform .1s; }
.rate-row .half { position: absolute; top: 0; height: 100%; width: 50%; cursor: pointer; z-index: 1; }
.rate-row .half.l { left: 0; border-radius: 6px 0 0 6px; }
.rate-row .half.r { right: 0; border-radius: 0 6px 6px 0; }
.rate-row .half input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-row .half:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.rate-row .sw:hover { transform: scale(1.08); }
.rate-hint { margin: 2px 0 6px; font-size: .8rem; }

/* staged changes */
.unsaved-note { color: var(--ink); font-weight: 600; font-size: .88rem; background: var(--moon-soft); border: 1px solid var(--moon); border-radius: 999px; padding: 2px 10px; align-self: center; }
.unsaved-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--moon-soft); color: var(--ink); border: 1px solid var(--moon); margin-left: 6px; vertical-align: 1px; }
.unsaved-tag.warn { background: color-mix(in srgb, var(--urgent) 14%, transparent); border-color: var(--urgent); }
tr.row-changed td { background: color-mix(in srgb, var(--moon) 14%, transparent) !important; }
tr.row-changed td:first-child { box-shadow: inset 3px 0 0 var(--moon); }
.removing > .tc-person b, .removing .tc-head .tc-lead b, li.removing b, .invite-list li.removing b { text-decoration: line-through; opacity: .7; }
.team-card.removing { opacity: .75; border-style: dashed; }
.team-card.pending { border-style: dashed; border-color: var(--moon); }
.tc-members li.pending { outline: 1px dashed var(--moon); outline-offset: -1px; border-radius: 8px; }
.invite-list li.removing { opacity: .75; }
form.form-dirty { box-shadow: inset 3px 0 0 var(--moon); }
.feedback-list a.no-link { cursor: default; }
.feedback-list a.no-link:hover { border-color: var(--line); background: transparent; }

/* team hierarchy */
.team-switch { margin: 0 0 14px; flex-wrap: wrap; }
.team-group { font-size: .9rem; margin: 14px 0 6px; color: var(--ink); }
.team-group:first-of-type { margin-top: 2px; }
.lead-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--moon-soft); color: var(--ink); border: 1px solid var(--moon); margin-left: 4px; vertical-align: 1px; }
.reports-to { font-size: .8rem; }
.mc-name .lead-tag { justify-self: start; margin: 3px 0 0; }
.tc-person .lead-tag { align-self: flex-start; justify-self: start; width: auto; margin: 3px 0 0; }

/* teams: roles and reporting lines */
.tc-settings { display: flex; gap: 12px; flex-wrap: wrap; margin: 2px 0 10px; }
.tc-settings label { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; font-weight: 600; color: var(--muted); flex: 1 1 140px; }
.tc-settings select { font-size: .88rem; padding: 6px 8px; }
.title-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; color: var(--ink); }
.title-tag.manager { background: var(--moon-soft); border: 1px solid var(--moon); }
.title-tag.lead { background: color-mix(in srgb, var(--normal, #3f6aa6) 16%, transparent); border: 1px solid var(--normal, #3f6aa6); }
.team-card.title-manager { border-top: 3px solid var(--moon); }
.team-card.title-lead { border-top: 3px solid var(--normal, #3f6aa6); }
.team-card.changed { box-shadow: 0 0 0 2px var(--moon); }
.team-card[data-depth="1"] { margin-left: 0; }
.tc-subs { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.tc-subs .ico { width: 14px; height: 14px; }

.title-tag.president { background: color-mix(in srgb, var(--good, #2e8b57) 18%, transparent); border: 1px solid var(--good, #2e8b57); }
.team-card.title-president { border-top: 3px solid var(--good, #2e8b57); }

/* On Hold */
.moon.on_hold .lit { fill: var(--warn, #c98a00); }
.moon.on_hold .ring { stroke: var(--warn, #c98a00); }
.hold-bar { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--warn, #c98a00); background: color-mix(in srgb, var(--warn, #c98a00) 12%, transparent); border-radius: var(--radius-m); padding: 11px 14px; margin: 0 0 14px; }
.hold-bar p { margin: 0; }
.hold-ico .moon { width: 22px; height: 22px; flex: none; }
.hold-fields { border-left: 3px solid var(--warn, #c98a00); padding: 4px 0 2px 12px; margin: 0 0 12px; }
.repair-fields { background: var(--paper); border-radius: var(--radius-s); padding: 8px 10px; margin: 0 0 10px; }
.repair-fields .check { font-weight: 600; margin-bottom: 6px; }
.linked-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px; margin: 0 0 14px; background: var(--surface); }
.linked-box h3 { margin: 0 0 6px; font-size: .92rem; }
.linked-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.linked-box li { font-size: .92rem; line-height: 1.6; }
.linked-box li .status { margin-left: 4px; display: inline-flex; vertical-align: -2px; }
.loaner-check { margin-top: 8px; }

/* manual parent / child links */
.linked-box.editable { display: flex; flex-direction: column; gap: 10px; }
.link-group { display: flex; flex-direction: column; gap: 5px; }
.link-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: none; }
.link-item { font-size: .92rem; line-height: 1.6; display: flex; align-items: center; gap: 8px; }
.link-text { flex: 1; min-width: 0; }
.link-item .btn { margin-left: auto; }
.link-item .status { margin-left: 4px; display: inline-flex; vertical-align: -2px; }
.link-picker { display: flex; gap: 6px; }
.link-picker input { flex: 1; min-width: 0; padding: 6px 10px; font-size: .9rem; }
.linked-box.editable .quiet { margin: 0; font-size: .88rem; }

/* time tracking */
.time-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin: 0 0 14px; background: var(--surface); }
.time-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.time-head h3, .time-box > h3 { margin: 0; font-size: .95rem; }
.time-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.time-stats > div { background: var(--paper); border-left: 3px solid var(--night-2); border-radius: var(--radius-s); padding: 7px 10px; display: flex; flex-direction: column; }
.time-stats > div.warn { border-left-color: var(--moon); }
.time-stats b { font-size: 1.05rem; }
.time-stats span { color: var(--muted); font-size: .76rem; }
.time-hint { margin: 0 0 8px; font-size: .8rem; }
.time-form { background: var(--paper); border-radius: var(--radius-s); padding: 10px 12px; margin: 0 0 10px; }
.time-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.tl-dur span { display: flex; align-items: center; gap: 5px; }
.tl-dur input { width: 64px; }
.time-form .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time-form .actions .hint { margin: 0; }
.time-table td { vertical-align: top; }
.tl-note { white-space: normal; min-width: 140px; }
.tl-actions { white-space: nowrap; }
.tl-actions .btn { margin-left: 4px; }
.tl-chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.tl-chip.pending { background: var(--moon-soft); border-color: var(--moon); color: var(--ink); }
.tl-chip.approved { background: color-mix(in srgb, var(--good, #2e8b57) 15%, transparent); border-color: var(--good, #2e8b57); color: var(--ink); }
.tl-chip.rejected { background: color-mix(in srgb, var(--urgent) 14%, transparent); border-color: var(--urgent); color: var(--ink); }
tr.tl-rejected td { opacity: .7; }

.approvals .decide { display: flex; gap: 4px; }
.approvals .btn.on-approve { background: var(--good, #2e8b57); border-color: var(--good, #2e8b57); color: #fff; }
.approvals .btn.on-reject { background: var(--urgent); border-color: var(--urgent); color: #fff; }
.approvals tr.staged-approve td { background: color-mix(in srgb, var(--good, #2e8b57) 9%, transparent); }
.approvals tr.staged-reject td { background: color-mix(in srgb, var(--urgent) 9%, transparent); }
.reject-reason { margin-top: 5px; width: 100%; min-width: 170px; padding: 5px 8px; font-size: .86rem; }

/* dashboard work hours */
.wh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-bottom: 14px; }
.wh-stats > div { background: var(--paper); border-left: 3px solid var(--night-2); border-radius: var(--radius-s); padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.wh-stats > div.warn { border-left-color: var(--moon); }
.wh-stats b { font-size: 1.25rem; }
.wh-stats span { color: var(--muted); font-size: .8rem; }
.wh-lookup label { font-weight: 700; display: block; margin-bottom: 5px; }
.wh-lookup .link-picker { max-width: 640px; }
.wh-card { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; max-width: 820px; }
.wh-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.wh-card-head .quiet { margin-left: auto; font-size: .85rem; }
.wh-bar { display: grid; grid-template-columns: 210px 1fr 90px; align-items: center; gap: 10px; margin: 6px 0; font-size: .9rem; }
.wh-bar b { text-align: right; }
.wh-track { height: 12px; border-radius: 6px; background: var(--paper); overflow: hidden; }
.wh-fill { display: block; height: 100%; border-radius: 6px; transition: width .4s ease; }
.wh-fill.logged { background: var(--good, #2e8b57); }
.wh-fill.pending { background: var(--moon); }
.wh-fill.active { background: var(--night-2); }
.wh-fill.ticket { background: var(--normal, #3f6aa6); opacity: .65; }
.wh-fill.paused { background: #8e5bb8; opacity: .7; }
@media (max-width: 640px) { .wh-bar { grid-template-columns: 1fr 70px; } .wh-bar .wh-track { grid-column: 1 / -1; grid-row: 2; } }
.wh-fill { width: 0; }

.time-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.time-list li { padding: 8px 0; border-top: 1px solid var(--line); }
.tl-main { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; font-size: .92rem; }
.tl-main .tl-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.time-list .tl-note { color: var(--ink); font-size: .9rem; margin-top: 3px; }
.time-list li.tl-rejected { opacity: .75; }
.wh-card-head .status .moon { width: 16px; height: 16px; }

/* copyright */
.content-col { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.content-col > .view { flex: 1; }
.app-footer { padding: 14px clamp(16px, 3vw, 40px) 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.5; }
.app-footer p { margin: 0; max-width: 1100px; }
.app-footer b, .copyright b { color: var(--ink); font-weight: 600; }
.guest-footer { text-align: center; }
.guest-footer p { margin: 0 auto; }
.copyright { margin: 26px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; line-height: 1.5; }
@media print { .app-footer { border: 0; } }

.team-tabs { margin: 0 0 14px; }
.rel-tag { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.rel-tag.direct { color: var(--ink); font-weight: 600; }
.approvals td a { white-space: nowrap; }

/* email signature */
.profile-link { display: block; margin: 6px 0 2px; color: var(--moon) !important; font-size: .85rem; }
.sig-preview { width: 100%; height: 330px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; }
.ext-row { display: flex; align-items: center; gap: 8px; }
.ext-row input { max-width: 120px; }
.brand-row { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 8px; margin-bottom: 6px; }
@media (max-width: 640px) { .brand-row { grid-template-columns: 1fr; } }

/* ---------- AI assistant ---------- */
.ai-help { border: 1px dashed var(--night-2); border-radius: var(--radius-m); padding: 10px 12px; margin: -4px 0 16px; background: color-mix(in srgb, var(--night-2) 4%, transparent); }
.ai-help-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-help-head .hint { margin: 0; }
.ai-btn { display: inline-flex; align-items: center; gap: 6px; }
.ai-btn .ico, .ai-chat-btn .ico { width: 18px; height: 18px; color: var(--moon); }
.ai-card { margin-top: 10px; }
.ai-card h4 { margin: 10px 0 4px; font-size: .9rem; }
.ai-card ol, .ai-card ul { margin: 0 0 4px 18px; padding: 0; }
.ai-card li { margin: 3px 0; }
.ai-suggest-row { display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: center; }
.ai-suggest-row .btn, .ai-subject .btn { margin-left: 4px; }
.ai-subject { margin: 8px 0 0; }
.ai-security { border: 1px solid var(--urgent); background: color-mix(in srgb, var(--urgent) 10%, transparent); border-radius: var(--radius-s); padding: 8px 10px; margin-bottom: 8px; }
.ai-disclaimer { font-size: .76rem; color: var(--muted); margin: 10px 0 0; }
.ai-error { color: var(--urgent); margin: 8px 0 0; }
.ai-note { background: var(--moon-soft); border-left: 3px solid var(--moon); padding: 8px 12px; border-radius: var(--radius-s); }
.ai-thinking { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin: 6px 0 0; }
.ai-thinking span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: aidot 1s infinite ease-in-out; }
.ai-thinking span:nth-child(2) { animation-delay: .15s; } .ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ai-thinking span { animation: none; opacity: .6; } }
/* chat bubble + panel, bottom-right */
.ai-chat-btn { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  background: var(--night); color: #fff; border: 0; border-bottom: 3px solid var(--moon); border-radius: 999px; padding: 12px 18px 11px; font: inherit; font-weight: 600;
  box-shadow: 0 8px 24px rgba(20, 26, 60, .28); cursor: pointer; }
.ai-chat-btn:hover { filter: brightness(1.08); }
.ai-chat-btn.on span { display: none; }
.ai-chat { position: fixed; right: 22px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(20, 26, 60, .3); overflow: hidden; }
.ai-chat[hidden] { display: none; }
.ai-chat > header { display: flex; align-items: center; justify-content: space-between; background: var(--night); color: #fff; padding: 12px 14px; border-bottom: 3px solid var(--moon); }
.ai-chat > header b { display: block; }
.ai-chat > header small { opacity: .8; font-size: .78rem; }
.ai-chat-x { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.ai-chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.ai-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.45; }
.ai-msg p { margin: 0; } .ai-msg p + p { margin-top: 6px; }
.ai-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-msg.me { align-self: flex-end; background: var(--night); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.err { border-color: var(--urgent); color: var(--urgent); }
.ai-chat-actions { display: flex; gap: 6px; padding: 8px 12px 0; }
.ai-chat-form { display: flex; gap: 8px; padding: 8px 12px; align-items: flex-end; }
.ai-chat-form textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 10px; font: inherit; font-size: .92rem; }
.ai-chat-foot { margin: 0; padding: 0 12px 10px; font-size: .72rem; color: var(--muted); }
@media print { .ai-chat-btn, .ai-chat { display: none !important; } }

/* how a request was received */
.channel-field #channel-note { margin-top: 8px; width: 100%; }
.channel-field select:disabled { opacity: .6; cursor: not-allowed; }
.channel-tag { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }

.ai-conn-state { margin: 4px 0 14px; }
.mt-6 { margin-top: 6px; }
#ai-conn .actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* AI connection status */
.ai-status { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--radius-m); padding: 12px 14px; margin: 4px 0 16px; background: var(--paper); }
.ai-status.tone-ok { border-left-color: var(--good, #2e8b57); }
.ai-status.tone-bad { border-left-color: var(--urgent); background: color-mix(in srgb, var(--urgent) 6%, var(--paper)); }
.ai-status-head { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.ai-status-head .btn { margin-left: auto; }
.ai-status-lead { margin: 6px 0 10px; }
.ai-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; margin: 0; }
.ai-status-grid dt { font-size: .76rem; font-weight: 700; color: var(--muted); }
.ai-status-grid dd { margin: 2px 0 0; font-size: .9rem; }
.ai-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.tone-ok .ai-dot { background: var(--good, #2e8b57); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good, #2e8b57) 22%, transparent); }
.tone-bad .ai-dot { background: var(--urgent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--urgent) 22%, transparent); }
.tone-idle .ai-dot { background: var(--muted); }
.subnav a .ai-dot { width: 8px; height: 8px; margin-left: 4px; vertical-align: 1px; box-shadow: none; }

/* who a new request is for */
.for-who { margin: 0 0 6px; }
.for-who a { margin-left: 6px; font-size: .9rem; }
.for-who-chip { display: inline-block; margin-left: 8px; font-size: .78rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--moon-soft); border: 1px solid var(--moon); color: var(--ink); vertical-align: 1px; }

/* My Tickets */
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--moon); color: var(--night); font-size: .74rem; font-weight: 700; text-align: center; line-height: 18px; }
.nav-count.warn { background: var(--urgent); color: #fff; }
.my-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.my-head input[type=search] { max-width: 280px; }
.empty-note { padding: 14px 4px; }
.my-charts { margin-bottom: 18px; }

.tt-options { display: grid; gap: 10px; margin: 6px 0 12px; }
.tt-opt small { display: block; margin-top: 3px; }

/* progress line: a step the request moved past without using (On Hold) */
.stepper li.skipped::before { background: var(--moon); }
.stepper li.skipped .moon { opacity: .45; }
.stepper li.skipped > span { text-decoration: line-through; opacity: .7; }
.track-steps li.skipped { text-decoration: line-through; opacity: .55; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.track-steps li.skipped::after { background: var(--moon); }
.track-steps li.skipped::before { border-style: dashed; }

/* positions (separate from access) */
.pos-select { font-size: .82rem; padding: 3px 6px; margin-left: auto; max-width: 170px; }
.tc-members li.pos-changed { box-shadow: inset 3px 0 0 var(--moon); }
.role-pill.pos-pill { background: var(--moon); color: var(--night); border-color: var(--moon); }

/* Super Admin */
.super-banner { border: 1px solid var(--moon); background: var(--moon-soft); border-radius: var(--radius-m); padding: 10px 14px; margin: 0 0 14px; font-size: .9rem; }
.super-panel { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin: 0 0 14px; background: var(--paper); }
.super-panel h3 { margin: 0 0 4px; font-size: .95rem; }
.super-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.super-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.super-list li .btn { margin-left: auto; }
.super-tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--night); color: #fff; vertical-align: 1px; }
.role-pill.super-pill { background: var(--night); color: var(--moon); border-color: var(--moon); }
#super-form { display: flex; gap: 8px; align-items: center; max-width: 560px; }
#super-form input { flex: 1; min-width: 0; }
.tl-edited { color: var(--warn, #c98a00); }

/* sign-in: the two options side by side (stacked only when the card is too narrow) */
.login-card { container-type: inline-size; }
.login-options { display: flex; flex-direction: column; max-width: 820px; }
.login-option { display: flex; flex-direction: column; }
.login-option .login-help { margin-top: 12px; }
.login-card .login-options .ms-btn { min-width: 0; width: 100%; max-width: 340px; }
@container (min-width: 470px) {
  .login-options { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: clamp(14px, 2.2vw, 40px); align-items: start; }
  .login-options .login-or { flex-direction: column; justify-content: center; align-self: stretch; margin: 0; gap: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .login-options .login-or::before, .login-options .login-or::after { width: 1px; height: auto; flex: 1; min-height: 14px; }
  .login-option .login-help { max-width: none; }
  .login-options .ms-btn { white-space: nowrap; padding-inline: 14px; font-size: .9rem; gap: 9px; }
}
/* a little less padding on the sign-in card, so the two options fit side by side on common laptop screens */
.login-card { padding: clamp(28px, 5vw, 80px); }
.login-options .ms-btn svg { flex: none; } /* the Microsoft and guest icons never shrink away */
.mgr-note { font-size: .82rem; margin-left: 4px; }
#email-form .grid-2 { align-items: start; }

/* Admin Center: settings as tiles */
.tile-group { margin: 0 0 22px; }
.tile-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.set-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.set-tile { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; color: var(--ink); transition: border-color .12s, box-shadow .12s, transform .12s; }
.set-tile:hover, .set-tile:focus-visible { border-color: var(--moon); box-shadow: 0 4px 14px rgba(42, 53, 119, .10); transform: translateY(-1px); }
.st-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--moon-soft); color: var(--night); }
.st-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.st-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-text b { font-size: .98rem; display: inline-flex; align-items: center; gap: 7px; }
.st-text small { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.set-tile .ai-dot, .admin-title .ai-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.set-tile.tone-ok .ai-dot, .admin-title.tone-ok .ai-dot { background: var(--good, #2e8b57); }
.set-tile.tone-bad .ai-dot, .admin-title.tone-bad .ai-dot { background: var(--bad, #c0392b); }
.set-tile.tone-idle .ai-dot, .admin-title.tone-idle .ai-dot { background: var(--muted); }
.admin-title { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.admin-title .ai-dot { width: 11px; height: 11px; }
.tag-new { display: inline-block; font-size: .7rem; font-weight: 600; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--moon-soft); color: var(--ink); vertical-align: 1px; }

/* a tile with live status and actions (Directory Sync) */
.set-tile.st-live { cursor: default; }
.st-link { color: inherit; text-decoration: none; }
.st-link:hover b, .st-link:focus-visible b { text-decoration: underline; }
.st-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.set-tile.st-live.tone-bad { border-color: color-mix(in srgb, var(--bad, #c0392b) 45%, var(--line)); }
.set-tile.st-pulse { box-shadow: 0 0 0 3px var(--moon-soft); }

/* My Team → Assigned Work */
.work-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 2.2fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .work-grid { grid-template-columns: 1fr; } }
.work-members { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.work-members button { width: 100%; display: grid; grid-template-columns: 1fr repeat(4, 58px); gap: 6px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.work-members button[aria-pressed="true"] { border-color: var(--moon); box-shadow: inset 3px 0 0 var(--moon); }
.wm-name { display: flex; flex-direction: column; min-width: 0; }
.wm-name small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-n { display: flex; flex-direction: column; align-items: center; background: var(--bg-soft, #f3f4f8); border-radius: 8px; padding: 4px 0; }
.wm-n small { font-size: .7rem; color: var(--muted); }
.wm-n.bad b { color: var(--bad, #c0392b); } .wm-n.warn b { color: var(--warn, #b7791f); } .wm-n.good b { color: var(--good, #2e8b57); }
.work-table td { vertical-align: top; }
.work-subj { display: block; color: var(--muted); font-size: .86rem; }
.work-table tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad, #c0392b); }
.chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--bg-soft, #eef0f5); color: var(--ink); }
.chip-bad { background: color-mix(in srgb, var(--bad, #c0392b) 15%, transparent); color: var(--bad, #c0392b); }
.chip-warn { background: color-mix(in srgb, var(--warn, #b7791f) 18%, transparent); color: var(--warn, #b7791f); }
.chip-ok { background: color-mix(in srgb, var(--good, #2e8b57) 14%, transparent); color: var(--good, #2e8b57); }

/* Assigned Work: engineers across the top, tickets full width below */
.work-grid { grid-template-columns: 1fr !important; }
.work-members { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.work-members button { grid-template-columns: repeat(4, 1fr) !important; }
.work-members .wm-name { grid-column: 1 / -1; margin-bottom: 4px; }
.work-table td:first-child a { white-space: nowrap; }
.work-table td:nth-child(2), .work-table td:last-child { white-space: nowrap; }
.rep-charts { margin: 6px 0 16px; }

/* sidebar logo: the full-colour logo on a white panel */
.brand .brand-panel { display: block; background: #ffffff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.brand .brand-panel img { max-width: 100% !important; width: 100%; }
@media (max-width: 760px) { .brand .brand-panel { max-width: 200px; padding: 8px 10px; } }

/* sidebar: scrolls when it doesn't fit, so Sign Out (and everything else) is always reachable */
.rail { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 3px; }
.brand .brand-panel { padding: 7px 10px; }

/* Admin Center tile icons in dark mode: yellow on a soft yellow square (navy disappeared on dark tiles) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-ico { color: var(--moon); background: rgba(252, 205, 13, .14); } }
:root[data-theme="dark"] .st-ico { color: var(--moon); background: rgba(252, 205, 13, .14); }

/* report charts: Bar / Pie switch */
.chart-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin-left: auto; margin-right: 8px; background: var(--paper); }
.chart-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; cursor: pointer; }
.chart-switch button[aria-pressed="true"] { background: var(--night); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart-switch button[aria-pressed="true"] { background: var(--moon); color: #12205f; } }
:root[data-theme="dark"] .chart-switch button[aria-pressed="true"] { background: var(--moon); color: #12205f; }
.chart-panel .panel-head { align-items: flex-start; }
/* chart titles stay on one line; the Bar / Pie switch moves under the title when the panel is narrow */
.rep-charts .chart-panel .panel-head { flex-wrap: wrap; row-gap: 8px; }
.rep-charts .chart-panel .panel-head h2 { white-space: nowrap; }
.rep-charts .chart-panel .panel-head > div:first-child { flex: 1 0 auto; }

/* Theme colours used by newer screens (Assigned Work, tiles, chips): defined for light and dark */
:root { --bg-soft: #eef0f5; --good: #2e8b57; --warn: #b7791f; --bad: #c0392b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg-soft: #262e66; --good: #4cc38a; --warn: #f5b54a; --bad: #f2786a; } }
:root[data-theme="dark"] { --bg-soft: #262e66; --good: #4cc38a; --warn: #f5b54a; --bad: #f2786a; }

/* people picker (Microsoft 365 directory search) */
.pp-wrap { position: relative; flex: 1; min-width: 0; }
.pp-wrap > input { width: 100%; }
.pp-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 10px 26px rgba(20, 24, 60, .18); max-height: 300px; overflow-y: auto; }
.pp-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.pp-list li small { color: var(--muted); font-size: .8rem; }
.pp-list li.active, .pp-list li:hover { background: var(--bg-soft); }
.pp-list li.pp-none { cursor: default; color: var(--muted); font-size: .86rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pp-list { background: #12205f; } }
:root[data-theme="dark"] .pp-list { background: #12205f; }
.pp-list { right: auto; width: max(100%, 360px); max-width: min(480px, 90vw); }
.pp-list { width: max-content; min-width: max(100%, 300px); max-width: min(520px, 92vw); }
.pp-list li small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move-note { display: block; font-size: .8rem; }

/* Sign out everywhere, audit log, guest link */
.who .signout-all { font-size: .8rem; opacity: .85; }
.audit-table td { vertical-align: top; }
.audit-table pre { white-space: pre-wrap; word-break: break-word; font-size: .78rem; margin: 4px 0; max-height: 220px; overflow: auto; }
.audit-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gl-url { width: 100%; margin-top: 6px; font-size: .8rem; }

/* Backups: settings and delete */
.bk-settings { margin: 16px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.bk-settings h2 { margin-top: 0; }
.bk-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
/* Sign out everywhere: its own line under Sign Out */
.who .signout-all { display: block; margin-top: 6px; }

/* Data retention */
.ret-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 4px; }
.ret-now { margin: 12px 0 14px; padding: 12px 14px; border-radius: var(--radius-m); background: var(--bg-soft); }
.ret-preview { margin: 6px 0 0; padding-left: 18px; }
.ret-preview li { margin: 2px 0; }
.ret-grid .field > label { min-height: 2.7em; display: flex; align-items: flex-end; }
/* align the three retention fields row by row (label, dropdown, hint), however the labels wrap */
.ret-grid { grid-template-rows: auto auto auto; row-gap: 6px; }
.ret-grid .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; margin: 0; }
.ret-grid .field > label { min-height: 0; align-items: flex-end; }

/* amber "attention" state (e.g. weekly backup download due) */
.tone-warn .ai-dot, .set-tile.tone-warn .ai-dot, .admin-title.tone-warn .ai-dot { background: var(--warn, #b7791f); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn, #b7791f) 22%, transparent); }
.bk-due { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 14px 0; padding: 12px 14px;
  border-radius: var(--radius-m); border: 1px solid color-mix(in srgb, var(--warn, #b7791f) 55%, var(--line)); background: color-mix(in srgb, var(--warn, #b7791f) 10%, transparent); }
.bk-due > div { flex: 1 1 320px; }
.bk-ok { margin: 12px 0; }
.bk-due { border-left: 4px solid var(--warn, #b7791f); background: color-mix(in srgb, var(--warn, #b7791f) 16%, transparent); }

/* ---------- Phones ---------- */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  /* compact header: logo, New Request, Menu, dark mode; the menu opens below */
  .rail { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; max-height: 100vh; overflow-y: auto; }
  .brand { order: 1; margin: 0; flex: 0 1 auto; }
  .brand .brand-panel { max-width: 118px; padding: 5px 8px; }
  .rail .new-btn { order: 2; margin-left: auto; padding: 8px 12px; width: auto; }
  .menu-toggle { order: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
  .menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .theme-toggle { order: 4; }
  .rail .nav, .rail .who { display: none; }
  .rail.menu-open .nav { display: flex; order: 5; flex: 1 1 100%; flex-direction: column; flex-wrap: nowrap; gap: 2px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); }
  .rail.menu-open .nav a { padding: 11px 10px; }
  .rail.menu-open .nav-sep, .rail.menu-open .nav-head { display: block; }
  .rail.menu-open .who { display: flex; order: 6; flex: 1 1 100%; flex-direction: column; align-items: flex-start; flex-wrap: wrap; gap: 6px; padding-top: 12px; margin: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .rail.menu-open .who span { display: inline-flex; max-width: 100%; overflow-wrap: anywhere; }
  .rail.menu-open .who a { display: block; padding: 6px 0; }

  /* tab bars scroll sideways inside their own row instead of widening the page */
  .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs > * { flex: 0 0 auto; white-space: nowrap; }
  .panel-head, .page-head, .queue-head { min-width: 0; }

  /* dashboard: the single column fits the screen; long headers wrap */
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid > * { min-width: 0; }
  .dash-grid .panel-head { flex-wrap: wrap; }
  .dash-grid .panel-head > * { min-width: 0; }

  /* reports: export buttons wrap onto a second line */
  .export-bar { flex: 1 1 100%; min-width: 0; }
}

@media (max-width: 760px) {
  /* report export buttons: the bar takes the full width and wraps (beats the desktop "never shrink" rule) */
  .panel-head .dash-actions, .panel-head .dash-actions.export-bar { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  /* one-row header: the dark-mode switch lives inside the menu on phones */
  .rail .brand .brand-panel { max-width: 104px; }
  .rail > .theme-toggle { display: none; }
  .rail.menu-open > .theme-toggle { display: inline-flex; order: 7; margin-top: 4px; }
}
@media (max-width: 760px) {
  .rail { gap: 8px; }
  .rail .brand .brand-panel { max-width: 92px; padding: 4px 6px; }
  .rail .new-btn { padding: 8px 10px; font-size: .9rem; white-space: nowrap; }
  .menu-toggle { padding: 0 10px; }
}
@media (max-width: 380px) { .menu-toggle span { display: none; } .menu-toggle { padding: 0 9px; } }
/* fieldsets never shrink below their content by default: let them, and let long role names wrap */
fieldset { min-width: 0; min-inline-size: 0; }
.member-row .field label.check { overflow-wrap: anywhere; }
@media (max-width: 760px) { .member-row { flex-wrap: wrap; } .member-row > .field { flex: 1 1 100%; } }
/* long role names wrap instead of running off the screen */
fieldset label.check { white-space: normal; }
@media (max-width: 760px) {
  /* request page and team cards: their single column fits the screen */
  .t-grid { grid-template-columns: minmax(0, 1fr); }
  .t-grid > * { min-width: 0; }
  .team-card { grid-template-columns: minmax(0, 1fr); }
  .team-card > * { min-width: 0; }
  .team-card .tc-head, .team-card .tc-settings { flex-wrap: wrap; }
}
/* role checkboxes: long custom role names wrap (overrides the nowrap above) */
.role-ticks .check { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  /* team member rows: the Remove button wraps under the name on narrow phones */
  .tc-members li { flex-wrap: wrap; min-width: 0; }
  .tc-members li > * { min-width: 0; overflow-wrap: anywhere; }
}

/* ---------- Attendance ---------- */
.ws-switch { display: flex; gap: 4px; padding: 4px; margin: 0 0 10px; border-radius: 12px; background: rgba(255,255,255,.08); }
.ws-switch a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px !important; border-radius: 9px; font-size: .86rem; font-weight: 600; color: rgba(255,255,255,.8); }
.ws-switch a svg { width: 15px; height: 15px; }
.ws-switch a.on { background: #fff; color: #0d1747; }
.start { max-width: 760px; margin: 6vh auto 0; text-align: center; }
.start h1 { margin-bottom: 4px; }
.start-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; }
.start-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface, #fff); color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s, border-color .12s; }
.start-card:hover, .start-card:focus-visible { transform: translateY(-2px); border-color: var(--moon, #f2b000); box-shadow: 0 10px 26px rgba(20,24,60,.14); }
.start-card b { font-size: 1.25rem; }
.start-card span:last-child { color: var(--muted); }
.start-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--moon-soft, #fff4c2); color: #0d1747; }
.start-ico svg { width: 28px; height: 28px; }
.att-now { text-align: center; padding: 26px 18px; border-top: 4px solid var(--line); }
.att-now.tone-ok { border-top-color: var(--good); } .att-now.tone-warn { border-top-color: var(--warn); }
.att-state { display: flex; gap: 10px; justify-content: center; align-items: center; }
.att-clock { font-size: 2.6rem; font-weight: 700; margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.att-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.btn-big { min-width: 150px; padding: 12px 22px; font-size: 1.02rem; }
.att-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--bg-soft); }
.att-pill.tone-ok { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.att-pill.tone-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.att-pill.tone-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.att-pill.tone-idle { color: var(--muted); }
.att-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.att-tiles .tile { padding: 12px 14px; border-radius: var(--radius-m); background: var(--bg-soft); display: flex; flex-direction: column; }
.att-tiles .tile b { font-size: 1.4rem; } .att-tiles .tile span { color: var(--muted); font-size: .85rem; }
.att-tiles .tile-warn b { color: var(--warn); }
.att-weekend td { color: var(--muted); }
.att-missed { color: var(--bad); }
.att-month-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.att-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.att-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.att-card:hover { border-color: var(--moon, #f2b000); }
@media (max-width: 760px) { .rail.menu-open .ws-switch { order: -1; } .att-clock { font-size: 2.1rem; } .btn-big { min-width: 0; flex: 1 1 140px; } }
/* workspace switch: text only so both labels fit the sidebar */
.ws-switch a svg { display: none; }
.ws-switch a { font-size: .8rem; padding: 7px 4px !important; white-space: nowrap; }

/* app switcher with three or four apps: a 2-column grid */
.ws-switch.ws-grid { display: grid; grid-template-columns: 1fr 1fr; }
.rail .nav .nav-head { margin-top: 10px; }

/* launcher: two apps side by side, three in a row, four as a 2 × 2 grid */
.start-cards[data-n="2"], .start-cards[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; margin-left: auto; margin-right: auto; }
.start-cards[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .start-cards[data-n] { grid-template-columns: minmax(0, 1fr); } }

/* attendance dashboard and approvals */
.att-dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.att-approvals { border-left: 4px solid var(--warn); }
.appr-list { list-style: none; margin: 8px 0 0; padding: 0; }
.appr-list > li { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.appr-list > li:first-child { border-top: 0; }
.appr-reason { margin-top: 4px; font-style: italic; }
.appr-actions { display: flex; gap: 8px; }
.fix-form { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fix-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .86rem; flex: 1 1 220px; }

/* launcher with five or six apps */
.start-cards[data-n="5"], .start-cards[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .start-cards[data-n="5"], .start-cards[data-n="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .start-cards[data-n] { grid-template-columns: minmax(0, 1fr); } }
/* News */
.news-feed { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.news-card { padding: 18px 20px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--surface, #fff); }
.news-card.pinned { border-left: 4px solid var(--moon, #f2b000); }
.news-card.birthday { background: linear-gradient(135deg, color-mix(in srgb, var(--moon, #f2b000) 16%, var(--surface, #fff)), var(--surface, #fff)); }
.news-card header { display: flex; gap: 12px; align-items: flex-start; }
.news-card header > div:first-of-type { flex: 1; min-width: 0; }
.news-card h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.news-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--moon-soft, #fff4c2); color: #0d1747; flex: none; }
.news-ico svg { width: 22px; height: 22px; }
.news-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.news-body { margin: 10px 0 12px; line-height: 1.55; overflow-wrap: anywhere; }
.news-react { display: flex; gap: 6px; flex-wrap: wrap; }
.react { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: .95rem; color: inherit; }
.react.on { border-color: var(--moon, #f2b000); background: color-mix(in srgb, var(--moon, #f2b000) 18%, transparent); }
.news-comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.comment { font-size: .92rem; overflow-wrap: anywhere; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .8rem; text-decoration: underline; }
.comment-form { display: flex; gap: 8px; } .comment-form input { flex: 1; min-width: 0; }
.news-form { max-width: 820px; display: flex; flex-direction: column; gap: 10px; }
.news-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
/* Messages */
.dm { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.dm-list { padding: 12px; } .dm-find input { width: 100%; }
.dm-people, .dm-threads { list-style: none; margin: 8px 0 0; padding: 0; }
.dm-people { border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 8px; }
.dm-people a, .dm-threads a { display: block; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.dm-threads a .hint { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-threads a.on, .dm-threads a:hover, .dm-people a:hover { background: var(--bg-soft); }
.dm-thread { display: flex; flex-direction: column; min-height: 420px; }
.dm-thread header h2 { margin: 0; } .dm-back { display: none; }
.dm-msgs { flex: 1; overflow-y: auto; max-height: 55vh; display: flex; flex-direction: column; gap: 8px; padding: 12px 2px; }
.msg { max-width: 75%; padding: 8px 12px; border-radius: 14px; background: var(--bg-soft); overflow-wrap: anywhere; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--moon, #f2b000) 22%, transparent); }
.msg .hint { display: block; font-size: .72rem; margin-top: 2px; }
.dm-send { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; } .dm-send textarea { flex: 1; min-width: 0; resize: vertical; }
.dm-empty { margin: auto; }
@media (max-width: 760px) { .dm { grid-template-columns: minmax(0, 1fr); } .dm.has-thread .dm-list { display: none; } .dm:not(.has-thread) .dm-thread { display: none; } .dm-back { display: inline-block; } .msg { max-width: 88%; } }
/* Birthdays */
.bd-table select { min-width: 130px; } .bd-table input[type=number] { width: 70px; margin-left: 6px; }

/* leave */
.att-pill.tone-leave { color: #2f6fb5; background: color-mix(in srgb, #2f6fb5 14%, transparent); }
.leave-bal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.leave-bal .tile { padding: 12px 14px; border-radius: var(--radius-m); background: var(--bg-soft); display: flex; flex-direction: column; gap: 2px; }
.leave-bal .tile b { font-size: 1.5rem; } .leave-bal .tile span { color: var(--muted); font-size: .86rem; }
.lv-form { display: flex; flex-direction: column; gap: 10px; }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.lv-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.lv-types input[type=number] { width: 100px; } .lv-types input[name=name] { min-width: 160px; }

/* Dashboard app */
.home { display: flex; flex-direction: column; gap: 4px; }
.home-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.home-tiles .tile b .att-pill { font-size: .95rem; }
.home-note { margin: 12px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.home-note svg { width: 18px; height: 18px; }
.home-news { margin-top: 14px; } .home-news h3 { font-size: .95rem; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; } .home-news h3 svg { width: 16px; height: 16px; }
.home-news ul { margin: 0; padding-left: 18px; } .home-news li { margin: 3px 0; }
.tile.tile-bad b { color: var(--bad); }
/* launcher with seven or eight apps */
.start-cards[data-n="7"], .start-cards[data-n="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 980px; margin-left: auto; margin-right: auto; }
@media (max-width: 1100px) { .start-cards[data-n="7"], .start-cards[data-n="8"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .start-cards[data-n="7"], .start-cards[data-n="8"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .start-cards[data-n] { grid-template-columns: minmax(0, 1fr); } }

/* All Apps: across the top of the app switcher */
.ws-switch .ws-all { grid-column: 1 / -1; gap: 6px; }
.ws-switch .ws-all svg { display: inline-block !important; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ws-switch:not(.ws-grid) .ws-all { flex-basis: 100%; }
.ws-switch:not(.ws-grid) { flex-wrap: wrap; }

.bd-del { color: var(--bad); } .bd-del:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
/* Birthdays on phones: each person as a small card instead of a wide table row */
@media (max-width: 760px) {
  .bd-table, .bd-table tbody, .bd-table tr, .bd-table td { display: block; width: 100%; }
  .bd-table thead { display: none; }
  .bd-table tr { position: relative; padding: 10px 44px 10px 0; border-bottom: 1px solid var(--line); }
  .bd-table td { padding: 3px 0; border: 0; }
  .bd-table td:last-child { position: absolute; top: 8px; right: 0; width: auto; }
  .bd-table select { min-width: 0; width: calc(100% - 82px); }
}
/* keep positioned helpers (like screen-reader-only labels) inside each table's own scroll box */
.table-wrap { position: relative; }
/* file pickers never wider than their box */
input[type=file] { max-width: 100%; }
/* file pickers fit their box on narrow phones */
input[type=file] { max-width: 100%; }

.manual-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
/* file pickers never wider than their box (narrow phones) */
input[type=file] { max-width: 100%; }
/* app icons (launcher cards, birthday posts): navy in light mode, brand yellow in dark mode so they stand out */
:root { --app-ico-fg: #0d1747; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --app-ico-fg: #fdb902; } }
:root[data-theme="dark"] { --app-ico-fg: #fdb902; }
.start-ico, .news-ico { color: var(--app-ico-fg); }

.bd-steps { margin: 6px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; } .bd-steps li { line-height: 1.5; }

.lv-pname { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .lv-pname input[name=pname] { font-weight: 700; font-size: 1.05rem; min-width: 0; max-width: 220px; }
.lv-inline { display: flex; gap: 8px; flex-wrap: wrap; } .lv-inline input { flex: 1 1 200px; min-width: 0; }

/* News: formatting, images, composer, preview */
.news-body h3 { font-size: 1.08rem; margin: 10px 0 4px; } .news-body h4 { font-size: .98rem; margin: 8px 0 4px; }
.news-body p { margin: 0 0 8px; } .news-body ul { margin: 0 0 8px; padding-left: 22px; }
.news-imgs { display: grid; gap: 6px; margin: 0 0 12px; border-radius: var(--radius-m); overflow: hidden; }
.news-imgs.n1 { grid-template-columns: 1fr; } .news-imgs.n2, .news-imgs.n4 { grid-template-columns: 1fr 1fr; } .news-imgs.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.news-imgs.n3 a:first-child { grid-row: 1 / 3; }
.news-imgs a { display: block; background: var(--bg-soft); } .news-imgs img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: cover; }
.news-imgs.n1 img { max-height: 480px; object-fit: contain; }
.fmt-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fmt-bar button { border: 1px solid var(--line); background: var(--surface, #fff); color: inherit; border-radius: 8px; padding: 4px 10px; cursor: pointer; min-width: 34px; }
.fmt-bar button:hover { border-color: var(--moon, #f2b000); }
.news-pick { display: flex; flex-direction: column; gap: 6px; }
.news-thumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.news-thumbs .thumb { position: relative; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.news-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-thumbs .thumb .icon-btn { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.6); color: #fff; width: 24px; height: 24px; padding: 3px; }
.add-img { cursor: pointer; }
.news-preview { max-width: 820px; } .news-preview .news-card { margin: 8px 0 12px; }
.news-drafts { max-width: 820px; border-left: 4px solid var(--warn); }
.btn-quiet { background: transparent; border-color: transparent; }

.dm-head { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 4px 2px; }
.dm-threads a b svg, .dm-thread h2 svg { width: 16px; height: 16px; vertical-align: -2px; }
.msg-from { display: block; font-size: .78rem; margin-bottom: 2px; }

/* birthday wishes */
.bday-box { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.bday-box.sent, .bday-box.mine { color: var(--muted); }
.wish-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface, #fff); color: inherit; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: .88rem; }
.chip:hover, .chip:focus-visible { border-color: var(--moon, #f2b000); background: color-mix(in srgb, var(--moon, #f2b000) 14%, transparent); }
.wish-form { display: flex; gap: 8px; } .wish-form input { flex: 1; min-width: 0; }
/* Birthdays: month and day side by side */
.bd-table select { width: auto; min-width: 130px; }
.bd-table td:nth-child(2) { white-space: nowrap; }

/* launcher with nine apps: 3 × 3 */
.start-cards[data-n="9"] { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .start-cards[data-n="9"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .start-cards[data-n="9"] { grid-template-columns: minmax(0, 1fr); } }
/* My Team */
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.mt-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--line); }
.mt-card.me { border-color: var(--moon, #f2b000); }
.mt-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.mt-card .btn { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; } .mt-card .btn svg, .page-head .btn svg { width: 15px; height: 15px; }

/* launcher: centred; nine apps as a 3 × 3 grid */
.start { max-width: 1000px; }
.start-cards[data-n="9"] { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .start-cards[data-n="9"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .start-cards[data-n="9"] { grid-template-columns: minmax(0, 1fr); } }

/* Organization Map: manage teams */
.org-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.org-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.org-form h3 { margin: 0; font-size: 1rem; }
.org-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.org-form .btn { align-self: flex-start; }

/* sign-in page: test accounts (test site only) */
.test-login { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line, #d8dbe6); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.test-login h2 { margin: 0; font-size: 1rem; }
.test-login label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.test-login input { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line, #d8dbe6); font: inherit; }
.test-login .test-btn { justify-content: center; border: 0; cursor: pointer; }
.role-pill.test-pill { background: #b5442f; color: #fff; border-color: #b5442f; }
.tu-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; align-items: end; }
.tu-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.tu-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dep-roles { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding-top: 6px; }

/* Departments as tiles */
.dep-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; }
.dep-new h2 { grid-column: 1 / -1; margin: 0; }
.dep-new label, .dep-edit label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
@media (max-width: 760px) { .dep-new { grid-template-columns: minmax(0, 1fr); } }
.dep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; margin-bottom: 16px; }
.dep-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--surface, #fff); }
.dep-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dep-head h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.dep-head .hint { margin: 2px 0 0; }
.dep-tools { display: flex; gap: 6px; flex: none; }
.dep-edit { display: flex; flex-direction: column; gap: 8px; }
.dep-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.dep-members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg-soft); }
.dep-members li > div { display: flex; flex-direction: column; min-width: 0; } .dep-members li .hint { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-members li.quiet { background: none; }
.dep-add { display: flex; gap: 8px; } .dep-add .pp-wrap, .dep-add > input { flex: 1; min-width: 0; }
.dep-row-actions { white-space: nowrap; } .dep-row-actions .btn + .btn { margin-left: 6px; }
/* inputs on these pages follow the light/dark theme (they showed grey in dark mode) */
.dep-new input, .dep-new select, .dep-tile input, .dep-tile select, .lv-inline input, [data-psel], #dp-q {
  background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; }

/* shared tiles: anything that's been added shows as a tile with edit / delete icons */
.itiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; margin: 10px 0; }
.itiles-sm { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.itile { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--surface, #fff); min-width: 0; }
.itile.editing { border-color: var(--moon, #f2b000); box-shadow: 0 0 0 1px var(--moon, #f2b000) inset; }
.itile.row-changed { border-color: var(--warn); }
.itile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.itile-head > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.itile-title { font-size: 1rem; overflow-wrap: anywhere; }
.itile-head .hint { overflow-wrap: anywhere; }
.itile-tools { display: flex; gap: 4px; flex: none; }
.itile-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.itile-edit { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.itile-edit label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .88rem; }
.itile-edit input, .itile-edit select { background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; min-width: 0; }
.itile-lock { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--muted); }
.itile-lock svg { width: 16px; height: 16px; }
.itile-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.itile-chips .chip-s { font-size: .76rem; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); }

/* check-in location preview */
.loc-preview { border-left: 4px solid var(--moon, #f2b000); }
.loc-map { position: relative; height: 220px; max-width: 520px; border-radius: var(--radius-m); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); }
.loc-map .map-tile { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; }
.loc-map .map-pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #e0412b; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.loc-map .map-acc { position: absolute; border-radius: 50%; background: rgba(224, 65, 43, .15); border: 1px solid rgba(224, 65, 43, .5); }
.loc-map .map-credit { position: absolute; right: 0; bottom: 0; font-size: 10px; padding: 1px 5px; background: rgba(255,255,255,.85); color: #333; }
.loc-coords { margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.loc-link { white-space: nowrap; text-decoration: none; } .loc-link + .loc-link { margin-left: 6px; }

.loc-map-sm { height: 180px; }
.loc-setting { margin: 0 0 12px; font-size: .9rem; color: var(--muted); }
.loc-setting .link-btn { font-size: .9rem; color: inherit; }

/* presence: green online, amber offline */
.presence { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: 1px; flex: none; box-shadow: 0 0 0 2px var(--surface, #fff); }
.presence.on { background: #22a559; }
.presence.off { background: #e0a21a; }
.pres-list { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.pres-list > span { display: inline-flex; align-items: center; gap: 5px; }

/* bulk import from Excel */
.import-box { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; border-left: 4px solid var(--moon, #f2b000); }
.import-box h2 { margin: 0 0 2px; font-size: 1rem; } .import-box .hint { margin: 0; }
.import-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.import-actions label { cursor: pointer; }
.import-result { flex: 1 1 100%; } .import-result:empty { display: none; }
/* notifications: pop-ups in the corner */
#notify-stack { position: fixed; right: 18px; bottom: 84px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.notify-pop { display: flex; align-items: flex-start; gap: 4px; padding: 10px 8px 10px 12px; border-radius: 12px; background: var(--surface, #fff); border: 1px solid var(--line); border-left: 4px solid var(--moon, #f2b000);
  box-shadow: 0 10px 28px rgba(15, 20, 60, .28); animation: notify-in .2s ease-out; transition: opacity .25s, transform .25s; }
.notify-pop.out { opacity: 0; transform: translateX(16px); }
.notify-body { flex: 1; display: flex; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.notify-body b { display: block; font-size: .92rem; }
.notify-text { display: block; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notify-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--moon-soft, #fff4c2); color: var(--app-ico-fg, #0d1747); flex: none; }
.notify-ico svg { width: 18px; height: 18px; }
.notify-x { flex: none; }
@keyframes notify-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .notify-pop { animation: none; transition: none; } }
.home-notify { border-left: 3px solid var(--moon, #f2b000); padding-left: 10px; }

/* notification bell and its list */
.bell-btn { position: fixed; top: calc(14px + var(--tm, 0px)); right: 168px; z-index: 30; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.bell-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.bell-btn:hover { border-color: var(--muted); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #d64032; color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
#notify-panel { position: fixed; top: calc(60px + var(--tm, 0px)); right: 18px; z-index: 70; width: min(380px, calc(100vw - 24px)); max-height: min(520px, 75vh); overflow-y: auto;
  background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 20, 60, .3); padding: 10px; }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 8px; } .np-head h2 { margin: 0; font-size: 1rem; }
.np-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.np-list a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.np-list a:hover, .np-list a:focus-visible { background: var(--bg-soft); }
.np-list li.unread a { background: color-mix(in srgb, var(--moon, #f2b000) 10%, transparent); }
.np-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .np-text b { font-size: .9rem; }
.np-text > span:not(.hint) { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-dot { width: 9px; height: 9px; border-radius: 50%; background: #d64032; flex: none; margin-top: 6px; }
.np-empty { padding: 14px 8px; text-align: center; }
@media (max-width: 760px) {
  .bell-btn { position: relative; top: auto; right: auto; order: 2; margin-left: auto; width: 34px; height: 34px; border-color: rgba(255,255,255,.25); background: transparent; color: #fff; }
  .rail .bell-btn ~ .theme-toggle { margin-left: 6px; }
  #notify-panel { top: 64px; right: 12px; }
}

/* group messages */
.gm-form { display: flex; flex-direction: column; gap: 12px; }
.gm-form fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.gm-form legend { font-weight: 700; padding: 0 4px; }
.gm-form label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.gm-form textarea, .gm-form input[name=title] { background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
.gm-deps { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0 0 22px; }
.gm-view { display: flex; flex-direction: column; gap: 10px; }
/* system checks */
.sys-checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.sys-checks li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; } .sys-checks b { min-width: 130px; }
.sys-state.good { color: var(--good); } .sys-state.warn { color: var(--warn); font-weight: 600; }
/* dark mode: icons that were navy on dark (Guest request cards, the manager icon on Team cards) turn brand yellow */
:root[data-theme="dark"] .cc-ico, :root[data-theme="dark"] .tc-lead > .ico { color: var(--moon); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cc-ico, :root:not([data-theme="light"]) .tc-lead > .ico { color: var(--moon); } }
:root[data-theme="dark"] .cc-ico { background: rgba(252, 205, 13, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cc-ico { background: rgba(252, 205, 13, .14); } }

/* floating Team Chat (next to Ask IT Assistant) */
.team-chat-btn { position: fixed; right: 220px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  background: var(--night); color: #fff; border: 0; border-bottom: 3px solid #22a559; border-radius: 999px; padding: 12px 18px 11px; font: inherit; font-weight: 600;
  box-shadow: 0 8px 24px rgba(20, 26, 60, .28); cursor: pointer; }
.team-chat-btn:hover { filter: brightness(1.08); }
.team-chat-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tcw-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #d64032; color: #fff; font-size: .74rem; display: inline-grid; place-items: center; }
.team-chat > header { border-bottom-color: #22a559; }
.team-chat > header small { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; opacity: .9; }
.tcw-tabs { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tcw-tabs button { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .82rem; white-space: nowrap; cursor: pointer; }
.tcw-tabs button[aria-selected="true"] { background: var(--night); color: #fff; border-color: var(--night); }
.tcw-from { display: block; font-size: .76rem; margin-bottom: 2px; }
.tcw-empty { text-align: center; margin: auto; }
@media (max-width: 600px) { .team-chat-btn span { display: none; } .team-chat-btn { padding: 12px 14px 11px; } }
@media print { .team-chat-btn, .team-chat { display: none !important; } }

/* Team & Roles: add a test person */
.m-test-toggle { margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-test-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 8px; }
.m-test-fields label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .88rem; }

/* departments: Head / Part of on the card, and the Department Map */
.dep-path { display: block; font-size: .8rem; color: var(--muted); }
.dep-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.dep-links label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.dep-links select { background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; min-width: 0; }
.dep-tile.dep-sub { border-left: 3px solid var(--moon, #f2b000); }
.dmap ul { list-style: none; margin: 0; padding-left: 20px; border-left: 2px solid var(--line); }
.dmap > ul { padding-left: 0; border-left: 0; }
.dmap li { margin: 6px 0; }
.dmap-node { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.dmap ul ul > li { position: relative; } .dmap ul ul > li::before { content: ""; position: absolute; left: -20px; top: 18px; width: 16px; border-top: 2px solid var(--line); }
@media (max-width: 600px) { .dep-links { grid-template-columns: 1fr; } }

/* System & Usage: amber marks and the attention banner */
.sys-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; }
.sys-dot.good { background: #22a559; } .sys-dot.warn { background: #e0a21a; box-shadow: 0 0 0 3px rgba(224, 162, 26, .25); }
.sys-checks li { align-items: center; } .sys-checks li.sys-amber b { color: var(--warn); }
.sys-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--radius-m); border: 1px solid rgba(224, 162, 26, .55); background: rgba(224, 162, 26, .12); }
.sys-alert .sys-dot { margin-top: 5px; } .sys-alert b { display: block; } .sys-alert span:not(.sys-dot) { font-size: .9rem; color: var(--muted); }
.sys-alert.ok { border-color: rgba(34, 165, 89, .5); background: rgba(34, 165, 89, .1); }

/* department chart */
.dept-scroll { overflow: auto; padding: 8px; }
.dept-chart { display: block; margin: 0 auto; max-width: none; font-family: inherit; }
.dc-link { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .55; }
.dc-node > rect:first-child { fill: var(--surface, #fff); stroke: var(--line); stroke-width: 1.2; }
.dc-node .dc-accent { fill: var(--moon, #f2b000); }
.dc-root > rect:first-child { stroke: var(--moon, #f2b000); } .dc-root .dc-accent { fill: var(--night-2, #2236a3); }
.dc-it .dc-accent { fill: #8e9be8; } .dc-it > rect:first-child { stroke-dasharray: 0; stroke: #8e9be8; }
.dc-t { fill: var(--ink); font-weight: 700; font-size: 13px; } .dc-s { fill: var(--muted); font-size: 11.5px; }

/* department cards: bigger, with people as tiles */
.dep-grid { grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)) !important; }
.dep-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 8px; flex: none; }
.dep-person { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); min-width: 0; }
.dep-person .dp-who { display: flex; flex-direction: column; min-width: 0; }
.dep-person .dp-who b { overflow-wrap: anywhere; font-size: .92rem; } .dep-person .dp-who .hint { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-person.adding { border-color: #22a559; } .dep-person.removing { opacity: .65; border-style: dashed; } .dep-person.removing b { text-decoration: line-through; }
.dp-tag { align-self: flex-start; margin-top: 3px; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(224, 162, 26, .2); color: var(--warn); }
.dp-tag.new { background: rgba(34, 165, 89, .18); color: var(--good); }
.dep-empty { margin: 0; }
.dep-savebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--warn); background: rgba(224, 162, 26, .1); }
.dep-tile.row-changed { border-color: var(--warn); }
.dmap-it { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; } .dmap-it select { min-width: 220px; }
.dep-members { display: none; }

/* test users: department and access */
.tu-access { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tu-access legend { font-weight: 700; padding: 0 4px; }
.tu-access > label:not(.check) { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .88rem; max-width: 320px; }
.tu-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; } .tu-label { font-weight: 600; font-size: .88rem; min-width: 110px; }
.tu-access-form { display: flex; flex-direction: column; gap: 8px; }
.dep-people .dep-empty { grid-column: 1 / -1; }
/* People | Departments tabs */
#org-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, #fff); }
#org-tabs button { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; padding: 7px 18px; border-radius: 999px; cursor: pointer; }
#org-tabs button[aria-selected="true"] { background: var(--night, #12205f); color: #fff; box-shadow: inset 0 -3px 0 var(--moon, #f2b000); }
/* Everyone list: department and manager, each with a remove mark; remove a person from the list */
.ev-cell { display: flex; align-items: center; gap: 6px; } .ev-cell select { min-width: 0; flex: 1; }
.ev-table td { vertical-align: middle; }
.ev-table tr.row-hiding td { opacity: .7; } .ev-table tr.row-hiding b { text-decoration: line-through; }
.ev-remove { white-space: nowrap; }
.ev-hidden { margin-top: 12px; } .ev-hidden summary { cursor: pointer; font-weight: 600; }
.ev-hidden ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ev-hidden li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.ev-cell select { min-width: 170px; } .ev-table { min-width: 900px; }

.mgr-panel { margin-bottom: 14px; } .mgr-switch { margin: 6px 0; }
.mgr-who summary { cursor: pointer; font-weight: 600; } .mgr-who ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }

/* Everyone list: fits its panel (columns share the width; dropdowns shrink) */
.ev-table { min-width: 0 !important; width: 100%; table-layout: fixed; }
.ev-table th:nth-child(1) { width: 44px; } .ev-table th:nth-child(2) { width: 26%; } .ev-table th:nth-child(3) { width: 14%; } .ev-table th:nth-child(4) { width: 22%; } .ev-table th:nth-child(5) { width: 22%; } .ev-table th:nth-child(6) { width: 16%; } /* remove, person, designation, department, manager, location */
.ev-table td { overflow-wrap: anywhere; }
.ev-cell select { min-width: 0 !important; width: 100%; }
.ev-table .dep-row-actions { text-align: right; }
@media (max-width: 900px) { .ev-table { table-layout: auto; min-width: 760px !important; } }
.ev-table td:nth-child(2) .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }

.loc-warn { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(224, 162, 26, .55); background: rgba(224, 162, 26, .12); font-size: .9rem; }
.loc-warn.subtle { border-color: var(--line); background: transparent; color: var(--muted); }

/* organization chart (company → President → departments → managers → teams) */
.dc-pres > rect:first-child { stroke: #22a559; } .dc-pres .dc-accent { fill: #22a559; }
.dc-mgr .dc-accent { fill: var(--moon, #f2b000); } .dc-dept .dc-accent { fill: #8e9be8; }
.dc-list > rect:first-child { fill: var(--bg-soft, rgba(127,127,127,.08)); } .dc-list .dc-accent { fill: var(--line); }
.dc-other > rect:first-child { stroke-dasharray: 5 4; }

.bd-set { display: flex; align-items: center; gap: 8px; } .bd-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .bd-entry input[data-d] { width: 72px; }

/* birthdays in Announcements */
.bday-today h2 { margin-top: 0; } .bday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.bday-card { border: 1px solid var(--line); border-left: 4px solid var(--moon, #f2b000); border-radius: var(--radius-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.bday-card h3 { margin: 0; font-size: 1.05rem; }
/* My Day: birthdays, news and announcements as tiles */
.md-groups { display: grid; gap: 14px; margin-top: 14px; }
.md-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .95rem; }
.md-group h3 svg { width: 17px; height: 17px; }
.md-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.md-tile { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface, #fff); color: inherit; text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
.md-tile:hover, .md-tile:focus-visible { border-color: var(--moon, #f2b000); transform: translateY(-1px); }
.md-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none; background: var(--moon-soft, #fff4c2); color: var(--app-ico-fg, #0d1747); }
.md-ico svg { width: 20px; height: 20px; }
.md-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-txt b { font-size: .92rem; overflow-wrap: anywhere; }
.md-body { font-size: .85rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.md-bday { border-left: 4px solid var(--moon, #f2b000); }
.md-tile.unread { border-color: color-mix(in srgb, var(--moon, #f2b000) 55%, var(--line)); }
.md-tile .np-dot { position: absolute; top: 10px; right: 10px; }
:root[data-theme="dark"] .md-ico { color: var(--moon); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .md-ico { color: var(--moon); } }
.md-groups { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; } .md-group .md-tiles { grid-template-columns: 1fr; }
/* offline page (installable app) */
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.offline-card { max-width: 440px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 32px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.offline-logo { width: 180px; max-width: 70%; height: auto; background: #fff; border-radius: 12px; padding: 8px 12px; }
.offline-card h1 { margin: 6px 0 0; }
.install-app { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; margin: 2px 0 6px; } .install-app svg { width: 15px; height: 15px; }

.np-list li.persistent a { border-left: 3px solid #e0a21a; }

/* sign-in page: "Sign in with User ID" (test accounts, only where test sign-in is on) */
.userid-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px auto 18px; text-align: center; max-width: 420px; }
.userid-btn { width: auto; min-width: 260px; justify-content: center; }
.userid-dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(420px, calc(100vw - 32px)); background: var(--surface, #fff); color: var(--ink); box-shadow: 0 24px 64px rgba(15, 20, 60, .35); }
.userid-dialog::backdrop { background: rgba(15, 20, 60, .55); }
.userid-dialog .test-login { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; }
.userid-dialog h2 { margin: 0; font-size: 1.3rem; }
.userid-dialog label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.userid-dialog input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface, #fff); color: var(--ink); }
.userid-actions { display: flex; gap: 10px; flex-wrap: wrap; } .userid-actions .ms-btn { flex: 1; justify-content: center; }
.userid-cancel { background: transparent !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.userid-wrap .userid-btn { align-self: center; margin: 0 auto !important; } .userid-wrap .login-help { margin: 0; }

/* Test Users: the test mode switch */
.test-mode .tm-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.test-mode h2 { margin-top: 0; } .test-mode.on { border-left: 4px solid #e0a21a; }
.tm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 1rem; }
.tm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tm-track { width: 48px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.tm-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.tm-switch input:checked + .tm-track { background: #e0a21a; } .tm-switch input:checked + .tm-track .tm-knob { transform: translateX(22px); }
.tm-switch input:focus-visible + .tm-track { outline: 3px solid var(--focus); outline-offset: 2px; }
.tm-switch input:disabled + .tm-track { opacity: .5; } .tm-switch input:disabled ~ b { opacity: .6; }
.tm-lock { margin: 8px 0 0; }
/* side panel footer: name, email, then the role tags in a row, then the actions each on their own line */
.who .who-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.who .who-pills .role-pill { margin: 0 !important; }
.who .who-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.who .who-actions a, .who .who-actions .link-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; }
.who .who-actions .install-app[hidden] { display: none !important; }

/* quick thank-you replies to a birthday wish */
.bday-replies { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 2px 4px; }
.bday-replies .hint { margin-right: 2px; }
.bday-reply { cursor: pointer; border: 1px solid var(--line); background: var(--surface, #fff); color: var(--ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; }
.bday-reply:hover, .bday-reply:focus-visible { border-color: var(--moon, #f2b000); }

/* Live Chat: one-to-one with colleagues (department and team) */
.live-chat-btn { border-bottom-color: #8e9be8 !important; }
.lcw-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lcw-back { background: transparent; border: 0; color: inherit; font-size: 1.2rem; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.lcw-back:hover, .lcw-back:focus-visible { background: rgba(255,255,255,.12); }
.lcw-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lcw-person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.lcw-person:hover, .lcw-person:focus-visible { border-color: var(--line); background: var(--surface); }
.lcw-who { display: flex; flex-direction: column; min-width: 0; flex: 1; } .lcw-who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .live-chat-btn span { display: none; } }
/* ===== Birthday: the birthday person's own day ===== */
:root { --bday-bg: radial-gradient(circle at 12% 18%, rgba(229,72,77,.18) 0 6px, transparent 7px), radial-gradient(circle at 82% 12%, rgba(88,166,255,.22) 0 5px, transparent 6px),
  radial-gradient(circle at 68% 78%, rgba(163,113,247,.2) 0 6px, transparent 7px), radial-gradient(circle at 24% 84%, rgba(63,185,80,.2) 0 5px, transparent 6px),
  radial-gradient(ellipse at 50% -10%, rgba(246,201,14,.22), transparent 55%), linear-gradient(160deg, #fff8e1 0%, #fff1f3 55%, #f3f0ff 100%);
  --bday-card-bg: rgba(255,255,255,.86); --bday-ink: #1c2e93; }
:root[data-theme="dark"] { --bday-bg: radial-gradient(circle at 12% 18%, rgba(229,72,77,.35) 0 5px, transparent 6px), radial-gradient(circle at 82% 12%, rgba(88,166,255,.35) 0 4px, transparent 5px),
  radial-gradient(circle at 68% 78%, rgba(163,113,247,.35) 0 5px, transparent 6px), radial-gradient(circle at 24% 84%, rgba(63,185,80,.32) 0 4px, transparent 5px),
  radial-gradient(ellipse at 50% -10%, rgba(246,201,14,.28), transparent 55%), linear-gradient(160deg, #161b4a 0%, #1d1747 55%, #12163a 100%);
  --bday-card-bg: rgba(29,35,82,.9); --bday-ink: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bday-bg: radial-gradient(circle at 12% 18%, rgba(229,72,77,.35) 0 5px, transparent 6px), radial-gradient(circle at 82% 12%, rgba(88,166,255,.35) 0 4px, transparent 5px),
  radial-gradient(circle at 68% 78%, rgba(163,113,247,.35) 0 5px, transparent 6px), radial-gradient(circle at 24% 84%, rgba(63,185,80,.32) 0 4px, transparent 5px),
  radial-gradient(ellipse at 50% -10%, rgba(246,201,14,.28), transparent 55%), linear-gradient(160deg, #161b4a 0%, #1d1747 55%, #12163a 100%);
  --bday-card-bg: rgba(29,35,82,.9); --bday-ink: #fff; } }
.start.bday-mode { position: relative; background: var(--bday-bg); background-size: 220px 220px, 260px 260px, 240px 240px, 280px 280px, 100% 100%, 100% 100%; background-repeat: repeat, repeat, repeat, repeat, no-repeat, no-repeat; border-radius: 22px; padding: 28px 22px 26px; margin: -6px -6px 0; }
.start.bday-mode h1 { color: var(--bday-ink); }
.start.bday-mode .start-card { background: var(--bday-card-bg); backdrop-filter: blur(2px); }
.bday-balloons { display: flex; justify-content: center; gap: 18px; font-size: 1.9rem; margin-bottom: 4px; }
.bday-balloons span { display: inline-block; animation: bday-float 3.2s ease-in-out infinite; }
.bday-balloons span:nth-child(2n) { animation-delay: .6s; } .bday-balloons span:nth-child(3n) { animation-delay: 1.2s; }
@keyframes bday-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* the sign-in celebration */
.bday-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(12,16,48,.55); animation: bday-in .25s ease-out; }
.bday-overlay.out { opacity: 0; transition: opacity .3s; }
@keyframes bday-in { from { opacity: 0; } }
.bday-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bday-confetti i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; opacity: .95; animation: bday-fall linear forwards; }
@keyframes bday-fall { to { top: 105%; transform: translateX(40px) rotate(720deg); } }
.bday-card { position: relative; max-width: 420px; width: 100%; text-align: center; padding: 28px 24px 24px; border-radius: 20px; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 28px 70px rgba(10,14,50,.45); animation: bday-pop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes bday-pop { from { transform: scale(.85); opacity: 0; } }
.bday-cake { font-size: 3.4rem; line-height: 1; margin-bottom: 6px; }
.bday-card h2 { margin: 6px 0 8px; } .bday-card p { margin: 0 0 18px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .bday-balloons span, .bday-overlay, .bday-card { animation: none !important; } }
/* ===== Birthday card templates ===== */
.bcard { position: relative; border-radius: 18px; padding: 26px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bcard.ink-light { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); } .bcard.ink-dark { color: #1d2366; }
.bcard-pic { max-width: 46%; max-height: 120px; object-fit: contain; border-radius: 12px; }
.bcard-head { margin: 0; font-size: 1.45rem; line-height: 1.25; } .bcard-msg { margin: 0; font-size: 1rem; line-height: 1.5; max-width: 36ch; opacity: .95; }
.bcard-thumb { min-height: 150px; padding: 18px 14px; } .bcard-thumb .bcard-head { font-size: 1.1rem; } .bcard-thumb .bcard-msg { font-size: .85rem; }
.bcard-thumb .bcard-pic { max-height: 60px; }
.bcard-small { min-height: 120px; padding: 16px 14px; margin-bottom: 8px; } .bcard-small .bcard-head { font-size: 1.1rem; } .bcard-small .bcard-msg { font-size: .85rem; }
.bcard-preview { min-height: 260px; }
.bc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.bc-item { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; }
.bc-item.active { border-color: var(--moon, #f2b000); box-shadow: 0 0 0 2px color-mix(in srgb, var(--moon, #f2b000) 45%, transparent); }
.bc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .bc-meta b { margin-right: auto; }
.bc-badge { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.bc-badge.on { border-color: #2f9e57; color: #2f9e57; }
.bc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .bc-edit-grid { grid-template-columns: 1fr; } }
.bc-form { display: flex; flex-direction: column; gap: 14px; } .bc-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.bc-form label.check, .bc-form .bc-inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.bc-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; } .bc-form legend { font-weight: 700; padding: 0 4px; }
.bc-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.bc-swatch { cursor: pointer; display: flex !important; flex-direction: column; align-items: center; gap: 4px !important; font-weight: 500 !important; }
.bc-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bc-swatch span { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 1.3rem; }
.bc-swatch input:checked + span { border-color: var(--moon, #f2b000); box-shadow: 0 0 0 2px color-mix(in srgb, var(--moon, #f2b000) 50%, transparent); }
.bc-swatch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.bc-swatch small { font-size: .75rem; color: var(--muted); text-align: center; }
.bc-bg-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .bc-file { cursor: pointer; }
.bc-preview-wrap { position: sticky; top: 16px; }
/* the sign-in celebration with the chosen card: its design fills the screen */
.bday-overlay.tpl { background: rgba(10,14,40,.35); }
.bday-backdrop { position: absolute; inset: 0; background: var(--bday-tpl); opacity: .92; }
.bday-stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(560px, 100%); }
.bcard-hero { width: 100%; min-height: 320px; padding: 40px 30px; box-shadow: 0 30px 80px rgba(8,10,40,.45), inset 0 0 0 1px rgba(255,255,255,.18); animation: bday-pop .5s cubic-bezier(.2,1.4,.4,1); }
.bcard-hero .bcard-head { font-size: 2rem; } .bcard-hero .bcard-msg { font-size: 1.1rem; } .bcard-hero .bcard-pic { max-height: 150px; }
.bday-thanks { min-width: 200px; box-shadow: 0 10px 30px rgba(8,10,40,.35); }
/* All Apps on your birthday: the chosen card's design as the background */
.start.bday-mode.tpl { background: var(--bday-tpl); }
.start.bday-mode.tpl.ink-light h1, .start.bday-mode.tpl.ink-light > .hint { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.start.bday-mode.tpl.ink-dark h1, .start.bday-mode.tpl.ink-dark > .hint { color: #1d2366; }
@media (prefers-reduced-motion: reduce) { .bcard-hero { animation: none !important; } }
.bcard, .bcard * { text-transform: none !important; } /* birthday cards show HR’s wording exactly as typed */

/* the birthday pill at the top of every page (the birthday person, all day) */
.bday-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; border: 1px solid var(--line); border-bottom: 3px solid #e5484d;
  background: var(--surface, #fff); color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; box-shadow: 0 6px 18px rgba(20,24,61,.14); margin-right: 8px; }
.bday-pill:hover, .bday-pill:focus-visible { border-color: var(--moon, #f2b000); }
.bday-pill-cake { font-size: 1.25rem; display: inline-block; animation: bday-wiggle 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bday-wiggle { 0%, 70%, 100% { transform: rotate(0) scale(1); } 76% { transform: rotate(-14deg) scale(1.15); } 82% { transform: rotate(12deg) scale(1.15); } 88% { transform: rotate(-8deg) scale(1.08); } 94% { transform: rotate(4deg); } }
@media (max-width: 600px) { .bday-pill span:last-child { display: none; } .bday-pill { padding: 7px 10px; } }
@media (prefers-reduced-motion: reduce) { .bday-pill-cake { animation: none; } }
.bday-pill { position: fixed; z-index: 55; margin: 0; width: auto; }

/* celebration pills (birthday and special days) next to the bell */
.celebrate-pills { position: fixed; z-index: 55; display: flex; gap: 8px; align-items: center; }
.celebrate-pills .bday-pill { position: static; margin: 0; }
.occ-pill { border-bottom-color: #3fb950; }
@media (max-width: 600px) { .celebrate-pills .bday-pill span:last-child { display: none; } .celebrate-pills .bday-pill { padding: 7px 10px; } }

/* Celebrations → Special Days */
.cel-tabs { margin-bottom: 14px; }
.sd-top { margin-bottom: 12px; }
.sd-row { display: flex; flex-wrap: wrap; gap: 12px; } .sd-row > label { flex: 1 1 140px; } .sd-row .sd-emoji { flex: 0 0 90px; }
.sd-depts, .sd-person { padding-left: 26px; display: flex; flex-wrap: wrap; gap: 6px 14px; } .sd-depts[hidden], .sd-person[hidden], .sd-year[hidden] { display: none !important; }
.sd-holidays { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.sd-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; }
.sd-item.off { opacity: .55; } .sd-item .hint { margin: 0; line-height: 1.6; }
.sd-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .sd-meta b { margin-right: auto; }
.sd-countries { padding-left: 26px; display: flex; flex-wrap: wrap; gap: 6px 14px; } .sd-countries[hidden] { display: none !important; }
.import-all { border-left: 4px solid var(--moon, #f2b000); }
.dir-review .dir-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; } .dir-review .count-pill { display: inline-block; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #e0a21a; color: #0d1747; font-size: .8rem; text-align: center; }
.dir-rejected { margin-top: 12px; } .dir-rejected summary { cursor: pointer; font-weight: 600; }

/* System & Usage: where to fix each check, and the way back */
.sys-checks li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.sys-fix { margin-left: auto; font-weight: 700; white-space: nowrap; }
.sys-fix.quiet-link { font-weight: 500; opacity: .75; }
.sys-alert a { color: inherit; text-decoration: underline; }
.back-system { margin-right: 14px; font-weight: 700; }
.sys-alert-list { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.sys-alert-list li { display: list-item; } .sys-alert-list a { display: inline; font-weight: 700; color: inherit; text-decoration: underline; }
.sys-alert-list .sys-name { display: inline; font-weight: 700; }
.sys-alert-list .sys-name { color: inherit; font-size: inherit; opacity: 1; }

/* meetings: My Day tiles and the bell */
.md-meetings { margin-top: 14px; } .md-meeting { align-items: center; } .md-meeting .md-txt { flex: 1; }
.md-join { align-self: flex-start; margin-top: 6px; }
.np-list li.meeting a { border-left: 3px solid #58a6ff; }

.tm-form { display: flex; flex-direction: column; gap: 12px; } .tm-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.tm-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.tm-row { display: flex; flex-wrap: wrap; gap: 12px; } .tm-row > label { flex: 1 1 200px; }
.tm-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; } .tm-form legend { font-weight: 700; padding: 0 4px; }
.tm-people { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tm-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tm-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }

/* meeting reminders: banners at the top, below the bell, until closed */
.meeting-banners { position: fixed; z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 24px)); }
.meeting-banner { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface, #fff); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid #58a6ff; box-shadow: 0 12px 32px rgba(15,20,60,.22); animation: mb-in .25s ease-out; }
.meeting-banner.out { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; }
@keyframes mb-in { from { opacity: 0; transform: translateY(-8px); } }
.mb-ico { font-size: 1.4rem; } .mb-text { display: flex; flex-direction: column; min-width: 0; flex: 1; } .mb-text b { overflow-wrap: anywhere; } .mb-text span { color: var(--muted); font-size: .88rem; }
.mb-close { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.mb-close:hover, .mb-close:focus-visible { background: var(--line); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .meeting-banner { animation: none; } }

/* first-day welcome */
.welcome-box { width: 100%; background: var(--surface, #fff); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: left; box-shadow: 0 16px 40px rgba(8,10,40,.25); }
.welcome-steps { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: ws; display: flex; flex-direction: column; gap: 6px; }
.welcome-steps li { counter-increment: ws; }
.welcome-steps a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; }
.welcome-steps a::before { content: counter(ws); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--moon, #f2b000); color: #0d1747; font-size: .8rem; flex: none; }
.welcome-steps a span { margin-left: auto; opacity: .6; } .welcome-steps a:hover, .welcome-steps a:focus-visible { border-color: var(--moon, #f2b000); }
.welcome-panel { border-left: 4px solid var(--moon, #f2b000); } .welcome-panel p { margin-top: 0; }
.wl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wl-step { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wl-step input, .wl-step select { min-width: 0; } .wl-moves { display: inline-flex; gap: 4px; }
@media (max-width: 640px) { .wl-step { grid-template-columns: 1fr; } }
.bday-backdrop { opacity: .97; }
.celebrate-pills { z-index: 90; justify-content: flex-end; }
.celebrate-pills { flex-direction: row; align-items: center; } /* side by side: in the top bar, left of 🌐 */

/* System & Usage: step-by-step guides */
.fix-guide { border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; width: min(720px, calc(100vw - 24px)); background: var(--surface, #fff); color: var(--ink); box-shadow: 0 24px 64px rgba(15,20,60,.35); }
.fix-guide::backdrop { background: rgba(10,14,40,.55); }
.fix-guide h2 { margin-top: 0; } .fg-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 14px; } .fg-steps li { line-height: 1.5; }
.fg-code { position: relative; margin-top: 8px; } .fg-code pre { margin: 0; padding: 12px 14px; padding-right: 76px; border-radius: 10px; background: #0e1230; color: #e6e9ff; font-size: .78rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.fg-code [data-copy] { position: absolute; top: 8px; right: 8px; }
.fg-now { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #e0a21a 16%, transparent); }
.fg-ok { color: #2f9e57; } .fg-bad { color: #c97a00; } .fg-result { min-height: 1.4em; }
.sys-fix.link-btn { margin-left: auto; font-weight: 700; } .sys-alert-list .link-btn { font-weight: 700; text-decoration: underline; color: inherit; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; }
.sys-checks .sys-fix.link-btn { font: inherit; font-weight: 700; text-decoration: underline; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Joining Day: the guided Getting Started panel */
.joining { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(860px, calc(100vw - 20px)); background: var(--surface, #fff); color: var(--ink); box-shadow: 0 28px 70px rgba(10,14,50,.4); }
.joining::backdrop { background: rgba(10,14,40,.55); }
.jd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 6px; } .jd-head h2 { margin: 0; } .jd-head .hint { margin: 4px 0 0; }
.jd-head .ai-chat-x { color: var(--ink); }
.jd-bar { height: 6px; margin: 6px 20px 0; border-radius: 999px; background: var(--line); overflow: hidden; } .jd-bar i { display: block; height: 100%; background: #2f9e57; transition: width .3s; }
.jd-body { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; padding: 16px 20px; }
@media (max-width: 680px) { .jd-body { grid-template-columns: 1fr; } }
.jd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jd-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; font-weight: 600; }
.jd-item.on { border-color: var(--moon, #f2b000); box-shadow: 0 0 0 2px color-mix(in srgb, var(--moon, #f2b000) 40%, transparent); }
.jd-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--line); color: var(--ink); font-size: .85rem; }
.jd-item.done { border-color: color-mix(in srgb, #2f9e57 55%, var(--line)); } .jd-item.done .jd-dot { background: #2f9e57; color: #fff; }
.jd-step h3 { margin-top: 0; } .jd-step ol { padding-left: 20px; line-height: 1.6; } .jd-tag { font-size: .8rem; color: #2f9e57; margin-left: 6px; }
.jd-good { color: #2f9e57; font-weight: 700; } .jd-copy { display: inline-flex; align-items: center; gap: 6px; } .jd-copy code { padding: 2px 6px; border-radius: 6px; background: var(--line); }
.jd-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
.join-pill { border-bottom-color: #f2b000 !important; }
.welcome-steps li.done a { border-color: color-mix(in srgb, #2f9e57 60%, var(--line)); color: inherit; } .welcome-steps li.done a::before { content: '✓'; background: #2f9e57; color: #fff; }
.ws-ok { margin-left: auto; color: #2f9e57; }
.wl-days { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 6px !important; font-weight: 500 !important; } .wl-days input { width: 72px; }

/* the notifications panel sits above the celebration pills and meeting banners; they step aside while it's open */
#notify-panel { z-index: 120; }
body.np-open #celebrate-pills, body.np-open #meeting-banners { visibility: hidden; }

/* Welcome: skip, expiry choice, side-panel link */
.bday-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; } .bday-skip { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.jd-foot-l { display: inline-flex; align-items: center; gap: 14px; }
.wl-expiry { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; } .wl-expiry legend { font-weight: 700; padding: 0 4px; }
.wl-radio { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 8px; font-weight: 500 !important; } .wl-radio input[type=radio] { margin-top: 4px; flex: none; }
.wl-radio input[type=number] { width: 64px; display: inline-block; margin: 0 4px; padding: 4px 6px; }
.getting-started-link { font-weight: 600; }

/* Device Inventory */
.dv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; } .dv-head-acts { display: flex; gap: 8px; }
.dv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; } .dv-tiles.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin: 0; }
.dv-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); border-left: 4px solid #8a90b0; background: var(--surface, transparent); color: var(--ink); text-decoration: none; }
.dv-tile b { font-size: 1.7rem; line-height: 1.1; } .dv-tile span { color: var(--muted, #8a90b0); font-size: .85rem; }
.dv-tile.ok { border-left-color: #2f9e57; } .dv-tile.bad { border-left-color: #d64545; } .dv-tile.warn { border-left-color: #e0a21a; } .dv-tile:hover, .dv-tile:focus-visible { border-color: var(--moon, #f2b000); }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; } .dv-grid .panel { margin: 0; } .dv-grid h2 { margin-top: 0; font-size: 1.05rem; }
.dv-donut { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .dv-donut svg { width: 150px; height: 150px; flex: none; }
.dv-donut-n { font-size: 26px; font-weight: 800; fill: var(--ink); } .dv-donut-s { font-size: 11px; fill: var(--muted, #8a90b0); }
.dv-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .dv-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.dv-bars { display: flex; flex-direction: column; gap: 8px; } .dv-bar { display: grid; grid-template-columns: minmax(0, 110px) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.dv-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dv-bar-t { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; } .dv-bar-t i { display: block; height: 100%; border-radius: 999px; background: #5b6bd6; }
.dv-meter { height: 16px; border-radius: 999px; background: color-mix(in srgb, #d64545 35%, var(--line)); overflow: hidden; } .dv-meter i { display: block; height: 100%; background: #2f9e57; }
.dv-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; }
.dv-ok { background: color-mix(in srgb, #2f9e57 20%, transparent); color: #2f9e57; } .dv-bad { background: color-mix(in srgb, #d64545 20%, transparent); color: #e05a5a; } .dv-warn { background: color-mix(in srgb, #e0a21a 22%, transparent); color: #c98a0a; } .dv-muted { background: var(--line); color: var(--ink); }
.dv-ok-t { color: #2f9e57; } .dv-bad-t { color: #e05a5a; font-weight: 700; }
.dv-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .dv-filter input { flex: 1 1 240px; } .dv-filter select { flex: 0 0 auto; }
.dv-table td .hint { display: block; } .dv-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dv-card header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; } .dv-card h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dv-card h3 svg { width: 18px; height: 18px; }
.dv-issues { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; } .dv-issues p { margin: 2px 0 0; }
.dv-fix { margin: 4px 0 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, #e0a21a 12%, transparent); }
.dv-dns { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .dv-dns li { display: flex; gap: 10px; align-items: flex-start; } .dv-dns p { margin: 2px 0 0; overflow-wrap: anywhere; }
.dv-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; font-weight: 800; font-size: .8rem; color: #fff; background: #d64545; } .dv-dns li.ok .dv-dot, .dv-dot.ok { background: #2f9e57; }
.dv-dom-sum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .dv-dom-sum li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dev-pill { border-bottom-color: #d64545 !important; }
#home-devices h2 { display: flex; align-items: center; gap: 8px; } #home-devices h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; } #home-devices h2 svg { width: 18px; height: 18px; }

/* Staff Adoption */
.ado-progress p { margin: 8px 0 0; } .ado-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.ado-set { display: flex; flex-direction: column; gap: 12px; } .ado-inline { display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 6px !important; font-weight: 500 !important; } .ado-inline input { width: 70px; }
.ado-table td .hint { display: block; }

/* Policies and HR requests */
.pol-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .pol-list li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); } .pol-list li:first-child { border-top: 0; }
.pol-list a { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; } .pol-list a:hover b { text-decoration: underline; }
.pol-summary { font-size: 1.05rem; } .pol-body { white-space: pre-wrap; line-height: 1.6; } .pol-ack { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; border-left: 4px solid #e0a21a; } .pol-ack.done { border-left-color: #2f9e57; }
.pol-form { display: flex; flex-direction: column; gap: 12px; } .pol-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 640px) { .pol-row { grid-template-columns: 1fr; } }
.pol-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pol-acks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; } .pol-acks ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 640px) { .pol-acks { grid-template-columns: 1fr; } }
.hr-ask { display: flex; flex-direction: column; gap: 12px; } .hr-manage { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; } .hr-manage label { display: flex; flex-direction: column; gap: 4px; }
.hr-details { white-space: pre-wrap; margin: 0; } .hr-notes { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hr-notes li { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); } .hr-notes li p { margin: 4px 0 0; white-space: pre-wrap; }
.hr-notes li.internal { background: color-mix(in srgb, #e0a21a 10%, transparent); border-style: dashed; } .hr-notes li.event { font-size: .88rem; opacity: .85; }
.hr-reply textarea { width: 100%; } .hr-reply .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.hr-tabs { margin-bottom: 12px; } .hr-table td a { color: inherit; text-decoration: none; } .hr-table td a:hover span { text-decoration: underline; }
#hr-dash-extra h2 { display: flex; align-items: center; gap: 8px; } #hr-dash-extra h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; } .hr-dash-grid { margin-top: 14px; } .hr-dash-grid h3 { font-size: .95rem; margin: 0 0 8px; }
.hr-tabs { display: flex; gap: 6px; flex-wrap: wrap; } .hr-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.hr-tabs a.on { background: var(--moon, #f2b000); border-color: var(--moon, #f2b000); color: #0d1747; } .hr-tabs a:hover:not(.on) { border-color: var(--moon, #f2b000); }
.hr-dash-grid .dv-bar { grid-template-columns: minmax(0, 190px) 1fr auto; }

/* Shifts */
.sh-form { display: flex; flex-direction: column; gap: 12px; } .sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; } .sh-grid label { display: flex; flex-direction: column; gap: 4px; }
.sh-grid input[type=color] { height: 38px; padding: 2px; } .sh-days { display: flex; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.sh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; } .sh-card { border-left: 5px solid #5b6bd6; margin: 0; } .sh-card h3 { margin: 0 0 4px; } .sh-time { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; }
.sh-assign .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .sh-dept { display: flex; align-items: center; gap: 6px; }
.sh-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; } .ro-table td .hint { display: block; }
.my-shift { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; border-left: 5px solid #5b6bd6; } .my-shift p { margin: 4px 0 0; }

/* System & Usage: Domain Status (green all good, amber records to fix, red not verified) */
#sys-domains h2 { display: flex; align-items: center; gap: 8px; } #sys-domains h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; }
.sd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sd-item { border: 1px solid var(--line); border-left: 5px solid #2f9e57; border-radius: 12px; padding: 10px 14px; }
.sd-item.sd-amber { border-left-color: #e0a21a; } .sd-item.sd-red { border-left-color: #d64545; }
.sd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .sd-state { margin-left: auto; font-weight: 700; font-size: .9rem; }
.sd-green .sd-state { color: #2f9e57; } .sd-amber .sd-state { color: #c98a0a; } .sd-red .sd-state { color: #e05a5a; }
.sd-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.sd-dot.sd-green { background: #2f9e57; } .sd-dot.sd-amber { background: #e0a21a; } .sd-dot.sd-red { background: #d64545; }
.sd-tiles { margin-bottom: 12px; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); } .sd-tile .sd-tile-name { color: var(--ink); font-weight: 600; font-size: .92rem; overflow-wrap: break-word; }
.sd-issue { margin-top: 8px; } .sd-issue .hint { overflow-wrap: anywhere; } .sd-ok { margin: 8px 0 0; color: #2f9e57; font-size: .88rem; }

/* meetings: green until 15 min before, amber until the start, red once started, grey when ended */
.md-meeting[data-mstart] { border-left: 4px solid #2f9e57; } .md-meeting.mt-amber { border-left-color: #e0a21a; } .md-meeting.mt-red { border-left-color: #d64545; } .md-meeting.mt-done { opacity: .6; border-left-color: var(--line); }
.mt-label { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; width: fit-content; }
.mt-green .mt-label { background: color-mix(in srgb, #2f9e57 20%, transparent); color: #2f9e57; } .mt-amber .mt-label { background: color-mix(in srgb, #e0a21a 22%, transparent); color: #c98a0a; }
.mt-red .mt-label { background: color-mix(in srgb, #d64545 20%, transparent); color: #e05a5a; } .mt-done .mt-label { background: var(--line); color: var(--ink); }
#notify-panel li.meeting.mt-green { border-left: 4px solid #2f9e57; } #notify-panel li.meeting.mt-amber { border-left: 4px solid #e0a21a; } #notify-panel li.meeting.mt-red { border-left: 4px solid #d64545; }
.md-txt .mt-label:empty { display: none; }
.meeting-banner.mt-green { border-left-color: #2f9e57; } .meeting-banner.mt-amber { border-left-color: #e0a21a; } .meeting-banner.mt-red { border-left-color: #d64545; }
.meeting-banner .mt-label { margin-top: 3px; }
/* 🚀 Getting Started: just left of the bell (the bell is pinned 168px from the right, 38px wide) */
.gs-btn.bell-btn { right: 214px; font-size: 1.05rem; line-height: 1; } .gs-btn span { display: block; }
@media (max-width: 760px) { .gs-btn.bell-btn { right: auto; margin-left: auto; } .gs-btn.bell-btn + .bell-btn { margin-left: 6px; } }

/* Inventory → People */
.pp-table td .hint { display: block; } .pp-risk { border-left: 5px solid #e0a21a; } .pp-risk.pp-high { border-left-color: #d64545; } .pp-risk.pp-low { border-left-color: #e8c45a; }
.dv-dot.warn { background: #e0a21a; }

/* Domains as tiles (Inventory Dashboard, Domains tab) */
.dom-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; } .dom-tiles.detail { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.dom-tile { border: 1px solid var(--line); border-left: 5px solid #2f9e57; border-radius: 14px; padding: 12px 14px; background: var(--surface, transparent); min-width: 0; }
.dom-tile.sd-amber { border-left-color: #e0a21a; } .dom-tile.sd-red { border-left-color: #d64545; }
.dom-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dom-name { overflow-wrap: anywhere; } .dom-refresh { margin-left: auto; }
.dom-state { margin: 6px 0 2px; font-weight: 700; } .dom-tile.sd-green .dom-state { color: #2f9e57; } .dom-tile.sd-amber .dom-state { color: #c98a0a; } .dom-tile.sd-red .dom-state { color: #e05a5a; }
.dom-tile .hint { margin: 0; } .dom-tile .sd-issue .hint { display: inline; }
#sys-domains .dom-refresh { margin-left: 8px; }

/* Dismiss a meeting reminder */
#notify-panel li.meeting { position: relative; } .np-dismiss { position: absolute; right: 10px; bottom: 8px; z-index: 1; }
.meeting-banner .mb-close { flex: none; }

/* My Devices: a health tile per device */
.dh-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; } .dh-tile { margin: 0; border-left: 5px solid #2f9e57; } .dh-tile.dh-warn { border-left-color: #e0a21a; } .dh-tile.dh-bad { border-left-color: #d64545; }
.dh-head { display: flex; align-items: flex-start; gap: 10px; } .dh-head h3 { margin: 0; } .dh-head p { margin: 2px 0 0; } .dh-head .dv-chip { margin-left: auto; }
.dh-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--moon, #f2b000) 18%, transparent); flex: none; } .dh-ico svg { width: 22px; height: 22px; }
.dh-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 12px 0 0; } .dh-facts dt { font-size: .78rem; color: var(--muted, #8a90b0); } .dh-facts dd { margin: 2px 0 0; font-weight: 600; } .dh-facts dd .hint { display: block; font-weight: 400; }
.dh-wide { grid-column: 1 / -1; } .dh-store i { background: #5b6bd6; } .dh-store.low i { background: #d64545; } .dh-store { background: var(--line); }
.dh-fix { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #d64545 10%, transparent); } .dh-warn .dh-fix { background: color-mix(in srgb, #e0a21a 12%, transparent); }
.req-dev + .req-dev { margin-top: 6px; }
.td-person h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .td-person h2 .hint { font-weight: 400; font-size: .85rem; }
.dev-pick { display: flex; flex-direction: column; gap: 4px; } .md-dev { border-left: 4px solid #2f9e57; } .md-dev.dh-warn { border-left-color: #e0a21a; } .md-dev.dh-bad { border-left-color: #d64545; }
#home-mydev h2 { display: flex; align-items: center; gap: 8px; } #home-mydev h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; } #home-mydev h2 svg { width: 18px; height: 18px; }

/* 🌐 Language */
.lang-btn { position: fixed; top: calc(14px + var(--tm, 0px)); right: 214px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 10px rgba(20, 28, 70, .10); }
.lang-btn svg { width: 18px; height: 18px; } .lang-btn:hover { border-color: var(--muted); }
.lang-menu { position: fixed; z-index: 130; min-width: 220px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgba(10,14,40,.35); display: flex; flex-direction: column; gap: 2px; }
.lang-menu button { text-align: left; padding: 9px 12px; border-radius: 9px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; } .lang-menu button:hover, .lang-menu button:focus-visible { background: var(--line); }
.lang-menu button[aria-checked="true"] { color: var(--moon, #f2b000); } .lang-menu .hint { margin: 6px 8px 2px; max-width: 240px; font-size: .78rem; }
@media (max-width: 760px) { .lang-btn { position: relative; top: auto; right: auto; order: 2; height: 34px; padding: 0 9px; border-color: rgba(255,255,255,.25); background: transparent; color: #fff; box-shadow: none; } }

/* Notifications page; check-in guide */
.nf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } .nf-list li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.nf-list li.unread { border-left: 4px solid var(--moon, #f2b000); } .nf-list li.persistent { border-left-color: #e0a21a; } .nf-list li.meeting.mt-amber, .nf-list li.mt-amber { border-left: 4px solid #e0a21a; } .nf-list li.mt-red { border-left: 4px solid #d64545; } .nf-list li.mt-green { border-left: 4px solid #2f9e57; }
.nf-list li a { flex: 1; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; min-width: 0; } .nf-list li a:hover b { text-decoration: underline; }
.cg-steps { padding: 4px 20px 8px; } .cg-steps ol { padding-left: 20px; line-height: 1.7; }

/* System & Usage: the health checks as tiles (green edge OK, amber needs attention) */
.sys-checks { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 16px; }
.sys-checks li { display: grid !important; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; align-items: start !important; gap: 4px 10px; min-height: 108px;
  padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #2f9e57; border-radius: 14px; background: var(--surface, transparent); }
.sys-checks li.sys-amber { border-left-color: #e0a21a; }
.sys-checks li .sys-dot { grid-row: 1; grid-column: 1; margin-top: 4px; } .sys-checks li > b { grid-row: 1; grid-column: 2; min-width: 0 !important; }
.sys-checks li .sys-state { grid-row: 2; grid-column: 1 / -1; font-size: .88rem; overflow-wrap: anywhere; }
.sys-checks li .sys-fix, .sys-checks li .hint { grid-row: 3; grid-column: 1 / -1; justify-self: start; margin: 0; font-size: .86rem; }
@media (max-width: 520px) { .sys-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .sys-checks li { min-height: 96px; padding: 10px; } .sys-checks li > b { font-size: .9rem; } }

/* System & Usage: health checks as tiles (green fine, amber needs attention) */
.sys-checks.sc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 16px 0 0; }
.sc-tiles .sc-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #2f9e57; border-radius: 14px; background: var(--surface, transparent); min-width: 0; }
.sc-tiles .sc-tile.sys-amber { border-left-color: #e0a21a; } .sc-head { display: flex; align-items: center; gap: 8px; } .sc-head b { font-size: .95rem; }
.sc-tiles .sys-state { font-size: .85rem; overflow-wrap: anywhere; } .sc-act { margin-top: auto; } .sc-act .sys-fix { margin-left: 0; }

/* Inventory: device tiles for IT */
.it-tile[hidden] { display: none; } .it-tile .dh-tile { height: 100%; display: flex; flex-direction: column; } .it-owner { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; } .it-owner svg { width: 15px; height: 15px; }
.it-acts { margin-top: auto; padding-top: 12px; } .it-acts .dv-acts { justify-content: flex-start; } #dv-count { align-self: center; }

/* Staff Adoption: email templates */
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } @media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-preview { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; color: #1d2433; } .tpl-subj { margin: 0 0 8px; font-weight: 700; color: #1c2e93; border-bottom: 1px solid #e3e6ef; padding-bottom: 8px; }
.tpl-mail p { margin: 0 0 10px; } .tpl-mail a { display: inline-block; background: #1c2e93; color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; } .tpl-mail ul { margin: 0 0 10px; }
.ado-sendto .hint { display: block; } .tpl-save { margin: 0 0 12px; }
.td-dash { margin-bottom: 14px; } #co-devices h2, #my-team-dev h2 { display: flex; align-items: center; gap: 8px; } #co-devices h2 svg, #my-team-dev h2 svg { width: 18px; height: 18px; } #my-team-dev h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; } #co-devices h3 { font-size: .95rem; margin: 0 0 8px; }
.tpl-form label { display: flex; flex-direction: column; gap: 4px; } .tpl-form input, .tpl-form textarea, #tpl-sig { width: 100%; box-sizing: border-box; } .tpl-form label + label { margin-top: 10px; }
/* 🚀 Getting Started sits next to the bell; the 🌐 language button moves one place left so it never covers it */
@media (min-width: 761px) { .gs-btn ~ .lang-btn { right: 260px; } }
/* 🚀 Getting Started sits where the language button goes: when it shows, the language button moves one place left */
.gs-btn ~ .lang-btn { right: 260px; }
@media (max-width: 760px) { .gs-btn ~ .lang-btn { right: auto; } }

/* Devices: simple tiles with compliance and Windows update tags; the Tiles/List switch */
.sdv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; } .sdv-tile[hidden], .it-tile[hidden], #dv-items tr[hidden] { display: none; }
.sdv-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid #2f9e57; border-radius: 14px; background: var(--surface, transparent); min-width: 0; }
.sdv-tile.sdv-warn { border-left-color: #e0a21a; } .sdv-tile.sdv-bad { border-left-color: #d64545; }
.sdv-head { display: flex; gap: 10px; align-items: flex-start; } .sdv-head h3 { margin: 0; font-size: 1rem; } .sdv-head p { margin: 2px 0 0; }
.sdv-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; } .sdv-facts dt { font-size: .75rem; color: var(--muted, #8a90b0); } .sdv-facts dd { margin: 1px 0 0; font-weight: 600; overflow-wrap: anywhere; } .sdv-facts dd .hint { display: block; font-weight: 400; }
.sdv-tags { display: flex; flex-wrap: wrap; gap: 6px; } .sdv-why { margin: 0; font-size: .85rem; } .sdv-tile .it-acts { margin-top: auto; padding-top: 4px; }
.win-chip { white-space: nowrap; } .dv-viewbar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; } .seg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.seg button svg { width: 15px; height: 15px; } .seg button[aria-pressed="true"] { background: var(--moon, #f2b000); color: #1d2433; }
.tpl-frame { width: 100%; height: 520px; border: 0; background: #fff; display: block; } .tpl-signame input { max-width: 420px; }
.tpl-grid { grid-template-columns: 1fr !important; } .tpl-frame { height: 640px; } /* the preview below the editor, wide enough for the 640 px signature */

/* Windows Updates: chart beside a wide table; one-row filters */
.wu-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; } @media (max-width: 900px) { .wu-grid { grid-template-columns: 1fr; } }
.wu-grid .panel { margin: 0; } .dv-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.dv-filter input[type="search"] { flex: 1 1 260px; width: auto; min-width: 0; } .dv-filter select { flex: 0 0 auto; width: auto; max-width: 100%; }
.sdv-why { overflow-wrap: anywhere; }

/* Notices in the top bar; pages start below the top bar so nothing is hidden under it */
.celebrate-pills .bday-pill { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.celebrate-pills.compact .bday-pill { padding: 0 10px; } .celebrate-pills.compact .bday-pill span:last-child { display: none; }
.celebrate-pills.below { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 24px); }
@media (min-width: 761px) { .view { padding-top: 76px; } }

/* Windows Updates: one row per version, with a split bar and labelled counts */
.wu-vers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wu-vers li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.wu-v-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .wu-v-head .wu-v-n { margin-left: auto; font-weight: 700; }
.wu-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 10px 0 8px; } .wu-bar i { display: block; height: 100%; }
.wu-bar .wu-up_to_date, .wu-l.wu-up_to_date::before { background: #2f9e57; } .wu-bar .wu-behind, .wu-l.wu-behind::before { background: #e0a21a; }
.wu-bar .wu-unsupported, .wu-l.wu-unsupported::before { background: #d64545; } .wu-bar .wu-stale, .wu-l.wu-stale::before { background: #8a90b0; }
.wu-legend { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; } .wu-l { display: inline-flex; align-items: center; gap: 6px; } .wu-l::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Tiles / Grid / List views ---------- */
.vw-bar { display: flex; justify-content: flex-end; margin: 0 0 10px; } .vw-bar .seg button span { display: inline; } @media (max-width: 600px) { .vw-bar .seg button span { display: none; } }
/* System & Usage health checks */
.sc-tiles.vw-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; } .sc-tiles.vw-grid .sc-tile { padding: 9px 11px; gap: 4px; } .sc-tiles.vw-grid .sys-state { font-size: .78rem; } .sc-tiles.vw-grid .sc-head b { font-size: .85rem; }
.sc-tiles.vw-list { grid-template-columns: 1fr; gap: 6px; } .sc-tiles.vw-list .sc-tile { flex-direction: row; align-items: center; gap: 14px; padding: 8px 14px; }
.sc-tiles.vw-list .sc-head { flex: 0 0 220px; } .sc-tiles.vw-list .sys-state { flex: 1; } .sc-tiles.vw-list .sc-act { margin: 0; }
/* domain tiles */
.dom-tiles.vw-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } .dom-tiles.vw-grid .sd-issue, .dom-tiles.vw-grid .sd-ok, .dom-tiles.vw-grid .dv-fix { display: none; }
.dom-tiles.vw-list { grid-template-columns: 1fr; gap: 6px; } .dom-tiles.vw-list .sd-issue, .dom-tiles.vw-list .sd-ok, .dom-tiles.vw-list .dv-fix { display: none; } .dom-tiles.vw-list .dom-tile { padding: 8px 14px; }
/* device cards */
.sdv-tiles.vw-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; } .sdv-tiles.vw-grid .sdv-tile { padding: 10px 12px; gap: 6px; }
.sdv-tiles.vw-grid .sdv-facts { grid-template-columns: 1fr; } .sdv-tiles.vw-grid .sdv-facts > div:nth-child(n+2), .sdv-tiles.vw-grid .sdv-why, .sdv-tiles.vw-grid .it-acts, .sdv-tiles.vw-grid .dh-ico, .sdv-tiles.vw-grid .sdv-facts dd .hint { display: none; }
.sdv-tiles.vw-list { grid-template-columns: 1fr; gap: 6px; } .sdv-tiles.vw-list .sdv-tile { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 3fr) auto; align-items: center; gap: 6px 14px; padding: 8px 14px; }
.sdv-tiles.vw-list .sdv-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sdv-tiles.vw-list .sdv-facts dt, .sdv-tiles.vw-list .dh-ico { display: none; }
.sdv-tiles.vw-list .sdv-why { grid-column: 2 / -1; } .sdv-tiles.vw-list .it-acts { grid-column: 1 / -1; padding: 0; } .sdv-tiles.vw-list .sdv-tags { justify-content: flex-end; }
@media (max-width: 900px) { .sdv-tiles.vw-list .sdv-tile { grid-template-columns: 1fr; } .sdv-tiles.vw-list .sdv-facts { grid-template-columns: 1fr 1fr; } .sdv-tiles.vw-list .sdv-tags { justify-content: flex-start; } }
/* Team Devices */
.dh-tiles.vw-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } .dh-tiles.vw-grid .dh-facts, .dh-tiles.vw-grid .dh-fix { display: none; }
.dh-tiles.vw-list { grid-template-columns: 1fr; gap: 6px; } .dh-tiles.vw-list .dh-tile { padding: 8px 14px; } .dh-tiles.vw-list .dh-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; } .dh-tiles.vw-list .dh-wide, .dh-tiles.vw-list .dh-fix { display: none; }
.sc-tiles .sc-head b { min-width: 0; } .sc-tiles .sc-tile > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
/* the switchable health tiles: their own layout in each view (overrides the older two-column tile rule) */
.sys-checks.sc-tiles > li.sc-tile { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 6px; min-height: 0; }
.sys-checks.sc-tiles > li.sc-tile .sc-act { margin-top: auto; }
.sys-checks.sc-tiles.vw-grid > li.sc-tile { padding: 9px 11px; gap: 4px; }
.sys-checks.sc-tiles.vw-list > li.sc-tile { flex-direction: row; align-items: center !important; gap: 14px; padding: 8px 14px; }
.sys-checks.sc-tiles.vw-list > li.sc-tile .sc-head { flex: 0 0 210px; } .sys-checks.sc-tiles.vw-list > li.sc-tile .sys-state { flex: 1 1 auto; } .sys-checks.sc-tiles.vw-list > li.sc-tile .sc-act { margin: 0; flex: 0 0 auto; }
@media (max-width: 600px) { .sys-checks.sc-tiles.vw-list > li.sc-tile { flex-wrap: wrap; } .sys-checks.sc-tiles.vw-list > li.sc-tile .sc-head { flex-basis: 100%; } }

/* By Windows Version: each row opens its devices */
.wu-row { padding: 0 !important; } .wu-v-btn { padding: 12px 14px; cursor: pointer; border-radius: 12px; } .wu-v-btn:hover { background: color-mix(in srgb, var(--line) 50%, transparent); }
.wu-v-btn:focus-visible { outline: 2px solid var(--moon, #f2b000); outline-offset: 2px; } .wu-more { display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 700; text-decoration: underline; }
.wu-v-btn[aria-expanded="true"] .wu-more span { display: inline-block; transform: rotate(180deg); }
.wu-detail { padding: 4px 14px 14px; border-top: 1px solid var(--line); } .wu-g { margin: 12px 0 6px; font-size: .9rem; } .wu-g-behind { color: #e0a21a; } .wu-g-unsupported { color: #e05a5a; } .wu-g-up_to_date { color: #2f9e57; }

/* List rows adapt to the space they're in (not the screen): one line where there's room, stacked where it's narrow */
.sdv-tiles { container-type: inline-size; }
.sdv-tiles.vw-list .sdv-facts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
@container (max-width: 820px) {
  .sdv-tiles.vw-list .sdv-tile { grid-template-columns: 1fr; gap: 6px; }
  .sdv-tiles.vw-list .sdv-tags { justify-content: flex-start; }
  .sdv-tiles.vw-list .sdv-why { grid-column: 1; }
}

/* All Employees / Not Signed In: Tiles and Grid are cards; List is the table */
#pp-items.vw-list .pp-cards, #pp-items:not(.vw-list) .table-wrap { display: none; }
.pp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } .pp-card[hidden] { display: none; }
.pp-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid #5b6bd6; border-radius: 14px; background: var(--surface, transparent); min-width: 0; }
.pp-card.pp-off { border-left-color: var(--line); opacity: .8; } .pp-head { display: flex; gap: 10px; align-items: center; min-width: 0; } .pp-head h3 { margin: 0; font-size: 1rem; } .pp-head p { margin: 1px 0 0; overflow-wrap: anywhere; }
.pp-av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; font-weight: 800; font-size: .85rem; background: color-mix(in srgb, var(--moon, #f2b000) 22%, transparent); color: var(--ink); }
.pp-role { margin: 0; } .pp-tags { display: flex; flex-wrap: wrap; gap: 6px; } .pp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; } .pp-facts dt { font-size: .75rem; color: var(--muted, #8a90b0); } .pp-facts dd { margin: 1px 0 0; font-weight: 600; }
.pp-foot { margin-top: auto; }
#pp-items.vw-grid .pp-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; } #pp-items.vw-grid .pp-card { padding: 10px 12px; gap: 6px; }
#pp-items.vw-grid .pp-role, #pp-items.vw-grid .pp-facts, #pp-items.vw-grid .pp-foot, #pp-items.vw-grid .pp-av { display: none; } #pp-items.vw-grid .pp-head h3 { font-size: .9rem; }

/* System & Usage: ↻ per health tile; the Cloudflare check results */
.sc-head { position: relative; } .sc-refresh { margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; opacity: .75; }
.sc-refresh:hover, .sc-refresh:focus-visible { opacity: 1; border-color: var(--muted, #8a90b0); } .sc-refresh.spin { animation: sc-spin .8s linear infinite; } @keyframes sc-spin { to { transform: rotate(360deg); } }
.sc-tile.sc-flash { box-shadow: 0 0 0 2px var(--moon, #f2b000); transition: box-shadow .3s; }
.fg-checks { list-style: none; padding: 0; margin: 6px 0; } .fg-checks li { margin: 3px 0; font-weight: 600; } .fg-checks li.ok { color: #2f9e57; } .fg-checks li.bad { color: #e05a5a; }
.fg-steps ul { margin: 6px 0; padding-left: 18px; }

/* Windows Updates: the latest monthly update and the next Patch Tuesday */
.wu-latest { display: flex; flex-wrap: wrap; gap: 14px 40px; } .wu-latest > div { display: flex; flex-direction: column; gap: 2px; } .wu-latest b { font-size: 1.2rem; }
.wu-v-head .dv-chip { margin-left: 4px; }

/* Security: Defender incidents */
.inc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; } .inc-tile[hidden] { display: none; }
.inc-tile { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid #8a90b0; border-radius: 14px; background: var(--surface, transparent); min-width: 0; }
.inc-tile.inc-high { border-left-color: #d64545; } .inc-tile.inc-medium { border-left-color: #e0a21a; } .inc-tile.inc-done { opacity: .75; }
.inc-head { display: flex; gap: 10px; align-items: flex-start; } .inc-head h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; } .inc-head p { margin: 2px 0 0; } .inc-foot { margin-top: auto; }
.inc-tiles.vw-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; } .inc-tiles.vw-grid .inc-tile { padding: 10px 12px; } .inc-tiles.vw-grid .dh-ico, .inc-tiles.vw-grid .inc-foot { display: none; }
.inc-tiles.vw-list { grid-template-columns: 1fr; gap: 6px; } .inc-tiles.vw-list .inc-tile { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 14px; } .inc-tiles.vw-list .inc-head { flex: 1 1 320px; } .inc-tiles.vw-list .inc-foot { margin: 0; }
#home-sec h2 { display: flex; align-items: center; gap: 8px; } #home-sec h2 svg { width: 18px; height: 18px; } #home-sec h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; }

/* Security: the tiles filter the incidents */
.inc-filters button.dv-tile { font: inherit; color: inherit; text-align: left; cursor: pointer; } .inc-filters button.dv-tile:hover { border-color: var(--muted, #8a90b0); }
.inc-filters button.dv-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--moon, #f2b000); } .inc-filters button.dv-tile:focus-visible { outline: 2px solid var(--moon, #f2b000); outline-offset: 2px; }
.dv-tiles.inc-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 10px; } .inc-filters .dv-tile { min-width: 0; }

/* 🚀 Getting Started: choose the first login experience or the steps */
.gs-choice { border: 1px solid var(--line); border-radius: 18px; background: var(--surface, #1d2148); color: var(--ink); padding: 22px 24px; max-width: 520px; width: calc(100vw - 32px); }
.gs-choice::backdrop { background: rgba(8, 10, 30, .55); } .gs-choice h2 { margin: 0 0 4px; } .gs-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.gs-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.gs-opt:hover, .gs-opt:focus-visible { border-color: var(--moon, #f2b000); outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--moon, #f2b000) 40%, transparent); } .gs-ic { font-size: 1.5rem; }
@media (max-width: 520px) { .gs-opts { grid-template-columns: 1fr; } }
.sdv-tile.sdv-muted { border-left-color: var(--line); } .up-chip { display: inline-block; margin-top: 4px; }

/* Inventory: bars and the encryption meter open their detail views; group filter tiles */
a.dv-bar-link { color: inherit; text-decoration: none; border-radius: 8px; } a.dv-bar-link:hover .dv-bar-l, a.dv-bar-link:focus-visible .dv-bar-l { text-decoration: underline; } a.dv-bar-link:focus-visible { outline: 2px solid var(--moon, #f2b000); outline-offset: 2px; }
a.dv-meter-link { display: block; } .grp-filters button.dv-tile { font: inherit; color: inherit; text-align: left; cursor: pointer; } .grp-filters button.dv-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--moon, #f2b000); }
.grp-sec[hidden], .grp-sec .sdv-tile[hidden] { display: none; } .grp-sec h2 { font-size: 1rem; }

/* Inventory dashboard: every figure opens its detail */
.dv-leg-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; }
.dv-leg-link:hover, .dv-leg-link:focus-visible { background: color-mix(in srgb, var(--line) 60%, transparent); text-decoration: underline; }
#dv-body .dom-tile[data-detail="0"] { cursor: pointer; } #dv-body .dom-tile[data-detail="0"]:hover { border-color: var(--muted, #8a90b0); } .dom-tile.sc-flash { box-shadow: 0 0 0 2px var(--moon, #f2b000); }
.ev-table .dep-row-actions.ev-rm-col { width: 44px; padding: 0 2px; text-align: center; } .ev-table td:nth-child(6) select { width: 100%; min-width: 0; }

/* Onboarding & Offboarding */
.lc-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; } .lc-case { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid #2f9e57; border-radius: 14px; color: inherit; text-decoration: none; background: var(--surface, transparent); }
.lc-case.lc-offboarding { border-left-color: #e0a21a; } .lc-case:hover { border-color: var(--muted, #8a90b0); } .lc-case h3 { margin: 0; font-size: 1.05rem; } .lc-case p { margin: 0; } .lc-case .dv-chip { align-self: flex-start; }
.lc-prog { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--line) 80%, transparent); overflow: hidden; } .lc-prog i { display: block; height: 100%; background: #2f9e57; border-radius: 99px; }
.lc-tasks, .lc-tpl { list-style: none; padding: 0; margin: 0; } .lc-tasks li, .lc-tpl li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); } .lc-tasks li > label { flex: 1 1 260px; }
.lc-tasks li.done label { text-decoration: line-through; opacity: .75; } .lc-assign { display: inline-flex; gap: 6px; } .lc-assign input { width: 220px; }
.lc-form { display: flex; flex-direction: column; gap: 12px; max-width: 820px; } .lc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } .lc-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.lc-results { display: flex; flex-wrap: wrap; gap: 6px; } .lc-picked { margin: 0; } .lc-x { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; } .lc-x input[data-xtitle], #lc-ntitle { flex: 1 1 260px; } .lc-notes { white-space: pre-wrap; }
.lc-mine h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.05rem; } .lc-mine h2 a { margin-left: auto; font-weight: 500; font-size: .85rem; }
.ws-switch.ws-grid a.ws-wide { grid-column: 1 / -1; } /* Onboarding & Offboarding: the last app, across both columns */
.lc-doc { flex: 1 1 260px; } .lc-pick h3 { margin: 0 0 4px; } .lc-mine h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1rem; margin: 10px 0 4px; } .lc-mine h3 a { margin-left: auto; font-weight: 500; font-size: .85rem; }
.tt label { display: block; margin: 8px 0; } .tt input, .tt textarea, #tt-sig { width: 100%; } .tt .tpl-frame { width: 100%; min-height: 380px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.lc-team { margin: 4px 0 12px; } .lc-team h4 { margin: 12px 0 2px; font-size: .9rem; text-transform: none; color: var(--muted, #9aa0c0); }

/* Policies: full-width Title and Summary; the document previewed on the page */
.pol-form > label:not(.check) { display: flex; flex-direction: column; gap: 6px; } .pol-form > label:not(.check) > input { width: 100%; }
.pol-doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; } .pol-doc-head h2 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; } .pol-doc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pol-pdf { width: 100%; height: min(78vh, 900px); margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* HR dashboard: acknowledgments per document */
.pol-ack-list { list-style: none; margin: 0; padding: 0; } .pol-ack-list li { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(120px, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pol-ack-list a { color: inherit; text-decoration: none; } .pol-ack-list a:hover b { text-decoration: underline; } .pol-ack-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--line) 80%, transparent); overflow: hidden; } .pol-ack-bar i { display: block; height: 100%; background: #2f9e57; }
.pol-ack-n { white-space: nowrap; } #hr-pol-acks h2 a { margin-left: 10px; font-weight: 500; font-size: .85rem; }
@media (max-width: 640px) { .pol-ack-list li { grid-template-columns: 1fr; } }
.dv-tile > span { overflow-wrap: anywhere; hyphens: auto; } /* long labels (Policy acknowledgements) stay inside the tile */

/* Start / Stop timer on a request */
.time-head-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; } .tl-timer { display: inline-flex; align-items: center; gap: 8px; }
.tl-run { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; } .tl-run i { width: 9px; height: 9px; border-radius: 50%; background: #e05a5a; animation: tl-blink 1.2s infinite; }
@keyframes tl-blink { 50% { opacity: .25; } } @media (prefers-reduced-motion: reduce) { .tl-run i { animation: none; } }
.sla.sla-idle { opacity: .8; }
.tl-s-wide { flex: 2 1 260px; }
.pol-rep-q { width: 100%; margin: 6px 0 10px; } .pol-rep-list { max-height: 420px; overflow-y: auto; } .pol-rep-list li[hidden] { display: none; } #pol-rep-refresh { margin-left: 8px; }

/* Session feedback (DLC-ISMS-FRM-08) */
.fb-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; } .fb-form legend { font-weight: 700; padding: 0 6px; }
.fb-form label:not(.check) { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; } .fb-q { margin: 8px 0 4px; font-weight: 600; } .fb-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fb-list { margin: 0; padding-left: 20px; } .fb-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.fb-scale { display: inline-flex; gap: 4px; } .fb-scale label { position: relative; } .fb-scale input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.fb-scale span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; font-weight: 700; }
.fb-scale input:checked + span { background: var(--moon, #f2b000); color: #0d1747; border-color: transparent; } .fb-scale input:focus-visible + span { outline: 2px solid var(--moon, #f2b000); outline-offset: 2px; }
.fb-yn { display: inline-flex; gap: 14px; } .fb-done { border-left: 5px solid #2f9e57; } .pol-sess input { width: 100%; }
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .fb-counts { list-style: none; padding: 0; margin: 0; } .fb-counts li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.fb-comments { list-style: none; padding: 0; } .fb-comments li { padding: 8px 0; border-bottom: 1px solid var(--line); } .fb-comments p { margin: 4px 0 0; }
@media (max-width: 640px) { .fb-two { grid-template-columns: 1fr; } }
#fb-results .pol-ack-list li { grid-template-columns: minmax(0, 1fr) minmax(140px, 300px) 56px; } #fb-results .pol-ack-n { text-align: right; } /* bars line up */

/* Admin Panel → Email Signature: which emails get it */
.sg-place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; } .sg-place-grid .check { align-items: flex-start; }
.sg-place-grid .check > span { display: flex; flex-direction: column; } .sg-place-acts { display: flex; gap: 8px; margin: 4px 0 8px; }

/* Limit Sign-in for Testing */
.lim-panel.on { border-left: 5px solid #e0a020; } .lim-panel label:not(.check) { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; } .lim-panel textarea { width: 100%; }
.tm-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: 28px; line-height: 28px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: #e0a020; color: #0d1747; text-align: center; font-weight: 700; font-size: .85rem; padding: 0 10px; }
/* while the banner shows, everything pinned to the top sits below it */
body.tm-on { --tm: 28px; padding-top: 28px; }
@media (min-width: 901px) { body.tm-on .rail { top: 28px; height: calc(100vh - 28px); } } /* side menu on computers only: on phones the menu is a bar across the top */
.lim-state { margin: 4px 0 10px; }
.lim-mail { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #e0a020 14%, transparent); }

/* app tiles: a count sits right after the app's name (side-menu lists keep theirs at the right edge) */
.ws-switch a .nav-count { margin-left: 2px; }
@media (max-width: 760px) {
  /* the light/dark switch in the phone's top bar, always there (compact: no label) */
  .rail > .theme-toggle, .rail.menu-open > .theme-toggle { display: inline-flex; order: 2; margin: 0 0 0 6px; padding: 4px; }
  .rail > .theme-toggle .tt-label { display: none; }
  /* the open menu isn't covered by the floating chat buttons; pages leave room for them at the bottom */
  body.menu-open-m .ai-chat-btn, body.menu-open-m .team-chat-btn, body.menu-open-m #meeting-banners { display: none !important; } /* back when the menu closes */
  .content-col { padding-bottom: 96px; }
  /* celebration and device pills: a row in the page above the content */
  #celebrate-pills.inflow { position: static; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; padding: 12px 14px 0; max-width: none; }
}

/* policy documents: tabs above one viewer; the editor's list; the staff preview */
.pol-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pol-tab { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.pol-tab.on { background: var(--moon, #ffbe12); color: #0d1747; border-color: transparent; font-weight: 600; }
.pol-files { margin: 10px 0; } .pol-files-head { margin-bottom: 6px; }
.pol-flist { list-style: none; margin: 0 0 8px; padding: 0; } .pol-flist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pol-flist .pf-title { flex: 1 1 220px; min-width: 0; } .pol-flist .pf-meta { flex: 0 1 auto; } .pol-flist .pf-acts { display: inline-flex; gap: 4px; margin-left: auto; }
.pol-prev-dlg { width: min(1000px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg, #fff); color: inherit; }
.pol-prev-dlg::backdrop { background: rgba(10, 14, 40, .6); }
.pol-prev-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 16px; background: #ffbe12; color: #0d1747; }
.pol-prev-bar .hint { color: #0d1747; opacity: .8; } .pol-prev-bar button { margin-left: auto; }
.pol-prev-body { padding: 16px 20px 24px; }
/* attendance: check the location before checking in */
.loc-before #lb-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* Admin Panel → Active Sessions */
.as-form label:not(.check) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; } .as-grace input { width: 90px; }
.as-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; } .as-acts { display: inline-flex; gap: 6px; }

/* policies by topic: Tiles, Grid or List */
.pol-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; } .pol-tools input[type=search] { flex: 1 1 260px; max-width: 420px; }
.pol-topic h2 { display: flex; align-items: baseline; gap: 8px; }
.pol-cards { display: grid; gap: 12px; }
.pol-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: var(--surface, transparent); }
.pol-card:hover { border-color: var(--moon, #ffbe12); } .pol-card[hidden] { display: none; }
.pol-card-cat { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pol-card-title { font-size: 1.02rem; } .pol-card-sum { color: var(--muted); font-size: .9rem; } .pol-card-meta { font-size: .8rem; color: var(--muted); }
.pol-card-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 6px; }
.pol-ack-mini { display: inline-flex; align-items: center; gap: 6px; } .pol-ack-mini .pol-ack-bar { width: 80px; }
.pol-cards.vw-tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } .pol-cards.vw-tiles .pol-card { min-height: 150px; }
.pol-cards.vw-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; } .pol-cards.vw-grid .pol-card { padding: 10px 12px; }
.pol-cards.vw-grid .pol-card-sum, .pol-cards.vw-grid .pol-card-meta { display: none; }
.pol-cards.vw-list { grid-template-columns: 1fr; gap: 0; } .pol-cards.vw-list .pol-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 4px; }
.pol-cards.vw-list .pol-card-cat { flex: 0 0 170px; } .pol-cards.vw-list .pol-card-title { flex: 0 1 auto; } .pol-cards.vw-list .pol-card-sum { flex: 1 1 200px; }
.pol-cards.vw-list .pol-card-state { margin: 0 0 0 auto; padding: 0; }
@media (max-width: 640px) { .pol-cards.vw-list .pol-card-cat { flex-basis: 100%; } }
/* a published policy, read-only until Edit */
.page-head .pol-head-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.pol-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 0; }
.pol-facts dt { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .pol-facts dd { margin: 2px 0 0; font-weight: 600; }
.pol-read .pol-summary { margin: 14px 0 0; }

/* leave: full day(s), half day or short leave */
.lv-kind { display: inline-flex; flex-wrap: wrap; margin: 4px 0 12px; } .lv-kind label { position: relative; }
.lv-kind input { position: absolute; opacity: 0; inset: 0; cursor: pointer; } .lv-kind span { display: inline-block; padding: 7px 14px; }
.lv-kind input:checked + span { background: var(--moon, #ffbe12); color: #0d1747; font-weight: 700; border-radius: 8px; }
.lv-kind input:focus-visible + span { outline: 2px solid var(--moon, #ffbe12); outline-offset: 2px; }
.lv-form [data-k][hidden] { display: none !important; }
.lv-dur { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; } .lv-dur legend { font-weight: 700; padding: 0 6px; }
.lv-dur-row { display: flex; flex-wrap: wrap; gap: 8px 16px; } .lv-dur-row input { width: 90px; }

/* phones: the celebration and device pills sit in the top bar beside Menu; hidden until placed (no flash over the buttons) */
@media (max-width: 760px) {
  #celebrate-pills:not(.inflow) { visibility: hidden; }
  .rail #celebrate-pills.inflow { position: static; display: inline-flex; flex-wrap: nowrap; gap: 6px; padding: 0; order: 3; margin: 0; max-width: none; }
  .rail #celebrate-pills.inflow > * { margin: 0; }
}
/* phones: the Test Mode bar is part of the page (not pinned), wraps its text, and scrolls away, so it never covers the top bar */
@media (max-width: 900px) {
  .tm-banner { position: static; height: auto; line-height: 1.35; white-space: normal; padding: 6px 12px; }
  body.tm-on { --tm: 0px; padding-top: 0; }
}

/* offboarding requests */
.ob-list { list-style: none; margin: 0; padding: 0; } .ob-req { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ob-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .ob-acts input { min-width: 180px; } .ob-form textarea { width: 100%; }
.ob-form [data-w][hidden] { display: none !important; } .lc-draft { border-left: 5px solid #e0a020; }

/* Stop: log the work as an internal note, and reply to the requester */
.tl-s-extra { display: grid; gap: 6px; margin: 4px 0 8px; } .tl-s-replybox { display: grid; gap: 6px; padding: 8px 10px; border-left: 3px solid var(--moon, #ffbe12); }
.tl-s-replybox textarea { width: 100%; } .tl-s-replybox[hidden] { display: none; }

/* ---- top sub-navigation bar: the workspace's sections, across the page ---- */
.subnav {
  display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: thin;
  position: sticky; top: calc(var(--tm, 0px)); z-index: 40;
  background: var(--surface, #fff); border-bottom: 1px solid var(--line);
  padding: 0 clamp(12px, 3vw, 28px);
}
.subnav[hidden] { display: none; }
.subnav a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 13px 14px 11px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 600;
  border-bottom: 2.5px solid transparent; transition: color .12s;
}
.subnav a:hover { color: var(--text, inherit); }
.subnav a[aria-current="page"] { color: var(--text, inherit); border-bottom-color: var(--moon, #ffbe12); }
.subnav a svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.subnav a[aria-current="page"] svg { opacity: 1; }
.subnav .nav-head { display: inline-flex; align-items: center; padding: 0 10px 0 14px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; border-left: 1px solid var(--line); margin-left: 6px; }
.subnav .nav-sep { display: none; }
.subnav .nav-count { margin-left: 2px; }
.subnav::-webkit-scrollbar { height: 6px; } .subnav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
@media (max-width: 760px) { .subnav { padding: 0 10px; } .subnav a { padding: 11px 11px 9px; font-size: .88rem; } }

/* name under the logo */
.brand-hub { display: block; font-weight: 700; letter-spacing: .01em; }
.brand-ws { display: block; opacity: .72; font-size: .84em; }

/* create user, awareness, timer-stop extras */
.cu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; } .cu-grid .cu-wide { grid-column: 1 / -1; } .cu-grid label { display: flex; flex-direction: column; gap: 4px; }
.cu-upn { font-size: .92rem; } .cu-ok { color: #1a7f4b; } .cu-taken, .cu-form .cu-taken { color: #c0392b; }
.lic-list { display: grid; gap: 6px; margin-top: 8px; } .lic-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.lic-row span { display: flex; flex-direction: column; } .lic-none { opacity: .55; }
.cu-done code, .cu-pw code { font-size: 1.1rem; font-weight: 700; letter-spacing: .03em; background: var(--surface-2, rgba(0,0,0,.05)); padding: 4px 10px; border-radius: 6px; }
.cu-pw { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.aw-start { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; } .aw-launch { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.aw-launch:hover { border-color: var(--moon, #ffbe12); } .aw-form .lv-grid { margin-top: 6px; } .aw-form [data-k][hidden] { display: none !important; }
.aw-list { list-style: none; margin: 0; padding: 0; } .aw-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.aw-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; } .aw-notebox { flex-basis: 100%; display: flex; gap: 8px; margin-top: 6px; } .aw-notebox textarea { flex: 1; }
@media (max-width: 640px) { .cu-grid, .aw-start { grid-template-columns: 1fr; } }

/* ---- 1.2.17: the workspace's sections as small tiles that wrap (no scroll bars), below the top-right controls ---- */
.subnav {
  position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  overflow: visible; scrollbar-width: none;
  margin: 60px 0 0; padding: 0 clamp(12px, 3vw, 28px) 14px;
  background: transparent; border-bottom: 1px solid var(--line);
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  min-height: 36px; padding: 6px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface, transparent);
  color: var(--muted); font-size: .86rem; font-weight: 600; text-decoration: none;
  border-bottom-width: 1px; margin: 0;
}
.subnav a:hover { color: var(--text, var(--ink)); border-color: var(--moon, #ffbe12); }
.subnav a:focus-visible { outline: 2px solid var(--moon, #ffbe12); outline-offset: 2px; }
.subnav a[aria-current="page"] { background: var(--moon, #ffbe12); border-color: var(--moon, #ffbe12); color: #0d1747; }
.subnav a[aria-current="page"] svg { opacity: 1; }
.subnav a svg { width: 15px; height: 15px; }
.subnav .nav-count { margin-left: 2px; }
.subnav .nav-head { display: inline-flex; align-items: center; min-height: 36px; margin: 0 0 0 6px; padding: 0 2px 0 12px; border-left: 1px solid var(--line); font-size: .68rem; opacity: .8; }
.subnav .nav-head:first-child { margin-left: 0; padding-left: 0; border-left: 0; }
@media (max-width: 760px) {
  /* phones: a grid of small tiles, at least 44px tall, no sideways scrolling */
  .subnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); align-items: stretch; gap: 6px; margin: 10px 0 0; padding: 0 10px 12px; }
  .subnav a { flex-direction: column; gap: 3px; min-height: 52px; min-width: 0; white-space: normal; overflow-wrap: anywhere; justify-content: center; text-align: center; line-height: 1.15; padding: 6px 4px; font-size: .76rem; }
  .subnav a svg { width: 16px; height: 16px; }
  .subnav .nav-head { grid-column: 1 / -1; min-height: 0; margin: 4px 0 -2px; padding: 0; border: 0; }
}
/* the tiles already clear the top-right controls, so the page under them needs no extra top space */
@media (min-width: 761px) { .subnav:not([hidden]) + .view { padding-top: 26px; } }
/* filter tabs (Queue, reports, etc.) wrap onto a second line instead of running off the page or scrolling sideways */
.tabs { flex-wrap: wrap; max-width: 100%; overflow: visible; }
/* 768–900px: dashboard charts and report export buttons stay inside the page */
.dash-grid > * { min-width: 0; }
.chart-box svg { max-width: 100%; height: auto; }
@media (max-width: 900px) { .panel-head { flex-wrap: wrap; } .panel-head .dash-actions { flex-wrap: wrap; } }
/* HR Portal → Celebrations: greeting emails */
.ce-opts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0 4px; }
/* side menu: "AFI Hub" and the workspace name centred under the logo */
.brand small.brand-hub, .brand small.brand-ws { text-align: center; padding-left: 0; }
.brand small.brand-ws { margin-top: 2px; }
/* phones: the slim "current section · Sections" bar that stays under the top bar after the tiles scroll away */
.subnav-mini { display: none; }
@media (max-width: 760px) {
  .subnav-mini:not([hidden]) { display: block; position: fixed; top: var(--railh, 0px); left: 0; right: 0; z-index: 39; background: var(--surface, #fff); border-bottom: 1px solid var(--line); box-shadow: 0 4px 12px rgba(10, 13, 35, .18); }
  .snm-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--text, var(--ink)); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
  .snm-cur { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .snm-cur svg { width: 16px; height: 16px; flex: none; }
  .snm-more { flex: none; color: var(--muted); font-size: .82rem; }
  .snm-btn:focus-visible { outline: 2px solid var(--moon, #ffbe12); outline-offset: -2px; }
  .snm-panel:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; padding: 4px 10px 12px; max-height: calc(100vh - var(--railh, 0px) - 60px); overflow-y: auto; }
  .snm-panel a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, transparent); color: var(--muted); font-size: .76rem; font-weight: 600; text-align: center; line-height: 1.15; text-decoration: none; overflow-wrap: anywhere; }
  .snm-panel a[aria-current="page"] { background: var(--moon, #ffbe12); border-color: var(--moon, #ffbe12); color: #0d1747; }
  .snm-panel a svg { width: 16px; height: 16px; }
  .snm-panel .nav-head { grid-column: 1 / -1; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; margin: 4px 0 -2px; }
}
/* side menu: Admin Panel last, across both columns, in its own colour (moon gold) so it stands apart from the everyday apps */
.ws-switch a.ws-admin { grid-column: 1 / -1; margin-top: 4px; background: rgba(252, 205, 13, .16); color: #fdb902; border: 1px solid rgba(252, 205, 13, .45); }
.ws-switch a.ws-admin:hover { background: rgba(252, 205, 13, .26); }
.ws-switch a.ws-admin.on { background: #fdb902; color: #0d1747; border-color: #fdb902; }
.ws-switch:not(.ws-grid) a.ws-admin { flex-basis: 100%; }
/* side menu app tiles: two equal columns that always fit the panel (long names wrap instead of pushing the right column out) */
.ws-switch.ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ws-switch a { min-width: 0; white-space: nowrap; text-align: center; line-height: 1.15; }
.ws-switch.ws-grid a:not(.ws-all):not(.ws-wide) { font-size: .76rem; padding: 7px 2px !important; letter-spacing: -.01em; }
.ws-switch a.ws-all, .ws-switch a.ws-wide { white-space: nowrap; }
/* 761–900px (tablets, narrow windows): messages and announcements stack the list above the conversation */
@media (max-width: 900px) and (min-width: 761px) { .dm { grid-template-columns: minmax(0, 1fr); } }
/* My Account → Settings */
.acc-set { display: grid; gap: 18px; max-width: 560px; }
.acc-set > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.acc-set fieldset { border: 0; padding: 0; margin: 0; } .acc-set legend { font-weight: 600; margin-bottom: 6px; }
/* All Apps: the Notifications card carries the same red count as the bell */
.start-card { position: relative; }
.start-badge { position: absolute; top: 12px; right: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #d64032; color: #fff; font-size: .78rem; font-weight: 700; line-height: 22px; text-align: center; }
.nav-count.nav-alert { background: #d64032; color: #fff; } /* the Notifications app: red, like the bell */
/* language picker: search box over a scrolling list (top-bar menu and My Account → Settings) */
.lang-menu { width: min(300px, calc(100vw - 16px)); }
.lang-find { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg, transparent); color: inherit; font: inherit; }
.lang-list { display: flex; flex-direction: column; max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.lang-list button { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 9px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.lang-list button[hidden] { display: none; }
.lang-list button:hover, .lang-list button:focus-visible { background: var(--bg-soft, rgba(127,127,127,.12)); outline: none; }
.lang-list button[aria-checked="true"] { color: var(--moon, #f2b000); }
.lang-en { font-weight: 400; font-size: .82rem; color: var(--muted); }
.lang-pick { max-width: 420px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
/* signatures: the pad, the saved signature, and the sign step on a policy */
.sigpad { display: grid; gap: 10px; max-width: 560px; }
.sig-canvas { width: 100%; aspect-ratio: 3 / 1; background: #fff; border: 1px dashed var(--line); border-radius: 12px; touch-action: none; cursor: crosshair; }
.sig-type input, .sig-up input { width: 100%; }
.sig-show { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sig-show img { height: 56px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.sig-show.big img { height: 96px; }
.pol-sign { margin: 10px 0; }
/* Completed: a Delete button on cancelled cases (HR and Super Admins) */
.lc-case-wrap { position: relative; display: flex; } .lc-case-wrap > .lc-case { flex: 1; }
.lc-del { position: absolute; top: 12px; right: 12px; z-index: 1; color: #d64032; border-color: rgba(214, 64, 50, .5); }
.lc-del:hover { background: rgba(214, 64, 50, .12); }
/* Notifications → All: cleared items, shown quietly */
.nf-list li.cleared { opacity: .62; } .nf-list li.cleared b::after { content: ' · cleared'; font-weight: 400; color: var(--muted); font-size: .82em; }
/* Awareness & Training app */
.table-scroll { overflow-x: auto; } .aw-table td, .aw-table th { white-space: nowrap; } .aw-table td:first-child { white-space: normal; min-width: 200px; }
.aw-done { list-style: none; margin: 0; padding: 0; } .aw-done li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.aw-done li .hint { flex-basis: 100%; } .aw-setup ol { margin: 8px 0; padding-left: 20px; } .aw-warn { color: var(--warn, #b7791f); }

/* contact the requester from a request */
.contact-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .contact-btns .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; } .contact-btns svg { width: 14px; height: 14px; }
/* Licence approvals */
.lr-list { list-style: none; margin: 0; padding: 0; } .lr-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lr-main { display: grid; gap: 4px; min-width: 0; flex: 1 1 320px; } .lr-acts { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.lr-set { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .lr-set label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.lic-approval-note { margin-top: 8px; }
.lr-main > .dv-chip, .lr-main > div > .dv-chip { justify-self: start; width: fit-content; }
/* Email Accounts; licences to buy */
.ma-form .cu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } .ma-form label { display: grid; gap: 6px; font-weight: 600; }
.ma-form .cu-wide { grid-column: 1 / -1; } .ma-addr { display: flex; align-items: center; gap: 6px; } .ma-addr input { flex: 1; min-width: 0; }
.ma-people { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--moon, #fdb902); } .ma-people h3 { font-size: .9rem; margin: 8px 0 4px; }
.ma-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .ma-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ma-add input { flex: 1 1 200px; }
.lic-buy { margin-top: 10px; } .lic-buy summary { cursor: pointer; font-weight: 600; }
.ma-addr input { min-width: 110px; flex: 1 1 140px; } .ma-addr select { flex: 0 1 auto; max-width: 55%; }

/* notifications on this device: the one-time offer */
.dn-offer { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 14px; background: var(--surface, #fff); color: var(--ink, #1d2433); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(20,24,60,.25); }
/* Organization structure review */
.dp-struct { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; } .dp-struct > div { flex: 1 1 360px; }
.sr-dlg { width: min(820px, calc(100vw - 24px)); max-height: 88vh; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface, #fff); color: var(--ink); }
.sr-dlg::backdrop { background: rgba(10, 13, 35, .55); }
.sr-list { list-style: none; margin: 10px 0; padding: 0; max-height: 58vh; overflow-y: auto; }
.sr-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.sr-item select { max-width: 320px; } .sr-l1 { padding-left: 24px; } .sr-l2 { padding-left: 48px; }
.dep-flash { outline: 3px solid var(--moon, #fdb902); outline-offset: 3px; }
/* Org Map → Department Plan */
.dpl-top { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dpl-box { min-width: 220px; padding: 8px 18px; border-radius: 10px; text-align: center; font-weight: 700; color: #fff; background: #1c2e93; border: 2px solid #3d4aa0; display: grid; }
.dpl-box small { font-weight: 500; opacity: .85; } .dpl-co { border-color: var(--moon, #fdb902); }
.dpl-arrow { color: var(--muted); line-height: 1; }
.dpl-count { margin: 14px 0 6px; font-weight: 700; } 
.dpl-main { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dpl-dept { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #1c2e93; color: #fff; border: 1px solid #3d4aa0; text-align: center; }
.dpl-dept small, .dpl-head, .dpl-people { font-size: .76rem; opacity: .85; } .dpl-hl { border: 2px solid var(--moon, #fdb902); }
.dpl-unit { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; } .dpl-unit h3 { margin: 0 0 4px; } .dpl-unit h3 span { font-weight: 500; color: var(--muted); font-size: .9em; }
.dpl-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.dpl-group { border-radius: 12px; border: 2px solid var(--moon, #fdb902); padding: 10px 12px; } .dpl-group h4 { margin: 0 0 4px; } .dpl-gnote { margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.dpl-fns { margin: 0; padding-left: 20px; display: grid; gap: 8px; } .dpl-fns li { display: grid; gap: 2px; } .dpl-fns li span { font-size: .8rem; color: var(--muted); }
.dpl-group .dpl-head, .dpl-fns .dpl-head, .dpl-fns .dpl-people { color: var(--muted); opacity: 1; }
.dpl-foot { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.dpl-groups { counter-reset: fn; } .dpl-fns { list-style: none; padding-left: 0; }
.dpl-fns li { position: relative; padding-left: 34px; } .dpl-fns li::before { counter-increment: fn; content: counter(fn); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--moon, #fdb902); color: #0d1747; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
/* signature preview: the signed copy itself (A4 in PDF points, scaled to fit), with a size slider */
.sig-prev { display: grid; gap: 10px; }
.sd-wrap { position: relative; width: 100%; max-width: 595px; overflow: hidden; border-radius: 4px; box-shadow: 0 8px 24px rgba(20,24,60,.18); }
.sd-page { position: absolute; top: 0; left: 0; width: 595px; height: 842px; box-sizing: border-box; padding: 50px; transform-origin: 0 0; background: #fff; color: #1d2433; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
.sd-bar { position: absolute; top: 0; left: 0; right: 0; height: 8px; background: #1a2b8a; box-shadow: 0 3px 0 #fdb902; }
.sd-logo { width: 150px; height: auto; display: block; margin: 0 0 16px; }
.sd-title { font-weight: 700; font-size: 20px; color: #1a2b8a; } .sd-sub { font-size: 9px; color: #6b7280; margin: 4px 0 14px; }
.sd-rows { width: 100%; border-collapse: collapse; font-size: 10px; } .sd-rows th { text-align: left; color: #6b7280; width: 150px; font-weight: 700; font-size: 9.5px; padding: 3px 0; vertical-align: top; }
.sd-rows td { padding: 3px 0; word-break: break-all; } .sd-rows tr { border-bottom: 0.6px solid #c9cee3; }
.sd-h { font-weight: 700; font-size: 11px; color: #1a2b8a; margin: 12px 0 5px; } .sd-st { font-size: 10px; line-height: 1.35; margin: 0; }
.sd-box { border: 0.8px solid #c9cee3; display: flex; align-items: center; padding: 0 12px; box-sizing: border-box; } .sd-sig { display: block; }
.sd-n { font-size: 9.5px; color: #6b7280; margin-top: 6px; } .sd-foot { font-size: 8.5px; color: #6b7280; margin: 18px 0 0; line-height: 1.4; }
.sd-copy { position: absolute; left: 50px; bottom: 26px; font-size: 8px; color: #6b7280; }
.sd-mark { position: absolute; right: 40px; top: 60px; transform: rotate(12deg); border: 2px solid #b42318; color: #b42318; font-weight: 700; font-size: 14px; letter-spacing: .12em; padding: 2px 8px; opacity: .65; }
.sig-size { display: flex; align-items: center; gap: 10px; font-weight: 600; } .sig-size input { flex: 0 1 260px; } .sig-size output { min-width: 3em; }

/* more departments per person; Department Access */
.ev-more { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .ev-more-pick summary { cursor: pointer; font-size: .8rem; color: var(--accent, #4a5bd4); }
.ev-more-list { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; background: var(--surface, #fff); }
.da-table th, .da-table td { white-space: nowrap; text-align: center; } .da-table .da-dep { text-align: left; white-space: normal; min-width: 200px; }
.da-all { color: var(--muted); font-size: .78rem; } .da-inh { color: var(--muted); font-size: .72rem; }
/* policies on phones: nothing wider than the screen (long links wrap; iOS sizes iframes to their content otherwise) */
#pol-one { max-width: 100%; min-width: 0; overflow-x: hidden; } #pol-one > * { max-width: 100%; min-width: 0; }
.pol-body { overflow-wrap: anywhere; word-break: break-word; } .pol-body a { color: var(--accent, #4a5bd4); }
.pol-pdf { display: block; width: 1px; min-width: 100%; max-width: 100%; }
.pol-summary, .page-head h1, .page-head .quiet { overflow-wrap: anywhere; }
.pol-video { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; } .pol-video > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }

/* department cards: sub-departments and a person's departments */
.dep-subs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; } .dep-sub { display: inline-flex; align-items: center; gap: 4px; }
.dep-sub-x { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.dep-sub-add { flex-basis: 100%; } .dep-sub-add summary { cursor: pointer; font-size: .85rem; color: var(--accent, #4a5bd4); }
.dep-sub-new { display: grid; gap: 4px; margin-top: 6px; font-size: .85rem; } .pd-main { display: grid; gap: 4px; font-weight: 600; margin: 8px 0; }

/* User Licences */
.ul-find { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .ul-find label { flex: 1 1 320px; display: grid; gap: 6px; font-weight: 600; }
.ul-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
/* Everyone list: every cell starts at the top, so the selects line up across the row */
.ev-table td { vertical-align: top; padding-top: 12px; } .ev-more { margin-top: 4px; }
/* the unsaved-changes bar sits below the top-right buttons on wide screens */
@media (min-width: 901px) { .save-bar { top: 96px; } }

/* department pickers: each department, then its sub-departments indented under it */
.dep-pick-l0 { font-weight: 600; } .dep-pick-l1 { padding-left: 18px; } .dep-pick-l2 { padding-left: 36px; font-size: .92em; } .dep-pick-l3 { padding-left: 54px; font-size: .9em; }
.dep-pick-arm { color: var(--muted); margin-right: 4px; }

/* Staff Adoption: the refresh icon (spins while it reads Microsoft 365 again) */
.ado-refresh { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.ado-refresh svg { width: 18px; height: 18px; } .ado-refresh.spin svg { animation: ado-spin .9s linear infinite; } @keyframes ado-spin { to { transform: rotate(360deg); } }
.ado-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Track the Work */
.wl-dayrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 10px; } .wl-dayrow label { display: grid; gap: 4px; font-weight: 600; }
.wl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .wl-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.wl-det { margin: 6px 0 0; white-space: pre-wrap; } .wl-note { margin: 6px 0 0; color: #d64032; font-size: .9rem; }
.wl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } .wl-grid label { display: grid; gap: 4px; font-weight: 600; } .wl-wide { grid-column: 1 / -1; }
.wl-group { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; } .wl-group header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
/* Email Notifications */
.ne-group { margin: 18px 0 6px; } .ne-table td, .ne-table th { vertical-align: middle; } .ne-table td:nth-child(3), .ne-table td:nth-child(4), .ne-table th:nth-child(3), .ne-table th:nth-child(4) { text-align: center; width: 90px; }
/* Policy: who it's for */
.pol-aud { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; } .pol-aud legend { font-weight: 600; padding: 0 4px; }
.pol-aud-box { display: grid; gap: 8px; margin-top: 6px; } .pol-aud-box input[type=text] { max-width: 420px; } .pol-aud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ne-cb { width: 18px; height: 18px; cursor: pointer; }
.wl-grid > label { min-width: 0; } .wl-grid input, .wl-grid textarea { width: 100%; min-width: 0; box-sizing: border-box; } @media (max-width: 600px) { .wl-grid { grid-template-columns: 1fr 1fr; } }
.tabs a { display: inline-block; padding: 6px 12px; border-radius: 8px; text-decoration: none; color: inherit; } .tabs a.on { background: var(--moon, #f2b000); color: #1d2433; font-weight: 700; }
.pol-aud-box #pol-aud-add { justify-self: start; } .pol-aud .check { display: inline-flex; margin-right: 14px; }

/* Admin Panel → Email Templates */
.et-wrap { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 14px; align-items: start; } @media (max-width: 800px) { .et-wrap { grid-template-columns: 1fr; } }
.et-list { display: grid; gap: 4px; } .et-list h3 { margin: 12px 0 2px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.et-list button { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.et-list button[aria-current="true"] { border-color: var(--moon, #f2b000); background: rgba(246, 201, 14, .12); font-weight: 600; }
.et-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; margin-bottom: 10px; } .et-meta > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.et-frame { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* Export / Import Structure */
.sio { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .sio-imp { cursor: pointer; } .sio-dlg { max-width: min(760px, calc(100vw - 24px)); } .sio-dlg .table-scroll { max-height: 55vh; overflow: auto; }

/* quick My Tickets button (IT) */
.mytk-btn { display: inline-flex; align-items: center; gap: 6px; } .mytk-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--moon, #f2b000); color: #1d2433; font-size: .75rem; font-weight: 700; text-align: center; line-height: 20px; }
.mytk-n.warn { background: #d64032; color: #fff; } @media (max-width: 600px) { .mytk-btn { padding-left: 10px; padding-right: 10px; } }

/* the save bar only stays on screen while there are unsaved changes ("No unsaved changes" no longer covers the list) */
.save-bar:not(.dirty) { position: static; box-shadow: none; }

/* Testing Mode: departments and people from Entra */
.lim-depts { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; } .lim-entra { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; } .lim-entra input { flex: 1 1 260px; max-width: 420px; }

/* merged requests */
.merge-label { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 4px 0 10px; } .merge-chip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 10px; border-radius: 999px; background: rgba(91, 107, 214, .14); border: 1px solid rgba(91, 107, 214, .45); font-weight: 600; font-size: .85rem; }
.merge-label.merged .merge-chip { background: rgba(246, 201, 14, .15); border-color: rgba(246, 201, 14, .6); } .mg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* Email Notifications: CC */
.nc-cc .check { display: flex; margin: 6px 0; } .nc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; } .nc-grid label { display: grid; gap: 4px; font-weight: 600; } .nc-grid textarea { width: 100%; box-sizing: border-box; }

/* Email Notifications: who gets it */
.ne-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; } .ne-plus { color: var(--ink); font-weight: 600; }
.ne-who-edit { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; } .ne-who-edit .check { display: flex; gap: 6px; color: var(--ink); }
.ne-chips { display: flex; flex-wrap: wrap; gap: 6px; } .ne-add { display: flex; gap: 6px; flex-wrap: wrap; } .ne-add input { flex: 1 1 220px; min-width: 0; }

/* drop-down lists: readable options in light and dark mode (the open list is drawn by the browser on white) */
select option, select optgroup { color: #1d2433; background-color: #ffffff; } select optgroup { font-weight: 700; color: #1c2e93; } select option:disabled { color: #8a90a6; }

/* HR Portal: Policy Hub and section strips */
.hr-strip { margin: 0 0 12px; } .hub-q { width: 100%; max-width: 420px; margin: 10px 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hub-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; background: var(--surface, transparent); }
.hub-card h3 { margin: 0; font-size: 1rem; } .hub-card h3 a { color: inherit; text-decoration: none; } .hub-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.hub-kind { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hub-label { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--lc); border: 1px solid var(--lc); background: color-mix(in srgb, var(--lc) 12%, transparent); }
.hub-acts { display: flex; flex-wrap: wrap; gap: 6px; } .hub-table td { vertical-align: middle; }
.lbl-list { display: grid; gap: 8px; margin: 8px 0; } .lbl-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .lbl-row input[type=text] { max-width: 240px; } .lbl-row input[type=color] { width: 40px; height: 32px; padding: 0; border: 0; background: none; }

/* All Apps in groups */
.start-group { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }

/* Staff Management: only the Everyone list (people, departments, managers, remove) */
#view.staff-mode > section.panel:not(:has(.ev-table)), #view.staff-mode > .panel:not(:has(.ev-table)), #view.staff-mode > .dep-tiles, #view.staff-mode > .dep-grid, #view.staff-mode .dp-struct, #view.staff-mode .dept-scroll { display: none !important; }

/* Policy Hub download buttons fit the card */
.hub-acts .btn { max-width: 100%; min-width: 0; } .hub-dl { display: inline-flex; align-items: center; gap: 6px; } .hub-dl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.hub-card { min-width: 0; overflow: hidden; }
/* acknowledgements beside the policy */
.pol-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.pol-split > #pol-ack-panel { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; margin: 0; }
.pol-main { min-width: 0; } @media (max-width: 1150px) { .pol-split { grid-template-columns: 1fr; } .pol-split > #pol-ack-panel { position: static; max-height: none; } }
.pol-split .pol-acks { grid-template-columns: 1fr !important; }
/* session feedback charts */
.fb-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 12px 0; } .fb-chart { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fb-chart.wide { grid-column: 1 / -1; } .fb-chart h3 { margin: 0 0 8px; font-size: .95rem; } @media (max-width: 700px) { .fb-charts { grid-template-columns: 1fr; } }

.fb-chart svg { max-width: 100%; height: auto; display: block; }
#fb-results .dv-tiles.small .dv-tile b { font-size: 1.5rem; } #fb-results .dv-tiles.small .dv-tile span { font-size: .8rem; } #fb-results .dv-tiles.small { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* App groups: readable headings on every background (birthday and special-day designs too), one even grid for every group */
.start-group { display: flex; align-items: center; gap: 12px; max-width: 1000px; margin: 26px auto 10px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.start-group::before { content: ''; flex: 0 0 auto; width: 4px; height: 16px; border-radius: 2px; background: var(--moon, #fdb902); }
.start-group::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--line); }
.start.tpl .start-group, .start.bday-mode .start-group { width: fit-content; margin-left: auto; margin-right: auto; padding: 5px 14px; border-radius: 999px; background: rgba(20, 24, 52, .78); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.start.tpl .start-group::after, .start.bday-mode .start-group::after { display: none; }
.start .start-cards[data-n] { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); max-width: 1000px; margin-left: auto; margin-right: auto; margin-top: 0; }
@media (max-width: 520px) { .start .start-cards[data-n] { grid-template-columns: minmax(0, 1fr); } }
/* side menu: group labels between the apps */
.ws-switch .ws-group { grid-column: 1 / -1; flex-basis: 100%; margin: 8px 4px 2px; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .62); text-align: left; }
.ws-switch .ws-group:first-of-type { margin-top: 4px; }

/* Side menu apps as tiles: each app a tile (count badges pop up on the tile's corner); group labels highlighted */
.ws-switch.ws-grid { gap: 6px; padding: 8px; }
.ws-switch.ws-grid a:not(.ws-all) { position: relative; min-width: 0; padding: 9px 6px !important; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .88); font-size: .78rem; overflow: visible; transition: background .15s, border-color .15s, transform .15s; }
.ws-switch.ws-grid a:not(.ws-all):hover { background: rgba(255, 255, 255, .13); border-color: rgba(252, 205, 13, .55); transform: translateY(-1px); }
.ws-switch.ws-grid a.on { background: #fff; color: #0d1747; border-color: #fff; }
.ws-switch.ws-grid a:not(.ws-all) .nav-count { position: absolute; top: -7px; right: -5px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; font-size: .66rem; box-shadow: 0 0 0 2px #1c2e93; }
.ws-switch.ws-grid a.ws-admin { background: rgba(252, 205, 13, .16); color: #fdb902; border-color: rgba(252, 205, 13, .5); }
.ws-switch .ws-group { display: flex; align-items: center; gap: 6px; margin: 10px 2px 2px; padding: 0; color: #fdb902; font-size: .66rem; font-weight: 800; letter-spacing: .09em; }
.ws-switch .ws-group::after { content: ''; flex: 1 1 auto; height: 1px; background: rgba(252, 205, 13, .35); }
.ws-switch .ws-group:first-of-type { margin-top: 6px; }
.ws-switch.ws-grid a.ws-long { font-size: .7rem; letter-spacing: -.01em; }
.ws-switch.ws-grid a:not(.ws-all) { white-space: nowrap; text-overflow: ellipsis; }

/* Acknowledgements beside the policy: one plain list, no inner scroll bars; each person on a tidy row (name and details, Remind on the right) */
.pol-split > #pol-ack-panel { position: static; max-height: none; overflow: visible; }
#pol-ack-panel, #pol-ack-panel .pol-acks, #pol-ack-panel .pol-acks > div { overflow-x: hidden; min-width: 0; }
#pol-ack-panel .pol-rep-list { max-height: none; overflow: visible; }
#pol-ack-panel .pol-rep-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#pol-ack-panel .pol-rep-list li:last-child { border-bottom: 0; }
#pol-ack-panel .pol-rep-list li .hint { grid-column: 1; display: block; font-size: .78rem; }
#pol-ack-panel .pol-rep-list li > .btn, #pol-ack-panel .pol-rep-list li > a { grid-column: 2; grid-row: 1 / span 2; }

/* HR Admin Panel: one menu entry; a path back to it on its pages */
.hr-crumb { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.hr-crumb:hover { color: var(--ink); } .hr-crumb svg { width: 14px; height: 14px; }
.hr-admin-tiles .set-tile b .nav-count { margin-left: 6px; }

/* Joiners and Leavers: the hiring / leaving process */
.lc-phase { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 8px 0; } .lc-phase summary { cursor: pointer; } .lc-phase.lc-skipped { opacity: .45; }
.lc-code { display: inline-block; min-width: 46px; font: 700 .72rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.lc-flags { display: flex; flex-wrap: wrap; gap: 6px 18px; } .lc-flags legend { width: 100%; }
.lcp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; } .lcp-main, .lcp-side { min-width: 0; }
@media (max-width: 1150px) { .lcp-grid { grid-template-columns: 1fr; } }
.lcp-phase > summary { list-style: none; cursor: pointer; } .lcp-phase > summary h2 { display: inline; } .lcp-phase > summary::-webkit-details-marker { display: none; }
.lcp-task { display: grid; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); } .lcp-task:last-child { border-bottom: 0; }
.lcp-task.late > label { color: var(--bad, #c0392b); } .lcp-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: 26px; }
.lcp-files, .lcp-apps { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 6px; } .lcp-files li, .lcp-apps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; overflow-wrap: anywhere; }
.lcp-files li .hint, .lcp-apps li .hint { grid-column: 1 / -1; font-size: .78rem; }
.lcp-up, .lcp-ap { display: grid; gap: 6px; } .lcp-up input[type=file] { max-width: 100%; } .lcp-inl { display: grid; gap: 4px; font-size: .85rem; }
.lcp-letter { display: grid; gap: 8px; margin-top: 10px; } .lcp-letter textarea { width: 100%; font-family: inherit; }

/* Probation & Contracts */
.tm-review { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); } .tm-review:last-child { border-bottom: 0; } .tm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-part { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; display: grid; gap: 8px; } .tm-who { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.tm-table td { vertical-align: middle; }

.hre-frame { width: 100%; min-height: 320px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ================= Page frame (header, side menu, Help, breadcrumbs) ================= */
.hdr-mode #subnav, .hdr-mode #subnav-mini, .hdr-mode .celebrate-pills, .hdr-mode #celebrate-pills { display: none !important; }
.hdr { position: fixed; top: calc(12px + var(--tm, 0px)); right: 18px; z-index: 45; display: flex; align-items: center; gap: 8px; }
.hdr .bell-btn, .hdr-btn { position: static !important; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface, var(--panel, #fff)); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); cursor: pointer; position: relative; text-decoration: none; }
.hdr-btn { position: relative !important; } .hdr-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; } .hdr-btn:hover, .hdr .bell-btn:hover { border-color: var(--muted); }
.hdr-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 999px; background: var(--moon, #fdb902); color: #1d2433; font-size: .66rem; font-weight: 800; text-align: center; }
.hdr-bell { display: inline-flex; } .hdr-bell .bell-btn { position: relative !important; top: auto !important; right: auto !important; }
.hdr-me { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #1c2e93; color: #fdb902; font-weight: 800; font-size: .85rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.hdr-menu { position: absolute; top: 48px; right: 0; width: 290px; max-height: calc(100vh - 80px); overflow: auto; background: var(--surface, var(--panel, #fff)); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .22); padding: 10px; display: grid; gap: 4px; }
.hdr-menu[hidden] { display: none; }
.hdr-menu > a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; } .hdr-menu > a:hover { background: var(--line); } .hdr-menu > a svg { width: 16px; height: 16px; }
.hdr-who .who { position: static !important; display: grid; gap: 2px; padding: 6px 8px 10px; margin: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: none; } .hdr-who .who span { color: var(--muted); font-size: .8rem; }
.hdr-ctl { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hdr-ctl > * { position: static !important; top: auto !important; right: auto !important; width: 100%; justify-content: flex-start; box-shadow: none !important; }
.hdr-ctl .theme-toggle { display: inline-flex !important; } .hdr-ctl .gs-btn { display: flex !important; width: 100%; height: 38px; border-radius: 10px; gap: 8px; padding: 0 10px; }
.hdr-ctl .gs-btn::after { content: 'Getting Started'; font-size: .85rem; font-weight: 600; }
.hdr-launch { position: fixed; top: calc(60px + var(--tm, 0px)); right: 18px; z-index: 46; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--surface, var(--panel, #fff)); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, .25); padding: 14px; }
.hl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .hl-head a { font-size: .82rem; }
.hl-group { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 2px 6px; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.hl-grid a { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .82rem; font-weight: 700; text-align: center; }
.hl-grid a:hover, .hl-grid a.on { border-color: var(--moon, #fdb902); background: rgba(252, 205, 13, .1); } .hl-ico svg { width: 22px; height: 22px; }
/* side menu: this app's sections */
.hdr-mode .rail .side-nav { display: grid; gap: 2px; margin-top: 10px; }
.hdr-mode .rail .side-nav .nav-head { margin: 12px 8px 4px; color: #fdb902; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hdr-mode .rail .side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: rgba(255, 255, 255, .86); text-decoration: none; font-weight: 600; font-size: .9rem; }
.hdr-mode .rail .side-nav a:hover { background: rgba(255, 255, 255, .08); } .hdr-mode .rail .side-nav a[aria-current="page"] { background: #fff; color: #0d1747; }
.hdr-mode .rail .side-nav a svg { width: 16px; height: 16px; flex: 0 0 auto; } .hdr-mode .rail .side-nav .nav-count { margin-left: auto; }
.hdr-mode .rail > .bell-btn, .hdr-mode .rail > .lang-btn, .hdr-mode .rail > .theme-toggle, .hdr-mode .rail > .gs-btn { display: none !important; }
/* one Help button */
.hdr-mode .ai-chat-btn, .hdr-mode .team-chat-btn { visibility: hidden !important; pointer-events: none !important; }
.help-fab { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 61; display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 0; background: #1c2e93; color: #fff; font-weight: 800; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); cursor: pointer; }
.help-fab span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fdb902; color: #1d2433; font-weight: 900; }
.help-menu { position: fixed; right: 22px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 61; width: 290px; background: var(--surface, var(--panel, #fff)); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); padding: 8px; display: grid; gap: 4px; }
.help-menu[hidden] { display: none; }
.help-menu button, .help-menu a { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; }
.help-menu button:hover, .help-menu a:hover { background: var(--line); } .help-menu span { color: var(--muted); font-size: .8rem; }
/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .8rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; } .crumbs a:hover { color: var(--ink); text-decoration: underline; } .crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.hdr-mode .view { padding-top: 64px; }
@media (max-width: 760px) {
  .hdr { top: calc(10px + var(--tm, 0px)); right: 64px; gap: 6px; } .hdr .bell-btn, .hdr-btn, .hdr-me { width: 34px; height: 34px; }
  .hdr-menu { position: fixed; top: calc(56px + var(--tm, 0px)); right: 10px; left: 10px; width: auto; }
  .hdr-launch { top: calc(56px + var(--tm, 0px)); right: 10px; left: 10px; width: auto; }
  .help-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 10px 14px; }
  .hdr-mode .view { padding-top: 12px; }
}
.hdr-who .who b { color: var(--ink); font-size: 1rem; } .hdr-who .role-pill { color: var(--ink) !important; background: transparent !important; border: 1px solid var(--line) !important; }
.hdr-who .role-pill.super-pill { border-color: #fdb902 !important; } .hdr-who .role-pill.test-pill { border-color: #c0392b !important; color: #c0392b !important; }
@media (max-width: 760px) {
  .hdr.in-rail { position: static; margin-left: auto; order: 2; } .hdr.in-rail .bell-btn, .hdr.in-rail .hdr-btn { background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: none; }
  .hdr.in-rail .hdr-me { box-shadow: none; border: 1px solid rgba(252, 205, 13, .6); }
  .hdr-mode .rail .menu-toggle { order: 3; margin-left: 6px; }
  .hdr-mode .rail:not(.menu-open) .side-nav { display: none; }
}

/* ================= Standard dashboards ================= */
.std-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding: 10px 12px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, transparent); }
.std-f { display: grid; gap: 3px; font-size: .78rem; font-weight: 700; color: var(--muted); } .std-f select { min-width: 150px; }
.std-acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.std-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 14px; }
.std-kpi { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); background: var(--surface, var(--panel, #fff)); color: var(--ink); text-decoration: none; min-width: 0; }
a.std-kpi:hover { border-color: var(--muted); } .std-kpi.ok { border-left-color: #2e9e6a; } .std-kpi.warn { border-left-color: #e0a100; } .std-kpi.bad { border-left-color: #c0392b; }
.std-kl { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } .std-kpi b { font-size: 1.9rem; line-height: 1.1; font-weight: 800; overflow-wrap: anywhere; }
.std-ks { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.std-tr { font-weight: 800; font-size: .75rem; padding: 1px 6px; border-radius: 999px; } .std-tr.good { color: #1e7d4f; background: rgba(46, 158, 106, .14); } .std-tr.bad { color: #b03024; background: rgba(192, 57, 43, .12); } .std-tr.flat { color: var(--muted); background: var(--line); }
.std-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; } .std-chart { min-width: 0; margin: 0; } .std-chart.wide { grid-column: 1 / -1; } .std-chart h2 { font-size: 1rem; } .std-chart svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.std-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .std-lists .panel { margin: 0; min-width: 0; }
.std-list { list-style: none; padding: 0; margin: 0; display: grid; } .std-list li { border-bottom: 1px solid var(--line); border-left: 3px solid transparent; } .std-list li:last-child { border-bottom: 0; }
.std-list li.bad { border-left-color: #c0392b; } .std-list li.warn { border-left-color: #e0a100; } .std-list a { display: grid; gap: 2px; padding: 8px 10px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; } .std-list a:hover { background: var(--line); } .std-list .hint { font-size: .78rem; }
.std-big { display: grid; place-items: center; gap: 4px; padding: 24px 0; } .std-big b { font-size: 2.4rem; font-weight: 800; } .std-big.two { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); } .std-big.two > div { display: grid; justify-items: center; gap: 2px; } .std-big.two b { font-size: 1.7rem; }
@media (max-width: 900px) { .std-charts, .std-lists { grid-template-columns: 1fr; } .std-acts { margin-left: 0; } }
/* the header sits on its own bar: pages scroll under it instead of under the buttons */
@media (min-width: 761px) {
  body.hdr-mode::after { content: ''; position: fixed; top: var(--tm, 0px); left: 236px; right: 0; height: 64px; z-index: 44; pointer-events: none;
    background: linear-gradient(var(--bg, var(--paper, #f3f4f8)) 78%, transparent); }
}

/* celebrations in the header */
.hdr-cel { font-size: 1.15rem; border-color: rgba(252, 205, 13, .7) !important; animation: hdrCel 2.4s ease-in-out infinite; } .hdr-cel span { display: block; line-height: 1; }
@keyframes hdrCel { 0%, 100% { transform: none; } 50% { transform: translateY(-2px) rotate(-6deg); } } @media (prefers-reduced-motion: reduce) { .hdr-cel { animation: none; } }
/* My Day on the landing page */
.myday { max-width: 1000px; margin: 18px auto 6px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface, var(--panel, #fff)); color: var(--ink); }
.md-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .md-head h2 { margin: 0; font-size: 1.15rem; }
.md-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.md-card { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.md-card:hover { border-color: var(--muted); } .md-card.ok { border-left-color: #2e9e6a; } .md-card.warn { border-left-color: #e0a100; }
.md-l { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .md-card b { font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; } .md-s { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.md-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; } .md-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--line); } .md-list li > span:nth-child(2) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.md-time { font-weight: 800; min-width: 70px; }
.start.tpl .myday, .start.bday-mode .myday { background: rgba(20, 24, 52, .82); color: #fff; border-color: rgba(255, 255, 255, .2); } .start.tpl .md-card, .start.bday-mode .md-card { color: #fff; border-color: rgba(255, 255, 255, .2); }

.gr-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; align-items: end; margin: 8px 0 12px; }

.et-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.lu-box { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin: 10px 0 14px; display: grid; gap: 8px; } .lu-pick { width: fit-content; cursor: pointer; } .lu-found { display: grid; gap: 8px; }

/* Request Access; termination on a request */
.ac-form { display: grid; gap: 12px; } .ac-form .lv-kind { flex-wrap: wrap; }
.term-box { border-left: 4px solid #c0392b; } .term-box h3 { margin: 4px 0 6px; }
.term-acts { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; } .term-acts li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.term-acts li.done { border-color: rgba(46, 158, 106, .5); background: rgba(46, 158, 106, .08); } .term-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; } .term-granted { margin: 4px 0 0 18px; }

.term-dlg { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface, var(--panel, #fff)); color: var(--ink); }
.term-f { display: grid; gap: 12px; } .term-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.term-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; max-width: 100%; overflow-wrap: anywhere; }
.term-chip button { border: 0; background: var(--line); color: var(--ink); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-weight: 800; }
.term-add { display: flex; gap: 6px; } .term-add input { flex: 1 1 auto; min-width: 0; } .term-link { display: inline-block; margin-top: 2px; color: #c0392b; font-size: .8rem; font-weight: 700; }

/* terminations */
.tp-go { display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 2px solid #c0392b; } .tp-go-btn { background: #c0392b !important; color: #fff !important; font-size: 1.4rem; font-weight: 900; padding: 16px 34px; border-radius: 14px; border: 0; letter-spacing: .08em; }
.tp-steps { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; } .tp-steps li { display: grid; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); } .tp-steps li.done { border-style: solid; border-color: #2e9e6a; }
.tp-tasks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; } .tp-tasks li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 6px 4px; border-bottom: 1px solid var(--line); } .tp-tasks li.done { opacity: .7; } .tp-tasks .hint { display: block; font-size: .78rem; }

/* Administration → Automations */
.au-list { list-style: none; padding: 0; margin: 0; display: grid; } .au-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 8px 16px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.au-row:last-child { border-bottom: 0; } .au-row.row-changed { background: rgba(252, 205, 13, .1); } .au-main { display: grid; gap: 2px; min-width: 0; } .au-main .hint { font-size: .8rem; }
.au-fields { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: flex-end; } .au-f { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; white-space: nowrap; }
.au-dlg { width: min(640px, 94vw); border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface, var(--panel, #fff)); color: var(--ink); } .au-form { display: grid; gap: 10px; }
#au-bar { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface, var(--panel, #fff)); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); z-index: 20; } #au-bar[hidden] { display: none; } #au-n { margin-right: auto; font-weight: 700; }
@media (max-width: 760px) { .au-row { grid-template-columns: 1fr; } .au-fields { justify-content: flex-start; } }
.au-form label:not(.check) { display: grid; gap: 4px; } .au-form input:not([type=checkbox]), .au-form select, .au-form textarea { width: 100%; box-sizing: border-box; } .au-form .lc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.au-form .check { display: inline-flex; gap: 6px; align-items: center; }

.lu-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; } .lu-row label:not(.lu-pick) { display: grid; gap: 4px; }

.hdr-me.has-photo { padding: 0; overflow: hidden; background: #fff; border: 2px solid #fdb902; } .hdr-me img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* back to the top of the page (right side, above Help) */
.to-top { position: fixed; right: 26px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface, var(--panel, #fff)); color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); cursor: pointer; display: grid; place-items: center; }
.to-top[hidden] { display: none; } .to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .to-top:hover { border-color: var(--moon, #fdb902); }
@media (max-width: 760px) { .to-top { right: 16px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); width: 40px; height: 40px; } }
.back-dash { margin-bottom: 6px; border: 1px solid rgba(255, 255, 255, .25); font-size: .84rem !important; } .back-dash svg { width: 14px !important; height: 14px !important; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lu-found label:not(.check) { display: grid; gap: 4px; } .lu-found input:not([type=checkbox]), .lu-found select, .lu-found textarea { width: 100%; box-sizing: border-box; }

/* ================= Phones ================= */
.nav-new { display: none !important; }
@media (max-width: 760px) {
  /* one top bar: logo, header icons, menu button */
  .hdr-mode .rail { flex-wrap: wrap; row-gap: 0; }
  .hdr-mode .rail > .new-btn { display: none !important; }
  .hdr-mode .rail .side-nav .nav-new { display: flex !important; justify-content: center; background: #fdb902 !important; color: #1d2433 !important; font-weight: 800; margin-bottom: 4px; }
  .hdr-mode .rail .brand { flex: 0 0 auto; margin: 0; }
  .hdr-mode .rail .brand .brand-panel img { max-height: 30px; width: auto; }
  .hdr-mode .rail .menu-toggle { padding: 6px 9px; } .hdr-mode .rail .menu-toggle span { display: none; }
  .hdr.in-rail { gap: 5px; } .hdr.in-rail .hdr-btn, .hdr.in-rail .bell-btn, .hdr.in-rail .hdr-me { width: 32px; height: 32px; }
  /* My Day and dashboards */
  .md-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md-card b { font-size: 1.2rem; }
  .std-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .std-kpi { padding: 10px 12px; } .std-kpi b { font-size: 1.35rem; } .std-kl { font-size: .68rem; }
  .std-bar { gap: 8px; } .std-bar .std-f { flex: 1 1 140px; } .std-bar .std-f select { min-width: 0; width: 100%; } .std-acts { width: 100%; justify-content: flex-start; }
  .std-chart { padding: 12px; } .std-big b { font-size: 1.8rem; } .std-big.two b { font-size: 1.35rem; }
  /* forms: label above its field, full width */
  .lc-grid > label:not(.check), .cu-grid > label:not(.check) { display: grid; gap: 4px; }
  .lc-grid > label:not(.check) input:not([type=checkbox]):not([type=radio]), .lc-grid > label:not(.check) select, .lc-grid > label:not(.check) textarea { width: 100%; box-sizing: border-box; }
  /* tiles: icon, then name and description stacked */
  .set-tile { display: grid !important; grid-template-columns: 34px 1fr !important; align-items: start; gap: 2px 10px; }
  .set-tile > b, .set-tile > span:not(.st-ico) { grid-column: 2; }
  /* lists with actions: actions under the text */
  .lr-item { flex-wrap: wrap; } .lr-acts { width: 100%; justify-content: flex-start; }
  .tm-acts { flex-wrap: wrap; } .au-row .au-fields { gap: 6px 10px; }
  .page-head { flex-wrap: wrap; gap: 10px; } .dv-head-acts { width: 100%; }
  #notify-stack { left: 10px !important; right: 10px !important; bottom: calc(128px + env(safe-area-inset-bottom, 0px)) !important; max-width: none !important; width: auto !important; }
}
@media (min-width: 761px) { #notify-stack { bottom: 140px; } }

/* device purchase approvals */
.dp-box { display: grid; gap: 10px; } .dp-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0; }
.dp-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; } .dp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .85rem; } .dp-steps li { display: flex; flex-wrap: wrap; gap: 6px; } .dp-steps b { min-width: 90px; }
.dp-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .dp-act input { flex: 1 1 200px; }

.cancel-btn { margin: 6px 0; } .cancel-note { border-left: 4px solid #c0392b; }
.chip-cancelled, .status-cancelled { background: rgba(192, 57, 43, .12) !important; color: #b03024 !important; }

.tp-form label:not(.check) { display: grid; gap: 4px; align-content: start; } .tp-form input:not([type=checkbox]), .tp-form select, .tp-form textarea { width: 100%; box-sizing: border-box; }
.tp-form .check { display: inline-flex; gap: 8px; align-items: flex-start; font-weight: 400; } .tp-pre { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.tp-form [data-appr][hidden] { display: none; }

/* phones: the old top controls never show outside the header; pop-ups scroll inside themselves */
@media (max-width: 760px) {
  .hdr-mode .rail > .bell-btn, .hdr-mode .rail > .lang-btn, .hdr-mode .rail > .gs-btn, .hdr-mode .rail > .theme-toggle, .hdr-mode .rail > #celebrate-pills { display: none !important; }
  #notify-panel, .hdr-menu, .hdr-launch { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  #notify-panel { left: 10px; right: 10px; width: auto; }
  .hdr.in-rail { flex-wrap: nowrap; } .hdr.in-rail .hdr-btn, .hdr.in-rail .bell-btn, .hdr.in-rail .hdr-me { flex: 0 0 auto; }
}
@media (max-width: 760px) {
  .hdr.in-rail { gap: 4px; } .hdr.in-rail .bell-btn, .hdr.in-rail .hdr-btn, .hdr.in-rail .hdr-me { width: 30px !important; height: 30px !important; }
  .hdr.in-rail .hdr-btn svg, .hdr.in-rail .bell-btn svg { width: 15px; height: 15px; } .hdr.in-rail .hdr-cel { font-size: .95rem; }
  .hdr.in-rail .hdr-count, .hdr.in-rail .bell-btn .bell-count { transform: scale(.85); transform-origin: top right; }
}
@media (max-width: 380px) { .hdr.in-rail .hdr-cel ~ .hdr-cel { display: none; } } /* very narrow phones: one celebration icon */
@media (max-width: 760px) {
  .hdr-mode .rail { column-gap: 6px; padding-left: 10px; padding-right: 10px; }
  .hdr-mode .rail .brand .brand-panel img { max-height: 24px !important; width: auto; } .hdr-mode .rail .brand { flex: 0 1 auto; min-width: 0; }
  .hdr-mode .rail .menu-toggle { padding: 6px 8px !important; min-width: 0; } .hdr-mode .rail .menu-toggle span { display: none; }
}
@media (max-width: 400px) { .hdr.in-rail .hdr-cel ~ .hdr-cel { display: none; } } /* narrow phones: one celebration icon (the others are in the bell) */

/* the profile menu's controls: readable on phones (they used to be styled for the dark top bar) */
.hdr-menu .lang-btn, .hdr-menu .theme-toggle, .hdr-menu .gs-btn { position: static !important; display: flex !important; align-items: center; gap: 8px; width: 100% !important; height: 38px !important; padding: 0 10px !important;
  border: 1px solid var(--line) !important; border-radius: 10px !important; background: transparent !important; color: var(--ink) !important; box-shadow: none !important; order: 0 !important; margin: 0 !important; font: inherit; font-size: .88rem; font-weight: 600; }
.hdr-menu .lang-btn svg { width: 16px; height: 16px; } .hdr-menu .theme-toggle .tt-label { display: inline !important; color: var(--ink) !important; }
.hdr-menu .gs-btn span { font-size: 1rem; } .hdr-menu .gs-btn::after { content: 'Getting Started'; font-size: .88rem; font-weight: 600; color: var(--ink); }
/* the profile menu sits at the top level of the page now: pin it under the header */
.hdr-menu { position: fixed !important; top: calc(60px + var(--tm, 0px)); right: 18px; z-index: 75; }
@media (max-width: 760px) { .hdr-menu { left: 10px; right: 10px; width: auto; } }

.cu-send { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 12px 0; display: grid; gap: 8px; } .cu-send [data-send][hidden] { display: none; }

/* Document Library */
.dl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; } .dl-filters input[type=search] { flex: 1 1 260px; }
.dl-cat { margin: 16px 0 6px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dl-tbl td { vertical-align: top; } .dl-acts { white-space: nowrap; } .dl-acts .btn { margin: 2px; } .dl-sha { font-size: .72rem; word-break: break-all; }
.dl-hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .88rem; } .dl-upres { list-style: none; padding: 0; } .dl-upres .ok { color: #2f9e57; } .dl-upres .bad { color: #c0392b; }
.dl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; } .dl-chip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(42, 53, 119, .1); font-size: .85rem; }
.dl-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; }
.dl-sugg { list-style: none; padding: 0; margin: 4px 0 0; max-height: 200px; overflow: auto; } .dl-sugg button { width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; cursor: pointer; color: var(--ink); } .dl-sugg button:hover { background: rgba(42, 53, 119, .08); }
.dl-pv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 0 0 10px; } .dl-pv dt { color: var(--muted); } .dl-frame { width: 100%; min-height: 380px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
dialog.dl-send { width: min(760px, 96vw); }

/* signing in the system; received by email */
.sg-grid, .ib-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.ib-grid { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.6fr); }
.sg-frame { width: 100%; height: 72vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; } .ib-frame { height: 56vh; }
.sg-sig { display: grid; gap: 6px; margin: 6px 0 10px; } .sg-sig img { max-width: 240px; max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.sg-msgt { white-space: normal; line-height: 1.5; } .ib-status { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; } .ib-cur { background: rgba(42, 53, 119, .07); border-radius: 8px; }
@media (max-width: 900px) { .sg-grid, .ib-grid { grid-template-columns: 1fr; } .sg-frame { height: 60vh; } }

/* department libraries */
.dpl-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--c); border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.dpl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 10px; } .dpl-labs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dpl-acc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; } .dpl-acc input { flex: 1 1 240px; }
.dpl-scope, .dpl-des { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: grid; gap: 4px; } .dpl-des[hidden], [data-for=people][hidden] { display: none; }

/* sorting and filtering on every table and long list */
th.sf-th { cursor: pointer; user-select: none; white-space: nowrap; } th.sf-th::after { content: ' ↕'; opacity: .35; font-size: .8em; }
th.sf-th[aria-sort=ascending]::after { content: ' ▲'; opacity: .8; } th.sf-th[aria-sort=descending]::after { content: ' ▼'; opacity: .8; } th.sf-th:hover::after { opacity: .7; }
th.sf-th:focus-visible { outline: 2px solid var(--focus, #fdb902); outline-offset: -2px; }
.sf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 8px; } .sf-bar .sf-q { flex: 0 1 300px; min-width: 160px; } .sf-sort { display: inline-flex; gap: 4px; margin-left: auto; }
tr[hidden], li[hidden] { display: none !important; }

/* cards: Grid / List */
.sf-gridv { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; gap: 10px !important; }
.sf-list { display: flex !important; flex-direction: column !important; gap: 6px !important; } .sf-list > * { width: 100% !important; max-width: none !important; }
.sf-seg { margin-left: 8px; } .sf-seg button[aria-pressed=true] { background: var(--night, #1c2e93); color: #fff; }

.dpl-lvl { display: flex; align-items: center; gap: 8px; } .dpl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.dpl-ctl { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(42, 53, 119, .12); color: var(--ink); vertical-align: middle; }

/* signature size and preview; PDF preview window */
.sg-size { display: flex; align-items: center; gap: 10px; } .sg-size input { flex: 1; }
.sg-box { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; max-width: 320px; } .sg-box-l { padding: 6px 8px; font-size: .75rem; color: #fff; background: #1c2e93; display: flex; align-items: center; }
.sg-cell { flex: 1; height: 54px; display: flex; align-items: center; justify-content: flex-start; padding: 2px 6px; overflow: visible; } .sg-cell img { max-height: 48px; max-width: 100%; transform-origin: left center; transition: transform .1s; } .sg-typed { color: #1d2433; font-size: 1.1rem; transform-origin: left center; display: inline-block; }
dialog.pdf-pv { width: min(1100px, 96vw); } .pv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; } .pv-frame { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* ISO Management */
.rk-wrap { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; } @media (max-width: 900px) { .rk-wrap { grid-template-columns: 1fr; } }
.rk-map { border-collapse: collapse; width: 100%; } .rk-map th, .rk-map td { width: 16%; text-align: center; padding: 8px 4px; font-weight: 700; border: 1px solid var(--line); }
.rk-c.rk-h { background: rgba(192, 57, 43, .22); } .rk-c.rk-m { background: rgba(224, 160, 32, .22); } .rk-c.rk-l { background: rgba(47, 158, 87, .18); }
a.std-kpi { text-decoration: none; color: inherit; } a.std-kpi:hover { border-color: var(--muted); }

.full { width: 100%; box-sizing: border-box; } @media print { .rail, .hdr, .tm-acts, .actions, .dpl-acc, .help-fab, .to-top { display: none !important; } }
