/* ==========================================================================
   MELECH VIEWER — app stylesheet (Linear skin)
   Tokens copied verbatim from skin-reference/style.css
   (source of truth: frontend/linear.app.DESIGN.md).
   Sections: tokens · layout shell · components · page pieces ·
   responsive · overlays (menus / toasts / modals — app additions).
   ========================================================================== */

:root {
  /* colors */
  --primary: #5e6ad2;
  --on-primary: #ffffff;
  --primary-hover: #828fff;
  --primary-focus: #5e69d1;
  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;
  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --surface-4: #191a1b;
  --hairline: #23252a;
  --hairline-strong: #34343a;
  --hairline-tertiary: #3e3e44;
  --success: #27a644;
  /* semantic tints improvised to match the lavender-tinted dark palette */
  --warn: #d2a04e;
  --danger: #d25e6a;
  /* radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;
  /* spacing */
  --sp-xxs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  /* type */
  --font-sans: "Inter", "SF Pro Display", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The hidden attribute must always win: several component classes set
   display:flex/grid, which silently overrides the UA's [hidden] rule.
   (Bit us on task-editor's Cartly blocks showing for Encore tasks.) */
[hidden] { display: none !important; }

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

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  min-height: 100vh;
}

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

::selection { background: rgba(94, 106, 210, 0.35); }

/* ==========================================================================
   App shell: sidebar + main
   ========================================================================== */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: var(--sp-md) var(--sp-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-xs) var(--sp-xs) var(--sp-md);
}

.brand-mark {
  /* Crown mark (brand option A) — the inline SVG is the mark itself,
     no tile behind it. */
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--ink-subtle);
  line-height: 1.3;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  min-height: 32px;
  border-radius: var(--r-sm);
  color: var(--ink-subtle);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a:hover {
  background: var(--surface-1);
  color: var(--ink-muted);
}

.nav a.active {
  background: var(--surface-2);
  color: var(--ink);
}

.nav a.active svg { color: var(--primary-hover); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-xs) 10px;
  min-height: 44px;
  margin-top: var(--sp-md);
  border-top: 1px solid var(--hairline);
  padding-top: var(--sp-sm);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.user-role { font-size: 11px; color: var(--ink-subtle); }

.main {
  flex: 1;
  min-width: 0;
  padding: var(--sp-lg) var(--sp-xl) var(--sp-xxl);
  max-width: 1280px;
}

/* Mobile top bar + checkbox-hack nav */
.nav-toggle { display: none; }

.mobile-bar {
  display: none;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.hamburger:hover { background: var(--surface-1); }

.hamburger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.scrim { display: none; }

/* ==========================================================================
   Page header
   ========================================================================== */

.page-head {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  padding-bottom: var(--sp-md);
  margin-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--hairline);
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

.page-meta {
  font-size: 13px;
  color: var(--ink-subtle);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.spacer { flex: 1; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  display: inline-block;
  flex-shrink: 0;
}

.dot-ok { background: var(--success); box-shadow: 0 0 6px rgba(39, 166, 68, 0.55); }
.dot-warn { background: var(--warn); }
.dot-bad { background: var(--danger); }
.dot-idle { background: var(--ink-tertiary); }

/* ==========================================================================
   Buttons, inputs, chips
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 8px 14px;
  min-height: 34px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-focus); }

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

.btn-secondary:hover { background: var(--surface-2); border-color: var(--hairline-strong); }

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

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

.btn-danger {
  background: var(--surface-1);
  color: var(--danger);
  border-color: var(--hairline);
}

.btn-danger:hover { border-color: var(--danger); background: rgba(210, 94, 106, 0.08); }

.btn-sm { padding: 5px 10px; min-height: 28px; font-size: 13px; }

.btn:focus-visible,
.input:focus,
.select:focus,
a:focus-visible {
  outline: 2px solid rgba(94, 105, 209, 0.5);
  outline-offset: 1px;
}

.btn-block { width: 100%; }

.input, .select {
  background: var(--surface-1);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 8px 12px;
  min-height: 36px;
  width: 100%;
  transition: border-color 0.12s ease;
}

.input::placeholder { color: var(--ink-tertiary); }
.input:hover, .select:hover { border-color: var(--hairline-strong); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.search {
  position: relative;
  min-width: 200px;
}

.search .input { padding-left: 32px; }

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: var(--ink-tertiary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-subtle);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

/* chips (section filter, server multi-select, filter pills) */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  min-height: 32px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-subtle);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.chip:hover { color: var(--ink-muted); border-color: var(--hairline-strong); }

.chip.selected {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--hairline-strong);
}

.chip.selected .dot { background: var(--primary-hover); }

.chip .count { color: var(--ink-tertiary); font-weight: 400; }
.chip.selected .count { color: var(--ink-subtle); }

/* status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  background: var(--surface-2);
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: currentColor;
}

.pill-ok   { color: #4cc06a; background: rgba(39, 166, 68, 0.10); border-color: rgba(39, 166, 68, 0.28); }
.pill-warn { color: var(--warn); background: rgba(210, 160, 78, 0.10); border-color: rgba(210, 160, 78, 0.28); }
.pill-bad  { color: var(--danger); background: rgba(210, 94, 106, 0.10); border-color: rgba(210, 94, 106, 0.28); }
.pill-info { color: var(--primary-hover); background: rgba(94, 106, 210, 0.12); border-color: rgba(94, 106, 210, 0.32); }
.pill-idle { color: var(--ink-subtle); }

/* ==========================================================================
   Cards & grids
   ========================================================================== */

.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  position: relative;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.card::before {
  /* subtle white edge highlight on lifted panels */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

.card-hover:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}

.grid { display: grid; gap: var(--sp-md); }
.grid-servers { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-carts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-tasks { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: var(--sp-sm);
}

.section { margin-bottom: var(--sp-xl); }

.mono { font-family: var(--font-mono); font-size: 13px; }

.muted { color: var(--ink-subtle); }
.tertiary { color: var(--ink-tertiary); }

/* overflow menu button */
.kebab {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--ink-tertiary);
  font-size: 16px;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.kebab:hover { background: var(--surface-3); color: var(--ink); }

/* ==========================================================================
   Server cards
   ========================================================================== */

.server-card { display: flex; flex-direction: column; gap: 10px; }

.server-top {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.server-name {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.1px;
}

.server-state {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-subtle);
}

.server-stats {
  display: flex;
  gap: var(--sp-md);
  font-size: 12px;
  color: var(--ink-subtle);
}

.server-stats strong { color: var(--ink-muted); font-weight: 500; }

.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  padding-top: 4px;
}

.sparkline i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: rgba(94, 106, 210, 0.55);
  min-height: 2px;
}

.server-card:hover .sparkline i { background: rgba(130, 143, 255, 0.7); }

.card-offline { opacity: 0.62; }
.card-offline .sparkline i { background: var(--surface-3); }

.warn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--warn);
  background: rgba(210, 160, 78, 0.08);
  border: 1px solid rgba(210, 160, 78, 0.25);
  border-radius: var(--r-xs);
  padding: 3px 8px;
}

/* ==========================================================================
   Task tiles
   ========================================================================== */

.task-tile { display: flex; flex-direction: column; gap: var(--sp-sm); }

.task-head { display: flex; align-items: flex-start; gap: var(--sp-xs); }

.task-event { font-size: 14.5px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; }
.task-venue { font-size: 12.5px; color: var(--ink-subtle); margin-top: 2px; }

.task-servers { display: flex; flex-direction: column; gap: 6px; }

.task-server-row {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.task-server-row .mono { color: var(--ink-muted); font-size: 12px; }
.task-server-row .threads { color: var(--ink-subtle); margin-left: auto; }

.meter {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--primary);
}

.stockmap {
  height: 84px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

.stockmap i {
  position: absolute;
  border-radius: var(--r-pill);
  filter: blur(1px);
}

.blob-ok { background: rgba(39, 166, 68, 0.5); }
.blob-accent { background: rgba(94, 106, 210, 0.55); }
.blob-warn { background: rgba(210, 160, 78, 0.45); }
.blob-dim { background: rgba(62, 62, 68, 0.8); }

.stockmap .stage {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 42%;
  height: 10px;
  border-radius: 3px;
  background: var(--surface-4);
  border: 1px solid var(--hairline-strong);
  filter: none;
}

.task-actions { display: flex; gap: var(--sp-xs); }

/* ==========================================================================
   Queue page
   ========================================================================== */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.stat-tile { padding: var(--sp-md); }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-subtle);
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.stat-value small {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-subtle);
  letter-spacing: 0;
}

.stat-accent { color: var(--primary-hover); }
.stat-bad { color: var(--danger); }

/* table */
.table-card { padding: 0; overflow: hidden; }

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 640px;
}

th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-1);
  white-space: nowrap;
}

td {
  padding: 9px var(--sp-md);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-muted);
  white-space: nowrap;
}

tbody tr { transition: background 0.1s ease; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

td.mono, th.num, td.num { font-family: var(--font-mono); font-size: 12.5px; }
th.num, td.num { text-align: right; }

.rank { color: var(--ink-tertiary); font-family: var(--font-mono); font-size: 12.5px; }
.delta-up { color: #4cc06a; }
.delta-flat { color: var(--ink-tertiary); }

/* sticky first column on horizontal scroll */
th:first-child, td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface-1);
  z-index: 1;
}

tbody tr:hover td:first-child { background: var(--surface-2); }

/* drain curve */
.chart-card { padding: var(--sp-md) var(--sp-md) var(--sp-sm); }

.chart-area {
  position: relative;
  height: 200px;
  margin: var(--sp-sm) 0 4px 44px;
  border-left: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
}

.chart-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(94, 106, 210, 0.22), rgba(94, 106, 210, 0.02));
  clip-path: polygon(0 4%, 12% 14%, 24% 30%, 38% 42%, 52% 58%, 66% 72%, 80% 84%, 100% 94%, 100% 100%, 0 100%);
}

.chart-line {
  position: absolute;
  inset: 0;
  background: var(--primary-hover);
  clip-path: polygon(0 4%, 12% 14%, 24% 30%, 38% 42%, 52% 58%, 66% 72%, 80% 84%, 100% 94%, 100% 95.5%, 80% 85.5%, 66% 73.5%, 52% 59.5%, 38% 43.5%, 24% 31.5%, 12% 15.5%, 0 5.5%);
  opacity: 0.9;
}

.chart-grid {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, var(--hairline) 0 1px, transparent 1px 50px);
  opacity: 0.5;
}

.axis-y {
  position: absolute;
  left: -44px;
  top: 0;
  bottom: 0;
  width: 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-tertiary);
  padding: 0 4px 0 0;
}

.axis-x {
  display: flex;
  justify-content: space-between;
  margin-left: 44px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-tertiary);
  padding-top: 6px;
}

.axis-title {
  font-size: 11.5px;
  color: var(--ink-subtle);
  text-align: center;
  margin-top: var(--sp-xs);
}

/* ==========================================================================
   Forms (create task)
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-md) var(--sp-lg);
}

.field-full { grid-column: 1 / -1; }

.form-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-xs);
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--hairline);
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-lg);
  background:
    radial-gradient(ellipse 60% 45% at 50% -8%, rgba(94, 106, 210, 0.13), transparent 70%),
    var(--canvas);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-xl);
}

.login-brand .brand-mark { width: 44px; height: 44px; font-size: 20px; border-radius: var(--r-md); }

.login-wordmark {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1.2;
}

.login-sub { font-size: 13px; color: var(--ink-subtle); margin-top: -6px; }

.login-card {
  width: 100%;
  max-width: 380px;
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.btn-lg { min-height: 44px; font-size: 14px; }

.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--ink-tertiary);
  font-size: 12px;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.login-foot {
  margin-top: var(--sp-lg);
  font-size: 12px;
  color: var(--ink-tertiary);
  text-align: center;
}

/* ==========================================================================
   Stub pages
   ========================================================================== */

.stub {
  padding: var(--sp-xxl) var(--sp-lg);
  text-align: center;
  color: var(--ink-subtle);
  font-size: 14px;
  border-style: dashed;
}

.stub .pill { margin-bottom: var(--sp-sm); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
  .app { display: block; }

  .mobile-bar { display: flex; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    max-width: 84vw;
    z-index: 60;
    transform: translateX(-104%);
    transition: transform 0.2s ease;
    border-right: 1px solid var(--hairline-strong);
    background: var(--surface-1);
    height: 100vh;
    height: 100dvh;
  }

  .nav-toggle:checked ~ .app .sidebar { transform: translateX(0); }

  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .nav-toggle:checked ~ .scrim { opacity: 1; pointer-events: auto; }

  .nav a { min-height: 44px; font-size: 14.5px; }

  .main { padding: var(--sp-md); max-width: none; }

  .page-head { row-gap: var(--sp-sm); }
  .search { flex: 1 1 100%; min-width: 0; order: 5; }

  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .kebab { width: 36px; height: 36px; }
  .input, .select { min-height: 44px; }
  .chip { min-height: 44px; padding: 8px 16px; }

  .grid-servers, .grid-carts, .grid-tasks { grid-template-columns: 1fr; }

  .stat-row { grid-template-columns: repeat(2, 1fr); }

  .cart-actions { flex-direction: row; }
  .task-actions .btn { flex: 1; }

  .page-title { font-size: 20px; }
}

@media (max-width: 480px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 20px; }
}

/* ==========================================================================
   Overlays — app additions (not in the mockup).
   Design rules from linear.app.DESIGN.md: depth via surface ladder +
   hairlines (no drop shadows); pure-black overlay scrim for modals.
   ========================================================================== */

/* kebab dropdown menu */
.menu-wrap { position: relative; }

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 210px;
  z-index: 30;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 4px;
  display: none;
}

.menu.open { display: block; }

.menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 36px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
}

.menu button:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.menu button:disabled { color: var(--ink-tertiary); cursor: not-allowed; }
.menu button.danger { color: var(--danger); }
.menu .menu-sep { height: 1px; margin: 4px 6px; background: var(--hairline); }

/* toasts */
.toast-stack {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink);
  pointer-events: auto;
}

.toast::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--success);
  flex-shrink: 0;
}

.toast-error { border-color: rgba(210, 94, 106, 0.5); }
.toast-error::before { background: var(--danger); }

/* modal dialogs */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.modal-title { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.modal-text { font-size: 13px; color: var(--ink-subtle); line-height: 1.55; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-xs);
  margin-top: var(--sp-xxs);
}

/* pairing-token reveal box */
.token-box {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 10px 12px;
  word-break: break-all;
  user-select: all;
}

/* full-width page notice (API unreachable / logged out / empty fleet) */
.page-notice { grid-column: 1 / -1; }

@media (max-width: 1023px) {
  .menu button { min-height: 44px; font-size: 14px; }
  .toast-stack { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   Server detail page (Phase 1 — server.html)
   ========================================================================== */

.server-card { cursor: pointer; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-subtle);
  text-decoration: none;
  margin-bottom: var(--sp-sm);
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.detail-meta {
  font-size: 12.5px;
  color: var(--ink-subtle);
  margin: -4px 0 var(--sp-lg);
}

.detail-stack { display: flex; flex-direction: column; gap: var(--sp-md); max-width: 1040px; }

/* card section header (title + badges + trailing note) */
.card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-sm);
}
.card-head h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; margin: 0; }
.card-note { font-size: 12px; color: var(--ink-subtle); line-height: 1.5; }
.flash-line { font-size: 12px; color: var(--ink-subtle); min-height: 18px; }
.flash-line.error { color: var(--danger); }

/* task catalog tiles */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--sp-xs);
}
.catalog-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.catalog-tile.is-running { border-color: rgba(39, 166, 68, 0.45); }
.catalog-tile-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  min-height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.tile-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

/* Bot / module / running chips — port of botChipHtml + moduleBadgeHtml +
   the running pill (app_control.html:12526/12559/16092), re-toned for the
   Linear dark palette. */
.chip-bot, .chip-mod, .chip-run {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--r-xs);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid;
}
.chip-encore { color: #93c5fd; background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.4); }
.chip-cartly { color: #86efac; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); }
.chip-us { color: #93c5fd; background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.4); }
.chip-ca { color: #fca5a5; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); }
.chip-run { color: #4cc06a; background: rgba(39, 166, 68, 0.1); border-color: rgba(39, 166, 68, 0.35); }

.stale-banner {
  font-size: 12px;
  color: var(--warn);
  background: rgba(210, 160, 78, 0.08);
  border: 1px solid rgba(210, 160, 78, 0.25);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  margin-bottom: var(--sp-sm);
}

/* process rows */
.proc-list { display: flex; flex-direction: column; }
.proc-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px 2px;
  border-bottom: 1px solid var(--hairline);
}
.proc-row:last-child { border-bottom: none; }
.proc-row.is-dup { background: rgba(210, 94, 106, 0.07); border-radius: var(--r-sm); padding-left: 8px; padding-right: 8px; }
.proc-pid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 84px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-muted);
}
.proc-main { flex: 1; min-width: 0; }
.proc-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.proc-chip {
  font-size: 10.5px;
  color: var(--ink-subtle);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.dup-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--danger);
}

/* jobs table extras */
.job-result {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-subtle);
}
.job-error { color: var(--danger); }

