/* Resilia Dashboard UI Kit styles */
@import url('../../colors_and_type.css');

html, body, #root { height: 100%; }
body { background: var(--bg-app); color: var(--fg-1); font-size: 14px; overflow: hidden; }

[data-accent="amber"] { --primary-50:#fef6e7;--primary-100:#fde6b8;--primary-300:#f5c05a;--primary-500:#e69a0c;--primary-600:#c07d00;--primary-700:#a56c00; }
[data-accent="indigo"] { --primary-50:#eef0ff;--primary-100:#dde1fc;--primary-300:#a5adf5;--primary-500:#4f46e5;--primary-600:#3f38c4;--primary-700:#312aa0; }

/* ===================== APP SHELL ===================== */
.app { display: flex; flex-direction: column; height: 100vh; }
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
  padding: 24px;
}
.auth-panel {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.auth-mark { width: 34px; height: 34px; }
.auth-brand { font-weight: 700; font-size: 18px; }
.auth-button { width: 100%; justify-content: center; }

/* ===================== TOPBAR ===================== */
.topbar {
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-mark { height: 24px; width: 24px; }
.topbar-brand { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.topbar-divider { width: 1px; height: 18px; background: var(--border-default); margin: 0 4px; }
.topbar-workspace {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; padding: 4px 10px;
  border-radius: 6px; font: inherit; color: var(--fg-1); cursor: pointer;
  font-weight: 500;
}
.topbar-workspace:hover { background: var(--bg-hover); }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  width: min(520px, 60%);
  height: 34px; padding: 0 12px;
  background: var(--bg-sunken); border: 1px solid var(--border-default);
  border-radius: 8px; color: var(--fg-3);
}
.topbar-search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--fg-1); outline: none; font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.admin-pending-badge {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px;
  border: 1px solid #fecaca; border-radius: 999px;
  background: #fff1f2; color: #b42318;
  font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.admin-pending-badge:hover { background: #ffe4e6; }
.admin-pending-dot { width: 7px; height: 7px; border-radius: 999px; background: #d92d20; }
.topbar-credits { display: inline-flex; gap: 6px; align-items: center; }
.credit-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid transparent;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.credit-chip-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.credit-chip-value { font-variant-numeric: tabular-nums; opacity: 0.9; }
.icon-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--fg-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--fg-1); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.topbar-user { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-user-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); font-size: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--primary-500); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}

/* ===================== TABBAR ===================== */
.tabbar {
  display: flex; gap: 2px;
  padding: 0 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}
.tab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px;
  white-space: nowrap;
  flex-shrink: 0;
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--fg-2);
  cursor: pointer; position: relative; top: 1px;
  transition: color 120ms var(--ease-standard);
}
.tab:hover:not(.active) { color: var(--fg-1); }
.tab.active { color: var(--fg-brand); border-bottom-color: var(--primary-500); font-weight: 600; }
.tab-count {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--bg-sunken); padding: 1px 7px; border-radius: 999px; color: var(--fg-3);
}
.tab.active .tab-count { background: var(--primary-50); color: var(--primary-700); }

/* ===================== CONTENT SHELL ===================== */
.workspace-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--bg-app);
}
.management-sidebar {
  flex: 0 0 236px;
  width: 236px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-default);
  overflow: hidden;
  transition: flex-basis 160ms var(--ease-standard), width 160ms var(--ease-standard), padding 160ms var(--ease-standard);
}
.management-sidebar.collapsed {
  flex-basis: 56px;
  width: 56px;
  padding: 10px 8px;
}
.management-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.management-sidebar.collapsed .management-sidebar-head { justify-content: center; }
.management-title { font-size: 12px; font-weight: 800; color: var(--fg-1); text-transform: uppercase; letter-spacing: 0.04em; }
.management-subtitle { margin-top: 1px; color: var(--fg-3); font-size: 11px; }
.management-toggle {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-default); border-radius: 8px;
  background: var(--bg-surface); color: var(--fg-2);
  cursor: pointer;
}
.management-toggle:hover { background: var(--bg-hover); color: var(--fg-1); }
.management-sidebar:not(.collapsed) .management-toggle svg { transform: rotate(90deg); }
.management-nav { display: flex; flex-direction: column; gap: 6px; }
.management-nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.management-nav-item:hover { background: var(--bg-hover); color: var(--fg-1); }
.management-nav-item.active { background: var(--primary-50); border-color: var(--primary-300); color: var(--fg-brand); }
.management-nav-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.management-nav-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.management-nav-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 11px; }
.management-count {
  min-width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff1f2;
  color: #b42318;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}
.management-sidebar.collapsed .management-nav { align-items: center; }
.management-sidebar.collapsed .management-nav-item {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}
.management-sidebar.collapsed .management-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
}
.content {
  flex: 1; overflow-y: auto;
  min-width: 0;
  padding: 24px 32px 120px;
  background: var(--bg-app);
}
.content-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.content-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.content-sub { font-size: 12px; color: var(--fg-3); }
.content-hdr .spacer { flex: 1; }

/* ===================== SEARCH ROW ===================== */
.search-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.search-row {
  display: grid;
  grid-template-columns: 190px minmax(180px, 1.6fr) 80px auto auto auto;
  gap: 10px; align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 10px; padding: 10px 12px;
}
.search-row.has-adspy,
.search-row.has-brandsearch { grid-template-columns: 190px minmax(180px, 1.6fr) 80px auto auto auto auto; }
.search-row.has-adspy.has-brandsearch { grid-template-columns: 190px minmax(180px, 1.3fr) 72px auto auto auto auto auto; }
.sr-select {
  height: 32px; padding: 0 28px 0 10px;
  font: inherit; font-size: 13px; color: var(--fg-1);
  background: var(--bg-sunken); border: 1px solid var(--border-default);
  border-radius: 6px; outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.sr-select:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); background-color: var(--bg-surface); }
