:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #fff;
  --line: #d9e1ea;
  --ink: #17212b;
  --muted: #536274;
  --accent: #0f766e;
  --strong: #115e59;
  --soft: #e7f5f2;
  --danger: #a62319;
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); min-height: 100vh; }
::selection { background: #b9e6df; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--strong); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
.shell { max-width: 1120px; margin-inline: auto; padding: 0 28px; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.bar-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { color: var(--ink); font-weight: 800; text-decoration: none; }
.brand span { font-size: 13px; font-weight: 550; margin-inline-start: 11px; color: var(--muted); }
main.shell { padding-block: 36px 72px; }
h1 { margin: 0; font-size: 32px; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 20px; margin: 0 0 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.head, .controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.head { margin-bottom: 24px; }
.controls { justify-content: flex-start; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font-weight: 650; text-decoration: none; }
.button:hover { background: #edf2f6; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--strong); }
.button.quiet { background: transparent; }
.button.danger { color: var(--danger); }
.icon { width: 16px; height: 16px; flex: 0 0 16px; }
.primary .icon { filter: invert(1); }
.panel, .form-shell { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.panel { overflow: hidden; }
.form-shell { padding: 24px; }
.login { max-width: 440px; margin: 44px auto 0; }
.login h1 { margin-bottom: 24px; }
label.field { display: grid; gap: 6px; font-weight: 650; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.full { grid-column: 1 / -1; }
input:not([type=checkbox]), select { min-height: 42px; width: 100%; border: 1px solid #aebbc8; border-radius: 6px; background: var(--panel); padding: 7px 10px; color: inherit; }
.login form, .stack { display: grid; gap: 16px; }
.search { display: flex; gap: 8px; padding: 16px; max-width: 450px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--muted); font-size: 13px; font-weight: 650; background: #f8fafc; }
td strong { font-weight: 700; }
td .muted { display: block; font-size: 13px; }
.table-scroll { overflow-x: auto; }
.status { font-weight: 700; }
.status.active, .check-pass { color: var(--strong); }
.status.suspended, .check-fail { color: var(--danger); }
.empty { padding: 28px 20px; text-align: center; border-top: 1px solid var(--line); }
.empty p { margin-bottom: 14px; }
.pagination { padding: 12px 16px; justify-content: space-between; border-top: 1px solid var(--line); }
.breadcrumb { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 20px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { flex-shrink: 0; padding: 11px 13px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 650; }
.tabs button[aria-current=page] { color: var(--strong); border-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0; padding: 12px; min-width: 0; }
legend { font-weight: 700; padding: 0 5px; }
.checkboxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; }
.checkboxes label { display: flex; align-items: center; gap: 6px; }
input[type=checkbox] { accent-color: var(--accent); }
.message { border: 1px solid var(--line); background: var(--soft); padding: 10px 12px; border-radius: 6px; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message.error { background: #fff5f3; color: var(--danger); border-color: #e8b7b1; }
.checks { display: grid; gap: 5px; margin: 0; padding-inline-start: 20px; }
.token-output { display: grid; gap: 8px; }
code, .number { font-variant-numeric: tabular-nums; }
.token-output code { overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .shell { padding-inline: 16px; }
  main.shell { padding-block-start: 26px; }
  h1 { font-size: 27px; }
  .form-shell { padding: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  th, td { padding-inline: 10px; }
  .client-table { min-width: 480px; }
}
