/* SEOZING admin — vanilla CSS, no external assets. */

:root {
  color-scheme: dark;
  --bg: #06110f;
  --bg-deep: #040c0a;
  --surface: #0b1c18;
  --surface-2: #0f2621;
  --surface-3: #14322b;
  --ink: #e8f4f0;
  --ink-soft: #c6dad4;
  --muted: #91aaa2;
  --muted-2: #748d86;
  --line: #17362e;
  --line-strong: #245044;
  --accent: #2fbdae;
  --accent-strong: #6ee7d8;
  --accent-deep: #0f766e;
  --accent-soft: rgba(47, 189, 174, .13);
  --accent-ink: #8ff0e2;
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, .12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, .12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --focus: #5eead4;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .24);
  --shadow-md: 0 18px 44px -26px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 100px -50px rgba(0, 0, 0, .9);
  --radius-sm: 9px;
  --radius: 15px;
  --radius-lg: 22px;
  --sidebar: 256px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(47, 189, 174, .10), transparent 62%),
    radial-gradient(760px 500px at -10% 108%, rgba(15, 118, 110, .10), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.16; letter-spacing: -.022em; text-wrap: balance; }
code, .mono { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection { background: rgba(47, 189, 174, .32); color: #fff; }

.visually-hidden {
  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: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-160%);
  padding: .65rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #06201c;
  font-weight: 750;
  text-decoration: none;
  transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(0); }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- brand / buttons / chips ---------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { color: var(--ink); font-size: 1.02rem; letter-spacing: .015em; }
.brand-tag {
  margin-left: .1rem;
  padding: .12rem .42rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.brand--light { color: var(--accent); }
.brand--light .brand-word { color: var(--ink); }

.btn {
  --btn-bg: var(--surface-2);
  --btn-ink: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .65rem 1rem;
  border: 1px solid var(--btn-line);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary {
  --btn-bg: var(--accent);
  --btn-ink: #04211c;
  --btn-line: var(--accent);
  font-weight: 800;
  box-shadow: 0 10px 26px -16px rgba(47, 189, 174, .9);
}
.btn--primary:hover { --btn-bg: var(--accent-strong); --btn-line: var(--accent-strong); }
.btn--secondary { --btn-bg: var(--surface-2); }
.btn--secondary:hover { --btn-bg: var(--surface-3); --btn-line: var(--accent-deep); }
.btn--ghost { --btn-bg: transparent; --btn-line: transparent; color: var(--muted); }
.btn--ghost:hover { --btn-bg: var(--surface-2); color: var(--ink); }
.btn--small { min-height: 36px; padding: .42rem .7rem; font-size: .8rem; border-radius: 8px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  max-width: 100%;
  padding: .16rem .5rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.45;
  white-space: nowrap;
}
.chip--neutral { background: var(--surface-3); color: var(--ink-soft); }
.chip--accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip--success { background: var(--success-soft); color: var(--success); }
.chip--warning { background: var(--warning-soft); color: var(--warning); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }
.chip--plan { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------------- boot ---------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .9rem;
  background: var(--bg);
  color: var(--muted);
  font-size: .9rem;
}
.boot__mark { width: 52px; height: 52px; animation: breathe 1.8s ease-in-out infinite; }
.boot p { margin: 0; }

/* ---------------- auth ---------------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 100dvh;
}
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(1.6rem, 4.5vw, 3.6rem);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(700px 460px at 82% 20%, rgba(47, 189, 174, .17), transparent 64%),
    radial-gradient(620px 420px at 10% 92%, rgba(15, 118, 110, .16), transparent 66%),
    linear-gradient(160deg, #0b201b 0%, #071411 62%, #050e0c 100%);
}
.auth-brand::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -24%;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(47, 189, 174, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(47, 189, 174, .035), 0 0 0 128px rgba(47, 189, 174, .02);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand__pitch { max-width: 34rem; margin: auto 0; padding: 2.6rem 0; }
.eyebrow {
  margin: 0 0 .55rem;
  color: var(--accent-ink);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.auth-brand__headline {
  margin: 0 0 1rem;
  max-width: 15ch;
  color: var(--ink);
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.auth-brand__text { max-width: 42ch; margin: 0 0 1.4rem; color: var(--muted); font-size: .98rem; }
.auth-brand__list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .87rem; }
.auth-brand__list li { position: relative; padding-left: 1.35rem; }
.auth-brand__list li::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 189, 174, .12);
}
.auth-brand__foot { margin: 0; color: var(--muted-2); font-size: .76rem; letter-spacing: .02em; }
.auth-panel { display: grid; place-items: center; padding: clamp(1.4rem, 4vw, 3.5rem); }
.auth-card {
  width: min(100%, 430px);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 38, 33, .78), rgba(11, 28, 24, .94));
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin: 0 0 .45rem; font-size: clamp(1.6rem, 3vw, 1.95rem); }
.auth-card h1:focus { outline: none; }
.auth-card__lead { margin: 0 0 1.15rem; color: var(--muted); font-size: .9rem; }
.auth-card__note { margin: .7rem 0 1.1rem; color: var(--muted-2); font-size: .82rem; }
.auth-card__foot { margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .78rem; text-align: center; }
.auth-card__foot a { color: var(--accent-ink); text-decoration: none; }
.auth-card__foot a:hover { text-decoration: underline; }
.auth-card--narrow { max-width: 490px; text-align: left; }
.auth--single { display: grid; place-items: center; padding: 1.4rem; }
.auth--single .auth-card { justify-self: center; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: 1.2rem; }
.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--warning-soft);
  color: var(--warning);
}
.auth-icon svg { width: 26px; height: 26px; }
.auth-icon--warning { background: var(--danger-soft); color: var(--danger); }

.auth-form { display: grid; gap: .95rem; margin-top: 1rem; }
.field { display: grid; gap: .35rem; }
.field > label, .field > span { color: var(--ink-soft); font-size: .8rem; font-weight: 650; }
.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: .55rem .72rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: .92rem;
}
.field input::placeholder { color: var(--muted-2); }
.field input:hover,
.field select:hover { border-color: #2d5c50; }
.field input:focus,
.field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 189, 174, .14); }
.form-error {
  margin: 0;
  padding: .55rem .7rem;
  border: 1px solid rgba(248, 113, 113, .32);
  border-radius: 9px;
  background: var(--danger-soft);
  color: #fecaca;
  font-size: .82rem;
}
.notice {
  margin: 0 0 1rem;
  padding: .6rem .75rem;
  border: 1px solid rgba(47, 189, 174, .28);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: .82rem;
}
.notice[data-tone="warning"] { border-color: rgba(251, 191, 36, .32); background: var(--warning-soft); color: #fde68a; }
.notice[data-tone="error"] { border-color: rgba(248, 113, 113, .34); background: var(--danger-soft); color: #fecaca; }

/* ---------------- app shell ---------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 1.15rem .9rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0a1b17 0%, #071411 100%);
}
.sidebar__brand { padding: .2rem .45rem 1.25rem; }
.side-nav { display: grid; gap: .16rem; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: .68rem;
  padding: .58rem .68rem;
  border-radius: 9px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 620;
  text-decoration: none;
  transition: background-color .14s ease, color .14s ease;
}
.side-nav a svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.side-nav--foot { padding-top: .1rem; }
.sidebar__meta { margin: .65rem .45rem 0; color: var(--muted-2); font-size: .68rem; letter-spacing: .04em; }

.app-main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 17, 15, .84);
  backdrop-filter: blur(14px);
}
.topbar__title { display: grid; min-width: 0; gap: .02rem; }
.topbar__eyebrow { color: var(--muted-2); font-size: .6rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.topbar__title strong { overflow: hidden; color: var(--ink); font-size: .92rem; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.topbar__meta { display: flex; align-items: center; gap: .5rem; margin-left: auto; min-width: 0; }
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  min-width: 0;
  padding: .25rem .65rem .25rem .26rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #04211c;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}
.user-pill__email {
  overflow: hidden;
  max-width: 230px;
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-toggle { display: none; }
.nav-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(1, 6, 5, .64); backdrop-filter: blur(2px); }

.view {
  width: min(100%, 1260px);
  margin-inline: auto;
  padding: clamp(1.2rem, 3vw, 2.1rem) clamp(1rem, 3vw, 2.4rem) 4.5rem;
}
#view:focus { outline: none; }
.stack { display: grid; gap: 1rem; }

/* ---------------- page scaffolding ---------------- */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}
.page-head h1 { margin: 0 0 .3rem; font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.page-head p { max-width: 68ch; margin: 0; color: var(--muted); font-size: .88rem; }
.page-head h1:focus { outline: none; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; flex: none; }

.card {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 38, 33, .44), rgba(11, 28, 24, .72));
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}
.card__head h2 { margin: 0; font-size: 1rem; }
.card__head p { margin: .2rem 0 0; color: var(--muted-2); font-size: .78rem; }
.card__link { flex: none; color: var(--accent-ink); font-size: .75rem; font-weight: 700; text-decoration: none; }
.card__link:hover { text-decoration: underline; }

/* ---------------- stats ---------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.stat-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  position: relative;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(47, 189, 174, .09), transparent 70%),
    linear-gradient(180deg, rgba(15, 38, 33, .6), rgba(11, 28, 24, .8));
  box-shadow: var(--shadow-sm);
}
.stat__icon {
  position: absolute;
  top: .85rem;
  right: .85rem;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.stat__icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat__label { margin: 0 0 .22rem; padding-right: 2rem; color: var(--muted-2); font-size: .66rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.stat__value { margin: 0; color: var(--ink); font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat__hint { margin: .3rem 0 0; color: var(--muted-2); font-size: .72rem; }

.overview-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, .95fr);
  gap: 1rem;
  align-items: start;
}

/* ---------------- health ---------------- */

.health-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.health-chip {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-width: 0;
  padding: .34rem .58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 650;
}
.health-chip__name { overflow: hidden; max-width: 17ch; text-overflow: ellipsis; white-space: nowrap; }
.health-chip--down { border-color: rgba(248, 113, 113, .36); background: var(--danger-soft); color: #fecaca; }
.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}
.health-chip--down .health-dot,
.health-dot--down { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.health-dot--muted { background: var(--muted-2); box-shadow: 0 0 0 3px rgba(116, 141, 134, .16); }

.health-banner {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(74, 222, 128, .28);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(74, 222, 128, .12), rgba(11, 28, 24, .7));
}
.health-banner--warning { border-color: rgba(251, 191, 36, .32); background: linear-gradient(120deg, rgba(251, 191, 36, .12), rgba(11, 28, 24, .7)); }
.health-banner--unknown { border-color: var(--line); background: var(--surface); }
.health-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--success-soft);
  color: var(--success);
}
.health-banner--warning .health-banner__icon { background: var(--warning-soft); color: var(--warning); }
.health-banner--unknown .health-banner__icon { background: var(--surface-3); color: var(--muted); }
.health-banner__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.health-banner h2 { margin: 0 0 .15rem; font-size: 1rem; }
.health-banner p { margin: 0; color: var(--muted); font-size: .8rem; }

