/* apicheck design system: one dark stylesheet for the customer site, the admin panel and the sub-admin panel.
   Tokens first, then base, components, layouts. No external CSS: Inter and Space Grotesk are self-hosted (static/fonts). */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin-wght-normal.woff2?v=f052ee44c3") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk-latin-wght-normal.woff2?v=7d707172ce") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0B0E13;
  --card: #141A22;
  --card-border: #1E2530;
  --panel: #0F141B;
  --line: #263040;
  --line-strong: #344052;

  --text: #E6EDF3;
  --text-2: #C3CBD6;
  --muted: #9AA4B2;

  --lime: #C6F432;
  --lime-hover: #D4FA5C;
  --lime-ink: #0B0E13;
  --lime-soft: #1A2410;
  --lime-line: #4F6B16;
  --blue: #7DD3FC;

  /* status: badge background / badge text / card border */
  --ok-bg: #1A2410;   --ok-fg: #D9FF6B;   --ok-line: #4F6B16;
  --run-bg: #0E2233;  --run-fg: #BAE6FD;  --run-line: #1F5F80;
  --wait-bg: #2A2110; --wait-fg: #FDE68A; --wait-line: #7A5A12;
  --bad-bg: #2A1414;  --bad-fg: #FECACA;  --bad-line: #7A2A2A;
  --off-bg: #1E2530;  --off-fg: #C3CBD6;  --off-line: #344052;
  --red: #F87171;

  --r-card: 22px;
  --r-inner: 16px;
  --r-ctl: 13px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --focus: 0 0 0 3px rgba(198, 244, 50, .45);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg);
       -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: .86rem; }
