/* The portal's look (operator, 2026-10-08): the dark treatment in the CCU
   app's colors (D:\dev\trs-2.1\CCU\src\css\app.scss, quasar.variables.scss).
   Tokens first, so a theme change is one block. */
:root {
  --bar:#0f1113; --page:#1f2226; --panel:#25282d; --card:#2b2f35; --line:#3a3f47;
  --fg:#ecebe7; --mut:#a3a8b0; --dim:#7d838c;
  --accent:#e0513f; --primary:#1f5fa8; --link:#8fb4e6; --link-hover:#b8d0f0;
  --ok:#8fd19a; --ok-bg:#1e3a22; --bad:#ff9c92; --bad-bg:#4a1f1c; --warn:#f2c037; --warn-bg:#3d3414;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin:0; font: 14px/1.45 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color:var(--fg); background:var(--page); }
a { color:var(--link); } a:hover { color:var(--link-hover); }

/* the top bar: global things only */
header.top { display:flex; align-items:center; gap:20px; padding:0 24px; height:52px; background:var(--bar); color:#fff; flex-wrap:wrap; }
header.top .brand { color:#fff; font-weight:600; font-size:15px; text-decoration:none; letter-spacing:.01em; }
header.top .brand em { color:var(--accent); font-style:normal; }
header.top nav.global { display:flex; gap:2px; margin-left:8px; }
header.top nav.global a { color:#c9c5bd; padding:6px 12px; text-decoration:none; border-bottom:2px solid transparent; }
header.top nav.global a.on { color:#fff; border-bottom-color:var(--accent); }
header.top .who { margin-left:auto; font-size:13px; color:#c9c5bd; }
header.top .who a { color:#c9c5bd; }
button.link { background:none; border:none; color:#c9c5bd; padding:0; cursor:pointer; text-decoration:underline; font:inherit; }

/* the breadcrumb band: Customers › CODE › TYPE */
nav.crumbs { display:flex; align-items:center; gap:6px; padding:10px 24px; font-size:13px; color:var(--mut); background:var(--panel); border-bottom:1px solid var(--line); flex-wrap:wrap; }
nav.crumbs a { text-decoration:none; }
nav.crumbs .here { padding:2px 10px; border-radius:999px; background:var(--primary); color:#fff; font-weight:500; }
nav.crumbs .others { margin-left:8px; color:var(--dim); }
nav.crumbs .others a { color:var(--dim); margin-right:8px; }

/* the inner menu of a device type (on the right panel, or on a type-wide page) */
nav.inner { display:flex; gap:2px; padding:0 24px; background:var(--panel); border-bottom:1px solid var(--line); flex-wrap:wrap; }
nav.inner a { text-decoration:none; color:var(--mut); padding:12px 14px; border-bottom:2px solid transparent; }
nav.inner a.on { color:var(--fg); border-bottom-color:var(--accent); font-weight:500; }
nav.inner .note { margin-left:auto; align-self:center; font-size:12px; color:var(--mut); }

main { padding:20px 24px; }
main.narrow { max-width:1180px; }
.msg { padding:10px 14px; border-radius:8px; margin-bottom:14px; background:#1e2f45; }
.msg.warn { background:var(--warn-bg); } .msg.success { background:var(--ok-bg); } .msg.error { background:var(--bad-bg); color:var(--bad); }
.ok { color:var(--ok); }

h1 { font-size:24px; font-weight:600; margin:0 0 12px; } h2 { font-size:16px; font-weight:600; margin:22px 0 8px; } h3 { font-size:15px; margin:0 0 6px; }
h2.eyebrow { font-size:13px; font-weight:500; color:var(--mut); letter-spacing:.06em; text-transform:uppercase; margin:14px 0 8px; }
.mut { color:var(--mut); } .dim { color:var(--dim); } .err { color:var(--bad); } .mono { font-family:var(--mono); font-size:13px; } .small { font-size:13px; }
.row-h { display:flex; align-items:center; gap:14px; flex-wrap:wrap; } .row-h .right { margin-left:auto; display:flex; gap:8px; }

/* the two-pane layout of a device type's page */
.layout { display:flex; flex-wrap:wrap; }
aside.tree { flex:1 1 300px; max-width:340px; background:var(--panel); border-right:1px solid var(--line); padding:16px 12px; }
aside.tree input { width:100%; margin-bottom:14px; }
.tree .site { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:6px; color:var(--fg); text-decoration:none; font-weight:500; }
.tree .site.on { background:var(--card); }
.tree .site .dot { margin-left:auto; width:9px; height:9px; border-radius:50%; } .dot.ok { background:#2e7d32; } .dot.bad { background:#b3261e; } .dot.off { background:var(--dim); }
.tree .site .n { font-size:12px; color:var(--mut); }
.tree .unit { display:flex; align-items:center; gap:8px; padding:6px 10px 6px 34px; border-radius:6px; color:var(--fg); text-decoration:none; }
.tree .unit.on { background:var(--primary); color:#fff; } .tree .unit.on .mut, .tree .unit.on .st { color:#d6e2f5; }
.tree .unit .st { color:var(--mut); } .tree .unit .st.off { color:var(--warn); } .tree .unit .st.none { color:var(--dim); } .tree .unit .st.bad { color:var(--bad); }
.tree .unit .lane { margin-left:auto; font-size:12px; color:var(--mut); }
.tree .more { padding:4px 10px 4px 34px; color:var(--mut); font-size:12px; }
.tree .site.add { color:var(--mut); font-weight:400; margin-top:6px; } .tree .site.add:hover { color:var(--fg); }
section.detail { flex:999 1 560px; min-width:0; display:flex; flex-direction:column; }
section.detail .body { padding:20px 24px; display:flex; flex-direction:column; gap:16px; }

.code { font-family:var(--mono); } .badge { font-family:var(--mono); font-size:16px; font-weight:600; background:var(--bar); color:#fff; padding:3px 10px; border-radius:6px; }

.tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:14px; }
.tiles.three { grid-template-columns:repeat(3, minmax(0, 1fr)); } .tiles.four { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.tile, .card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; display:flex; flex-direction:column; gap:6px; text-decoration:none; color:inherit; }
a.tile:hover { border-color:var(--dim); }
.tile.top-trs { border-top:4px solid var(--primary); } .tile.top-mover { border-top:4px solid #26a69a; } .tile.top-vts { border-top:4px solid #9c27b0; }
.card { display:block; margin-bottom:12px; } .card.narrow { max-width:380px; margin:60px auto; } .card.flush { padding:0; overflow:hidden; } .card.flush .hd { padding:10px 14px; border-bottom:1px solid var(--line); font-weight:600; }
.tile .big { font-size:20px; font-weight:600; } .tile .huge { font-size:30px; font-weight:600; } .tile .lbl { font-size:12px; color:var(--mut); } .tile .row { display:block; }
.kpi .v { font-size:22px; font-weight:600; margin-top:4px; } .kpi .v small { font-size:13px; font-weight:400; color:var(--mut); }
.pills { display:flex; gap:8px; flex-wrap:wrap; }
.pill { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:500; background:var(--line); color:var(--fg); }
.pill.ok { background:var(--ok-bg); color:var(--ok); } .pill.bad { background:var(--bad-bg); color:var(--bad); } .pill.warn { background:var(--warn-bg); color:var(--warn); } .pill.off { background:var(--line); color:var(--mut); }
b.bad { color:var(--bad); }

.tbl { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:8px; }
.tbl th, .tbl td { text-align:left; padding:8px 12px; border-top:1px solid var(--line); vertical-align:top; }
.tbl thead th { border-top:none; font-size:12px; font-weight:500; color:var(--mut); }
.tbl.small td, .tbl.small th { padding:6px 10px; font-size:13px; }
.scroll { overflow-x:auto; }
/* a long table in a section with another below it: it scrolls inside its own
   box (header row kept in view), so the next table is never off the page */
.scroll.box { max-height:42vh; overflow-y:auto; }
.scroll.box thead th { position:sticky; top:0; z-index:1; background:var(--card); box-shadow:inset 0 -1px 0 var(--line); }

code.token { display:block; margin-top:6px; padding:8px; background:var(--bar); border:1px solid var(--line); word-break:break-all; color:#fff; }
form label { display:block; margin:8px 0 4px; } form.inline { display:inline; } form.row-form label { display:inline-block; margin-right:12px; }
input, select, textarea { padding:7px 10px; border:1px solid var(--line); border-radius:6px; font:inherit; background:var(--card); color:var(--fg); }
input::placeholder { color:var(--dim); }
button { padding:8px 14px; border:1px solid var(--line); border-radius:6px; background:var(--card); color:var(--fg); font:inherit; cursor:pointer; }
button.primary { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:500; } button.small { padding:2px 8px; font-size:12px; } button.secondary { background:var(--panel); }
label.check { display:block; margin:4px 0; }
.cols { display:flex; gap:40px; flex-wrap:wrap; }
pre.log { background:var(--bar); color:#e6edf3; padding:10px; border-radius:6px; font-size:12px; overflow:auto; max-height:400px; }
details.card summary { cursor:pointer; }
@media (max-width: 720px) { .tiles.three, .tiles.four { grid-template-columns:repeat(1, minmax(0, 1fr)); } aside.tree { max-width:none; border-right:none; border-bottom:1px solid var(--line); } }

/* the Upload section: one full-width card per channel, the build set and the
   site software side by side, file tables with room for the names */
.upload-ch { margin-bottom:16px; }
/* one table per row, full width, so a file name, its board and its date stay on one line (operator, 2026-11-15) */
.upload-cols { display:grid; grid-template-columns:minmax(0, 1fr); gap:20px; margin-top:12px; }
.upload-ch .one-line { white-space:nowrap; overflow-x:auto; margin:6px 0 0; }
.upload-col h3 { margin:0 0 8px; font-size:14px; font-weight:600; white-space:nowrap; overflow-x:auto; }
.upload-form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.upload-form input[type=file] { flex:1 1 240px; min-width:0; padding:5px 8px; }
/* Releases: each version row stays on one line (operator, 2026-10-19); a narrow screen scrolls the tile sideways. */
.tiles.rel { grid-template-columns:repeat(auto-fill, minmax(min(600px, 100%), 1fr)); }
.tiles.rel > .tile { min-width:0; overflow-x:auto; }
.tbl.rel th, .tbl.rel td { white-space:nowrap; }
.tbl.nowrap th, .tbl.nowrap td { white-space:nowrap; }
.tbl.files { width:100%; } .tbl.files th, .tbl.files td { white-space:nowrap; } .tbl.files td.code { width:99%; }
.tbl.files th.num, .tbl.files td.num { text-align:right; white-space:nowrap; width:1%; }
.tbl.files td.act { text-align:right; white-space:nowrap; width:1%; }
.upload-progress { display:flex; align-items:center; gap:10px; margin:8px 0 0; }
.upload-progress progress { flex:0 0 260px; max-width:100%; height:12px; accent-color:var(--accent); }
.upload-progress.bad span { color:var(--bad); }
/* Why: the browser labels a folder input "Choose Files"; the page shows "Choose folder" over it. */
.pick-folder { position:relative; display:inline-block; cursor:pointer; vertical-align:middle; }
.pick-folder input[type=file] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.pick-folder .primary-btn { display:inline-block; padding:8px 14px; border:1px solid var(--accent); border-radius:6px; background:var(--accent); color:#fff; font-weight:500; }
.pick-folder:focus-within .primary-btn { outline:2px solid var(--fg); outline-offset:2px; }
/* Which portal this is (operator, 2026-11-30: lab on the build laptop, stable on the VPS). */
.instance { font:600 11px/1 var(--mono, monospace); letter-spacing:.08em; padding:4px 7px; border-radius:4px; margin-left:10px; align-self:center; }
.instance.lab { background:#7a5b12; color:#fff; }
.instance.stable { background:#1f6f43; color:#fff; }
nav.inner .sep { align-self:center; margin-left:14px; padding-left:14px; border-left:1px solid var(--line); font-size:12px; font-weight:600; color:var(--fg); text-transform:uppercase; letter-spacing:.06em; }
nav.inner .sep:empty { padding-left:0; }
label.check { display:flex; align-items:center; gap:8px; margin-top:8px; }
