/* Портал подписок — the design system of artifact-server, cut down to what the portal uses.
   Cool neutral surfaces, one blue accent, hairline borders. Onest for UI, JetBrains Mono for code.
   Dark theme follows the system unless the user picked one (html[data-theme]). */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Onest Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --raised: #ffffff;
  --sunken: #eceff4;
  --hover: #f0f3f7;
  --ink: #121925;
  --ink-2: #4b5667;
  --ink-3: #626d81;
  --line: #e1e6ed;
  --line-2: #cdd4df;
  --accent: #1d4ed8;
  --accent-hover: #1a44c0;
  --accent-ink: #1d4ed8;
  --accent-soft: #eaf0fd;
  --on-accent: #ffffff;
  --ok: #157a50;
  --ok-soft: #e4f3ea;
  --warn: #8a5200;
  --warn-soft: #fbf1df;
  --danger: #c0262d;
  --danger-soft: #fcebea;
  --backdrop: rgb(15 21 32 / 0.42);
  --glass: rgb(243 245 248 / 0.84);
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 6px 16px -4px rgb(16 24 40 / 0.08);
  --shadow-pop: 0 2px 6px rgb(16 24 40 / 0.05), 0 18px 44px -12px rgb(16 24 40 / 0.24);
  --ring: 0 0 0 3px rgb(29 78 216 / 0.22);

  --font: "Onest Variable", "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --maxw: 1200px;
  --gutter: 16px;
  --nav-h: 56px;
  --bar-h: 48px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d121a;
    --surface: #141b26;
    --raised: #19212e;
    --sunken: #1d2633;
    --hover: #1b2430;
    --ink: #e7ecf4;
    --ink-2: #a3afc0;
    --ink-3: #818ea1;
    --line: #232d3b;
    --line-2: #313d4f;
    --accent: #7396ff;
    --accent-hover: #8aa7ff;
    --accent-ink: #94afff;
    --accent-soft: rgb(115 150 255 / 0.14);
    --on-accent: #0a1022;
    --ok: #4fc48c;
    --ok-soft: rgb(79 196 140 / 0.13);
    --warn: #e2a440;
    --warn-soft: rgb(226 164 64 / 0.13);
    --danger: #ff7b72;
    --danger-soft: rgb(255 123 114 / 0.13);
    --backdrop: rgb(3 6 12 / 0.62);
    --glass: rgb(13 18 26 / 0.82);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 20px -6px rgb(0 0 0 / 0.45);
    --shadow-pop: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 56px -12px rgb(0 0 0 / 0.65);
    --ring: 0 0 0 3px rgb(115 150 255 / 0.32);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d121a;
  --surface: #141b26;
  --raised: #19212e;
  --sunken: #1d2633;
  --hover: #1b2430;
  --ink: #e7ecf4;
  --ink-2: #a3afc0;
  --ink-3: #818ea1;
  --line: #232d3b;
  --line-2: #313d4f;
  --accent: #7396ff;
  --accent-hover: #8aa7ff;
  --accent-ink: #94afff;
  --accent-soft: rgb(115 150 255 / 0.14);
  --on-accent: #0a1022;
  --ok: #4fc48c;
  --ok-soft: rgb(79 196 140 / 0.13);
  --warn: #e2a440;
  --warn-soft: rgb(226 164 64 / 0.13);
  --danger: #ff7b72;
  --danger-soft: rgb(255 123 114 / 0.13);
  --backdrop: rgb(3 6 12 / 0.62);
  --glass: rgb(13 18 26 / 0.82);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 20px -6px rgb(0 0 0 / 0.45);
  --shadow-pop: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 56px -12px rgb(0 0 0 / 0.65);
  --ring: 0 0 0 3px rgb(115 150 255 / 0.32);
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1120px) {
  :root { --gutter: 32px; }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
p { margin: 0; }
ul { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
::selection { background: rgb(115 150 255 / 0.28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon { display: inline-block; flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.icon .fill { fill: currentColor; stroke: none; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
/* Proportional figures on purpose: Onest's tabular ones are so wide that «1 191» reads as «1  1 9 1». */
.num { font-variant-numeric: normal; }
.warn-ink { color: var(--warn); font-weight: 600; }
.danger-ink { color: var(--danger); font-weight: 600; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 12px; border-radius: var(--r); background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 8px; }
html:not(.js) .js-only { display: none !important; }

/* ------------------------------------------------------------------ layout */

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.main { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 88px; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.section-title { font-size: 16px; font-weight: 620; }
.section-aside { font-size: 13px; }
.section-hint { margin-top: 10px; max-width: 80ch; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; }
.page-head-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-title { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.page-meta { color: var(--ink-2); font-size: 14px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }

.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.panel-pad { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); min-width: 0; }

/* ------------------------------------------------------------------ buttons */

.btn {
  --b-bg: var(--surface);
  --b-ink: var(--ink);
  --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--b-line); border-radius: var(--r);
  background: var(--b-bg); color: var(--b-ink);
  font-size: 14px; font-weight: 550; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.btn-primary { --b-bg: var(--accent); --b-ink: var(--on-accent); --b-line: transparent; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { --b-ink: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: rgb(192 38 45 / 0.3); }
.btn-primary.btn-danger { --b-bg: var(--danger); --b-ink: #fff; }
.btn-primary.btn-danger:hover { background: var(--danger); filter: brightness(1.07); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: var(--r-sm); gap: 6px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn.is-done { color: var(--ok); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--r);
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn .icon { width: 17px; height: 17px; }

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

.input {
  display: block; width: 100%; min-width: 0;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font-size: 14px; line-height: 1.4;
}
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover { border-color: color-mix(in srgb, var(--line-2) 60%, var(--ink-3)); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.select { position: relative; display: inline-block; min-width: 0; }
.select > select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 12px; top: 50%;
  width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg); pointer-events: none;
}
.label { display: block; font-size: 13px; font-weight: 550; color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hint { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.form-error { color: var(--danger); font-size: 13.5px; line-height: 1.45; }

/* A text field and its button on one line: «Завести команду», «Назначить ответственным». */
.line-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; max-width: 560px; }
.line-form .input { flex: 1 1 240px; }
.inline-form { display: inline; margin: 0; }
.invite-form, .give-form { display: flex; gap: 6px; align-items: center; min-width: 0; }
.invite-form .input { flex: 1 1 180px; min-width: 140px; max-width: 280px; }
.give-form { justify-content: flex-end; }
.give-form .select { flex: 0 1 220px; }
.give-form .select .input { width: 100%; }
.give-form .select-tier { flex: 0 1 150px; }

/* ------------------------------------------------------------------ badges, notices */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--sunken); color: var(--ink-2);
  font-size: 11.5px; font-weight: 550; line-height: 1; white-space: nowrap; vertical-align: 1px;
}
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.notice {
  display: flex; flex-direction: column; gap: 4px;
  padding: 11px 14px; margin-bottom: 18px; border-radius: var(--r);
  border: 1px solid rgb(29 78 216 / 0.16); background: var(--accent-soft); color: var(--ink);
  font-size: 13.5px; line-height: 1.5;
}
.notice-warn { border-color: rgb(138 82 0 / 0.2); background: var(--warn-soft); }
.notice-danger { border-color: rgb(192 38 45 / 0.2); background: var(--danger-soft); }
.notice b { font-weight: 650; }
.notice .muted { font-size: 12.5px; }
.plain-list { margin: 2px 0 0; padding-left: 18px; }
.plain-list li + li { margin-top: 2px; }
.flash-link { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

/* ------------------------------------------------------------------ copy box (link, token, setup) */

.copybox {
  display: flex; align-items: flex-start; gap: 6px; min-width: 0;
  padding: 5px 5px 5px 0;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--sunken);
}
.copybox-text {
  flex: 1 1 auto; min-width: 0; padding: 4px 0 4px 12px;
  font: 13px/1.6 var(--mono); color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.copybox .btn { flex: none; background: var(--surface); }

/* ------------------------------------------------------------------ top bar */

.topnav { position: sticky; top: 0; z-index: 40; background: var(--glass); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid var(--line); }
.topnav-inner { display: flex; align-items: center; gap: 18px; max-width: var(--maxw); height: var(--nav-h); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--ink); font-weight: 650; font-size: 15px; letter-spacing: -0.012em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; display: block; }
.navtabs { display: flex; gap: 2px; min-width: 0; }
.navtabs a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 11px;
  border-radius: var(--r-sm); color: var(--ink-2); font-weight: 550; white-space: nowrap;
}
.navtabs a:hover { color: var(--ink); background: var(--hover); text-decoration: none; }
.navtabs a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.nav-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; min-width: 0; }
.nav-user { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 13px; margin-right: 4px; }
.nav-logout { margin: 0; }

@media (max-width: 860px) {
  .nav-user { display: none; }
}
@media (max-width: 680px) {
  .topnav-inner { flex-wrap: wrap; height: auto; padding-top: 6px; gap: 0 8px; }
  .brand { height: 44px; }
  .navtabs { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; }
  .navtabs::-webkit-scrollbar { display: none; }
  .navtabs a { padding: 0 10px; }
}

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.table-gap { margin-bottom: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line);
  text-align: left; white-space: nowrap;
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tr.is-off td { color: var(--ink-3); }
.table tr.is-broken td { background: color-mix(in srgb, var(--danger-soft) 45%, transparent); }
.table .col-n { width: 64px; }
.table .col-pct { width: 84px; text-align: right; }
.table .col-num { width: 84px; text-align: right; }
.table .col-act { text-align: right; }
.table.seats td:nth-child(3) { min-width: 260px; }
.table.audit td { vertical-align: top; }
.acts { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 6px; }
.person { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
/* break-word, not anywhere: a table column is never squeezed narrower than an address, which then breaks mid-word. */
.email { overflow-wrap: break-word; }
.cell-2 { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mono-name { font-family: var(--mono); font-size: 13px; }
.state { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.strong-link { font-weight: 600; }

@media (max-width: 720px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  .table-stack tbody tr:first-child { border-top: 0; }
  .table-stack td { padding: 3px 0; border: 0; text-align: left !important; background: none !important; }
  /* Label and value on one line: a seat is five short lines, not ten. */
  .table-stack td[data-label] { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 10px; }
  .table-stack td[data-label]::before { content: attr(data-label); font: 500 10px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
  .table-stack tr.is-broken { background: color-mix(in srgb, var(--danger-soft) 45%, transparent); }
  .table-stack .invite-form .input { max-width: none; min-width: 0; }
  .table-stack .mob-hide { display: none !important; }
  .table-stack .col-act:has(> .acts:empty) { display: none; }
  .table-stack .col-act { padding-top: 8px; }
  .table-stack .acts { justify-content: flex-start; }
  .table.seats td:nth-child(3) { min-width: 0; }
  .table .col-n, .table .col-pct, .table .col-num { width: 100%; }
}

/* ------------------------------------------------------------------ inline confirm and inline edit (no modals) */

.confirm, .inline-edit { display: inline-block; position: relative; }
.confirm > summary, .inline-edit > summary { list-style: none; }
.confirm > summary::-webkit-details-marker, .inline-edit > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary:not(.btn-primary) { background: var(--hover); }
.confirm-row, .inline-edit-form {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
  margin-top: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--raised); text-align: left;
}
.confirm-q { flex: 1 1 200px; font-size: 13px; color: var(--ink); max-width: 340px; }
.inline-edit > summary:not(.btn) { cursor: pointer; border-bottom: 1px dashed var(--line-2); }
.inline-edit > summary:not(.btn):hover { color: var(--accent-ink); border-bottom-color: currentColor; }
.inline-edit-form { justify-content: flex-start; }
.inline-edit-form .input { width: 180px; flex: 1 1 140px; }
.inline-edit-form .select { flex: 1 1 150px; min-width: 150px; }
.inline-edit-form .select .input { width: 100%; }
.page-head .inline-edit-form { position: absolute; right: 0; z-index: 5; min-width: 320px; box-shadow: var(--shadow); }
/* A field plus a confirmed button («Назначить ответственным», «Пригласить Ops»): the question opens on its own line. */
.confirm-form { align-items: flex-start; }
.confirm-form .confirm[open] { display: flex; flex-direction: column; align-items: flex-start; flex: 1 1 100%; }
.confirm-form .confirm-row { justify-content: flex-start; width: 100%; max-width: 560px; }

/* ------------------------------------------------------------------ «Моё место» */

.kv-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 16px 18px; border-top: 1px solid var(--line); }
.kv-row:first-child { border-top: 0; }
.kv-label { color: var(--ink-3); font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 7px; }
.kv-value { min-width: 0; }
.kv-value .confirm { align-self: flex-start; }
.limits { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.limit { display: grid; grid-template-columns: 72px minmax(80px, 260px) 48px auto; align-items: center; gap: 12px; }
.limit-name { color: var(--ink-2); }
.limit-pct { text-align: right; font-weight: 600; }
.limit-none { grid-column: 2 / -1; }
.bar { display: block; height: 8px; border-radius: 999px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); }
.bar-warn .bar-fill { background: var(--warn); }
.bar-danger .bar-fill { background: var(--danger); }
.usage { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-top: 6px; }
@media (max-width: 560px) {
  .kv-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px; }
  .kv-label { padding-top: 0; }
  .limit { grid-template-columns: 64px minmax(0, 1fr) 44px; }
  .limit-reset { grid-column: 2 / -1; font-size: 12.5px; margin-top: -6px; }
}

/* ------------------------------------------------------------------ bare pages (sign-in, links, errors) */

.bare { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 40px var(--gutter) 72px; }
.bare-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 15px; }
.bare-brand:hover { text-decoration: none; }
.center-screen { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.auth-card { display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 22px; letter-spacing: -0.02em; }
.kv-mini { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.kv-mini dt { color: var(--ink-3); }
.kv-mini dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .card { padding: 20px; }
}
.error-block { display: flex; flex-direction: column; gap: 10px; padding: 24px 0; max-width: 520px; }
.center-screen .error-block { align-items: center; text-align: center; }
.error-code { font: 600 13px/1 var(--mono); letter-spacing: 0.08em; color: var(--ink-3); }

/* ------------------------------------------------------------------ pager */

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 16px; }
.pager > :last-child { justify-self: end; }
.pager-info { color: var(--ink-3); font: 500 12px var(--mono); }
