/* ProMED Solutions Service Portal: shared look, taken from the approved design. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --navy: #0E2A3B; --navy-2: #2B5A73; --accent: #0B6E99; --accent-dark: #08506F;
  --ink: #14212B; --ink-2: #24343F; --muted: #4A5A66; --nav-muted: #C9D6DF;
  --ground: #F4F7F9; --surface: #FFFFFF; --line: #D8E0E6; --line-2: #E3E9EE; --field: #B9C6D0;
  --soft-blue: #E6F2F8; --soft-blue-line: #BFDDEB; --soft-blue-ink: #0A4F6E;
  --ok: #1E7B4A; --ok-ink: #1A5E3A; --ok-bg: #E7F5EC; --ok-line: #A9D8BC;
  --warn-ink: #6B4200; --warn-ink-2: #5C3A00; --warn-bg: #FFF4E0; --warn-line: #F0C987;
  --bad: #C62828; --bad-ink: #8A1C1C; --bad-bg: #FDECEC; --bad-line: #E8A9A9;
  --grey-bg: #EEF1F4; --mark: #FFE7A3;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.5 "IBM Plex Sans", system-ui, sans-serif; }
a { color: var(--accent); } a:hover { color: var(--accent-dark); }
h1 { margin: 0 0 4px; font-size: 26px; } h2 { margin: 0; font-size: 17px; } h3 { margin: 0; font-size: 15px; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top { background: var(--navy); color: #fff; }
.top-in { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font-size: 13px; color: var(--nav-muted); }
.signin-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--navy); font-size: 18px; font-weight: 600; }
.signin-brand img { height: 64px; width: auto; }
.brand strong { font-size: 17px; font-weight: 600; }
.modnav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.modnav a { color: var(--nav-muted); text-decoration: none; padding: 8px 14px; border-radius: 6px; }
.modnav a.on { color: #fff; background: rgba(255,255,255,.14); font-weight: 500; }
.modnav a:hover { color: #fff; }
.me { display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 17px; background: var(--navy-2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; text-decoration: none; }
.linkbtn { background: none; border: 0; color: var(--nav-muted); font: inherit; font-size: 14px; cursor: pointer; padding: 8px; }
.linkbtn:hover { color: #fff; }
.subnav-wrap { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 4px; }
.subnav a { padding: 12px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.subnav a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* layout */
main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 18px; }
.headrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 200px), 100%), 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 10px); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap, 10px); align-items: center; }
.spacer { margin-left: auto; }
.crumb { font-size: 14px; color: var(--muted); }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.card.tight { padding: 14px 18px; }
.card.blue { background: var(--soft-blue); border-color: var(--soft-blue-line); }
.card.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink-2); }
.card.bad { background: var(--bad-bg); border-color: var(--bad-line); color: #6E1616; }
.card.good { background: var(--ok-bg); border-color: var(--ok-line); color: #1A4D31; }
.card.dashed { border-style: dashed; border-color: #9FB3C1; }
.card .list-row { border-top: 1px solid var(--line-2); padding-top: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; text-decoration: none; color: var(--ink); display: block; }
.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font-size: 30px; font-weight: 600; }
.tile.bad { background: var(--bad-bg); border-color: var(--bad-line); } .tile.bad .label { color: #6E1616; } .tile.bad .value { color: var(--bad-ink); }
.tile.warn { background: var(--warn-bg); border-color: var(--warn-line); } .tile.warn .label { color: var(--warn-ink-2); } .tile.warn .value { color: var(--warn-ink); }

/* badges */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; background: var(--grey-bg); color: var(--ink-2); }
.badge.down, .badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.badge.degraded, .badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.blue { background: var(--soft-blue); color: var(--soft-blue-ink); }
.badge.good { background: var(--ok-bg); color: var(--ok-ink); }
.badge.plain { font-weight: 400; }

/* forms */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search],
input[type=date], input[type=datetime-local], input:not([type]), select, textarea {
  font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--field); border-radius: 6px; background: #fff; color: var(--ink); min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(11,110,153,.35); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; }
fieldset { border: 0; margin: 0; padding: 0; }
.btn { font: inherit; font-weight: 600; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--field); font-weight: 400; }
.btn.secondary:hover { background: var(--grey-bg); color: var(--ink); }
.btn.outline { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn.green { background: var(--ok); border-color: var(--ok); }
.btn.green-outline { background: #fff; color: var(--ok-ink); border-color: var(--ok); }
.btn.danger { background: #fff; color: var(--bad-ink); border-color: var(--bad); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: flex; gap: 4px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { font-size: 13px; padding: 6px 12px; min-height: 40px; min-width: 56px; border: 1px solid var(--field); border-radius: 6px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.seg input:focus-visible + label { outline: 3px solid rgba(11,110,153,.35); }
.seg input.pass:checked + label { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.seg input.fail:checked + label { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.seg input.na:checked + label { background: var(--muted); border-color: var(--muted); color: #fff; font-weight: 600; }
.prio { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.prio label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--field); border-radius: 10px; padding: 11px 13px; cursor: pointer; }
.prio label:has(input:checked) { border: 2px solid var(--accent); background: #F5FAFD; padding: 10px 12px; }
.prio label.down:has(input:checked) { border-color: var(--bad); background: var(--bad-bg); }
.prio input { margin-top: 4px; width: 18px; height: 18px; }

/* tables */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; background: #F8FAFB; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.tabs a span { color: var(--muted); font-weight: 400; }

/* flashes */
.flash { border-radius: 8px; padding: 10px 14px; font-size: 14px; border: 1px solid var(--ok-line); background: var(--ok-bg); color: #1A4D31; }
.flash.error { border-color: var(--bad-line); background: var(--bad-bg); color: #6E1616; }
.flash.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink-2); }

/* misc components */
.progress { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }
.progress.green > div { background: var(--ok); }
mark { background: var(--mark); color: inherit; }
.timeline { list-style: none; margin: 0 0 0 6px; padding: 0; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.timeline li { padding-left: 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 6px; background: #9FB3C1; }
.timeline li.mine::before { background: var(--accent); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; margin: 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; }
.facts { display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.facts .k { font-size: 13px; color: var(--muted); }
.answer { white-space: pre-wrap; }
.answer ol, .answer ul { margin: 0; padding-left: 22px; }
.cite { font-family: var(--mono); font-size: 12px; background: var(--soft-blue); color: var(--soft-blue-ink); border-radius: 4px; padding: 0 4px; text-decoration: none; }
.sig { border: 1px solid var(--field); border-radius: 8px; background: #fff; touch-action: none; width: 100%; height: 140px; display: block; }

/* PM year grid */
.pmgrid { min-width: 860px; }
.pmrow { display: grid; grid-template-columns: minmax(250px, 3fr) repeat(12, minmax(36px, 1fr)); border-bottom: 1px solid var(--line-2); }
.pmrow.head { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pmrow > * { display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.pmrow > .sys { justify-content: flex-start; padding: 10px 8px 10px 0; display: block; }
.pmrow .now { background: #EAF4F9; font-weight: 600; }
.dot { width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.dot.done { background: var(--ok); } .dot.booked { background: var(--accent); }
.dot.due { width: 18px; height: 18px; border: 2px solid var(--accent); background: #fff; }
.dot.overdue { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; gap: 6px; }

/* home charts */
.chart { display: block; width: 100%; height: auto; }
.chart .hit { cursor: pointer; outline: none; }
.chart rect.hit:hover, .chart rect.hit:focus { fill: rgba(14, 42, 59, 0.05); }
.chart circle.hit:hover, .chart circle.hit:focus { stroke-width: 24; }
.chart-scroll { overflow-x: auto; }
.chart-scroll .chart { min-width: 480px; }
.donut-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.donut { width: 150px; flex: 0 0 150px; }
.legend-list { list-style: none; margin: 0; padding: 0; flex: 1 1 120px; min-width: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.legend-list li { display: flex; align-items: center; gap: 8px; }
.legend-list strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend-list a { color: inherit; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }
.hero { font-size: 48px; font-weight: 600; line-height: 1.1; }
.rank { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; color: inherit; text-decoration: none; font-size: 13px; padding: 3px 0; }
.rank-track { display: block; height: 10px; grid-column: 1 / -1; grid-row: 2; }
.rank-bar { display: block; height: 10px; background: var(--accent); border-radius: 0 4px 4px 0; }
.rank-value { font-variant-numeric: tabular-nums; color: var(--muted); }
.load-rows { display: flex; flex-direction: column; }
.load-row { display: grid; grid-template-columns: minmax(90px, 200px) minmax(0, 1fr) 32px; gap: 12px; align-items: center; color: inherit; text-decoration: none; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.load-row:first-child { border-top: 0; }
.load-row:hover .load-name { text-decoration: underline; }
.load-bar { display: flex; gap: 2px; height: 16px; min-width: 0; }
.load-bar > span { display: block; min-width: 4px; }
.load-bar > span:last-child { border-radius: 0 4px 4px 0; }
.load-total { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .load-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .load-bar { grid-column: 1 / -1; grid-row: 2; }
}
.chart-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--navy); color: #fff; font-size: 13px; line-height: 1.35; padding: 6px 10px; border-radius: 6px; max-width: 280px; box-shadow: 0 2px 8px rgba(14, 42, 59, .25); }
details summary { cursor: pointer; color: var(--muted); }

/* animated equipment pictures */
.eq-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; color: inherit; text-decoration: none; }
.eq-card:hover { border-color: var(--accent); }
.eq { width: 100%; max-width: 170px; height: auto; align-self: center; margin-bottom: 4px; }
.eq-floor { stroke: var(--field); stroke-width: 2; stroke-linecap: round; }
.eq-body { fill: var(--soft-blue); stroke: var(--navy); stroke-width: 1.6; }
.eq-dark { fill: var(--navy); }
.eq-bore { fill: #fff; stroke: var(--navy); stroke-width: 1.6; }
.eq-line, .eq-arc, .eq-cable { fill: none; stroke: var(--navy); stroke-width: 1.6; }
.eq-arc { stroke-width: 5; stroke-linecap: round; }
.eq-c { fill: none; stroke: var(--navy-2); stroke-width: 7; stroke-linecap: round; }
.eq-beam { fill: rgba(11, 110, 153, .22); }
.eq-wave { fill: none; stroke: var(--accent); stroke-width: 2; }
.eq-screen { fill: #15394D; }
.eq-scanline { fill: #7FD1F2; opacity: .85; }
.eq-dot { fill: var(--accent); }
.eq-paddle { fill: var(--accent); }
.eq-film { fill: #DCE8EF; stroke: var(--navy); stroke-width: 1.4; }
.eq-fan { fill: rgba(127, 209, 242, .28); }
.eq-sweep { stroke: #7FD1F2; stroke-width: 2; stroke-linecap: round; }
.eq-trace { fill: none; stroke: #7FD1F2; stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 150; }
.eq-signal { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.eq-teeth { fill: none; stroke: var(--navy); stroke-width: 6; stroke-linecap: round; }

.eq-spin { animation: eq-spin 5s linear infinite; }
.eq-wave { animation: eq-wave 2.6s ease-out infinite; }
.eq-slide { animation: eq-slide 7s ease-in-out infinite alternate; }
.eq-pulse, .eq-signal { animation: eq-pulse 2.2s ease-in-out infinite; }
.eq-rock { animation: eq-rock 6s ease-in-out infinite alternate; }
.eq-press { animation: eq-press 4s ease-in-out infinite alternate; }
.eq-sweep { animation: eq-sweep 2.6s ease-in-out infinite alternate; }
.eq-scan { animation: eq-scan 3.2s ease-in-out infinite alternate; }
.eq-scan-small { animation: eq-scan-small 3.2s ease-in-out infinite alternate; }
.eq-trace { animation: eq-trace 3s linear infinite; }
.eq-feed { animation: eq-feed 5s ease-in-out infinite alternate; }
@keyframes eq-spin { to { transform: rotate(360deg); } }
@keyframes eq-wave { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
@keyframes eq-slide { from { transform: translateX(10px); } to { transform: translateX(-10px); } }
@keyframes eq-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes eq-rock { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes eq-press { from { transform: translateY(0); } to { transform: translateY(10px); } }
@keyframes eq-sweep { from { transform: rotate(-30deg); } to { transform: rotate(30deg); } }
@keyframes eq-scan { from { transform: translateY(0); } to { transform: translateY(52px); } }
@keyframes eq-scan-small { from { transform: translateY(0); } to { transform: translateY(37px); } }
@keyframes eq-trace { from { stroke-dashoffset: 150; } to { stroke-dashoffset: -150; } }
@keyframes eq-feed { from { transform: translateY(14px); } to { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .eq * { animation: none !important; }
}

/* phone-first public pages */
body.public main { max-width: 520px; padding: 16px; gap: 14px; }
body.public .top-in { padding: 12px 16px; }
body.public .card { border-radius: 12px; padding: 16px; }

/* QR stickers: every measure scales with --u, so one design prints at each size. 140 x 200 units. */
.qr-labels { --u: 1mm; display: flex; flex-wrap: wrap; gap: 6mm; align-items: flex-start; }
.qr-label { width: calc(var(--u) * 140); height: calc(var(--u) * 200); flex: none; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; border-radius: calc(var(--u) * 5); color: #fff; background: radial-gradient(120% 60% at 100% 0, #0F5E7D, transparent 70%), var(--brand-deep); break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.qs-head { flex: none; display: flex; align-items: center; gap: calc(var(--u) * 3); height: calc(var(--u) * 21); padding: 0 calc(var(--u) * 8); box-sizing: border-box; }
.qs-head img { height: calc(var(--u) * 14); width: auto; flex: none; }
.qs-head div { display: flex; flex-direction: column; min-width: 0; }
.qs-head strong { font-size: calc(var(--u) * 8.2); font-weight: 700; line-height: 1.1; }
.qs-head small { font-size: calc(var(--u) * 3.3); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-cyan); line-height: 1.3; }
.qs-call { flex: none; margin: 0; height: calc(var(--u) * 13); font-size: calc(var(--u) * 11); font-weight: 700; line-height: calc(var(--u) * 12); text-align: center; color: var(--brand-cyan); }
.qs-code { flex: none; position: relative; align-self: center; width: calc(var(--u) * 112); height: calc(var(--u) * 112); border-radius: calc(var(--u) * 4); background: #fff; }
.qs-code img { display: block; width: 100%; height: 100%; image-rendering: pixelated; border-radius: inherit; }
.qs-uses { flex: none; display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 2.2); height: calc(var(--u) * 10); margin: 0; font-size: calc(var(--u) * 4.2); font-weight: 600; white-space: nowrap; }
.qs-uses i { width: calc(var(--u) * 1.2); height: calc(var(--u) * 1.2); border-radius: 50%; background: var(--brand-cyan); }
.qs-machine { flex: none; display: flex; align-items: center; gap: calc(var(--u) * 4); height: calc(var(--u) * 25); padding: 0 calc(var(--u) * 7); box-sizing: border-box; background: var(--qr-colour); }
.qs-machine > div { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.qs-machine strong { font-size: calc(var(--u) * 8.5); font-weight: 700; line-height: 1.1; }
.qs-machine span { font-size: calc(var(--u) * 3.9); font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.qs-machine .mono { font-size: calc(var(--u) * 3.3); -webkit-line-clamp: 1; line-clamp: 1; }
.qr-label .eq { flex: none; width: calc(var(--u) * 32); height: calc(var(--u) * 21); }
.qr-label .eq * { animation: none !important; }
.qr-label .eq-floor { stroke: rgba(255, 255, 255, .55); }
.qr-label .eq-body { fill: rgba(255, 255, 255, .16); stroke: #fff; }
.qr-label .eq-bore { fill: var(--qr-colour); stroke: #fff; }
.qr-label .eq-dark, .qr-label .eq-paddle, .qr-label .eq-dot { fill: #fff; }
.qr-label .eq-line, .qr-label .eq-arc, .qr-label .eq-cable, .qr-label .eq-c, .qr-label .eq-wave, .qr-label .eq-signal, .qr-label .eq-teeth { stroke: #fff; }
.qr-label .eq-beam { fill: rgba(255, 255, 255, .3); }
/* Screens sit inside white frames, so they take the panel colour with white detail on top. */
.qr-label .eq-screen, .qr-label .eq-fan { fill: var(--qr-colour); }
.qr-label .eq-scanline { fill: #fff; opacity: 1; }
.qr-label .eq-sweep, .qr-label .eq-trace { stroke: #fff; }
.qr-label .eq-film { fill: rgba(255, 255, 255, .85); stroke: #fff; }
.qs-foot { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: calc(var(--u) * .4); padding: 0 calc(var(--u) * 6); text-align: center; line-height: 1.2; }
.qs-foot strong { font-size: calc(var(--u) * 4.6); font-weight: 700; }
.qs-foot span { font-size: calc(var(--u) * 2.9); color: #C7D9E8; }
.qs-foot b { font-size: calc(var(--u) * 3.5); font-weight: 600; color: var(--brand-cyan); }
@media print {
  .qr-labels { display: grid; grid-template-columns: repeat(auto-fill, calc(var(--u) * 140)); gap: 2mm; justify-content: center; }
  main:has(.qr-labels) { display: block; }
  main:has(.qr-labels) > *:not(.qr-labels) { display: none !important; }
  .qr-label, .qr-labels { animation: none !important; }
}
@media screen and (max-width: 640px) { .qr-labels { --u: .58mm !important; justify-content: center; gap: 12px; } }

/* print */
@media print {
  .top, .subnav-wrap, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; max-width: none; }  /* !important: the notch padding is set later in this file */
}

/* tasks module */
.avatars { display: inline-flex; align-items: center; gap: 2px; }
.avatar.sm { width: 26px; height: 26px; border-radius: 13px; font-size: 11px; flex-shrink: 0; }
.avatar.sm.more { background: var(--grey-bg); color: var(--ink-2); }
.task-due { font-size: 13px; white-space: nowrap; }
.task-due.late { color: var(--bad-ink); font-weight: 600; }
.task-rows { display: flex; flex-direction: column; gap: 8px; }
.task-project { display: flex; flex-direction: column; gap: 8px; }
.task-project:hover { border-color: var(--accent); }
.task-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-people { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); max-height: 240px; overflow-y: auto; }
.task-quick { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-quick input[name=title] { flex: 1 1 260px; min-width: 0; }
.task-quick select, .task-quick input[type=date] { flex: 0 1 auto; min-width: 0; }
.task-group th { background: var(--ground); text-align: left; }
.task-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.task-sub { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.task-sub form { margin: 0; }
.task-sub form.spacer { margin-left: auto; }
.task-sub-title { min-width: 0; overflow-wrap: anywhere; }
.task-sub.done .task-sub-title { text-decoration: line-through; color: var(--muted); }
.task-tick { width: 26px; height: 26px; border: 2px solid var(--field); border-radius: 6px; background: #fff; color: #fff; font-weight: 700; font-size: 14px; line-height: 1; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
button.task-tick { cursor: pointer; }
.task-sub.done .task-tick { background: var(--ok); border-color: var(--ok); }
.task-remove { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
.task-status-row { display: flex; gap: 8px; }
.task-status-row select { flex: 1 1 auto; min-width: 0; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(208px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: var(--grey-bg); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.board-col.over { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--soft-blue); }
.board-cards { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 80px; }
.board-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.board-card[draggable=true] { cursor: grab; }
.board-card.dragging { opacity: .5; }
.board-title { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.board-title:hover { text-decoration: underline; }
.task-move { display: flex; gap: 6px; margin: 2px 0 0; }
.task-move select { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.has-js .task-move button { display: none; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-head { background: var(--ground); font-size: 13px; color: var(--muted); padding: 6px 8px; font-weight: 600; }
.cal-day { background: var(--surface); min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.other { background: var(--ground); }
.cal-day.other .cal-date { color: var(--muted); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-date { font-size: 13px; }
.cal-long { display: none; }
.cal-task { display: block; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 4px; background: var(--soft-blue); color: var(--soft-blue-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--accent); }
.cal-task:hover { text-decoration: underline; }
.cal-task.urgent { border-left-color: var(--bad); }
.cal-task.high { border-left-color: #E89B0C; }
.cal-task.late { background: var(--bad-bg); color: var(--bad-ink); font-weight: 600; }
.cal-task.done { background: var(--ok-bg); color: var(--ok-ink); text-decoration: line-through; border-left-color: var(--ok); }
@media (max-width: 720px) {
  .cal { grid-template-columns: minmax(0, 1fr); }
  .cal-head, .cal-day.empty, .cal-day.other { display: none; }
  .cal-day { min-height: 0; padding: 10px 12px; }
  .cal-long { display: inline; font-weight: 600; }
  .cal-short { display: none; }
  .cal-task { white-space: normal; font-size: 14px; padding: 6px 8px; }
  .task-quick input, .task-quick select, .task-quick .btn { flex: 1 1 100%; }
}
/* Keeps screen-reader labels inside scrolling boxes from stretching the page. */
.board, .table-wrap { position: relative; }

/* tasks module: richer look. Brand navy and cyan come from promedsol.com.pk. */
:root { --brand-deep: #031428; --brand-cyan: #00E5FF; }
.t-icon { width: 1.1em; height: 1.1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.t-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 26px 30px; border-radius: 14px; color: #fff; background: linear-gradient(115deg, var(--brand-deep) 0%, #0A2A44 62%, #0B5470 100%); box-shadow: 0 10px 28px rgba(3, 20, 40, .2); }
.t-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(0, 229, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .07) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(100deg, transparent 20%, #000 100%); -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 100%); }
.t-hero::after { content: ""; position: absolute; z-index: -1; top: -70%; bottom: -70%; width: 150px; left: -180px; background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .13), transparent); transform: rotate(14deg); animation: t-sweep 9s ease-in-out infinite; }
.t-hero h1 { color: #fff; overflow-wrap: anywhere; }
.t-hero p { margin: 0; color: #C7D9E8; }
.t-hero a:not(.btn) { color: #9FEFFF; }
.t-hero-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 340px; }
.t-hero .row { margin-top: 6px; }
.t-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #6FE9FB !important; }
.t-crumb { font-size: 13px; color: #C7D9E8; overflow-wrap: anywhere; }
.t-glow { background: var(--brand-cyan); border-color: var(--brand-cyan); color: var(--brand-deep); box-shadow: 0 0 18px rgba(0, 229, 255, .35); }
.t-glow:hover { background: #7FF2FF; border-color: #7FF2FF; color: var(--brand-deep); }
.t-hero-side { display: flex; align-items: center; gap: 12px; }
.t-hero-side small { color: #C7D9E8; font-size: 13px; line-height: 1.3; }
.t-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.t-hero-meta .task-due { color: #fff; }
.t-hero-meta .task-due.late { color: #FFB4B4; }
.t-ring { width: 76px; height: 76px; flex-shrink: 0; transform: rotate(-90deg); overflow: visible; }
.t-ring circle { fill: none; stroke-width: 3.4; }
.t-ring-track { stroke: var(--line-2); }
.t-ring-value { stroke: var(--ok); stroke-linecap: round; animation: t-ring 1s ease-out both; }
.t-ring text { transform: rotate(90deg); transform-origin: 18px 18px; font-size: 8.5px; font-weight: 700; fill: var(--ink); }
.t-ring.dark { width: 92px; height: 92px; }
.t-ring.dark .t-ring-track { stroke: rgba(255, 255, 255, .18); }
.t-ring.dark .t-ring-value { stroke: var(--brand-cyan); filter: drop-shadow(0 0 2px rgba(0, 229, 255, .8)); }
.t-ring.dark text { fill: #fff; }
.t-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.t-stat { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; animation: t-rise .45s ease-out backwards; }
.t-stat strong { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.t-stat small { color: var(--muted); font-size: 13px; }
.t-stat-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: var(--grey-bg); color: var(--ink-2); flex-shrink: 0; }
.t-stat.blue .t-stat-icon { background: #E5EDFC; color: #1E4BB0; }
.t-stat.red .t-stat-icon { background: var(--bad-bg); color: var(--bad); }
.t-stat.red strong { color: var(--bad-ink); }
.t-stat.amber .t-stat-icon { background: var(--warn-bg); color: #9A5B00; }
.t-stat.green .t-stat-icon { background: var(--ok-bg); color: var(--ok); }
.t-h2 { display: flex; align-items: center; gap: 8px; }
.t-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--grey-bg); border-radius: 10px; padding: 1px 8px; }
.t-empty { align-items: center; text-align: center; padding: 30px; font-size: 18px; }
.t-empty > .t-icon { width: 34px; height: 34px; color: var(--accent); }
.t-empty p { margin: 0; font-size: 14px; }
.t-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 11px; white-space: nowrap; background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.t-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
.st-todo { --st: #14A3B8; } .st-in_progress { --st: #2A5FD6; } .st-on_hold { --st: #E89B0C; } .st-review { --st: #8B4FD8; } .st-done { --st: #1E7B4A; }
.t-prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--pr-ink); }
.t-hero .t-prio { background: #fff; border-radius: 11px; padding: 2px 9px; }
.pr-urgent { --pr: #C62828; --pr-ink: #8A1C1C; } .pr-high { --pr: #E89B0C; --pr-ink: #7A4A00; } .pr-normal { --pr: #2A78D6; --pr-ink: #1E4B86; } .pr-low { --pr: #9FB3C1; --pr-ink: var(--muted); }
.task-due { display: inline-flex; align-items: center; gap: 4px; }
.t-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; }
.t-bar > span { display: block; min-width: 4px; }
.t-bar { animation: t-grow .7s ease-out both; transform-origin: left; }
.t-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.t-legend span { display: inline-flex; align-items: center; gap: 6px; }
.t-legend i { width: 10px; height: 10px; border-radius: 3px; }
.t-summary { flex-direction: row; flex-wrap: wrap; align-items: center; }
.t-summary .t-bar { flex: 1 1 100%; }
.t-summary .t-legend { flex: 1 1 auto; }

.t-mini { display: inline-flex; align-items: center; gap: 6px; }
.t-mini-track { display: block; width: 62px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.t-mini-track span { display: block; height: 100%; background: var(--ok); }
.card.task-late { border-color: var(--bad-line); border-left: 4px solid var(--bad); }
.card.task-late h2 { color: var(--bad-ink); }
.t-project { position: relative; display: flex; flex-direction: column; gap: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 18px 16px; color: inherit; text-decoration: none; transition: transform .18s, box-shadow .18s; animation: t-rise .45s ease-out backwards; }
.t-project::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--tone), var(--tone-2)); }
.t-project:hover, .board-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(3, 20, 40, .12); }
.t-project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.t-project-name { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.t-project-name strong { font-size: 16px; }
.t-project .t-ring { width: 56px; height: 56px; }
.t-project-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ptone-0 { --tone: #0B6E99; --tone-2: #00C2DE; } .ptone-1 { --tone: #5B3FD0; --tone-2: #9F7BEF; } .ptone-2 { --tone: #0E8A6A; --tone-2: #46CFA6; }
.ptone-3 { --tone: #B4550F; --tone-2: #F0A03C; } .ptone-4 { --tone: #2A5FD6; --tone-2: #6FA0F4; } .ptone-5 { --tone: #A52A6F; --tone-2: #E76FAE; }
.avatar.tone-0 { background: #0B6E99; } .avatar.tone-1 { background: #5B3FD0; } .avatar.tone-2 { background: #0B7A5C; }
.avatar.tone-3 { background: #A44D0C; } .avatar.tone-4 { background: #2A5FD6; } .avatar.tone-5 { background: #A52A6F; }
.avatar.sm { box-shadow: 0 0 0 2px #fff; color: #fff; margin-left: -4px; }
.avatars > :first-child { margin-left: 0; }
.avatar.sm.more { color: var(--ink-2); }
.t-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.t-views { display: inline-flex; padding: 4px; gap: 2px; background: var(--grey-bg); border-radius: 10px; }
.t-views a { padding: 7px 16px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.t-views a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(3, 20, 40, .16); }
.t-filters { flex: 1 1 420px; justify-content: flex-end; }
.t-filters select { flex: 0 1 auto; min-width: 0; max-width: 170px; }
.task-group th { background: linear-gradient(90deg, color-mix(in srgb, var(--st) 13%, #fff), #fff 55%); text-align: left; border-top: 2px solid var(--st); }
.t-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.t-title:hover { text-decoration: underline; }
.board-col { background: color-mix(in srgb, var(--st) 7%, var(--grey-bg)); border-top: 3px solid var(--st); }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.board-card { position: relative; padding-left: 15px; overflow: hidden; transition: transform .18s, box-shadow .18s; box-shadow: 0 1px 2px rgba(3, 20, 40, .06); }
.board-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pr); }
.t-steps { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.t-steps li { flex: 1 1 120px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.t-steps li span { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--grey-bg); color: var(--muted); flex-shrink: 0; }
.t-steps li.past span { background: var(--ok); color: #fff; }
.t-steps li.now { color: var(--ink); font-weight: 600; }
.t-steps li.now span { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--soft-blue); }
.t-steps.held li.now span { background: #B86F00; box-shadow: 0 0 0 4px var(--warn-bg); }
.t-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.t-load .load-bar { height: 18px; }
.t-load .load-bar { animation: t-grow .7s ease-out both; transform-origin: left; }
.cal-day.today .cal-short { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
@keyframes t-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes t-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes t-ring { from { stroke-dasharray: 0 100; } }
@keyframes t-sweep { 0% { left: -180px; } 55%, 100% { left: 110%; } }

/* dark sign-in page */
body.signin { min-height: 100vh; min-height: 100dvh; margin: 0; background: var(--brand-deep); color: #E8F3FB; overflow-x: hidden; }
.sg-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 28% 45%, #0B3350 0%, var(--brand-deep) 62%); }
.sg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0, 229, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .055) 1px, transparent 1px); background-size: 44px 44px; animation: sg-grid 24s linear infinite; }
.sg-glow { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .32; animation: sg-float 16s ease-in-out infinite alternate; }
.sg-glow.one { left: -12vmax; top: -14vmax; background: #0A6E99; }
.sg-glow.two { right: -16vmax; bottom: -18vmax; background: #087E93; animation-delay: -7s; }
.sg-particle { position: absolute; width: var(--size); height: var(--size); border-radius: 50%; background: #7FF2FF; box-shadow: 0 0 8px rgba(0, 229, 255, .9); opacity: 0; animation: sg-rise var(--travel) linear var(--wait) infinite; }
.sg-page { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(22px + env(safe-area-inset-top)) clamp(16px, 4vw, 56px) calc(28px + env(safe-area-inset-bottom)); box-sizing: border-box; max-width: 1360px; margin: 0 auto; }
.sg-head { display: flex; align-items: center; gap: 12px; animation: t-rise .6s ease-out both; }
.sg-head img { height: 46px; width: auto; }
.sg-head span { display: flex; flex-direction: column; line-height: 1.2; }
.sg-head strong { font-size: 20px; color: #fff; }
.sg-head small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6FE9FB; }
.sg-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 430px); gap: clamp(24px, 5vw, 72px); align-items: center; padding-top: 12px; }
.sg-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.sg-stage { position: relative; width: min(100%, 470px); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.sg-rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.sg-ring { fill: none; stroke: rgba(0, 229, 255, .22); stroke-width: 1.2; transform-origin: 200px 200px; }
.sg-ring.a { stroke-dasharray: 3 9; animation: eq-spin 60s linear infinite; }
.sg-ring.b { stroke-dasharray: 60 16 4 16; stroke: rgba(0, 229, 255, .34); animation: eq-spin 34s linear infinite reverse; }
.sg-ring.c { fill: rgba(0, 229, 255, .035); }
.sg-orbit { transform-origin: 200px 200px; animation: eq-spin 11s linear infinite; }
.sg-orbit.back { animation: eq-spin 17s linear infinite reverse; }
.sg-orbit-dot { fill: var(--brand-cyan); filter: drop-shadow(0 0 6px var(--brand-cyan)); }
.sg-slides { position: relative; width: 62%; aspect-ratio: 160 / 110; }
.sg-slide { position: absolute; inset: 0; opacity: 0; animation: sg-slide 24s ease-in-out infinite; animation-delay: calc(var(--i) * 4s); filter: drop-shadow(0 0 10px rgba(0, 229, 255, .45)); }
.sg-slide .eq { width: 100%; max-width: none; margin: 0; }
:is(.signin, .banner-art, .mc-stage) .eq-body { fill: rgba(0, 229, 255, .1); stroke: #8FF3FF; stroke-width: 1.3; }
:is(.signin, .banner-art, .mc-stage) .eq-dark { fill: #12506F; stroke: #4BD8EE; stroke-width: .7; }
:is(.signin, .banner-art, .mc-stage) .eq-bore { fill: var(--brand-deep); stroke: #8FF3FF; stroke-width: 1.3; }
:is(.signin, .banner-art, .mc-stage) .eq-line, :is(.signin, .banner-art, .mc-stage) .eq-arc, :is(.signin, .banner-art, .mc-stage) .eq-cable { stroke: #8FF3FF; }
:is(.signin, .banner-art, .mc-stage) .eq-c { stroke: #2FC7E6; }
:is(.signin, .banner-art, .mc-stage) .eq-beam { fill: rgba(0, 229, 255, .3); }
:is(.signin, .banner-art, .mc-stage) .eq-wave, :is(.signin, .banner-art, .mc-stage) .eq-sweep { stroke: var(--brand-cyan); }
:is(.signin, .banner-art, .mc-stage) .eq-floor { stroke: rgba(0, 229, 255, .4); }
:is(.signin, .banner-art, .mc-stage) .eq-screen { fill: #07283F; }
:is(.signin, .banner-art, .mc-stage) .eq-paddle, :is(.signin, .banner-art, .mc-stage) .eq-dot { fill: var(--brand-cyan); }
.sg-sweep { position: absolute; left: 16%; right: 16%; height: 2px; top: 22%; background: linear-gradient(90deg, transparent, var(--brand-cyan), transparent); box-shadow: 0 0 14px var(--brand-cyan); opacity: .7; animation: sg-sweep 4s ease-in-out infinite alternate; }
.sg-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sg-chips li { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 14px; color: #BFD6E6; border: 1px solid rgba(0, 229, 255, .22); animation: sg-chip 24s ease-in-out infinite; animation-delay: calc(var(--i) * 4s); }
.sg-pulse { width: min(100%, 520px); height: 44px; }
.sg-pulse polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sg-pulse-base { stroke: rgba(0, 229, 255, .16); stroke-width: 1.2; }
.sg-pulse-line { stroke: var(--brand-cyan); stroke-width: 2; stroke-dasharray: 16 84; filter: drop-shadow(0 0 4px var(--brand-cyan)); animation: sg-pulse 3.6s linear infinite; }
.sg-claim { margin: 0; text-align: center; font-size: clamp(18px, 2.2vw, 26px); color: #D6E7F3; }
.sg-claim strong { color: var(--brand-cyan); font-weight: 700; }
.sg-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: none; margin: 0; padding: 0; animation: t-rise .7s ease-out .1s both; }
.sg-card { display: flex; flex-direction: column; gap: 15px; padding: 30px; border-radius: 18px; background: rgba(9, 36, 58, .72); border: 1px solid rgba(0, 229, 255, .26); box-shadow: 0 24px 60px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sg-card h1 { color: #fff; font-size: 27px; margin: 0 0 6px; }
.sg-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6FE9FB; }
.sg-note { margin: 0; font-size: 14px; color: #B7CBDB; }
.sg-center { text-align: center; font-size: 13px; }
.signin label.field { color: #C7D9E8; font-size: 13px; }
.signin .sg-card input:not([type=hidden]) { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; font: inherit; color: #fff; background: rgba(2, 15, 30, .7); border: 1px solid rgba(143, 243, 255, .36); border-radius: 9px; transition: border-color .15s, box-shadow .15s; }
.signin .sg-card input:focus { outline: none; border-color: var(--brand-cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, .26); }
.signin .sg-card input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 40px #071F35 inset; }
.sg-btn { font: inherit; font-weight: 700; min-height: 48px; border: 0; border-radius: 9px; cursor: pointer; color: var(--brand-deep); background: linear-gradient(90deg, #00E5FF, #5CF0FF); box-shadow: 0 0 22px rgba(0, 229, 255, .36); transition: transform .15s, box-shadow .15s; }
.sg-btn:hover { transform: translateY(-1px); box-shadow: 0 0 32px rgba(0, 229, 255, .6); }
.sg-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.signin .flash.error { background: rgba(198, 40, 40, .2); border-color: #FF8A8A; color: #FFD9D9; }
.signin .flash.warn { background: rgba(232, 155, 12, .18); border-color: #F0C987; color: #FFE7BD; }
.signin .flash { background: rgba(30, 123, 74, .22); border-color: #7FD7A6; color: #D9F7E5; }
@keyframes sg-slide { 0% { opacity: 0; transform: scale(.94); } 3% { opacity: 1; transform: scale(1); } 15% { opacity: 1; transform: scale(1); } 18% { opacity: 0; transform: scale(1.04); } 100% { opacity: 0; } }
@keyframes sg-chip { 0%, 17%, 100% { color: #BFD6E6; background: transparent; border-color: rgba(0, 229, 255, .22); box-shadow: none; } 1.500%, 15.500% { color: var(--brand-deep); background: var(--brand-cyan); border-color: var(--brand-cyan); box-shadow: 0 0 14px rgba(0, 229, 255, .6); } }
@keyframes sg-sweep { from { top: 24%; } to { top: 74%; } }
@keyframes sg-pulse { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes sg-grid { to { background-position: 44px 44px; } }
@keyframes sg-float { to { transform: translate(5vmax, 4vmax) scale(1.12); } }
@keyframes sg-rise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .75; } 85% { opacity: .55; } 100% { transform: translateY(-95vh); opacity: 0; } }
@media (max-width: 860px) {
  .sg-page { padding: 16px 16px 24px; }
  .sg-layout { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding-top: 14px; }
  .sg-panel { order: 1; }
  .sg-hero { order: 2; }
  .sg-stage { width: min(100%, 300px); }
  .sg-card { padding: 22px 18px; }
}
@media (max-width: 640px) {
  .t-hero { padding: 20px 18px; }
  .t-ring.dark { width: 76px; height: 76px; }
  .t-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-stat { padding: 12px; gap: 10px; }
  .t-stat-icon { width: 36px; height: 36px; font-size: 16px; }
  .t-stat strong { font-size: 22px; }
  .t-filters { flex-basis: 100%; }
  .t-filters input[type=search] { flex-basis: 100% !important; }
  .t-filters select { flex: 1 1 40%; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .signin *, .t-hero::after, .t-stat, .t-project, .t-bar, .t-load .load-bar, .t-ring-value { animation: none !important; }
  .sg-slide:first-child { opacity: 1; }
  .sg-particle, .sg-sweep { display: none; }
  .t-hero::after { display: none; }
  .t-project:hover, .board-card:hover { transform: none; }
}

/* portal-wide look and motion, in the style of the sign-in page */
.top { position: relative; overflow: hidden; background: linear-gradient(100deg, var(--brand-deep) 0%, #0A2A44 62%, #0B4A63 100%); }
.top::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(0, 229, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .05) 1px, transparent 1px); background-size: 30px 30px; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--brand-cyan), transparent) no-repeat; background-size: 34% 100%; animation: portal-line 7s ease-in-out infinite alternate; }
.top-in { position: relative; }
.brand img { filter: drop-shadow(0 0 5px rgba(0, 229, 255, .45)); animation: portal-glow 4s ease-in-out infinite alternate; }
.modnav a { transition: color .18s, background .18s, box-shadow .18s; }
.modnav a:hover { background: rgba(0, 229, 255, .1); color: #fff; }
.modnav a.on { background: rgba(0, 229, 255, .16); box-shadow: inset 0 -2px 0 var(--brand-cyan); }
.avatar { transition: box-shadow .18s; }
.me .avatar:hover { box-shadow: 0 0 0 2px var(--brand-cyan); }
.subnav a, .tabs a { transition: color .18s, border-color .18s; }
.subnav a:hover, .tabs a:hover { color: var(--ink); border-bottom-color: #9FD4E6; }
.subnav a.on:hover, .tabs a.on:hover { border-bottom-color: var(--accent); }

/* page banners: every main heading block, with or without its own class */
:is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1) { position: relative; overflow: hidden; isolation: isolate; padding: 24px 28px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(115deg, var(--brand-deep) 0%, #0A2A44 62%, #0B5470 100%); box-shadow: 0 10px 28px rgba(3, 20, 40, .2); }
main > .headrow:has(h1) { align-items: center; }
:is(.banner, main > .headrow:has(h1), main > div:not([class]):has(> h1)) :is(h1, h2) { color: #fff; overflow-wrap: anywhere; }
:is(.banner, main > .headrow:has(h1), main > div:not([class]):has(> h1)) :is(.muted, p) { color: #C7D9E8; }
:is(.banner, main > .headrow:has(h1), main > div:not([class]):has(> h1)) a:not(.btn) { color: #9FEFFF; }
main > .headrow:has(h1) > div:first-child { flex: 1 1 320px; min-width: 0; }
:is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1)::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(0, 229, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .07) 1px, transparent 1px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='46'%3E%3Cpolyline fill='none' stroke='%2300E5FF' stroke-opacity='.45' stroke-width='1.5' stroke-linejoin='round' points='0,28 110,28 124,28 134,8 146,42 156,20 164,28 320,28'/%3E%3C/svg%3E");
  background-size: 34px 34px, 34px 34px, 320px 46px; background-repeat: repeat, repeat, repeat-x; background-position: 0 0, 0 0, 0 100%;
  mask-image: linear-gradient(100deg, transparent 18%, #000 100%); -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 100%); animation: portal-pulse 9s linear infinite; }
:is(.banner, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1)::after { content: ""; position: absolute; z-index: -1; top: -70%; bottom: -70%; width: 150px; left: -180px; background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .13), transparent); transform: rotate(14deg); pointer-events: none; animation: t-sweep 9s ease-in-out infinite; }
.banner .progress { background: rgba(255, 255, 255, .18); }
.banner .progress > div { background: var(--brand-cyan); }
.banner-late { color: #FFB4B4; }
.banner-time { color: #fff; }

/* themed equipment inside a banner */
.banner-art { position: relative; flex: none; width: 118px; margin: -6px 8px -6px auto; filter: drop-shadow(0 0 8px rgba(0, 229, 255, .45)); }
.banner-art::before { content: ""; position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; border: 1px dashed rgba(0, 229, 255, .45); border-radius: 50%; animation: eq-spin 26s linear infinite; }
.banner-art .eq { display: block; width: 100%; max-width: none; margin: 0; position: relative; }

/* things arrive gently, one after another */
main:not(.sg-panel) > *:not(.flash) { animation: t-rise .45s ease-out backwards; }
main:not(.sg-panel) > *:nth-child(2) { animation-delay: .05s; }
main:not(.sg-panel) > *:nth-child(3) { animation-delay: .1s; }
main:not(.sg-panel) > *:nth-child(4) { animation-delay: .15s; }
main:not(.sg-panel) > *:nth-child(n+5) { animation-delay: .2s; }
:is(.grid, .t-stats) > * { animation: t-rise .5s ease-out backwards; }
:is(.grid, .t-stats) > *:nth-child(2) { animation-delay: .06s; }
:is(.grid, .t-stats) > *:nth-child(3) { animation-delay: .12s; }
:is(.grid, .t-stats) > *:nth-child(4) { animation-delay: .18s; }
:is(.grid, .t-stats) > *:nth-child(5) { animation-delay: .24s; }
:is(.grid, .t-stats) > *:nth-child(n+6) { animation-delay: .3s; }

/* hover and focus */
.tile, .eq-card, .t-stat { transition: transform .18s, box-shadow .18s, border-color .18s; }
a.tile:hover, a.eq-card:hover, .t-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(3, 20, 40, .13); border-color: #8FD3E8; }
.btn { transition: transform .15s, box-shadow .15s, background .15s, color .15s; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(3, 20, 40, .18); }
.btn:not(:disabled):active { transform: none; box-shadow: none; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:not(.task-group):hover { background: #F2F9FC; }
.card .list-row { transition: background .15s; }
a.list-row:hover { background: #F2F9FC; }
main:not(.sg-panel) :is(input, select, textarea) { transition: border-color .15s, box-shadow .15s; }
main:not(.sg-panel) :is(input, select, textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 170, 205, .22); }

/* figures and charts draw themselves */
.progress > div, .rank-bar, .load-bar { animation: t-grow .8s ease-out both; transform-origin: left; }
.chart-line { animation: portal-draw 1.2s ease-out both; }
.chart-area { animation: portal-fade 1.2s ease-out .4s both; }
.chart-end { animation: portal-fade .4s ease-out 1.1s both; }
.dot { transition: transform .15s; }
a.dot:hover { transform: scale(1.25); }
.dot.overdue { animation: portal-alert 2.2s ease-out infinite; }
.badge.down { animation: portal-alert 2.2s ease-out infinite; }
@keyframes portal-line { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes portal-glow { to { filter: drop-shadow(0 0 10px rgba(0, 229, 255, .8)); } }
@keyframes portal-pulse { to { background-position: 0 0, 0 0, -320px 100%; } }
@keyframes portal-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes portal-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes portal-fade { from { opacity: 0; } }
@keyframes portal-donut { from { stroke-dasharray: 0 500; } }
@keyframes portal-alert { 0% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(198, 40, 40, 0); } }

@media (max-width: 900px) { .banner-art { display: none; } }
@media (max-width: 640px) {
  :is(.banner, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1) { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .top *, .top::after, main:not(.sg-panel), main:not(.sg-panel) *, main:not(.sg-panel) *::before, main:not(.sg-panel) *::after { animation: none !important; transition: none !important; }
  a.tile:hover, a.eq-card:hover, .t-stat:hover, .btn:not(:disabled):hover, a.dot:hover { transform: none; }
}
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  :is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1) { background: none !important; color: #000 !important; box-shadow: none !important; padding: 0 !important; }
  :is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1)::before,
  :is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1)::after { display: none !important; }
  :is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1)) :is(h1, h2, p, .muted, a) { color: #000 !important; }
  .banner-art { display: none; }
}

.mono { overflow-wrap: anywhere; }
.card.row { flex-direction: row; }
:is(.banner, main > .headrow:has(h1)) .btn:not(.secondary):not(.outline):not(.danger) { background: var(--brand-cyan); border-color: var(--brand-cyan); color: var(--brand-deep); box-shadow: 0 0 16px rgba(0, 229, 255, .3); }
:is(.banner, main > .headrow:has(h1)) .btn:not(.secondary):not(.outline):not(.danger):hover { background: #7FF2FF; border-color: #7FF2FF; color: var(--brand-deep); }

/* Home blocks: each has its own moving icon. Counts above zero draw attention; zero stays calm. */
.ht { position: relative; overflow: hidden; isolation: isolate; min-height: 104px; box-sizing: border-box; padding-right: 66px; }
.ht-blue { --ht: #2A5FD6; --ht-soft: #E5EDFC; } .ht-red { --ht: #C62828; --ht-soft: #FDECEC; } .ht-cyan { --ht: #0B8FB3; --ht-soft: #E0F6FB; }
.ht-amber { --ht: #B86F00; --ht-soft: #FFF1D6; } .ht-purple { --ht: #7A42C8; --ht-soft: #F0E8FB; } .ht-green { --ht: #1E7B4A; --ht-soft: #E7F5EC; }
.ht-calm { --ht: #1E7B4A; --ht-soft: #E7F5EC; }
.ht::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: -1; background: linear-gradient(90deg, transparent, var(--ht), transparent) no-repeat; background-size: 45% 100%; animation: ht-run 3.4s ease-in-out infinite alternate; }
.ht::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -90px; width: 70px; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); transform: rotate(16deg); animation: ht-shine 7s ease-in-out infinite; pointer-events: none; }
.ht-blocks > :nth-child(2)::after { animation-delay: 1s; } .ht-blocks > :nth-child(3)::after { animation-delay: 2s; } .ht-blocks > :nth-child(4)::after { animation-delay: 3s; } .ht-blocks > :nth-child(5)::after { animation-delay: 4s; } .ht-blocks > :nth-child(6)::after { animation-delay: 5s; }
.ht-blocks > :nth-child(2)::before { animation-delay: -.6s; } .ht-blocks > :nth-child(3)::before { animation-delay: -1.2s; } .ht-blocks > :nth-child(4)::before { animation-delay: -1.8s; } .ht-blocks > :nth-child(5)::before { animation-delay: -2.4s; } .ht-blocks > :nth-child(6)::before { animation-delay: -3s; }
.ht-icon { position: absolute; right: 12px; top: 50%; width: 48px; height: 48px; margin-top: -24px; padding: 6px; box-sizing: border-box; border-radius: 14px; background: var(--ht-soft); color: var(--ht); transition: transform .2s; }
.ht-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ht-icon :is(path, rect, circle, polyline) { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ht-icon .ht-thin { stroke-width: 2.500; opacity: .75; }
.ht:hover .ht-icon { transform: scale(1.12) rotate(-4deg); }
.ht-float { animation: ht-float 3.2s ease-in-out infinite alternate; }
.ht-dash { stroke-dasharray: 3 3.500; animation: ht-dash 1.4s linear infinite; }
.ht-trace { stroke-dasharray: 34 66; animation: ht-trace 2s linear infinite; }
.ht-ripple { stroke-width: 2 !important; opacity: 0; transform-origin: 24px 24px; }
.ht-alert .ht-ripple { animation: ht-ripple 2s ease-out infinite; }
.ht-alert .ht-ripple.two { animation-delay: 1s; }
.ht-alert { animation: ht-attention 2s ease-out infinite !important; }
.ht-calm .ht-trace { stroke-dasharray: none; animation: none; }
.ht-tick { stroke-dasharray: 100; animation: ht-tick 3.2s ease-in-out infinite; }
.ht-tick.two { animation-delay: .5s; } .ht-tick.three { animation-delay: 1s; }
.ht-hand { transform-origin: 24px 25px; animation: eq-spin 12s linear infinite; }
.ht-hand.long { animation-duration: 3s; }
.ht-calm .ht-hand { animation-duration: 60s; }
.ht-calm .ht-hand.long { animation-duration: 12s; }
.ht-tassel { transform-origin: 43px 20px; animation: ht-swing 1.8s ease-in-out infinite alternate; }
.ht .value { font-variant-numeric: tabular-nums; }
.ht-busy .ht-icon { box-shadow: 0 0 0 0 var(--ht-soft); animation: ht-breathe 2.8s ease-in-out infinite; }
.ht-blocks ~ .grid > section.card, .ht-blocks ~ section.card { transition: transform .18s, box-shadow .18s; }
.ht-blocks ~ .grid > section.card:hover, .ht-blocks ~ section.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(3, 20, 40, .1); }
@keyframes ht-run { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes ht-shine { 0% { left: -90px; } 22%, 100% { left: calc(100% + 40px); } }
@keyframes ht-float { from { transform: translateY(1.500px) rotate(-2deg); } to { transform: translateY(-2px) rotate(2deg); } }
@keyframes ht-dash { to { stroke-dashoffset: -13; } }
@keyframes ht-trace { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes ht-ripple { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.300); opacity: 0; } }
@keyframes ht-attention { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ht) 42%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes ht-tick { 0% { stroke-dashoffset: 100; } 35%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes ht-swing { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes ht-breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ht) 28%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
@media (max-width: 400px) {
  .ht { padding-right: 56px; }
  .ht-icon { width: 42px; height: 42px; margin-top: -21px; right: 8px; padding: 5px; }
}

/* extra block icons */
.ht .value { font-variant-numeric: normal; }
.ht .ht-of { font-size: 15px; font-weight: 400; }
.ht > .small { margin-top: 2px; }
.ht-flip { transform-origin: 24px 24px; animation: ht-flip 4.5s ease-in-out infinite; }
.ht-rotate { transform-origin: 24px 24px; animation: eq-spin 6s linear infinite; }
.ht-wave { stroke-dasharray: 100; animation: ht-tick 3.6s ease-in-out infinite; }
.ht-ping { opacity: 0; transform-origin: center; transform-box: fill-box; animation: ht-ripple 2.4s ease-out infinite; }
.ht-slide { animation: ht-slide 3.4s ease-in-out infinite alternate; }
.ht-icon .ht-fillcard { fill: var(--ht-soft); }
.ht-icon .ht-marker { stroke: none; fill: currentColor; opacity: .28; animation: ht-marker 3.6s ease-in-out infinite; }
.ht-icon .ht-scanbar { stroke-width: 2.500; animation: ht-scanbar 2.6s ease-in-out infinite alternate; }
.ht-shackle { animation: ht-shackle 3s ease-in-out infinite; }
.ht-layer { animation: ht-float 2.800s ease-in-out infinite alternate; }
.ht-calm .ht-flip { animation: none; }
.ht-gauge { padding: 4px; background: transparent; }
.ht-gauge svg { transform: rotate(-90deg); }
.ht-icon .ht-gauge-track { stroke: var(--ht-soft); stroke-width: 5; }
.ht-icon .ht-gauge-value { stroke-width: 5; animation: t-ring 1.2s ease-out both; filter: drop-shadow(0 0 2px color-mix(in srgb, var(--ht) 55%, transparent)); }
@keyframes ht-flip { 0%, 42% { transform: rotate(0); } 50%, 92% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes ht-slide { from { transform: translateX(4px); } to { transform: translateX(-5px); } }
@keyframes ht-marker { 0%, 12% { transform: translateY(0); } 30%, 45% { transform: translateY(9px); } 62%, 78% { transform: translateY(18px); } 100% { transform: translateY(0); } }
@keyframes ht-scanbar { from { transform: translateY(2px); } to { transform: translateY(24px); } }
@keyframes ht-shackle { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-2px); } 90% { transform: translateY(1px); } }

/* cards and lists join in */
main:not(.sg-panel) section.card { transition: transform .18s, box-shadow .18s; }
main:not(.sg-panel) section.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(3, 20, 40, .1); }
table.data tbody tr { animation: portal-fade .4s ease-out backwards; }
table.data tbody tr:nth-child(2) { animation-delay: .04s; } table.data tbody tr:nth-child(3) { animation-delay: .08s; } table.data tbody tr:nth-child(4) { animation-delay: .12s; }
table.data tbody tr:nth-child(5) { animation-delay: .16s; } table.data tbody tr:nth-child(6) { animation-delay: .2s; } table.data tbody tr:nth-child(n+7) { animation-delay: .24s; }
.timeline li { animation: t-rise .4s ease-out backwards; }
.timeline li:nth-child(2) { animation-delay: .06s; } .timeline li:nth-child(3) { animation-delay: .12s; } .timeline li:nth-child(n+4) { animation-delay: .18s; }
.timeline li.mine::before { box-shadow: 0 0 0 3px var(--soft-blue); }

/* charts */
.chart-columns .chart-col { animation: portal-grow-y .7s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(var(--i) * 50ms + .1s); }
.chart-columns rect.hit:hover, .chart-columns rect.hit:focus { fill: rgba(11, 110, 153, .08); }
.chart-trend .chart-line { animation: portal-draw 1.4s ease-out both; }
.chart-trend .chart-area { animation: portal-fade 1s ease-out .6s backwards; }
.chart-end { animation: portal-fade .4s ease-out 1.2s backwards; }
.chart-beat { opacity: .35; animation: chart-beat 2.2s ease-out infinite; }
.chart-pt line, .chart-pt circle { opacity: 0; transition: opacity .12s; }
.chart-pt:hover line, .chart-pt:hover circle, .chart-pt:focus-within line, .chart-pt:focus-within circle { opacity: 1; }
.chart-pt .hit { fill: transparent; }
.donut-seg { animation: portal-donut .9s ease-out backwards; animation-delay: calc(var(--i) * 180ms + .05s); transition: stroke-width .15s, opacity .15s; filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--seg) 45%, transparent)); }
.donut:hover .donut-seg:not(:hover) { opacity: .5; }
.chart.donut circle.hit:hover, .chart.donut circle.hit:focus { stroke-width: 23; }
.legend-list li { border-radius: 6px; padding: 3px 6px; margin: -3px -6px; transition: background .15s; }
.legend-list li:hover { background: var(--ground); }
.swatch { box-shadow: 0 1px 2px rgba(3, 20, 40, .2); }
.hero { background: linear-gradient(95deg, var(--navy) 10%, #0B8FB3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* bars: one soft sheen over the bar's own colour, with a light passing along it */
.rank { border-radius: 6px; transition: background .15s; }
.rank:hover { background: var(--ground); }
.rank-track { background: var(--line-2); border-radius: 5px; overflow: hidden; position: relative; }
.rank-bar { background: linear-gradient(90deg, #0B6E99, #18A5C9); border-radius: 5px; position: relative; overflow: hidden; }
.load-bar { gap: 2px; }
.load-bar > span { background-image: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 60%) !important; }
.load-bar > span:first-child { border-radius: 4px 0 0 4px; }
.load-bar > span:only-child, .load-bar > span:last-child { border-radius: 0 4px 4px 0; }
.load-bar > span:only-child { border-radius: 4px; }
.load-row { border-radius: 6px; transition: background .15s; }
.load-row:hover { background: var(--ground); }
.load-rows .load-row:nth-child(2) .load-bar { animation-delay: .08s; } .load-rows .load-row:nth-child(3) .load-bar { animation-delay: .16s; } .load-rows .load-row:nth-child(4) .load-bar { animation-delay: .24s; } .load-rows .load-row:nth-child(n+5) .load-bar { animation-delay: .32s; }
.t-bar > span { background-image: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 60%) !important; }
.progress { position: relative; }
.progress > div { position: relative; overflow: hidden; background: linear-gradient(90deg, #0B6E99, #18A5C9); border-radius: 5px; }
.progress.green > div { background: linear-gradient(90deg, #1E7B4A, #39B678); }
.banner .progress > div { background: linear-gradient(90deg, #00B8D4, var(--brand-cyan)); }
:is(.progress > div, .rank-bar)::after { content: ""; position: absolute; top: 0; bottom: 0; left: -50%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: bar-sheen 3.4s ease-in-out 1s infinite; }
.t-ring-value { filter: drop-shadow(0 0 1.500px rgba(30, 123, 74, .5)); }
.dot { animation: portal-pop .4s ease-out backwards; }
.dot.overdue { animation: portal-pop .4s ease-out backwards, portal-alert 2.2s ease-out .4s infinite; }
.pmrow:hover { background: #F7FBFD; }
@keyframes bar-sheen { 0% { left: -50%; } 55%, 100% { left: 110%; } }
@keyframes chart-beat { 0% { transform: scale(1); opacity: .4; } 100% { transform: scale(2.800); opacity: 0; } }
@keyframes portal-pop { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }
@media print {
  .hero { background: none; color: #000; }
  .chart-pt line, .chart-pt circle { opacity: 0; }
  .chart-beat { display: none; }
}

/* PM year plan: rows rise, visits appear month by month, the year fills up to today */
.pm-line { animation: t-rise .45s ease-out backwards; animation-delay: calc(var(--r, 0) * 45ms + .1s); transition: background .15s; position: relative; }
.pm-line:hover { background: #F2F9FC; }
.pm-line > [role=cell] { transition: background .15s; }
.pm-line > [role=cell]:hover { background: rgba(11, 110, 153, .08); }
.pmrow.pm-time { align-items: center; border-bottom: 1px solid var(--line); grid-template-columns: minmax(250px, 3fr) 12fr; }
.pm-time .sys { padding: 8px 8px 8px 0; }
.pm-time > .pm-track { display: block; position: relative; height: 8px; padding: 0; border-radius: 4px; background: var(--line-2); }
.pm-track-fill { display: block; position: relative; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #0B6E99, var(--brand-cyan)); transform-origin: left; animation: t-grow 1.4s cubic-bezier(.2, .8, .3, 1) .2s backwards; }
.pm-track-fill::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-sizing: border-box; animation: pm-today 2.2s ease-out 1.6s infinite; }
.pmrow .now { position: relative; overflow: hidden; }
.pmrow.pm-line .now::before { content: ""; position: absolute; left: 0; right: 0; top: -100%; height: 100%; background: linear-gradient(180deg, transparent, rgba(0, 200, 235, .3), transparent); animation: pm-beam 3.2s ease-in-out infinite; animation-delay: calc(var(--r, 0) * 180ms); pointer-events: none; }
.pmrow.head .now { color: var(--accent-dark); box-shadow: inset 0 -2px 0 var(--accent); }
.pmrow .dot { position: relative; --d: calc(var(--m, 0) * 55ms + var(--r, 0) * 35ms + .3s); animation: portal-pop .45s cubic-bezier(.3, 1.4, .5, 1) backwards; animation-delay: var(--d); }
.pmrow .dot.booked { animation: portal-pop .45s cubic-bezier(.3, 1.4, .5, 1) backwards, pm-booked 2.6s ease-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.pmrow .dot.overdue { animation: portal-pop .45s cubic-bezier(.3, 1.4, .5, 1) backwards, portal-alert 2.2s ease-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.pmrow .dot.due::before { content: ""; position: absolute; inset: -5px; border: 2px dashed rgba(11, 110, 153, .55); border-radius: 50%; animation: eq-spin 7s linear infinite; }
.pmrow .dot.done { box-shadow: 0 0 0 0 rgba(30, 123, 74, .4); }
.pmrow a.dot.done:hover { box-shadow: 0 0 0 5px rgba(30, 123, 74, .22); }
.pmrow a.dot { transition: transform .15s, box-shadow .15s; z-index: 1; }
.pmrow a.dot:hover, .pmrow a.dot:focus-visible { transform: scale(1.35); }
@keyframes pm-beam { 0% { top: -100%; } 60%, 100% { top: 100%; } }
@keyframes pm-today { 0% { box-shadow: 0 0 0 0 rgba(0, 200, 235, .6); } 80%, 100% { box-shadow: 0 0 0 9px rgba(0, 200, 235, 0); } }
@keyframes pm-booked { 0% { box-shadow: 0 0 0 0 rgba(11, 110, 153, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(11, 110, 153, 0); } }

/* pies: turning ring, orbiting dot, a light travelling round, a breathing centre */
.donut { overflow: visible; }
.donut-halo { animation: eq-spin 30s linear infinite; }
.donut-orbit { animation: eq-spin 7s linear infinite; }
.donut-orbit circle { filter: drop-shadow(0 0 3px rgba(11, 110, 153, .8)); }
.donut-core { opacity: .55; animation: donut-breathe 3.4s ease-in-out infinite alternate; }
.donut-light { opacity: 0; pointer-events: none; transform: rotate(0deg); animation: donut-light 5s linear 1.2s infinite; }
.donut-seg.is-hot, .chart.donut .donut-seg.is-hot { stroke-width: 23; opacity: 1 !important; }
.donut:has(.is-hot) .donut-seg:not(.is-hot) { opacity: .5; }
.chart-caption { transition: fill .15s; }
.legend-list li.is-hot { background: var(--soft-blue); }
.legend-list li { cursor: default; }
.donut-row:hover .donut-halo { animation-duration: 12s; }
@keyframes donut-breathe { from { transform: scale(.94); } to { transform: scale(1.03); } }
@keyframes donut-light { 0% { transform: rotate(0deg); opacity: 0; } 8% { opacity: .55; } 42% { opacity: .55; } 50%, 100% { transform: rotate(360deg); opacity: 0; } }

/* graphs: a comet on the trend, dots popping in, sheen over the bars, hover focus on one month */
.chart-comet { stroke-dashoffset: 1; filter: drop-shadow(0 0 4px #18C4E8); animation: chart-comet 4s ease-in-out 1.5s infinite; opacity: 0; }
.chart-dot { animation: portal-pop .35s ease-out backwards; animation-delay: calc(var(--i) * 90ms + .3s); }
.chart-trend .chart-area { animation: portal-fade 1s ease-out .6s backwards, chart-wash 4s ease-in-out 1.6s infinite alternate; }
.chart-sheen { animation: chart-sheen 5s ease-in-out 1.6s infinite; }
.chart-band { animation: chart-band 2.8s ease-in-out infinite alternate; }
.chart-month .chart-col { transition: opacity .15s, filter .15s; }
.chart-columns:hover .chart-month:not(:hover) .chart-col { opacity: .55; }
.chart-month:hover .chart-col { filter: brightness(1.08) drop-shadow(0 2px 4px rgba(3, 20, 40, .28)); }
.hero { background-size: 220% 100%; animation: hero-shift 6s ease-in-out infinite alternate; }
.load-bar { position: relative; overflow: hidden; border-radius: 4px; }
.load-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 22%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: bar-sheen 4.2s ease-in-out 1.2s infinite; pointer-events: none; }
.load-rows .load-row:nth-child(2) .load-bar::after { animation-delay: 1.7s; } .load-rows .load-row:nth-child(3) .load-bar::after { animation-delay: 2.2s; } .load-rows .load-row:nth-child(n+4) .load-bar::after { animation-delay: 2.7s; }
@keyframes chart-comet { 0% { stroke-dashoffset: 1; opacity: 0; } 8% { opacity: 1; } 75% { opacity: 1; } 85%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes chart-wash { from { opacity: .75; } to { opacity: 1; } }
@keyframes chart-sheen { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(var(--travel)); } }
@keyframes chart-band { from { opacity: .6; } to { opacity: 1; } }
@keyframes hero-shift { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (max-width: 640px) {
  .pmrow.pm-time { grid-template-columns: minmax(250px, 3fr) 12fr; }
}
@media (prefers-reduced-motion: reduce) {
  .donut-light, .donut-orbit, .chart-comet, .chart-sheen, .pmrow.pm-line .now::before, .load-bar::after, :is(.progress > div, .rank-bar)::after { display: none; }
  .pmrow a.dot:hover { transform: none; }
}
@media print {
  .donut-halo, .donut-orbit, .donut-core, .donut-light, .chart-comet, .chart-sheen, .pm-time, .pmrow.pm-line .now::before, .load-bar::after, :is(.progress > div, .rank-bar)::after { display: none; }
}

/* Service Tickets: a status pipeline with flowing connectors */
.tk-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tk-stage { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border-radius: 9px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.tk-stage b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; box-sizing: border-box; border-radius: 12px; font-size: 13px; background: var(--grey-bg); color: var(--ink); }
.tk-stage:hover { background: var(--ground); transform: translateY(-1px); color: var(--ink); }
.tk-stage.on { background: linear-gradient(115deg, var(--brand-deep), #0B5470); color: #fff; box-shadow: 0 5px 14px rgba(3, 20, 40, .22); }
.tk-stage.on b { background: var(--brand-cyan); color: var(--brand-deep); }
.tk-link { position: relative; flex: 1 1 14px; min-width: 14px; max-width: 54px; height: 2px; background: var(--line); overflow: hidden; border-radius: 1px; }
.tk-link::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(90deg, transparent, #0BA5C9, transparent); animation: tk-flow 1.8s linear infinite; }
@keyframes tk-flow { to { left: 110%; } }

/* status chips carry a dot that moves according to the state */
.tk-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; font-weight: 500; }
.tk-status i { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; flex-shrink: 0; }
.tk-new i { background: #14A3B8; animation: tk-ping 1.8s ease-out infinite; }
.tk-assigned i { background: #2A78D6; }
.tk-in_progress i { border: 2px solid #2A5FD6; border-right-color: transparent; animation: eq-spin 1.1s linear infinite; }
.tk-waiting_parts i { background: #E89B0C; animation: eq-pulse 1.6s ease-in-out infinite; }
.tk-resolved i { background: #1E7B4A; }
.tk-closed i { background: #8496A6; }
@keyframes tk-ping { 0% { box-shadow: 0 0 0 0 rgba(20, 163, 184, .6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(20, 163, 184, 0); } }

/* rows: a priority edge that pulses when a system is down, and a slight slide on hover */
.tk-row td { transition: background .15s; }
.tk-row td:first-child { position: relative; padding-left: 20px; transition: padding-left .15s; }
.tk-row td:first-child::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; background: #9FB3C1; transition: width .15s; }
.tk-row:hover td:first-child { padding-left: 24px; }
.tk-row:hover td:first-child::before { width: 6px; }
.tk-p-down td:first-child::before { background: var(--bad); animation: tk-edge 1.6s ease-in-out infinite; }
.tk-p-degraded td:first-child::before { background: #E89B0C; }
.tk-p-minor td:first-child::before { background: #2A78D6; }
.tk-p-down { background: linear-gradient(90deg, rgba(198, 40, 40, .05), transparent 45%); }
@keyframes tk-edge { 0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0); opacity: 1; } 50% { box-shadow: 0 0 7px 1px rgba(198, 40, 40, .6); opacity: .65; } }
.tk-who { display: inline-flex; align-items: center; gap: 8px; }
.tk-nobody { font-size: 13px; color: var(--bad-ink); font-weight: 500; }

/* response countdown and how much of the target has gone */
.tk-time { white-space: nowrap; min-width: 138px; }
.tk-clock { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-clock.late { color: var(--bad-ink); font-weight: 600; }
.tk-target { display: block; position: relative; height: 5px; margin-top: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.tk-target > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1E9D66, #E89B0C); transform-origin: left; animation: t-grow .9s ease-out .25s backwards; }
.tk-target.late > span { background: linear-gradient(90deg, #E2574C, var(--bad)); }
.tk-target.late::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: bar-sheen 2s ease-in-out infinite; }
.banner .tk-target { background: rgba(255, 255, 255, .2); }
.tk-target.wide { width: 210px; max-width: 100%; margin-left: auto; height: 6px; }
.banner [data-due] { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .tk-link { display: none; }
  .tk-flow { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-link::after, .tk-target.late::after { display: none; }
  .tk-in_progress i { border-right-color: #2A5FD6; }
}
@media print {
  .tk-link::after, .tk-target { display: none; }
}
.tk-row td:first-child a { white-space: nowrap; }

/* the phone app and alerts */
[hidden] { display: none !important; }
.app-install { font: inherit; font-size: 13px; font-weight: 600; min-height: 34px; padding: 4px 12px; border: 1px solid rgba(0, 229, 255, .6); border-radius: 8px; color: var(--brand-cyan); background: rgba(0, 229, 255, .1); cursor: pointer; transition: background .15s; }
.app-install:hover { background: rgba(0, 229, 255, .22); }
.sg-install { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; border: 1px solid rgba(0, 229, 255, .5); border-radius: 9px; color: var(--brand-cyan); background: transparent; cursor: pointer; }
.sg-install:hover { background: rgba(0, 229, 255, .12); }
.app-status { margin: 0; font-size: 14px; font-weight: 500; }
.app-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.app-nudge { align-items: center; }
.app-nudge-close { color: var(--muted); font-size: 13px; }
.app-nudge-close:hover { color: var(--ink); }
main:not(.sg-panel) > .col-main > .card + .card { margin-top: 0; }
@media (display-mode: standalone) {
  .app-install, .sg-install { display: none !important; }
}

/* Customer Portal: one living block per machine */
.mc { --mc: #1E7B4A; --mc-glow: rgba(0, 229, 255, .35); display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--mc); border-radius: 14px; color: inherit; text-decoration: none; transition: transform .18s, box-shadow .18s; min-width: 0; }
.mc:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(3, 20, 40, .14); color: inherit; }
.mc:hover .mc-name strong { text-decoration: underline; }
.mc-open { --mc: #E89B0C; }
.mc-down { --mc: var(--bad); --mc-glow: rgba(255, 70, 70, .45); animation: ht-attention 2s ease-out infinite !important; }
.mc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mc-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.mc-name strong { font-size: 16px; }
.mc-head .badge { flex-shrink: 0; white-space: nowrap; }
.mc-live { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 12px; align-items: center; }

/* the machine itself, on a dark scan-room screen */
.mc-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 118px; overflow: hidden; isolation: isolate; border-radius: 10px; background: radial-gradient(circle at 50% 45%, #0E3E5C 0%, var(--brand-deep) 75%); }
.mc-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(0, 229, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, .08) 1px, transparent 1px); background-size: 18px 18px; }
.mc-stage::after { content: ""; position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; z-index: -1; border: 1px dashed var(--mc-glow); border-radius: 50%; animation: eq-spin 24s linear infinite; }
.mc-stage .eq { width: 100%; max-width: 142px; margin: 0; filter: drop-shadow(0 0 7px var(--mc-glow)); }
/* A machine that is down stops moving and dims, under a slow red pulse. */
.mc-down .mc-stage { background: radial-gradient(circle at 50% 45%, #4A1616 0%, #1C0710 78%); }
.mc-down .mc-stage::before { background-image: linear-gradient(rgba(255, 90, 90, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 90, 90, .1) 1px, transparent 1px); animation: mc-alarm 1.6s ease-in-out infinite; }
.mc-down .mc-stage::after { animation: none; }
.mc-down .mc-stage .eq, .mc-down .mc-stage .eq * { animation-play-state: paused !important; }
.mc-down .mc-stage .eq { opacity: .55; filter: grayscale(.75) drop-shadow(0 0 6px rgba(255, 70, 70, .5)); }
.mc-stopped { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--bad); animation: eq-pulse 1.6s ease-in-out infinite; }

/* uptime ring: green up, red down, with the figure in the middle */
.mc-gauge { position: relative; display: block; width: 118px; height: 118px; }
.mc-gauge svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.mc-gauge circle { fill: none; stroke-width: 4; }
.mc-ring-track { stroke: var(--line-2); }
.mc-ring-up { stroke: #1E9D66; stroke-linecap: round; animation: mc-ring 1.3s ease-out backwards; animation-delay: calc(var(--i) * 120ms + .15s); filter: drop-shadow(0 0 1.500px rgba(30, 157, 102, .6)); }
.mc-ring-down { stroke: var(--bad); stroke-dashoffset: 0; transform: rotate(-1deg) scaleY(-1); transform-origin: center; animation: portal-fade .5s ease-out 1.1s backwards; }
.mc-gauge-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.mc-gauge-text b { font-size: 17px; font-weight: 700; }
.mc-gauge-text small { font-size: 11px; color: var(--muted); }
.mc-down .mc-gauge-text b { color: var(--bad-ink); }
@keyframes mc-ring { from { stroke-dasharray: 0 100; } }
@keyframes mc-alarm { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* live status line: a heartbeat while running, flat red while down */
.mc-pulse { display: block; width: 100%; height: 34px; }
.mc-pulse polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mc-beat-base { stroke: color-mix(in srgb, var(--mc) 22%, transparent); stroke-width: 1.5; }
.mc-beat { stroke: var(--mc); stroke-width: 2.5; stroke-dasharray: 16 84; animation: sg-pulse 3s linear infinite; animation-delay: calc(var(--i) * -470ms); filter: drop-shadow(0 0 3px var(--mc)); }
.mc-flat { stroke: var(--bad); stroke-width: 2.5; animation: mc-alarm 1.6s ease-in-out infinite; }

/* the same split as a bar, with the exact figures */
.mc-split { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line-2); transform-origin: left; animation: t-grow .9s ease-out .15s backwards; }
.mc-split-up { min-width: 4px; background: linear-gradient(90deg, #1E7B4A, #39B678); position: relative; overflow: hidden; }
.mc-split-up::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 22%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: bar-sheen 3.800s ease-in-out 1.2s infinite; }
.mc-split-down { min-width: 6px; background: linear-gradient(90deg, #E2574C, var(--bad)); }
.mc-down .mc-split-down { animation: eq-pulse 1.6s ease-in-out infinite; }
.mc-figures { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.mc-figures > span { display: inline-flex; align-items: center; gap: 6px; }
.mc-key { width: 10px; height: 10px; border-radius: 3px; }
.mc-key.up { background: #1E7B4A; } .mc-key.down { background: var(--bad); }
.mc-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 13px; }
.mc-foot > span { min-width: 0; overflow-wrap: anywhere; }
.mc-foot small { display: block; font-size: 12px; color: var(--muted); }
.mc-foot .badge { display: inline-block; font-weight: 600; }
@media (max-width: 380px) {
  .mc-live { grid-template-columns: minmax(0, 1fr) 96px; }
  .mc-gauge { width: 96px; height: 96px; }
  .mc-gauge-text b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-beat { stroke-dasharray: none; }
  .mc-split-up::after { display: none; }
}
@media print {
  .mc-beat { stroke-dasharray: none; }
  .mc-split-up::after, .mc-stage::after { display: none; }
}
.mc-ring-down ~ .mc-ring-up { stroke-linecap: butt; }

/* phones: the module menu and tidier layouts */
.modmenu { display: none; position: relative; min-width: 0; }
.modmenu summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid rgba(0, 229, 255, .45); border-radius: 9px; background: rgba(0, 229, 255, .1); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.modmenu summary::-webkit-details-marker { display: none; }
.modmenu summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modmenu summary svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--brand-cyan); stroke-width: 2.500; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.modmenu[open] summary svg { transform: rotate(180deg); }
.modmenu-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; display: flex; flex-direction: column; min-width: 220px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(3, 20, 40, .35); animation: t-rise .16s ease-out; }
.modmenu-list a, .modmenu-list button { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.modmenu-list a:hover, .modmenu-list button:hover { background: var(--ground); color: var(--ink); }
.modmenu-list a.on { background: var(--soft-blue); color: var(--soft-blue-ink); font-weight: 700; }
.modmenu-list hr { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--line-2); }
.modmenu-list form { margin: 0; }
.modmenu-list form button { color: var(--bad-ink); }
.modmenu-install { color: var(--accent-dark) !important; }

@media (max-width: 860px) {
  .top { position: sticky; top: 0; z-index: 50; overflow: visible; }
  .top-in { flex-wrap: nowrap; padding: 8px 12px; gap: 10px; }
  .brand { flex-shrink: 0; }
  .brand img { height: 34px; }
  .brand span { display: none; }
  body.public .brand span { display: flex; }
  .modmenu { display: block; flex: 1 1 auto; }
  .modnav, .me form, .me .app-install { display: none; }
  .me { flex-shrink: 0; }
  .me .linkbtn { display: none; }
  .subnav { flex-wrap: nowrap; overflow-x: auto; padding: 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex-shrink: 0; white-space: nowrap; padding: 10px 12px; }
}

@media (max-width: 720px) {
  main { --gutter: 12px; padding: 12px 12px 32px; gap: 12px; }
  body.public main { padding: 12px; }
  h1 { font-size: 21px; }
  .card { padding: 14px; border-radius: 12px; }
  .card.tight { padding: 12px; }
  .cols { gap: 12px; }
  .col-main, .col-side { flex-basis: 100%; gap: 12px; }
  .grid { gap: 10px; }
  .crumb { font-size: 13px; }

  /* no zooming into fields on phones, and easy-to-tap controls */
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search],
  input[type=date], input[type=datetime-local], input:not([type]), select, textarea { font-size: 16px; min-height: 44px; }
  main form.row { gap: 8px; }
  main form.row > input[type=search] { flex: 1 1 100% !important; }
  main form.row > label.row { flex: 1 1 40%; min-width: 0; }
  main form.row > label.row select { flex: 1 1 auto; width: 100%; min-width: 0; }
  main form.row > .btn { flex: 1 1 100%; }

  /* banners */
  :is(.banner, .t-hero, main > .headrow:has(h1), main > div:not([class]):has(> h1), main > h1) { padding: 14px 16px; border-radius: 12px; }
  main > .headrow:has(h1) { gap: 10px; }
  main > .headrow:has(h1) p, .t-hero p { font-size: 13px; line-height: 1.4; }
  main > .headrow > .row, .t-hero .row { width: 100%; gap: 8px; }
  main > .headrow > .row > *, main > .headrow > .row > form .btn, .t-hero .row > .btn { flex: 1 1 auto; }
  main > .headrow > .btn { width: 100%; }
  .banner { gap: 10px !important; }
  .banner > div[style*="text-align: right"] { text-align: left !important; width: 100%; }
  .tk-target.wide { width: 100%; margin-left: 0; }
  .t-ring.dark { width: 62px; height: 62px; }

  /* figure blocks: two across, with the icon tucked in the corner */
  .grid:has(> .ht) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht { min-height: 96px; padding: 11px 12px 12px; display: flex; flex-direction: column; }
  .tile.ht .label { font-size: 12px; line-height: 1.3; }
  .ht .value { margin-top: auto; padding-top: 6px; padding-right: 42px; font-size: 24px; line-height: 1.15; }
  .ht > .small { padding-right: 42px; font-size: 11px; line-height: 1.25; }
  .ht-icon { top: auto; bottom: 9px; right: 9px; width: 38px; height: 38px; margin: 0; padding: 4px; border-radius: 11px; }
  .ht:has(> .small) .ht-icon { width: 32px; height: 32px; }
  .ht .ht-of { font-size: 13px; }
  .grid:has(> .ht) > .ht:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid:has(> .eq-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ticket status pipeline slides sideways */
  .tk-flow { flex-wrap: nowrap; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
  .tk-flow::-webkit-scrollbar { display: none; }
  .tk-stage { flex-shrink: 0; white-space: nowrap; padding: 6px 8px 6px 10px; font-size: 13px; }

  /* ticket list as cards */
  .table-wrap:has(.tk-row) { background: none; border: 0; overflow: visible; }
  table.data:has(.tk-row) { display: block; min-width: 0 !important; }
  table.data:has(.tk-row) thead { display: none; }
  table.data:has(.tk-row) tbody { display: flex; flex-direction: column; gap: 10px; }
  tr.tk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 12px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #9FB3C1; border-radius: 12px; }
  tr.tk-p-down { border-left-color: var(--bad); background: linear-gradient(90deg, #FEF4F4, #fff 45%); }
  tr.tk-p-degraded { border-left-color: #E89B0C; }
  tr.tk-p-minor { border-left-color: #2A78D6; }
  tr.tk-row td { display: block; padding: 0; border: 0; min-width: 0; }
  tr.tk-row td:first-child { grid-column: 1; grid-row: 1; padding: 0; font-size: 15px; }
  tr.tk-row:hover td:first-child { padding: 0; }
  tr.tk-row td:first-child::before { display: none; }
  tr.tk-row td:first-child br { display: none; }
  tr.tk-row td:first-child .badge { margin-left: 6px; }
  tr.tk-row td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; }
  tr.tk-row td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  tr.tk-row td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
  tr.tk-row td:nth-child(3):empty { display: none; }
  tr.tk-row td:nth-child(5) { grid-column: 1; grid-row: 4; align-self: center; padding-top: 6px; }
  tr.tk-row td:nth-child(6) { grid-column: 2; grid-row: 4; justify-self: end; align-self: center; padding-top: 6px; font-size: 13px; }
  tr.tk-row td:nth-child(6) .tk-who span:last-child { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  tr.tk-row td.tk-time { grid-column: 1 / -1; grid-row: 5; min-width: 0; padding-top: 6px; }
  table.data:has(.tk-row) tbody tr:not(.tk-row) { display: block; background: var(--surface); border-radius: 12px; }

  /* task list as cards */

  /* task board swipes one column at a time */
  .board { grid-auto-columns: 86%; scroll-snap-type: x proximity; }
  .board-col { scroll-snap-align: start; }
  .t-toolbar { gap: 8px; }
  .t-views { width: 100%; }
  .t-views a { flex: 1 1 0; text-align: center; padding: 8px 6px; }
  .t-filters select { flex: 1 1 40%; max-width: none; }
  .t-filters .btn { flex: 1 1 100%; }
  .t-summary { gap: 8px; }
  .task-quick { padding: 10px; }

  /* progress trackers fit one row */
  .t-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 10px 6px; gap: 2px; }
  .t-steps li { flex-direction: column; text-align: center; gap: 4px; font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }

  /* PM year plan: narrower, with machine names staying in view */
  .pmgrid { min-width: 640px; }
  .pmrow { grid-template-columns: 138px repeat(12, minmax(38px, 1fr)); }
  .pmrow.pm-time { grid-template-columns: 138px 12fr; }
  .pmrow > .sys { position: sticky; left: 0; z-index: 3; padding: 8px 8px 8px 0; background: var(--surface); box-shadow: 6px 0 6px -6px rgba(3, 20, 40, .25); overflow-wrap: anywhere; font-size: 13px; line-height: 1.25; }
  .pmrow > .sys br + .small { display: block; font-size: 11px; }
  .pm-line:hover > .sys { background: #F2F9FC; }

  /* the rest */
  .chart-scroll { -webkit-overflow-scrolling: touch; }
  .donut-row { justify-content: center; }
  .legend { gap: 8px 12px; font-size: 12px; }
  .load-row { padding: 8px 2px; }
  .seg label { min-width: 50px; min-height: 44px; }
  .mc { padding: 13px; }
  .timeline img { max-width: 100%; height: auto; }
  .flash { font-size: 13px; }
  .row.spacer, .btn.spacer { margin-left: 0; }
}
@media print {
  .modmenu { display: none !important; }
}

/* iPhone and iPad: stay clear of the notch, the rounded corners and the home bar */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(0, 229, 255, .16); }
a, button, summary, label, input, select, textarea { touch-action: manipulation; }
.sig { touch-action: none; }
.top { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
main { padding-left: max(var(--gutter, 24px), env(safe-area-inset-left)); padding-right: max(var(--gutter, 24px), env(safe-area-inset-right)); padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
@media (display-mode: standalone) {
  /* with no browser bar, the header stays put so pages never scroll under the clock */
  .top { position: sticky; top: 0; z-index: 50; overflow: visible; }
}
@supports (-webkit-touch-callout: none) {
  /* iOS zooms into any field under 16px, and stretches date fields past their box */
  input, select, textarea { font-size: 16px; }
  input[type=date], input[type=datetime-local] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; }
}
.ios-sheet { width: min(420px, calc(100vw - 24px)); box-sizing: border-box; margin: auto auto calc(12px + env(safe-area-inset-bottom)); padding: 18px; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 20px 50px rgba(3, 20, 40, .4); }
.ios-sheet::backdrop { background: rgba(3, 20, 40, .55); }
.ios-sheet h2 { margin: 0 0 10px; font-size: 18px; color: var(--ink); }
.ios-sheet ol { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.ios-sheet svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: #0A7AFF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ios-sheet .btn { width: 100%; }
@media print {
  .ios-sheet { display: none !important; }
}

/* Home task list */
.hl { gap: 12px; }
.hl-head { display: flex; align-items: center; gap: 16px; }
.hl-ring { width: 64px; height: 64px; }
.hl-ring .t-ring-value { transition: stroke-dasharray .45s ease-out; animation: none; }
.hl-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hl-title-row { flex-wrap: nowrap; }
.hl-title h2 { margin: 0; }
.hl-title p { margin: 0; }
.hl-bar { height: 8px; background: var(--line-2); }
.hl-bar > span { transition: flex-grow .4s ease-out; }
.hl-bar > span[hidden] { display: none; }
.hl-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.hl-scope { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--grey-bg); }
.hl-scope button { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hl-scope button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(3, 20, 40, .18); }
.hl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 6px 4px 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.hl-chip b { min-width: 20px; padding: 1px 5px; box-sizing: border-box; border-radius: 10px; background: var(--grey-bg); color: var(--ink); font-size: 12px; text-align: center; }
.hl-chip:hover { transform: translateY(-1px); background: var(--ground); }
.hl-chip[aria-pressed=true] { border-color: transparent; background: linear-gradient(115deg, var(--brand-deep), #0B5470); color: #fff; box-shadow: 0 4px 12px rgba(3, 20, 40, .22); }
.hl-chip[aria-pressed=true] b { background: var(--brand-cyan); color: var(--brand-deep); }
.hl-chip.late b { background: var(--bad-bg, #FBE9E9); color: var(--bad-ink); }
.hl-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.hl-task { flex-shrink: 0; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 2.1fr); align-items: center; gap: 10px 14px; padding: 9px 10px 9px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); transition: background .15s, box-shadow .15s, opacity .25s, border-color .15s; animation: hl-in .35s ease-out backwards; animation-delay: calc(var(--i) * 40ms); overflow: hidden; }
.hl-task[hidden] { display: none; }
.hl-task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pr); }
.hl-task:hover { background: #F7FBFD; border-color: var(--line); box-shadow: 0 3px 10px rgba(3, 20, 40, .08); }
@keyframes hl-in { from { opacity: 0; transform: translateY(6px); } }
.hl-check { position: relative; width: 26px; height: 26px; flex-shrink: 0; padding: 0; border: 2px solid #9FB3C1; border-radius: 50%; background: #fff; cursor: pointer; transition: border-color .15s, background .2s, transform .15s; }
.hl-check::after { content: ""; position: absolute; inset: -9px; }
.hl-check:hover { border-color: var(--ok); transform: scale(1.08); }
.hl-check.off { border-style: dashed; background: none; cursor: default; }
.hl-check svg { position: absolute; inset: 1px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hl-check path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .25s ease-out .05s; }
.hl-check:hover path { stroke: var(--ok); stroke-dashoffset: 0; }
.hl-check[aria-pressed=true] { border-color: var(--ok); background: var(--ok); }
.hl-check[aria-pressed=true] path { stroke: #fff; stroke-dashoffset: 0; }
.hl-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.hl-main a { color: var(--ink); text-decoration: none; }
.hl-main a:hover { text-decoration: underline; }
.hl-main strong { background: linear-gradient(var(--ink-2), var(--ink-2)) no-repeat 0 55% / 0 1.5px; transition: background-size .3s ease-out, color .2s; }
.hl-sub { display: block; width: 110px; height: 4px; margin-top: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.hl-sub i { display: block; height: 100%; background: var(--ok); }
@keyframes hl-late { 50% { box-shadow: 0 0 0 4px rgba(198, 40, 40, .12); } }
.hl-task.is-done { opacity: .62; }
.hl-task.is-done .hl-main strong { background-size: 100% 1.5px; color: var(--muted); }
.hl-empty { margin: 4px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.legend a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.legend a:hover { text-decoration: underline; }
.legend-list li:has(a) { cursor: pointer; }
.donut-seg[data-href] { cursor: pointer; }

/* PM visit list */
.tk-stage .swatch { flex-shrink: 0; }
.pl-list { gap: 0; padding-top: 6px; padding-bottom: 6px; }
.pl-row { display: grid; grid-template-columns: 54px minmax(0, 1.5fr) minmax(0, 1fr) 124px; align-items: center; gap: 14px; padding: 11px 6px; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; border-radius: 6px; transition: background .15s, transform .15s; animation: hl-in .3s ease-out backwards; animation-delay: calc(var(--i) * 30ms); }
.pl-row:first-child { border-top: 0; }
.pl-row:hover { background: var(--ground); color: inherit; transform: translateX(2px); }
.pl-when { display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 8px; background: var(--grey-bg); line-height: 1.2; }
.pl-when small { font-size: 15px; font-weight: 700; color: var(--ink); }
.pl-when strong { font-size: 11px; font-weight: 500; color: var(--muted); }
.pl-main, .pl-detail { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.pl-late { color: var(--bad-ink); font-weight: 600; }
.pl-state { justify-self: end; padding: 3px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pl-done .pl-state { background: #E6F4EC; color: #17603A; } .pl-booked .pl-state { background: #E6F0FB; color: #1E4B86; }
.pl-due .pl-state { background: #FFF3DC; color: #7A4A00; } .pl-overdue .pl-state { background: #FBE9E9; color: var(--bad-ink); }

/* Sign-out warning */
.idle-sheet { margin: auto; }
.idle-sheet p { margin: 0 0 14px; font-size: 15px; line-height: 1.4; }
.idle-sheet strong { font-variant-numeric: tabular-nums; }

/* Phone widget: the day at a glance, for phones only */
.myday { display: none; }
@media (max-width: 720px) {
  .myday { display: flex; flex-direction: column; gap: 10px; padding: 13px 14px; border-radius: 18px; color: #fff; background: radial-gradient(120% 140% at 100% 0, #0F5E7D, transparent 60%), linear-gradient(150deg, var(--brand-deep), #082B45); box-shadow: 0 10px 26px rgba(3, 20, 40, .28); animation: hl-in .4s ease-out backwards; }
  .myday-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
  .myday-top strong { font-size: 15px; }
  .myday-top span { color: #A9C7DB; }
  .myday-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .myday-figs a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; min-width: 0; }
  .myday-figs a:active { background: rgba(255, 255, 255, .18); }
  .myday-figs b { font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .myday-figs a > span { font-size: 11px; line-height: 1.25; color: #C7D9E8; }
  .myday-figs a.late b, .myday-figs a.late > span { color: #FFB4B4; }
  .myday-next { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 10px; border-radius: 12px; background: rgba(0, 229, 255, .1); border: 1px solid rgba(0, 229, 255, .28); color: #fff; text-decoration: none; }
  .myday-next:hover { color: #fff; }
  .myday-next-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
  .myday-next-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .myday-next-text small { font-size: 12px; color: #A9C7DB; }
  .myday-next svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--brand-cyan); stroke-width: 2.500; stroke-linecap: round; stroke-linejoin: round; }
  .myday-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: var(--brand-cyan); box-shadow: 0 0 0 0 rgba(0, 229, 255, .6); animation: myday-pulse 2s ease-out infinite; }
  @keyframes myday-pulse { to { box-shadow: 0 0 0 9px rgba(0, 229, 255, 0); } }

  .hl-head { gap: 12px; }
  .hl-ring { width: 54px; height: 54px; }
  .hl-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }  /* a wrapping column grows to its widest child */
  .hl-scope { align-self: flex-start; }
  .hl-chip { flex: 1 1 auto; justify-content: space-between; white-space: nowrap; min-height: 36px; }
  .hl-list { max-height: 620px; }

  .pl-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 4px 10px; }
  .pl-when { grid-row: 1 / span 2; align-self: start; }
  .pl-main { grid-column: 2 / -1; }
  .pl-detail { grid-column: 2; grid-row: 2; font-size: 12px; }
  .pl-state { grid-column: 3; grid-row: 2; align-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  .hl-task, .pl-row, .tf-note-overdue, .tf-time i, .tf-time b, .myday, .myday-dot, .hl-main strong, .hl-check path, .hl-bar > span, .hl-ring .t-ring-value { animation: none !important; transition: none !important; }
}
@media print {
  .myday, .hl-tools, .hl-check, .idle-sheet { display: none !important; }
  .hl-list { max-height: none; overflow: visible; }
}
@supports (-webkit-touch-callout: none) {
  .hl-status { font-size: 16px; }
}

/* Reached site: the milestone that stops a ticket's response clock. */
.ar { gap: 10px; }
.ar h2 { margin: 0; }
.ar p { margin: 0; }
.ar-do { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ar-do form { margin: 0; }
.ar-go { min-height: 52px; padding-inline: 26px; font-size: 16px; font-weight: 600; }
.ar-do p { flex: 1 1 260px; min-width: 0; }
.ar-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ar-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; }
.ar-stat strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.ar-met { color: var(--ok-ink); }
.ar-over { color: var(--bad-ink); }
.ar details summary { cursor: pointer; font-weight: 500; }
.tk-clock.met { color: var(--ok-ink); font-weight: 600; }
.rt-rows { display: flex; flex-direction: column; }
.rt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 8px 12px; align-items: end; padding: 10px 0; border-top: 1px solid var(--line-2); }
.rt-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt-name a { font-weight: 600; overflow-wrap: anywhere; }
.rt-fig { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; height: 100%; }
.rt-fig strong { font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .ar-go, .ar-do form { width: 100%; }
  .ar-do p { flex-basis: 100%; }
  .ar-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-stat strong { font-size: 18px; }
  .ar-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rt-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rt-name { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
}
@media print {
  .ar-do, .ar details { display: none !important; }
}

/* Customer Portal: Home button and machine filter */
.homebtn { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; min-height: 42px; margin-right: auto; padding: 8px 14px; border: 1px solid rgba(0, 229, 255, .45); border-radius: 9px; background: rgba(0, 229, 255, .1); color: #fff; font-weight: 600; text-decoration: none; transition: background .18s; }
.homebtn:hover { background: rgba(0, 229, 255, .22); }
.homebtn svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--brand-cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mf { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; align-items: end; }
.mf[hidden], .mc[hidden] { display: none; }
.mf .field { min-width: 0; }
.mf-q { grid-column: 1 / -1; }
.mf-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.mf-foot .linkbtn, [data-mf-none] .linkbtn { color: var(--accent); text-decoration: underline; }
.region-missing { color: var(--warn-ink); font-weight: 600; }
@media (max-width: 860px) {
  .homebtn { margin-right: 0; padding: 8px 12px; }
}
@media (max-width: 720px) {
  .mf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .mf > label:last-of-type:nth-of-type(even) { grid-column: 1 / -1; }
}

/* Regions */
.rg-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.rg-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rg-tab:hover { border-color: #8FD3E8; transform: translateY(-1px); }
.rg-tab .small { color: var(--ink-2); }
.rg-tab[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent), 0 4px 14px rgba(3, 20, 40, .1); }
.rg-panel[hidden] { display: none; }
.rg-panel p { margin: 0; }
.ad-hospital td { background: var(--ground); }
.ad-people-head { margin: 10px 0 0; font-size: 14px; }
@media (min-width: 721px) {
  .rg-panel .grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 720px) {
  .rg-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-tab { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-tab { transition: none; }
  .rg-tab:hover { transform: none; }
}
.ad-sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 16px; }

/* Customers and their locations in Admin */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.cl-card { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 12px 34px 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; overflow-wrap: anywhere; transition: transform .15s, box-shadow .15s, border-color .15s; animation: hl-in .3s ease-out backwards; animation-delay: calc(var(--i) * 30ms); }
.cl-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(3, 20, 40, .12); }
.cl-card:hover strong { color: var(--accent); }
.cl-go { position: absolute; right: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s, stroke .15s; }
.cl-card:hover .cl-go { transform: translateX(3px); stroke: var(--accent); }
.cl-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cl-tag { padding: 1px 8px; border-radius: 10px; background: #E6F3F8; color: #0B5470; font-size: 12px; font-weight: 600; }
.cl-tag.plain { background: var(--grey-bg); color: var(--ink-2); }
.cl-tag.region-missing { background: #FFF3DC; color: #7A4A00; }
.cl-add { align-items: flex-end; }
.cl-add .field { flex: 1 1 240px; }
.ad-delete { border-color: #E9C4C4; }
.ad-delete h2 { color: var(--bad-ink); }
@media (prefers-reduced-motion: reduce) {
  .cl-card, .cl-go { animation: none !important; transition: none !important; }
}

/* A task's details under their own headings: Assignee, Start date, Due date, Status, and a timeline. */
[data-status=todo] { --st: #14A3B8; --st-bg: #E5F6F9; }
[data-status=in_progress] { --st: #2A5FD6; --st-bg: #E9EFFC; }
[data-status=on_hold] { --st: #E89B0C; --st-bg: #FDF3DF; }
[data-status=review] { --st: #8B4FD8; --st-bg: #F2EAFB; }
[data-status=done] { --st: #1E7B4A; --st-bg: #E4F3EA; }
.hl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.tf { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.1fr); gap: 8px 14px; align-items: start; min-width: 0; }
.tf-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tf-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.tf-val { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.tf-val.muted { font-weight: 400; }
.tf-people { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.tf-name { font-weight: 500; line-height: 1.2; }
.tf-note { align-self: flex-start; padding: 0 7px; border-radius: 9px; background: var(--grey-bg); color: var(--ink-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.tf-note-today { background: #FFF3DC; color: #7A4A00; }
.tf-note-overdue { background: #FBE9E9; color: var(--bad-ink); animation: hl-late 2.4s ease-in-out infinite; }
.tf-pill { width: 100%; min-height: 32px; padding: 3px 6px; box-sizing: border-box; border: 1.500px solid var(--st, var(--line)); border-radius: 8px; background-color: var(--st-bg, var(--surface)); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .2s, border-color .2s, box-shadow .15s, transform .15s; }
select.tf-pill:hover { box-shadow: 0 2px 8px rgba(3, 20, 40, .16); transform: translateY(-1px); }
span.tf-pill { display: flex; align-items: center; justify-content: center; text-align: center; cursor: default; }
.tf-time { grid-column: 1 / -1; position: relative; height: 6px; margin: 3px 0 2px; border-radius: 3px; background: var(--line-2); cursor: help; }
.tf-time i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--st, var(--accent)); transition: width .4s ease-out, background .2s; }
.tf-time b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid var(--surface); border-radius: 50%; box-sizing: border-box; background: var(--st, var(--accent)); box-shadow: 0 1px 3px rgba(3, 20, 40, .35); transition: left .4s ease-out, background .2s, transform .15s; }
.tf-time:hover b { transform: scale(1.3); }
.tf-time.late i, .tf-time.late b { background: #C62828; }
.hl-task.is-done .tf-time i, .hl-task.is-done .tf-time b { width: 100% !important; background: var(--ok); }
.hl-task.is-done .tf-time b { left: 100% !important; width: 12px !important; }
.hl-task.is-done .tf-note { display: none; }
.hl-task.is-done { opacity: .72; }
.card[data-status-group][hidden] { display: none; }
.tf-group .task-rows { margin-top: 2px; }
.tf-board { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; padding-top: 6px; border-top: 1px solid var(--line-2); }
.tf-board .tf-wide { grid-column: 1 / -1; }
.board-card .task-move { flex-wrap: wrap; }
.board-card .task-move .tf-label { flex-basis: 100%; }
@media (max-width: 980px) {
  .hl-task { grid-template-columns: auto minmax(0, 1fr); }
  .hl-task > .tf { grid-column: 2; }
}
@media (max-width: 560px) {
  .hl-task { gap: 8px 10px; padding: 10px 10px 10px 13px; }
  .hl-task > .tf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .tf-pill { min-height: 38px; }
}
@media (max-width: 300px) {
  .hl-task > .tf { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .tf-pill { border-color: var(--line); background: none; }
}
@supports (-webkit-touch-callout: none) {
  select.tf-pill { font-size: 16px; }
}

/* Engineer workload on Home */
.wl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.wl-head h2 { margin: 0; }
.wl-top { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 18px; border-radius: 14px; background: linear-gradient(120deg, #F1F9FC, #F8FBFD 60%, #EEF7F4); border: 1px solid var(--line-2); }
.wl-ring { position: relative; width: 148px; height: 148px; }
.wl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.wl-ring circle { fill: none; stroke-width: 4.200; }
.wl-ring-track { stroke: var(--line-2); }
.wl-ring-seg { transition: stroke-dasharray .5s ease-out, stroke-dashoffset .5s ease-out, stroke-width .15s; cursor: help; }
.wl-ring-seg:hover { stroke-width: 5.400; }
.wl-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.wl-ring-text b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.wl-ring-text small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.wl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; min-width: 0; }
.wl-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px 10px 14px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 3px rgba(3, 20, 40, .08); border-left: 4px solid var(--c); transition: transform .15s, box-shadow .15s; }
.wl-stat:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(3, 20, 40, .13); }
.wl-stat[hidden] { display: none; }
.wl-stat b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wl-stat span { color: var(--ink-2); font-size: 12px; line-height: 1.25; }
.s-down { --c: #C62828; } .s-busy { --c: #2A78D6; } .s-free { --c: #1BAF7A; } .s-wait { --c: #E89B0C; }
.wl-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.wl-tools[hidden] { display: none; }
.wl-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-key { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; transition: opacity .15s, background .15s, transform .15s; }
.wl-key:hover { transform: translateY(-1px); background: var(--ground); }
.wl-key i { width: 11px; height: 11px; border-radius: 3px; }
.wl-key b { font-variant-numeric: tabular-nums; }
.wl-key[aria-pressed=false] { background: var(--grey-bg); color: var(--muted); text-decoration: line-through; }
.wl-key[aria-pressed=false] i { background: none !important; box-shadow: inset 0 0 0 1.500px var(--muted); }
.wl-rows { display: flex; flex-direction: column; gap: 6px; }
.wl-row { border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; animation: hl-in .35s ease-out backwards; animation-delay: calc(var(--i) * 40ms); }
.wl-row[hidden] { display: none; }
.wl-row:hover { border-color: var(--line); box-shadow: 0 3px 12px rgba(3, 20, 40, .09); }
.wl-row[open] { border-color: var(--accent); box-shadow: 0 4px 14px rgba(3, 20, 40, .1); }
.wl-row summary { display: grid; grid-template-columns: auto minmax(110px, 190px) minmax(0, 1fr) 34px 18px; gap: 12px; align-items: center; padding: 9px 12px; cursor: pointer; list-style: none; border-radius: 12px; }
.wl-row summary::-webkit-details-marker { display: none; }
.wl-avatar { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; transition: transform .15s; }
.wl-row:hover .wl-avatar { transform: scale(1.08); }
.wl-avatar-none { background: var(--warn-bg); color: var(--warn-ink); box-shadow: inset 0 0 0 1.500px var(--warn-line); }
.wl-none { border-style: dashed; border-color: var(--warn-line); background: #FFFCF6; }
.wl-who { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.wl-bar { position: relative; display: flex; gap: 2px; height: 20px; min-width: 0; border-radius: 6px; background: var(--ground); overflow: hidden; }
.wl-part { display: block; flex: none; height: 100%; background-image: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 60%); transition: width .5s cubic-bezier(.2, .8, .3, 1), filter .15s; }
.wl-part:hover { filter: brightness(1.12); }
.wl-part[style*="width: 0"] { margin-left: -2px; }
.wl-idle { display: none; position: absolute; inset: 0; align-items: center; padding-left: 9px; color: var(--ok-ink); font-size: 12px; font-weight: 600; }
.wl-free .wl-idle { display: flex; }
.wl-free .wl-bar { background: var(--ok-bg); }
.wl-total { font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.wl-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.wl-row[open] .wl-chev { transform: rotate(90deg); stroke: var(--accent); }
.wl-panel { display: flex; flex-direction: column; gap: 6px; padding: 2px 12px 11px 62px; animation: hl-in .22s ease-out; }
.wl-panel p { margin: 0; }
.wl-jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wl-jobs li[hidden] { display: none; }
.wl-job { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; transition: background .15s; }
.wl-job:hover { background: var(--ground); }
.wl-job:hover strong { text-decoration: underline; }
.wl-job i { width: 10px; height: 10px; border-radius: 50%; }
.wl-job-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.wl-job-main strong { font-size: 13px; font-weight: 600; }
.wl-job-kind { white-space: nowrap; }
.wl-panel-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.wl-panel-foot a { margin-left: auto; }
@media (max-width: 720px) {
  .wl-top { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 12px; }
  .wl-ring { width: 128px; height: 128px; }
  .wl-stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .wl-tools .hl-scope { align-self: flex-start; }
  .wl-key { min-height: 36px; }
  .wl-row summary { grid-template-columns: auto minmax(0, 1fr) auto 18px; gap: 6px 10px; padding: 10px; }
  .wl-bar { grid-column: 1 / -1; grid-row: 2; }
  .wl-panel { padding: 0 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .wl-row, .wl-panel, .wl-part, .wl-ring-seg, .wl-stat, .wl-avatar, .wl-chev { animation: none !important; transition: none !important; }
}
@media print {
  .wl-tools, .wl-legend button { display: none !important; }
}

/* Mobile X-Ray drawing */
.eq-handle { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.eq-arm { animation: eq-arm 5s ease-in-out infinite alternate; }
@keyframes eq-arm { to { transform: translateY(3px); } }

/* Customer Portal: Training resources */
.homebtn:has(+ .cp-tab) { margin-right: 0; }
.cp-tab.on { background: rgba(0, 229, 255, .22); }
.cp-soon { align-items: center; gap: 8px; padding-block: 36px; text-align: center; }
.cp-soon svg { width: 54px; height: 54px; fill: none; stroke: var(--accent); stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; animation: eq-pulse 2.6s ease-in-out infinite; }
.cp-soon h2, .cp-soon p { margin: 0; }
@media (max-width: 860px) {
  .cp-tab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .eq-arm, .cp-soon svg { animation: none !important; }
}

/* Repair lab: the ticket's section and the home page block */
.tk-at_repair_lab i { background: #1BAF7A; animation: eq-pulse 1.6s ease-in-out infinite; }
.rl-part { padding: 12px 0; border-top: 1px solid var(--line-2); }
.rl-part:first-of-type { border-top: 0; padding-top: 4px; }
.rl-back { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; margin-top: 10px; padding: 12px; background: var(--ground); border-radius: 10px; }
.rl-send { border-top: 1px solid var(--line-2); padding-top: 12px; }
.rl-send summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.rl .ar-stat strong { font-size: 26px; line-height: 1.15; }
.rl-busy { color: #9A5B00; } .rl-good { color: var(--ok-ink); }
.rl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 24px; margin-top: 8px; }
.rl-head { font-size: 14px; margin: 0 0 6px; }
.rl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.rl-row:hover strong { color: var(--accent); }
.rl-what { display: flex; flex-direction: column; min-width: 0; }
.rl-what strong, .rl-what span { overflow-wrap: anywhere; }
.rl-key { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.rl-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.ht-icon .ht-word { fill: currentColor; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.ht-icon .ht-labdot { fill: currentColor; stroke: none; }

/* Home as a compact dashboard: cards sit side by side and long lists scroll inside their own card. */
main:has(> .hm-head) { gap: 14px; padding-top: 16px; }
main > .headrow.hm-head { flex-wrap: nowrap; padding: 10px 22px; }
.hm-head h1 { margin: 0; font-size: 22px; }
.hm-head p { margin: 1px 0 0; font-size: 13px; }
.hm-head .banner-art { width: 58px; margin: -4px 14px -4px auto; }
.hm-head .banner-art::before { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
main:has(> .hm-head) .card { padding: 13px 16px; gap: 8px; }
main:has(> .hm-head) .card h2 { margin: 0; font-size: 16px; }
.hm-row { display: grid; gap: 14px; min-width: 0; }
.hm-row > * { min-width: 0; }
.hm-fill { min-height: 0; overflow: hidden; }
.hm-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.hm-scroll, .hm-now .hl-list, .hm-eq .rg-panel .grid, .wl-rows, .rt-rows, .rx-list { scrollbar-width: thin; }
.hm-short { max-height: 190px; }
.hm-uptime { display: flex; align-items: center; gap: 10px; }
.hm-uptime .hero { font-size: 32px; flex: none; }
.hm-uptime p { margin: 0; line-height: 1.25; }
.hm-three .donut { width: 118px; flex: 0 0 118px; }
.hm-three .donut-row { flex-wrap: nowrap; }
.hm-three .legend-list { gap: 4px; font-size: 13px; }
.hm-three .legend { font-size: 12px; }

/* Blocks */
.hm-blocks { gap: 10px; }
.hm-blocks .ht { min-height: 76px; padding: 9px 50px 9px 12px; justify-content: center; }
.hm-blocks .ht .label { font-size: 12px; line-height: 1.25; }
.hm-blocks .ht .value { font-size: 26px; line-height: 1.15; }
.hm-blocks .ht-icon { right: 8px; width: 38px; height: 38px; margin-top: -19px; padding: 4px; border-radius: 11px; }

/* Tasks and what needs attention */
.hm-now .hl { min-height: 0; overflow: hidden; }
.hm-now .hl-head { gap: 12px; }
.hm-now .hl-ring { width: 46px; height: 46px; flex: none; }
.hm-now .hl-title { gap: 3px; }
.hm-now .hl-chip { min-height: 28px; font-size: 12px; }
.hm-now .hl-list { flex: 1 1 0; min-height: 0; max-height: none; }
.hm-now .hl-task { grid-template-columns: auto minmax(0, 1fr) minmax(0, 2.300fr); gap: 6px 10px; padding: 7px 8px 7px 12px; }
.hm-now .tf { gap: 6px 8px; }
.hm-now .tf-val { font-size: 12px; }
.hm-now .tf-name { display: none; }
.hm-now .tf-pill { font-size: 12px; min-height: 28px; }
.hm-now .list-row, .hm-now .row { flex-wrap: nowrap; }

/* Equipment */
.hm-eq .rg-tabs { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.hm-eq .rg-tab { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: center; padding: 6px 12px; }
.hm-eq .rg-tab strong { grid-column: 1; }
.hm-eq .rg-tab .small { grid-column: 1; font-size: 12px; }
.hm-eq .rg-tab .badge { grid-column: 2; grid-row: 1 / 3; }
.hm-eq .rg-panel { gap: 6px; }
.hm-eq .eq-card { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 1px 10px; align-items: center; padding: 7px 10px; }
.hm-eq .eq-card .eq { grid-row: 1 / 4; width: 60px; margin: 0; }
.hm-eq .eq-card strong { font-size: 13px; line-height: 1.2; }
.hm-eq .eq-card .small { font-size: 11.500px; line-height: 1.25; }
.hm-eq .eq-card .badge { justify-self: start; }

/* Engineer workload */
.hm-row .wl-top { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 8px 12px; }
.hm-row .wl-ring { width: 84px; height: 84px; }
.hm-row .wl-ring-text b { font-size: 21px; }
.hm-row .wl-ring-text small { margin-top: 0; font-size: 10px; }
.hm-row .wl-stats { gap: 8px; }
.hm-row .wl-stat { padding: 6px 8px 6px 10px; }
.hm-row .wl-stat b { font-size: 20px; }
.hm-row .wl-key { min-height: 26px; font-size: 12px; }
.hm-row .wl-rows { max-height: 246px; overflow-y: auto; gap: 4px; }
.hm-row .wl-row { flex-shrink: 0; }
.hm-row .wl-row summary { padding: 5px 10px; }
.hm-row .wl-avatar { width: 30px; height: 30px; font-size: 11px; }
.hm-row .wl-bar { height: 16px; }
.hm-team .wl-row summary { grid-template-columns: auto minmax(90px, 150px) minmax(0, 1fr) 26px 16px; gap: 10px; }
.hm-team .rt-rows { max-height: 410px; overflow-y: auto; }
.hm-team .rt-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px 0; }
.hm-team .rt-name { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }

@media (min-width: 721px) {
  .grid.hm-blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-three .chart-scroll .chart { min-width: 0; }
  .hm-eq .rg-panel .grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; max-height: 172px; overflow-y: auto; }
  .hm-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 981px) {
  .grid.hm-blocks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hm-now { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); height: 410px; }
  .hm-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-team { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
}
@media (max-width: 980px) {
  .hm-now .hl-list { flex: none; max-height: 420px; }
  .hm-now .hl-task { grid-template-columns: auto minmax(0, 1fr); }
  .hm-now .hm-scroll { max-height: 340px; }
}
@media (max-width: 720px) {
  main:has(> .hm-head) { padding-top: 12px; gap: 10px; }
  main > .headrow.hm-head { padding: 10px 14px; }
  .hm-head h1 { font-size: 19px; }
  .hm-row { gap: 10px; }
  .hm-blocks .ht { min-height: 68px; }
  .hm-now .hl-list { max-height: 340px; }
  .hm-now .hm-scroll { max-height: 280px; }
  .hm-now .hl-tools { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
  .hm-now .hl-chips { flex-wrap: nowrap; }
  .hm-eq .rg-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-eq .rg-panel .grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .hm-eq .eq-card { scroll-snap-align: start; }
  .hm-row .wl-rows { max-height: 280px; }
  .hm-row .wl-top { grid-template-columns: 76px minmax(0, 1fr); justify-items: stretch; }
  .hm-row .wl-ring { width: 76px; height: 76px; }
  .hm-row .wl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .hm-team .rt-rows { max-height: 280px; }
}

/* Repair Lab: a dark instrument panel, to match the banner and the Service Center screen. */
.card.rx { position: relative; overflow: hidden; isolation: isolate; border: 0; gap: 10px; color: #fff; background: radial-gradient(90% 150% at 100% 0, rgba(15, 110, 145, .55), transparent 60%), radial-gradient(60% 120% at 0 100%, rgba(30, 123, 74, .22), transparent 65%), linear-gradient(120deg, var(--brand-deep), #0A2A44); box-shadow: 0 10px 28px rgba(3, 20, 40, .22); }
.card.rx::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(143, 243, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 243, 255, .05) 1px, transparent 1px); background-size: 26px 26px; }
.rx :is(strong, b, h2, h3) { color: #fff; }
.rx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.rx-period, .rx-sub { color: #A9C7DB; font-size: 12px; line-height: 1.25; }
.rx-head a { margin-left: auto; color: #9FEFFF; font-size: 13px; }
.rx-top { display: grid; grid-template-columns: minmax(0, 2.200fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rx-flow, .rx-gauge, .rx-panel { min-width: 0; border: 1px solid rgba(143, 243, 255, .16); border-radius: 12px; background: rgba(255, 255, 255, .05); }
.rx-cap { color: #fff; font-size: 12px; font-weight: 600; line-height: 1.25; }

/* The journey of a part */
.rx-flow { display: grid; grid-template-columns: auto minmax(30px, 1fr) auto minmax(30px, 1fr) auto; align-items: start; padding: 10px 12px; }
.rx-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; text-align: center; }
.rx-disc { display: grid; place-items: center; width: 52px; height: 52px; margin: 8px 0 4px; box-sizing: border-box; border: 1.500px solid rgba(143, 243, 255, .5); border-radius: 50%; background: rgba(0, 229, 255, .08); }
.rx-disc svg { width: 26px; height: 26px; fill: none; stroke: #8FF3FF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rx-disc-ok { border-color: rgba(75, 227, 160, .6); background: rgba(75, 227, 160, .1); }
.rx-disc-ok svg { stroke: #4BE3A0; stroke-width: 2.800; }
.rx-tick { stroke-dasharray: 1; animation: rx-tick 3.600s ease-in-out infinite; }
.rx-gears { display: block; width: 68px; height: 68px; }
.rx-gears svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rx-gear { transform-box: fill-box; transform-origin: center; }
.rx-gears circle { fill: none; }
.rx-teeth { stroke: #3FC8E4; stroke-width: 7; stroke-dasharray: 4 4; }
.rx-rim { stroke: #8FF3FF; stroke-width: 1.500; fill: rgba(7, 40, 63, .9) !important; }
.rx-gear-small .rx-teeth { stroke-width: 4; stroke-dasharray: 2 2; stroke: #4BE3A0; }
.rx-gear-small .rx-rim { stroke: #4BE3A0; }
.is-live .rx-gear { animation: eq-spin 9s linear infinite; }
.is-live .rx-gear-small { animation: rx-spin-back 3s linear infinite; }
.is-live .rx-gears { filter: drop-shadow(0 0 7px rgba(63, 224, 245, .55)); }
.rx-bench { width: 124px; }
.rx-count { position: absolute; top: 34px; left: 50%; transform: translate(-50%, -50%); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.rx .rx-busy { color: #FFD27A; }
.rx-cap b { font-variant-numeric: tabular-nums; }
.rx-track { position: relative; height: 22px; margin-top: 23px; overflow: hidden; background: repeating-linear-gradient(90deg, rgba(143, 243, 255, .35) 0 8px, transparent 8px 16px) center / 100% 2px no-repeat; }
.rx-track i { display: none; position: absolute; top: 2px; left: 38%; padding: 0 6px; border-radius: 9px; background: var(--brand-cyan); color: var(--brand-deep); font-size: 10px; font-weight: 700; font-style: normal; line-height: 18px; box-shadow: 0 0 10px rgba(0, 229, 255, .7); }
.is-live > .rx-track i, .rx-track.is-live i { display: block; animation: rx-carry 4s linear infinite; }
.rx-track i + i { animation-delay: -2s !important; }
.rx-track.is-live i { background: #4BE3A0; box-shadow: 0 0 10px rgba(75, 227, 160, .7); }
.rx-flow:not(.is-live) > .rx-track:not(.is-live) { opacity: .55; }

/* Gauges */
.rx-gauge { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.rx-gauge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rx-dial { position: relative; flex: none; width: 78px; height: 78px; }
.rx-dial svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.rx-dial circle { fill: none; stroke-width: 3.200; stroke-linecap: round; }
.rx-dial-track { stroke: rgba(143, 243, 255, .16); }
.rx-dial-value { stroke: url(#rx-rate); transition: stroke-dasharray 1.300s cubic-bezier(.2, .8, .3, 1); filter: drop-shadow(0 0 2px rgba(63, 224, 245, .8)); }
.rx-dial strong { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; font-variant-numeric: tabular-nums; }
.rx-watch { flex: none; width: 66px; height: 66px; }
.rx-watch svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; }
.rx-w-line { stroke: #8FF3FF; stroke-width: 2.200; }
.rx-w-dash { stroke: rgba(143, 243, 255, .35); stroke-width: 2; stroke-dasharray: 1 4; }
.rx-w-hand { stroke: #FFD27A; stroke-width: 2.400; transform-origin: 24px 27px; }
.rx-w-pin { fill: #FFD27A; }
.rx-watch.is-live .rx-w-hand { animation: eq-spin 5s steps(60) infinite; }
.rx-time { font-size: 21px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Pending parts and parts back */
.rx-bottom { display: grid; grid-template-columns: minmax(0, 1.500fr) minmax(0, 1fr); gap: 10px; }
.rx-panel { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.rx-panel h3 { margin: 0; font-size: 13px; }
.rx-panel h3 span { margin-left: 6px; color: #A9C7DB; font-size: 12px; font-weight: 400; }
.rx-list { display: flex; flex-direction: column; gap: 2px; max-height: 142px; overflow-y: auto; scrollbar-color: rgba(143, 243, 255, .4) transparent; }
.rx-part { flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline; padding: 5px 8px; border-radius: 8px; color: #fff; text-decoration: none; transition: background .15s; }
.rx-part:hover { background: rgba(143, 243, 255, .1); color: #fff; }
.rx-part-what { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; min-width: 0; }
.rx-part-what strong { font-size: 13px; overflow-wrap: anywhere; }
.rx-part-what span { color: #A9C7DB; font-size: 12px; overflow-wrap: anywhere; }
.rx-part-time { color: #8FF3FF; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-part-time.slow { color: #FFD27A; } .rx-part-time.late { color: #FF9D94; }
.rx-age { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: rgba(143, 243, 255, .13); overflow: hidden; }
.rx-age i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1E9FC4, #3FE0F5); transition: width 1s cubic-bezier(.2, .8, .3, 1); transition-delay: calc(var(--i) * 90ms); }
.rx-age.slow i { background: linear-gradient(90deg, #C98A1B, #FFD27A); }
.rx-age.late i { background: linear-gradient(90deg, #C8473E, #FF9D94); }
.rx-none { display: flex; align-items: center; gap: 10px; margin: auto 0; color: #C7D9E8; font-size: 13px; line-height: 1.35; }
.rx-none svg { flex: none; width: 34px; height: 34px; padding: 6px; box-sizing: border-box; border-radius: 50%; background: rgba(75, 227, 160, .14); fill: none; stroke: #4BE3A0; stroke-width: 2.600; stroke-linecap: round; stroke-linejoin: round; }
.rx-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 104px; }
.rx-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; height: 100%; }
.rx-col-num { min-height: 15px; font-size: 11px; font-weight: 700; line-height: 15px; font-variant-numeric: tabular-nums; }
.rx-col-stack { flex: 0 1 auto; display: flex; flex-direction: column; gap: 2px; width: min(70%, 34px); max-height: calc(100% - 34px); min-height: 2px; border-radius: 4px 4px 0 0; overflow: hidden; background: rgba(143, 243, 255, .2); transform-origin: bottom; transition: transform .8s cubic-bezier(.2, .8, .3, 1); transition-delay: calc(var(--i) * 80ms); }
.rx-col-stack i { display: block; flex: 1 1 0; min-height: 2px; }
.rx-col-stack .good, .rx-key .good { background: #4BE3A0; }
.rx-col-stack .bad, .rx-key .bad { background: #FF9D94; }
.rx-col-label { margin-top: 3px; padding-top: 2px; width: 100%; border-top: 1px solid rgba(143, 243, 255, .25); color: #A9C7DB; font-size: 11px; text-align: center; }
.rx-col:hover .rx-col-stack { filter: brightness(1.15); }
.rx-key { display: flex; flex-wrap: wrap; gap: 2px 14px; color: #C7D9E8; font-size: 12px; }
.rx-key i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; }
@media screen {
  .rx-wait .rx-dial-value { stroke-dasharray: 0 100; }
  .rx-wait .rx-age i { width: 0 !important; }
  .rx-wait .rx-col-stack { transform: scaleY(0); }
}
@keyframes rx-carry { from { left: -40px; } to { left: 100%; } }
@keyframes rx-spin-back { to { transform: rotate(-360deg); } }
@keyframes rx-tick { 0% { stroke-dashoffset: 1; } 30%, 100% { stroke-dashoffset: 0; } }
@media (max-width: 980px) {
  .rx-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-flow { grid-column: 1 / -1; }
  .rx-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .rx-head a { margin-left: 0; }
  .rx-node, .rx-bench { width: 78px; }
  .rx-track i + i { display: none !important; }
  .rx-gauge { flex-direction: column; text-align: center; padding: 10px 6px; }
  .rx-gauge-text { align-items: center; }
  .rx-time { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-track i + i { display: none !important; }
  .rx-track i, .rx-gear, .rx-tick, .rx-w-hand { animation: none !important; }
  .rx-dial-value, .rx-age i, .rx-col-stack { transition: none !important; }
}
@media print {
  .card.rx { background: none; color: #000; box-shadow: none; border: 1px solid #999; }
  .rx :is(strong, b, h2, h3, a, .rx-cap, .rx-sub, .rx-period, .rx-part, .rx-part-what span, .rx-part-time, .rx-col-label, .rx-key, .rx-none) { color: #000 !important; }
  .rx-track { visibility: hidden; }
  .hm-now { height: auto; }
  .hm-scroll, .hm-now .hl-list, .hm-row .wl-rows, .hm-team .rt-rows, .rx-list, .hm-eq .rg-panel .grid { max-height: none !important; overflow: visible !important; }
}

/* Charts in a third of the page draw smaller, so their words stay readable at a larger drawing size. */
@media (min-width: 721px) {
  .hm-three :is(.chart-columns, .chart-trend) { overflow: visible; }
  .hm-three :is(.chart-columns, .chart-trend) text { font-size: 17px; }
}

/* An engineer's Home: only their own work, with plenty of space. */
main:has(> .en-hello) { gap: 16px; }
.en-hello h1 { margin: 0; font-size: 26px; }
.en-hello p { margin: 2px 0 0; }
.en-day { display: grid; grid-template-columns: minmax(0, 1.200fr) minmax(0, 1fr); gap: 14px; }
.en-next { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 124px; padding: 18px 60px 18px 22px; box-sizing: border-box; border-radius: 14px; background: linear-gradient(115deg, var(--brand-deep), #0B5470); color: #fff; text-decoration: none; box-shadow: 0 8px 22px rgba(3, 20, 40, .18); transition: transform .18s, box-shadow .18s; }
.en-next:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(3, 20, 40, .24); }
.en-next-top { display: flex; align-items: center; gap: 8px; color: #9FEFFF; font-size: 13px; font-weight: 600; }
.en-next strong { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.en-next-note { color: #C7D9E8; font-size: 14px; }
.en-next svg { position: absolute; right: 20px; top: 50%; width: 26px; height: 26px; margin-top: -13px; fill: none; stroke: var(--brand-cyan); stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.en-next:hover svg { transform: translateX(4px); }
.en-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-cyan); animation: myday-pulse 2s ease-out infinite; }
.en-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.en-figs a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.en-figs a:hover { border-color: var(--accent); transform: translateY(-2px); }
.en-figs b { font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.en-figs a > span { color: var(--muted); font-size: 13px; line-height: 1.25; }
.en-figs a.late b, .en-figs a.late > span { color: var(--bad-ink); }
.en-search { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.en-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 170, 205, .22); }
.en-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
main:not(.sg-panel) .en-search input { flex: 1 1 auto; min-width: 0; width: auto; padding: 6px 0; border: 0; background: none; box-shadow: none; outline: 0; }
.en-lists { display: grid; grid-template-columns: minmax(0, 1.300fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.en-list { gap: 4px; padding: 16px 20px; }
.en-list > .row { margin-bottom: 6px; }
.en-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.en-row:hover strong { color: var(--accent); }
.en-row .badge { flex: none; }
.en-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.en-main strong { font-size: 14px; overflow-wrap: anywhere; transition: color .15s; }
.en-main span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.en-when { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.en-when.late { color: var(--bad-ink); font-weight: 600; }
.en-date { flex: none; display: flex; flex-direction: column; align-items: center; width: 44px; padding: 3px 0; border-radius: 9px; background: var(--ground); line-height: 1.1; }
.en-date small { color: var(--muted); font-size: 11px; }
.en-date b { font-size: 18px; font-variant-numeric: tabular-nums; }
.en-date.late { background: var(--bad-bg); }
.en-date.late b { color: var(--bad-ink); }
.en-clear { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 14px; }
.en-clear svg { flex: none; width: 26px; height: 26px; padding: 5px; box-sizing: border-box; border-radius: 50%; background: var(--ok-bg); fill: none; stroke: var(--ok); stroke-width: 2.800; stroke-linecap: round; stroke-linejoin: round; }
.en-more { padding-top: 6px; }
.en-tasks .hl { gap: 8px; padding: 16px 20px; }
.en-tasks :is(.hl-tools, .hl-ring, .hl-bar, .tf-time, .tf-label) { display: none; }
.en-tasks .tf > .tf-cell:nth-child(-n+2) { display: none; }
.en-tasks .hl-list { max-height: none; }
.en-tasks .hl-title-row { align-items: baseline; }
.en-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 14px; }
.en-full { margin-left: auto; color: var(--muted); }
@media (min-width: 721px) {
  .en-tasks .hl-task { grid-template-columns: auto minmax(0, 1fr) minmax(0, 340px); }
  .en-tasks .tf { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
}
@media (max-width: 860px) {
  .en-day, .en-lists { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  main:has(> .en-hello) { gap: 12px; }
  .en-hello h1 { font-size: 22px; }
  .en-next { min-height: 104px; padding: 14px 52px 14px 16px; }
  .en-next strong { font-size: 18px; }
  .en-figs { gap: 8px; }
  .en-figs a { padding: 10px 12px; }
  .en-figs b { font-size: 26px; }
  .en-list, .en-tasks .hl { padding: 14px; }
  .en-row:has(.badge) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .en-row:has(.badge) .badge { justify-self: start; }
  .en-row:has(.badge) .en-main { grid-column: 1 / -1; grid-row: 2; }
  .en-row:has(.badge) .en-when { grid-column: 2; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .en-dot { animation: none; }
  .en-next, .en-next svg, .en-figs a { transition: none; }
  .en-next:hover, .en-figs a:hover { transform: none; }
}

/* The theme switch, at the top right of every page. */
.top .th { position: relative; display: inline-flex; flex: none; gap: 2px; padding: 3px; border: 1px solid rgba(0, 229, 255, .3); border-radius: 18px; background: rgba(255, 255, 255, .06); }
.top-in > .th:first-of-type { margin-left: 0; }
.th button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--nav-muted); cursor: pointer; transition: background .15s, color .15s; }
.th button:hover { color: #fff; background: rgba(0, 229, 255, .12); }
.th button[aria-pressed=true] { background: var(--brand-cyan); color: var(--brand-deep); box-shadow: 0 0 10px rgba(0, 229, 255, .45); }
.th button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.th svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top-in:not(:has(.me)) > .th { margin-left: auto; }
html.theme-changing, html.theme-changing body, html.theme-changing :is(.card, .tile, .top, main, input, select, textarea, .btn, table, td, th) { transition: background-color .3s, border-color .3s, color .3s !important; }
@media print { .th { display: none !important; } }

/* Profile photos */
.avatar { overflow: hidden; }
.avatar > img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.ph-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.ph-big { flex: none; width: 96px; height: 96px; border-radius: 50%; font-size: 30px; }
.ph-tools { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
form.ph-tools { flex-direction: row; flex-wrap: wrap; align-items: center; }
.ph-tools input[type=file] { flex: 1 1 200px; min-width: 0; max-width: 100%; padding: 6px; }
.linkbtn.ph-remove { padding: 4px 0; color: var(--bad-ink); text-decoration: underline; }
.linkbtn.ph-remove:hover { color: var(--bad); }
.ph-nudge { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; border-color: var(--soft-blue-line); background: var(--soft-blue); }
.card.ph-nudge[hidden] { display: none; }
.ph-nudge-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.ph-nudge .avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; }
.linkbtn.ph-later { color: var(--muted); }
.linkbtn.ph-later:hover { color: var(--ink); }

/* The dark theme: the same deep navy as the Repair Lab block, for the whole portal. Screens only, so printing stays on white. */
/* A ticket's assignment: accept or reject, and what a coordinator sees while waiting. */
.ag { gap: 10px; border-left: 4px solid var(--accent); }
.ag h2 { margin: 0; }
.ag p { margin: 0; }
.ag-alert { border-left-color: var(--bad); }
.ag-ask { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.ag-ask > .ag-top, .ag-ask > p { grid-column: 1 / -1; }
.ag-ask form { margin: 0; }
.ag-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.ag-clock { font-size: 18px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.ag-clock.late { color: var(--bad-ink); }
.ag-go { width: 100%; min-height: 52px; font-size: 16px; font-weight: 600; }
.ag-reject summary { display: flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; }
.ag-reject summary::-webkit-details-marker { display: none; }
.ag-reject form { margin-top: 10px; }
.ag-reason { white-space: pre-wrap; }
.ag-move { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ag-move .field { flex: 1 1 240px; margin: 0; }
.ag-list { margin-bottom: 16px; }
.ag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.ag-row:hover .ag-main strong { text-decoration: underline; }
.ag-main { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; }
.ag-main span { color: var(--muted); font-size: 13px; }
.ag-why { flex: 1 1 240px; min-width: 0; color: var(--bad-ink); font-size: 13px; overflow-wrap: anywhere; }
.tk-answer { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.tk-answer.late { color: var(--bad-ink); font-weight: 600; }
@media (max-width: 560px) {
  .ag-ask { grid-template-columns: minmax(0, 1fr); }
}

@media screen {
  html[data-theme=dark] {
    color-scheme: dark;
    --accent: #4CC9E8; --accent-dark: #8FF3FF; --navy-2: #2B5A73;
    --ink: #F1F7FB; --ink-2: #D5E2EA; --muted: #A9C7DB;
    --ground: #06182A; --surface: #0D2639; --line: #24465C; --line-2: #1B3A4F; --field: #3D6076;
    --soft-blue: #0F3347; --soft-blue-line: #1E5570; --soft-blue-ink: #9FEFFF;
    --ok: #2FAE72; --ok-ink: #6FE8B3; --ok-bg: #0F3327; --ok-line: #1F6B4C;
    --warn-ink: #FFD27A; --warn-ink-2: #FFD27A; --warn-bg: #3A2C0E; --warn-line: #7A5A1C;
    --bad: #E5534B; --bad-ink: #FF9D94; --bad-bg: #3A1A1E; --bad-line: #7D3236;
    --grey-bg: #1A3A4E; --mark: #6B5300;
    --hover: rgba(143, 243, 255, .07); --field-bg: #0A2134;
  }
  html[data-theme=dark] body { background: radial-gradient(90% 60% at 100% 0, rgba(15, 110, 145, .22), transparent 60%) no-repeat, var(--ground); background-attachment: fixed; }
  :where(html[data-theme=dark]) a { color: #7FDCF2; }
  :where(html[data-theme=dark]) a:hover { color: #B6F4FF; }
  html[data-theme=dark] :is(.card, .tile, .eq-card, .t-stat, .mc, .hl-task, .wl-row, .rg-tab) { box-shadow: 0 1px 0 rgba(143, 243, 255, .05) inset; }

  /* Fields and buttons */
  html[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { background-color: var(--field-bg); color: var(--ink); border-color: var(--field); }
  html[data-theme=dark] ::placeholder { color: #86A3B6; }
  html[data-theme=dark] .btn { background: #147FA3; border-color: #147FA3; color: #fff; }
  html[data-theme=dark] .btn:hover { background: #1A93BB; border-color: #1A93BB; color: #fff; }
  html[data-theme=dark] .btn.green { background: #1E7B4A; border-color: #1E7B4A; }
  html[data-theme=dark] .btn.green:hover { background: #248F57; border-color: #248F57; }
  html[data-theme=dark] :is(.btn.secondary, .btn.outline, .btn.green-outline, .btn.danger) { background: var(--surface); }
  html[data-theme=dark] :is(.btn.secondary, .btn.outline, .btn.green-outline, .btn.danger):hover { background: var(--soft-blue); }
  html[data-theme=dark] .btn.secondary { color: var(--ink); border-color: var(--field); }
  html[data-theme=dark] .btn.outline { color: var(--accent); border-color: var(--accent); }
  html[data-theme=dark] .btn.green-outline { color: var(--ok-ink); border-color: var(--ok); }
  html[data-theme=dark] .btn.danger { color: var(--bad-ink); border-color: var(--bad); }
  html[data-theme=dark] :is(.banner, main > .headrow:has(h1)) .btn:not(.secondary):not(.outline):not(.danger) { background: var(--brand-cyan); border-color: var(--brand-cyan); color: var(--brand-deep); }
  html[data-theme=dark] .seg label, html[data-theme=dark] .task-tick { background: var(--field-bg); }
  html[data-theme=dark] .seg input.na:checked + label { background: #4A6A7E; border-color: #4A6A7E; }
  html[data-theme=dark] .prio label:has(input:checked) { background: var(--soft-blue); }
  html[data-theme=dark] .hl-check { background: var(--field-bg); border-color: #6F8EA2; }
  html[data-theme=dark] .hl-check.off { background: none; }
  html[data-theme=dark] .hl-check[aria-pressed=true] { background: var(--ok); border-color: var(--ok); }
  html[data-theme=dark] .hl-chip[aria-pressed=true] { background: linear-gradient(115deg, #0B5470, #147FA3); }
  html[data-theme=dark] .hl-scope button[aria-pressed=true], html[data-theme=dark] .t-views a.on { background: #24465C; color: #fff; }
  html[data-theme=dark] .linkbtn:not(.ph-remove):not(.ph-later) { color: var(--nav-muted); }
  html[data-theme=dark] main .linkbtn:not(.ph-remove):not(.ph-later) { color: #7FDCF2; }

  /* Lists and tables */
  html[data-theme=dark] table.data th { background: #102C41; }
  html[data-theme=dark] table.data tbody tr:not(.task-group):hover, html[data-theme=dark] :is(a.list-row, .pm-line, .pmrow, .hl-task):hover { background: var(--hover); }
  html[data-theme=dark] .pm-line:hover > .sys { background: #123146; }
  html[data-theme=dark] .pmrow .now { background: #123A50; }
  html[data-theme=dark] .task-group th { background: linear-gradient(90deg, color-mix(in srgb, var(--st) 22%, var(--surface)), var(--surface) 55%); }
  html[data-theme=dark] .dot.due { background: var(--surface); }
  html[data-theme=dark] .avatar.sm { box-shadow: 0 0 0 2px var(--surface); }
  html[data-theme=dark] .wl-top { background: linear-gradient(120deg, #123146, #0F2B3F 60%, #123A36); }
  html[data-theme=dark] .wl-stat { background: #0A2134; box-shadow: none; }
  html[data-theme=dark] .wl-none { background: #2A2412; }
  html[data-theme=dark] .wl-avatar-none { background: var(--warn-bg); }
  html[data-theme=dark] tr.tk-p-down { background: linear-gradient(90deg, #3A1A1E, var(--surface) 45%); }
  html[data-theme=dark] .timeline li::before { background: #6F8EA2; }
  html[data-theme=dark] .pm-track-fill::after { background: var(--surface); }
  html[data-theme=dark] .t-prio.pr-low, html[data-theme=dark] .pr-low { --pr: #7E97A8; --pr-ink: #A9C7DB; }
  html[data-theme=dark] .pr-urgent { --pr: #E5534B; --pr-ink: #FF9D94; }
  html[data-theme=dark] .pr-high { --pr: #E89B0C; --pr-ink: #FFD27A; }
  html[data-theme=dark] .pr-normal { --pr: #4A94E8; --pr-ink: #8FC1FF; }
  html[data-theme=dark] .t-hero .t-prio { background: #0A2134; }

  /* Message colours */
  html[data-theme=dark] :is(.card.bad, .tile.bad .label, .flash.error) { color: var(--bad-ink); }
  html[data-theme=dark] :is(.card.good, .flash) { color: var(--ok-ink); }
  html[data-theme=dark] .flash.error { color: var(--bad-ink); }
  html[data-theme=dark] .card.dashed { border-color: var(--field); }
  html[data-theme=dark] .rl-busy { color: var(--warn-ink); }
  html[data-theme=dark] .ad-delete { border-color: var(--bad-line); }
  html[data-theme=dark] :is(.tf-note-today, .cl-tag.region-missing, .pl-due .pl-state) { background: var(--warn-bg); color: var(--warn-ink); }
  html[data-theme=dark] :is(.tf-note-overdue, .pl-overdue .pl-state) { background: var(--bad-bg); color: var(--bad-ink); }
  html[data-theme=dark] .pl-done .pl-state { background: var(--ok-bg); color: var(--ok-ink); }
  html[data-theme=dark] .pl-booked .pl-state { background: #14324F; color: #8FC1FF; }
  html[data-theme=dark] .cl-tag { background: var(--soft-blue); color: var(--soft-blue-ink); }
  html[data-theme=dark] .t-stat.blue .t-stat-icon { background: #14324F; color: #8FC1FF; }
  html[data-theme=dark] .t-stat.amber .t-stat-icon { color: var(--warn-ink); }
  html[data-theme=dark] [data-status=todo] { --st: #2CC4DA; --st-bg: #0E3640; }
  html[data-theme=dark] [data-status=in_progress] { --st: #6F97F2; --st-bg: #17294F; }
  html[data-theme=dark] [data-status=on_hold] { --st: #E89B0C; --st-bg: #3A2C0E; }
  html[data-theme=dark] [data-status=review] { --st: #B48AF0; --st-bg: #2A1E47; }
  html[data-theme=dark] [data-status=done] { --st: #2FAE72; --st-bg: #0F3327; }

  /* Blocks and figures */
  html[data-theme=dark] .ht-blue { --ht: #8FB2FF; --ht-soft: #14324F; }
  html[data-theme=dark] .ht-red { --ht: #FF9D94; --ht-soft: #3A1A1E; }
  html[data-theme=dark] .ht-cyan { --ht: #3FE0F5; --ht-soft: #0E3640; }
  html[data-theme=dark] .ht-amber { --ht: #FFD27A; --ht-soft: #3A2C0E; }
  html[data-theme=dark] .ht-purple { --ht: #C4A0FF; --ht-soft: #2A1E47; }
  html[data-theme=dark] :is(.ht-green, .ht-calm) { --ht: #6FE8B3; --ht-soft: #0F3327; }
  html[data-theme=dark] .ht::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent); }
  html[data-theme=dark] .hero { background: linear-gradient(95deg, #E8FBFF 10%, #3FC8E4 100%); -webkit-background-clip: text; background-clip: text; background-size: 220% 100%; }
  html[data-theme=dark] .rank-bar { background: linear-gradient(90deg, #1E9FC4, #3FE0F5); }
  html[data-theme=dark] .progress > div { background: linear-gradient(90deg, #1E9FC4, #3FE0F5); }
  html[data-theme=dark] .progress.green > div { background: linear-gradient(90deg, #2FAE72, #4BE3A0); }
  html[data-theme=dark] .s-down { --c: #E5534B; }
  html[data-theme=dark] .s-busy { --c: #4A94E8; }

  /* Charts are drawn with fixed colours, so each one is matched by its colour. */
  html[data-theme=dark] .chart [fill="#14212B"] { fill: var(--ink); }
  html[data-theme=dark] .chart [fill="#4A5A66"] { fill: var(--muted); }
  html[data-theme=dark] .chart [stroke="#E9EEF2"] { stroke: var(--line-2); }
  html[data-theme=dark] .chart [stroke="#B9C6D0"] { stroke: var(--field); }
  html[data-theme=dark] .chart [fill="#FFFFFF"] { fill: var(--surface); }
  html[data-theme=dark] .chart [stroke="#FFFFFF"]:not(.donut-light) { stroke: var(--surface); }
  html[data-theme=dark] .chart [fill="#EAF6FB"] { fill: #123A50; }
  html[data-theme=dark] .chart [stroke="#0B6E99"] { stroke: #3FC8E4; }
  html[data-theme=dark] .chart [fill="#0B6E99"] { fill: #3FC8E4; }
  html[data-theme=dark] .chart-tip { background: #E8F3FB; color: #0A2134; }

  /* Equipment drawings use the glowing style already used on the sign-in page. */
  html[data-theme=dark] .eq-body { fill: rgba(0, 229, 255, .1); stroke: #8FF3FF; stroke-width: 1.3; }
  html[data-theme=dark] .eq-dark { fill: #12506F; stroke: #4BD8EE; stroke-width: .7; }
  html[data-theme=dark] .eq-bore { fill: var(--brand-deep); stroke: #8FF3FF; stroke-width: 1.3; }
  html[data-theme=dark] :is(.eq-line, .eq-arc, .eq-cable, .eq-teeth) { stroke: #8FF3FF; }
  html[data-theme=dark] .eq-film { fill: rgba(143, 243, 255, .2); stroke: #8FF3FF; }
  html[data-theme=dark] .eq-screen { fill: #07283F; }

  /* Pop-ups */
  html[data-theme=dark] :is(.modmenu-list, .ios-sheet) { background: #123146; color: var(--ink); }
  html[data-theme=dark] .modmenu-list :is(a, button) { color: var(--ink); }
  html[data-theme=dark] .modmenu-list a.on { background: var(--soft-blue); color: #9FEFFF; }
  html[data-theme=dark] .subnav a.on { color: #fff; }

  /* The signature box stays white, because a signature is drawn in dark ink and goes on a white report. */
  html[data-theme=dark] .sig { background: #fff; }
}
@media screen {
  /* Filled marks keep their deeper colours, so white text on them stays readable. */
  html[data-theme=dark] :is(.dot.done, .t-steps li.past span, .seg input.pass:checked + label) { background: #1E7B4A; border-color: #1E7B4A; }
  html[data-theme=dark] :is(.dot.overdue, .seg input.fail:checked + label) { background: #C62828; border-color: #C62828; }
  html[data-theme=dark] :is(.t-steps li.now span, .cal-day.today .cal-short) { background: #147FA3; }
}
@media screen {
  html[data-theme=dark] .t-status { background: var(--field-bg); }
}
#photo { scroll-margin-top: 84px; }
@media screen {
  html[data-theme=dark] main:not(.sg-panel) .en-search input { background: none; border: 0; }
}