.sr-input {
  height: 32px; padding: 0 10px;
  font: inherit; font-size: 13px; color: var(--fg-1);
  background: var(--bg-sunken); border: 1px solid var(--border-default);
  border-radius: 6px; outline: none;
}
.sr-input:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); background: var(--bg-surface); }
.sr-num { text-align: center; font-family: var(--font-mono); }
.sr-num::-webkit-inner-spin-button, .sr-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.sr-toggles { display: flex; gap: 6px; }
.sr-row-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  background: var(--bg-sunken);
  color: var(--fg-1);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sr-row-search:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); }
.sr-row-search:disabled { opacity: 0.65; cursor: default; }
.sr-foreplay-filters,
.sr-adspy-filters,
.sr-brandsearch-filters {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sr-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--fg-3);
  font-size: 11px;
}
.sr-mini input {
  width: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg-1);
  font: inherit;
  font-family: var(--font-mono);
}
.sr-mini.wide input { width: 92px; }
.sr-mini.date input { width: 96px; }
.sr-mini-select { width: 86px; }
.sr-mini-select.wide { width: 116px; }
.sr-bs-platform { width: 92px; }
.sr-url-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.sr-url-input { width: 100%; }
.plat-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  background: var(--bg-sunken); color: var(--fg-3);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font: inherit; font-size: 11px; font-weight: 500;
  cursor: pointer;
  transition: all 120ms var(--ease-standard);
}
.plat-toggle:hover { color: var(--fg-1); }
.plat-dot { width: 6px; height: 6px; border-radius: 999px; }

.sr-add {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px dashed var(--border-strong);
  border-radius: 8px; padding: 8px 12px;
  color: var(--fg-2); font: inherit; font-size: 13px;
  cursor: pointer; align-self: flex-start;
}
.sr-add:hover { background: var(--bg-hover); color: var(--fg-1); border-style: solid; border-color: var(--border-default); }

/* ===================== PRIMARY BUTTONS ===================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  background: var(--primary-500); color: #fff;
  border: 0; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background 120ms var(--ease-standard);
}
.btn-primary:hover { background: var(--primary-600); }
.btn-primary:active { background: var(--primary-700); }
.btn-primary:disabled { background: var(--neutral-200); color: var(--fg-4); cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  background: var(--bg-surface); color: var(--fg-1);
  border: 1px solid var(--border-default);
  border-radius: 8px; font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-secondary.compact { height: 28px; padding: 0 9px; font-size: 12px; }
.btn-secondary.danger { color: #b42318; border-color: #fecaca; }
.btn-secondary.danger:hover { background: #fff1f2; }
.ghost-btn {
  background: transparent; border: 0; padding: 4px 8px;
  color: var(--fg-3); font: inherit; font-size: 12px; cursor: pointer;
  border-radius: 6px;
}
.ghost-btn:hover { background: var(--bg-hover); color: var(--fg-1); }

/* ===================== PLATFORM PANEL ===================== */
.platform-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.pp-hdr {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky; top: 0; z-index: 2;
}
.pp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.pp-dot { width: 6px; height: 6px; border-radius: 999px; }
.pp-count { font-size: 12px; color: var(--fg-2); font-weight: 500; }
.pp-dedupe { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--fg-3); font-family: var(--font-mono); }
.pp-spacer { flex: 1; }
.pp-selected { font-size: 12px; color: var(--primary-600); font-family: var(--font-mono); font-weight: 600; }

.pp-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.pp-grid.density-comfortable { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; padding: 18px; }
.pp-grid.density-compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px; }

/* ===================== AD CARD ===================== */
.ad {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 120ms var(--ease-standard);
  display: flex; flex-direction: column;
}
.ad:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.ad.sel { border-color: var(--primary-500); box-shadow: var(--shadow-focus); }
.ad.current-run {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px rgba(15, 181, 168, 0.24), var(--shadow-xs);
}
.ad-thumb {
  aspect-ratio: 4/5; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #111827;
}
.ad-cbx {
  position: absolute; top: 8px; left: 8px;
  width: 20px; height: 20px;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.08);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  box-shadow: var(--shadow-xs);
  transition: all 120ms var(--ease-standard);
  z-index: 2;
}
.ad-cbx.on { background: var(--primary-500); border-color: var(--primary-500); color: #fff; }
.ad-plat {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
  z-index: 2;
}
.ad-plat-dot { width: 5px; height: 5px; border-radius: 999px; }
.ad-current-run {
  position: absolute;
  top: 34px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary-500);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}
.ad-play {
  position: relative;
  z-index: 2;
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 150ms var(--ease-standard);
}
.ad:hover .ad-play { background: rgba(0,0,0,0.75); transform: scale(1.05); }
.ad-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.7); color: #fff;
  padding: 1px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  z-index: 2;
}
.ad-expand {
  position: absolute; bottom: 8px; left: 8px;
  width: 26px; height: 26px;
  background: rgba(0,0,0,0.55); color: #fff;
  border: 0; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 120ms var(--ease-standard), background 120ms var(--ease-standard);
  z-index: 2;
}
.ad:hover .ad-expand { opacity: 1; }
.ad-expand:hover { background: rgba(0,0,0,0.8); }
.ad-brand-row { display: flex; align-items: center; gap: 6px; }
.ad-has-transcript {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--primary-50); color: var(--primary-600);
}
[data-theme="dark"] .ad-has-transcript { background: rgba(47,179,156,0.15); color: var(--primary-300); }

