/* TopView Hub — admin UI. Operate mode: light working surface, navy chrome, TopView blue for action,
   copper for brand detail only. RTL first, phone first. No inline styles anywhere (CSP style-src 'self'). */

@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/saira-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Kufi Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/noto-kufi-arabic-bold.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

:root {
  --navy: #0a1428;
  --navy-2: #16233f;
  --ground: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #d9e0ea;
  --line-2: #e8edf3;
  --ink: #0e1830;
  --ink-2: #44526a;
  --ink-3: #5f6d83;
  --blue: #086ad9;
  --blue-ink: #0656b0;
  --blue-bright: #3d8bff;
  --blue-wash: #e8f1fd;
  --blue-soft: #b9d3f6;
  --copper: #d2a88f;
  --copper-ink: #87553a;
  --copper-wash: #f8efe9;
  --ok: #1a7a43;
  --ok-wash: #e6f3eb;
  --warn: #9a5a00;
  --warn-wash: #fdf2de;
  --bad: #bf2f28;
  --bad-wash: #fcebea;
  --na: #8a95a6;

  --font-ui: 'Saira', system-ui, 'Segoe UI', 'Noto Sans Arabic', Tahoma, sans-serif;
  --font-head: 'Saira', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-code: ui-monospace, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --bar-h: 56px;
  --tab-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--blue);
  scrollbar-color: #b8c2d1 transparent;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-ui);
  caret-color: var(--blue);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
::selection { background: var(--blue-soft); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.35; margin: 0; text-wrap: balance; }
p { margin: 0 0 0.75rem; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-ink); }
code { font-family: var(--font-code); font-size: 0.875em; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 0.05em 0.35em; }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; background: var(--surface); padding: 8px 12px;
  border-radius: var(--r); }
.skip:focus { top: 8px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-3); }
.num, .figures dd, .tally-n, .metrics dd { font-family: 'Saira', var(--font-ui); font-variant-numeric: tabular-nums; }
.num { unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ chrome */

.bar { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; }
.bar-inner { max-width: 1120px; margin: 0 auto; height: var(--bar-h); padding: 0 16px; display: flex; align-items: center;
  gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 24px; height: auto; }
.brand-name { font: 600 1.125rem/1 'Saira', var(--font-ui); letter-spacing: 0.01em; }
.brand-name b { font-weight: 600; color: var(--copper); }
.topnav { display: none; }
.logout { margin-inline-start: auto; }
.bar .btn-ghost { color: #dfe6f2; background: transparent; border-color: transparent; min-height: 40px; padding: 0 10px; }
.bar .btn-ghost:hover { background: var(--navy-2); color: #fff; }
.bar .btn-ghost span { display: none; }

.tabbar { position: sticky; bottom: 0; z-index: 20; margin-top: 8px; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--tab-h); color: var(--ink-3); text-decoration: none; font-size: 0.75rem; font-weight: 600; }
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--blue); }
.tabbar a[aria-current="page"] .icon { stroke-width: 2.1; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 16px 16px 8px; }

@media (min-width: 900px) {
  body > main { padding-bottom: 32px; }
  .tabbar { display: none; }
  .topnav { display: flex; gap: 4px; height: 100%; }
  .topnav a { display: flex; align-items: center; padding: 0 12px; color: #c9d3e3; text-decoration: none;
    font-weight: 600; font-size: 0.9375rem; border-bottom: 2px solid transparent; border-top: 2px solid transparent; }
  .topnav a:hover { color: #fff; }
  .topnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--copper); }
  .bar .btn-ghost span { display: inline; }
  .wrap { padding: 28px 24px 16px; }
}

/* ------------------------------------------------------------------ page structure */

.page-title { font-size: 1.5rem; margin: 4px 0 16px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; }
.page-head .page-title { margin-bottom: 4px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--ink-2); font-size: 0.875rem;
  margin: 0; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 0.875rem; color: var(--ink-3); margin-bottom: 4px; }
.crumbs .icon { width: 16px; height: 16px; }
.crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
  margin-bottom: 16px; }
