/* RFT Application Management System: app shell (dark sidebar + content), cards, tables, forms. No external assets. */
/* Three tones (owner's request 2026-11-22: "ease up on all the white"): the dark sidebar, a deep blue band across the top
   of each page (with the logo's gold under it), and a soft blue-grey page under white cards with tinted header bands. */
:root {
  --bg: #e7edf5; --panel: #ffffff; --panel-2: #f3f6fb; --text: #0f172a; --muted: #64748b; --line: #dbe3ee;
  --head: #eef3fa; --band-1: #1e3a8a; --band-2: #2563eb; --band-text: #ffffff; --band-muted: rgba(255, 255, 255, .78); --gold: #d9a93b;
  --t-blue: #2563eb; --t-blue-soft: #e2ebfd; --t-teal: #0d9488; --t-teal-soft: #daf2ee; --t-violet: #7c3aed; --t-violet-soft: #ece5fd;
  --t-amber: #c77c06; --t-amber-soft: #fbefd9;
  --accent: #2563eb; --accent-soft: #dbeafe; --accent-text: #1d4ed8;
  --ok: #16a34a; --ok-soft: #dcfce7; --warn: #d97706; --warn-soft: #fef3c7; --bad: #dc2626; --bad-soft: #fee2e2;
  --side: #0f172a; --side-2: #1e293b; --side-text: #cbd5e1; --side-muted: #64748b;
  --code-bg: #0b1220; --code-text: #e2e8f0;
  --radius: 12px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17; --panel: #121826; --panel-2: #0f1522; --text: #e5e9f0; --muted: #8b95a7; --line: #232c3d;
    --head: #161e2e; --band-1: #172554; --band-2: #1e40af; --band-muted: rgba(255, 255, 255, .72); --gold: #c9982f;
    --t-blue: #60a5fa; --t-blue-soft: rgba(96, 165, 250, .13); --t-teal: #2dd4bf; --t-teal-soft: rgba(45, 212, 191, .12);
    --t-violet: #a78bfa; --t-violet-soft: rgba(167, 139, 250, .13); --t-amber: #fbbf24; --t-amber-soft: rgba(251, 191, 36, .12);
    --accent: #4f8cff; --accent-soft: rgba(79, 140, 255, .15); --accent-text: #8fb4ff;
    --ok: #34d399; --ok-soft: rgba(52, 211, 153, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .14);
    --bad: #f87171; --bad-soft: rgba(248, 113, 113, .14);
    --side: #080b12; --side-2: #141a27; --side-text: #c3cad6; --side-muted: #6b7587;
    --code-bg: #070a11; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.5 Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; gap: 18px;
        padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; font-size: 15.5px; padding: 4px 8px; }
.brand:hover { text-decoration: none; }
/* The church's logo (gold crown and cross, transparent) and the app's name in two lines. */
.logo-img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name b { font-size: 17px; font-weight: 750; letter-spacing: .04em; }
.brand-name small { font-size: 11.5px; font-weight: 550; color: var(--side-text); text-wrap: balance; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.ok { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.dot.bad { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .2); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(99, 132, 255, .16); color: #fff; box-shadow: inset 3px 0 0 #6b8cff; }
.nav .label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: 12px 10px 4px; }
.nav .label:first-child { padding-top: 0; }
.nav a.sub { padding: 6px 10px 6px 31px; font-size: 13.5px; }   /* a page inside the item above (UniFi's) */
.nav a.sub .ic { width: 16px; height: 16px; }
.nav a.sw .dot { margin: 0 3.5px; }   /* a switch under Switches: its status dot where the icon would be */
.nav a.sw .sw-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a.sw.open { color: #fff; font-weight: 600; }
.nav a.sub2 { padding: 5px 10px 5px 52px; font-size: 13px; }   /* the open switch's pages, under its name */
.nav a.sub2 .ic { width: 15px; height: 15px; }
.nav .nav-count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--side-muted); }   /* Switches, folded away */
.nav .nav-count.bad { color: var(--bad); }
.dot.warn { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .2); }
.nav .nav-dot { margin-left: auto; }   /* Monitor → System: something there needs a look */
/* Monitor → System's pages not built yet: listed, not links */
.nav .soon { display: flex; align-items: center; gap: 11px; padding: 6px 10px 6px 31px; font-size: 13.5px; color: var(--side-muted); cursor: default; }
.nav .soon .ic { width: 16px; height: 16px; }
.nav .soon small { margin-left: auto; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }

/* Client Provision's wizard: a step bar and one step at a time, once the page's script runs (without it every step shows) */
.wsteps { display: none; flex-wrap: wrap; gap: 6px; max-width: 980px; margin: 0 0 14px; }
.js-steps .wsteps { display: flex; }
.js-steps .wstep:not(.on) { display: none; }
.wsteps .wst { height: 34px; padding: 0 12px 0 6px; gap: 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
               color: var(--muted); font-size: 13px; font-weight: 500; box-shadow: none; }
.wsteps .wst .wn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2);
                   color: var(--muted); font-size: 11.5px; font-weight: 700; }
.wsteps .wst .wn .ic { width: 13px; height: 13px; }
.wsteps .wst .wv { color: var(--text); font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsteps .wst.done .wn { background: var(--ok-soft); color: var(--ok); }
.wsteps .wst.cur { border-color: var(--accent); color: var(--text); font-weight: 600; }
.wsteps .wst.cur .wn { background: var(--accent); color: #fff; }
.wsteps .wst:disabled { opacity: .45; cursor: default; filter: none; }
.wsteps .wrev { display: inline-flex; align-items: center; cursor: default; }
.wnav { margin-top: 18px; }
.wnav .wmsg { color: var(--bad); font-size: 13px; }
/* A long menu (many switches, one open) scrolls rather than running off the screen. */
.side .nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--side-2) transparent; }
.side-foot { margin-top: auto; border-top: 1px solid var(--side-2); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #334155; color: #fff; font-weight: 650; text-transform: uppercase; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who a { color: #fff; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: var(--side-muted); }
.icon-btn { background: transparent; border: 0; color: var(--side-text); padding: 7px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--side-2); color: #fff; }
.content { padding: 28px 34px 48px; max-width: 1320px; width: 100%; }

/* ---- page header: the band (tone 2) ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px;
             padding: 20px 24px; border-radius: 14px; color: var(--band-text); border-bottom: 3px solid var(--gold);
             background: linear-gradient(120deg, var(--band-1), var(--band-2)); box-shadow: 0 6px 18px rgba(30, 58, 138, .16); }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 680; letter-spacing: -.015em; color: var(--band-text); }
.page-head .sub { color: var(--band-muted); margin-top: 3px; }
.page-head .crumbs, .page-head .crumbs a, .page-head .muted { color: var(--band-muted); }
.page-head a:not(.btn) { color: var(--band-text); }
.page-head .btn.secondary, .page-head button.secondary { background: rgba(255, 255, 255, .96); color: var(--band-1); border-color: transparent; }
.page-head .btn:not(.secondary):not(.ghost):not(.danger), .page-head button:not(.secondary):not(.ghost):not(.danger) {
  background: #fff; color: var(--band-1); }
.page-head .btn.ghost, .page-head button.ghost { color: var(--band-muted); }
.page-head .btn.ghost:hover, .page-head button.ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.page-head .seg { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .22); }
.page-head .seg a { color: var(--band-muted); }
.page-head .seg a:hover { color: #fff; }
.page-head .seg a.current { background: #fff; color: var(--band-1); }
.page-head .seg .n { color: inherit; opacity: .75; }
.page-head code, .page-head .tag { color: var(--text); }
.page-head label { color: var(--band-text); }
.page-head .hint { color: var(--band-muted); }
.auth-card .page-head { background: none; color: inherit; padding: 0; border: 0; box-shadow: none; }   /* (sign-in pages: no band) */
.auth-card .page-head h1 { color: var(--text); }
.auth-card .page-head .sub { color: var(--muted); }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
h2 { font-size: 15.5px; font-weight: 650; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono, code, pre, textarea.code { font-family: "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, monospace; }
code { font-size: .92em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* ---- cards & layout ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-body { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line);
             background: var(--head); }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 9px; }
/* Section colours, on every page: cards take blue, teal and violet in turn down a page (or across a row of cards);
   a tone-* class picks one instead (the Monitor pages do). Browsers without `:nth-child(… of …)` show them all blue. */
.card:nth-child(3n+1 of .card) { --tone: var(--t-blue); --tone-soft: var(--t-blue-soft); }
.card:nth-child(3n+2 of .card) { --tone: var(--t-teal); --tone-soft: var(--t-teal-soft); }
.card:nth-child(3n of .card) { --tone: var(--t-violet); --tone-soft: var(--t-violet-soft); }
/* (two columns of cards: the right one starts a colour later, so the cards side by side differ) */
.grid-2 > :nth-child(2) > .card:nth-child(3n+1 of .card) { --tone: var(--t-teal); --tone-soft: var(--t-teal-soft); }
.grid-2 > :nth-child(2) > .card:nth-child(3n+2 of .card) { --tone: var(--t-violet); --tone-soft: var(--t-violet-soft); }
.grid-2 > :nth-child(2) > .card:nth-child(3n of .card) { --tone: var(--t-blue); --tone-soft: var(--t-blue-soft); }
.card.tone-blue { --tone: var(--t-blue); --tone-soft: var(--t-blue-soft); }
.card.tone-teal { --tone: var(--t-teal); --tone-soft: var(--t-teal-soft); }
.card.tone-violet { --tone: var(--t-violet); --tone-soft: var(--t-violet-soft); }
.card.tone-amber { --tone: var(--t-amber); --tone-soft: var(--t-amber-soft); }
/* A card's first header band is its section's title: tinted with the section's colour, a bar of it on the left,
   the title's icon in it. Header bands further down the card, and table headings, get a lighter tint of it. */
.card > .card-head:first-child { border-radius: var(--radius) var(--radius) 0 0; box-shadow: inset 4px 0 0 var(--tone, var(--t-blue));
                                 background: var(--tone-soft, var(--head)); }
.card > .card-head:first-child h2 .ic { color: var(--tone, var(--t-blue)); }
.card .card-head:not(:first-child) { background: color-mix(in srgb, var(--tone-soft, var(--head)) 45%, var(--panel)); }
/* A smaller header inside a card (a chart's title under a table). */
.card-head.minor { padding: 10px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--tone-soft, var(--head)) 45%, var(--panel)); }
.card-head.minor h2 { font-size: 14px; }
.card th { background: color-mix(in srgb, var(--tone-soft, var(--panel-2)) 35%, var(--panel)); }
/* A card with no header band (a switch's tile, a figure, a table on its own): its colour as a line along its top. */
.card:not(:has(> .card-head:first-child)) { border-top: 3px solid var(--tone, var(--t-blue)); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.stat .tile { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
              background: var(--tone-soft, var(--accent-soft)); color: var(--tone, var(--accent-text)); }   /* (the card's colour) */
.stat .tile.ok { background: var(--ok-soft); color: var(--ok); }
.stat .tile.warn { background: var(--warn-soft); color: var(--warn); }
.stat b { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }

/* ---- switches list ---- */
.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; margin-bottom: 22px; }
.sw-top { display: flex; align-items: center; gap: 10px; }
.sw-name { font-weight: 680; font-size: 17px; color: var(--text); }
.card.sw { margin: 0; transition: box-shadow .15s, transform .15s; }
.card.sw:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .09); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .05em;
     text-transform: uppercase; text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--panel-2); }