/* ===================== DRAWER ===================== */
.drawer-scrim {
  position: fixed; inset: 0; background: var(--bg-overlay);
  z-index: 300;
  animation: scrim-in 180ms var(--ease-standard);
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(520px, 92vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
  z-index: 301;
  display: flex; flex-direction: column;
  animation: drawer-in 220ms var(--ease-standard);
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.drawer-id { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.drawer-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}
.drawer-media {
  aspect-ratio: 4/5;
  max-height: 400px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drawer-section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-section:last-child { border-bottom: 0; }
.drawer-brand { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.drawer-copy { font-size: 14px; color: var(--fg-2); line-height: 1.55; margin: 0; }
.drawer-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; margin-top: 4px;
}
.stat {
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-label {
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500;
}
.stat-value { font-size: 13px; font-weight: 600; color: var(--fg-1); }
.stat-score {
  display: inline-flex; align-items: center; gap: 4px;
  color: #a56c00; font-family: var(--font-mono);
}
[data-theme="dark"] .stat-score { color: #f5c05a; }
.drawer-section-hdr {
  display: flex; align-items: center; gap: 8px;
}
.drawer-section-title {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-2);
}
.drawer-section-meta { font-size: 11px; color: var(--fg-3); font-family: var(--font-mono); }
.transcript-body {
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 360px; overflow-y: auto;
}
.transcript-line {
  display: grid; grid-template-columns: 52px 1fr;
  gap: 12px; align-items: baseline;
  font-size: 13px; line-height: 1.5;
}
.transcript-t {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--primary-600); font-weight: 600;
}
[data-theme="dark"] .transcript-t { color: var(--primary-300); }
.transcript-body-text { color: var(--fg-1); }
.ad-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ad-body-min { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 10px; }
.ad-brand { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.ad-copy { font-size: 12px; color: var(--fg-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-direction {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%;
  padding: 2px 7px; border-radius: 999px;
  background: var(--primary-50, #e7f5f3); color: var(--primary-500, #0fb5a8);
  border: 1px solid var(--primary-500, #0fb5a8);
  font-size: 11px; font-weight: 500;
  margin-top: 2px;
}
.ad-direction span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 220px;
}
.ad-search-return {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--fg-2);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 500;
}
.ad-search-return span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.search-run-summary {
  margin: 14px 14px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.search-run-summary.current {
  border-color: var(--primary-500);
  background: var(--primary-50, #e7f5f3);
}
.search-run-summary.previous {
  background: var(--bg-sunken);
}
.search-run-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-run-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-1);
  font-size: 12px;
  font-weight: 700;
}
.search-run-count {
  color: var(--fg-2);
  font-size: 12px;
  font-family: var(--font-mono);
}
.search-run-muted,
.search-run-labels {
  color: var(--fg-3);
  font-size: 11px;
}
.search-run-labels {
  max-width: min(520px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-run-empty {
  margin: 0 14px 16px;
  padding: 12px 14px;
  border: 1px dashed var(--border-default);
  border-radius: 8px;
  color: var(--fg-3);
  background: var(--bg-surface);
  font-size: 13px;
}
.ad-meta {
  display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap;
  font-size: 11px; color: var(--fg-3); font-family: var(--font-mono);
  margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--border-subtle);
}
.ad-score {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px; border-radius: 4px;
  background: #fef6e7; color: #a56c00;
  font-weight: 600; font-family: var(--font-mono);
}
[data-theme="dark"] .ad-score { background: #3a2a0a; color: #f5c05a; }
.ad-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #ffede2;
  color: #9a3412;
  font-weight: 600;
  font-family: var(--font-mono);
}
.ad-metric-label {
  font-family: inherit;
  font-size: 9px;
  text-transform: uppercase;
  opacity: 0.72;
}
[data-theme="dark"] .ad-metric-chip { background: rgba(234,88,12,0.18); color: #fdba74; }
.ad-metric-chip.bs { background: #e0f2fe; color: #0369a1; }
[data-theme="dark"] .ad-metric-chip.bs { background: rgba(2,132,199,0.2); color: #7dd3fc; }

/* ===================== SELECTION BAR ===================== */
.selbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 24px;
  display: flex; align-items: center; gap: 12px;
  background: var(--neutral-900); color: #fff;
  border-radius: 12px;
  padding: 10px 12px 10px 18px;
  box-shadow: var(--shadow-xl);
  z-index: 100;
  min-width: 520px;
  animation: selbar-in 180ms var(--ease-standard);
}
@keyframes selbar-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.selbar-count { font-size: 13px; font-weight: 500; }
.selbar-n { font-family: var(--font-mono); color: var(--primary-300); font-weight: 700; font-size: 14px; }
.selbar-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.12);
  color: #eef0f3; padding: 5px 10px; border-radius: 6px;
  font: inherit; font-size: 12px; cursor: pointer;
}
.selbar-ghost:hover { background: rgba(255,255,255,0.08); }
.selbar-spacer { flex: 1; }
.selbar-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  background: var(--primary-500); color: #fff;
  border: 0; border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.selbar-primary:hover { background: var(--primary-400); }
.selbar-kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 6px; background: rgba(0,0,0,0.25); border-radius: 3px;
  color: rgba(255,255,255,0.8); margin-left: 2px;
}

/* ===================== TRANSCRIPT ===================== */
.transcript {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 120ms var(--ease-standard);
}
.transcript:hover { border-color: var(--border-strong); }
.transcript.sel { border-color: var(--primary-500); box-shadow: var(--shadow-focus); }
.t-hdr { display: flex; align-items: center; gap: 10px; }
.t-cbx {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all 120ms var(--ease-standard);
}
.t-cbx.on { background: var(--primary-500); border-color: var(--primary-500); color: #fff; }
.t-brand { font-size: 13px; font-weight: 600; }
.t-meta { font-size: 11px; color: var(--fg-3); font-family: var(--font-mono); margin-left: auto; }
.t-script {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  color: var(--fg-2);
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.t-line { display: flex; gap: 8px; align-items: baseline; }
.t-tag { color: var(--primary-600); font-weight: 700; font-size: 10px; letter-spacing: 0.04em; min-width: 70px; }
.t-hdr-spacer { flex: 1; }
.t-edit-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border-default); background: transparent;
  color: var(--fg-2); font: inherit; font-size: 12px; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.t-edit-btn:hover:not(:disabled) { color: var(--fg-1); border-color: var(--primary-500); }
.t-edit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.t-edit-btn.primary {
  background: var(--primary-500); color: #fff; border-color: var(--primary-500);
}
.t-edit-btn.primary:hover:not(:disabled) { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.t-edit-btn.ghost { color: var(--fg-3); }
.t-edit-area {
  width: 100%; min-height: 220px; resize: vertical;
  padding: 12px; margin-top: 4px;
  font-family: inherit; font-size: 13px; line-height: 1.5;
  color: var(--fg-1); background: var(--bg-sunken);
  border: 1px solid var(--border-default); border-radius: 8px; outline: none;
}
.t-edit-area:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); }
.ar-script-readonly {
  margin: 0;
  min-height: 180px;
  padding: 12px;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-1);
  background: var(--bg-sunken);
  border: 0;
  border-radius: 0;
  overflow: auto;
}

.ar-result-hdr {
  min-height: 30px;
}
.ar-result-card.current-run {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px rgba(15, 181, 168, 0.24), var(--shadow-xs);
}
.ar-script-toggle {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--fg-2);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.12s, color 0.12s;
  flex-shrink: 0;
}
.ar-script-toggle:hover {
  color: var(--fg-1);
  border-color: var(--primary-500);
}
.ar-script-toggle svg { transition: transform 0.14s ease; }
.ar-script-toggle.open svg { transform: rotate(180deg); }
.ar-result-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--bg-sunken);
  color: var(--fg-3);
  border: 1px solid var(--border-subtle);
}
.ar-result-status.ready {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-500);
}
.ar-result-status.error {
  background: #fff1f1;
  color: #b42318;
  border-color: #f3b3ad;
}
[data-theme="dark"] .ar-result-status.error {
  background: rgba(180,35,24,0.16);
  color: #ffb4aa;
  border-color: rgba(255,180,170,0.28);
}
.ar-result-meta {
  padding: 8px 14px 0;
  color: var(--fg-3);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ar-result-meta .ad-direction {
  margin-top: 0;
}

.ar-source-preview {
  display: grid;
  grid-template-columns: minmax(132px, 180px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin: 10px 0 2px;
  padding: 0 14px;
}
.ar-source-media {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover !important;
  background-position: center !important;
}
.ar-source-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.ar-source-video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #111827;
  z-index: 1;
}
.ar-source-media > .ad-plat,
.ar-source-media > .ad-play,
.ar-source-media > .ad-duration,
.ar-source-media > .ar-source-score {
  z-index: 2;
}
.ar-source-play { border: 0; cursor: pointer; }
.ar-source-play:disabled { opacity: 0.65; cursor: default; }
.ar-source-score {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.68);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.ar-source-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  padding: 4px 0;
}
.ar-source-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ar-source-title { font-size: 12px; font-weight: 700; color: var(--fg-1); }
.ar-source-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
[data-theme="dark"] .ar-source-pill { background: rgba(47,179,156,0.16); color: var(--primary-300); }
.ar-source-pill.muted { background: var(--bg-sunken); color: var(--fg-3); }
.ar-source-copy {
  margin: 0;
  color: var(--fg-2);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ar-source-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--fg-3);
  font-size: 11px;
}
.ar-source-meta span { display: inline-flex; align-items: center; gap: 3px; }

