/* iLO Cloud. The same family as the Hospital Manager (hospital_manager_web/src/theme.ts):
   a deep petrol blue kept away from green and red, which are verdicts here; blue-biased
   neutrals; monospace for identifiers; small radii. */
:root {
  --brand: #1b6c8c;
  --brand-dark: #10506a;
  --night: #101a21;
  --night-2: #18262f;
  --ink: #16212b;
  --muted: #5a6b78;
  --bg: #f2f5f7;
  --card: #ffffff;
  --line: #d9e1e7;
  --ok-ink: #22663b;
  --ok-bg: #e2f2e7;
  --warn-ink: #7a4b00;
  --warn-bg: #fdf0d2;
  --bad-ink: #9d2119;
  --bad-bg: #fbe5e3;
  --info-ink: #3b4b57;
  --info-bg: #e8edf1;
  /* Every other colour the page paints, named once so the dark theme can change it. */
  --ink-2: #34444f;
  --label-ink: #2a3944;
  --line-soft: #edf1f4;
  --field-line: #c9d3da;
  --focus: #8cc0d6;
  --hover: #eef3f6;
  --row-hover: #f3f8fa;
  --selected: #f1f7fa;
  --selected-strong: #eaf3f7;
  --selected-line: #c6dce6;
  --subtle: #f5f8fa;
  --subtle-2: #fafcfd;
  --sunken: #f3f5f7;
  --drop-over: #eef5fb;
  --disabled-ink: #9aa7b1;
  /* The brand as a fill (primary buttons, step numbers) and what is written on it; --brand and
     --brand-dark stay the brand as ink (links, active tab, icons, measures). */
  --brand-fill: var(--brand);
  --brand-fill-hover: var(--brand-dark);
  --on-brand: #fff;
  --brand-disabled: #a8bcc7;
  --on-brand-disabled: #f4f6f8;
  --brand-soft: #e8f2f6;
  --brand-soft-2: #e3eef3;
  --brand-line: #9fbccc;
  --track: #d9e8ee;
  --spinner-track: #c6d6df;
  --ok-line: #b8dcc3;
  --warn-line: #ecd393;
  --bad-line: #efbdb8;
  --danger-line: #e5b9b5;
  --warn-mark: #b9770e;
  --on-mark: #fff;
  --overlay: rgba(242, 245, 247, .6);
  --backdrop: rgba(16, 26, 33, .5);
  --shadow: rgba(16, 26, 33, .35);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
/* The dark theme (the side menu's theme button; theme.js puts data-theme on the page before it paints).
   The same petrol family as the side menu, never pure black: surfaces step lighter as they rise
   (page < card < hover), the brand turns lighter and calmer to stay readable, and a primary button
   becomes a light fill with dark ink. Every text pair meets WCAG AA 4.5:1 (body text 13:1 or more),
   every edge and focus ring 3:1. The pictures (video, panel, terminal) stay on black as they are. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #5cb3d4;
  --brand-dark: #8fd0e8;
  --night: #0a1116;
  --night-2: #121c23;
  --ink: #e3ebf0;
  --muted: #94a6b2;
  --bg: #0f171d;
  --card: #16212a;
  --line: #2a3a46;
  --ok-ink: #73d197;
  --ok-bg: #12301f;
  --warn-ink: #f2c66d;
  --warn-bg: #33270c;
  --bad-ink: #f4a49c;
  --bad-bg: #3b1815;
  --info-ink: #b8c7d1;
  --info-bg: #1c2932;
  --ink-2: #c4d1d9;
  --label-ink: #cdd8df;
  --line-soft: #1f2c35;
  --field-line: #5a7080;
  --focus: #5cb3d4;
  --hover: #1f2e38;
  --row-hover: #1b2831;
  --selected: #163240;
  --selected-strong: #1a3846;
  --selected-line: #2d5566;
  --subtle: #121b22;
  --subtle-2: #121b22;
  --sunken: #1a252d;
  --drop-over: #173040;
  --disabled-ink: #64798a;
  --brand-fill: #5cb3d4;
  --brand-fill-hover: #7cc4df;
  --on-brand: #06141b;
  --brand-disabled: #2a3f4b;
  --on-brand-disabled: #7f939f;
  --brand-soft: #173341;
  --brand-soft-2: #1b3a4a;
  --brand-line: #3b6a7f;
  --track: #24384a;
  --spinner-track: #2e4350;
  --ok-line: #24573a;
  --warn-line: #6b5216;
  --bad-line: #6e2c26;
  --danger-line: #7a322b;
  --warn-mark: #e0a23a;
  --on-mark: #0b1419;
  --overlay: rgba(15, 23, 29, .6);
  --backdrop: rgba(0, 0, 0, .6);
  --shadow: rgba(0, 0, 0, .5);
  --code-bg: #0a1116;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 20px 0 8px; }
p { margin: 0 0 8px; }
a { color: var(--brand); }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.loading { padding: 40px; color: var(--muted); }

button {
  font: inherit; font-size: 14px; padding: 7px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
}
button:hover:not(:disabled) { background: var(--hover); }
button:disabled { color: var(--disabled-ink); cursor: not-allowed; background: var(--sunken); }
button.primary { background: var(--brand-fill); border-color: var(--brand-fill); color: var(--on-brand); font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--brand-fill-hover); }
button.primary:disabled { background: var(--brand-disabled); border-color: var(--brand-disabled); color: var(--on-brand-disabled); }
button.danger { color: var(--bad-ink); border-color: var(--danger-line); }
button.link { border: none; background: none; color: var(--brand); padding: 0; }
button.big { font-size: 16px; padding: 11px 26px; }
input, select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--card); color: var(--ink); width: 100%; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
label.field { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--label-ink); }
label.field input, label.field select { margin-top: 5px; font-weight: 400; }
/* A password with its show-or-hide button inside the field, at the right. */
.password-field { position: relative; display: block; margin-top: 5px; }
label.field .password-field input { margin-top: 0; padding-right: 44px; }
.password-field .reveal { position: absolute; top: 0; bottom: 0; right: 4px; margin: auto 0; width: 34px; height: 30px; padding: 0;
  display: grid; place-items: center; border: none; border-radius: 6px; background: transparent; color: var(--muted); }
.password-field .reveal:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
label.field small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }

.banner {
  background: #e9a920; color: #241800; text-align: center; font-weight: 700;
  letter-spacing: .09em; padding: 5px 12px; font-size: 12px;
}

/* ---------- signed out ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-brand {
  background: radial-gradient(circle at 20% 15%, #1d4f66 0%, var(--night) 55%), var(--night);
  color: #e8f0f4; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
}
.wordmark { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .04em; }
.wordmark .mark { border: 2px solid #e8f0f4; padding: 3px 8px; border-radius: 4px; font-size: 15px; letter-spacing: .12em; }
.wordmark .name { font-size: 18px; }
.wordmark .name span { font-weight: 800; color: #fff; }
.auth-brand h1 { font-size: 34px; line-height: 1.2; font-weight: 600; max-width: 520px; margin: 0 0 18px; color: #fff; }
.auth-brand .lead { font-size: 16.5px; opacity: .85; max-width: 500px; margin-bottom: 34px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; max-width: 520px; }
.points li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.points .dot { width: 34px; height: 34px; border-radius: 50%; background: rgba(140, 192, 214, .18); border: 1px solid rgba(140, 192, 214, .45); display: grid; place-items: center; font-weight: 700; color: #8cc0d6; font-size: 14px; }
.points strong { display: block; color: #fff; }
.points span { opacity: .78; font-size: 14px; }
.auth-foot { font-size: 12px; opacity: .6; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; }
.auth-card button.primary { width: 100%; padding: 10px; font-size: 15px; margin-top: 4px; }
.auth-card .fine { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.auth-card .step-count { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.qr-box { display: flex; justify-content: center; margin: 12px 0 10px; }
.qr { width: 228px; height: 228px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
details.manual { margin-top: 4px; }
details.manual summary { cursor: pointer; color: var(--brand); font-size: 13.5px; font-weight: 500; }
details.manual[open] summary { margin-bottom: 8px; }
.code-input { font-family: var(--mono); letter-spacing: .35em; font-size: 18px; text-align: center; }
.steps { counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; background: var(--card); }
.step h3 { margin-top: 0; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 14.5px; }
.step h3::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-fill); color: var(--on-brand); font-size: 12px; margin-right: 8px; }
.secret { font-family: var(--mono); font-size: 16px; letter-spacing: .08em; background: var(--info-bg); padding: 10px 12px; border-radius: var(--radius); word-break: break-all; user-select: all; }
.invite-card { max-width: 480px; }

/* ---------- signed in ---------- */
/* The side menu (the signed-in shell). */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--night); color: #dce6ec; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; align-self: start; }
.side-brand { padding: 20px 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side-brand .wordmark .mark { font-size: 12px; padding: 2px 6px; }
.side-brand .wordmark .name { font-size: 16px; }
.sidebar .nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; flex: 1; overflow-y: auto; }
.sidebar .nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #b6c6d0; text-decoration: none; font-size: 14px; font-weight: 500; }
.sidebar .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav a.active { background: rgba(79, 163, 196, .18); color: #fff; box-shadow: inset 3px 0 0 #4fa3c4; }
.sidebar .nav a .icon { flex: none; }
.side-foot { padding: 14px 14px 18px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 10px; }
.side-foot .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-text #who-name { font-size: 13.5px; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text .role { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #9cc9dc; }
.side-foot button { background: transparent; border-color: rgba(255, 255, 255, .22); color: #dce6ec; }
.side-foot button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
/* Sign out, and beside it the theme button (a sun or a moon: the theme it switches to). */
.side-actions { display: flex; gap: 8px; }
.side-actions #signout-btn { flex: 1; }
.theme-btn { flex: none; width: 40px; padding: 0; display: inline-grid; place-items: center; }
/* The side menu is darker than the page in the dark theme: a hairline keeps the edge (not on a
   phone, where the menu is a bar across the top). */
@media (min-width: 901px) { :root[data-theme="dark"] .sidebar { box-shadow: inset -1px 0 0 var(--line); } }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #2a5f78; color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.small { width: 30px; height: 30px; font-size: 11.5px; background: var(--brand-soft-2); color: var(--brand-dark); }
.content { min-width: 0; display: flex; flex-direction: column; }
.content main { width: 100%; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  /* A bar with the wordmark and a menu button; the menu opens below it, over the page. */
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; }
  .side-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; border-bottom: none; }
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: none; border-radius: 8px; background: transparent; color: #dce6ec; }
  .menu-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
  .sidebar .nav, .sidebar .side-foot { display: none; }
  .sidebar.open { box-shadow: 0 12px 30px rgba(16, 26, 33, .35); }
  .sidebar.open .nav { display: flex; flex-direction: column; max-height: calc(100vh - 150px); overflow-y: auto; border-top: 1px solid rgba(255, 255, 255, .08); }
  .sidebar.open .nav a { padding: 12px 14px; font-size: 15px; }
  .sidebar.open .side-foot { display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
}
main { max-width: 1400px; margin: 0 auto; padding: 26px 28px 40px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.notice { padding: 10px 14px; border-radius: var(--radius); border: 1px solid; }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-line); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.notice.info { background: var(--info-bg); color: var(--info-ink); border-color: var(--line); }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head .spacer { flex: 1; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.tag-real { color: var(--brand); border-color: var(--brand-line); }
.grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile .v { font-size: 28px; font-weight: 600; margin-top: 2px; }
.tile .s { font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) { .grid, .auth { grid-template-columns: 1fr; } .auth-brand { padding: 36px 28px; } .nav a { padding: 0 8px; } }

.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.info { background: var(--info-bg); color: var(--info-ink); }
.role-chip { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 10px; background: var(--brand-soft-2); color: var(--brand-dark); font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { padding: 18px 4px; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

.status-row { display: grid; grid-template-columns: 220px 210px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.status-row:first-child { border-top: none; }
.status-row .name { font-weight: 600; }
.status-row .chip { white-space: normal; border-radius: 12px; }
.status-row .detail { font-size: 13.5px; }
.status-row .where { font-size: 12px; color: var(--muted); margin-top: 3px; }

.form-row { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; gap: 12px; }
.scope-list { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; max-height: 220px; overflow: auto; }
.scope-list label { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; }
.scope-list label input { width: auto; }
.scope-list .unit { padding-left: 24px; color: var(--ink-2); }
.link-box { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.link-box input { font-family: var(--mono); font-size: 12.5px; }

.sr-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; }
@media (max-width: 1100px) { .sr-grid { grid-template-columns: 1fr; } }
.targets label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; }
.targets label.selected { border-color: var(--brand); background: var(--selected); }
.targets label input { width: auto; margin-top: 3px; }
.targets small { display: block; color: var(--muted); }
.blocked { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 12px 14px; }
.blocked ul { margin: 6px 0 0; padding-left: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.actions select { width: auto; }
.unavailable { margin-top: 14px; font-size: 13.5px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.path { font-size: 12px; padding: 2px 10px; border-radius: 4px; border-left: 4px solid; background: var(--subtle); }
.path-backend { border-color: #7a8a9a; }
.path-sim { border-color: #8d6bc1; }
.path-device { border-color: #2c7da0; }
.history td.req, .history td.res { font-family: var(--mono); font-size: 12.5px; word-break: break-word; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 0 24px; }
/* The unit's panel (panel remote control). */
.panel-screen { background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; line-height: 0; }
#panel-canvas { width: 100%; height: auto; cursor: crosshair; touch-action: none; }
#panel-canvas:focus { outline: 2px solid #2c7da0; outline-offset: -2px; }
#panel-text { flex: 1; min-width: 220px; }

/* ---------- Service Remote: readiness, the session line, the workspace tabs and the output dialog ---------- */
.spinner { display: inline-block; flex: none; width: 18px; height: 18px; border: 2px solid var(--spinner-track); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.working { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }

.readiness { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--subtle); margin-bottom: 12px; }
.readiness > div { flex: 1; min-width: 0; }
.readiness strong { display: block; }
.readiness small { display: block; color: var(--muted); font-size: 13px; }
.readiness .mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; color: var(--on-mark); }
.readiness.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.readiness.ok .mark { background: var(--ok-ink); }
.readiness.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.readiness.warn .mark { background: var(--warn-mark); }
.readiness.checking { background: var(--selected); border-color: var(--selected-line); }
details.readiness-details { margin: -4px 0 12px; }
details.readiness-details summary { cursor: pointer; color: var(--brand); font-size: 13.5px; }
ul.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: 14px; }
.session-intro { color: var(--ink-2); }
.session-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0 2px; }

.card.workspace { padding: 0; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 13px 14px 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs [role="tab"]:hover:not(:disabled) { background: none; color: var(--ink); }
.tabs [role="tab"].active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.tab-badge { font-size: 11.5px; font-weight: 600; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); text-align: center; }
.tab-badge.live { background: var(--ok-bg); color: var(--ok-ink); }
.tab-pane { padding: 18px 20px; }
.pane-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pane-head .spacer { flex: 1; }
.pane-empty { display: grid; place-items: center; min-height: 260px; padding: 24px; text-align: center; color: var(--muted); background: var(--subtle); border: 1px dashed var(--line); border-radius: var(--radius); }

table.commands tr.clickable { cursor: pointer; }
table.commands tr.clickable:hover td { background: var(--row-hover); }
table.commands td.row-action { text-align: right; white-space: nowrap; }
.wrap { word-break: break-all; }

dialog.modal { width: min(900px, 94vw); max-height: 88vh; padding: 0; border: none; border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px var(--shadow); }
dialog.modal::backdrop { background: var(--backdrop); }
dialog.modal[open] { display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 16px 18px 20px; overflow: auto; }
.output-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.output-head h3 { margin: 0; }
.output-head .spacer { flex: 1; }
pre.result-text, pre.result-json { margin: 0; padding: 12px 14px; max-height: 52vh; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--night); color: #e3edf2; border-radius: var(--radius); font-family: var(--mono); font-size: 12.5px; line-height: 1.45; }
dl.result-kv { grid-template-columns: minmax(120px, max-content) 1fr; }
dl.result-kv dd { min-width: 0; }
details.raw { margin-top: 14px; }
details.raw summary { cursor: pointer; color: var(--brand); font-size: 13.5px; margin-bottom: 8px; }
.modal-body .notice { margin-top: 14px; }

/* ---------- a shared session's live picture ---------- */
.shared-stage { position: relative; margin-top: 12px; background: #000; border-radius: var(--radius); overflow: hidden; line-height: 0; }
#shared-video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.stage-badge { position: absolute; top: 12px; left: 12px; line-height: 1.4; padding: 4px 10px; border-radius: 4px; background: rgba(233, 169, 32, .92); color: #241800; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; pointer-events: none; }
.stage-badge[data-source="tower"] { background: rgba(0, 0, 0, .6); color: #fff; border: 1px solid #ef4444; }
.stage-badge[hidden] { display: none; }
.stage-note { margin: 8px 0 0; font-size: 13.5px; }
/* The marks: over the picture, letterboxed as it is; only an operator's layer takes the pointer. */
.marks-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.marks-layer.drawing { pointer-events: auto; cursor: crosshair; touch-action: none; }
/* A mark on its way to the unit: drawn at once, dashed, until the unit takes it. */
.marks-layer .mark.pending { opacity: .65; }
.marks-layer .mark.pending * { stroke-dasharray: 7 5; }
.marks-toolbar { --mark-colour: #ffca55; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.marks-toolbar .tool { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; }
.marks-toolbar .tool[data-tool] .icon { color: var(--mark-colour); filter: drop-shadow(0 0 1px rgba(0, 0, 0, .55)); }
.marks-toolbar .tool[aria-pressed="true"] { background: #11161c; border-color: var(--mark-colour); color: #fff; box-shadow: inset 0 0 0 1px var(--mark-colour); }
.marks-toolbar .swatch[aria-pressed="true"] { background: #11161c; border-color: #11161c; }
.marks-toolbar .swatch[aria-pressed="true"] .swatch-dot { box-shadow: 0 0 0 2px #fff; }
.toolbar-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }
.marks-toolbar input[type="text"] { width: 200px; }
.toolbar-gap { flex: 1; }
.swatch { padding: 4px 6px; line-height: 0; }
.swatch-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.swatch-dot[data-colour="#ffca55"] { background: #ffca55; }
.swatch-dot[data-colour="#ef4444"] { background: #ef4444; }
.swatch-dot[data-colour="#22c55e"] { background: #22c55e; }
.swatch-dot[data-colour="#38bdf8"] { background: #38bdf8; }
#shared-leave { margin-left: auto; }
.join-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.join-form input { flex: 1; min-width: 260px; font-family: var(--mono, monospace); }
dialog.modal.ask { width: min(460px, 94vw); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* White label (team list item 33): an entity's name and logo. */
.branding:empty { display: none; }
.branding { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.brand-preview { display: flex; align-items: center; min-height: 64px; }
.brand-logo { max-height: 64px; max-width: 240px; object-fit: contain; }
.brand-form .brand-name { min-width: 0; flex: 1 1 200px; }

/* ---------- Entities & units: the register and its towers ---------- */
.card-head h3 { margin: 0; }
.register { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .register { grid-template-columns: minmax(0, 1fr); } }
.entity-list { padding: 8px 0; position: sticky; top: 12px; }
.entity-list .list-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border-bottom: 1px solid var(--line); }
.entity-list ul { list-style: none; margin: 0; padding: 6px 0; max-height: 70vh; overflow: auto; }
.entity-item { display: flex; flex-direction: column; gap: 1px; padding: 9px 16px; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.entity-item:hover { background: var(--row-hover); }
.entity-item.active { background: var(--selected-strong); border-left-color: var(--brand); }
.entity-item .entity-name { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.entity-item .entity-meta { font-size: 12.5px; color: var(--muted); }
.entity-detail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.detail-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.detail-head .detail-title { flex: 1 1 260px; min-width: 0; }
.detail-head .detail-title h2 { font-size: 20px; overflow-wrap: anywhere; }
.detail-head .detail-title p { margin: 2px 0 0; font-size: 13.5px; }
.detail-head .actions { margin: 0; }
.table-wrap { overflow-x: auto; }
table.units td { vertical-align: middle; }
table.units td.unit-name { font-weight: 600; }
table.units td.row-actions { text-align: right; white-space: nowrap; }
table.units td.row-actions button + button { margin-left: 6px; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.cell-stack small { font-size: 12.5px; }
button.small { font-size: 13px; padding: 4px 11px; }
.link-card { border-left: 4px solid var(--brand); }
.link-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.link-form { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.link-form label.field { margin: 0; }
@media (max-width: 700px) { .link-form { grid-template-columns: minmax(0, 1fr); } }
input.link-code { font-family: var(--mono); font-size: 20px; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
details.advanced summary { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 500; }
details.advanced[open] summary { margin-bottom: 10px; }
details.advanced .unit-create input { flex: 1 1 200px; width: auto; }
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state h2 { margin-bottom: 6px; }
dialog.form-dialog .dialog-form label.field:last-of-type { margin-bottom: 4px; }
dialog.brand-dialog { width: min(640px, 94vw); }
.brand-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.brand-row .brand-preview { flex: 0 0 auto; width: 180px; min-height: 96px; justify-content: center; border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px; background: var(--subtle-2); }
.brand-row .brand-logo { max-height: 72px; max-width: 150px; }
.brand-fields { flex: 1 1 260px; min-width: 0; }
/* The ILO mark as it appears on a tower: the same in either theme. */
.ilo-mark-preview { font-weight: 800; letter-spacing: .04em; font-size: 22px; color: #fff; background: #1b6c8c; padding: 6px 12px; border-radius: 6px; }
.brand-arrival { font-size: 13.5px; margin-top: 4px; }
.brand-body .notice { margin: 0 0 14px; }
.page-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- loading, indicators, filters, empty states ---------- */
.page-loading { min-height: calc(100vh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.page-loading.over { position: fixed; inset: 0 0 0 248px; min-height: 0; background: var(--overlay); z-index: 20; }
@media (max-width: 900px) { .page-loading.over { left: 0; } }
.spinner.big { width: 40px; height: 40px; border-width: 3px; vertical-align: middle; }
.loading-text { font-size: 14px; }
.tile { position: relative; }
.tile-icon { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); }
.empty-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); margin-bottom: 10px; }
.actions.center { justify-content: center; }
.filter { display: flex; align-items: center; gap: 6px; border: 1px solid var(--field-line); border-radius: var(--radius); padding: 0 10px; background: var(--card); color: var(--muted); min-width: 240px; }
.filter input { border: none; padding: 7px 0; outline: none; background: transparent; }
.filter:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.card-head.wrap { flex-wrap: wrap; }
.card-head select { width: auto; }
.person { display: flex; align-items: center; gap: 10px; }
td.access, td.detail, td.actor { overflow-wrap: anywhere; }
td.detail { max-width: 420px; }
.nowrap { white-space: nowrap; }
.small { font-size: 13px; }
.center { text-align: center; }
p.small { margin: 0; }
div.field { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--label-ink); }
div.field small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
div.field .scope-list { margin-top: 5px; font-weight: 400; }
.form-row.two { grid-template-columns: 1fr 1fr; }
dialog.invite-dialog { width: min(640px, 94vw); }
table.overview-units td { vertical-align: middle; }
table.units td.unit-name, table.units td.mono { white-space: nowrap; }

/* ---------- phones: one column, room for a finger, no sideways scrolling ---------- */
.shared-stage:fullscreen { display: grid; place-items: center; border-radius: 0; }
.shared-stage:fullscreen #shared-video { width: 100%; height: 100%; aspect-ratio: auto; }
/* Full screen holds the picture and its tools: the tools in a bar over the top, the picture below. */
.shared-body:fullscreen { display: flex; flex-direction: column; background: #000; padding: 0; }
.shared-body:fullscreen .marks-toolbar { margin: 0; padding: 8px; background: rgba(17, 22, 28, .92); justify-content: center; }
.shared-body:fullscreen .marks-toolbar .tool, .shared-body:fullscreen .marks-toolbar .swatch { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.shared-body:fullscreen .shared-stage { flex: 1; margin: 0; border-radius: 0; display: grid; place-items: center; }
.shared-body:fullscreen #shared-video { width: 100%; height: 100%; aspect-ratio: auto; }
.shared-body:fullscreen .stage-note { display: none; }
#shared-fullscreen { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 700px) {
  main { padding: 14px 12px 28px; gap: 14px; }
  h1 { font-size: 20px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .page-head .actions { margin: 0; }
  .card { padding: 14px; }
  .card-head { flex-wrap: wrap; }
  /* 16 px: a phone zooms the page into a smaller field when it is tapped. */
  input, select { font-size: 16px; }
  button { min-height: 40px; }
  button.link { min-height: 0; }
  .actions, td .actions { gap: 8px; }
  .filter { min-width: 0; width: 100%; }
  .join-form input { min-width: 0; flex-basis: 100%; }
  .join-form button { width: 100%; }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  dl.kv dd { margin-bottom: 8px; }
  .status-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .form-row, .form-row.two { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .v { font-size: 22px; }
  .tile-icon { display: none; }
  .entity-list { position: static; }
  .tab-pane { padding: 14px; }
  .modal-body { padding: 14px; }

  /* Signing in: the form first in sight; the introduction shrinks to a line. */
  .auth { align-content: start; }
  .auth-brand { padding: 20px 18px; gap: 10px; justify-content: flex-start; }
  .auth-brand h1 { font-size: 20px; margin: 10px 0 0; }
  .auth-brand .lead, .auth-brand .points, .auth-foot { display: none; }
  .auth-panel { place-items: start center; padding: 22px 16px 32px; }
  .auth-card h2 { font-size: 21px; }
  .qr { width: 200px; height: 200px; }

  /* A table becomes one card per row, each value under its column's name (app.js labelTables). */
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; margin-bottom: 10px; background: var(--card); }
  table.stack tr:last-child td, table.stack td { border-bottom: none; }
  table.stack td { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 6px 0; text-align: right; overflow-wrap: anywhere; max-width: none; white-space: normal; }
  table.stack td::before { content: attr(data-label); flex: none; max-width: 45%; color: var(--muted); font-family: var(--sans); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
  table.stack td .cell-stack { align-items: flex-end; text-align: right; }
  .card-head select { flex: 1 1 140px; }
  table.stack td[data-label=""]::before { display: none; }
  table.stack td[data-label=""], table.stack td.row-action, table.stack td.row-actions { justify-content: flex-end; }
  table.stack td > * { min-width: 0; }
  .table-wrap { overflow-x: visible; }

  /* The shared session: the picture first and across the card; under it, the tools a thumb reaches. */
  #shared-session { padding: 10px; }
  .session-line { gap: 8px; }
  .session-line > span:nth-child(2) { flex: 1 1 auto; }
  .session-line .tag { display: none; }
  #shared-fullscreen, #shared-leave { flex: 1 1 140px; justify-content: center; margin-left: 0; }
  .shared-body { display: flex; flex-direction: column; }
  /* The tools just above the picture, so a thumb draws without scrolling between them. */
  .shared-body .marks-toolbar { order: 1; }
  .shared-body .shared-stage { order: 2; margin-top: 8px; }
  .shared-body .stage-note { order: 3; }
  /* Two short rows, icons only: the three tools and undo, then the four colours. The text field, when
     Text is chosen, under them. Every button stays 44 px or more for a finger. */
  .marks-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
  .marks-toolbar .toolbar-sep, .marks-toolbar .tool-label { display: none; }
  .marks-toolbar button { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .marks-toolbar #mark-undo { grid-column: 4; grid-row: 1; }
  .marks-toolbar input[type="text"] { grid-column: 1 / -1; width: 100%; }
  .stage-badge { top: 8px; left: 8px; font-size: 11px; padding: 3px 8px; }
}
/* A phone on its side: the picture fits the screen's height. */
@media (max-width: 900px) and (orientation: landscape) {
  #shared-video { max-height: calc(100vh - 24px); }
}

/* A tower's live telemetry (app.js liveDialog): the brand colour for the measures, a lighter step of it for
   the tracks, the status fills only for a state, and always with its label beside it. */
table.units-live tr.clickable { cursor: pointer; }
table.units-live tr.clickable:hover td { background: var(--row-hover); }
button.link.unit-open { font-weight: 600; font-size: inherit; text-align: left; }
button.link.unit-open:hover:not(:disabled) { background: none; text-decoration: underline; }
.live-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.units-hint { margin: 10px 2px 0; font-size: 13px; }
dialog.live-dialog { width: min(980px, 96vw); }
.live-dialog .modal-head h2 { margin: 0; }
.live-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.live-tile .v { font-size: 26px; }
.spark { position: relative; height: 48px; margin-top: 10px; touch-action: none; }
.spark-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--card); pointer-events: none; }
.spark-cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); pointer-events: none; }
.spark-readout { position: absolute; top: -24px; transform: translateX(8px); background: var(--night); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.spark-readout.flip { transform: translateX(calc(-100% - 8px)); }
.spark-readout span { color: #c9d4db; }
.live-section h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cores { display: flex; gap: 6px; align-items: flex-end; }
.core { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1 1 0; max-width: 44px; outline-offset: 2px; }
.core-track { display: flex; align-items: flex-end; width: 100%; height: 72px; background: var(--track); border-radius: 4px; overflow: hidden; }
.core-fill { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; }
.core-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.core:hover .core-track, .core:focus-visible .core-track { box-shadow: 0 0 0 2px var(--brand-dark); }
.core-readout { margin: 8px 0 0; font-size: 13px; min-height: 18px; }
.meter-row { display: grid; grid-template-columns: minmax(90px, 160px) minmax(120px, 1fr) minmax(90px, auto) minmax(0, 220px); gap: 12px; align-items: center; padding: 5px 0; font-size: 14px; }
.meter-name { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { display: block; height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.meter-fill.warning { background: #fab219; }
.meter-fill.critical { background: #d03b3b; }
.meter-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-note { font-size: 13px; color: var(--muted); }
.meter-note.warning { color: var(--warn-ink); font-weight: 600; }
.meter-note.critical { color: var(--bad-ink); font-weight: 600; }
table.live-net td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-services { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.live-services li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; }
.live-services li small { flex-basis: 100%; }
.live-foot { margin: 0; font-size: 12.5px; }
.live-wait { margin: 0; display: flex; align-items: center; gap: 8px; }
@media (max-width: 700px) {
  .live-dialog .modal-head { flex-wrap: wrap; }
  .meter-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .meter-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .meter-row .meter-note { grid-column: 1 / -1; }
}

/* The remote-shell card in a unit's live dialog (DEVELOPMENT). */
.shell-card { display: grid; gap: 10px; }
/* The console pane (DEVELOPMENT, phase 3): xterm.js in the Remote shell tab. */
.console-pane { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--card); }
.console-head { display: flex; align-items: center; gap: 8px; }
.console-head .spacer { flex: 1; }
.console-host { height: min(60vh, 460px); background: #11161d; border-radius: 6px; padding: 6px; }
.console-host .xterm { height: 100%; }
.console-host .xterm, .console-host .xterm-rows { color: #fff; }
.console-foot { margin: 0; font-size: 12.5px; }
.shell-intro { margin: 0; font-size: 13px; }
.shell-notice-slot:empty { display: none; }
.shell-head { display: flex; align-items: center; gap: 6px; }
.shell-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shell-min { width: 5em; }
/* The unit dialog's tabs: Live, Software update, Remote shell. A hidden pane stays hidden whatever its display. */
.live-dialog .unit-tabs { padding: 0 10px; flex: none; }
.live-dialog .unit-pane[hidden] { display: none !important; }
.live-dialog .modal-body { flex: 1 1 auto; min-height: 240px; }

/* The remote update card (DEVELOPMENT): a drop zone, the chosen file, the steps, the tower's progress. */
.update-card { gap: 12px; }
.update-grid { display: grid; grid-template-columns: minmax(120px, 1fr) 3fr; gap: 10px 18px; align-items: start; }
.update-kv small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.update-kv strong { font-weight: 600; }
.update-error { margin-top: 4px; padding: 6px 10px; border-radius: 6px; background: var(--bad-bg); color: var(--bad-ink); font-size: 13px; }
.drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; text-align: center; background: var(--subtle-2); transition: background .15s, border-color .15s; }
.drop.over { border-color: var(--brand); background: var(--drop-over); }
.drop.disabled { opacity: .6; }
.drop-title { font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.drop-hint { font-size: 12.5px; margin-top: 6px; }
.drop input { display: none; }
.update-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.update-file-icon { font-size: 20px; color: var(--brand); }
.update-file .name { font-family: var(--mono); font-size: 13px; }
.update-file-meta { display: flex; flex-direction: column; gap: 2px; }
.shell-head .spacer, .update-file .spacer, .update-actions .spacer { flex: 1; }
.update-progress { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.update-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.update-steps li { font-size: 12.5px; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: var(--sunken); }
.update-steps li.now { color: var(--on-brand); background: var(--brand-fill); font-weight: 600; }
.update-steps li.done { color: var(--ok-ink); background: var(--ok-bg); }
.update-bar { width: 100%; height: 10px; accent-color: var(--brand); }
.update-text { margin: 0; }
.update-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.update-hint { font-size: 12.5px; }
.update-notice:empty { display: none; }
.shell-cmd { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--code-bg, #11161d); color: var(--code-fg, #d7deea); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; overflow-x: auto; }

/* Pages: in the browser (pagedTable) and the server's (the audit, the update history). */
.pager-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pager-bar .spacer { flex: 1; }
.pager-bar[hidden] { display: none; }
.pager-bar:empty { display: none; }
.pager-where { font-size: 12.5px; }
tr.empty-row td { text-align: center; padding: 18px 10px; }

/* The release library (phase 4). */
.update-library { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.update-library-label { font-weight: 600; font-size: 13px; white-space: nowrap; }
.update-library select { flex: 1; min-width: 220px; width: auto; }
dialog.release-dialog { width: min(640px, 94vw); }
.release-add { display: grid; gap: 12px; }
dialog.send-dialog { width: min(780px, 94vw); }
.send-tools { display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.send-tools .spacer { flex: 1; }
.send-list { display: grid; gap: 2px; max-height: 44vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; background: var(--card); }
.send-row { display: grid; grid-template-columns: auto minmax(140px, 1.6fr) minmax(100px, 1fr) auto auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.send-row:hover { background: var(--row-hover); }
.send-row.on-it { opacity: .8; }
.send-unit { display: flex; flex-direction: column; gap: 1px; }
.send-version { display: flex; align-items: center; gap: 6px; }
.send-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.send-results li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 640px) {
  .send-row { grid-template-columns: auto 1fr; }
  .send-row .send-entity, .send-row .send-state { grid-column: 2; }
}