.panel > h2, .panel-head h2 { font-size: 1.0625rem; margin-bottom: 12px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel .pad { padding: 16px 16px 0; }
.panel.flush > h2.pad { margin-bottom: 12px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin-bottom: 12px; }
.more { display: inline-flex; align-items: center; gap: 2px; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.more .icon { width: 16px; height: 16px; }
.split { display: grid; gap: 0 16px; }
.narrow { max-width: 680px; }
.sub-h { font-size: 0.9375rem; color: var(--ink-2); margin: 16px 0 8px; }
.hint { color: var(--ink-3); font-size: 0.875rem; }
.empty { color: var(--ink-2); max-width: 62ch; }
.all-good { color: var(--ok); font-weight: 600; margin: 4px 0 0; }
.warn-text { color: var(--warn); font-weight: 600; }
.hw { color: var(--ink-3); font-size: 0.8125rem; }

@media (min-width: 900px) {
  .page-title { font-size: 1.75rem; }
  .panel { padding: 20px 24px; }
  .panel .pad { padding: 20px 24px 0; }
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ------------------------------------------------------------------ controls */

.btn, .btn-ghost, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); font: 600 0.9375rem/1 var(--font-ui);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease); }
.btn { background: var(--blue); color: #fff; }
.btn:hover { background: var(--blue-ink); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: #c4cddb; color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #e7b9b6; }
.btn-danger:hover { background: var(--bad-wash); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }
.btn-wide { width: 100%; }
button:disabled, .btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
button.is-done { color: var(--ok); border-color: #a9d3b8; }

.stack { display: grid; gap: 16px; }
.narrow-form { max-width: 460px; }
.field { display: grid; gap: 6px; }
.label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
input:not([type="checkbox"]):not([type="radio"]), select {
  width: 100%; min-height: 44px; padding: 9px 12px; font: 400 1rem/1.4 var(--font-ui); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
input::placeholder { color: #7d899b; }
input:hover, select:hover { border-color: #bcc6d5; }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
input[readonly] { background: var(--surface-2); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; }
.field-error { color: var(--bad); font-size: 0.875rem; margin: 0; }
.field-row { display: grid; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.toggle-form { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.inline-form { margin-top: 12px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }

.flash { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-weight: 600; border: 1px solid; }
.flash-ok { background: var(--ok-wash); color: var(--ok); border-color: #b7dcc5; }
.flash-warn { background: var(--warn-wash); color: var(--warn); border-color: #f0d6a6; }
.flash-error { background: var(--bad-wash); color: var(--bad); border-color: #efc1be; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
  font-size: 0.875rem; font-weight: 600; }
.chips a:hover { border-color: #bcc6d5; color: var(--ink); }
.chips a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips a b { font-weight: 600; opacity: 0.8; }
.chip-ok .dot { color: var(--ok); }
.chip-warning .dot { color: var(--warn); }
.chip-offline .dot { color: var(--bad); }
.chips a[aria-current="true"] .dot { color: #fff; }

.seg-links { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); }
.seg-links a { padding: 7px 14px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.seg-links a + a { border-inline-start: 1px solid var(--line); }
.seg-links a[aria-current="true"] { background: var(--blue-wash); color: var(--blue-ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.sortby { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-bottom: 16px; font-size: 0.875rem; }
.sortby .label { margin-inline-end: 4px; }
.sortby a { padding: 6px 10px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; }
.sortby a[aria-current="true"] { background: var(--blue-wash); color: var(--blue-ink); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 16px; }
.filters .field.inline { min-width: 200px; }
.js .js-hide { display: none; }

/* ------------------------------------------------------------------ status */

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem;
  font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-wash); color: var(--ok); }
.pill-warning { background: var(--warn-wash); color: var(--warn); }
.pill-offline { background: var(--bad-wash); color: var(--bad); }
.is-over { color: var(--warn); font-weight: 700; }

.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.tally-item { display: grid; gap: 2px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface-2); text-decoration: none; color: var(--ink-2);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.tally-item:hover { border-color: var(--line); background: var(--surface); color: var(--ink); }
.tally-n { font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.tally-l { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600; }
.tally-ok .dot { color: var(--ok); }
.tally-warning .dot { color: var(--warn); }
.tally-offline .dot { color: var(--bad); }
.tally-offline .tally-n { color: var(--bad); }
.tally-warning .tally-n { color: var(--warn); }

.callout { border-width: 1px; }
.callout-warning { background: var(--warn-wash); border-color: #f0d6a6; color: #6e4100; }
.callout-offline { background: var(--bad-wash); border-color: #efc1be; color: #8c201b; }
.reasons { margin: 0; padding-inline-start: 20px; font-weight: 600; }
.reasons li + li { margin-top: 4px; }

/* ------------------------------------------------------------------ lists + tables */

.rows { list-style: none; margin: 12px 0 0; padding: 0; }
.rows li { border-top: 1px solid var(--line-2); }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
  text-decoration: none; color: var(--ink); }
.row-link:hover .row-title { color: var(--blue); }
.row-main { display: grid; min-width: 0; }
.row-title { font-weight: 600; }
.row-sub { display: block; color: var(--ink-3); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; }

.rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank li { counter-increment: rank; border-top: 1px solid var(--line-2); }
.rank a { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.rank a::before { content: counter(rank); font: 600 0.8125rem 'Saira', var(--font-ui); color: var(--copper-ink);
  min-width: 1.25em; }
.rank-name { flex: 1; min-width: 0; }
.rank a:hover .rank-name { color: var(--blue); }
.rank .num { font-weight: 600; }

.figures { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 4px; }
.figures div { display: grid; }
.figures dt { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; }
.figures dd { margin: 0; font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
.families { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 0.875rem; margin: 4px 0 0; }
.families b { color: var(--ink); }

.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: start; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); background: var(--surface-2);
  padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.table .n { text-align: end; font-family: 'Saira', var(--font-ui); font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 600; text-decoration: none; color: var(--ink); }
.table .strong:hover { color: var(--blue); text-decoration: underline; }
.table .row-sub { margin-top: 2px; }
.is-off td, .is-off .strong { color: var(--ink-3); }
.faults { margin: 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--warn); }

@media (max-width: 719px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0;
    border: 0; text-align: start; }
  .table td::before { content: attr(data-label); color: var(--ink-3); font-size: 0.8125rem; font-weight: 600;
    font-family: var(--font-ui); flex: none; }
  .table td:first-child { display: block; padding-bottom: 6px; font-size: 1rem; }
  .table td:first-child::before { content: none; }
  .table .n { text-align: end; }
  .table td > :last-child { text-align: end; }
  .table td:first-child > :last-child { text-align: start; }
}

/* ------------------------------------------------------------------ badges */

.type { display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); font-size: 0.8125rem; font-weight: 600;
  background: #edf0f5; color: var(--ink-2); white-space: nowrap; }
.type-google_review { background: var(--blue-wash); color: var(--blue-ink); }
.type-loyalty { background: var(--copper-wash); color: var(--copper-ink); }
.type-talabat { background: #fdeee4; color: #9a4310; }
.type-elmenus { background: #e9f5f1; color: #1e6b55; }
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--r-sm); font-size: 0.75rem; font-weight: 700; }
.tag-off { background: var(--bad-wash); color: var(--bad); }
.code { background: var(--surface-2); letter-spacing: 0.04em; }

/* ------------------------------------------------------------------ charts */

.chart { margin: 12px 0 0; }
.chart-plot { position: relative; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr);
  grid-template-rows: 168px; }
.chart-line .chart-plot { grid-template-rows: 120px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  padding-inline-end: 8px; font: 500 0.6875rem/1 'Saira', var(--font-ui); color: var(--ink-3); }
.chart-y span { transform: translateY(-0.4em); }
.chart-y span:last-child { transform: translateY(0.4em); }
.chart-svg { width: 100%; height: 100%; min-height: 0; display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .axis { stroke: var(--line); stroke-width: 1; }
.chart-svg .hit { fill: transparent; }
.chart-svg .bar-total { fill: var(--blue-soft); }
.chart-svg .bar-unique { fill: var(--blue); }
.chart-svg g:hover .bar-total { fill: #9ec1f2; }
.chart-svg g:hover .bar-unique { fill: var(--blue-ink); }
.chart-svg .series { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .threshold { stroke: var(--copper-ink); stroke-width: 1.25; stroke-dasharray: 5 4; }
.chart-x { display: flex; justify-content: space-between; padding-inline-start: 2.75rem; margin-top: 6px;
  font: 500 0.75rem/1.2 var(--font-ui); color: var(--ink-3); }
.chart-empty { position: absolute; inset: 0 0 0 2.75rem; display: grid; place-items: center; margin: 0; color: var(--ink-3);
  font-size: 0.8125rem; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8125rem;
  color: var(--ink-2); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.key + * { margin-inline-end: 0; }
.key-total { background: var(--blue-soft); }
.key-unique { background: var(--blue); margin-inline-start: 12px; }
.charts-grid { display: grid; gap: 8px 24px; }
.charts-grid .sub-h { margin-top: 8px; }
@media (min-width: 900px) { .charts-grid { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ screens */

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.metrics div { padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.metrics dt { font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; }
.metrics dd { margin: 2px 0 0; font-size: 1.375rem; font-weight: 600; line-height: 1.3; }
.metrics dd .muted { font-size: 0.9375rem; font-weight: 400; }
.metrics dd.hint { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 400; color: var(--ink-3); line-height: 1.4; }
@media (min-width: 720px) { .metrics { grid-template-columns: repeat(3, 1fr); } }

.fault-list { list-style: none; margin: 0; padding: 0; }
.fault-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0;
  border-top: 1px solid var(--line-2); color: var(--warn); font-weight: 600; }
.fault-list li:first-child { border-top: 0; }

.netcheck { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.875rem; }
.netcheck:not(.is-compact) { display: grid; gap: 8px; margin-bottom: 12px; }
.nc { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.nc-ok .dot { color: var(--ok); }
.nc-bad { color: var(--bad); }
.nc-bad .dot { color: var(--bad); }
.nc-na { color: var(--ink-3); }
.nc-na .dot { color: var(--na); }
.nc-d { font-family: 'Saira', var(--font-ui); font-weight: 500; color: var(--ink-2); }
.nc-at { color: var(--ink-3); font-size: 0.8125rem; }

/* phone: compact screen cards instead of a 9-column table */
.screen-cards { list-style: none; margin: 0; padding: 0; }
.screen-cards li + li { border-top: 1px solid var(--line-2); }
.screen-cards a { display: grid; gap: 6px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.screen-cards a:active { background: var(--surface-2); }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sc-name { font-weight: 600; }
.sc-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.875rem; color: var(--ink-2); }
.sc-faults { font-size: 0.875rem; color: var(--warn); font-weight: 600; }
.sc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.8125rem;
  color: var(--ink-3); }
.sc-foot .netcheck { font-size: 0.8125rem; }
@media (max-width: 719px) { .table-screens { display: none !important; } }
@media (min-width: 720px) { .screen-cards { display: none; } }

/* ------------------------------------------------------------------ links + QR */

.short { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.short-url { font: 600 1.125rem/1.3 'Saira', var(--font-ui); color: var(--blue); word-break: break-all; text-decoration: none; }
.short-url:hover { text-decoration: underline; }
.qr { display: grid; gap: 16px; }
.qr-stage { display: grid; place-items: center; min-height: 220px; padding: 16px; border-radius: var(--r);
  background: var(--surface-2); border: 1px dashed var(--line); }
.qr-stage svg { width: 100%; max-width: 300px; height: auto; display: block; }
.qr-opts { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.qr-opts input:disabled { opacity: 0.55; }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.seg .label { width: 100%; }
.seg label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }

.kv { margin: 12px 0 16px; border-top: 1px solid var(--line-2); }
.kv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.kv-k { font: 600 0.9375rem 'Saira', var(--font-ui); min-width: 120px; }
.kv-v { flex: 1 1 260px; word-break: break-all; padding: 6px 10px; }
.cron-state { margin-top: 16px; }

/* ------------------------------------------------------------------ solo pages (login, 404, errors) */

body.solo { background: var(--navy); padding: 0; color: var(--ink); }
.solo-main { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.solo-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; padding: 32px 24px 28px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.45); }
.solo-logo { display: block; width: 168px; height: auto; margin: 0 auto 24px; }
.solo-card h1 { font-size: 1.375rem; margin-bottom: 12px; text-align: center; }
.solo-card > p { text-align: center; color: var(--ink-2); }
.solo-card form { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