.health-list { margin: 0; padding: 0; list-style: none; }
.health-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .78rem 0;
  border-bottom: 1px solid var(--line);
}
.health-row:last-child { border-bottom: 0; }
.health-row strong { display: block; color: var(--ink); font-size: .88rem; font-weight: 650; }
.health-row p { margin: .1rem 0 0; color: var(--muted-2); font-size: .76rem; overflow-wrap: anywhere; }
.health-row .health-dot { width: 10px; height: 10px; }

/* ---------------- capacity ---------------- */

.capacity-list { display: grid; gap: .95rem; }
.capacity { display: grid; gap: .4rem; min-width: 0; }
.capacity__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.capacity__name { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.capacity__name strong { overflow: hidden; color: var(--ink-soft); font-size: .84rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.capacity__counts { flex: none; color: var(--muted); font-family: var(--mono); font-size: .74rem; }
.capacity__foot { display: flex; justify-content: space-between; gap: .6rem; color: var(--muted-2); font-size: .7rem; }
.bar {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .35s ease;
}
.bar--warning > span { background: linear-gradient(90deg, #b45309, var(--warning)); }
.bar--danger > span { background: linear-gradient(90deg, #b91c1c, var(--danger)); }
.bar--empty > span { background: var(--line-strong); }
.capacity-table-bar { min-width: 150px; }

/* ---------------- activity ---------------- */

.activity { margin: 0; padding: 0; list-style: none; }
.activity__item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: .7rem;
  padding: .62rem 0;
  border-bottom: 1px solid var(--line);
}
.activity__item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity__item:first-child { padding-top: 0; }
.activity__dot { width: 9px; height: 9px; margin-top: .42rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.activity__dot--success { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.activity__dot--warning { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.activity__dot--danger { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.activity__message { margin: 0; color: var(--ink-soft); font-size: .84rem; overflow-wrap: anywhere; }
.activity__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .16rem 0 0; color: var(--muted-2); font-size: .7rem; }
.activity__kind { color: var(--accent-ink); font-weight: 700; }
.activity__sep { color: var(--line-strong); }

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  padding: .75rem;
}
.search-field {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1 1 250px;
  min-width: 0;
  height: 42px;
  padding: 0 .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 189, 174, .13); }
.search-field svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search-field input {
  width: 100%;
  min-width: 0;
  padding: .3rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: .86rem;
}
.search-field input:focus { outline: none; }
.search-field input::placeholder { color: var(--muted-2); }
.select-field {
  display: flex;
  align-items: center;
  gap: .45rem;
  height: 42px;
  padding: 0 .55rem 0 .65rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: .74rem;
  font-weight: 650;
  white-space: nowrap;
}
.select-field select {
  max-width: 150px;
  padding: .2rem 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 600;
}
.select-field select:focus { outline: none; }
.select-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 189, 174, .13); }
.toolbar__count { margin: 0 0 0 auto; color: var(--muted-2); font-size: .76rem; }
.toolbar__reset { flex: none; }

.card--table { padding: 0; overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap:focus-visible { outline-offset: -3px; }
.data-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: .84rem; }
.data-table th {
  padding: .72rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 38, 33, .55);
  color: var(--muted-2);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { padding: .78rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(47, 189, 174, .035); }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table time { white-space: nowrap; }
.cell-stack { display: grid; gap: .1rem; min-width: 0; }
.cell-strong { overflow: hidden; color: var(--ink); font-size: .85rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { overflow: hidden; max-width: 32ch; color: var(--muted-2); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.cell-inline { display: inline-flex; align-items: center; gap: .4rem; }
.link { display: inline-flex; align-items: center; gap: .25rem; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.code {
  display: inline-block;
  max-width: 24ch;
  overflow: hidden;
  padding: .12rem .38rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .74rem;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.dash { color: var(--muted-2); }
.usage-cell { display: flex; align-items: center; gap: .55rem; min-width: 170px; }
.usage-cell .bar { flex: 1 1 auto; }
.usage-cell__pct { flex: none; width: 3.1rem; color: var(--muted); font-family: var(--mono); font-size: .72rem; text-align: right; }

/* ---------------- states / skeleton ---------------- */

.state-box {
  display: grid;
  justify-items: center;
  gap: .45rem;
  padding: 2.4rem 1.2rem;
  text-align: center;
}
.state-box__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: .2rem;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--muted);
}
.state-box__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.state-box h2 { margin: 0; font-size: 1rem; }
.state-box p { max-width: 48ch; margin: 0; color: var(--muted); font-size: .83rem; }
.state-box .btn { margin-top: .45rem; }
.state-box--error .state-box__icon { background: var(--danger-soft); color: var(--danger); }
.inline-empty { margin: .2rem 0 0; color: var(--muted); font-size: .82rem; }
.skeleton {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(20, 50, 43, .55) 25%, rgba(36, 80, 68, .45) 37%, rgba(20, 50, 43, .55) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton--stat { height: 108px; border-radius: var(--radius); }
.skeleton--card { height: 230px; border-radius: var(--radius); }
.skeleton--toolbar { height: 42px; }
.skeleton--row { height: 50px; }
.skeleton-stack { display: grid; gap: .55rem; }
.loading-table { padding: .9rem; }
.skeleton-grid { display: grid; gap: 1rem; }

/* ---------------- system ---------------- */

.system-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1rem; align-items: start; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.link-row:last-child { border-bottom: 0; padding-bottom: 0; }
.link-row:first-child { padding-top: 0; }
.link-row:hover strong { color: var(--accent-ink); }
.link-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.link-row__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link-row strong { display: block; font-size: .86rem; font-weight: 650; }
.link-row p { margin: .1rem 0 0; color: var(--muted-2); font-size: .75rem; }
.link-row > svg { width: 15px; height: 15px; fill: none; stroke: var(--muted-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.session-list { display: grid; gap: .7rem; margin: 0 0 1rem; }
.session-list > div { display: grid; gap: .1rem; }
.session-list dt { color: var(--muted-2); font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.session-list dd { margin: 0; overflow-wrap: anywhere; color: var(--ink-soft); font-size: .84rem; }
.session-note { margin: 0 0 1rem; color: var(--muted); font-size: .78rem; }

/* ---------------- toast / noscript ---------------- */

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 150;
  display: grid;
  gap: .5rem;
  width: min(360px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .7rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: toast-in .18s ease both;
}
.toast__bar { width: 3px; align-self: stretch; border-radius: 999px; background: var(--accent); }
.toast--error .toast__bar { background: var(--danger); }
.toast--success .toast__bar { background: var(--success); }
.toast__msg { flex: 1; margin: 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.4; }
.toast__close {
  width: 28px;
  height: 28px;
  flex: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  font-size: 1rem;
  line-height: 1;
}
.toast__close:hover { background: var(--surface-2); color: var(--ink); }

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 300;
  margin: 0;
  padding: .8rem 1rem;
  border-radius: 9px;
  background: var(--danger);
  color: #2a0808;
  font-size: .88rem;
  font-weight: 650;
}

/* ---------------- motion ---------------- */

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.93); opacity: .72; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- responsive ---------------- */

@media (max-width: 1120px) {
  .overview-columns, .system-grid { grid-template-columns: 1fr; }
  .stat-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(82vw, 310px);
    height: 100dvh;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .2s ease, visibility .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav-toggle { display: inline-flex; }
  .auth { grid-template-columns: 1fr; }
  .auth:not(.auth--single) { grid-template-rows: auto minmax(0, 1fr); }
  .auth-brand { min-height: auto; align-items: flex-start; padding: 1.15rem 1.3rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-brand::before { display: none; }
  .auth-brand__pitch { display: none; }
  .auth-brand__foot { display: none; }
  .auth-panel { padding: 1.4rem 1rem 3rem; }
  .auth-card { box-shadow: var(--shadow-md); }
}

@media (max-width: 720px) {
  .page-head { display: grid; gap: .8rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .select-field { min-width: 0; }
  .select-field select { max-width: none; width: 100%; }
  .toolbar__count { grid-column: 1 / -1; margin: 0; }
  .toolbar__reset { grid-column: 1 / -1; justify-self: start; }
  .user-pill__email { max-width: 150px; }
  .auth-actions { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: .85rem; }
  .stat__hint { display: none; }
  .user-pill { padding-right: .35rem; }
  .user-pill__email { max-width: 108px; }
  .topbar__logout span { display: none; }
  .topbar__logout { min-width: 36px; padding: .42rem .5rem; }
  .brand-tag { display: none; }
  .health-row { grid-template-columns: auto minmax(0, 1fr); }
  .health-row > .chip { grid-column: 2; justify-self: start; }
  .link-row { grid-template-columns: auto minmax(0, 1fr); }
  .link-row > svg { display: none; }
  .data-table { min-width: 640px; }
}

@media (max-width: 360px) {
  .stat-grid, .stat-grid--four { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .skeleton { background: var(--surface-3); }
}
