@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); }   /* SIL OFL, see fonts/LICENSE-Inter.txt */
:root {
  --on-accent: #ffffff;
  --side-w: 248px;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f0f3f9;
  --line: #e2e7f0;
  --text: #111827;
  --muted: #5b6677;
  --accent: #2563eb;
  --accent-soft: #e7eefe;
  --ok: #059669;
  --ok-soft: #e3f6ef;
  --warn: #b45309;
  --warn-soft: #fdf1e1;
  --crit: #dc2626;
  --crit-soft: #fde8e8;
  --in: #2563eb;
  --out: #10b981;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --panel: #111a2c; --panel-2: #16213a; --line: #24314d; --text: #e8edf6; --muted: #98a4ba;
    --accent: #60a5fa; --accent-soft: #1b2a4a; --ok: #34d399; --ok-soft: #10302a; --warn: #fbbf24; --warn-soft: #33290f;
    --crit: #f87171; --crit-soft: #3a1717; --in: #60a5fa; --out: #34d399; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
[hidden] { display: none !important; }

/* buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--crit); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.field { display: grid; gap: 4px; margin: 0 0 12px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.form-error { background: var(--crit-soft); color: var(--crit); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.code-input { font-size: 22px; letter-spacing: .3em; text-align: center; }

/* auth pages */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.auth-card .brand { margin-bottom: 22px; }
.auth-card form h1 { margin-bottom: 2px; }
.auth-card form > .muted { margin: 0 0 18px; }

/* layout: sidebar (grouped navigation) + content; on narrow screens the sidebar is a drawer */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -.01em; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent) url("/static/favicon.svg") center / cover; flex: none; }
.brand-logo { max-height: 34px; max-width: 150px; width: auto; object-fit: contain; flex: none; }
.brand-logo.on-light { background: #f8fafc; border-radius: 8px; padding: 4px 8px; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; background: var(--panel);
  border-right: 1px solid var(--line); padding: 18px 12px 12px; overflow-y: auto; z-index: 30; }