td.name a { font-weight: 600; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; }
.empty { padding: 34px; text-align: center; color: var(--muted); }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
         background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.up { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.off { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.badge.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.info { color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }
.badge.plain::before { display: none; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }

/* ---- segmented control / tabs ---- */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--muted); font-weight: 550; font-size: 13.5px; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.current { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.seg .n { margin-left: 6px; font-size: 12px; color: var(--muted); }

/* ---- buttons & forms ---- */
.btn, button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
               font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; }
.btn:hover, button:hover { filter: brightness(1.07); text-decoration: none; }
.btn:disabled, button:disabled { opacity: .6; cursor: progress; }
.btn.secondary, button.secondary { background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.btn.ghost, button.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn.ghost:hover, button.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger, button.danger { background: var(--bad); }
.btn.sm, button.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
form.inline { display: inline; }
label { font-weight: 550; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field .hint { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
input[type=text], input[type=password], input:not([type]), select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit;
  transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled { background: var(--panel-2); color: var(--muted); }
textarea { height: auto; min-height: 300px; padding: 12px 14px; line-height: 1.55; }
textarea.code { background: var(--code-bg); color: var(--code-text); border-color: transparent; font-size: 13px; }
.search { position: relative; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; min-width: 240px; }
/* toggle switch */
.switch { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 23px; border-radius: 999px; background: var(--line);
                position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff;
                       box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(17px); }
.switch input:disabled { opacity: .55; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }

/* ---- alerts ---- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--accent-soft); color: var(--accent-text); }
.alert .ic { margin-top: 2px; }
.alert span { color: var(--text); }

/* ---- code ---- */
pre { margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
pre .add { color: #86efac; } pre .del { color: #fca5a5; } pre .ctx { color: #93c5fd; } pre .dim { color: #64748b; }
.card pre { border-radius: 0 0 var(--radius) var(--radius); }

/* ---- config sections ---- */
details.group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); }
details.group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-weight: 600; }
details.group summary::-webkit-details-marker { display: none; }
/* The groups take the three section colours in turn too: a bar on the left, and their tint once opened. */
details.group:nth-child(3n+1 of details.group) { --tone: var(--t-blue); --tone-soft: var(--t-blue-soft); }
details.group:nth-child(3n+2 of details.group) { --tone: var(--t-teal); --tone-soft: var(--t-teal-soft); }
details.group:nth-child(3n of details.group) { --tone: var(--t-violet); --tone-soft: var(--t-violet-soft); }
details.group summary { border-radius: var(--radius); box-shadow: inset 4px 0 0 var(--tone, var(--t-blue)); }
details.group[open] summary { background: var(--tone-soft, var(--head)); border-radius: var(--radius) var(--radius) 0 0; }
details.group summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
details.group[open] summary::before { transform: rotate(45deg); }
details.group .items { border-top: 1px solid var(--line); }
details.group .items a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 18px 8px 35px; color: var(--text); border-bottom: 1px solid var(--line); }
details.group .items a:last-child { border-bottom: 0; }
details.group .items a:hover { background: var(--panel-2); text-decoration: none; }
details.group .items .mono { font-size: 13px; overflow-wrap: anywhere; }

/* ---- push steps ---- */
.steps { list-style: none; margin: 0; padding: 6px 20px 10px; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; position: relative; align-items: start; }
.steps li::after { content: ''; position: absolute; left: 13px; top: 36px; bottom: -6px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 14px; z-index: 1; }
.steps .mark::before { content: '\2713'; }
.steps li.failed .mark { background: var(--bad-soft); color: var(--bad); }
.steps li.failed .mark::before { content: '\2715'; }
.steps li.running .mark { background: var(--accent-soft); color: var(--accent); }
.steps li.running .mark::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.steps .text { padding-top: 4px; overflow-wrap: anywhere; }
.steps li.running .text { font-weight: 600; }
.steps .secs { padding-top: 4px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.steps .note { grid-column: 2 / -1; color: var(--muted); font-size: 13px; }
.steps li.failed .note { color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
.result { margin: 0 20px 18px; }

/* ---- sign-in pages ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
        background: radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, .18), transparent), radial-gradient(900px 500px at 110% 110%, rgba(99, 102, 241, .16), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 410px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); padding: 30px 30px 26px;
             border-top: 6px solid var(--band-2); }   /* (the pages' blue band, as a strip along the sign-in card's top) */
.auth-card .brand { color: var(--text); padding: 0; margin-bottom: 22px; gap: 12px; }
.auth-card .logo-img { width: 56px; height: 56px; }
.auth-card .brand-name b { font-size: 20px; }
.auth-card .brand-name small { font-size: 13px; color: var(--muted); }
.auth-card h1 { font-size: 21px; margin: 0 0 6px; }
.auth-card p.lead { color: var(--muted); margin: 0 0 20px; }
.auth-card button { width: 100%; justify-content: center; height: 40px; }
.auth-card .btn.sso { width: 100%; justify-content: center; height: 42px; }   /* Sign in with RFT account */
.auth-card .or { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: var(--muted); font-size: 12.5px; }
.auth-card .or::before, .auth-card .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.qr { display: grid; place-items: center; margin: 8px 0 14px; }
.qr svg { width: 210px; height: 210px; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }

/* ---- backups: numbered view and side-by-side compare ---- */
pre.numbered .ln { display: block; }
pre.numbered .ln::before { content: attr(data-n); display: inline-block; width: 3.4em; margin-right: 1.2em; text-align: right; color: #475569; user-select: none; }
pre .hit { background: rgba(250, 204, 21, .28); }
table.diff { table-layout: fixed; font-family: "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; }
table.diff th.no, table.diff td.no { width: 54px; text-align: right; color: var(--muted); user-select: none; }
table.diff td { padding: 2px 10px; border: 0; white-space: pre-wrap; word-break: break-all; vertical-align: top; line-height: 1.55; }
table.diff tbody tr:hover td { background: inherit; }
table.diff tr.del td.l, table.diff tr.chg td.l { background: var(--bad-soft); }
table.diff tr.add td.r, table.diff tr.chg td.r { background: var(--ok-soft); }
table.diff tr.del td.r, table.diff tr.add td.l { background: var(--panel-2); }
table.diff tr.gap td { text-align: center; color: var(--muted); background: var(--panel-2); padding: 4px; }

/* ---- terminal ---- */
.term-wrap { background: #0b1220; padding: 10px 12px; border-radius: 0 0 var(--radius) var(--radius); }
#term { height: 62vh; min-height: 360px; }
.card-head .toolbar input { height: 34px; }

/* ---- monitor ---- */
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin-bottom: 18px; }
a.card.mon-card { display: block; margin: 0; color: var(--text); transition: box-shadow .15s; }
a.card.mon-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(15, 23, 42, .09); }
.card.mon-card.soon { margin: 0; opacity: .7; }
.card.mon-card { border-top: 3px solid var(--tone, var(--t-blue)); }
.mon-card .mc-top { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15.5px; margin-bottom: 8px; }
.mon-card .mc-top .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
                          background: var(--tone-soft, var(--t-blue-soft)); color: var(--tone, var(--t-blue)); }
.mon-card .mc-top .badge { margin-left: auto; }
.mon-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.bar { height: 8px; min-width: 90px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar > span.warn { background: var(--warn); }
.bar > span.bad { background: var(--bad); }
td .bar { margin: 4px 0 2px; }
td.act { white-space: nowrap; }
ul.issues { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
ul.issues li.bad { color: var(--bad); } ul.issues li.warn { color: var(--warn); } ul.issues li.unknown { color: var(--muted); }
ul.issues li span { color: var(--text); }
.chart-wrap { padding: 8px 14px 12px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .grid.v { stroke-dasharray: 2 4; }
svg.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
svg.chart polyline { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
svg.chart circle { stroke: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 2px 4px 0 66px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
svg.chart .s1 { stroke: #3b82f6; fill: #3b82f6; } .legend .s1 { background: #3b82f6; }
svg.chart .s2 { stroke: #f59e0b; fill: #f59e0b; } .legend .s2 { background: #f59e0b; }
svg.chart .s3 { stroke: #10b981; fill: #10b981; } .legend .s3 { background: #10b981; }
svg.chart .s4 { stroke: #ef4444; fill: #ef4444; } .legend .s4 { background: #ef4444; }
svg.chart .s5 { stroke: #8b5cf6; fill: #8b5cf6; } .legend .s5 { background: #8b5cf6; }
svg.chart .s6 { stroke: #06b6d4; fill: #06b6d4; } .legend .s6 { background: #06b6d4; }
svg.chart polyline.s1, svg.chart polyline.s2, svg.chart polyline.s3, svg.chart polyline.s4, svg.chart polyline.s5, svg.chart polyline.s6 { fill: none; }
.chart-empty { padding: 26px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.charts-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 18px; }

/* ---- small screens ---- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; }
  .nav { order: 4; flex-direction: row; overflow-x: auto; width: 100%; }
  .nav .label { display: none; }
  .nav a { white-space: nowrap; }
  .nav a.sub, .nav a.sub2, .nav .soon { padding-left: 10px; white-space: nowrap; }
  .charts-2 { grid-template-columns: 1fr; }
  .legend { padding-left: 4px; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .side-foot .who { display: none; }
  .content { padding: 20px 16px 40px; }
  .page-head { padding: 16px 16px; }
  .grid-2, .fields-2 { grid-template-columns: 1fr; }
  .search input { min-width: 0; }
}