b, strong { font-weight: 650; }
.muted { color: var(--muted); }
a.muted:hover { color: var(--text); }
.mono { font-family: var(--mono); font-size: .85rem; }
.num-font { font-family: var(--display); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre-line { white-space: pre-line; }
.plus { color: var(--lime); font-weight: 600; }
.minus { color: var(--red); font-weight: 600; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
::selection { background: rgba(198, 244, 50, .3); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
       stroke-linejoin: round; vertical-align: middle; }
.ico-sm { width: 15px; height: 15px; }
.ico-lg { width: 22px; height: 22px; }

/* ---------- wordmark ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700;
         font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--lime);
              color: var(--lime-ink); flex: none; }
.brand-mark .ico { width: 18px; height: 18px; stroke-width: 3; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.05rem;
       border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: transparent; color: var(--text);
       font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
       transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: #1B2330; border-color: #46546A; text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 700; }
.btn-primary:hover { background: var(--lime-hover); border-color: var(--lime-hover); color: var(--lime-ink); }
.btn-primary:disabled:hover { background: var(--lime); }
.btn-danger { background: transparent; border-color: var(--bad-line); color: var(--bad-fg); }
.btn-danger:hover { background: var(--bad-bg); border-color: #A33A3A; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #1B2330; border-color: transparent; }
.btn-sm { min-height: 44px; padding: .4rem .85rem; font-size: .84rem; }
.btn-lg { min-height: 54px; padding: .8rem 1.5rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
form.inline { display: inline; margin: 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); margin-bottom: 1.25rem; }
.card-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between;
               padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--card-border); }
.card-header h2, .card-header h1 { margin: 0; }
.card-header .hint { flex: 1 1 260px; text-align: right; }
.card-body { padding: 1.4rem; }
.card-body > :last-child { margin-bottom: 0; }
.card-footer { padding: .9rem 1.4rem; border-top: 1px solid var(--card-border); background: var(--panel);
               border-radius: 0 0 var(--r-card) var(--r-card); }
.card.danger-zone { border-color: var(--bad-line); }
.card.danger-zone > .card-header h2 { color: var(--bad-fg); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-inner); padding: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.25rem; }
.grid-2 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 1.25rem; }
.stack > .card { margin-bottom: 0; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .3rem; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .7rem; border-radius: 999px; font-size: .76rem;
         font-weight: 600; line-height: 1.45; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.no-dot::before { display: none; }
.badge-success { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.badge-info    { background: var(--run-bg); color: var(--run-fg); border-color: var(--run-line); }
.badge-warning { background: var(--wait-bg); color: var(--wait-fg); border-color: var(--wait-line); }
.badge-danger  { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-line); }
.badge-neutral { background: var(--off-bg); color: var(--off-fg); border-color: var(--off-line); }
.badge-primary { background: var(--lime-soft); color: var(--ok-fg); border-color: var(--lime-line); }
.badge-queued  { background: var(--wait-bg); color: var(--wait-fg); border-color: var(--wait-line); }
.badge.running::before { animation: pulse 1.2s ease-in-out infinite; }
.badge .spinner { width: 11px; height: 11px; border-width: 2px; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- alerts / banners ---------- */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1.05rem; border-radius: var(--r-inner);
         border: 1px solid; margin-bottom: 1rem; font-size: .92rem; }
.alert > div > :last-child { margin-bottom: 0; }
.alert-info    { background: var(--run-bg); border-color: var(--run-line); color: var(--run-fg); }
.alert-success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-fg); }
.alert-warning { background: var(--wait-bg); border-color: var(--wait-line); color: var(--wait-fg); }
.alert-error   { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-fg); }
.alert-critical { background: #3A1414; border-color: #A33A3A; color: #FFE4E4; }
.alert-critical code { background: rgba(255, 255, 255, .1); color: #fff; }
.alert-icon { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
              border: 1.5px solid currentColor; font-weight: 700; font-size: .8rem; line-height: 1; }
code { font-family: var(--mono); font-size: .85em; background: var(--panel); border: 1px solid var(--line); color: var(--text-2);
       padding: .08rem .38rem; border-radius: 6px; word-break: break-all; }

/* ---------- forms ---------- */
.field { display: grid; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.field > span, .label { font-size: .86rem; font-weight: 600; color: var(--text-2); }
.hint { font-size: .82rem; color: var(--muted); }
.hint a, .muted a { color: var(--blue); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date],
input[type=datetime-local], select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .85rem; font: inherit; font-size: .94rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #7D8796; }
select { appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239AA4B2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.8); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: var(--focus); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 1rem; }
.input-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.input-group input { flex: 1 1 180px; min-width: 0; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; margin-bottom: 1rem; cursor: pointer; color: var(--text-2); }
.checkbox input { width: 20px; height: 20px; margin-top: .1rem; accent-color: var(--lime); flex: none; }
.field-error { color: var(--bad-fg); font-size: .86rem; margin: .5rem 0 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* toggle switch */
.switch { display: flex; align-items: center; gap: .75rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-strong);
                 transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
                        background: var(--text); transition: transform .2s; }
.switch input:checked + .track { background: var(--lime); }
.switch input:checked + .track::after { transform: translateX(20px); background: var(--lime-ink); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }

/* filter bar */
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; width: 100%; }
.filters .field { margin: 0; flex: 1 1 150px; max-width: 240px; }
.filters .field:first-child { max-width: 320px; }
.filters .actions { display: flex; gap: .5rem; }

/* pill tabs */
.tabs { display: flex; flex-wrap: wrap; gap: .45rem; }
.tab { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .35rem .95rem; border-radius: 999px;
       border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font: inherit; font-size: .86rem;
       font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.tab:hover { border-color: var(--line-strong); color: var(--text); text-decoration: none; }
.tab[aria-selected="true"], .tab.active { background: var(--text); border-color: var(--text); color: var(--lime-ink); }
.tab .count { font-family: var(--display); font-size: .78rem; padding: 0 .45rem; border-radius: 999px; background: var(--off-bg);
              color: var(--text-2); }
.tab[aria-selected="true"] .count, .tab.active .count { background: rgba(11, 14, 19, .12); color: var(--lime-ink); }
.tab:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
            background: var(--panel); padding: .75rem 1rem; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--card-border); vertical-align: middle; color: var(--text-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #171F29; }
.table .empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-main { font-weight: 600; color: var(--text); word-break: break-word; }
.cell-sub { font-size: .8rem; color: var(--muted); }
.err-text { color: var(--bad-fg); font-size: .8rem; max-width: 280px; word-break: break-word; }
.pager { display: flex; gap: .5rem; justify-content: flex-end; align-items: center; padding: .9rem 1.4rem; border-top: 1px solid var(--card-border); }
.table-min { min-width: 820px; }
.table-min .cell-main { min-width: 200px; max-width: 320px; word-break: normal; overflow-wrap: anywhere; }

/* ---------- stats / KPI cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); padding: 1.15rem 1.3rem; }
.stat-label { display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat { position: relative; }
.stat-ico { position: absolute; top: 1.05rem; right: 1.1rem; display: grid; place-items: center; width: 34px; height: 34px;
            border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.stat.lime .stat-ico { color: var(--lime); border-color: var(--lime-line); }
.stat.blue .stat-ico { color: var(--blue); }
.stat.red .stat-ico { color: var(--red); }
.stat-grid.secondary .stat { padding: .9rem 1.15rem; border-radius: var(--r-inner); }
.stat-grid.secondary .stat-value { font-size: 1.35rem; }
.stat-value { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin-top: .25rem;
              line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.stat.lime .stat-value { color: var(--lime); }
.stat.blue .stat-value { color: var(--blue); }
.stat.red .stat-value, .stat.bad .stat-value { color: var(--red); }
.stat.warn .stat-value { color: var(--wait-fg); }
.stat.lime { border-color: var(--lime-line); background: linear-gradient(160deg, #18210F, var(--card) 70%); }
.mini-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: .9rem 1.3rem; margin-bottom: 1.25rem; font-size: .86rem;
              color: var(--muted); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-inner); }
.mini-stats b { font-family: var(--display); color: var(--text); }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; font-size: .92rem; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; font-weight: 500; word-break: break-word; color: var(--text); }

/* status tiles (admin overview) */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.status-tile { display: flex; gap: .9rem; align-items: flex-start; background: var(--card); border: 1px solid var(--card-border);
               border-radius: var(--r-card); padding: 1.1rem 1.25rem; }
.status-tile.ok { border-color: var(--ok-line); }
.status-tile.bad { border-color: var(--bad-line); }
.status-tile.warn { border-color: var(--wait-line); }
.status-tile .tile-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel);
                         border: 1px solid var(--line); color: var(--text-2); flex: none; }