@media (max-width: 760px) {
  .management-sidebar {
    flex-basis: 56px;
    width: 56px;
    padding: 10px 8px;
  }
  .management-sidebar-head { justify-content: center; }
  .management-title,
  .management-subtitle,
  .management-nav-copy { display: none; }
  .management-nav { align-items: center; }
  .management-nav-item {
    width: 38px;
    height: 38px;
    min-height: 38px;
    display: inline-flex;
    justify-content: center;
    padding: 0;
  }
  .management-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
  }
  .content { padding: 16px 14px 100px; }
  .ar-source-preview { grid-template-columns: 1fr; }
  .ar-source-media { max-width: 220px; }
}

/* ===================== EMPTY ===================== */
.empty {
  border: 1px dashed var(--border-default);
  border-radius: 14px; padding: 56px 24px;
  text-align: center;
  background: var(--bg-surface);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 560px; margin: 0 auto;
}
.empty-display {
  font-family: var(--font-display); font-size: 28px; font-style: italic;
  color: var(--fg-1); letter-spacing: -0.01em;
  white-space: nowrap;
  margin-bottom: 2px;
}
.empty-body { font-size: 13px; color: var(--fg-3); max-width: 420px; margin: 0; line-height: 1.5; }

/* ===================== TOAST ===================== */
.toast {
  position: fixed; top: 72px; right: 24px; z-index: 2000;
  background: var(--neutral-900); color: #fff;
  border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; box-shadow: var(--shadow-lg);
  animation: toast-in 180ms var(--ease-standard);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.toast-badge {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--primary-500); color: #fff;
  padding: 2px 8px; border-radius: 4px; font-weight: 600;
}