.sidebar > .brand { padding: 2px 8px 14px; }
.side-nav { display: grid; gap: 14px; flex: 1; align-content: start; }
.nav-group { display: grid; gap: 2px; }
.nav-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 4px; }
.side-nav a { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 7px 10px; border-radius: 8px; font-weight: 550; font-size: 14px; }
.side-nav a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:hover { background: var(--panel-2); text-decoration: none; color: var(--text); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
.side-nav a .badge { margin-left: auto; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 4px 0; display: grid; gap: 10px; }
.side-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who-link { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; padding: 4px; border-radius: 8px; }
.who-link:hover { text-decoration: none; background: var(--panel-2); }
.who-text { display: grid; line-height: 1.25; min-width: 0; }
.who-text b, .who-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text b { font-size: 13.5px; }
.who-text small { color: var(--muted); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; text-align: center; line-height: 18px; font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; position: sticky; top: 0; z-index: 20; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.nav-toggle { display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--text); width: 38px; height: 38px; padding: 0; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 30, .45); z-index: 25; }
.notice-bar { background: var(--accent-soft); color: var(--text); padding: 9px 32px; font-size: 14px; }
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 32px; outline: none; flex: 1; }
.foot { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 32px 28px; color: var(--muted); font-size: 13px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-block; font-size: 14px; margin-bottom: 8px; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.kpi.alert { border-color: var(--crit); background: var(--crit-soft); }

/* service cards */
.svc { display: grid; gap: 12px; }
.svc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.svc-top h3 { margin: 0; font-size: 16px; }
.svc-top a { color: var(--text); }
.svc-where { color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.crit { background: var(--crit-soft); color: var(--crit); }
.pill.muted { background: var(--panel-2); color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts dd small { display: block; font-weight: 400; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.checks li { display: flex; gap: 8px; }
.checks .ck { width: 18px; text-align: center; font-weight: 700; }
.checks .ok .ck { color: var(--ok); }
.checks .bad .ck { color: var(--crit); }
.checks .na .ck { color: var(--muted); }
.boost-line { background: var(--accent-soft); border-radius: 8px; padding: 6px 10px; font-size: 14px; }

/* charts */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .area-in { fill: var(--in); fill-opacity: .16; stroke: var(--in); stroke-width: 1.5; }
.chart .area-out { fill: var(--out); fill-opacity: .16; stroke: var(--out); stroke-width: 1.5; }
.chart .p95 { stroke: var(--warn); stroke-width: 1.3; stroke-dasharray: 6 4; }
.chart .commit { stroke: var(--accent); stroke-width: 1.3; stroke-dasharray: 2 3; }
.chart .limit { stroke: var(--crit); stroke-width: 1.3; stroke-dasharray: 8 4; }
.chart .line-label { font-size: 11px; font-weight: 600; }
.chart .p95-t { fill: var(--warn); }
.chart .commit-t { fill: var(--accent); }
.chart .limit-t { fill: var(--crit); }
.chart .cursor { stroke: var(--muted); stroke-width: 1; }
.chart-tip { font-size: 13px; color: var(--muted); min-height: 20px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .in { background: var(--in); }
.legend .out { background: var(--out); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: var(--panel); border: 0; padding: 6px 12px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.spark svg { display: block; width: 100%; height: 44px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-weight: 600; }
.tag.deny { background: var(--crit-soft); color: var(--crit); }
.tag.permit { background: var(--ok-soft); color: var(--ok); }
.tag.new { background: var(--accent-soft); color: var(--accent); }
.tag.accepted { background: var(--warn-soft); color: var(--warn); }
.tag.done { background: var(--ok-soft); color: var(--ok); }
.tag.rejected { background: var(--crit-soft); color: var(--crit); }

/* report */
.report { background: #fff; color: #111827; border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); }
.report .rp-head { display: flex; justify-content: space-between; border-bottom: 2px solid #111827; padding-bottom: 12px; margin-bottom: 18px; }
.report .rp-company { font-size: 20px; font-weight: 700; }
.report .rp-logo { display: block; max-height: 44px; max-width: 220px; margin-bottom: 6px; }
.report .figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 12px 0; }
.report .figs div { border: 1px solid #e2e7f0; border-radius: 8px; padding: 10px 12px; }
.report .figs span { display: block; font-size: 12px; color: #5b6677; }
.report .figs b { font-size: 18px; }
.report section + section { margin-top: 24px; }
.report .note { font-size: 12.5px; color: #5b6677; }
.report .chart .axis { fill: #5b6677; }
.report .chart .grid-line { stroke: #e2e7f0; }

/* dialog + toast */
.dlg { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--panel); color: var(--text); }
.dlg::backdrop { background: rgba(10, 16, 30, .45); }
.dlg form { padding: 22px 24px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 50; }
.toast.error { background: var(--crit); color: #fff; }
.qr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr img { width: 180px; height: 180px; border-radius: 8px; background: #fff; }
.secret { font-family: ui-monospace, monospace; font-size: 14px; background: var(--panel-2); padding: 6px 10px; border-radius: 6px; user-select: all; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(var(--side-w), 86vw); transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }
  .topbar { display: flex; }
  .page { padding: 20px 16px; }
  .foot, .notice-bar { padding-left: 16px; padding-right: 16px; }
  .grid.two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
@media print {
  .sidebar, .topbar, .scrim, .foot, .notice-bar, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
}
.spacer { flex: 1; }
.mt { margin-top: 16px; }
.pre { white-space: pre-wrap; }
.kpi-value.small-value { font-size: 17px; padding-top: 6px; }
.legend a { margin-left: auto; }

/* requests as conversations */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.chat-list { padding: 6px; max-height: calc(100vh - 150px); overflow-y: auto; position: sticky; top: 24px; }
.chat-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--text); border: 1px solid transparent; }
.chat-item:hover { background: var(--panel-2); text-decoration: none; }
.chat-item.active { background: var(--accent-soft); border-color: var(--accent); }
.chat-item.unread b { color: var(--accent); }
.ci-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ci-what, .ci-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.chat-thread { display: flex; flex-direction: column; padding: 0; min-height: 420px; max-height: calc(100vh - 190px); }
.thread-head { padding: 16px 20px 10px; border-bottom: 1px solid var(--line); }
.thread-head p { margin: 4px 0 0; }
.th-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.th-top h2 { margin: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.noc { align-self: flex-start; }
.msg .bubble { padding: 9px 13px; border-radius: 14px; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.msg.mine .bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.msg.noc .bubble { background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.msg.system { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--muted); }
.msg.system span { background: var(--panel-2); padding: 3px 10px; border-radius: 999px; display: inline-block; }
.msg.system time { display: block; font-size: 11px; margin-top: 2px; }
.chat-compose { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-compose textarea { resize: vertical; min-height: 44px; max-height: 200px; }
.chat-ro { padding: 12px 20px; margin: 0; border-top: 1px solid var(--line); }
.badge.hot { background: var(--crit); }
.only-narrow { display: none; }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-layout.has-open .chat-list { display: none; }
  .chat-layout:not(.has-open) .chat-thread { display: none; }
  .chat-list { position: static; max-height: none; }
  .chat-thread { max-height: none; min-height: 60vh; }
  .only-narrow { display: inline-block; }
  .msg { max-width: 90%; }
}

/* racks */
.rack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rack-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--panel-2); }
.rack-card .pill { margin-top: 6px; }
.rack-name { font-weight: 700; font-size: 16px; }
.rack-ico { width: 34px; flex: none; border: 2px solid var(--muted); border-radius: 4px; padding: 3px; display: grid; gap: 3px; }
.rack-ico i { display: block; height: 5px; border-radius: 1px; background: var(--accent); opacity: .75; }
.access { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.access p { margin: 4px 0 0; }

/* chat attachments */
.chat-compose { flex-direction: column; align-items: stretch; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea { flex: 1; }
.btn.attach { padding: 8px 11px; font-size: 16px; cursor: pointer; }
.chat-files { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 13px; }
.file-chip small { color: var(--muted); }
.chat-thread.dropping, #thread.dropping { outline: 2px dashed var(--accent); outline-offset: -6px; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.msg.mine .msg-files { justify-content: flex-end; }
.msg-img img { display: block; max-width: 260px; max-height: 200px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.msg-file { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--text); font-size: 13.5px; }
.msg-file small { color: var(--muted); }
.msg-file:hover { border-color: var(--accent); text-decoration: none; }
.msg-files { align-items: flex-start; }

/* overview: unread messages from the NOC */
.unread-banner { border-color: var(--accent); background: var(--accent-soft); padding: 14px 18px; }
.ub-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ub-head strong { flex: 1; }
.ub-item { display: grid; grid-template-columns: 10px auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px;
  color: var(--text); background: var(--panel); margin-top: 4px; border: 1px solid transparent; }
.ub-item:hover { border-color: var(--accent); text-decoration: none; }
.ub-text { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ub-age { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 700px) { .ub-item { grid-template-columns: 10px 1fr auto; } .ub-text { display: none; } }

/* contacts */
tr.ct-removing td { opacity: .5; text-decoration: line-through; }
.ct-rejected { padding-top: 10px; padding-bottom: 10px; }
.ct-rejected .form-error { margin: 0; }
.nowrap { white-space: nowrap; }

/* language switch (EN | DA) */
.lang-switch { display: inline-flex; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; overflow: hidden; flex: none; }
.lang-switch button { border: 0; background: none; padding: 4px 8px; font: 650 12px/1.2 inherit; color: var(--muted); cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--line, #e2e8f0); }
.lang-switch button[aria-pressed="true"] { background: var(--accent-soft, #e0e7ff); color: var(--accent, #2563eb); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: -2px; }
.lang-switch.big button { padding: 7px 14px; font-size: 14px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top .brand { margin: 0; }
.auth-top { margin-bottom: 22px; }

/* contacts as cards on narrow screens */
@media (max-width: 700px) {
  .ct-table thead { display: none; }
  .ct-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ct-table td { border: 0; padding: 0; }
  .ct-table td:nth-child(1) { grid-column: 1; }
  .ct-table td:nth-child(4) { grid-column: 2; grid-row: 1; }
  .ct-table td:nth-child(2), .ct-table td:nth-child(3) { grid-column: 1 / -1; }
  .ct-table td:nth-child(3):has(.muted) { display: none; }
  .ct-table td:nth-child(5) { grid-column: 1 / -1; text-align: left; }
}

/* ---------- power: feeds A / B ---------- */
:root { --feed-a: #0ea5e9; --feed-b: #8b5cf6; }
@media (prefers-color-scheme: dark) { :root { --feed-a: #38bdf8; --feed-b: #a78bfa; } }
.feeds { display: inline-flex; gap: 3px; vertical-align: 2px; margin-left: 4px; }
.feeds b, .pw-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font: 700 11px/1 ui-monospace, monospace; color: #fff; background: var(--feed-a); }
.feeds b.feed-B, .pw-badge.feed-B { background: var(--feed-b); }
.demo-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  color: var(--warn); background: var(--warn-soft); border: 1px dashed var(--warn); vertical-align: 1px; cursor: help; }
.pw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.pw-grid.single { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pw-feed { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; position: relative; overflow: hidden; background: var(--panel); }
.pw-feed::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--feed-a); }
.pw-feed.feed-B::before { background: var(--feed-b); }
.pw-feed.total::before { background: linear-gradient(var(--feed-a), var(--feed-b)); }
.pw-feed-head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; flex-wrap: wrap; }
.pw-val { font-size: 26px; font-weight: 750; letter-spacing: -.01em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.pw-val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.gauge { position: relative; height: 8px; border-radius: 999px; background: var(--panel-2); margin: 4px 0 6px; }
.gauge i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--ok); transition: width .5s ease; }
.pw-feed.warn .gauge i { background: var(--warn); } .pw-feed.crit .gauge i { background: var(--crit); }
.gauge em { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--muted); opacity: .6; }
.pw-red { margin-top: 8px; font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); }
.pw-red.warn { background: var(--warn-soft); color: var(--warn); } .pw-red.crit { background: var(--crit-soft); color: var(--crit); }
.pw-grid.compact .pw-val { font-size: 21px; }
.pw-grid.compact .pw-red { font-size: 12px; padding: 6px 8px; }
.chart .area-a { fill: var(--feed-a); fill-opacity: .35; stroke: var(--feed-a); stroke-width: 1.2; }
.chart .area-b { fill: var(--feed-b); fill-opacity: .35; stroke: var(--feed-b); stroke-width: 1.2; }
.legend i.feed-A { background: var(--feed-a); } .legend i.feed-B { background: var(--feed-b); }
.power-panel h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ov-traffic .facts { margin-bottom: 8px; }
.ov-rack h3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.ov-rack .spark svg { height: 60px; }
@media (max-width: 800px) { .pw-grid, .pw-grid.single { grid-template-columns: 1fr; } }

/* disruptions (incident notices) */
.disruption { border-left: 4px solid var(--crit); }
.disruption.done { border-left-color: var(--ok); }
.dis-head { display: flex; align-items: center; gap: 10px; }
.dis-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--crit); flex: none; animation: dis-pulse 1.6s infinite; }
@keyframes dis-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dis-dot { animation: none; } }

/* ---------- loading placeholders + empty states ---------- */
.skeleton { display: grid; gap: 14px; }
.skeleton i { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--panel-2) 25%, var(--line) 50%, var(--panel-2) 75%);
  background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; }
.sk-title { width: 240px; height: 30px; }
.sk-line { width: 380px; max-width: 80%; height: 14px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sk-grid i { height: 92px; }
.sk-block { height: 280px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton i { animation: none; } }
.empty-state { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 6px; }
.empty-state .es-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.empty-state .es-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0; font-size: 16px; }
.empty-state p { margin: 0; color: var(--muted); max-width: 440px; font-size: 14px; }
.empty-state .btn { margin-top: 10px; }

/* ---------- remote hands ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.choice { position: relative; display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; background: var(--panel); font-size: 14px; line-height: 1.35; }
.choice input { width: auto; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.choice small { display: block; color: var(--muted); font-size: 12.5px; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.choice.urg-emergency:has(input:checked) { border-color: var(--crit); background: var(--crit-soft); }
.choice.urg-urgent:has(input:checked) { border-color: var(--warn); background: var(--warn-soft); }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.dlg.wide { width: min(680px, calc(100vw - 32px)); }
.rh-summary { display: grid; gap: 2px; }
.tag.urg-urgent { background: var(--warn-soft); color: var(--warn); }
.tag.urg-emergency { background: var(--crit-soft); color: var(--crit); }
.rack-actions { margin-top: 10px; }
.photo-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* with a logo the name is in the picture: hide the text (the image's alt text still names the company) */
.has-logo .brand .brand-name { display: none; }
.has-logo .brand-logo { max-height: 40px; max-width: 190px; }
.has-logo .topbar .brand-logo { max-height: 32px; }

/* ---------- seen worldwide (BGP watch) ---------- */
.world-list { display: grid; gap: 8px; }
.world-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.world-vis { text-align: right; }
.world-alert { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }

/* ---------- network tools ---------- */
.lg-form .seg { flex-wrap: wrap; margin-bottom: 8px; }
.lg-out { margin-top: 14px; }
.lg-out h3 { margin: 0 0 6px; }
.lg-verdict { margin-bottom: 8px; }
.lg-cont { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; font-size: 14px; }
.lg-hops { margin: 0; padding-left: 28px; font-size: 13px; line-height: 1.7; }
.lg-row { cursor: pointer; }
.pc-form .row { align-items: flex-start; }
.pc-form .grow { flex: 1 1 280px; }
.pc-form textarea { width: 100%; resize: vertical; }
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.pc-prefix { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.pc-prefix h3 { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; }
.pc-item { display: flex; gap: 10px; padding: 6px 0; }
.pc-item + .pc-item { border-top: 1px dashed var(--line); }
.pc-item p { margin: 2px 0 0; font-size: 14px; }
.pc-item ol { margin: 6px 0 2px; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.pc-ico { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--panel-2); color: var(--muted); }
.pc-item.ok .pc-ico { background: var(--ok-soft); color: var(--ok); }
.pc-item.warn .pc-ico { background: var(--warn-soft); color: var(--warn); }
.pc-item.fail .pc-ico { background: var(--crit-soft); color: var(--crit); }
.pc-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lg-row:hover td { background: var(--panel-2); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.lg-as { color: var(--accent); font-size: 12px; margin-left: 4px; }
