/* ==========================================================
   Statut SL-Projects — page-specific styles.
   Built on top of lumen/colors_and_type.css (tokens).
   ========================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ========== Topbar ============================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar__left { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark img { width: 22px; height: 22px; }
.brand-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.topbar__time { display: inline-flex; align-items: center; gap: 8px; }
.topbar__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--success);
  position: relative;
}
.topbar__dot--maint { background: #5b8def; }
.topbar__dot--deg   { background: #d98b26; }
.topbar__dot--part  { background: #e8662b; }
.topbar__dot--maj   { background: var(--danger); }

.topbar__nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.topbar__nav a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 120ms ease, background 120ms ease;
}
.topbar__nav a:hover { color: var(--ink); background: var(--line-2); }
.topbar__nav a.is-active { color: var(--ink); background: var(--line-2); }

/* ========== Page shell ========================================== */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--orange-600);
}

/* ========== Global banner ====================================== */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.banner__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.banner__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
  color: var(--ink);
}
.banner__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.banner__meta {
  display: flex;
  gap: 24px;
  margin-left: auto;
  align-items: center;
}
.banner__meta-item { text-align: right; }
.banner__meta-key {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.banner__meta-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 2px;
}

/* Banner color variants — left border accent */
.banner--op    .banner__icon { background: rgba(47, 158, 107, 0.10); color: var(--success); }
.banner--maint .banner__icon { background: rgba(91, 141, 239, 0.12); color: #4a78d6; }
.banner--deg   .banner__icon { background: rgba(217, 139, 38, 0.12); color: #b97018; }
.banner--part  .banner__icon { background: rgba(232, 102, 43, 0.12); color: #c4541d; }
.banner--maj   .banner__icon { background: rgba(214, 69, 69, 0.12); color: var(--danger); }

/* ========== Section headings ==================================== */
.section {
  margin-top: 36px;
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
}
.section__legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
}

/* ========== Service row — the meat ============================= */
.svc-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.svc-row {
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--line-2);
}
.svc-row:last-child { border-bottom: none; }

.svc-row__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.svc-row__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.svc-row__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.svc-row__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.svc-row__title-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  transition: color 120ms ease;
}
.svc-row__title-link:hover { color: var(--orange-600); }
.svc-row__host {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.svc-row__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.svc-row__uptime {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.svc-row__uptime strong {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 1px;
}

/* ========== Day bar — 30 daily strips =========================== */
.day-bar {
  display: flex;
  gap: 3px;
  align-items: stretch;
  width: 100%;
}
.day-strip {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  border-radius: 3px;
  background: var(--success);
  position: relative;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}
.day-strip:hover { transform: scaleY(1.08); }
.day-strip[data-status="op"]    { background: #2f9e6b; }
.day-strip[data-status="maint"] { background: #5b8def; }
.day-strip[data-status="deg"]   { background: #d98b26; }
.day-strip[data-status="part"]  { background: #e8662b; }
.day-strip[data-status="maj"]   { background: #d64545; }
.day-strip[data-status="unk"]   {
  background: repeating-linear-gradient(
    -45deg,
    var(--line) 0 4px,
    var(--line-2) 4px 8px
  );
}
/* "Today" marker */
.day-strip--today::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--ink);
}

/* Day-bar axis labels */
.day-bar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ========== Day-bar popover (5-min granularity expand) ========= */
.day-popover {
  position: absolute;
  z-index: 50;
  width: 320px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.day-popover__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.day-popover__date {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.day-popover__uptime {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.day-popover__status {
  font-size: 12px;
  margin-bottom: 12px;
}
.day-popover__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

/* The mini grid: 24 rows × 12 cols, each cell = 5min */
.tick-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px;
}
.tick-col {
  display: grid;
  grid-template-rows: repeat(12, 1fr);
  gap: 1px;
}
.tick-cell {
  height: 5px;
  background: #2f9e6b;
}
.tick-cell[data-status="op"]    { background: #2f9e6b; }
.tick-cell[data-status="maint"] { background: #5b8def; }
.tick-cell[data-status="deg"]   { background: #d98b26; }
.tick-cell[data-status="part"]  { background: #e8662b; }
.tick-cell[data-status="maj"]   { background: #d64545; }
.tick-cell[data-status="unk"]   { background: var(--line); }

/* ========== Status pill ========================================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.005em;
}
.pill::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.pill--op    { background: rgba(47, 158, 107, 0.10);  color: #1f7c52; }
.pill--maint { background: rgba(91, 141, 239, 0.12);  color: #3b66c8; }
.pill--deg   { background: rgba(217, 139, 38, 0.12);  color: #a8651a; }
.pill--part  { background: rgba(232, 102, 43, 0.12);  color: #b94d1c; }
.pill--maj   { background: rgba(214, 69, 69, 0.10);   color: #b73a3a; }
.pill--unk   { background: var(--line-2);             color: var(--muted); }

/* ========== Incidents list ===================================== */
.inc-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.inc-row {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: start;
}
.inc-row:last-child { border-bottom: none; }
.inc-row__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  padding-top: 2px;
}
.inc-row__date strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1px;
  letter-spacing: -0.005em;
}
.inc-row__main { min-width: 0; }
.inc-row__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.inc-row__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.inc-row__svc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.inc-row__svc::before {
  content: '·';
  margin-right: 8px;
  color: var(--line);
}
.inc-row__body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.inc-row__meta {
  margin-top: 10px;
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.inc-row__meta b {
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: 600;
}

/* ========== Service detail page ================================ */
.detail-hero {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.detail-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  transition: color 120ms ease;
}
.detail-hero__back:hover { color: var(--ink); }

.detail-hero__title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 8px;
  color: var(--ink);
}
.detail-hero__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.detail-hero__pill { margin-top: 12px; font-size: 13px; padding: 6px 14px; }

.detail-hero__stats {
  display: flex;
  gap: 32px;
  align-items: flex-end;
}
.kpi-tile {
  text-align: right;
  padding: 0;
}
.kpi-tile__key {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.kpi-tile__val {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.kpi-tile__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Wide day bar on detail page */
.detail-bar {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.detail-bar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.detail-bar .day-strip { height: 56px; border-radius: 4px; }

/* Sub-components grid */
.subcomp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.subcomp {
  padding: 16px 20px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 14px;
}
.subcomp:nth-child(2n)     { border-right: none; }
.subcomp:nth-last-child(-n+2) { border-bottom: none; }
.subcomp__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}
.subcomp__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ========== Footer ============================================== */
.footer {
  max-width: 1120px;
  margin: 60px auto 0;
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.footer a { transition: color 120ms ease; }
.footer a:hover { color: var(--ink); }
.footer__right { display: flex; gap: 18px; }

/* ========== Probe card (single-endpoint services) ============== */
.probe-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.probe-card__row--head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
}
.probe-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: 4px;
}
.probe-url {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.probe-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.probe-cell {
  padding: 18px 22px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.probe-cell:nth-child(3n)         { border-right: none; }
.probe-cell:nth-last-child(-n+3)  { border-bottom: none; }
.probe-cell__key {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.probe-cell__val {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.probe-cell__val.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.probe-cell__val b { font-weight: 700; }

/* ========== Tiny utilities ====================================== */
.spacer-sm { height: 12px; }
.spacer { height: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ========== Dark theme adjustments ============================= */
[data-theme='dark'] body { background: var(--bg); color: var(--ink); }
[data-theme='dark'] .topbar { background: rgba(12, 12, 13, 0.92); }
[data-theme='dark'] .day-strip[data-status="op"]    { background: #3eaa78; }
[data-theme='dark'] .pill--op    { background: rgba(62, 170, 120, 0.18);  color: #5fc295; }
[data-theme='dark'] .pill--maint { background: rgba(91, 141, 239, 0.18);  color: #88aef2; }
[data-theme='dark'] .pill--deg   { background: rgba(217, 139, 38, 0.18);  color: #e3a35a; }
[data-theme='dark'] .pill--part  { background: rgba(232, 102, 43, 0.18);  color: #ee8a59; }
[data-theme='dark'] .pill--maj   { background: rgba(214, 69, 69, 0.18);   color: #e57373; }

/* ==========================================================
   ADMIN — sidebar shell + tables + forms
   ========================================================== */

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 60px);
  max-width: 1320px;
  margin: 0 auto;
}

/* Sidebar */
.admin-sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 16px 24px;
  display: flex;
  flex-direction: column;
}
.admin-sidebar__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 10px;
}
.admin-nav {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav__item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease;
}
.admin-nav__item:hover { color: var(--ink); background: var(--line-2); }
.admin-nav__item.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.admin-sidebar__foot {
  margin-top: auto;
  padding: 12px 6px 0;
}
.admin-foot-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}
.admin-foot-card__title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.admin-foot-card p { margin: 0; }

/* Main area */
.admin-main {
  padding: 36px 32px 80px;
  min-width: 0;
}
.admin-header {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.admin-header__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
  color: var(--ink);
}
.admin-header__desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}

/* Two-column grid: list + form */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.05fr);
  gap: 24px;
  align-items: flex-start;
}
@media (max-width: 1180px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 220px 1fr; }
  .admin-main { padding: 28px 24px 80px; }
}
@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: none; border-bottom: 1px solid var(--line); padding: 16px 16px 12px; }
}

/* List card */
.admin-list {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 22px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
}
.admin-list__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.admin-list__rows {
  list-style: none;
  margin: 0; padding: 0;
}
.admin-list__rows li { display: block; }
.admin-list__group + .admin-list__group { border-top: 1px solid var(--line); }
.admin-list__group-head {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 22px 6px;
  background: var(--bg);
}
.admin-list__empty {
  padding: 18px 22px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* Row inside the list */
.list-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line-2);
  padding: 14px 18px 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
  transition: background 120ms ease;
}
.list-row:first-child { border-top: none; }
.list-row:hover { background: var(--bg); }
.list-row.is-active {
  background: var(--orange-50);
  box-shadow: inset 3px 0 0 var(--orange);
}
.list-row__main { flex: 1; min-width: 0; }
.list-row__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row__sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.list-row svg { color: var(--muted-2); }
.list-row.is-active svg { color: var(--orange-600); }

/* Form */
.admin-form {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-form__head {
  padding: 22px 26px 20px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.admin-form__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.form-section {
  border: none;
  margin: 0;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-section:last-of-type { border-bottom: none; }
.form-section__legend {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  margin-bottom: 4px;
  padding: 0;
}
.form-section__desc {
  font-size: 13px;
  color: var(--muted);
  margin: -8px 0 0;
  line-height: 1.5;
}
.form-section__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.form-field__hint {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-sans);
  line-height: 1.4;
}

/* Inputs */
.input {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input.mono, .input--mono { font-family: var(--font-mono); font-size: 12px; }
.input:focus { border-color: var(--orange); box-shadow: var(--ring); }
.input:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.input--area {
  min-height: 80px;
  resize: vertical;
  line-height: 1.55;
}
.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.select-wrap svg {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--muted);
  transform: rotate(90deg);
}
.input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background: var(--surface);
}

/* Segmented control */
.segmented {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  width: fit-content;
}
.segmented__opt {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 120ms ease;
}
.segmented__opt:hover { color: var(--ink); }
.segmented__opt.is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Toggle */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-sans);
}
.toggle__knob {
  width: 32px; height: 18px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  transition: background 150ms ease;
}
.toggle__knob::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--surface);
  top: 2px; left: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform 150ms ease;
}
.toggle.is-on .toggle__knob { background: var(--orange); }
.toggle.is-on .toggle__knob::after { transform: translateX(14px); }
.toggle__label {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink);
}
.chip__x {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}
.chip__x:hover { color: var(--danger); }
.chip--add {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.chip--add:hover { color: var(--ink); border-color: var(--ink); }

/* Subcomponent edit list */
.subcomp-edit {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.subcomp-edit__row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 36px;
  gap: 8px;
  align-items: center;
}
.btn-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.btn-icon:hover { color: var(--danger); border-color: var(--danger); }

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-quiet {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 120ms cubic-bezier(0.22, 0.61, 0.36, 1);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--orange);
  color: var(--surface);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { background: var(--orange-600); transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--line);
}
.btn-danger:hover { border-color: var(--danger); }
.btn-quiet {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 6px 10px;
  font-size: 12px;
}
.btn-quiet:hover { color: var(--ink); background: var(--line-2); }
.btn-quiet.is-active { color: var(--orange-600); }

.admin-form__actions {
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-top: 1px solid var(--line-2);
  gap: 12px;
}
.admin-form__actions:has(> .admin-form__actions-right:only-child) {
  justify-content: flex-end;
}
.admin-form__actions-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