.status-tile.ok .tile-ico { color: var(--ok-fg); }
.status-tile.bad .tile-ico { color: var(--bad-fg); }
.status-tile.warn .tile-ico { color: var(--wait-fg); }
.status-tile h3 { margin: 0 0 .3rem; font-size: .98rem; }
.status-tile p { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); }

/* activity list */
.activity { list-style: none; margin: 0; padding: .4rem 1.4rem 1rem; }
.activity li { display: flex; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--card-border); }
.activity li:last-child { border-bottom: 0; }
.activity .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); margin-top: .5rem; flex: none; }
.activity .what { color: var(--text); font-weight: 600; font-size: .9rem; word-break: break-word; }
.activity .meta { color: var(--muted); font-size: .8rem; word-break: break-word; }
.activity .empty { color: var(--muted); padding: 1.2rem 0; }
.overview-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1600px) { .overview-grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } }
.overview-grid > .card { margin-bottom: 0; min-width: 0; }

/* ---------- admin / sub-admin layout ---------- */
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh;
               background: linear-gradient(to right, var(--panel) 252px, transparent 252px); }
.sidebar { background: var(--panel); border-right: 1px solid var(--card-border); padding: 1.3rem .9rem; position: sticky; top: 0;
           height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { padding: .2rem .55rem 1.4rem; font-size: 1.1rem; }
.role-pill { font-family: var(--font); font-size: .66rem; font-weight: 700; letter-spacing: .08em; padding: .18rem .55rem;
             border-radius: 999px; background: var(--lime-soft); border: 1px solid var(--lime-line); color: var(--ok-fg); }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .5rem .8rem; border-radius: 999px;
                 color: var(--text-2); font-weight: 500; font-size: .92rem; text-decoration: none; }
.sidebar nav a:hover { background: #18202B; color: var(--text); }
.sidebar nav a.active { background: var(--text); color: var(--lime-ink); font-weight: 650; }
.sidebar nav a:focus-visible { outline: none; box-shadow: var(--focus); }
.sidebar nav .nav-count { margin-left: auto; min-width: 22px; padding: 0 .4rem; border-radius: 999px; background: #B91C1C; color: #fff;
                          font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.6; }
.sidebar .side-foot { margin-top: auto; padding: 1rem .55rem 0; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--card-border);
                      word-break: break-all; }