/* member access rows */
.access-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.access-row:last-child { border-bottom: none; }
.access-email { min-width: 160px; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.access-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-subtle);
  cursor: pointer;
  min-height: 32px;
}
.access-toggle input { accent-color: var(--primary); width: 15px; height: 15px; }
.access-toggle input:disabled + span { color: var(--ink-tertiary); }

@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .catalog-tile-name { min-height: 0; }
  .proc-pid { flex-basis: 60px; }
  .detail-stack .page-head { flex-wrap: wrap; }
}

/* ==========================================================================
   Task Creator (Phase 2a — create-task.html)
   Split pane: venue map (left) + tools panel (right). Map-layer styles
   (.section-path states, transform-origin) are ports of the current UI
   (static/output.css:1030–1061); everything else re-skins the tab-task
   panel (app_control.html:4945–5122) with the Linear tokens above.
   ========================================================================== */

.tc-split {
  display: flex;
  gap: var(--sp-md);
  height: calc(100vh - 150px);
  min-height: 480px;
}

/* map pane */
.tc-map-card { flex: 1; min-width: 0; padding: 0; overflow: hidden; display: flex; position: relative; }

.tc-map {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-map.grabbing { cursor: grabbing; }

#mapOverlay {
  width: 100%;
  height: 100%;
  transform-origin: top left;
  shape-rendering: crispEdges;
}

.section-path {
  fill: rgba(59, 130, 246, 0.15);
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 6;
  cursor: pointer;
  transition: all 0.15s ease;
}

.section-path:hover {
  fill: rgba(132, 245, 71, 0.25);
  stroke: rgba(255, 255, 255, 0.9);
}

.section-path.selected {
  fill: rgba(235, 52, 52, 1) !important;
  stroke: #ffffff !important;
}

.tc-map-controls {
  position: absolute;
  top: var(--sp-sm);
  left: var(--sp-sm);
  z-index: 10;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(15, 16, 17, 0.88);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
}

.tc-map-controls .btn { width: 34px; padding: 0; }

.tc-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  font-size: 14px;
  color: var(--ink-muted);
  background: rgba(1, 1, 2, 0.45);
}

.tc-loading.show { display: flex; }

/* collapse handle on the map card's right edge (port of #panel-toggle-btn) */
.tc-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 20px;
  height: 48px;
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-subtle);
  transition: background 0.15s ease, color 0.15s ease;
}

.tc-toggle:hover { background: var(--surface-4); color: var(--ink); }
.tc-toggle svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s ease; }
.tc-toggle.collapsed svg { transform: rotate(180deg); }

/* tools panel */
.tc-panel {
  width: 380px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.tc-panel.collapsed { display: none; }

.tc-block { display: flex; flex-direction: column; gap: var(--sp-sm); }

.tc-block-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tc-block-title .dot { width: 8px; height: 8px; }
.dot-regex { background: #c084fc; }
.dot-encore { background: var(--primary-hover); }

.tc-row { display: flex; gap: var(--sp-xs); align-items: center; }
.tc-row .input { flex: 1; min-width: 0; }

.tc-selection-label { flex: 1; font-size: 12px; color: var(--ink-tertiary); font-style: italic; min-width: 0; }
.tc-selection-label.has-selection { color: var(--ink); font-style: normal; }

.tc-field-error { font-size: 12px; color: var(--danger); }

/* copy-target inputs flash on copy */
.input.copy-flash { background: var(--surface-3); }

/* regex group rows */
.tc-groups { display: flex; flex-direction: column; gap: var(--sp-xs); }

.tc-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xs);
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.12s ease;
}

.tc-group-row:hover { border-color: #c084fc99; }
.tc-group-row.active { border-color: #c084fc; }

.tc-group-main { min-width: 0; }
.tc-group-price { font-size: 13px; font-weight: 600; }
.tc-group-sections {
  font-size: 12px;
  color: var(--ink-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.tc-group-remove {
  border: none;
  background: transparent;
  color: var(--ink-tertiary);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.tc-group-remove:hover { color: var(--danger); background: var(--surface-3); }

.tc-hint { font-size: 12px; color: var(--ink-tertiary); }

@media (max-width: 1023px) {
  /* stack map above panel — port of the current phone layout
     (app_control.html:1849–1863: map 42vh, panel scrolls below) */
  .tc-split { flex-direction: column; height: auto; min-height: 0; }
  .tc-map-card { height: 42vh; min-height: 260px; flex: none; }
  .tc-panel { width: 100%; }
  .tc-toggle { display: none; }
  .tc-group-sections { max-width: 55vw; }
  .tc-map-controls .btn { width: 44px; }
}

/* ==========================================================================
   Tasks page (Phase 2b — tasks.html)
   Task tiles + event-meta block (task-tile2, app_control.html:667–765),
   Tasks/Processes sub-tabs (535–548), process cards + live stock-map
   previews (551–664), create-from-batch modal rows (20903–20918), and the
   task-detail overlay (fields port of the task editor's core set + the
   shared venue-map renderer). All re-toned with the Linear tokens.
   ========================================================================== */

.tk-server-tabs { margin-bottom: var(--sp-md); overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
.tk-server-tabs .chip { flex: none; }

/* sub-tabs (Tasks / Processes) */
.tk-subtabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--sp-md);
}
.tk-subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-subtle);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.tk-subtab:hover { color: var(--ink); }
.tk-subtab.is-active { color: var(--primary-hover); border-bottom-color: var(--primary-hover); }
.tk-subtab-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}

/* search */
.tk-search { position: relative; margin-bottom: var(--sp-sm); }
.tk-search .input { width: 100%; padding-right: 36px; }
.tk-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--ink-subtle);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 12px;
}
.tk-search-clear:hover { color: var(--ink); }

/* task tiles */
.tk-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-sm);
  align-items: stretch;
}
.tk-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.tk-tile.is-running { border-color: rgba(39, 166, 68, 0.45); }
.tk-tile-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tk-accounts {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--r-xs);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--warn);
  background: rgba(210, 160, 78, 0.10);
  border: 1px solid rgba(210, 160, 78, 0.32);
}
.tk-tile-titlerow { display: flex; align-items: flex-start; gap: 10px; }
.tk-tile-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
.tk-tile-tools { display: flex; align-items: center; gap: 8px; flex: none; padding-top: 1px; }
.tk-tool {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--r-xs);
}
.tk-tool-dup { color: #c084fc; }
.tk-tool-dup:hover { color: #d8b4fe; }
.tk-icon-btn {
  background: transparent;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  position: relative;
  border-radius: var(--r-xs);
}
.tk-icon-btn::after { content: ""; position: absolute; inset: -8px; } /* touch target */
.tk-icon-btn:hover { color: var(--ink); }
.tk-tool-del:hover { color: var(--danger); }

.tk-batch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-subtle);
  min-width: 0;
}
.tk-batch span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-wk-badge {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
.tk-wk-0  { color: var(--ink-tertiary); background: var(--surface-3); }
.tk-wk-lo { color: #67e8f9; background: rgba(34, 211, 238, 0.12); }
.tk-wk-hi { color: #67e8f9; background: rgba(34, 211, 238, 0.24); }
.tk-acct-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  color: var(--ink-subtle);
  background: var(--surface-3);
  font-variant-numeric: tabular-nums;
}

/* event block on a tile */
.tk-event {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
}
.tk-event-name { font-size: 12.5px; font-weight: 600; text-wrap: balance; }
.tk-event-meta { font-size: 11.5px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.tk-event-id {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-subtle);
}
.tk-event-id .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.tk-event-id .tk-icon-btn { color: rgba(94, 106, 210, 0.75); }
.tk-event-id .tk-icon-btn:hover { color: var(--primary-hover); }

.tk-modified {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.tk-tile-actions { display: flex; align-items: stretch; gap: 8px; margin-top: auto; }
.tk-tile-actions .tk-edit { flex: 1; }
.tk-tile-actions .tk-run { flex: 0 0 104px; }

/* process cards (Processes sub-tab) */
.tk-proc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-sm);
}
.tk-proc-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
}
.tk-proc-card.is-dup { border-color: rgba(210, 94, 106, 0.55); }
.tk-dup-tag { font-size: 10px; font-weight: 700; color: var(--danger); }
.tk-proc-body { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 10px 12px 8px; }
.tk-proc-titlerow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-proc-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-proc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tk-proc-chips[hidden] { display: none; }
/* Scoped to .tk-proc-chips so the Phase 1 .proc-chip (server.html pill
   chips inside .proc-chips) keeps its own look — QA fix for a cross-phase
   class collision. */
.tk-proc-chips .proc-chip {
  font-size: 10.5px;
  color: var(--ink-subtle);
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.tk-proc-meta { display: flex; gap: 10px; font-size: 11px; color: var(--ink-tertiary); font-variant-numeric: tabular-nums; }
.tk-proc-actions { display: flex; gap: 8px; padding: 0 12px 12px; }
.tk-proc-actions .btn { flex: 1; }

/* live stock-map preview box — the venue SVG background is white regardless
   of theme (same as the current UI's proc-card-map, app_control.html:589) */
.tk-proc-map {
  position: relative;
  height: 130px;
  background: #ffffff;
  border-bottom: 1px solid var(--hairline);
}
.tk-proc-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tk-proc-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #94a3b8;
}
.tk-proc-avail {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.tk-proc-open {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #000000;
  background: #fbbf24;
  border-radius: var(--r-pill);
  padding: 2px 8px;
  text-decoration: none;
}
.tk-proc-open::after { content: ""; position: absolute; inset: -6px; } /* 40px hit area */
.tk-proc-open:hover { background: #fcd34d; }

/* create-from-batch modal */
.tk-cfb-modal { max-width: 480px; }
.tk-cfb-list {
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.tk-cfb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s;
}
.tk-cfb-row:last-child { border-bottom: none; }
.tk-cfb-row:hover { background: var(--surface-3); }
.tk-cfb-row.is-selected { background: rgba(94, 106, 210, 0.16); }
.tk-cfb-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-cfb-empty { padding: 10px 12px; font-size: 12.5px; color: var(--ink-tertiary); }
.tk-cfb-note {
  font-size: 12.5px;
  border-radius: var(--r-sm);
  padding: 8px 10px;
  border: 1px solid;
}
.tk-cfb-error   { color: var(--danger); background: rgba(210, 94, 106, 0.10); border-color: rgba(210, 94, 106, 0.30); }
.tk-cfb-info    { color: var(--primary-hover); background: rgba(94, 106, 210, 0.10); border-color: rgba(94, 106, 210, 0.30); }
.tk-cfb-success { color: #4cc06a; background: rgba(39, 166, 68, 0.10); border-color: rgba(39, 166, 68, 0.30); }

.tk-suffix-wrap { position: relative; }
.tk-suffix-wrap .input { width: 100%; padding-right: 52px; }
.tk-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-tertiary);
  font-size: 12px;
  font-family: var(--font-mono);
  pointer-events: none;
}

/* task-detail overlay (fields + venue map) */
.tk-detail-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-md);
}
.tk-detail-scrim[hidden] { display: none; }
.tk-detail {
  width: min(1180px, 100%);
  height: min(760px, 100%);
  background: var(--canvas);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tk-detail-head {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--hairline);
}
.tk-detail-title { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.tk-detail-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-md);
}
.tk-detail-map { flex: 1; min-width: 0; }
.tk-detail-fields {
  width: 300px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.tk-detail-note { font-size: 12px; color: var(--ink-subtle); min-height: 16px; }
.tk-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--sp-xs); }

@media (max-width: 1023px) {
  .tk-tile-grid { grid-template-columns: 1fr; }
  .tk-proc-grid { grid-template-columns: 1fr; }
  .tk-tile-actions .tk-run { flex: 0 0 96px; }
  .tk-detail-scrim { padding: 0; }
  .tk-detail { width: 100%; height: 100%; border-radius: 0; border: none; }
  .tk-detail-body { flex-direction: column; overflow-y: auto; }
  .tk-detail-map { height: 42vh; min-height: 240px; flex: none; }
  .tk-detail-fields { width: 100%; overflow: visible; }
}

@media (min-width: 1024px) and (max-width: 1440px) {
  .tk-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Carts page (carts.html) — port of app_control.html #tab-carts.
   One section, appended per redesign convention.
   ========================================================================== */

/* view tabs (Live / Processing / Success / Errors / Rejected) */
.ct-tabs { display: flex; gap: var(--sp-xs); flex-wrap: wrap; }
.ct-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; min-height: 32px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--ink-subtle); background: var(--canvas);
  border: 1px solid var(--hairline); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.ct-tab:hover { color: var(--ink-muted); border-color: var(--hairline-strong); }
.ct-tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ct-tab-count {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 400;
  padding: 0 7px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-subtle);
}
.ct-tab[aria-selected="true"] .ct-tab-count { background: rgba(255, 255, 255, 0.18); color: var(--on-primary); }

/* layout: channels sidebar + main grid */
.ct-layout { display: flex; gap: var(--sp-lg); align-items: flex-start; }
.ct-side {
  width: 232px; flex-shrink: 0;
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: var(--sp-sm);
  position: sticky; top: var(--sp-md);
}
.ct-side-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--ink-tertiary); padding: 2px 4px 10px 4px;
}
.ct-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--r-sm);
  border: none; background: transparent; color: var(--ink-subtle); cursor: pointer;
}
.ct-icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.ct-icon-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ct-chan-list { display: flex; flex-direction: column; gap: 2px; }
.ct-chan {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 7px 10px; border-radius: var(--r-md);
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--ink-subtle); text-align: left;
}
.ct-chan:hover { background: var(--surface-2); color: var(--ink-muted); }
.ct-chan[aria-selected="true"] { background: var(--surface-3); color: var(--ink); }
.ct-chan-name { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ct-chan-name .hash { color: var(--ink-tertiary); }
.ct-chan-count {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 11px;
  padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-subtle);
}
.ct-chan[aria-selected="true"] .ct-chan-count { background: rgba(94, 106, 210, 0.25); color: var(--primary-hover); }
.ct-side-empty { font-size: 12.5px; color: var(--ink-tertiary); padding: 6px 4px; line-height: 1.5; }

.ct-main { flex: 1; min-width: 0; }
.ct-main-head { display: flex; align-items: baseline; gap: var(--sp-sm); margin-bottom: var(--sp-sm); flex-wrap: wrap; }
.ct-main-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.ct-main-meta { font-size: 12.5px; color: var(--ink-subtle); }

/* filter bar */
.ct-filterbar {
  display: flex; flex-wrap: wrap; gap: var(--sp-xs) var(--sp-sm); align-items: center;
  padding: 10px 12px; margin-bottom: var(--sp-sm);
  background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-md);
}
.ct-fgroup { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-subtle); }
.ct-finput {
  background: var(--canvas); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: 12.5px;
  padding: 4px 8px; min-height: 28px; width: 130px;
}
.ct-finput[type="number"] { width: 72px; }
.ct-finput:hover { border-color: var(--hairline-strong); }
.ct-fsep { color: var(--ink-tertiary); }
.ct-fclear {
  margin-left: auto; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--ink-subtle);
  padding: 4px 8px; border-radius: var(--r-sm);
}
.ct-fclear:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.ct-fclear:disabled { color: var(--ink-tertiary); cursor: not-allowed; opacity: 0.6; }
/* multi-select dropdown (event-date filter) */
.ct-multi { position: relative; }
.ct-multi-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; width: auto; min-width: 130px; justify-content: space-between; }
.ct-multi-label[data-empty="true"] { color: var(--ink-tertiary); }
.ct-multi-menu {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 40;
  min-width: 220px; max-height: 260px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md); padding: 6px;
}
.ct-multi-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--ink-muted); cursor: pointer; }
.ct-multi-opt:hover { background: var(--surface-3); }
.ct-multi-empty { font-size: 12px; color: var(--ink-tertiary); padding: 8px; }

/* history sub-tabs (Today / Yesterday / All) + export */
.ct-hist { display: flex; align-items: center; gap: var(--sp-xs); margin-bottom: var(--sp-sm); flex-wrap: wrap; }
.ct-hist-tab {
  border: 1px solid var(--hairline); background: var(--canvas); cursor: pointer;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--ink-subtle);
  padding: 4px 12px; min-height: 28px; border-radius: var(--r-pill);
}
.ct-hist-tab:hover { color: var(--ink-muted); border-color: var(--hairline-strong); }
.ct-hist-tab[aria-selected="true"] { background: var(--surface-3); color: var(--ink); border-color: var(--hairline-strong); }
.ct-export {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hairline); background: var(--surface-1); cursor: pointer;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--ink-muted);
  padding: 4px 12px; min-height: 28px; border-radius: var(--r-md);
}
.ct-export:hover { border-color: var(--hairline-strong); color: var(--ink); }