/* ===================== TWEAKS PANEL ===================== */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
}
.tweaks-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-2);
}
.tweaks-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.tweak-row { display: flex; flex-direction: column; gap: 6px; }
.tweak-label { font-size: 11px; color: var(--fg-3); font-weight: 500; }
.seg {
  display: flex; background: var(--bg-sunken);
  border: 1px solid var(--border-subtle); border-radius: 8px;
  padding: 3px; gap: 2px;
}
.seg button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: 0;
  padding: 5px 8px;
  font: inherit; font-size: 11px; color: var(--fg-2);
  border-radius: 6px; cursor: pointer; text-transform: capitalize;
}
.seg button:hover { color: var(--fg-1); }
.seg button.on {
  background: var(--bg-surface); color: var(--fg-1);
  box-shadow: var(--shadow-xs);
  font-weight: 500;
}
.seg .swatch { width: 10px; height: 10px; border-radius: 999px; }

.tweaks-fab {
  position: fixed; right: 20px; bottom: 20px;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--neutral-900); color: #fff;
  border: 0; cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}

/* ===================== KBD ===================== */
kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 6px; background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: 4px; color: var(--fg-3);
}

/* ===================== RESEARCH HEADER / SEARCH CARD ===================== */
.search-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.sc-hdr {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.sc-title { font-size: 14px; font-weight: 600; }
.sc-sub { font-size: 12px; color: var(--fg-3); }
.sc-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sc-pass-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-2);
  user-select: none; cursor: pointer;
  padding: 4px 10px; border: 1px solid var(--border-default);
  border-radius: 999px; background: var(--bg-1);
}
.sc-pass-toggle input { margin: 0; cursor: pointer; }
.sc-pass-toggle:hover { background: var(--bg-hover); color: var(--fg-1); }
.sc-filter-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 14px 10px; padding: 8px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: 8px; font-size: 12px; color: var(--fg-2);
}
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--accent, #129683); cursor: pointer;
  font-size: 12px; text-decoration: underline;
}
.link-btn:hover { color: var(--accent-strong, #0f7a6a); }

/* ===================== ADMIN CATALOG ===================== */
.admin-grid-view { display: flex; flex-direction: column; gap: 14px; }
.admin-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(420px, 1fr) minmax(220px, 280px);
  gap: 14px;
  align-items: start;
}
.admin-grid.directions { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
.admin-grid.workspaces { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
.admin-list,
.admin-editor,
.admin-pool-panel,
.admin-workspace-detail {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}
.admin-list { display: flex; flex-direction: column; gap: 4px; padding: 8px; max-height: calc(100vh - 190px); overflow-y: auto; }
.admin-list-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; padding: 9px 10px;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--fg-1);
  font: inherit; text-align: left; cursor: pointer;
}
.admin-list-row:hover { background: var(--bg-hover); }
.admin-list-row.active { border-color: var(--primary-300); background: var(--primary-50); color: var(--fg-brand); }
.admin-list-row.muted { opacity: 0.58; }
.admin-list-row span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.admin-list-row small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 11px; }
.admin-editor { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-form-grid.simple { grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); }
.admin-form-grid label,
.admin-field-full,
.admin-platform-box { display: flex; flex-direction: column; gap: 5px; color: var(--fg-3); font-size: 11px; font-weight: 700; }
.admin-form-grid input,
.admin-form-grid select,
.admin-field-full textarea,
.admin-keyword-add input,
.admin-keyword-add select,
.admin-filter-field input,
.admin-filter-field select,
.admin-platform-box textarea,
.admin-pool-panel textarea {
  width: 100%; border: 1px solid var(--border-default); border-radius: 6px;
  background: var(--bg-sunken); color: var(--fg-1);
  font: inherit; font-size: 12px; outline: none;
}
.admin-form-grid input,
.admin-form-grid select,
.admin-keyword-add input,
.admin-keyword-add select,
.admin-filter-field input,
.admin-filter-field select { height: 32px; padding: 0 9px; }
.admin-field-full textarea { min-height: 72px; resize: vertical; padding: 9px; font-family: var(--font-mono); }
.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-field-full textarea:focus,
.admin-keyword-add input:focus,
.admin-keyword-add select:focus,
.admin-filter-field input:focus,
.admin-filter-field select:focus,
.admin-platform-box textarea:focus,
.admin-pool-panel textarea:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); background: var(--bg-surface); }
.admin-section-title { color: var(--fg-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.direction-keywords textarea { min-height: 150px; font-family: inherit; line-height: 1.45; }
.admin-platform-select-row { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-platform-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--border-default); border-radius: 8px;
  background: var(--bg-surface); color: var(--fg-2);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.admin-platform-toggle.active { border-color: var(--primary-300); background: var(--primary-50); color: var(--fg-brand); }
.admin-platform-toggle input { width: 14px; height: 14px; accent-color: var(--primary-500); }
.admin-keyword-add { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.admin-chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.admin-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%; padding: 4px 7px;
  border: 1px solid var(--border-subtle); border-radius: 999px;
  background: var(--bg-sunken); color: var(--fg-2);
  font-size: 11px; overflow-wrap: anywhere;
}
.admin-chip button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--fg-3); cursor: pointer; padding: 0; }
.admin-platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-platform-box { padding: 10px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-app); }
.admin-platform-box.disabled { opacity: 0.58; }
.admin-platform-box span { color: var(--fg-2); }
.admin-platform-box textarea { min-height: 130px; resize: vertical; padding: 8px; font-family: var(--font-mono); line-height: 1.35; }
.admin-platform-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.admin-platform-box-head small { color: var(--fg-3); font: 600 10px/1 var(--font-mono); }
.admin-filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-filter-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-filter-field.wide,
.admin-filter-field.range { grid-column: span 2; }
.admin-filter-field > span { color: var(--fg-3); font-size: 10px; }
.admin-filter-field input:disabled,
.admin-filter-field select:disabled { cursor: not-allowed; opacity: 0.7; }
.admin-filter-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.admin-danger-row { display: flex; justify-content: flex-end; }
.admin-grid.criteria { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
.criteria-platform-name { display: inline-flex; align-items: center; gap: 7px; }
.criteria-platform-name i { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
.criteria-editor textarea,
.criteria-threshold input {
  width: 100%;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--fg-1);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.criteria-editor textarea:focus,
.criteria-threshold input:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); background: var(--bg-surface); }
.criteria-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.criteria-threshold { width: 150px; display: flex; flex-direction: column; gap: 5px; color: var(--fg-3); font-size: 11px; font-weight: 700; }
.criteria-threshold input { height: 32px; padding: 0 9px; font-family: var(--font-mono); }
.criteria-score textarea { min-height: 210px; resize: vertical; padding: 9px; line-height: 1.5; }
.criteria-rubric textarea { min-height: 150px; resize: vertical; padding: 9px; line-height: 1.5; }
.criteria-signals textarea { min-height: 130px; resize: vertical; padding: 9px; line-height: 1.45; }
.criteria-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.criteria-meta-grid div { border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-sunken); padding: 10px; min-width: 0; }
.criteria-meta-grid span { display: block; color: var(--fg-3); font-size: 11px; margin-bottom: 4px; }
.criteria-meta-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; color: var(--fg-1); }
.cost-dashboard { gap: 16px; }
.cost-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cost-kpi, .cost-panel, .cost-platform-card { border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.cost-kpi { display: grid; gap: 6px; padding: 14px; min-width: 0; }
.cost-kpi span, .cost-kpi small, .cost-panel-head span, .cost-user-id span, .cost-user-total span, .cost-platform-metrics span, .cost-flow-cell span { color: var(--fg-3); font-size: 12px; }
.cost-kpi strong { color: var(--fg-1); font-size: 26px; letter-spacing: 0; overflow-wrap: anywhere; }
.cost-kpi.primary strong { color: var(--primary-700); }
.cost-main-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); gap: 14px; }
.cost-panel { min-width: 0; padding: 14px; }
.cost-panel-head { align-items: center; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cost-panel-head > div:first-child { display: grid; gap: 3px; }
.cost-panel-head strong, .cost-user-id strong, .cost-user-total strong, .cost-platform-title strong, .cost-platform-title span { color: var(--fg-1); font-size: 14px; }
.cost-legend { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.cost-legend span { align-items: center; display: inline-flex; gap: 5px; }
.cost-legend i, .cost-stack-segment { display: block; }
.cost-legend i { border-radius: 99px; height: 8px; width: 8px; }
.cost-legend i.search, .cost-stack-segment.search { background: #2563eb; }
.cost-legend i.autoresearch, .cost-stack-segment.autoresearch { background: #14b8a6; }
.cost-legend i.auto_remodel, .cost-stack-segment.auto_remodel { background: #f97316; }
.cost-user-list, .cost-daily-bars { display: grid; gap: 10px; }
.cost-user-filter-control { align-items: center; display: flex; gap: 8px; max-width: 760px; }
.cost-user-filter-select { background: var(--bg-sunken); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--fg-1); flex: 1; font: inherit; height: 38px; min-width: 260px; padding: 0 10px; }
.cost-user-filter-select:focus { border-color: var(--primary-400); box-shadow: 0 0 0 3px var(--primary-100); outline: none; }
.cost-user-row { align-items: center; display: grid; grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1.3fr) minmax(110px, auto); gap: 12px; padding: 9px 0; }
.cost-user-row + .cost-user-row, .cost-daily-row + .cost-daily-row { border-top: 1px solid var(--border-subtle); }
.cost-user-id, .cost-user-total { display: grid; gap: 3px; min-width: 0; }
.cost-user-id strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-user-total { justify-items: end; text-align: right; }
.cost-user-bar-wrap, .cost-daily-track { min-width: 0; }
.cost-stacked-bar { align-items: stretch; background: var(--bg-sunken); border-radius: 999px; display: flex; height: 12px; overflow: hidden; width: 100%; }
.cost-stack-segment:first-child { border-bottom-left-radius: 999px; border-top-left-radius: 999px; }
.cost-stack-segment:last-child { border-bottom-right-radius: 999px; border-top-right-radius: 999px; }
.cost-daily-row { align-items: center; display: grid; grid-template-columns: 92px minmax(120px, 1fr) 86px; gap: 10px; padding: 9px 0; }
.cost-daily-row > span { color: var(--fg-3); font-size: 12px; }
.cost-daily-row strong { color: var(--fg-1); font-size: 12px; text-align: right; }
.cost-platform-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cost-platform-card { display: grid; gap: 10px; padding: 13px; }
.cost-platform-title { align-items: center; display: flex; justify-content: space-between; gap: 10px; }
.cost-platform-title span, .cost-platform-title strong { overflow-wrap: anywhere; }
.cost-platform-metrics { display: grid; gap: 5px; }
.cost-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; overflow-x: auto; }
.cost-table-scroll { overflow-x: auto; }
.cost-config-table, .cost-platform-flow-table { border-collapse: collapse; min-width: 460px; width: 100%; }
.cost-config-table th, .cost-config-table td, .cost-platform-flow-table th, .cost-platform-flow-table td { border-bottom: 1px solid var(--border-subtle); color: var(--fg-2); font-size: 12px; padding: 9px 8px; text-align: left; vertical-align: top; }
.cost-config-table th, .cost-platform-flow-table th { color: var(--fg-3); font-weight: 700; }
.cost-platform-flow-table td strong { color: var(--fg-1); }
.cost-flow-cell { display: grid; gap: 3px; min-width: 92px; }
.cost-config-table code { background: var(--bg-sunken); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--fg-1); display: inline-block; font-size: 11px; padding: 2px 5px; }
.cost-key-state { border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 700; margin-left: 6px; padding: 2px 7px; }
.cost-key-state.ok { background: #dcfce7; color: #166534; }
.cost-key-state.missing { background: #fee2e2; color: #991b1b; }
.admin-pool-panel { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.admin-pool-active { font-size: 13px; color: var(--fg-2); }
.admin-pool-panel textarea { min-height: 84px; resize: vertical; padding: 9px; }
.admin-version-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.admin-version { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--bg-sunken); font-size: 12px; }
.admin-version.active { border-color: var(--primary-300); background: var(--primary-50); }
.admin-version small { color: var(--fg-3); font-family: var(--font-mono); }
.admin-workspace-detail { min-height: 420px; padding: 14px; }
.admin-work-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.admin-work-summary div { border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-sunken); padding: 10px; }
.admin-work-summary span { display: block; color: var(--fg-3); font-size: 11px; margin-bottom: 4px; }
.admin-work-summary strong { font-family: var(--font-mono); font-size: 18px; }
.admin-work-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.admin-work-card { border: 1px solid var(--border-subtle); border-radius: 8px; overflow: hidden; background: var(--bg-surface); }
.admin-work-card header { display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.admin-work-card header span { font-family: var(--font-mono); color: var(--fg-3); }
.admin-work-empty { padding: 14px; color: var(--fg-3); font-size: 12px; }
.admin-work-ads { display: flex; flex-direction: column; }
.admin-work-ad { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); }
.admin-work-ad:last-child { border-bottom: 0; }
.admin-work-ad span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 12px; }
.admin-work-ad small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 11px; }
@media (max-width: 1120px) {
  .admin-grid,
  .admin-grid.workspaces { grid-template-columns: 1fr; }
  .admin-list { max-height: none; }
  .admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-main-grid,
  .cost-config-grid { grid-template-columns: 1fr; }
  .cost-kpi-grid,
  .cost-platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-platform-grid,
  .admin-work-sections,
  .criteria-meta-grid { grid-template-columns: 1fr; }
  .criteria-top-row { flex-direction: column; }
  .criteria-threshold { width: 100%; }
  .admin-work-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .cost-kpi-grid,
  .cost-platform-grid { grid-template-columns: 1fr; }
  .cost-user-row { grid-template-columns: 1fr; }
  .cost-user-total { justify-items: start; text-align: left; }
  .cost-daily-row { grid-template-columns: 1fr; }
  .cost-daily-row strong { text-align: left; }
}

