/* OpenMob design system: color tokens (light and dark), type, components.
   Theme: "Zen Linen" by serafimcloud — https://21st.dev/@serafimcloud/themes/zen-linen
   Published palette and typography mapped to OpenMob's semantic tokens; hover, stronger-border
   and status colors retain readable contrast. Shared by every page in openmob/static. */
:root {
  color-scheme: light;
  --bg: oklch(0.919 0.017 88.003); --surface: oklch(0.953 0.016 86.426); --surface-2: oklch(0.865 0.02 87.523); --sunken: oklch(0.834 0.023 87.163); --sidebar: oklch(0.898 0.02 87.52);
  --fg: oklch(0.235 0 0); --muted: oklch(0.469 0.014 84.593); --faint: oklch(0.469 0.014 84.593); --line: oklch(0.843 0.023 87.162); --line-strong: oklch(0.79 0.023 87.162);
  --accent: oklch(0.301 0 0); --accent-hover: oklch(0.37 0 0); --accent-ink: oklch(0.917 0.018 99.616); --accent-soft: oklch(0.917 0.018 99.616); --accent-line: oklch(0.706 0.025 82.093);
  --brass: oklch(0.706 0.025 82.093);
  --ok: #157a46; --ok-soft: #e4f4ea; --warn: #9a5a00; --warn-soft: #fdf1dc; --bad: oklch(0.577 0.215 27.325); --bad-soft: oklch(0.95 0.03 27.325);
  --code: oklch(0.917 0.018 99.616); --overlay: rgba(30, 30, 30, .45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow: 0 4px 10px rgba(0, 0, 0, .1);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, .14);
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(0.191 0 0); --surface: oklch(0.226 0 0); --surface-2: oklch(0.252 0 0); --sunken: oklch(0.285 0 0); --sidebar: oklch(0.173 0 0);
    --fg: oklch(0.917 0.013 82.402); --muted: oklch(0.635 0.011 81.787); --faint: oklch(0.635 0.011 81.787); --line: oklch(0.293 0 0); --line-strong: oklch(0.38 0 0);
    --accent: oklch(0.852 0.02 100.631); --accent-hover: oklch(0.91 0.02 100.631); --accent-ink: oklch(0.333 0 0); --accent-soft: oklch(0.333 0 0); --accent-line: oklch(0.468 0.007 84.583);
    --brass: oklch(0.859 0.021 74.637);
    --ok: #4cd48a; --ok-soft: #12291c; --warn: #f0b04a; --warn-soft: #2d2210; --bad: oklch(0.637 0.208 25.331); --bad-soft: oklch(0.3 0.06 25.331);
    --code: oklch(0.285 0 0); --overlay: rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .15); --shadow: 0 6px 15px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 30px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.191 0 0); --surface: oklch(0.226 0 0); --surface-2: oklch(0.252 0 0); --sunken: oklch(0.285 0 0); --sidebar: oklch(0.173 0 0);
  --fg: oklch(0.917 0.013 82.402); --muted: oklch(0.635 0.011 81.787); --faint: oklch(0.635 0.011 81.787); --line: oklch(0.293 0 0); --line-strong: oklch(0.38 0 0);
  --accent: oklch(0.852 0.02 100.631); --accent-hover: oklch(0.91 0.02 100.631); --accent-ink: oklch(0.333 0 0); --accent-soft: oklch(0.333 0 0); --accent-line: oklch(0.468 0.007 84.583);
  --brass: oklch(0.859 0.021 74.637);
  --ok: #4cd48a; --ok-soft: #12291c; --warn: #f0b04a; --warn-soft: #2d2210; --bad: oklch(0.637 0.208 25.331); --bad-soft: oklch(0.3 0.06 25.331);
  --code: oklch(0.285 0 0); --overlay: rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .15); --shadow: 0 6px 15px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 30px rgba(0, 0, 0, .4);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--font); letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
code, pre, kbd { font-family: var(--mono); font-size: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* Top bar shared by every signed-in page */
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter); min-height: 56px; background: var(--surface); border-bottom: 1px solid var(--line); }
/* Logo: a serif wordmark. */
.brand { display: inline-flex; align-items: baseline; gap: 9px; color: var(--fg); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { display: none !important; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark svg { width: 17px; height: 17px; }
.brand .page-name { font-family: var(--font); font-weight: 500; color: var(--muted); font-size: 15px; letter-spacing: 0; }
.brand .page-name::before { content: "/"; color: var(--line-strong); margin: 0 8px 0 2px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 46px; padding: 12px 20px; font-size: 15px; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; }

/* Inputs */
.input, .select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-size: 15px; }
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

/* Layout and cards */
.page { max-width: 1040px; margin: 0 auto; padding: 28px var(--gutter) 56px; display: grid; gap: 20px; }
.page.narrow { max-width: 760px; }
.page-head h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 6px; }
.page-head p { color: var(--muted); margin: 0; max-width: 62ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.card-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.005em; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head .grow { flex: 1; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); font-size: 13px; min-height: 1em; }
.error:empty { min-height: 0; }

/* Pills: statuses */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; min-height: 22px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill.dotted::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.pill.live::before { animation: om-pulse 1.4s ease-in-out infinite; }
@keyframes om-pulse { 50% { opacity: .35; } }

/* Callouts */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.callout > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.callout.info { background: var(--accent-soft); border-color: var(--accent-line); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.callout.warn > svg { color: var(--warn); }
.callout.info > svg { color: var(--accent); }
.callout b { display: block; }

/* Code blocks with a copy button */
.codebox { position: relative; background: var(--code); border: 1px solid var(--line); border-radius: var(--r); }
.codebox pre { margin: 0; padding: 12px 14px; padding-right: 84px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.codebox .copy { position: absolute; top: 7px; right: 7px; }
.codebox.inline pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Tables: stack into labelled cards on phones */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table td.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px; margin-bottom: 10px; }
  .table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); text-align: right; }
  .table td:last-child { border-bottom: 0; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  .table td.empty { justify-content: center; } .table td.empty::before { content: none; }
  .table tr.empty-row { border: 0; }
}

/* Empty states */
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 14px; }
.empty-state .art { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; background: var(--surface-2); color: var(--faint); display: flex; align-items: center; justify-content: center; }
.empty-state .art svg { width: 22px; height: 22px; }
.empty-state b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 2px; }

@media (max-width: 560px) {
  .page { padding-top: 20px; gap: 16px; }
  .card { padding: 16px; border-radius: var(--r); }
  .page-head h1 { font-size: 22px; }
  .brand .page-name { display: none; }
}