/* success sub-view toggle (Carts | Totals) */
.ct-subview { display: inline-flex; gap: 2px; padding: 2px; margin-bottom: var(--sp-sm); background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.ct-subview-tab {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; color: var(--ink-subtle);
  padding: 4px 14px; min-height: 26px; border-radius: var(--r-sm);
}
.ct-subview-tab[aria-selected="true"] { background: var(--surface-3); color: var(--ink); }

/* pager */
.ct-pager { display: flex; align-items: center; gap: var(--sp-xs); margin-bottom: var(--sp-sm); }
.ct-pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  border: 1px solid var(--hairline); background: var(--surface-1);
  color: var(--ink-muted); font-size: 15px; cursor: pointer;
}
.ct-pager-btn:hover:not(:disabled) { border-color: var(--hairline-strong); color: var(--ink); }
.ct-pager-btn:disabled { color: var(--ink-tertiary); cursor: not-allowed; opacity: 0.5; }
.ct-pager-info { font-size: 12.5px; color: var(--ink-subtle); font-family: var(--font-mono); }

/* cart grid + cards */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: var(--sp-md); }
.ct-empty { grid-column: 1 / -1; font-size: 13px; color: var(--ink-subtle); padding: var(--sp-lg); text-align: center; background: var(--surface-1); border: 1px dashed var(--hairline); border-radius: var(--r-lg); }
.cart-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: var(--sp-md);
  display: flex; flex-direction: column; gap: var(--sp-xs);
}
.cart-card-top { display: flex; gap: var(--sp-sm); justify-content: space-between; }
.cart-card-main { min-width: 0; flex: 1; }
.cart-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cart-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cart-event { font-size: 14.5px; font-weight: 600; letter-spacing: -0.2px; color: var(--ink); }
.cart-venue { font-size: 12.5px; color: var(--ink-subtle); margin-top: 1px; }
.cart-venue .sep { margin: 0 5px; color: var(--ink-tertiary); }
.cart-meta { font-size: 13px; color: var(--ink-muted); margin-top: 3px; }
.cart-meta strong { color: var(--ink); font-weight: 600; }
.cart-seats { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.cart-seats strong { color: var(--ink); }
.cart-price { font-size: 13px; color: var(--ink-muted); font-family: var(--font-mono); margin-top: 4px; }

/* status badges — same class buckets as CART_STATUS_BADGE */
.cbadge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap;
}
.cbadge-grey   { background: var(--surface-3); color: var(--ink-subtle); border: 1px solid var(--hairline-strong); }
.cbadge-blue   { background: rgba(94, 106, 210, 0.14); color: var(--primary-hover); border: 1px solid rgba(94, 106, 210, 0.35); }
.cbadge-amber  { background: rgba(210, 160, 78, 0.12); color: var(--warn); border: 1px solid rgba(210, 160, 78, 0.32); }
.cbadge-indigo { background: rgba(130, 143, 255, 0.14); color: #a5aeff; border: 1px solid rgba(130, 143, 255, 0.35); }
.cbadge-green  { background: rgba(39, 166, 68, 0.12); color: #4cc06a; border: 1px solid rgba(39, 166, 68, 0.32); }
.cbadge-red    { background: rgba(210, 94, 106, 0.12); color: var(--danger); border: 1px solid rgba(210, 94, 106, 0.35); }
.cart-window-pill { font-size: 11px; font-weight: 500; color: var(--ink-subtle); }
.cart-window-pill.dead { color: var(--danger); }
.cart-chan-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-subtle); }

/* seat-map thumbnail (server-rendered PNG) */
.cart-thumb-btn {
  width: 112px; height: 112px; padding: 0; overflow: hidden;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: #ffffff; cursor: zoom-in;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.cart-thumb-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.cart-thumb { display: block; width: 100%; height: 100%; object-fit: fill; background: #ffffff; }

/* account credential rows (email / password + copy) */
.cart-cred { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; }
.cart-cred-label { color: var(--ink-tertiary); width: 62px; flex-shrink: 0; }
.cart-cred-value { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-xs); padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cart-cred-copy {
  border: 1px solid var(--hairline); background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 11px; font-weight: 500; color: var(--ink-subtle);
  padding: 1px 8px; border-radius: var(--r-xs); flex-shrink: 0;
}
.cart-cred-copy:hover { color: var(--ink); border-color: var(--hairline-strong); }
.cart-cred-copy.copied { color: #4cc06a; border-color: rgba(39, 166, 68, 0.4); }

/* per-tile live stock line */
.cart-stock { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--ink-subtle); min-height: 16px; flex-wrap: wrap; }
.cart-stock-na { color: var(--ink-tertiary); }
.cart-stock-main strong { color: var(--ink); font-family: var(--font-mono); }
.cart-stock-main.zero strong { color: var(--danger); }
.cart-stock-alt { color: var(--ink-tertiary); font-family: var(--font-mono); font-size: 11.5px; }

/* Discord note + field pills */
.cart-desc { font-size: 12.5px; color: var(--ink-subtle); background: var(--surface-2); border-left: 2px solid var(--hairline-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 5px 10px; }
.cart-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cart-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--hairline); color: var(--ink-tertiary); }
.cart-pill.ok { color: #4cc06a; border-color: rgba(39, 166, 68, 0.32); background: rgba(39, 166, 68, 0.08); }

/* success-card extras */
.cart-success-meta { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.cart-success-meta strong { color: var(--ink); }

/* footer: timer + actions */
.cart-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-xs); border-top: 1px solid var(--hairline); padding-top: var(--sp-xs); margin-top: 2px; flex-wrap: wrap; }
.cart-ts { font-size: 11.5px; color: var(--ink-tertiary); }
.cart-expiry-ok { color: var(--ink-subtle); }
.cart-expiry-warn { color: var(--warn); }
.cart-expiry-urgent { color: var(--danger); font-weight: 600; }
.cart-expiry-expired { color: var(--danger); }
.cart-actor { color: var(--ink-tertiary); }
.cart-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cart-btn {
  border: 1px solid var(--hairline); background: var(--surface-2); cursor: pointer;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--ink-muted);
  padding: 3px 11px; min-height: 26px; border-radius: var(--r-sm);
}
.cart-btn:hover:not(:disabled) { border-color: var(--hairline-strong); color: var(--ink); }
.cart-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cart-btn-approve { background: rgba(39, 166, 68, 0.14); border-color: rgba(39, 166, 68, 0.4); color: #4cc06a; }
.cart-btn-approve:hover:not(:disabled) { background: rgba(39, 166, 68, 0.24); color: #6fdb8b; }
.cart-btn-reject { background: rgba(210, 94, 106, 0.12); border-color: rgba(210, 94, 106, 0.4); color: var(--danger); }
.cart-btn-reject:hover:not(:disabled) { background: rgba(210, 94, 106, 0.22); }
.cart-btn-relaunch { font-size: 14px; line-height: 1; }

/* totals rollup (Success → Totals) */
.ct-totals-controls { margin-bottom: var(--sp-sm); display: flex; gap: var(--sp-xs); align-items: center; font-size: 12.5px; color: var(--ink-subtle); }
.ct-totals-controls .select { width: auto; min-width: 180px; min-height: 30px; padding: 4px 30px 4px 10px; font-size: 12.5px; }
.ct-totals-group { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--r-lg); margin-bottom: var(--sp-md); overflow: hidden; }
.ct-totals-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-md); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.ct-totals-event { font-size: 14px; font-weight: 600; color: var(--ink); }
.ct-totals-sub { font-size: 12px; color: var(--ink-subtle); margin-top: 1px; }
.ct-totals-grand { display: flex; gap: var(--sp-sm); align-items: baseline; }
.ct-totals-grand-seats { font-size: 12.5px; color: var(--ink-subtle); }
.ct-totals-grand-total { font-size: 14px; font-weight: 600; font-family: var(--font-mono); color: #4cc06a; }
.ct-totals-group table { min-width: 0; }
.ct-totals-group th:first-child, .ct-totals-group td:first-child { position: static; }

/* modals (logs / map / manage channels / helpers) */
.cmodal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: var(--sp-md); }
.cmodal[hidden] { display: none; }
.cmodal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.cmodal-dialog {
  position: relative; width: 100%; max-width: 660px; max-height: min(84vh, 760px);
  background: var(--surface-1); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden;
}
.cmodal-dialog.wide { max-width: 780px; }
.cmodal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-md); border-bottom: 1px solid var(--hairline); }
.cmodal-head h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmodal-body { padding: var(--sp-md); overflow-y: auto; }
.cmodal-tabs { display: flex; gap: 2px; padding: 6px var(--sp-md) 0; border-bottom: 1px solid var(--hairline); }
.cmodal-tab {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink-subtle);
  padding: 8px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cmodal-tab[aria-selected="true"] { color: var(--primary-hover); border-bottom-color: var(--primary-hover); }
.cmodal-hint { font-size: 12.5px; color: var(--ink-subtle); line-height: 1.55; margin-bottom: var(--sp-sm); }
.cmodal-empty { font-size: 12.5px; color: var(--ink-tertiary); padding: var(--sp-sm) 0; }
.cmodal-h4 { font-size: 13px; font-weight: 600; color: var(--ink); margin: var(--sp-md) 0 6px; }
.cmodal-h4:first-child { margin-top: 0; }

/* logs modal rows */
.cart-log-row { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--hairline); font-size: 12px; align-items: baseline; }
.cart-log-row:last-child { border-bottom: none; }
.cart-log-ts { font-family: var(--font-mono); font-size: 11px; color: var(--ink-tertiary); flex-shrink: 0; }
.cart-log-evt { color: var(--ink-muted); font-weight: 500; flex-shrink: 0; }
.cart-log-msg { color: var(--ink-subtle); word-break: break-word; min-width: 0; }
.cart-log-error .cart-log-evt, .cart-log-error .cart-log-msg { color: var(--danger); }
.cart-log-warn .cart-log-evt, .cart-log-warn .cart-log-msg { color: var(--warn); }

/* map modal */
.cart-map-image { display: block; width: 100%; max-width: 720px; margin: 0 auto; border-radius: var(--r-md); background: #ffffff; }
.cart-map-caption { font-size: 12.5px; color: var(--ink-subtle); text-align: center; margin-top: var(--sp-xs); line-height: 1.5; }
.cart-map-caption strong { color: var(--ink); }

/* manage-channels modal */
.ct-guild { border: 1px solid var(--hairline); border-radius: var(--r-md); margin-bottom: var(--sp-sm); overflow: hidden; }
.ct-guild-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.ct-guild-meta { font-weight: 400; font-size: 11.5px; color: var(--ink-tertiary); }
.ct-chan-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12.5px; color: var(--ink-muted); cursor: pointer; border-top: 1px solid var(--hairline); }
.ct-chan-row:hover { background: var(--surface-2); }
.ct-chan-row .count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-tertiary); }
.ct-access-scroll { overflow-x: auto; }
.ct-role { display: inline-block; margin-left: 6px; font-size: 10.5px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-subtle); }

/* helpers modal small controls */
.ct-mint-row { display: flex; gap: var(--sp-xs); align-items: center; margin: 6px 0; }
.ct-mint-row .input { flex: 1; }
.ct-token { font-family: var(--font-mono); font-size: 11px; user-select: all; word-break: break-all; }
.ct-dl-row { display: flex; gap: var(--sp-xs); flex-wrap: wrap; margin: 6px 0 var(--sp-sm); }
.ct-steps { margin: 0 0 var(--sp-sm) 18px; padding: 0; color: var(--ink-muted); font-size: 12.5px; line-height: 1.7; }
.ct-err { color: var(--danger); font-size: 12.5px; margin-top: 6px; }

/* responsive — mobile 390px is a requirement, not an afterthought */
@media (max-width: 1023px) {
  .ct-layout { flex-direction: column; }
  .ct-side { position: static; width: 100%; }
  .ct-chan-list { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .ct-chan { flex: 0 0 auto; }
  .ct-grid { grid-template-columns: 1fr; }
  .ct-finput { width: 110px; }
  .cmodal { padding: 0; }
  .cmodal-dialog, .cmodal-dialog.wide { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: none; }
}
@media (max-width: 430px) {
  .cart-card-top { flex-direction: column; }
  .cart-card-right { flex-direction: row-reverse; align-items: flex-start; justify-content: space-between; width: 100%; }
  .cart-badges { align-items: flex-start; }
  .cart-thumb-btn { width: 96px; height: 96px; }
  .ct-fclear { margin-left: 0; }
}

/* ==========================================================================
   Accounts / Batches / Ratings (Phase 4) — ports of app_control.html
   #tab-accounts (5434–5513), #tab-batches (5516–5537), #tab-ratings
   (5672–5732). The old .acct-* / .batch-* stylesheet re-toned to Linear.
   ========================================================================== */

/* filter toolbar (acct-filter-bar) */
.au-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-md);
}
.au-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-subtle);
  white-space: nowrap;
}
.au-filter .select { width: auto; min-width: 150px; min-height: 32px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
.au-date { width: 140px; min-height: 32px; padding: 5px 10px; font-size: 13px; color-scheme: dark; }

.au-status { font-size: 12.5px; color: var(--ink-subtle); margin-bottom: var(--sp-sm); min-height: 18px; }

/* rank badges (acct-rank; r1/r2/r3 = gold/silver/bronze) */
.au-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-subtle);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}
.au-rank.r1 { color: #e5b84b; background: rgba(229, 184, 75, 0.12); border-color: rgba(229, 184, 75, 0.35); }
.au-rank.r2 { color: #c3c9d4; background: rgba(195, 201, 212, 0.10); border-color: rgba(195, 201, 212, 0.30); }
.au-rank.r3 { color: #d1936a; background: rgba(209, 147, 106, 0.12); border-color: rgba(209, 147, 106, 0.32); }

.au-email { color: var(--ink); }
.au-strong { color: var(--ink); font-weight: 600; }
.au-muted { color: var(--ink-tertiary); }
.au-running { color: #4cc06a; }

/* clickable leaderboard rows + expand chevron */
.au-click { cursor: pointer; }
.au-chevron {
  display: inline-block;
  margin-right: 8px;
  color: var(--ink-tertiary);
  font-weight: 600;
  transition: transform 0.12s ease;
}
.au-open .au-chevron { transform: rotate(90deg); }
.au-open td { background: var(--surface-2); }

/* drill-down detail row (acct-detail) */
.au-detail-row td { background: var(--surface-2); white-space: normal; }
.au-detail { padding: 4px 2px; font-size: 12.5px; color: var(--ink-subtle); }
.au-detail-table { min-width: 0; width: 100%; }
.au-detail-table th { background: transparent; position: static; font-size: 10.5px; padding: 6px 10px; }
.au-detail-table td { padding: 6px 10px; border-bottom: 1px solid var(--hairline); background: transparent; position: static; }
.au-detail-table tr:last-child td { border-bottom: none; }
.au-detail-csv { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }

/* batch chips (batch-chip) */
.au-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--primary-hover);
  background: rgba(94, 106, 210, 0.12);
  border: 1px solid rgba(94, 106, 210, 0.32);
  white-space: nowrap;
}
.au-chip-x {
  background: transparent;
  border: none;
  color: var(--primary-hover);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 1px;
}
.au-chip-x:hover { color: var(--danger); }

/* pager (acct-pager) */
.au-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-xs);
  margin-top: var(--sp-sm);
}
.au-pager-info { font-size: 12.5px; color: var(--ink-subtle); margin-right: var(--sp-xs); font-variant-numeric: tabular-nums; }

