:root {
  color-scheme: light;
  --paper: #f7f9fc;
  --paper-2: #f1f4f9;
  --surface: #ffffff;
  --surface-2: #f4f6fa;
  --surface-3: #e9eef6;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #eaecf0;
  --line-2: #d0d5dd;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #eff4ff;
  --accent-ink: #ffffff;
  --ok: #12b76a;
  --ok-soft: #ecfdf3;
  --warn: #f79009;
  --warn-soft: #fffaeb;
  --bad: #f04438;
  --bad-soft: #fef3f2;
  --info: #0ba5ec;
  --info-soft: #f0f9ff;
  --neutral-soft: #f2f4f7;
  --grid: rgba(16, 24, 40, 0.045);
  --scrim: rgba(16, 24, 40, 0.5);
  --focus: #2563eb;
  --c1: #2563eb;
  --c2: #38bdf8;
  --c3: #12b76a;
  --c4: #f79009;
  --c5: #7a5af8;
  --side-bg: #ffffff;
  --side-bg-2: #f9fafb;
  --side-ink: #101828;
  --side-muted: #667085;
  --side-line: #eaecf0;
  --side-hover: #f4f6fa;
  --side-active: #eff4ff;
  --side-accent: #2563eb;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 12px 32px -12px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.04);
  --shadow-3: 0 32px 64px -16px rgba(16, 24, 40, 0.24);
  --r-1: 8px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 20px;
  --row-h: 56px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", ui-monospace, Menlo, monospace;
  --rail: 260px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c111d;
  --paper-2: #080c14;
  --surface: #101828;
  --surface-2: #182230;
  --surface-3: #1d2939;
  --ink: #f9fafb;
  --ink-2: #d0d5dd;
  --muted: #98a2b3;
  --faint: #667085;
  --line: #1d2939;
  --line-2: #344054;
  --accent: #84adff;
  --accent-2: #b2ccff;
  --accent-soft: #12294a;
  --accent-ink: #0c111d;
  --ok: #75e0a7;
  --ok-soft: #0b2a1d;
  --warn: #fec84b;
  --warn-soft: #2c1f08;
  --bad: #fda29b;
  --bad-soft: #2c1210;
  --info: #7cd4fd;
  --info-soft: #0b2533;
  --neutral-soft: #1d2939;
  --grid: rgba(249, 250, 251, 0.045);
  --scrim: rgba(3, 7, 18, 0.68);
  --focus: #84adff;
  --c1: #84adff;
  --c2: #7cd4fd;
  --c3: #75e0a7;
  --c4: #fec84b;
  --c5: #bdb4fe;
  --side-bg: #0c111d;
  --side-bg-2: #101828;
  --side-ink: #f9fafb;
  --side-muted: #98a2b3;
  --side-line: #1d2939;
  --side-hover: #182230;
  --side-active: #12294a;
  --side-accent: #84adff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, 0.62), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 34px 70px -18px rgba(0, 0, 0, 0.78);
}

html[data-density="compact"] {
  --row-h: 44px;
}

html[data-density="cozy"] {
  --row-h: 56px;
}

html[data-density="comfy"] {
  --row-h: 64px;
}

html[data-sidebar="collapsed"] {
  --rail: 76px;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

svg.ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 9px 14px;
  border-radius: var(--r-2);
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.16s var(--ease);
}

.skip:focus {
  transform: none;
}

.side {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background: var(--side-bg);
  border-right: 1px solid var(--side-line);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--side-line);
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: var(--r-2);
  background: var(--accent);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.brand-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-txt b {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--side-ink);
}

.brand-txt small {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--side-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-collapse {
  flex: 0 0 auto;
  color: var(--side-muted);
}

.side-collapse:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}

.nav::-webkit-scrollbar {
  width: 6px;
}

.nav::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}

.nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav-grp {
  margin-top: 16px;
}

.nav-grp:first-child {
  margin-top: 4px;
}

.nav-grp-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 8px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--side-muted);
  opacity: 0.8;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--side-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.nav-link svg {
  color: var(--side-muted);
  width: 19px;
  height: 19px;
}

.nav-link:hover svg {
  color: var(--side-ink);
}

.nav-item.is-active > .nav-link {
  background: var(--side-active);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.is-active > .nav-link svg {
  color: var(--accent);
}

.nav-item.is-active > .nav-link::before {
  display: none;
}

.nav-link .label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--neutral-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
}

.nav-item.is-active .nav-badge {
  background: var(--accent);
  color: #ffffff;
}

.nav-sub-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--side-muted);
}

.nav-sub-toggle:hover {
  background: rgba(16, 24, 40, 0.06);
  color: var(--side-ink);
}

.nav-sub-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.14s var(--ease);
}

.nav-sub-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.nav-item.has-sub > .nav-link {
  padding-right: 34px;
}

.nav-sub {
  margin: 2px 0 6px 24px;
  padding-left: 12px;
  border-left: 1px solid var(--side-line);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-sub a {
  display: block;
  padding: 6px 9px;
  border-radius: var(--r-1);
  color: var(--side-muted);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-sub a:hover {
  background: var(--side-hover);
  color: var(--side-ink);
}

.nav-sub a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  background: var(--side-active);
}

.side-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--side-line);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--side-line);
  border-radius: var(--r-2);
  background: var(--side-bg-2);
  font-size: 11px;
  color: var(--side-ink);
  text-align: left;
  width: 100%;
}

.health b {
  font-weight: 600;
}

.health .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.15);
}

.health small {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--side-muted);
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: var(--r-2);
  background: transparent;
  text-align: left;
}

.user-mini:hover {
  background: var(--side-hover);
}