/* ===================== ACCESS REQUESTS ===================== */
.access-admin { display: flex; flex-direction: column; gap: 14px; }
.access-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.access-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--fg-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
}
.access-filter.active { color: var(--fg-brand); border-color: var(--primary-300); background: var(--primary-50); }
.access-filter span { font-family: var(--font-mono); font-size: 11px; }
.access-error,
.access-loading {
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-surface);
  padding: 12px 14px;
  color: var(--fg-2);
  font-size: 13px;
}
.access-error { color: #b42318; border-color: #fecaca; background: #fff1f2; }
.access-table { display: flex; flex-direction: column; gap: 10px; }
.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-surface);
}
.access-main { min-width: 0; }
.access-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.access-name-line strong { font-size: 14px; }
.access-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--fg-3);
  font-size: 12px;
}
.access-meta span { overflow-wrap: anywhere; }
.access-reason,
.access-notes {
  margin: 10px 0 0;
  line-height: 1.5;
  color: var(--fg-2);
  overflow-wrap: anywhere;
}
.access-notes { font-size: 12px; color: var(--fg-3); }
.access-actions { display: flex; flex-direction: column; gap: 10px; }
.access-actions textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-sunken);
  color: var(--fg-1);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
.access-actions textarea:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); background: var(--bg-surface); }
.access-action-buttons { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.status-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.status-pill.pending { background: #fff1f2; color: #b42318; }
.status-pill.approved { background: #ecfdf3; color: #067647; }
.status-pill.rejected { background: #f2f4f7; color: #475467; }
@media (max-width: 860px) {
  .access-row { grid-template-columns: 1fr; }
  .access-action-buttons { justify-content: flex-start; }
}

/* badges for the 'Filter' / 'Remodel' pipeline icons within the tab */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: var(--bg-sunken); color: var(--fg-2);
}

/* ===================== SELECTION BAR — SECONDARY CTA ===================== */
.selbar-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  background: transparent; color: #eef0f3;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  margin-right: 8px;
}
.selbar-secondary:hover { background: rgba(255,255,255,0.06); }

/* ===================== AUTORESEARCH PANEL ===================== */
.ar-card { margin-top: 16px; }
.ar-sources {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
}
.ar-sources-spacer { flex: 1; }
.ar-progress {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-default);
  border-radius: 8px;
}
.ar-progress-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.ar-progress-status {
  font-size: 13px; font-weight: 600; color: var(--fg-1);
}
.ar-progress-meta {
  margin-left: auto;
  font-size: 12px; color: var(--fg-2);
  font-family: var(--font-mono, inherit);
}
.ar-progress-bar {
  margin-top: 8px;
  height: 4px; border-radius: 999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
}
.ar-progress-fill {
  height: 100%;
  background: var(--primary-500, #0fb5a8);
  transition: width 0.4s ease;
}
.ar-spinner {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  border-top-color: var(--primary-500, #0fb5a8);
}
.ar-spinner.spin { animation: ar-spin 0.9s linear infinite; }
@keyframes ar-spin { to { transform: rotate(360deg); } }
/* Generic spin animation for the <Icon name="loader"/> SVG. Applied
   automatically by the Icon component when name === 'loader'. */
.rds-spin { animation: ar-spin 0.9s linear infinite; transform-origin: 50% 50%; }
.icon-spin { animation: ar-spin 0.9s linear infinite; transform-origin: center; }
.ar-filters {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg-sunken); color: var(--fg-2);
  border: 1px solid var(--border-default);
  font: inherit; font-size: 12px; cursor: pointer;
}
.chip.on {
  background: var(--primary-50, #e7f5f3); color: var(--primary-500);
  border-color: var(--primary-500);
}
.chip-count {
  font-family: var(--font-mono); font-size: 10px;
  background: rgba(0,0,0,0.08); padding: 1px 6px; border-radius: 999px;
}
.ar-target {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-3);
}
.ar-target input {
  width: 60px; height: 28px; padding: 0 8px;
  text-align: center; font-family: var(--font-mono);
  background: var(--bg-sunken); border: 1px solid var(--border-default);
  border-radius: 6px; font-size: 12px; color: var(--fg-1); outline: none;
}
.ar-target input:focus { border-color: var(--primary-500); box-shadow: var(--shadow-focus); }

.ar-dirs { position: relative; border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 12px; }
.ar-dirs-inline {
  border-top: 0; padding-top: 0; margin-top: 0;
  flex: 1 0 100%; order: 10;
}
.ar-dirs-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border-default); background: var(--bg-sunken);
  color: var(--fg-2); font: inherit; font-size: 12px; cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.ar-dirs-trigger:hover { color: var(--fg-1); border-color: var(--primary-500); }
.ar-dirs-trigger.active {
  color: var(--primary-700, #4338ca);
  background: var(--primary-100, #eef2ff);
  border-color: var(--primary-500);
}
.ar-dirs-trigger-label { font-weight: 600; }
.ar-dirs-trigger-value { opacity: 0.85; font-variant-numeric: tabular-nums; }
.ar-dirs-chevron { display: inline-flex; transition: transform 0.15s ease; }
.ar-dirs-chevron.up { transform: rotate(180deg); }
.ar-dirs-popover {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--bg-default, #fff);
  border: 1px solid var(--border-default);
  border-radius: 10px; padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  z-index: 20;
  max-height: 340px; overflow-y: auto;
}
.ar-dirs-inline .ar-dirs-popover {
  top: calc(100% + 4px); bottom: auto; right: auto;
  width: min(620px, 100%);
}
.ar-dirs-popover-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.ar-dirs-popover-hint { font-size: 11px; color: var(--fg-3); }
.ar-dirs-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ar-dirs-clear {
  background: transparent; border: 0; color: var(--fg-3); cursor: pointer;
  font: inherit; font-size: 11px; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.ar-dirs-clear:hover { background: var(--bg-sunken); color: var(--fg-1); }
.ar-dirs-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-dir-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-default); background: var(--bg-sunken);
  color: var(--fg-2); font-size: 12px; cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ar-dir-pill:hover { color: var(--fg-1); }
.ar-dir-pill input { margin: 0; accent-color: var(--primary-500); }
.ar-dir-pill.on {
  background: var(--primary-100, #eef2ff);
  color: var(--primary-700, #4338ca);
  border-color: var(--primary-500);
}
.ar-dir-label { white-space: nowrap; text-transform: lowercase; }
.ar-dirs-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; max-width: 100%; }
.ar-dir-preview-pill,
.ar-dir-preview-more {
  display: inline-flex; align-items: center; min-width: 0; max-width: 160px;
  padding: 3px 7px; border-radius: 999px;
  background: var(--bg-sunken); border: 1px solid var(--border-subtle);
  color: var(--fg-2); font-size: 11px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ar-dir-preview-more { color: var(--fg-3); font-variant-numeric: tabular-nums; }

.ar-dims {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.ar-dim {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border-radius: 10px; text-align: left;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  font: inherit; cursor: pointer;
  transition: background 120ms var(--ease-standard), border-color 120ms var(--ease-standard);
}
.ar-dim:hover { background: var(--bg-hover); }
.ar-dim.on { border-color: var(--primary-500); background: var(--primary-50, #e7f5f3); }
.ar-dim-cbx {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 1.5px solid var(--border-strong, #cbd2dc); border-radius: 4px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.ar-dim-cbx.on { background: var(--primary-500); border-color: var(--primary-500); }
.ar-dim-body { flex: 1; min-width: 0; }
.ar-dim-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--fg-1);
  margin-bottom: 4px;
}
.ar-dim-type {
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--bg-sunken); color: var(--fg-3);
}
.ar-dim-desc {
  font-size: 12px; color: var(--fg-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.ar-dim-meta {
  display: flex; gap: 6px; font-size: 11px; color: var(--fg-3);
  font-family: var(--font-mono);
}

/* count pill on the Run Autoresearch button */
.count-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 999px; background: rgba(255,255,255,0.2); color: #fff;
  font-size: 11px; font-family: var(--font-mono); margin-left: 4px;
}

/* disabled platform toggles (backend not wired) — muted */
.plat-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.plat-toggle.all {
  font-weight: 600;
  border-style: dashed;
}