/* empty states (acct-empty) */
.au-empty { padding: var(--sp-xl) var(--sp-md); text-align: center; white-space: normal; }
.au-empty-title { font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.au-empty-sub { font-size: 12.5px; color: var(--ink-tertiary); margin-top: 4px; line-height: 1.5; }

/* Batches page: collapsible server cards (batch-server-card) */
.bt-card { padding: 0; overflow: hidden; margin-bottom: var(--sp-sm); }
.bt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  width: 100%;
  padding: 12px var(--sp-md);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.bt-head:hover { background: var(--surface-2); }
.bt-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.bt-caret { color: var(--ink-tertiary); font-weight: 600; transition: transform 0.12s ease; }
.bt-open .bt-caret { transform: rotate(90deg); }
.bt-count { font-size: 12px; font-weight: 400; flex-shrink: 0; }
.bt-body { display: none; border-top: 1px solid var(--hairline); padding: var(--sp-sm) var(--sp-md) var(--sp-md); }
.bt-open .bt-body { display: block; }
.bt-content .table-scroll { border: 1px solid var(--hairline); border-radius: var(--r-md); }
.bt-msg { padding: var(--sp-sm) 2px; font-size: 12.5px; }
.bt-save-row { display: flex; justify-content: flex-end; margin-top: var(--sp-sm); }
.bt-hist-toggle { margin-top: var(--sp-sm); }
.bt-hist-toggle + .table-scroll { margin-top: var(--sp-xs); }
.bt-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-subtle);
  text-decoration: underline;
  padding: 0;
}
.bt-link:hover { color: var(--ink); }
.bt-designate { display: inline-flex; align-items: center; gap: 8px; }
.bt-designate input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.bt-name-input { width: 180px; min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.bt-lastrun { font-size: 11.5px; }

/* responsive — 390px */
@media (max-width: 767px) {
  .au-toolbar { gap: var(--sp-xs); }
  .au-toolbar .spacer { display: none; }
  .au-filter { flex: 1 1 100%; justify-content: space-between; }
  .au-filter .select { flex: 1; min-width: 0; }
  .au-date { flex: 1; width: auto; }
  .bt-name-input { width: 130px; }
}

/* ==========================================================================
   Run Drop / Presales / Presale Batches / Queue (Phase 5) — ports of
   app_control.html #tab-drop (5540–5551), #tab-presales (5553–5580),
   #tab-presale-batches (5582–5594), #tab-queue (5596–5669), the presale
   create modal (20952–20996) and the Run Drop modal (21009–21097),
   re-toned to Linear.
   ========================================================================== */

/* .modal-scrim declares display:flex, which beats the UA [hidden] rule —
   static scrims (cfbScrim on tasks.html, psLabelScrim on presales.html)
   toggle via the hidden attribute and need this. */
.modal-scrim[hidden] { display: none; }
.chip-row[hidden] { display: none; }   /* group-chip rows toggled via hidden */
.au-toolbar[hidden] { display: none; } /* queue batch-filter row */

/* every venue-map overlay (rdMapOverlay, psMapOverlay, tdMapOverlay) needs
   the same sizing + top-left transform origin createVenueView assumes —
   #mapOverlay (create-task.html) already declares it for itself. */
.tc-map > svg {
  width: 100%;
  height: 100%;
  transform-origin: top left;
  shape-rendering: crispEdges;
}

/* pool checkbox column (drop.html / presale-batches.html) */
.pool-col { width: 110px; text-align: center; }
td.pool-col { text-align: center; }
.pool-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--success, #10b981); }
.pool-check-presale { accent-color: #8b5cf6; }

/* ── queue ── */
.q-clickable { cursor: pointer; }
.q-clickable:hover td { background: var(--surface-2); }
.q-flag { color: #e5a13b; cursor: help; }
.qo-chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.qo-ok   { color: #34d399; background: rgba(52, 211, 153, 0.10); }
.qo-bad  { color: #f87171; background: rgba(248, 113, 113, 0.10); }
.qo-warn { color: #e5a13b; background: rgba(229, 161, 59, 0.10); }
.qo-run  { color: #7c8aef; background: rgba(124, 138, 239, 0.10); }
.qo-mut  { color: var(--ink-subtle); background: var(--surface-2); }
.q-detail-text { font-size: 12px; line-height: 1.8; }
.q-detail-summary { margin-top: 6px; border-top: 1px dashed var(--hairline-strong); padding-top: 6px; }
.q-stat { margin-right: 16px; white-space: nowrap; }
.q-stat b { font-variant-numeric: tabular-nums; }

/* ── presales list ── */
.ps-date-head { font-weight: 700; font-size: 13.5px; color: var(--ink); margin: 14px 0 8px; }
.ps-hour-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: #a78bfa; margin: 8px 0 6px;
}
.ps-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 6px;
}
.ps-entry-main { flex: 1; min-width: 0; }
.ps-entry-name {
  font-weight: 600; font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ps-entry-meta {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px;
  font-size: 11.5px; color: var(--ink-tertiary);
}
.ps-del { color: var(--danger); }
.ps-past summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--ink-subtle); margin-top: 18px; }

/* ── modal shells (presale create / copy picker / run drop) ── */
.ps-scrim {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 9, 12, 0.72); backdrop-filter: blur(4px);
  padding: 16px; box-sizing: border-box;
}
.ps-scrim[hidden] { display: none; }
.ps-scrim-top { z-index: 95; }
.ps-modal {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--r-lg, 12px); width: min(96vw, 1280px); max-height: 94vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.ps-modal-sm { width: min(460px, 100%); max-height: 70vh; }
.ps-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--hairline);
}
.ps-modal-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.ps-x {
  background: none; border: none; color: var(--ink-subtle);
  font-size: 15px; cursor: pointer; padding: 4px;
}
.ps-x:hover { color: var(--ink); }
.ps-notif {
  margin: 12px 20px 0; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.12);
  color: #f87171; font-size: 12.5px;
}
.ps-notif-success { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.10); color: #34d399; }
.ps-notif-info { border-color: rgba(124, 138, 239, 0.4); background: rgba(124, 138, 239, 0.10); color: #7c8aef; }
.ps-server-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 20px 4px; }
.ps-rowlist { flex: 1; overflow-y: auto; padding: 10px 20px; display: flex; flex-direction: column; gap: 8px; }
.ps-addrow-wrap { padding: 0 20px 10px; }
.ps-addrow {
  width: 100%; background: none; border: 1px dashed var(--hairline-strong);
  color: var(--ink-subtle); border-radius: var(--r-md); padding: 8px 14px;
  font-size: 12.5px; cursor: pointer;
}
.ps-addrow:hover { color: var(--ink-muted); border-color: var(--ink-tertiary); }
.ps-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--hairline);
}

/* ── presale create rows ── */
.ps-row { border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; }
.ps-row-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.ps-row-caret { font-size: 13px; color: var(--ink-tertiary); transition: transform 0.15s; }
.ps-row.ps-open .ps-row-caret { transform: rotate(90deg); }
.ps-row-summary {
  flex: 1; font-size: 12.5px; color: var(--ink-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ps-row-status { font-size: 11.5px; color: var(--ink-subtle); }
.ps-row-status.is-ok { color: #34d399; }
.ps-row-status.is-warn { color: #e5a13b; }
.ps-row-status.is-err { color: #f87171; }
.ps-row-body { padding: 4px 14px 14px; }
.ps-row-grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 18px; align-items: start; }
.ps-field { margin-bottom: 10px; }
.ps-field .label { display: block; margin-bottom: 3px; }
.ps-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-req { color: var(--danger); }
.ps-avail { font-weight: 400; font-size: 11px; }
.ps-check-label { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12.5px; color: var(--ink-muted); }
.ps-check-label input { width: 15px; height: 15px; accent-color: #8b5cf6; }
.ps-copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ps-copy-hint { font-size: 11px; color: #34d399; }
.ps-map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.ps-map-slot { margin-top: 8px; }
.ps-map-card { height: min(560px, 58vh); margin-top: 8px; }
.ps-map-card[hidden] { display: none; } /* .tc-map-card declares display:flex */
.ps-map-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ps-price-bar { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ps-price-bar[hidden] { display: none; }
.ps-group-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ps-group-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124, 138, 239, 0.10); border: 1px solid rgba(124, 138, 239, 0.45);
  color: #a5b4fc; border-radius: 999px; padding: 3px 6px 3px 10px;
  font-size: 11.5px; font-weight: 600;
}
.ps-group-chip input {
  width: 58px; background: var(--surface-3); border: 1px solid rgba(124, 138, 239, 0.45);
  color: var(--ink); border-radius: 5px; padding: 1px 4px; font-size: 11.5px; font-weight: 700;
}
.ps-group-chip button { background: none; border: none; color: #a5b4fc; cursor: pointer; padding: 0 2px; }
.ps-group-chip button:hover { color: var(--danger); }
/* sections held inside a price group — purple on the map (pm-grouped, l.15020–15024) */
.section-path.grouped { fill: rgba(139, 92, 246, 0.85) !important; stroke: #ffffff !important; }

/* copy picker */
.ps-copy-list { overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; }
.ps-copy-item {
  display: flex; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  color: var(--ink-muted); border-radius: var(--r-md); padding: 9px 12px;
  font-size: 12.5px; cursor: pointer; text-align: left;
}
.ps-copy-item:hover { border-color: var(--hairline-strong); color: var(--ink); }
.ps-copy-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-copy-item .au-muted { flex: none; }

/* ── run drop modal ── */
.rd-modal { width: min(96vw, 1100px); }
.rd-body { display: flex; gap: 20px; flex: 1; min-height: 0; padding: 14px 20px; overflow-y: auto; }
.rd-form { flex: 0 0 320px; min-width: 260px; }
.rd-map-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rd-map-card { flex: 1; min-height: 240px; }

/* mobile — 390px is a requirement, not an afterthought */
@media (max-width: 1023px) {
  .ps-row-grid { grid-template-columns: 1fr; }
  .rd-body { flex-direction: column; }
  .rd-form { flex: none; min-width: 0; }
  .rd-map-card { height: 42vh; min-height: 220px; flex: none; }
  .ps-map-card { height: 42vh; min-height: 220px; }
}
@media (max-width: 480px) {
  .ps-scrim { padding: 0; }
  .ps-modal, .rd-modal { width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: none; }
  .ps-grid2 { grid-template-columns: 1fr; }
  .ps-entry { flex-wrap: wrap; }
}

/* ==========================================================================
   Phase 6 — Sign Up's · Settings · FIFA · Account Gen
   ========================================================================== */

/* meter fill via <span> (Phase 6 pages; the older .meter used <i>) */
.meter > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--primary); }

/* ── shared: toggle switch (port of app_control's .switch/.knob) ── */
.switch {
  display: inline-flex; align-items: center; width: 34px; height: 20px; padding: 2px;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-pill);
  background: var(--surface-3); cursor: pointer; transition: background 120ms ease;
  flex: none;
}
.switch .knob {
  width: 14px; height: 14px; border-radius: 50%; background: var(--ink-subtle);
  transition: transform 120ms ease, background 120ms ease;
}
.switch.on { background: rgba(94, 106, 210, 0.45); border-color: var(--primary); }
.switch.on .knob { transform: translateX(14px); background: var(--ink); }
.switch.locked, .switch.disabled { cursor: not-allowed; opacity: 0.55; }

/* ── shared: form + status bits (su-*) ── */
.su-card { max-width: 760px; }
.su-textarea {
  width: 100%; min-height: 80px; resize: vertical; font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.55; padding: 10px 12px;
}
.su-meta { font-size: 12px; color: var(--ink-tertiary); margin-top: 4px; }
.su-error { font-size: 12.5px; color: var(--danger); margin: 8px 0 0; }
.su-status { font-size: 12.5px; color: var(--ink-subtle); margin: 8px 0 0; min-height: 18px; }
.su-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.su-actions.is-end { justify-content: flex-end; }
.su-fields-row { display: grid; grid-template-columns: 1fr 180px; gap: var(--sp-md); margin-top: var(--sp-md); }
.su-divider { text-align: center; font-size: 12px; color: var(--ink-tertiary); margin: 12px 0; }
.su-file { padding: 8px; }
.su-empty { padding: var(--sp-xl) var(--sp-md); text-align: center; font-size: 13px; color: var(--ink-tertiary); }
.su-view .label { margin-top: 4px; }

/* Sign Up's: template cards */
.su-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-sm); margin-top: var(--sp-sm); }
.su-tpl-card { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 12px 14px; }
.su-tpl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.su-tpl-name { font-weight: 600; font-size: 13.5px; }
.su-tpl-count { font-size: 12px; color: var(--ink-tertiary); }
.su-tpl-details { margin-top: 8px; }
.su-tpl-details summary { font-size: 12px; color: var(--ink-subtle); cursor: pointer; }
.su-tpl-details pre {
  margin-top: 6px; max-height: 220px; overflow: auto; font-family: var(--font-mono);
  font-size: 11.5px; color: var(--ink-muted); background: var(--surface-3);
  border-radius: var(--r-sm); padding: 8px 10px;
}

/* ── Settings (st-*) ── */
.st-add-form { display: flex; gap: 8px; margin: var(--sp-sm) 0; }
.st-add-form .input { max-width: 320px; }
.st-member-list { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-sm); }
.st-member-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 10px 12px;
}
.st-identity { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.st-avatar-admin { background: var(--primary); color: var(--on-primary); }
.st-email { font-size: 13px; font-weight: 600; word-break: break-all; }
.st-member-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.st-perm-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.st-perm { display: inline-flex; align-items: center; gap: 6px; }
.st-perm-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-subtle); }
.st-row-actions { display: flex; gap: 6px; }
.st-flash { font-size: 12px; color: var(--ink-subtle); min-height: 18px; margin-top: 8px; }
.st-flash.is-error { color: var(--danger); }
.st-access-search { margin: var(--sp-sm) 0; max-width: 360px; }
.st-access-list { display: flex; flex-direction: column; gap: 8px; }
.st-access-server { border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.st-access-head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px;
  background: transparent; border: 0; color: var(--ink); font: inherit; cursor: pointer; text-align: left;
}
.st-access-head:hover { background: var(--surface-3); }
.st-chev { color: var(--ink-tertiary); font-size: 11px; width: 12px; }
.st-ase-name { font-weight: 600; font-size: 13px; }
.st-ase-summary { margin-left: auto; display: flex; gap: 6px; }
.st-access-grid { padding: 4px 12px 10px; border-top: 1px solid var(--hairline); }
.st-ae-row {
  display: grid; grid-template-columns: 1fr 60px 60px; align-items: center; gap: 8px; padding: 6px 0;
}
.st-ae-head { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-tertiary); }
.st-ae-email { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-test-result { font-size: 12px; color: var(--ink-subtle); margin-top: 8px; min-height: 18px; }
.st-test-result.is-error { color: var(--danger); }

/* ── FIFA (ff-*) ── */
.ff-filter { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: var(--sp-md); }
.ff-filter-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--ink-subtle); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ff-filter-tab.active { color: var(--primary-hover); border-bottom-color: var(--primary); }
.ff-running { border-color: rgba(39, 166, 68, 0.5); }
.ff-edit-fields { display: flex; flex-direction: column; gap: 10px; }
.ff-mm-dialog { max-width: 1100px; }
.ff-qt-dialog { max-width: 720px; }
.ff-mm-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ff-mm-tools { display: flex; gap: 8px; }
.ff-mm-rowinfo { font-size: 13px; font-weight: 600; }
.ff-mm-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: var(--sp-sm) var(--sp-md); border-top: 1px solid var(--hairline);
}
.ff-mm-dist { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-subtle); min-width: 0; flex: 1; }
.ff-mm-dist.is-over { color: var(--danger); }
.ff-mm-dist.is-over .meter > span { background: var(--danger); }
.ff-mm-bar { max-width: 160px; }
.ff-mm-table-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--hairline); border-radius: var(--r-md); }
.ff-mm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ff-mm-table th {
  position: sticky; top: 0; background: var(--surface-2); text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-tertiary);
  padding: 8px 8px; border-bottom: 1px solid var(--hairline); z-index: 1;
}
.ff-mm-table td { padding: 6px 8px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.ff-mm-in { min-width: 64px; padding: 5px 8px; font-size: 12.5px; }
.ff-mm-target { max-width: 84px; }
.ff-mm-match { display: flex; align-items: center; gap: 6px; min-width: 180px; }
.ff-mm-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--hairline-strong);
  font-size: 11.5px; font-weight: 700; color: var(--ink-muted);
}
.ff-mm-label { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ff-mm-cards { display: none; }
.ff-mm-card { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; }
.ff-mm-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ff-mm-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ff-mm-field label { display: block; font-size: 11px; color: var(--ink-tertiary); margin-bottom: 3px; }
.ff-mm-field.is-wide { grid-column: 1 / -1; }
.ff-mm-card-target { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ff-mm-card-target label { font-size: 12px; color: var(--ink-subtle); }
.ff-mm-picker {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 280px; max-height: 300px; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); padding: 4px;
}
.ff-mm-picker-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px;
  background: transparent; border: 0; border-radius: var(--r-sm); color: var(--ink);
  font: inherit; font-size: 12.5px; cursor: pointer; text-align: left;
}
.ff-mm-picker-item:hover { background: var(--surface-3); }
/* proxy redistribution section */
.ff-pp { margin-top: var(--sp-md); border-top: 1px solid var(--hairline); padding-top: var(--sp-sm); }
.ff-pp-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.ff-pp-providers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.ff-pp-chip { cursor: pointer; }
.ff-pp-chip input { display: none; }
.ff-pp-list { display: flex; flex-direction: column; gap: 10px; }
.ff-pp-card { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 10px 12px; }
.ff-pp-card.is-bad { border-color: rgba(210, 94, 106, 0.55); }
.ff-pp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ff-pp-presets { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ff-pp-sel { padding: 4px 26px 4px 8px; font-size: 12px; min-height: 0; }
.ff-pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ff-pp-cell label { display: block; font-size: 11px; color: var(--ink-tertiary); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-pp-readout { font-size: 11.5px; color: var(--ink-tertiary); margin-top: 6px; text-align: right; font-variant-numeric: tabular-nums; }
.ff-pp-card.is-bad .ff-pp-readout { color: var(--danger); }
.ff-pp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
/* quick task */
.ff-qt-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ff-qt-wide { grid-column: span 2; }
.ff-qt-pool { margin-top: var(--sp-sm); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); }
.ff-qt-pool-head { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.ff-qt-pool-head .muted { font-weight: 400; font-size: 11.5px; }
.ff-qt-pool-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-qt-matches-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: var(--sp-md) 0 8px; }
.ff-qt-dist { font-size: 12.5px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.ff-qt-dist.is-ok { color: var(--success); }
.ff-qt-dist.is-bad { color: var(--danger); }
.ff-qt-matches { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow: auto; }
.ff-qt-block { border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
.ff-qt-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.ff-qt-row.is-selected { background: rgba(94, 106, 210, 0.08); }
.ff-qt-row-text { flex: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; }
.ff-qt-count { max-width: 84px; padding: 5px 8px; font-size: 12.5px; }
.ff-qt-prov { display: none; padding: 0 10px 10px; }
.ff-qt-prov.is-open { display: block; }
.ff-qt-prov.is-bad [data-qt-prov-readout] { color: var(--danger); }
.ff-qt-prov.is-ok [data-qt-prov-readout] { color: var(--success); }
.ff-qt-prov-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-subtle); margin-bottom: 6px; }

/* ── Account Gen (ag-*) ── */
.ag-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-sm); align-items: start; }
.ag-card-run { grid-column: 1 / -1; }
.ag-run-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--sp-sm); }
.ag-run-state { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ag-run-actions { display: flex; gap: 8px; }
.ag-progress { height: 6px; }
.ag-progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-subtle); margin: 6px 0 var(--sp-sm); font-variant-numeric: tabular-nums; }
.ag-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ag-stat {
  display: flex; flex-direction: column; gap: 2px; background: var(--surface-2);
  border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 10px 12px;
}
.ag-stat .muted { font-size: 11px; }
.ag-ok { color: var(--success); }
.ag-bad { color: var(--danger); }
.ag-combo { position: relative; }
.ag-combo-list { left: 0; right: 0; max-height: 260px; overflow: auto; padding: 4px; }
.ag-combo-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 7px 9px; background: transparent; border: 0; border-radius: var(--r-sm);
  color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left;
}
.ag-combo-opt:hover, .ag-combo-opt.is-active { background: var(--surface-3); }
.ag-combo-opt.is-current { color: var(--primary-hover); }
.ag-card-feed { grid-column: 1 / -1; }
.ag-feed-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.ag-feed-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.ag-feed-item { font-size: 12.5px; border-bottom: 1px solid var(--hairline); padding-bottom: 6px; word-break: break-all; }