.user-mini-txt {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-mini-txt b {
  font-size: 12px;
  font-weight: 640;
  color: var(--side-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mini-txt small {
  font-size: 10.5px;
  color: var(--side-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mini > svg {
  color: var(--side-muted);
}

html[data-sidebar="collapsed"] .brand-txt,
html[data-sidebar="collapsed"] .side-collapse,
html[data-sidebar="collapsed"] .nav-grp-h,
html[data-sidebar="collapsed"] .nav-link .label,
html[data-sidebar="collapsed"] .nav-badge,
html[data-sidebar="collapsed"] .nav-sub-toggle,
html[data-sidebar="collapsed"] .nav-sub,
html[data-sidebar="collapsed"] .health span,
html[data-sidebar="collapsed"] .health small,
html[data-sidebar="collapsed"] .user-mini-txt,
html[data-sidebar="collapsed"] .user-mini > svg {
  display: none;
}

html[data-sidebar="collapsed"] .side-brand {
  justify-content: center;
  padding: 0;
}

html[data-sidebar="collapsed"] .brand {
  flex: 0 0 auto;
}

html[data-sidebar="collapsed"] .nav {
  padding: 10px 10px 18px;
}

html[data-sidebar="collapsed"] .nav-link {
  justify-content: center;
  padding: 0;
}

html[data-sidebar="collapsed"] .nav-item.is-active > .nav-link::before {
  left: -10px;
}

html[data-sidebar="collapsed"] .health {
  justify-content: center;
  padding: 8px;
}

html[data-sidebar="collapsed"] .user-mini {
  justify-content: center;
  padding: 4px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-scope {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.scope {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  max-width: 210px;
}

.scope:hover {
  background: var(--surface-2);
}

.scope-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.scope-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.topbar-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.topbar-mode {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(400px, 36vw);
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
}

.search:hover {
  border-color: var(--line-2);
  background: var(--surface);
}

.search svg {
  width: 16px;
  height: 16px;
}

.search-txt {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
}

.topbar-sp {
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.bell {
  position: relative;
}

.bell-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.userbtn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  text-align: left;
}

.userbtn:hover {
  background: var(--surface-2);
}

.userbtn-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  max-width: 140px;
}

.userbtn-txt b {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.userbtn-txt small {
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.userbtn > svg {
  color: var(--muted);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  overflow: hidden;
}

.avatar-ink {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

.avatar-sm {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  font-size: 9px;
}

.avatar-lg {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 13px;
}

.avatar-xl {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  font-size: 16px;
}

.avatar-stack {
  display: inline-flex;
  align-items: center;
}

.avatar-stack .avatar + .avatar {
  margin-left: -7px;
  box-shadow: 0 0 0 2px var(--surface);
}

.impersonate {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px;
  background: var(--warn-soft);
  border-bottom: 1px solid var(--line);
  color: var(--warn);
  font-size: 11.5px;
  font-weight: 550;
}

.impersonate svg {
  width: 15px;
  height: 15px;
}

.impersonate .linkbtn {
  margin-left: auto;
  color: var(--warn);
  font-weight: 700;
}

.content {
  flex: 1;
  padding: 28px 32px 64px;
  min-height: calc(100vh - 64px);
  background: var(--paper);
}

#view {
  max-width: 1560px;
  margin: 0 auto;
  outline: none;
}

.page {
  animation: page-in 0.18s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0;
  color: var(--muted);
  min-height: 16px;
}

.crumbs .sep {
  color: var(--line-2);
  width: 12px;
  height: 12px;
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs .here {
  color: var(--ink-2);
  font-weight: 550;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 6px;
  margin-bottom: 22px;
}

.ph-left {
  min-width: 0;
}

.ph-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.ph-title-row h1 {
  font-size: 28px;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.028em;
}

.ph-index {
  display: none;
}

.ph-sub {
  margin-top: 7px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ph-sub .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-2);
}

.ph-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
}

.banner svg {
  color: var(--accent);
  margin-top: 1px;
}

.banner .banner-t {
  font-weight: 640;
  color: var(--ink);
  margin-right: 4px;
}

.banner .linkbtn {
  margin-left: auto;
  white-space: nowrap;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g2,
.g3,
.g4 {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

.split-3-1 {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.row-wrap {
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 11.5px;
}

.tiny {
  font-size: 10.5px;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.num {
  font-variant-numeric: tabular-nums;
}

.strong {
  font-weight: 640;
  color: var(--ink);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
}

.card-h {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.card-h .card-t {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.card-h .card-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}

.card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-b {
  padding: 20px;
}

.card-b.flush {
  padding: 0;
}

.card-b.pad-lg {
  padding: 24px;
}

.card-f {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.card-f .spacer {
  flex: 1;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
}

.card-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.card-link svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi {
  position: relative;
  min-width: 0;
  min-height: 152px;
  padding: 18px 20px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kpi-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.kpi-ic svg {
  width: 19px;
  height: 19px;
}

.kpi-label {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-val {
  margin-top: 12px;
  font-size: 29px;
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.kpi-val small {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 3px;
}

.kpi-foot {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 8px;
  padding-right: 92px;
  min-height: 20px;
}

.kpi-note {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  min-width: 0;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px 2px 4px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.delta.down {
  background: var(--bad-soft);
  color: var(--bad);
}

.delta.flat {
  background: var(--neutral-soft);
  color: var(--muted);
}

.delta svg {
  width: 12px;
  height: 12px;
}

.kpi-spark {
  position: absolute;
  right: 16px;
  top: 60px;
  opacity: 0.8;
  pointer-events: none;
}

.spark {
  overflow: visible;
}

.spark path {
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark .spark-fill {
  stroke: none;
  opacity: 0.1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease),
    color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:active {
  transform: translateY(0.5px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

[data-theme="dark"] .btn-danger {
  color: #1b100a;
}

.btn-danger:hover {
  filter: brightness(0.94);
}

.btn-danger-soft {
  background: var(--bad-soft);
  border-color: transparent;
  color: var(--bad);
}

.btn-danger-soft:hover {
  border-color: var(--bad);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 11.5px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 13.5px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  font-weight: 620;
  cursor: pointer;
  text-align: left;
}

.linkbtn:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.linkbtn.muted {
  color: var(--muted);
}

.icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.lbl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

.lbl .req {
  color: var(--accent);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}

.textarea {
  height: auto;
  min-height: 92px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}

.input:hover,
.select:hover,
.textarea:hover {
  background: var(--surface-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input.is-invalid,
.textarea.is-invalid {
  border-color: var(--bad);
}

.input.is-invalid:focus,
.textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--bad-soft);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > svg {
  position: absolute;
  left: 9px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.input-wrap .input {
  padding-left: 30px;
}

.input-wrap .input-suffix {
  position: absolute;
  right: 8px;
  display: inline-flex;
  gap: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.hint {
  font-size: 10.5px;
  color: var(--muted);
}

.err {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--bad);
  font-weight: 550;
}

.err svg {
  width: 12px;
  height: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-1 {
  grid-column: span 1;
}

fieldset.form-set {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

fieldset.form-set:last-child {
  margin-bottom: 0;
}

.form-set legend {
  padding: 0 0 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: var(--line-2);
  transition: background 0.15s var(--ease);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s var(--ease);
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(14px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.5;
}

.switch-txt {
  font-size: 12px;
  color: var(--ink-2);
}

.check,
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-2);
  user-select: none;
}

.check input,
.radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-box,
.radio-box {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: var(--surface);
  transition: background 0.12s, border-color 0.12s;
}

.radio-box {
  border-radius: 50%;
}

.check input:checked + .check-box,
.check input:indeterminate + .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked + .check-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--accent-ink);
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(40deg);
}

.check input:indeterminate + .check-box::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 7px;
  height: 1.8px;
  background: var(--accent-ink);
}

.radio input:checked + .radio-box {
  border-color: var(--accent);
  border-width: 4px;
}

.check input:focus-visible + .check-box,
.radio input:focus-visible + .radio-box {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.check input:disabled + .check-box,
.radio input:disabled + .radio-box {
  opacity: 0.5;
}

.check-group,
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-group.inline,
.radio-group.inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--neutral-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip.no-dot::before {
  display: none;
}

.chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.chip.info {
  background: var(--info-soft);
  color: var(--info);
}

.chip.accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.chip.neutral {
  background: var(--neutral-soft);
  color: var(--muted);
}

.chip.live::before {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 currentColor;
  }
  50% {
    opacity: 0.55;
    box-shadow: 0 0 0 3px transparent;
  }
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}

.dot.ok {
  background: var(--ok);
}

.dot.warn {
  background: var(--warn);
}

.dot.bad {
  background: var(--bad);
}

.dot.accent {
  background: var(--accent);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  color: var(--ink);
  font-weight: 650;
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 16px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--neutral-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
}

.tab[aria-selected="true"] .tab-count {
  background: var(--accent-soft);
  color: var(--accent);
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
}

.seg button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.seg button:hover {
  color: var(--ink);
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion details {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform 0.15s var(--ease);
  margin-left: auto;
}

.accordion details[open] summary svg {
  transform: rotate(180deg);
}

.accordion .acc-b {
  padding: 0 2px 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  max-width: 78ch;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.toolbar-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  max-width: 100%;
}

.toolbar-search svg {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.toolbar-search .input {
  height: 38px;
  padding-left: 32px;
  font-size: 12.5px;
  background: var(--surface-2);
  border-radius: 999px;
}

.toolbar .select {
  width: auto;
  min-width: 128px;
  height: 38px;
  font-size: 12px;
  border-radius: 999px;
  padding-left: 14px;
}

.toolbar .spacer {
  flex: 1;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 4px 0 7px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10.5px;
}

.filter-chip b {
  font-weight: 650;
  color: var(--ink);
}

.filter-chip button {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
}

.filter-chip button:hover {
  background: var(--neutral-soft);
  color: var(--ink);
}

.filter-chip button svg {
  width: 10px;
  height: 10px;
}

.bulkbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--ink);
  flex-wrap: wrap;
}

.bulkbar b {
  font-family: var(--mono);
  font-size: 11px;
}

.bulkbar .spacer {
  flex: 1;
}

.tbl-wrap {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
}

.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.tbl th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  padding: 0 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: nowrap;
}

.tbl th.td-right {
  text-align: right;
}

.tbl th button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.tbl th button:hover {
  color: var(--ink);
}

.tbl th svg {
  width: 11px;
  height: 11px;
  opacity: 0.5;
}

.tbl th[aria-sort="ascending"] svg,
.tbl th[aria-sort="descending"] svg {
  opacity: 1;
  color: var(--accent);
}

.tbl td {
  height: var(--row-h);
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}

.tbl tbody tr:last-child td {
  border-bottom: 0;
}

.tbl tbody tr:hover td {
  background: var(--surface-2);
}

.tbl tbody tr.is-selected td {
  background: var(--accent-soft);
}

.tbl tbody tr.is-clickable {
  cursor: pointer;
}

.tbl td.td-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tbl td.td-strong {
  color: var(--ink);
  font-weight: 550;
}

.tbl .cell-2 {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.35;
}

.tbl .cell-2 small {
  font-size: 11.5px;
  color: var(--muted);
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cell-user-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.cell-user-txt b {
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-user-txt small {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.row-actions .btn-icon {
  width: 30px;
  height: 30px;
  color: var(--muted);
  opacity: 1;
}

.tbl tbody tr:hover .row-actions .btn-icon {
  color: var(--ink-2);
}

.tbl tbody tr .row-actions .btn-icon[aria-expanded="true"] {
  background: var(--surface-3);
  color: var(--ink);
}

.tbl-empty td {
  padding: 0;
  border: 0;
}

.tbl-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.pager {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.pager button {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
}

.pager button:hover {
  background: var(--surface-2);
}

.pager button[aria-current="page"] {
  border-color: var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager svg {
  width: 13px;
  height: 13px;
}

.pager .ellipsis {
  padding: 0 4px;
  color: var(--muted);
}

.page-size {
  height: 26px;
  padding: 0 22px 0 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background-color: var(--surface);
  font-size: 10.5px;
  background-size: 12px;
  background-position: right 6px center;
}

.data-grid td {
  padding: 0 6px;
}

.grid-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 30px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
}

.grid-cell:hover {
  border-color: var(--line-2);
  background: var(--surface);
}

.grid-cell svg {
  width: 11px;
  height: 11px;
  color: var(--muted);
  opacity: 0;
  margin-left: auto;
}

.grid-cell:hover svg,
.grid-cell:focus-visible svg {
  opacity: 1;
}

.grid-cell[data-dirty="true"] {
  color: var(--accent);
  font-weight: 600;
}

.grid-input {
  width: 100%;
  height: 28px;
  padding: 0 5px;
  border: 1px solid var(--accent);
  border-radius: var(--r-1);
  background: var(--surface);
  font-size: 12px;
}

.pop {
  position: fixed;
  z-index: 210;
  min-width: 180px;
  max-width: min(340px, calc(100vw - 16px));
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  animation: pop-in 0.12s var(--ease) both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pop-pad {
  padding: 12px;
}

.pop-h {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pop-f {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.menu {
  padding: 5px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 31px;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
}

.menu-item svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.menu-item .mi-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item .kbd {
  flex: 0 0 auto;
}

.menu-item.danger {
  color: var(--bad);
}

.menu-item.danger svg {
  color: var(--bad);
}

.menu-item[aria-checked="true"] {
  color: var(--ink);
  font-weight: 600;
}

.menu-item[aria-checked="true"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.menu-item[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.menu-label {
  padding: 7px 8px 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-note {
  padding: 6px 8px 8px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.tip-layer {
  position: fixed;
  inset: 0;
  z-index: 260;
  pointer-events: none;
}

.tip {
  position: fixed;
  max-width: 260px;
  padding: 5px 8px;
  border-radius: var(--r-1);
  background: var(--ink);
  color: var(--paper);
  font-size: 10.5px;
  line-height: 1.4;
  box-shadow: var(--shadow-2);
  animation: pop-in 0.1s var(--ease) both;
}

.tip .kbd {
  margin-left: 5px;
  border-color: var(--muted);
  background: transparent;
  color: var(--paper);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--scrim);
  animation: fade-in 0.16s var(--ease) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  position: fixed;
  z-index: 220;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(580px, calc(100vw - 32px));
  max-height: min(86vh, 880px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: modal-in 0.16s var(--ease) both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 6px)) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.modal-sm {
  width: min(420px, calc(100vw - 32px));
}

.modal-lg {
  width: min(760px, calc(100vw - 32px));
}

.modal-h,
.drawer-h {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.modal-h h2,
.drawer-h h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.modal-h p,
.drawer-h p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.modal-x,
.drawer-x {
  margin-left: auto;
  flex: 0 0 auto;
}

.modal-b,
.drawer-b {
  padding: 22px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-f,
.drawer-f {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0 0 var(--r-4) var(--r-4);
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.modal-f .spacer,
.drawer-f .spacer {
  flex: 1;
}

.drawer {
  position: fixed;
  z-index: 220;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-radius: 20px 0 0 20px;
  box-shadow: var(--shadow-3);
  animation: drawer-in 0.18s var(--ease) both;
}

.drawer-wide {
  width: min(640px, 100vw);
}

@keyframes drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.drawer-h {
  padding: 22px 24px 16px;
}

.drawer-b {
  padding: 0;
}

.drawer-body-pad {
  padding: 20px 24px;
}

.drawer-f {
  border-radius: 0;
  padding: 16px 24px;
}

.drawer-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--muted);
}

.drawer-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
}

.saved svg {
  width: 12px;
  height: 12px;
}

.saved.is-dirty {
  color: var(--warn);
}

.drawer-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-section:last-child {
  border-bottom: 0;
}

.drawer-section h3 {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.dl {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 7px 10px;
  font-size: 12px;
}

.dl dt {
  color: var(--muted);
}

.dl dd {
  margin: 0;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.toasts {
  position: fixed;
  left: calc(var(--rail) + 18px);
  bottom: 18px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
  pointer-events: auto;
  animation: toast-in 0.18s var(--ease) both;
}

.toast.ok {
  border-left-color: var(--ok);
}

.toast.warn {
  border-left-color: var(--warn);
}

.toast.bad {
  border-left-color: var(--bad);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.toast-ic {
  color: var(--accent);
  margin-top: 1px;
}

.toast.ok .toast-ic {
  color: var(--ok);
}

.toast.warn .toast-ic {
  color: var(--warn);
}

.toast.bad .toast-ic {
  color: var(--bad);
}

.toast-ic svg {
  width: 15px;
  height: 15px;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-t {
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
}

.toast-m {
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 1.4;
  opacity: 0.75;
}

.toast-action {
  align-self: center;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

[data-theme="light"] .toast-action {
  border-color: var(--line-2);
}

.toast-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  opacity: 0.8;
  padding: 3px;
  margin-top: 0;
}

.toast-x svg {
  width: 13px;
  height: 13px;
}

.cmdk {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 11vh;
  background: var(--scrim);
  animation: fade-in 0.14s var(--ease) both;
}

.cmdk-panel {
  width: min(620px, calc(100vw - 24px));
  max-height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: pop-in 0.16s var(--ease) both;
}

.cmdk-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 50px;
  border-bottom: 1px solid var(--line);
}

.cmdk-input svg {
  color: var(--muted);
  width: 17px;
  height: 17px;
}

.cmdk-input input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
}

.cmdk-input input::placeholder {
  color: var(--faint);
}

.cmdk-list {
  overflow-y: auto;
  padding: 6px;
  flex: 1;
}

.cmdk-group {
  padding: 8px 8px 3px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--ink-2);
  text-align: left;
}

.cmdk-item[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--line);
  color: var(--ink);
}

.cmdk-item > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.cmdk-item[aria-selected="true"] > svg {
  color: var(--accent);
}

.cmdk-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.cmdk-txt b {
  font-size: 12px;
  font-weight: 620;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-txt small {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-item .kbd {
  flex: 0 0 auto;
}

.cmdk-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.cmdk-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}

.cmdk-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chart {
  position: relative;
  width: 100%;
}

.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart-axis {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.chart-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  opacity: 1;
  stroke: none;
}

.chart-guide {
  stroke: var(--line-2);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-dot {
  stroke: var(--surface);
  stroke-width: 2;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 120px;
  padding: 8px 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  pointer-events: none;
  font-size: 10.5px;
  opacity: 0;
  transition: opacity 0.1s;
}

.chart-tip.is-on {
  opacity: 1;
}

.chart-tip .ct-date {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.chart-tip .ct-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.chart-tip .ct-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.chart-tip .ct-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  padding: 2px 0;
}

.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c);
}

.legend-item[aria-pressed="false"] {
  opacity: 0.4;
  text-decoration: line-through;
}

.legend-item b {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
  font-size: 12px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 170px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 100%;
}

.bar-stack {
  position: relative;
  width: 100%;
  max-width: 34px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bar-seg {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transition: filter 0.15s;
}

.bar-col:hover .bar-seg {
  filter: brightness(1.12);
}

.bar-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.bar-value {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-2);
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.donut {
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
}

.donut circle {
  fill: none;
  stroke-width: 12;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.donut-legend {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.donut-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-2);
}

.donut-row i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.donut-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  color: var(--ink);
}

.donut-row small {
  color: var(--muted);
  font-size: 10px;
}

.progress {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.progress.ok > span {
  background: var(--ok);
}

.progress.warn > span {
  background: var(--warn);
}

.progress.bad > span {
  background: var(--bad);
}

.meter {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-2);
}

.meter-top b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
}

.feed {
  display: flex;
  flex-direction: column;
}

.feed-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item:hover {
  background: var(--surface-2);
}

.feed-ic {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.feed-ic svg {
  width: 13px;
  height: 13px;
}

.feed-main {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.45;
}

.feed-main b {
  color: var(--ink);
  font-weight: 620;
}

.feed-time {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
  padding-top: 2px;
}

.queue-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.queue-item:hover {
  background: var(--surface-2);
}

.queue-item:last-child {
  border-bottom: 0;
}

.queue-main {
  flex: 1;
  min-width: 0;
}

.queue-main b {
  display: block;
  font-size: 12px;
  font-weight: 620;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-main small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-amt {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.queue-actions {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}

.kpi-note svg {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
}

.svc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}

.svc:last-child {
  border-bottom: 0;
}

.svc-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}

.svc-lat {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.uptime {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  width: 92px;
  flex: 0 0 92px;
}

.uptime i {
  flex: 1;
  min-width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--ok);
  opacity: 0.75;
}

.uptime i.warn {
  background: var(--warn);
}

.uptime i.bad {
  background: var(--bad);
}

.uptime i.empty {
  background: var(--line);
}

.uptime-lg {
  height: 30px;
  width: 100%;
  flex: 1;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.health-card {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 12px;
  background: var(--surface-2);
}

.health-card .svc-name {
  font-weight: 600;
  color: var(--ink);
}

.queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-2);
}

.queue-row .progress {
  flex: 1;
}

.queue-row b {
  font-family: var(--mono);
  font-size: 10px;
  width: 26px;
  text-align: right;
  color: var(--muted);
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 4px;
}

.col {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.col-h {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
}

.col-h .col-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 16px;
  border-radius: 3px;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.col-h .btn-icon {
  margin-left: auto;
  width: 24px;
  height: 24px;
}

.col-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  min-height: 180px;
  flex: 1;
}

.col.is-over {
  outline: 1px dashed var(--accent);
  outline-offset: -3px;
  background: var(--accent-soft);
}

.kcard {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface);
  padding: 10px;
  cursor: grab;
  box-shadow: var(--shadow-1);
}

.kcard:hover {
  border-color: var(--line-2);
}

.kcard.prio-high {
  border-left-color: var(--warn);
}

.kcard.prio-critical {
  border-left-color: var(--bad);
}

.kcard.prio-done {
  border-left-color: var(--ok);
}

.kcard.is-dragging {
  opacity: 0.45;
}

.kcard-t {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.kcard-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.kcard-meta .avatar {
  margin-left: auto;
}

.kcard-sub {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.kcard-add {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 7px 8px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-2);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.kcard-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.split-view {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
}

.queue-list {
  border-right: 1px solid var(--line);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.queue-list-h {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.queue-scroll {
  overflow-y: auto;
  flex: 1;
  max-height: 620px;
}

.approval-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  background: transparent;
  text-align: left;
}

.approval-item:hover {
  background: var(--surface-2);
}

.approval-item[aria-current="true"] {
  background: var(--surface-2);
  border-left-color: var(--accent);
}

.approval-item .ai-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  font-family: var(--mono);
}

.approval-item b {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 620;
  color: var(--ink);
  line-height: 1.35;
}

.approval-item small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
}

.detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.detail-h {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-h h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 5px 0 4px;
}

.detail-b {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.detail-f {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.policy {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  margin: 14px 0;
}

.policy-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
}

.policy-row:last-child {
  border-bottom: 0;
}

.policy-row svg {
  width: 14px;
  height: 14px;
  color: var(--ok);
}

.policy-row.bad svg {
  color: var(--bad);
}

.policy-row b {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.chat {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 280px;
  height: min(680px, calc(100vh - 220px));
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
}

.chat-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-list-h {
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.chat-items {
  overflow-y: auto;
  flex: 1;
}

.chat-item {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.chat-item:hover {
  background: var(--surface-2);
}

.chat-item[aria-current="true"] {
  background: var(--surface-2);
  box-shadow: inset 2px 0 0 var(--accent);
}

.chat-item .ci-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-item .ci-top b {
  font-size: 12px;
  font-weight: 620;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item .ci-top small {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.chat-item p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item .unread {
  display: inline-grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-head h3 {
  font-size: 12.5px;
  font-weight: 650;
}

.chat-head small {
  color: var(--muted);
  font-size: 10.5px;
}

.msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
}

.msg {
  max-width: 78%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg.me {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-b {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 3px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}

.msg.me .msg-b {
  border-radius: 10px 10px 3px 10px;
  background: var(--accent-soft);
  border-color: #c7d2fe;
  color: var(--ink);
}

[data-theme="dark"] .msg.me .msg-b {
  border-color: #3730a3;
}

.msg-meta {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  padding: 0 3px;
}

.chat-composer {
  border-top: 1px solid var(--line);
  padding: 10px;
}

.chat-composer .textarea {
  min-height: 62px;
  border: 0;
  padding: 4px 2px;
  box-shadow: none;
  background: transparent;
}

.chat-composer .textarea:focus {
  box-shadow: none;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.chat-actions .spacer {
  flex: 1;
}

.chat-side {
  border-left: 1px solid var(--line);
  padding: 14px;
  overflow-y: auto;
  background: var(--surface-2);
}

.chat-side h4 {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
}

.chat-side h4:first-child {
  margin-top: 0;
}

.dl-tight {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 5px 8px;
  font-size: 11px;
}

.dl-tight dt {
  color: var(--muted);
}

.dl-tight dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.settings-nav {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.settings-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
}

.settings-nav button:hover {
  background: var(--surface-2);
}

.settings-nav button[aria-current="true"] {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 620;
}

.settings-nav button svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.set-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.set-row:first-child {
  padding-top: 0;
}

.set-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.set-row-main {
  flex: 0 0 230px;
}

.set-row-main b {
  display: block;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink);
}

.set-row-main small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.set-row-ctrl {
  flex: 1;
  min-width: 0;
  max-width: 460px;
}

.set-row-ctrl .input,
.set-row-ctrl .select {
  max-width: 320px;
}

.option-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.option-card {
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  padding: 10px;
  background: var(--surface);
  text-align: left;
  color: var(--ink-2);
}

.option-card:hover {
  border-color: var(--muted);
}

.option-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  color: var(--ink);
}

.option-card b {
  display: block;
  font-size: 11.5px;
  font-weight: 620;
}

.option-card small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.option-card .oc-preview {
  height: 26px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--surface-2) 34%, transparent 34%);
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 26px 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-3);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.drop svg {
  width: 22px;
  height: 22px;
}

.drop b {
  font-size: 12px;
  font-weight: 620;
  color: var(--ink);
}

.drop small {
  font-size: 10.5px;
}

.files {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font-size: 11.5px;
}

.file-row .fname {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.file-row .fsize {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.file-row .progress {
  width: 90px;
  flex: 0 0 90px;
}

.rte {
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface);
  overflow: hidden;
}

.rte-toolbar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 4px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.rte-toolbar button {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 26px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-2);
}

.rte-toolbar button:hover {
  background: var(--surface);
}

.rte-toolbar button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
}

.rte-toolbar .sep {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background: var(--line);
}

.rte-body {
  min-height: 150px;
  padding: 11px 12px;
  outline: none;
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ink-2);
}

.rte-body:empty::before {
  content: attr(data-placeholder);
  color: var(--faint);
}

.rte-body h3 {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink);
  margin: 10px 0 4px;
}

.rte-body p {
  margin: 0 0 8px;
}

.rte-body ul,
.rte-body ol {
  padding-left: 20px;
  list-style: disc;
  margin: 0 0 8px;
}

.rte-body ol {
  list-style: decimal;
}

.rte-body a {
  color: var(--accent);
  text-decoration: underline;
}

.rte-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}

.dp {
  width: 258px;
  padding: 10px;
}

.dp-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.dp-head b {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  font-weight: 640;
}

.dp-head .btn-icon {
  width: 24px;
  height: 24px;
}

.dp-week,
.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.dp-week span {
  padding: 3px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dp-day {
  display: grid;
  place-items: center;
  height: 28px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.dp-day:hover {
  background: var(--surface-2);
}

.dp-day.out {
  color: var(--faint);
}

.dp-day.today {
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.dp-day[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
}

.dp-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.dp-foot .spacer {
  flex: 1;
}

.combobox {
  position: relative;
}

.cb-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.cb-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
}

.cb-opt:hover,
.cb-opt[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--ink);
}

.cb-opt[aria-selected="true"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
}

.cb-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 34px 18px;
  text-align: center;
}

.empty-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}

.empty-ic svg {
  width: 18px;
  height: 18px;
}

.empty-t {
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink);
}

.empty-d {
  max-width: 46ch;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.empty .btn {
  margin-top: 4px;
}

.errstate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 34px 18px;
  text-align: center;
}

.errstate .empty-ic {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: transparent;
}

.errstate details {
  font-size: 10.5px;
  color: var(--muted);
}

.errstate summary {
  cursor: pointer;
}

.errstate pre {
  max-width: 100%;
  margin: 8px 0 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10px;
  text-align: left;
  color: var(--ink-2);
}

.callout {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

.callout svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  color: var(--muted);
}

.callout.warn {
  background: var(--warn-soft);
  border-color: transparent;
  color: var(--warn);
}

.callout.warn svg {
  color: var(--warn);
}

.callout.bad {
  background: var(--bad-soft);
  border-color: transparent;
  color: var(--bad);
}

.callout.bad svg {
  color: var(--bad);
}

.callout.ok {
  background: var(--ok-soft);
  border-color: transparent;
  color: var(--ok);
}

.callout.ok svg {
  color: var(--ok);
}

.callout.info {
  background: var(--info-soft);
  border-color: transparent;
  color: var(--info);
}

.callout.info svg {
  color: var(--info);
}

.danger-zone {
  border: 1px solid var(--bad);
  border-radius: var(--r-2);
  padding: 12px;
  background: var(--bad-soft);
}

.danger-zone h3 {
  color: var(--bad);
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 3px;
}

.danger-zone p {
  color: var(--ink-2);
  font-size: 11px;
  margin-bottom: 9px;
}

.skeleton {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

.sk-line {
  height: 10px;
  width: 100%;
}

.sk-circle {
  border-radius: 50%;
}

.sk-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gal {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.spec {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
}

.spec-h {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.spec-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.spec-t {
  flex: 1;
  min-width: 0;
}

.spec-t b {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
}

.spec-t p {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.demo {
  padding: 16px;
  background: var(--surface-2);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.demo.stack-demo {
  flex-direction: column;
  align-items: stretch;
}

.demo.grid-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.demo .card {
  flex: 1;
  min-width: 180px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  width: 100%;
}

.sw {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--surface);
}

.sw i {
  display: block;
  height: 44px;
}

.sw b {
  display: block;
  padding: 6px 8px 1px;
  font-size: 10.5px;
  font-weight: 620;
}

.sw small {
  display: block;
  padding: 0 8px 6px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

.type-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.type-row:last-child {
  border-bottom: 0;
}

.type-row code {
  width: 120px;
  flex: 0 0 120px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.space-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.space-row i {
  display: block;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
}

.kbd-table {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}

.kbd-table > div {
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.kbd-table > div:nth-child(odd) {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.kbd-table > div:nth-child(even) {
  color: var(--muted);
}

.uptime-bars {
  display: flex;
  gap: 2px;
  height: 22px;
}

.uptime-bars i {
  flex: 1;
  border-radius: 1px;
  background: var(--ok);
  opacity: 0.8;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  text-align: left;
}

.notif-item:hover {
  background: var(--surface-2);
}

.notif-item:last-child {
  border-bottom: 0;
}

.notif-item .feed-ic {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.notif-item b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.notif-item small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
}

.notif-item.unread {
  background: var(--accent-soft);
}

.notif-item.unread b {
  font-weight: 650;
}

.notif-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  flex: 0 0 6px;
}

.svc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.incident {
  border: 1px solid var(--warn);
  border-radius: var(--r-2);
  background: var(--warn-soft);
  padding: 11px 13px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 11.5px;
  color: var(--warn);
}

.incident svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.incident b {
  color: var(--warn);
}

.incident small {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
}

.code-inline {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
}

.code-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--ink-2);
  overflow: auto;
  white-space: pre;
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-field .input {
  font-family: var(--mono);
  font-size: 10.5px;
}

.integration {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
}

.integration-h {
  display: flex;
  align-items: center;
  gap: 9px;
}

.integration-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}

.integration-h b {
  display: block;
  font-size: 12.5px;
  font-weight: 640;
  color: var(--ink);
}

.integration-h small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.integration p {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.45;
  min-height: 30px;
}

.integration-f {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
}

.integration-f .spacer {
  flex: 1;
}

.rule-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.rule-row:last-child {
  border-bottom: 0;
}

.rule-row:hover {
  background: var(--surface-2);
}

.rule-main {
  flex: 1;
  min-width: 0;
}

.rule-main b {
  font-size: 12px;
  font-weight: 620;
  color: var(--ink);
  display: block;
}

.rule-flow {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}

.rule-flow span {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.rule-flow svg {
  width: 11px;
  height: 11px;
}

.rule-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.rule-meta b {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-2);
}

.avatar-org {
  border-radius: var(--r-2);
  font-family: var(--mono);
  font-size: 10px;
}

.tenant-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  min-width: 0;
}

.tenant-card:hover {
  border-color: var(--line-2);
}

.tenant-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.tenant-top .avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: var(--r-2);
}

.tenant-name {
  min-width: 0;
  flex: 1;
}

.tenant-name b {
  display: block;
  font-size: 12.5px;
  font-weight: 640;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-name small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.tenant-metrics b {
  display: block;
  font-size: 13px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.tenant-metrics small {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tenant-f {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tenant-f .spacer {
  flex: 1;
}

.vtbl {
  border: 0;
}

.vtbl-head {
  display: grid;
  grid-template-columns: 110px minmax(150px, 1.2fr) minmax(180px, 1.6fr) 120px 110px 100px;
  gap: 10px;
  padding: 0 12px;
  height: 33px;
  align-items: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 760px;
}

.vtbl-body {
  overflow-y: auto;
  max-height: 520px;
  min-width: 760px;
}

.vtbl-spacer {
  position: relative;
}

.vtbl-row {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 110px minmax(150px, 1.2fr) minmax(180px, 1.6fr) 120px 110px 100px;
  gap: 10px;
  align-items: center;
  height: var(--row-h);
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.vtbl-row:hover {
  background: var(--surface-2);
}

.vtbl-row b {
  color: var(--ink);
  font-weight: 600;
}

.vtbl-time {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

.vtbl-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}

.diff {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  font-size: 11px;
}

.diff-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.diff-row:last-child {
  border-bottom: 0;
}

.diff-row > div {
  padding: 6px 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.diff-row .dk {
  color: var(--muted);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 9.5px;
}

.diff-row .before {
  color: var(--bad);
  text-decoration: line-through;
  text-decoration-color: rgba(163, 42, 34, 0.4);
}

.diff-row .after {
  color: var(--ok);
  font-weight: 550;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-item {
  position: relative;
  padding: 0 0 14px 20px;
  border-left: 1px solid var(--line);
  margin-left: 5px;
}

.tl-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line-2);
}

.tl-item.accent::before {
  border-color: var(--accent);
  background: var(--accent);
}

.tl-item b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.tl-item small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
}

.pill-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.pill-tab {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.pill-tab[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.tag-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tag {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.mono-id {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sep-v {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex: 0 0 1px;
}

.only-mobile {
  display: none;
}

.mobile-scrim {
  display: none;
}

.saved-view-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-note {
  margin: 6px 8px 4px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}

.inline-form {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.inline-form .field {
  flex: 1;
  min-width: 120px;
}

.quick-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 560;
}

.quick-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.quick-action svg {
  width: 13px;
  height: 13px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 9px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.err-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--bad);
}

.spin {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.is-loading .ic {
  display: none;
}

.btn.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.flash {
  animation: flash 1.1s var(--ease);
}

@keyframes flash {
  0% {
    background: var(--accent-soft);
  }
  100% {
    background: transparent;
  }
}

.has-overlay {
  overflow: hidden;
}

@media (max-width: 1280px) {
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .split-3-1 {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .chat-side {
    display: none;
  }
}

@media (max-width: 1100px) {
  .content {
    padding: 22px 22px 56px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .g3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-view {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .board {
    grid-template-columns: repeat(4, 240px);
  }

  .settings-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  body {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 86vw;
    transform: translateX(-100%);
    transition: transform 0.2s var(--ease);
    box-shadow: var(--shadow-3);
    z-index: 130;
  }

  body.mobile-nav-open .side {
    transform: none;
  }

  .mobile-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: var(--scrim);
  }

  .only-mobile {
    display: inline-flex;
  }

  .topbar-mode {
    display: none;
  }

  .search {
    width: 200px;
  }

  .content {
    min-height: calc(100vh - 56px);
  }

  html[data-sidebar="collapsed"] .side {
    width: 280px;
  }

  html[data-sidebar="collapsed"] .brand-txt,
  html[data-sidebar="collapsed"] .nav-grp-h,
  html[data-sidebar="collapsed"] .nav-link .label,
  html[data-sidebar="collapsed"] .nav-badge,
  html[data-sidebar="collapsed"] .nav-sub-toggle,
  html[data-sidebar="collapsed"] .user-mini-txt,
  html[data-sidebar="collapsed"] .health span,
  html[data-sidebar="collapsed"] .health small {
    display: revert;
  }

  html[data-sidebar="collapsed"] .side-brand {
    justify-content: flex-start;
    padding: 0 12px 0 14px;
  }

  html[data-sidebar="collapsed"] .nav-link {
    justify-content: flex-start;
    padding: 0 8px;
  }

  html[data-sidebar="collapsed"] .user-mini {
    justify-content: flex-start;
    padding: 6px;
  }
}

@media (max-width: 820px) {
  .content {
    padding: 18px 16px 48px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .ph-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .g2,
  .g3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat {
    grid-template-columns: 240px minmax(0, 1fr);
    height: 560px;
  }

  .split-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .queue-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 240px;
  }

  .queue-scroll {
    max-height: 200px;
  }

  .detail-h {
    padding: 14px 16px;
  }

  .detail-b,
  .detail-f {
    padding-left: 16px;
    padding-right: 16px;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }

  .settings-nav button {
    white-space: nowrap;
  }

  .set-row {
    flex-direction: column;
    gap: 8px;
  }

  .set-row-main {
    flex: none;
  }

  .set-row-ctrl {
    width: 100%;
    max-width: none;
  }

  .option-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    gap: 6px;
    padding: 0 10px;
  }

  .topbar-scope .topbar-sep {
    display: none;
  }

  .scope {
    padding: 0 8px;
    max-width: 106px;
  }

  .topbar-scope .scope-txt {
    max-width: 58px;
  }

  .search {
    width: 34px;
    padding: 0;
    justify-content: center;
    background: transparent;
    border-color: transparent;
  }

  .search .search-txt,
  .search .kbd {
    display: none;
  }

  .search svg {
    width: 17px;
    height: 17px;
  }

  .userbtn-txt,
  .userbtn > svg,
  .topbar-actions > .btn[data-act="view-menu"],
  .topbar-actions > .btn[data-act="help-menu"] {
    display: none;
  }

  .modal,
  .modal-lg,
  .modal-sm {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 32px);
  }

  .drawer {
    width: 100vw;
  }

  .cmdk {
    padding-top: 0;
    align-items: stretch;
  }

  .cmdk-panel {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .toasts {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  html.has-overlay .toasts {
    bottom: 88px;
  }
}

@media (max-width: 560px) {
  .kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .g4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .option-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-search {
    width: 100%;
  }

  .toolbar .select {
    flex: 1;
  }

  .ph-title-row h1 {
    font-size: 23px;
  }

  .chat {
    grid-template-columns: minmax(0, 1fr);
    height: 620px;
  }

  .chat-list {
    max-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-items {
    max-height: 140px;
  }

  .dl {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .diff-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .diff-row .after {
    grid-column: 2;
    border-top: 1px dashed var(--line);
  }

  .spec-h {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (pointer: coarse) {
  .btn {
    min-height: 44px;
  }

  .btn-icon {
    width: 44px;
    height: 44px;
  }

  .nav-link {
    min-height: 44px;
  }

  .input,
  .select {
    min-height: 44px;
  }

  .tab {
    min-height: 44px;
  }

  .dp-day {
    min-height: 34px;
  }
}
