/* 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 labels, 100 x 70 mm */
.qr-labels { display: flex; flex-wrap: wrap; gap: 6mm; }
.qr-label { width: 100mm; height: 70mm; flex: none; display: flex; overflow: hidden; background: #fff; border-radius: 3mm; box-shadow: 0 0 0 1px var(--line); break-inside: avoid; print-color-adjust: exact; -webkit-print-color-adjust: exact; color: var(--ink); }
.qr-code { width: 50mm; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; padding: 2mm 2.5mm; text-align: center; }
.qr-code img { width: 42mm; height: 42mm; image-rendering: pixelated; }
.qr-code strong { font-size: 13px; line-height: 1.2; }
.qr-code .mono { font-size: 12px; color: var(--ink-2); }
.qr-panel { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1mm; padding: 3mm; color: #fff; background: var(--qr-colour); }
.qr-panel::before { content: ""; position: absolute; width: 62mm; height: 62mm; right: -16mm; top: -8mm; border-radius: 50%; border: 8mm solid rgba(255, 255, 255, .07); }
.qr-panel > * { position: relative; }
.qr-brand { display: flex; align-items: center; gap: 1.5mm; font-size: 12px; font-weight: 600; line-height: 1.1; }
.qr-brand img { height: 7mm; width: auto; flex: none; }
.qr-label .eq { width: 100%; max-width: 40mm; margin: 0 auto; flex: 1 1 0; min-height: 0; }
.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; }
.qr-kind { font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.qr-model { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.qr-model .mono, .qr-phone { font-size: 12px; }
.qr-phone { font-weight: 600; line-height: 1.2; }
@media print { .qr-labels { gap: 4mm; } }

/* print */
@media print {
  .top, .subnav-wrap, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
}