/* ── Phase 6 responsive (mobile 390px) ── */
@media (max-width: 900px) {
  .ag-grid { grid-template-columns: 1fr; }
  .ag-stats { grid-template-columns: repeat(2, 1fr); }
  .ff-qt-fields { grid-template-columns: 1fr 1fr; }
  .ff-qt-wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .su-fields-row { grid-template-columns: 1fr; }
  .st-member-row { flex-direction: column; align-items: stretch; }
  .st-ae-row { grid-template-columns: 1fr 52px 52px; }
  /* match editor: table hides, cards show (both are in the DOM; the JS
     scopes collection to the visible layout via offsetParent) */
  .ff-mm-table-wrap { display: none; }
  .ff-mm-cards { display: block; }
  .ff-qt-fields { grid-template-columns: 1fr; }
  .ag-feed-cols { grid-template-columns: 1fr; }
  .ag-stats { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Phase 7a — Task Editor (te-*) + Stock Checker (sk-*)
   task-editor.html re-skins licensing_service/templates/task_editor.html
   (split pane reuses .tc-split / .tc-map-card / .tc-panel from Phase 2a);
   stock.html re-skins licensing_service/templates/stock.html (its inline
   theme, l.20–185, mapped onto the Linear tokens).
   ========================================================================== */

/* ── Task Editor ── */
.te-title-row { display: flex; align-items: center; gap: 8px; }

.te-pencil {
  border: none;
  background: transparent;
  color: var(--ink-tertiary);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
}
.te-pencil:hover { color: var(--ink); background: var(--surface-3); }

.te-shortcuts {
  position: absolute;
  top: 56px;
  left: var(--sp-sm);
  z-index: 10;
  max-width: 450px;
  padding: 10px 12px;
  background: rgba(15, 16, 17, 0.88);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
}
.te-shortcuts-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 8px;
}
.te-shortcuts-row { display: flex; flex-wrap: wrap; gap: 6px; }

.te-clear-map { position: absolute; top: var(--sp-sm); right: var(--sp-sm); z-index: 10; }

.te-copy-note {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: rgba(39, 166, 68, 0.12);
  border: 1px solid rgba(39, 166, 68, 0.3);
  color: #4cc06a;
}

.te-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; }
.te-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }

/* group rows (cartly = green accents, encore = blue accents) */
.tc-group-row.te-group-cartly.active { border-color: #4cc06a; background: rgba(39, 166, 68, 0.10); }
.tc-group-row.te-group-encore.active { border-color: var(--primary-hover); background: rgba(94, 106, 210, 0.12); }
.tc-group-row.te-hidden { opacity: 0.45; }
.tc-group-row.te-hidden .tc-group-sections,
.tc-group-row.te-hidden .te-price-chip { text-decoration: line-through; }

.te-price-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(94, 106, 210, 0.16);
  color: var(--primary-hover);
  cursor: pointer;
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
}
.te-group-cartly .te-price-chip { background: rgba(39, 166, 68, 0.14); color: #4cc06a; }

.te-row-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(94, 106, 210, 0.12);
  color: var(--ink-muted);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
}
.te-row-add { background: transparent; border: 1px dashed var(--hairline-strong); }
.te-row-chip:hover { color: var(--ink); }

.te-inline-edit { max-width: 90px; padding: 3px 8px; font-size: 12px; }

.te-wildcard {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--hairline-strong);
}
.te-wildcard-main { flex: 1; min-width: 0; }
.te-wildcard-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c084fc;
}

/* broadcast / copy modals */
.te-broadcast { width: 560px; max-width: 92vw; }
.te-broadcast-body { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-sm); margin: var(--sp-sm) 0; }

.te-diff-box {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.te-diff-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.te-diff-row { display: flex; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.te-diff-label { color: var(--ink-subtle); min-width: 110px; flex-shrink: 0; font-size: 12px; }
.te-diff-block { margin-bottom: 10px; }
.te-diff-vals { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.te-diff-before { color: var(--danger); text-decoration: line-through; word-break: break-all; }
.te-diff-arrow { color: var(--ink-tertiary); }
.te-diff-after { color: #4cc06a; word-break: break-all; }
.te-diff-vals em, .te-diff-after em { color: var(--ink-tertiary); font-style: italic; text-decoration: none; }

.te-mirror { padding: 12px 14px; background: var(--surface-2); border: 1px solid rgba(210, 160, 78, 0.35); border-radius: var(--r-md); }
.te-mirror input { accent-color: var(--warn); }

.te-sib-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.te-sib {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  transition: background 0.15s ease;
}
.te-sib:hover { background: var(--surface-3); }
.te-sib-off { opacity: 0.5; cursor: not-allowed; }
.te-sib input { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.te-sib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.te-sib-name { font-size: 13px; font-weight: 600; }
.te-sib-task { font-size: 12px; color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Stock Checker ── */
:root { --sk-rsv: #3a424e; } /* reserved/none fill (stock.html:36 --rsv dark) */

.sk-layout { display: flex; gap: var(--sp-md); align-items: flex-start; }

.sk-side {
  width: 300px;
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: var(--sp-md);
  max-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
}
.sk-main { flex: 1; min-width: 0; }

.sk-addbox { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--hairline); }
.sk-addbox .input { flex: 1; min-width: 0; }

.sk-lists { flex: 1; overflow-y: auto; padding: 8px 10px 20px; }

.sk-grp {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-tertiary);
  margin: 12px 8px 6px;
  display: flex;
  justify-content: space-between;
}

.sk-ev {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 3px;
}
.sk-ev:hover { background: var(--surface-2); }
.sk-ev.active { background: rgba(94, 106, 210, 0.12); border-color: var(--primary); }
.sk-ev-body { flex: 1; min-width: 0; }
.sk-ev-name { font-size: 13px; font-weight: 600; line-height: 1.3; word-break: break-word; display: block; }
.sk-ev-meta { display: block; color: var(--ink-tertiary); font-size: 11px; margin-top: 2px; }
.sk-ev-eid { display: block; color: var(--ink-tertiary); font-size: 10.5px; margin-top: 1px; }
.sk-ev-sub { display: block; color: var(--ink-tertiary); font-size: 11px; margin-top: 3px; }
.sk-rm {
  border: none;
  background: transparent;
  color: var(--ink-tertiary);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: var(--r-sm);
}
.sk-rm:hover { color: var(--danger); background: rgba(210, 94, 106, 0.12); }

.sk-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.sk-dot.live { background: #4cc06a; }
.sk-dot.idle { background: var(--ink-tertiary); }

.sk-toggle { display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); overflow: hidden; }
.sk-toggle button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: inherit;
}
.sk-toggle button.on { background: var(--primary); color: #fff; }

.sk-empty { color: var(--ink-muted); padding: 60px 0; text-align: center; font-style: italic; font-size: 14px; }
.sk-muted { color: var(--ink-tertiary); }
.sk-small { font-size: 11px; }
.sk-summary { font-size: 13px; color: var(--ink-muted); margin: 0 0 12px; }
.sk-summary b { color: var(--ink); font-variant-numeric: tabular-nums; }

.sk-crumb { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 10px; }
.sk-crumb a { color: var(--primary-hover); cursor: pointer; text-decoration: none; }

/* counts grid */
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sk-cell {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 10px 11px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.06s ease;
}
.sk-cell:hover { border-color: var(--primary); }
.sk-cell:active { transform: translateY(1px); }
.sk-cell.zero { opacity: 0.5; }
.sk-cell.sel { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.sk-cell .sec { font-weight: 600; font-size: 13px; margin-bottom: 5px; word-break: break-all; }
.sk-cell .av { font-family: var(--font-mono); font-size: 18px; font-variant-numeric: tabular-nums; color: #4cc06a; }
.sk-cell .of { color: var(--ink-tertiary); font-size: 12px; }
.sk-cell.zero .av { color: var(--ink-tertiary); }
.sk-cell.flash { animation: sk-flash 0.8s ease; }
@keyframes sk-flash { 0% { background: rgba(39, 166, 68, 0.14); } 100% { background: var(--surface-1); } }

/* filter bar */
.sk-mapbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sk-filter { position: relative; }
.sk-cnt {
  background: rgba(94, 106, 210, 0.16);
  color: var(--primary-hover);
  border-radius: var(--r-pill);
  padding: 1px 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.sk-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.4));
  padding: 8px;
  min-width: 260px;
  max-height: 60vh;
  overflow: auto;
  display: none;
}
.sk-filter-menu.open { display: block; }
.sk-filter-menu .fm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-tertiary);
}
.sk-filter-menu .fm-head a {
  color: var(--primary-hover);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
  margin-left: 8px;
}
.sk-ofrow { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--r-sm); cursor: pointer; font-size: 12.5px; }
.sk-ofrow:hover { background: var(--surface-2); }
.sk-ofrow input { accent-color: var(--primary); width: 14px; height: 14px; cursor: pointer; flex-shrink: 0; }
.sk-ofname { flex: 1; word-break: break-word; }
.sk-ofcnt { font-size: 11.5px; color: var(--ink-tertiary); }
.sk-prem {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warn);
  background: rgba(210, 160, 78, 0.12);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}
.sk-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--ink-muted); }
.sk-chip { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 2px 9px; }

/* map */
.sk-mapwrap { display: flex; flex-direction: column; gap: 12px; position: relative; }
.sk-venue { padding: 0; overflow: hidden; }
.sk-map { height: 62vh; min-height: 420px; touch-action: none; }
/* availability fill is an inline style; keep the hover cue on top of it,
   mirroring the template's !important hover (stock.html:568) */
.sk-map .section-path:hover { fill: rgba(96, 165, 250, 0.35) !important; }
.sk-zoomctl { position: absolute; right: 12px; bottom: 12px; z-index: 20; display: flex; flex-direction: column; gap: 5px; }
.sk-zoomctl .btn { width: 34px; padding: 0; }
.sk-legend { display: flex; gap: 14px; align-items: center; font-size: 11.5px; color: var(--ink-muted); flex-wrap: wrap; }
.sk-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.sk-legend .sw.selsw { border: 2px solid var(--danger); background: transparent; }