.sidebar .side-foot form { margin-top: .4rem; }
.sidebar .side-foot form button { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; color: var(--text-2);
                                  background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.sidebar .side-foot form button:hover { color: var(--text); text-decoration: underline; }
.admin-main { min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1.1rem 2rem;
          background: rgba(11, 14, 19, .92); border-bottom: 1px solid var(--card-border); position: sticky; top: 0; z-index: 10;
          backdrop-filter: blur(8px); }
.topbar .title-block { min-width: 0; }
.topbar .page-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.topbar .page-title a { color: var(--muted); }
.topbar .page-date { font-size: .8rem; color: var(--muted); margin: .1rem 0 0; }
.topbar .top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.top-search { position: relative; margin: 0; }
.top-search .ico { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.top-search input { width: 240px; padding-left: 2.4rem; border-radius: 999px; min-height: 44px; }
.admin-content { padding: 1.6rem 2rem 3rem; max-width: 1360px; }
.banner-stack { padding: 1.1rem 2rem 0; max-width: 1360px; }
.banner-stack .alert { margin-bottom: .6rem; }

/* ---------- customer layout ---------- */
.site-header { background: rgba(11, 14, 19, .92); border-bottom: 1px solid var(--card-border); position: sticky; top: 0; z-index: 10;
               backdrop-filter: blur(8px); }
.site-header .inner { max-width: 1240px; margin: 0 auto; padding: .8rem 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; color: var(--text-2); font-weight: 600;
              font-size: .9rem; padding: .4rem 1rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; }
.site-nav a:hover { color: var(--text); background: #18202B; text-decoration: none; }
.site-nav a.active { background: var(--text); color: var(--lime-ink); }
.header-right { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.balance-pill { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .35rem 1rem; border-radius: 999px;
                background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .86rem; }
.balance-pill b { font-family: var(--display); color: var(--lime); font-size: 1rem; }
.account { position: relative; }
.account > summary { list-style: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; padding: .3rem .8rem .3rem .35rem;
                     border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer;
                     font-weight: 600; font-size: .88rem; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { border-color: var(--line-strong); }
.account > summary:focus-visible { outline: none; box-shadow: var(--focus); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--off-bg);
          color: var(--lime); font-family: var(--display); font-weight: 700; font-size: .9rem; text-transform: uppercase; flex: none; }
.account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 240px; background: var(--card); border: 1px solid var(--line);
                border-radius: var(--r-inner); padding: .5rem; z-index: 20; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.account-menu .who { padding: .55rem .7rem .7rem; border-bottom: 1px solid var(--card-border); margin-bottom: .35rem; }
.account-menu .who b { display: block; color: var(--text); }
.account-menu .who span { font-size: .82rem; color: var(--muted); word-break: break-all; }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .5rem .7rem;
                                        border-radius: 10px; border: 0; background: none; color: var(--text-2); font: inherit;
                                        font-size: .9rem; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none; }
.account-menu a:hover, .account-menu button:hover { background: #1B2330; color: var(--text); text-decoration: none; }
.account-menu form { margin: 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }

/* ---------- phone menu (under 768 px; _mnav.html + nav.js) ---------- */
.mnav, .mnav-btn { display: none; }
@media (max-width: 767px) {
  .mnav { display: block; }
  .mnav > summary { list-style: none; }
  .mnav > summary::-webkit-details-marker { display: none; }
  .mnav.js > summary { display: none; }
  .mnav-btn { display: inline-grid; place-items: center; position: relative; width: 44px; height: 44px; flex: none; padding: 0;
              border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
  .mnav-btn:hover { border-color: var(--line-strong); }
  .mnav-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
  .mnav-btn .mnav-x, .mnav[open] > summary .ico:not(.mnav-x) { display: none; }
  .mnav[open] > summary .mnav-x { display: block; }
  .mnav.js > summary .mnav-x, button.mnav-btn .mnav-x { display: none; }
  .mnav-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red);
              box-shadow: 0 0 0 2px var(--panel); }
  .mnav-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(5, 7, 10, .6); }
  .mnav > summary { position: relative; z-index: 42; }
  .mnav-card { position: fixed; z-index: 41; top: 68px; right: 16px; left: 16px; margin-left: auto; max-width: 360px;
               max-height: calc(100vh - 84px); max-height: calc(100dvh - 84px); overflow-y: auto; overscroll-behavior: contain;
               background: #141A22; border: 1px solid #1E2530; border-radius: 20px; padding: .5rem;
               box-shadow: 0 18px 40px rgba(0, 0, 0, .5); display: flex; flex-direction: column; }
  .mnav-card:focus { outline: none; }
  .mnav.js:not(.is-open) .mnav-card, .mnav.js:not(.is-open) .mnav-backdrop { display: none; }
  .mnav-head { display: flex; align-items: center; justify-content: space-between; padding: .25rem .25rem .4rem .7rem;
               font-family: var(--display); font-weight: 700; color: var(--text); }
  .mnav-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0;
                background: none; color: var(--text-2); cursor: pointer; }
  .mnav-close[hidden] { display: none; }
  .mnav-close:hover { background: #1B2330; color: var(--text); }
  .mnav-close:focus-visible { outline: 2px solid var(--lime); outline-offset: 0; }
  .mnav .mnav-list { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  .mnav .mnav-list a { display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .5rem .8rem; border: 0; border-radius: 14px; white-space: normal;
                 color: var(--text-2); font-weight: 500; font-size: .95rem; text-decoration: none; }
  .mnav .mnav-list a:hover { background: #1B2330; color: var(--text); text-decoration: none; }
  .mnav .mnav-list a.active { background: var(--text); color: var(--lime-ink); font-weight: 650; }
  .mnav .mnav-list a:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; box-shadow: none; }
  .mnav .mnav-list .nav-count { margin-left: auto; min-width: 22px; padding: 0 .45rem; border-radius: 999px; background: #B91C1C; color: #fff;
                          font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.6; }
  .mnav-foot { margin-top: .4rem; padding: .7rem .8rem .2rem; border-top: 1px solid var(--card-border); font-size: .82rem;
               color: var(--muted); word-break: break-all; }
  .mnav-foot form { margin: .2rem 0 0; }
  .mnav-foot button { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .5rem 0; border: 0;
                      background: none; color: var(--text-2); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
  .mnav-foot button:hover { color: var(--text); text-decoration: underline; }
  .mnav-foot button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 8px; }
  html.mnav-lock, html.mnav-lock body { overflow: hidden; }

  /* compact top bar: the pill lists are replaced by the menu button */
  .site-header { backdrop-filter: none; background: rgba(11, 14, 19, .97); }   /* a filter would trap the fixed menu inside the bar */
  .site-header .inner { flex-wrap: nowrap; padding: .6rem 1rem; gap: .5rem; min-height: 64px; }
  .site-header .brand { min-width: 0; white-space: nowrap; }
  .site-header .header-right { gap: .5rem; }
  .site-header .balance-pill { padding: .3rem .75rem; }
  .site-header .mnav.js { margin-left: -.5rem; }
  .site-nav, .site-header .account { display: none; }
  .admin-shell .sidebar { position: sticky; top: 0; z-index: 30; flex-direction: row; align-items: center; justify-content: flex-start;
                          min-height: 64px; height: auto; overflow: visible; padding: .6rem 1rem; background: rgba(15, 20, 27, .97); }
  .admin-shell .sidebar .brand { padding: 0; min-width: 0; }
  .admin-shell .sidebar .mnav-btn { margin-left: auto; }
  .admin-shell .sidebar .mnav.js { margin-left: -.6rem; }   /* no gap after the button for the empty <details> */
  .admin-shell .sidebar > nav, .admin-shell .sidebar .side-foot { display: none; }
  .topbar { position: static; }
}
@media (max-width: 380px) {
  .site-header .balance-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1.5rem; }
.page-head p { margin: 0; }
.site-footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.5rem 1rem 2rem; }

/* dashboard */
.welcome { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.5rem; }
.welcome h1 { margin: 0; font-size: 2rem; word-break: break-word; }
.welcome .stat-grid { margin: 0; flex: 1 1 560px; max-width: 720px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.dash-grid > .card { margin-bottom: 0; min-width: 0; }
.new-check { position: sticky; top: 88px; }

/* upload card */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center;
            border: 2px dashed var(--line-strong); border-radius: var(--r-inner); padding: 1.9rem 1rem; background: var(--panel);
            cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover, .dropzone.dragover { border-color: var(--lime); background: #121A10; }
.dropzone:focus-within { border-color: var(--lime); box-shadow: var(--focus); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .dz-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--lime-soft);
                     border: 1px solid var(--lime-line); color: var(--lime); margin-bottom: .3rem; }
.dropzone .dz-title { font-weight: 650; color: var(--text); word-break: break-word; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.1rem; }
.options legend { margin-bottom: .5rem; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-body { display: flex; flex-direction: column; gap: .15rem; height: 100%; min-height: 96px; padding: .9rem 1rem; border-radius: var(--r-inner);
               border: 1.5px solid var(--line); background: var(--panel); transition: border-color .15s, background .15s; }
.option:hover .option-body { border-color: var(--line-strong); }
.option input:checked + .option-body { border-color: var(--lime); background: var(--lime-soft); }
.option input:focus-visible + .option-body { box-shadow: var(--focus); }
.option-title { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-weight: 650; color: var(--text); font-size: .9rem; }
.option-tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; }
.option-tick .ico { width: 12px; height: 12px; stroke-width: 3.5; opacity: 0; }
.option input:checked + .option-body .option-tick { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.option input:checked + .option-body .option-tick .ico { opacity: 1; }
.option-price { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.option input:checked + .option-body .option-price { color: var(--lime); }
.option-sub { font-size: .78rem; color: var(--muted); }
.upload-row { margin-top: 1.1rem; }
.upload-row .btn { width: 100%; }
.price-list { display: flex; gap: .5rem; flex-wrap: wrap; }

/* checks list */
.checks-head { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .9rem; }
.checks-head > * { min-width: 0; }
.checks-head .title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; }
.job-list { list-style: none; margin: 0; padding: 1.2rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 12px; }
.job { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon main nums" "icon foot foot";
       gap: .8rem 1rem; padding: 19px; border-radius: 18px; border: 1.5px solid var(--off-line); background: var(--panel); }
.job.s-done { border-color: var(--ok-line); }
.job.s-ai, .job.s-sim { border-color: var(--run-line); }
.job.s-queued { border-color: var(--wait-line); }
.job.s-failed { border-color: var(--bad-line); }
.job.s-cancelled, .job.s-expired { border-color: var(--off-line); }
.job-icon { grid-area: icon; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--card);
            border: 1px solid var(--line); color: var(--text-2); }
.job.s-done .job-icon { color: var(--ok-fg); }
.job.s-ai .job-icon, .job.s-sim .job-icon { color: var(--run-fg); }
.job.s-queued .job-icon { color: var(--wait-fg); }
.job.s-failed .job-icon { color: var(--bad-fg); }
.job-main { grid-area: main; min-width: 0; }
.job-name { font-weight: 650; color: var(--text); word-break: break-word; }
.job-meta { font-size: .8rem; color: var(--muted); }
.job-nums { grid-area: nums; display: grid; grid-template-columns: repeat(2, minmax(92px, auto)); gap: .5rem; }
.pct-block { background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: .45rem .75rem; min-width: 92px; }
.pct-block .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.pct-block .v { font-family: var(--display); font-size: 1.2rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.pct-block .v.dim { color: var(--muted); font-family: var(--font); font-size: .82rem; font-weight: 500; line-height: 1.9; }
.pct-block .pct-sub { white-space: normal; }
.job-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.job-status { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-width: 0; }
.job-list .empty-state { text-align: center; color: var(--muted); padding: 2.5rem 1rem; border: 1.5px dashed var(--line); border-radius: 18px; }

/* results */
.pct { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.pct-sub { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.spinner { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
           display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.job-msg { font-size: .8rem; color: var(--wait-fg); margin-top: .2rem; }

/* auth pages */
.auth-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card > .brand { display: flex; justify-content: center; margin-bottom: 1.5rem; font-size: 1.35rem; }
.auth-card .card-body { padding: 1.8rem; }
.auth-card h1 { font-size: 1.6rem; }

/* prose (terms) */
.prose { max-width: 760px; color: var(--text-2); }
.prose h2 { margin-top: 1.75rem; }
.prose b { color: var(--text); }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .45rem; }

/* ---------- modal (announcements) ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 6, 9, .72); display: grid; place-items: center; padding: 1rem;
                  z-index: 100; animation: fade .15s ease-out; }
.modal { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
         box-shadow: 0 24px 60px rgba(0, 0, 0, .55); overflow: hidden; animation: pop .18s ease-out; }
.modal-head { display: flex; gap: .8rem; align-items: center; padding: 1.3rem 1.4rem .5rem; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: .4rem 1.4rem 1.2rem; color: var(--text-2); white-space: pre-line; word-break: break-word; max-height: 60vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .9rem 1.4rem;
              background: var(--panel); border-top: 1px solid var(--card-border); }
.modal-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; flex: none; border: 1px solid; }
.modal.info .modal-ico    { background: var(--run-bg); color: var(--run-fg); border-color: var(--run-line); }
.modal.warning .modal-ico { background: var(--wait-bg); color: var(--wait-fg); border-color: var(--wait-line); }
.modal.success .modal-ico { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
/* confirmation dialog (confirm.js), also the page without JavaScript (templates/confirm.html) */
.modal.confirm { max-width: 440px; padding: 1.4rem; background: var(--card); border-color: var(--card-border); border-radius: 20px; }
.modal.confirm h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.modal.confirm p { margin: 0; color: var(--text-2); white-space: pre-line; word-break: break-word; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.3rem; }
/* 2FA setup: QR code on white (every authenticator app reads it), recovery codes in two columns */
.twofa-setup ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.twofa-qr { display: inline-block; padding: 8px; margin: 0 0 1rem; background: #fff; border-radius: var(--r-inner); line-height: 0; }
.twofa-qr img { display: block; width: 245px; height: 245px; max-width: 100%; }
.recovery-codes { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: .5rem 2rem;
                  margin: 1rem 0; padding: 1rem 1.2rem; background: var(--panel); border: 1px solid var(--line);
                  border-radius: var(--r-inner); font-size: 1rem; letter-spacing: .04em; user-select: all; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* ---------- admin job table ---------- */
.col-job { min-width: 240px; max-width: 360px; }
.stat-cell { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.jobs-table td { vertical-align: top; }
.jobs-table .badge { margin-top: .1rem; }
.field > span.hint { font-weight: 400; font-size: .82rem; color: var(--muted); }
details.err-detail { margin-top: .35rem; }
details.err-detail summary { cursor: pointer; font-size: .8rem; color: var(--blue); }
details.err-detail pre { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: .75rem; color: var(--text-2);
                         background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6rem;
                         max-height: 320px; overflow: auto; text-align: left; margin: .4rem 0 0; }

/* ---------- small utilities ---------- */
.mt { margin-top: 1.25rem; }
.mt-sm { margin-top: .6rem; }
hr.sep { border: 0; border-top: 1px solid var(--card-border); margin: 1.2rem 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .new-check { position: static; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: static; height: auto; padding: .9rem 1rem; border-right: 0; border-bottom: 1px solid var(--card-border); gap: .6rem; }
  .sidebar .brand { padding: .1rem .2rem .3rem; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: .35rem; }
  .sidebar nav a { min-height: 40px; padding: .35rem .8rem; border: 1px solid var(--line); white-space: nowrap; font-size: .86rem; }
  .sidebar nav a.active { border-color: var(--text); }
  .sidebar nav .nav-count { margin-left: .2rem; }
  .sidebar .side-foot { margin: 0; padding: .6rem .2rem 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; }
  .sidebar .side-foot form { margin: 0; }
  .topbar { position: static; padding: 1rem; }
  .top-search { flex: 1 1 200px; }
  .top-search input { width: 100%; }
  .admin-content { padding: 1rem 1rem 2.5rem; }
  .banner-stack { padding: .9rem 1rem 0; }
}
@media (max-width: 760px) {
  .welcome .stat-grid { grid-template-columns: 1fr 1fr; flex-basis: 100%; }
  .welcome .stat.lime { grid-column: 1 / -1; background: var(--lime); border-color: var(--lime); }
  .welcome .stat.lime .stat-label, .welcome .stat.lime .stat-value, .welcome .stat.lime .stat-sub { color: var(--lime-ink); }
  .welcome .stat.lime .stat-ico { color: var(--lime-ink); background: rgba(11, 14, 19, .08); border-color: rgba(11, 14, 19, .2); }
  .welcome { flex-direction: column; align-items: stretch; }
  .welcome .stat-grid { order: -1; max-width: none; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  h1, .welcome h1 { font-size: 1.45rem; }
  .card { border-radius: 20px; }
  .card-header, .card-body { padding: 1rem; }
  .card-header .hint { text-align: left; }
  .site-header .inner { padding: .6rem 1rem; gap: .5rem; }
  .site-nav { order: 3; width: 100%; }
  .site-nav a { flex: 1; justify-content: center; }
  .account-name { display: none; }
  .account > summary { padding: .3rem; }
  .balance-pill { padding: .3rem .8rem; }
  .container { padding: 1rem 1rem 2.5rem; }
  .stat-value { font-size: 1.55rem; }
  .stat { padding: 1rem; }
  .options { gap: .55rem; }
  .option-body { padding: .8rem; min-height: 88px; }
  .option-price { font-size: 1.3rem; }
  .job-list { padding: 1rem; }
  .job { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon main" "nums nums" "foot foot"; padding: 18px; }
  .job-nums { grid-template-columns: 1fr 1fr; }
  .job-foot { flex-direction: column; align-items: stretch; }
  .job-foot .btn-row { flex-direction: column; align-items: stretch; }
  .job-foot .btn-row > *, .job-foot .btn-row form .btn { width: 100%; }
  .job-foot .btn-row form.inline { display: block; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; -webkit-overflow-scrolling: touch; }
  dl.details { grid-template-columns: 1fr; gap: .1rem; }
  dl.details dd { margin-bottom: .5rem; }
  .filters .field, .filters .field:first-child { max-width: none; }
  .topbar .top-actions { width: 100%; }
  .topbar .top-actions > .btn, .topbar .top-actions > .btn-row { flex: 1 1 auto; }
  /* tables turn into cards: each cell shows its column name (data-label) */
  table.table.stack-mobile thead { display: none; }
  table.table.stack-mobile, .table.stack-mobile tbody, .table.stack-mobile tr, .table.stack-mobile td { display: block; width: 100%; }
  .table.stack-mobile tr { border-bottom: 1px solid var(--card-border); padding: .7rem 1rem; }
  .table.stack-mobile tbody tr:last-child { border-bottom: 0; }
  .table.stack-mobile td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr);
                           column-gap: 1rem; row-gap: .2rem; justify-items: end; align-items: start; text-align: right; }
  .table.stack-mobile td::before { content: attr(data-label); font-size: .72rem; font-weight: 600; color: var(--muted);
                                   text-transform: uppercase; letter-spacing: .05em; text-align: left; padding-top: .15rem;
                                   grid-column: 1; grid-row: 1 / span 6; justify-self: start; }
  .table.stack-mobile td > * { grid-column: 2; max-width: 100%; }
  .table.stack-mobile td.cell-first, .table.stack-mobile td.empty { display: block; justify-items: normal; }
  .table.stack-mobile td.cell-first { text-align: left; padding-bottom: .4rem; }
  .table.stack-mobile td.cell-first::before, .table.stack-mobile td.empty::before { display: none; }
  .table.stack-mobile td.empty { text-align: center; }
  .table.stack-mobile .btn-row { justify-content: flex-end; }
  .table.stack-mobile .badge { align-self: start; }
  .table.stack-mobile .pct-sub { white-space: normal; }
  .table.stack-mobile .stat-cell { justify-content: flex-end; }
  .col-job { min-width: 0; max-width: none; }
  .pager { justify-content: space-between; padding: .8rem 1rem; }
  .modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions .btn { width: 100%; }
  .activity { padding: .2rem 1rem .8rem; }
}
@media (max-width: 370px) {
  .options { grid-template-columns: 1fr; }
  .option-body { min-height: 0; }
  .job-nums { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