/* selected-section cards */
.sk-sel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 8px; }
.sk-sel-head .t { font-size: 15px; font-weight: 600; }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sk-selcard { border-left: 3px solid var(--danger); padding: 13px 15px; }
.sk-selcard .c-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sk-selcard .c-sec { font-weight: 600; font-size: 15px; word-break: break-word; }
.sk-selcard .c-meta { font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sk-selcard .c-meta b { color: #4cc06a; }
.sk-selcard .c-x {
  background: transparent;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: var(--r-sm);
}
.sk-selcard .c-x:hover { color: var(--danger); background: rgba(210, 94, 106, 0.12); }
.sk-selcard .c-rows { display: flex; flex-direction: column; }
.sk-selcard .crow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.sk-selcard .crow:last-child { border-bottom: none; }
.sk-selcard .cp { font-variant-numeric: tabular-nums; font-weight: 500; }
.sk-selcard .cc { color: var(--ink-muted); }
.sk-selcard .c-detail {
  background: none;
  border: none;
  padding: 6px 0 0;
  font-size: 11.5px;
  color: var(--primary-hover);
  cursor: pointer;
  font-family: inherit;
}
.sk-selcard .c-detail:hover { text-decoration: underline; }

/* seat detail table */
.sk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sk-table th, .sk-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--hairline); }
.sk-table th { color: var(--ink-muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.sk-attr {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  background: var(--surface-2);
  color: var(--ink-muted);
  margin: 1px 3px 1px 0;
}

/* hover tooltip */
.sk-tip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: var(--surface-4, #2a2c31);
  color: var(--ink);
  padding: 7px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.1s ease;
  max-width: 260px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.sk-tip.show { opacity: 1; }
.sk-tip b { font-variant-numeric: tabular-nums; }

/* ── Phase 7a responsive (mobile 390px) ── */
@media (max-width: 1023px) {
  .sk-layout { flex-direction: column; }
  .sk-side { width: 100%; position: static; max-height: none; }
  .sk-lists { max-height: 36vh; }
  .sk-map { height: 54vh; min-height: 340px; }
  .te-shortcuts { max-width: calc(100vw - 120px); }
}

/* ==========================================================================
   Phase 7b — Melech NF (nfp-*) · Melech SOS (sp-*) · Melech Tiq (mtq-*) ·
   ROI Checker (rc-*). Ports of nf.html / sos.html / melechtiq.html /
   roi.html (standalone templates). Single dark Linear theme.
   ========================================================================== */

/* ── shared bits ── */
.sp-ok { color: var(--green, #2ecc8f) !important; }
.sp-err { color: var(--red, #e5484d) !important; }
.sp-muted, .rc-muted { color: var(--text-3, #8a8f98); }
.sp-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--border, #2a2e3a); border-top-color: var(--accent, #7c8cf8); border-radius: 50%; animation: sp-spin .6s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp-spin { to { transform: rotate(360deg); } }
.sp-empty, .mtq-empty, .rc-none { padding: 42px 24px; text-align: center; color: var(--text-3, #8a8f98); font-style: italic; background: var(--bg-2, #16181f); border: 1px dashed var(--border, #2a2e3a); border-radius: 8px; }
.sp-error { padding: 18px; background: var(--bg-2, #16181f); border-left: 3px solid var(--red, #e5484d); border-radius: 6px; }
.sp-error-title { color: var(--red, #e5484d); font-weight: 600; margin-bottom: 4px; }
.sp-error-detail { color: var(--text-3, #8a8f98); font-size: 12px; }

/* ── Melech NF ── */
.nfp-layout { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: start; }
.nfp-channels { padding: 8px; position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow: auto; }
.nfp-ch { padding: 9px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; border: 1px solid transparent; }
.nfp-ch:hover { background: var(--bg-3, #1c1f28); }
.nfp-ch.active { background: color-mix(in srgb, var(--accent, #7c8cf8) 14%, transparent); border-color: color-mix(in srgb, var(--accent, #7c8cf8) 30%, transparent); }
.nfp-ch-meta { display: block; color: var(--text-3, #8a8f98); font-size: 11px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.nfp-msgs { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nfp-msg { background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; padding: 11px 14px 12px; }
.nfp-msg-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; font-size: 12.5px; }
.nfp-author { font-weight: 600; }
.nfp-ts { color: var(--text-3, #8a8f98); font-size: 11px; font-variant-numeric: tabular-nums; }
.nfp-body { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; line-height: 1.5; font-size: 14px; }
.nfp-media { display: block; max-width: 100%; max-height: 480px; border-radius: 8px; margin: 6px 0 0; border: 1px solid var(--border, #2a2e3a); background: var(--bg-3, #1c1f28); }
.nfp-urlpill { display: inline; white-space: nowrap; }
.nfp-urllink { color: var(--accent, #7c8cf8); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; white-space: normal; }
.nfp-copybtn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; padding: 0; border: 1px solid var(--border, #2a2e3a); background: transparent; color: var(--text-3, #8a8f98); border-radius: 4px; cursor: pointer; font-size: 10px; line-height: 1; vertical-align: middle; }
.nfp-copybtn:hover { border-color: var(--accent, #7c8cf8); color: var(--accent, #7c8cf8); }
.nfp-copybtn.copied { border-color: var(--green, #2ecc8f); color: var(--green, #2ecc8f); }
.nfp-embed { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--accent, #7c8cf8); background: color-mix(in srgb, var(--accent, #7c8cf8) 8%, transparent); border-radius: 6px; }
.nfp-et { font-weight: 600; margin-bottom: 3px; }
.nfp-ed { font-size: 13px; white-space: pre-wrap; }
.nfp-ef { margin-top: 6px; font-size: 12.5px; }
.nfp-ef b { display: inline-block; min-width: 120px; color: var(--text-3, #8a8f98); font-weight: 500; }
.nfp-att { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-3, #8a8f98); }
.nfp-empty { color: var(--text-3, #8a8f98); padding: 60px 0; text-align: center; font-style: italic; }
.nfp-switch { font-size: 12px; color: var(--text-3, #8a8f98); display: flex; align-items: center; gap: 6px; user-select: none; }
.nfp-switch input { accent-color: var(--accent, #7c8cf8); }
.nfp-refresh-glyph { display: inline-block; }
.nfp-refresh-glyph.spinning { animation: sp-spin .6s linear infinite; }

/* ── Melech SOS ── */
.sp-search-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.sp-content { min-width: 0; }
.sp-table-wrap { background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; overflow: auto; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sp-table thead th { text-align: left; padding: 9px 14px; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3, #8a8f98); background: var(--bg-3, #1c1f28); border-bottom: 1px solid var(--border, #2a2e3a); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.sp-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border, #2a2e3a); vertical-align: top; }
.sp-event-row:hover { background: color-mix(in srgb, var(--accent, #7c8cf8) 6%, transparent); }
.sp-group-row td { background: var(--bg-3, #1c1f28); padding: 9px 14px 8px; scroll-margin-top: 56px; }
.sp-group-eyebrow { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3, #8a8f98); font-weight: 600; }
.sp-group-eyebrow b { color: var(--accent, #7c8cf8); }
.sp-slot-count { color: var(--text-3, #8a8f98); font-weight: 600; margin-left: 8px; font-size: 11px; }
.sp-evname { font-weight: 600; line-height: 1.3; }
.sp-password { color: var(--amber, #e2a336); font-size: 11.5px; line-height: 1.4; margin-top: 3px; max-width: 420px; }
.sp-venue { font-size: 13px; line-height: 1.3; }
.sp-loc { color: var(--text-3, #8a8f98); font-size: 12px; margin-top: 2px; }
.sp-dt { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }
.sp-dt.none { color: var(--text-3, #8a8f98); }
.sp-badge, .sp-saletag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 3px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; vertical-align: middle; margin-left: 6px; }
.sp-badge.first, .sp-saletag.presale, .sp-saletag.post { background: color-mix(in srgb, var(--amber, #e2a336) 12%, transparent); color: var(--amber, #e2a336); border: 1px solid color-mix(in srgb, var(--amber, #e2a336) 40%, transparent); }
.sp-badge.recent, .sp-saletag.public { background: color-mix(in srgb, var(--green, #2ecc8f) 12%, transparent); color: var(--green, #2ecc8f); border: 1px solid color-mix(in srgb, var(--green, #2ecc8f) 40%, transparent); }
.sp-timeslot-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; padding: 9px 12px; margin-bottom: 14px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; }
.sp-timeslot-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3, #8a8f98); font-weight: 600; margin-right: 6px; }
.sp-timeslot-btn { background: transparent; border: 1px solid transparent; color: var(--accent, #7c8cf8); font-size: 11px; padding: 2px 6px; border-radius: 4px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-timeslot-btn:hover { background: var(--bg-3, #1c1f28); border-color: var(--border, #2a2e3a); }
.sp-timeslot-sep { color: var(--text-3, #8a8f98); font-size: 10px; }
.sp-event-trigger { cursor: help; }
.sp-cue { font-size: 10px; color: var(--text-3, #8a8f98); margin-left: 5px; border: 1px solid var(--border, #2a2e3a); border-radius: 50%; padding: 0 4px; }
.sp-event-trigger:hover .sp-cue { color: var(--accent, #7c8cf8); }
.sp-detail-pop { position: fixed; z-index: 200; max-width: 440px; min-width: 280px; background: var(--bg-2, #16181f); border: 1px solid var(--accent, #7c8cf8); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 13px 15px; font-size: 12px; line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity .08s ease-out; user-select: text; }
.sp-detail-pop.visible { opacity: 1; pointer-events: auto; }
.sp-pop-head { font-size: 15px; font-weight: 600; padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid var(--border, #2a2e3a); }
.sp-pop-artist { font-size: 11px; font-weight: 400; color: var(--text-3, #8a8f98); margin-top: 2px; }
.sp-pop-win { padding: 7px 0; border-bottom: 1px dashed var(--border, #2a2e3a); }
.sp-pop-win:last-of-type { border-bottom: none; }
.sp-pop-win-time { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #8a8f98); font-weight: 600; }
.sp-pop-win-names { margin-top: 2px; }
.sp-pop-pw { color: var(--amber, #e2a336); font-weight: 600; margin-top: 3px; }
.sp-pop-footer { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border, #2a2e3a); }
.sp-pop-foot-row { font-size: 11px; color: var(--text-3, #8a8f98); font-variant-numeric: tabular-nums; }
.sp-pop-info { margin-top: 6px; font-size: 11px; color: var(--text-3, #8a8f98); font-style: italic; }
.sp-statustxt { font-size: 12.5px; }
.sp-agent { display: inline-flex; align-items: center; margin-top: 4px; padding: 1px 6px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--bg-3, #1c1f28); border: 1px solid var(--border, #2a2e3a); color: var(--text-3, #8a8f98); }
.sp-evlink { color: var(--text-3, #8a8f98); font-size: 11px; margin-left: 8px; text-decoration: none; }
.sp-evlink:hover { color: var(--accent, #7c8cf8); }

/* ── Melech Tiq ── */
.mtq-unavailable { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: var(--bg, #0e1015); text-align: center; padding: 24px; }
.mtq-unavailable-title { font-size: 30px; font-weight: 600; margin-bottom: 14px; }
.mtq-unavailable-sub { font-size: 15px; opacity: .7; line-height: 1.55; }
.mtq-unavailable a { color: var(--accent, #7c8cf8); text-decoration: none; font-size: 13px; }
.mtq-search-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mtq-search-cell { position: relative; }
.mtq-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-height: 300px; overflow: auto; display: none; }
.mtq-dropdown.visible { display: block; }
.mtq-dd-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.mtq-dd-row:hover, .mtq-dd-row.mtq-active { background: var(--bg-3, #1c1f28); }
.mtq-dd-row img, .mtq-thumb-fallback { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; background: var(--bg-3, #1c1f28); flex: none; }
.mtq-dd-empty { padding: 12px; color: var(--text-3, #8a8f98); font-style: italic; font-size: 12.5px; }
.mtq-active-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mtq-active-filter:empty { display: none; }
.mtq-filter-label { font-size: 11px; color: var(--text-3, #8a8f98); text-transform: uppercase; letter-spacing: .08em; }
.mtq-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent, #7c8cf8) 14%, transparent); color: var(--accent, #7c8cf8); font-size: 12px; font-weight: 600; }
.mtq-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 14px; padding: 0; }
.mtq-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; align-items: start; }
.mtq-events-col { display: flex; flex-direction: column; min-width: 0; }
.mtq-events-table-wrap { background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; overflow: auto; max-height: 70vh; }
.mtq-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mtq-table thead th { position: sticky; top: 0; text-align: left; padding: 8px 12px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3, #8a8f98); background: var(--bg-3, #1c1f28); border-bottom: 1px solid var(--border, #2a2e3a); z-index: 1; }
.mtq-table thead th.right, .mtq-table td.right { text-align: right; }
.mtq-table tbody td { padding: 8px 12px; border-bottom: 1px solid var(--border, #2a2e3a); }
.mtq-table tbody td.muted { color: var(--text-3, #8a8f98); }
.mtq-table tr.clickable { cursor: pointer; }
.mtq-table tr.clickable:hover { background: color-mix(in srgb, var(--accent, #7c8cf8) 6%, transparent); }
.mtq-table tr.mtq-row-active { background: color-mix(in srgb, var(--accent, #7c8cf8) 12%, transparent); box-shadow: inset 2px 0 0 var(--accent, #7c8cf8); }
.mtq-evname { font-weight: 600; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtq-vc .v { font-weight: 500; }
.mtq-vc { color: var(--text-3, #8a8f98); font-size: 12px; }
.mtq-mkt-cell { white-space: nowrap; }
.mtq-mkt-none { color: var(--text-3, #8a8f98); }
.mtq-mkt-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 4px; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-decoration: none; border: 1px solid var(--border, #2a2e3a); color: var(--text-3, #8a8f98); background: var(--bg-3, #1c1f28); }
.mtq-mkt-btn:hover { border-color: currentColor; }
.mtq-mkt-tm:hover { color: #5b9cf5; } .mtq-mkt-sh:hover { color: #a06bf0; } .mtq-mkt-sg:hover { color: #ef6a60; }
.mtq-events-pager, .mtq-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-top: 8px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; font-size: 11px; color: var(--text-3, #8a8f98); }
.mtq-events-pager:empty, .mtq-pagination:empty { display: none; }
.mtq-page-info { font-variant-numeric: tabular-nums; }
.mtq-page-info b { color: var(--text, #e8eaed); }
.mtq-page-controls { display: inline-flex; gap: 4px; align-items: center; }
.mtq-sales-panel { background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; display: flex; flex-direction: column; max-height: 80vh; overflow: hidden; position: sticky; top: 12px; }
.mtq-sales-empty { padding: 60px 24px; text-align: center; color: var(--text-3, #8a8f98); font-style: italic; }
.mtq-sales-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border, #2a2e3a); }
.mtq-sales-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3, #8a8f98); font-weight: 600; }
.mtq-sales-event-name { font-size: 15px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtq-sales-markets { display: flex; margin: 8px 0 2px; }
.mtq-sales-markets:empty { display: none; }
.mtq-sales-summary { display: flex; gap: 18px; margin: 10px 0; }
.mtq-sales-stat { display: flex; flex-direction: column; }
.mtq-sales-stat .k { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3, #8a8f98); }
.mtq-sales-stat .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mtq-sales-stat .v.accent { color: var(--accent, #7c8cf8); }
.mtq-window-toggle { display: inline-flex; background: var(--bg-3, #1c1f28); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; padding: 2px; gap: 2px; }
.mtq-window-btn { border: 0; background: transparent; color: var(--text-3, #8a8f98); font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.mtq-window-btn.active { background: var(--bg-2, #16181f); color: var(--text, #e8eaed); }
.mtq-chart-wrap { padding: 12px 16px; border-bottom: 1px solid var(--border, #2a2e3a); }
.mtq-chart-empty { padding: 24px; text-align: center; color: var(--text-3, #8a8f98); font-style: italic; font-size: 12px; }
.mtq-chart-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3, #8a8f98); margin-bottom: 8px; }
.mtq-chart-meta b { color: var(--text, #e8eaed); }
.mtq-chart-host { position: relative; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 120px 18px; }
.mtq-chart-yaxis { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding-right: 6px; font-size: 9px; color: var(--text-3, #8a8f98); font-variant-numeric: tabular-nums; }
.mtq-chart-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; border-left: 1px solid var(--border, #2a2e3a); border-bottom: 1px solid var(--border, #2a2e3a); padding: 0 2px; }
.mtq-chart-bar { flex: 1; min-height: 1px; background: var(--accent, #7c8cf8); border-radius: 2px 2px 0 0; opacity: .85; }
.mtq-chart-bar:hover { opacity: 1; }
.mtq-chart-bar.empty { background: var(--border, #2a2e3a); }
.mtq-chart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border, #2a2e3a); }
.mtq-chart-grid.mid { top: 33.3%; } .mtq-chart-grid.mid2 { top: 66.6%; }
.mtq-chart-axis { grid-column: 2; display: flex; gap: 2px; padding: 2px 2px 0; }
.mtq-chart-tick { flex: 1; font-size: 8.5px; color: var(--text-3, #8a8f98); text-align: center; overflow: hidden; white-space: nowrap; }
.mtq-chart-tooltip { position: absolute; z-index: 20; transform: translate(-50%, calc(-100% - 8px)); background: var(--bg, #0e1015); border: 1px solid var(--border-2, #3a3f4d); border-radius: 7px; padding: 7px 10px; font-size: 11px; pointer-events: none; opacity: 0; transition: opacity .08s; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.mtq-chart-tooltip.visible { opacity: 1; }
.mtq-tip-date { font-weight: 600; margin-bottom: 3px; }
.mtq-tip-row { display: flex; justify-content: space-between; gap: 14px; }
.mtq-tip-row .label { color: var(--text-3, #8a8f98); }
.mtq-tip-row .val.accent { color: var(--accent, #7c8cf8); font-weight: 700; }
.mtq-table-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border, #2a2e3a); font-size: 12px; }
.mtq-table-filters .label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3, #8a8f98); font-weight: 600; }
.mtq-multi { position: relative; }
.mtq-multi-trigger { background: var(--bg-3, #1c1f28); border: 1px solid var(--border, #2a2e3a); color: var(--text, #e8eaed); border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.mtq-multi-trigger.active { border-color: var(--accent, #7c8cf8); color: var(--accent, #7c8cf8); }
.mtq-multi-panel { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: 220px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.4); padding: 8px; }
.mtq-multi.open .mtq-multi-panel { display: block; }
.mtq-multi-search { width: 100%; margin-bottom: 6px; }
.mtq-multi-options { max-height: 200px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.mtq-multi-option { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 6px; border-radius: 5px; cursor: pointer; }
.mtq-multi-option:hover { background: var(--bg-3, #1c1f28); }
.mtq-multi-empty { padding: 10px; color: var(--text-3, #8a8f98); font-style: italic; font-size: 12px; }
.mtq-multi-foot { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border, #2a2e3a); }
.mtq-link { background: none; border: none; color: var(--accent, #7c8cf8); font-size: 11.5px; cursor: pointer; padding: 0; }
.mtq-daterange { display: inline-flex; align-items: center; gap: 4px; }
.mtq-daterange .sep { color: var(--text-3, #8a8f98); }
.mtq-date-input { width: 130px; color-scheme: dark; }
.mtq-sales-table-wrap { flex: 1; overflow: auto; }
.mtq-none { padding: 24px; text-align: center; color: var(--text-3, #8a8f98); font-style: italic; }
.mtq-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 30px; padding: 16px 18px; margin-bottom: 14px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; }
.mtq-tq-filter { display: flex; flex-direction: column; gap: 9px; min-width: 172px; flex: 1 1 172px; max-width: 240px; }
.mtq-tq-label { font-size: 12px; color: var(--text-3, #8a8f98); font-weight: 500; white-space: nowrap; display: flex; align-items: center; min-height: 26px; }
.mtq-tq-window { padding: 3px 7px; font-size: 12px; width: auto; }
.mtq-tq-slider { position: relative; height: 18px; }
.mtq-tq-track { position: absolute; top: 50%; left: 1px; right: 1px; height: 4px; transform: translateY(-50%); background: var(--border-2, #3a3f4d); border-radius: 3px; }
.mtq-tq-fill { position: absolute; height: 100%; background: var(--accent, #7c8cf8); border-radius: 3px; }
.mtq-tq-range { position: absolute; top: 0; left: 0; width: 100%; height: 18px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.mtq-tq-range:focus { outline: none; }
.mtq-tq-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--accent, #7c8cf8); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
.mtq-tq-range::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--accent, #7c8cf8); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
.mtq-tq-range::-moz-range-track { background: none; border: none; }
.mtq-tq-boxes { display: flex; align-items: center; gap: 8px; }
.mtq-tq-box { flex: 1; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; }
.mtq-tq-actions { display: flex; align-items: center; gap: 10px; align-self: center; margin-left: auto; }
.mtq-tq-count { font-size: 12px; background: var(--bg-3, #1c1f28); border: 1px solid var(--border, #2a2e3a); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }

/* ── ROI Checker ── */
.rc-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.rc-tabs .navitem { display: inline-flex; align-items: center; gap: 6px; }
.rc-tabs .navitem.on { background: var(--bg-2, #16181f); color: var(--text, #e8eaed); }
.rc-count { font-size: 10px; background: var(--bg-3, #1c1f28); border-radius: 999px; padding: 0 7px; color: var(--text-3, #8a8f98); font-variant-numeric: tabular-nums; }
.rc-view { display: none; }
.rc-view.on { display: block; }
.rc-controls { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rc-controls textarea { flex: 1; min-width: 260px; min-height: 40px; max-height: 160px; resize: vertical; line-height: 1.35; }
.rc-note { font-size: 12px; color: var(--text-3, #8a8f98); }
.rc-healthbox { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border, #2a2e3a); border-radius: 8px; background: var(--bg-2, #16181f); }
.rc-hdot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3, #8a8f98); flex: none; }
.rc-hdot.on { background: var(--green, #2ecc8f); }
.rc-hdot.warn { background: var(--amber, #e2a336); }
.rc-hdot.off { background: var(--red, #e5484d); }
.rc-hmeta { display: flex; flex-direction: column; line-height: 1.25; }
.rc-hmeta b { font-size: 11.5px; font-weight: 600; }
.rc-hmeta span { font-size: 10px; color: var(--text-3, #8a8f98); }
.rc-livebadge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); font-size: 12px; font-weight: 600; }
.rc-livebadge .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--green, #2ecc8f); }
.rc-livebadge.stale .pip { background: var(--amber, #e2a336); }
.rc-strip { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 10px 14px; margin-bottom: 12px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; }
.rc-stripstat { display: flex; flex-direction: column; }
.rc-stripstat .num { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-stripstat .num.down { color: var(--red, #e5484d); }
.rc-stripstat span { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3, #8a8f98); }
.rc-list-table { display: flex; flex-direction: column; gap: 8px; }
.rc-card { display: flex; align-items: center; gap: 12px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; padding: 11px 14px; cursor: pointer; }
.rc-card:hover { border-color: var(--border-2, #3a3f4d); }
.rc-card.inactive { opacity: .55; }
.rc-card .c-main { flex: 1; min-width: 0; }
.rc-card .c-name { font-weight: 600; font-size: 13.5px; }
.rc-card .c-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3, #8a8f98); margin-top: 3px; }
.rc-card .c-meta .mi.trunc { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-card .c-actions { display: flex; gap: 4px; flex: none; }
.rc-card .c-name-input { font-size: 13px; }
.rc-eid { font-size: 10.5px; color: var(--text-3, #8a8f98); font-variant-numeric: tabular-nums; }
.rc-livedot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--text-3, #8a8f98); flex: none; }
.rc-livedot.live { background: var(--green, #2ecc8f); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green, #2ecc8f) 20%, transparent); }
.rc-livedot.stale { background: var(--amber, #e2a336); }
.rc-livedot.error { background: var(--red, #e5484d); }
.rc-badge { display: inline-flex; flex-direction: column; align-items: flex-end; }
.rc-badge .n { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-badge .lab { font-size: 10px; color: var(--text-3, #8a8f98); text-transform: uppercase; letter-spacing: .05em; }
.rc-badge.zero .n { color: var(--text-3, #8a8f98); }
.rc-badge.live-badge .n { color: var(--green, #2ecc8f); }
.rc-badge.na .n { color: var(--text-3, #8a8f98); }
.rc-badge.flash { animation: rc-flash 1.2s ease-out; }
@keyframes rc-flash { 0% { transform: scale(1.15); } 100% { transform: scale(1); } }
.rc-empty { text-align: center; padding: 50px 20px; color: var(--text-3, #8a8f98); }
.rc-empty h3 { color: var(--text, #e8eaed); margin: 0 0 6px; }
.rc-evhead { padding: 14px 16px; margin-bottom: 12px; }
.rc-eh-top { display: flex; align-items: flex-start; gap: 10px; }
.rc-eh-top h3 { margin: 0; font-size: 18px; }
.rc-eh-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-3, #8a8f98); margin-top: 5px; }
.rc-marketbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rc-mbtn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border, #2a2e3a); background: var(--bg-3, #1c1f28); color: var(--text, #e8eaed); font-weight: 600; font-size: 12px; text-decoration: none; }
.rc-mbtn:hover { border-color: var(--accent, #7c8cf8); }
.rc-mbtn.off { opacity: .55; cursor: default; }
.rc-mbtn .sq { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; }
.rc-mbtn .sq.tm { background: #0B0F19; } .rc-mbtn .sq.vs { background: #0EA5A0; } .rc-mbtn .sq.sh { background: #8B5CF6; }
.rc-mbtn .px { font-size: 10.5px; color: var(--text-3, #8a8f98); font-weight: 500; }
.rc-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.rc-panel { padding: 14px 16px; margin-bottom: 12px; }
.rc-panel h4 { margin: 0 0 10px; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.rc-tagdot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.rc-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rc-metric .k { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #8a8f98); }
.rc-metric .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-metric .v.up { color: var(--green, #2ecc8f); }
.rc-metric .v.down { color: var(--red, #e5484d); }
.rc-panelnote { font-size: 11px; color: var(--text-3, #8a8f98); margin-top: 9px; }
.rc-maphead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rc-maphead .t { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #8a8f98); }
.rc-readout { font-size: 12px; color: var(--text-3, #8a8f98); font-variant-numeric: tabular-nums; }
.rc-mapzoom { display: inline-flex; gap: 4px; }
.rc-map-layout { display: flex; gap: 0; border: 1px solid var(--border, #2a2e3a); border-radius: 10px; overflow: hidden; }
.rc-map-main { flex: 1; min-width: 0; }
#mapContainer, #venueMapContainer { position: relative; height: 62vh; min-height: 380px; overflow: hidden; background: #fff; cursor: grab; }
#mapContainer.grabbing, #venueMapContainer.grabbing { cursor: grabbing; }
#mapOverlay, #venueMapOverlay { width: 100%; height: 100%; transform-origin: 0 0; }
#mapMsg, #venueMapMsg { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #333; font-size: 13px; background: rgba(255,255,255,.85); }
#mapMsg.show, #venueMapMsg.show { display: flex; }
#mapOverlay .section-path.selected, #venueMapOverlay .section-path.selected { stroke: #e53935; stroke-width: 6; }
/* Venue editor paints per-group fills as inline styles (roi.html paintVenueGroups);
   keep the hover cue on top of them — port of roi template l.486. */
#venueMapOverlay .section-path:hover { fill: rgba(96, 165, 250, 0.25) !important; stroke: rgba(255, 255, 255, 0.9) !important; }
.rc-maplegend { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 10.5px; color: var(--text-3, #8a8f98); }
.rc-maplegend .grad { flex: 0 0 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, hsl(230 40% 60%), hsl(230 80% 38%)); }
.rc-map-sidebar { flex: 0 0 280px; border-left: 1px solid var(--border, #2a2e3a); display: flex; flex-direction: column; max-height: 62vh; background: var(--bg-2, #16181f); }
.rc-sb-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border, #2a2e3a); font-size: 11px; }
.rc-sb-head .t { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #8a8f98); }
.rc-sb-head .total { font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-sb-filter { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border, #2a2e3a); }
.rc-sb-filter .input { width: 70px; padding: 4px 8px; font-size: 12px; }
#sbSections { flex: 1; overflow: auto; }
.rc-sb-section { padding: 8px 12px; border-bottom: 1px solid var(--border, #2a2e3a); cursor: pointer; font-size: 12px; }
.rc-sb-section:hover { background: var(--bg-3, #1c1f28); }
.rc-sb-section.active { background: color-mix(in srgb, var(--accent, #7c8cf8) 12%, transparent); }
.rc-sb-section .sn { font-weight: 600; }
.rc-sb-section .sp { font-size: 11px; color: var(--text-3, #8a8f98); margin-top: 2px; flex-wrap: wrap; }
.rc-sb-detail { padding: 6px 12px 10px; background: var(--bg-3, #1c1f28); border-bottom: 1px solid var(--border, #2a2e3a); font-size: 11px; }
.rc-sb-detail .rd { display: flex; gap: 8px; padding: 2px 0; }
.rc-sb-detail .rl { flex: none; font-weight: 600; min-width: 52px; }
.rc-sb-detail .seats { flex: 1; min-width: 0; color: var(--text-3, #8a8f98); word-break: break-all; }
.rc-sb-detail .rp { flex: none; font-variant-numeric: tabular-nums; }
.rc-seatcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 12px; }
.rc-seatcards:empty { display: none; }
.rc-seatcard { background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; padding: 10px 12px; }
.rc-seatcard .sh { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.rc-seatcard .sname { font-weight: 700; font-size: 13px; }
.rc-seatcard .smeta { font-size: 11px; color: var(--text-3, #8a8f98); }
.rc-seatrows { max-height: 240px; overflow: auto; }
.rc-seatrow { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 11.5px; }
.rc-seatrow .rl { flex: none; min-width: 68px; font-weight: 600; }
.rc-seatrow .rl small { color: var(--text-3, #8a8f98); }
.rc-seatrow .ss { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 3px; }
.rc-seatrow .rp { flex: none; font-variant-numeric: tabular-nums; color: var(--text-3, #8a8f98); }
.rc-seatchip { padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--green, #2ecc8f) 14%, transparent); color: var(--green, #2ecc8f); font-size: 10.5px; font-weight: 600; }
.rc-seatchip.sold { background: var(--bg-3, #1c1f28); color: var(--text-3, #8a8f98); text-decoration: line-through; }
.rc-sloading, .rc-sempty { color: var(--text-3, #8a8f98); font-style: italic; font-size: 12px; }
.rc-tip { position: fixed; z-index: 300; background: var(--bg, #0e1015); border: 1px solid var(--border-2, #3a3f4d); border-radius: 7px; padding: 7px 10px; font-size: 11.5px; line-height: 1.4; pointer-events: none; opacity: 0; transition: opacity .08s; max-width: 220px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.rc-tip.show { opacity: 1; }
.rc-dropshead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-dropshead .t { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #8a8f98); }
.rc-dropshead .sk-toggle { margin-left: auto; }
.rc-tblscroll { overflow: auto; margin-top: 10px; }
.rc-drops-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rc-drops-table th { text-align: right; padding: 8px 12px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #8a8f98); font-weight: 600; border-bottom: 1px solid var(--border, #2a2e3a); background: var(--bg-3, #1c1f28); }
.rc-drops-table th.left, .rc-drops-table td.left { text-align: left; }
.rc-drops-table td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--border, #2a2e3a); font-variant-numeric: tabular-nums; }
.rc-drops-table tr.roi-hot { background: color-mix(in srgb, var(--green, #2ecc8f) 8%, transparent); }
.rc-drops-table tr.roi-warm { background: color-mix(in srgb, var(--amber, #e2a336) 8%, transparent); }
.rc-drops-table tr.roi-neg { background: color-mix(in srgb, var(--red, #e5484d) 8%, transparent); }
.rc-drops-table tr.fresh td { animation: rc-flashrow 1.6s ease-out; }
@keyframes rc-flashrow { 0% { background: color-mix(in srgb, var(--accent, #7c8cf8) 18%, transparent); } 100% { background: transparent; } }
.rc-whenago { font-size: 11px; color: var(--text-3, #8a8f98); }
.rc-roi-chip { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.rc-roi-chip.hot { background: color-mix(in srgb, var(--green, #2ecc8f) 14%, transparent); color: var(--green, #2ecc8f); }
.rc-roi-chip.warm { background: color-mix(in srgb, var(--amber, #e2a336) 14%, transparent); color: var(--amber, #e2a336); }
.rc-roi-chip.neg { background: color-mix(in srgb, var(--red, #e5484d) 14%, transparent); color: var(--red, #e5484d); }
.rc-roi-chip.cold { background: var(--bg-3, #1c1f28); color: var(--text-3, #8a8f98); }
.rc-dropcards { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 0; }
.rc-dropcards > * { flex: 0 0 auto; } /* cards must not shrink (roi.html:300–307) */
.rc-dropcards:empty { display: none; }
.rc-drops-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0 4px; font-size: 12px; color: var(--text-3, #8a8f98); }
.rc-drops-pager:empty { display: none; }
.rc-dcard { border: 1px solid var(--border, #2a2e3a); border-radius: 14px; background: var(--bg-2, #16181f); overflow: hidden; }
.rc-dcard.fresh, .rc-drow.fresh { animation: rc-dcardin 1.6s ease-out; }
@keyframes rc-dcardin { 0% { border-color: var(--accent, #7c8cf8); background: color-mix(in srgb, var(--accent, #7c8cf8) 10%, transparent); } }
.rc-dc-body { display: flex; gap: 16px; padding: 15px 17px; }
.rc-dc-left { flex: 1; min-width: 0; }
.rc-dc-roihead { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 9px; }
.rc-dc-roi { flex: none; min-width: 92px; padding: 7px 12px 8px; border-radius: 11px; background: var(--bg-3, #1c1f28); }
.rc-dc-roi .n { display: block; font-size: 27px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rc-dc-roi .k { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3, #8a8f98); margin-top: 2px; }
.rc-dc-roi.hot .n, .rc-dr-roi.hot .n { color: var(--green, #2ecc8f); }
.rc-dc-roi.warm .n, .rc-dr-roi.warm .n { color: var(--amber, #e2a336); }
.rc-dc-roi.neg .n, .rc-dr-roi.neg .n { color: var(--red, #e5484d); }
.rc-dc-roi.cold .n, .rc-dr-roi.cold .n { color: var(--text-3, #8a8f98); }
.rc-dc-head { min-width: 0; flex: 1; }
.rc-dc-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-dc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 5px; font-size: 12px; color: var(--text-3, #8a8f98); }
.rc-qtypill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; background: color-mix(in srgb, var(--green, #2ecc8f) 14%, transparent); color: var(--green, #2ecc8f); font-size: 11.5px; font-weight: 700; }
.rc-dc-listing { margin-top: 11px; background: var(--bg-3, #1c1f28); border-radius: 10px; padding: 11px 13px; }
.rc-dc-listing .src { font-size: 12px; font-weight: 600; color: var(--accent, #7c8cf8); margin-bottom: 6px; }
.rc-dc-listing .line { font-size: 13px; line-height: 1.55; display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.rc-newtag { padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--green, #2ecc8f) 14%, transparent); color: var(--green, #2ecc8f); font-size: 10px; font-weight: 700; }
.rc-dc-sec { margin-top: 11px; font-size: 13px; background: var(--bg-3, #1c1f28); border-radius: 10px; padding: 10px 13px 11px; }
.rc-dc-sec .t { font-size: 12px; font-weight: 700; color: var(--accent, #7c8cf8); margin-bottom: 6px; }
.rc-dc-sec .t .sub { font-weight: 600; color: var(--text-3, #8a8f98); }
.rc-dc-sec .sline { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.rc-dc-sec .sline .l { flex: 1; min-width: 0; color: var(--text-3, #8a8f98); font-size: 12px; }
.rc-mtag { padding: 1px 6px; border-radius: 5px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; color: var(--text-3, #8a8f98); }
.rc-scomps { margin-top: 8px; border-top: 1px solid var(--border, #2a2e3a); padding-top: 7px; }
.rc-scomps .ch { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3, #8a8f98); margin-bottom: 4px; }
.rc-scomps .none { font-size: 11.5px; color: var(--text-3, #8a8f98); font-style: italic; line-height: 1.45; }
.rc-crow { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; font-size: 12px; }
.rc-crow .s { flex: 1; min-width: 0; color: var(--text-3, #8a8f98); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-crow b { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-3, #8a8f98); }
.rc-crow.cap b { color: var(--green, #2ecc8f); font-weight: 800; }
.rc-crow.cap .s { color: var(--text, #e8eaed); }
.rc-crow.self .s { font-weight: 700; color: var(--text, #e8eaed); }
.rc-crow .tag { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--accent, #7c8cf8) 14%, transparent); color: var(--accent, #7c8cf8); font-size: 9.5px; font-weight: 700; }
.rc-crow .capnote { font-size: 9.5px; font-weight: 700; color: var(--green, #2ecc8f); letter-spacing: .03em; }
.rc-dc-right { flex: none; width: 186px; display: flex; flex-direction: column; align-items: stretch; gap: 9px; }
.rc-dc-thumb { height: 96px; border-radius: 10px; background: var(--bg-3, #1c1f28); border: 1px solid var(--border, #2a2e3a); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rc-dc-thumb .ph { font-size: 10.5px; color: var(--text-3, #8a8f98); letter-spacing: .05em; text-transform: uppercase; }
.rc-dc-chips { display: flex; gap: 7px; justify-content: center; }
.rc-mchip { width: 33px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.rc-mchip.tm { background: #0B0F19; } .rc-mchip.sh { background: #7c3aed; } .rc-mchip.vs { background: #111; } .rc-mchip.sg { background: #ff4a3d; }
.rc-mchip.off { background: var(--bg-3, #1c1f28); color: var(--text-3, #8a8f98); }
.rc-newseats { border: 1px solid var(--green, #2ecc8f); background: color-mix(in srgb, var(--green, #2ecc8f) 12%, transparent); color: var(--green, #2ecc8f); border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-weight: 600; text-align: center; }
.rc-dc-rel { font-size: 10.5px; color: var(--text-3, #8a8f98); text-align: center; }
.rc-snipe { border-top: 1px dashed var(--border, #2a2e3a); background: var(--bg-3, #1c1f28); padding: 11px 17px 13px; }
.rc-snipe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rc-snipe-head .t { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3, #8a8f98); }
.rc-snipe-head .note { font-size: 10.5px; color: var(--text-3, #8a8f98); font-style: italic; }
.rc-snipe-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-snipe-row .lab { font-size: 11px; font-weight: 600; color: var(--text-3, #8a8f98); min-width: 46px; }
.rc-bchips { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-bchip { border: 1px solid var(--border, #2a2e3a); background: var(--bg-2, #16181f); color: var(--text-3, #8a8f98); border-radius: 8px; padding: 4px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.rc-bchip:hover { border-color: var(--accent, #7c8cf8); color: var(--text, #e8eaed); }
.rc-bchip .runs { font-size: 10px; color: var(--text-3, #8a8f98); font-variant-numeric: tabular-nums; }
.rc-bchip.on { border-color: var(--accent, #7c8cf8); background: color-mix(in srgb, var(--accent, #7c8cf8) 12%, transparent); color: var(--accent, #7c8cf8); }
.rc-bchip .star { color: var(--amber, #e2a336); font-size: 10px; }
.rc-segbtns { display: inline-flex; border: 1px solid var(--border, #2a2e3a); border-radius: 8px; overflow: hidden; background: var(--bg-2, #16181f); }
.rc-segbtns button { border: 0; border-right: 1px solid var(--border, #2a2e3a); background: transparent; color: var(--text-3, #8a8f98); font-size: 11.5px; font-weight: 600; padding: 5px 13px; cursor: pointer; }
.rc-segbtns button:last-child { border-right: 0; }
.rc-segbtns button.on { background: var(--accent, #7c8cf8); color: #fff; }
.rc-snipebtn { margin-left: auto; border: 0; border-radius: 9px; background: var(--accent, #7c8cf8); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; padding: 8px 20px; cursor: not-allowed; opacity: .55; }
.rc-dgroup { display: flex; flex-direction: column; }
.rc-dexp { margin-top: 10px; }
.rc-dr-caret { flex: none; width: 14px; color: var(--text-3, #8a8f98); font-size: 10px; transition: transform .15s ease; }
.rc-dgroup.open .rc-dr-caret { transform: rotate(90deg); color: var(--accent, #7c8cf8); }
.rc-drow { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border, #2a2e3a); border-radius: 10px; background: var(--bg-2, #16181f); padding: 10px 14px; cursor: pointer; }
.rc-drow:hover { background: var(--bg-3, #1c1f28); }
.rc-dr-roi { flex: none; min-width: 74px; }
.rc-dr-roi .n { font-size: 21px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rc-dr-roi .k { font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3, #8a8f98); }
.rc-dr-main { flex: 1; min-width: 0; }
.rc-dr-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-dr-meta { font-size: 11.5px; color: var(--text-3, #8a8f98); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.rc-dr-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex: none; }
.rc-pillbadge { padding: 2px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; }
.rc-pillbadge.presale { background: var(--accent, #7c8cf8); color: #fff; }
.rc-pillbadge.newseats { background: color-mix(in srgb, var(--green, #2ecc8f) 14%, transparent); color: var(--green, #2ecc8f); }
.rc-tmtile { flex: none; width: 62px; height: 46px; border-radius: 10px; background: #0B0F19; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.rc-tmtile:hover { opacity: .88; color: #fff; }
.rc-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.rc-stats-card { padding: 14px 16px; }
.rc-stats-card h4 { margin: 0 0 10px; font-size: 12px; }
.rc-stats-row { display: flex; gap: 20px; margin-bottom: 10px; }
.rc-stats-num { display: flex; flex-direction: column; }
.rc-stats-num b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-stats-num b.ok { color: var(--green, #2ecc8f); }
.rc-stats-num b.bad { color: var(--red, #e5484d); }
.rc-stats-num b.warn { color: var(--amber, #e2a336); }
.rc-stats-num span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #8a8f98); }
.rc-stats-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg-3, #1c1f28); }
.rc-stats-bar .seg.ok { background: var(--green, #2ecc8f); }
.rc-stats-bar .seg.bad { background: var(--red, #e5484d); }
.rc-stats-bar .seg.warn { background: var(--amber, #e2a336); }
.rc-h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3, #8a8f98); font-weight: 600; margin: 0 0 8px; }
.rc-flagged { list-style: none; margin: 0; padding: 0; }
.rc-flagged li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border, #2a2e3a); font-size: 12.5px; }
.rc-flagged li:last-child { border-bottom: 0; }
.rc-flagged-name { font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-flagged-issues { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.rc-flagged-tag { padding: 1px 7px; border-radius: 5px; font-size: 10px; font-weight: 600; background: var(--bg-3, #1c1f28); color: var(--text-3, #8a8f98); }
.rc-flagged-tag.err { background: color-mix(in srgb, var(--red, #e5484d) 12%, transparent); color: var(--red, #e5484d); }
.rc-flagged-tag.warn { background: color-mix(in srgb, var(--amber, #e2a336) 12%, transparent); color: var(--amber, #e2a336); }
.rc-venues-list { display: flex; flex-direction: column; gap: 6px; }
.rc-venue-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.rc-venue-row:hover { border-color: var(--border-2, #3a3f4d); }
.rc-venue-row .vname { font-weight: 600; font-size: 13px; min-width: 0; }
.rc-venue-row .vmeta { font-size: 11px; color: var(--text-3, #8a8f98); font-weight: 400; margin-top: 2px; }
.rc-vbadge { flex: none; padding: 2px 10px; border-radius: 20px; font-size: 10.5px; font-weight: 700; }
.rc-vbadge.done { background: color-mix(in srgb, var(--green, #2ecc8f) 14%, transparent); color: var(--green, #2ecc8f); }
.rc-vbadge.undone { background: color-mix(in srgb, var(--amber, #e2a336) 14%, transparent); color: var(--amber, #e2a336); }
.rc-venue-editor { display: none; gap: 14px; }
.rc-venue-editor.on { display: flex; }
.rc-venue-map-col { flex: 1; min-width: 0; }
.rc-venue-side { flex: 0 0 300px; display: flex; flex-direction: column; gap: 10px; }
.rc-venue-shows { font-size: 12px; color: var(--text-3, #8a8f98); }
.rc-venue-shows b { color: var(--text, #e8eaed); }
.rc-vg-list { display: flex; flex-direction: column; gap: 8px; }
.rc-vg-card { background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.rc-vg-card.editing { border-color: var(--accent, #7c8cf8); }
.rc-vg-card.drag { opacity: .5; }
.rc-vg-card h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rc-vg-card h4 .btn { margin-left: auto; }
.rc-vg-rank { width: 20px; height: 20px; border-radius: 6px; background: var(--bg-3, #1c1f28); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: grab; }
.rc-vg-edit { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #8a8f98); }
.rc-vg-card.editing .rc-vg-edit { color: var(--accent, #7c8cf8); }
.rc-vg-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-vg-chip { padding: 2px 7px; border-radius: 5px; background: var(--bg-3, #1c1f28); font-size: 11px; }
.rc-vg-empty { font-size: 11.5px; color: var(--text-3, #8a8f98); font-style: italic; }
.rc-settings-section { padding: 16px 18px; margin-bottom: 14px; }
.rc-settings-section h3 { margin: 0 0 6px; font-size: 14px; }
.rc-optional { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3, #8a8f98); font-weight: 600; margin-left: 8px; }
.rc-textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; resize: vertical; margin-top: 8px; }
.rc-settings-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.rc-flash { font-size: 12px; }
.rc-flash.ok { color: var(--green, #2ecc8f); }
.rc-flash.err { color: var(--red, #e5484d); }
.rc-cad-note { font-size: 11px; background: color-mix(in srgb, var(--amber, #e2a336) 12%, transparent); color: var(--amber, #e2a336); padding: 2px 8px; border-radius: 5px; }
.rc-modal-backdrop { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.55); display: none; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow: auto; }
.rc-modal-backdrop.show { display: flex; }
.rc-modal { position: relative; width: 100%; max-width: 880px; background: var(--bg-2, #16181f); border: 1px solid var(--border, #2a2e3a); border-radius: 14px; overflow: hidden; }
.rc-m-close { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--bg-3, #1c1f28); border: 1px solid var(--border, #2a2e3a); color: var(--text, #e8eaed); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 16px; }
.rc-m-header { display: flex; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border, #2a2e3a); }
.rc-m-info { flex: 1; min-width: 0; }
.rc-m-name { font-size: 19px; font-weight: 700; }
.rc-m-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-3, #8a8f98); margin-top: 5px; }
.rc-m-actions { margin-top: 12px; }
.rc-m-minimap { flex: 0 0 240px; max-width: 240px; height: 170px; border: 1px solid var(--border, #2a2e3a); border-radius: 10px; overflow: hidden; background: #fff; }
.rc-m-minimap svg { width: 100%; height: 100%; }
.rc-m-body { padding: 16px 22px; }
.rc-m-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rc-m-col { background: var(--bg-3, #1c1f28); border-radius: 10px; padding: 12px 14px; }
.rc-m-col .ct { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3, #8a8f98); display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.rc-m-col .ct .dot { width: 9px; height: 9px; border-radius: 3px; }
.rc-m-col .ml { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12.5px; }
.rc-m-col .ml .k { color: var(--text-3, #8a8f98); }
.rc-m-col .ml b { font-variant-numeric: tabular-nums; }
.rc-m-col .ml b.up { color: var(--green, #2ecc8f); }
.rc-m-col .ml b.down { color: var(--red, #e5484d); }
.rc-m-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.rc-m-links a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border, #2a2e3a); background: var(--bg-3, #1c1f28); color: var(--text, #e8eaed); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.rc-m-links a:hover { border-color: var(--accent, #7c8cf8); color: var(--accent, #7c8cf8); }
.rc-m-links .sq { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; }
.rc-m-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 12px; }
.rc-m-tbl thead th { text-align: right; padding: 8px 12px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3, #8a8f98); font-weight: 600; border-bottom: 1px solid var(--border, #2a2e3a); background: var(--bg-3, #1c1f28); }
.rc-m-tbl thead th.left, .rc-m-tbl tbody td.left { text-align: left; }
.rc-m-tbl tbody td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--border, #2a2e3a); font-variant-numeric: tabular-nums; }
.rc-m-tbl tbody tr.roi-hot { background: color-mix(in srgb, var(--green, #2ecc8f) 8%, transparent); }
.rc-m-tbl tbody tr.roi-warm { background: color-mix(in srgb, var(--amber, #e2a336) 8%, transparent); }
.rc-m-tbl tbody tr.roi-neg { background: color-mix(in srgb, var(--red, #e5484d) 8%, transparent); }
.rc-m-hist { margin-top: 14px; }
.rc-m-hist-body { display: none; }
.rc-m-hist.open .rc-m-hist-body { display: block; }
.rc-m-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--border, #2a2e3a); font-size: 12px; color: var(--text-3, #8a8f98); }
.rc-filter-panel { position: fixed; top: 0; right: -380px; width: 380px; max-width: 92vw; height: 100vh; z-index: 90; background: var(--bg-2, #16181f); border-left: 1px solid var(--border, #2a2e3a); box-shadow: -4px 0 20px rgba(0,0,0,.35); transition: right .25s ease; display: flex; flex-direction: column; }
.rc-filter-panel.open { right: 0; }
.rc-fp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border, #2a2e3a); }
.rc-fp-head .t { font-size: 15px; font-weight: 600; }
.rc-fp-body { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.rc-fp-group { display: flex; flex-direction: column; gap: 6px; }
.rc-fp-group label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3, #8a8f98); }
.rc-fp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-fp-chip { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--border, #2a2e3a); background: var(--bg-2, #16181f); color: var(--text-3, #8a8f98); font-size: 12px; font-weight: 600; cursor: pointer; }
.rc-fp-chip.on { border-color: var(--accent, #7c8cf8); background: color-mix(in srgb, var(--accent, #7c8cf8) 12%, transparent); color: var(--accent, #7c8cf8); }
.rc-fp-row { display: flex; gap: 8px; align-items: center; }
.rc-fp-foot { padding: 14px 18px; border-top: 1px solid var(--border, #2a2e3a); display: flex; gap: 8px; }
.rc-fp-foot .btn { flex: 1; }

/* ── Phase 7b responsive (mobile 390px) ── */
@media (max-width: 1100px) {
  .mtq-split { grid-template-columns: 1fr; }
  .mtq-sales-panel { position: static; max-height: none; }
  .rc-map-layout { flex-direction: column; }
  .rc-map-sidebar { flex: 0 0 auto; max-height: 40vh; border-left: none; border-top: 1px solid var(--border, #2a2e3a); }
  .rc-venue-editor.on { flex-direction: column; }
  .rc-venue-side { flex: 0 0 auto; }
}
@media (max-width: 760px) {
  .nfp-layout { grid-template-columns: 1fr; }
  .nfp-channels { position: static; max-height: none; display: flex; flex-direction: row; gap: 6px; overflow-x: auto; }
  .nfp-ch { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--border, #2a2e3a); }
  .nfp-ch-meta { display: inline; margin: 0 0 0 6px; }
  .sp-search-grid, .mtq-search-grid { grid-template-columns: 1fr; }
  .rc-panels, .rc-stats-grid, .rc-m-cols { grid-template-columns: 1fr; }
  .rc-metrics { grid-template-columns: repeat(2, 1fr); }
  .rc-dc-body { flex-direction: column; }
  .rc-dc-right { width: auto; flex-direction: row; align-items: center; }
  .rc-dc-thumb { flex: 1; height: 70px; }
  .rc-m-header { flex-direction: column; }
  .rc-m-minimap { flex: 0 0 auto; max-width: none; width: 100%; height: 200px; }
  #mapContainer, #venueMapContainer { height: 54vh; min-height: 300px; }
  .rc-card .c-meta .mi.trunc { max-width: 180px; }
}

/* ==========================================================================
   Phase 7c — final slice: sidebar collapse, session replays, license
   dashboard, admin panel
   ========================================================================== */

/* ── desktop sidebar collapse (port of app_control.html:1806–1824) ── */
.sidebar { transition: width 0.25s cubic-bezier(0.2, 0, 0, 1), padding 0.25s cubic-bezier(0.2, 0, 0, 1); }
.sidebar.desktop-collapsed { width: 0; padding-left: 0; padding-right: 0; overflow: hidden; border-right: none; }
#sidebar-collapse-btn {
  position: fixed;
  left: 232px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 31;
  width: 20px;
  height: 48px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-left: none;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-subtle);
  padding: 0;
  transition: left 0.25s cubic-bezier(0.2, 0, 0, 1), background 0.15s, color 0.15s;
}
#sidebar-collapse-btn:hover { background: var(--surface-2); color: var(--ink); }
#sidebar-collapse-btn svg { transition: transform 0.25s; }
#sidebar-collapse-btn.collapsed { left: 0; }
#sidebar-collapse-btn.collapsed svg { transform: rotate(180deg); }
@media (max-width: 1023px) { #sidebar-collapse-btn { display: none !important; } }

/* ── session replays ── */
.sr-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: var(--sp-md); align-items: start; }
.sr-list { display: grid; gap: 8px; max-height: calc(100vh - 160px); overflow: auto; }
.sr-session {
  width: 100%; padding: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface-1); color: inherit; font: inherit;
}
.sr-session:hover, .sr-session.active { border-color: var(--primary); background: var(--surface-2); }
.sr-session strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-meta { margin-top: 5px; color: var(--ink-subtle); font-size: 11px; line-height: 1.45; }
.sr-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-sm); font-size: 12px; }
.sr-pill { padding: 5px 9px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface-1); color: var(--ink-muted); }
.sr-player {
  min-height: 520px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--canvas); overflow: auto;
}
.sr-stop {
  padding: 10px 12px; margin-top: 8px; border-left: 3px solid var(--warning, #f59e0b);
  border-radius: var(--r-sm); background: var(--surface-1);
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap;
}
@media (max-width: 1023px) { .sr-layout { grid-template-columns: 1fr; } .sr-list { max-height: 320px; } }

/* ── license dashboard + admin panel ── */
.lic-card { border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-1); padding: 16px 18px; margin-bottom: 12px; }
.lic-label { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.lic-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lic-row:last-child { margin-bottom: 0; }
.lic-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  padding: 5px 10px; border-radius: var(--r-sm);
  background: var(--canvas); border: 1px solid var(--hairline);
  color: var(--ink-muted); letter-spacing: 0.04em; word-break: break-all;
}
.lic-copied { color: var(--success, #3fb950); font-size: 12.5px; font-weight: 500; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th, .adm-table td { border-bottom: 1px solid var(--hairline); text-align: left; padding: 8px; vertical-align: middle; }
.adm-table th { color: var(--ink-subtle); font-weight: 500; }
.adm-row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
