:root {
  --bg: #060911;
  --sidebar-bg: #0b101b;
  --surface: #0f1624;
  --surface-2: #151f32;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.25);
  --text: #eef3f9;
  --muted: #8a9cb4;
  --accent: #38bdf8;
  --accent-2: #34d399;
  --danger: #f87171;
  --warn: #fbbf24;
  --purple: #c084fc;
  --radius: 12px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(15, 22, 36, 0.4); }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.22); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.38); }

.hidden { display: none !important; }
code { background: rgba(56, 189, 248, 0.12); color: var(--accent); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* BUTTONS & INPUTS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: 0.15s;
  white-space: nowrap;
}
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 7px; font-size: 11px; border-radius: 6px; }
.btn-full { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #05111e; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.34); color: var(--accent); }
.btn-accent:hover { background: rgba(56, 189, 248, 0.24); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-success { background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.4); color: var(--accent-2); }
.btn-danger { background: rgba(248, 113, 113, 0.16); border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover, .btn-ghost.active-nav { color: var(--text); border-color: var(--accent); background: rgba(56, 189, 248, 0.1); }
.icon-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; transition: 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }

input, select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; font-size: 12.5px; outline: none; transition: 0.15s;
}
input:focus, select:focus { border-color: var(--accent); }
.field-label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.chk-row input { width: auto; }

/* LOGIN */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), transparent 55%), var(--bg);
}
.login-card {
  width: 100%; max-width: 390px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 18px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #05111e; font-weight: 800; font-size: 18px; flex-shrink: 0;
}
.brand-badge.sm { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }
.brand-title { font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }
.form-error { color: var(--danger); background: rgba(248, 113, 113, 0.12); padding: 8px 10px; border-radius: 8px; font-size: 12.5px; }
.login-hint { font-size: 12px; color: var(--muted); text-align: center; }

/* FBTOOL TWO-COLUMN APP LAYOUT */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.app-layout.sidebar-collapsed {
  --sidebar-w: 68px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 10px;
  z-index: 60;
  overflow: hidden;
  transition: width 0.18s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 6px;
}
.sidebar-brand-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-meta { min-width: 0; }
.topbar-title { font-weight: 700; font-size: 14px; white-space: nowrap; }
.topbar-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sidebar-cta { padding: 0 2px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 2px;
}
.sidebar-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 10px 4px;
  white-space: nowrap;
}
.sidebar-group-title:first-child { padding-top: 2px; }

.sidebar-nav .tab {
  position: relative;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: 0.14s;
}
.sidebar-nav .tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-nav .tab.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.04));
  border-color: rgba(56, 189, 248, 0.34);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-nav .tab.active .nav-ico { color: var(--accent); }
.nav-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.nav-ico svg { width: 16px; height: 16px; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tab-cnt {
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.tab-cnt.muted-cnt { background: rgba(148, 163, 184, 0.14); color: var(--muted); }
.tab-cnt.active-sel { background: var(--accent); color: #05111e; }
.tab-cnt.warn { background: rgba(248, 113, 113, 0.22); color: var(--danger); }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.user-card { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--accent); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.user-meta { min-width: 0; }
.user-meta-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.role-badge {
  font-size: 9.5px; padding: 1px 6px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.18); color: var(--accent); text-transform: uppercase;
}

/* COLLAPSED SIDEBAR MODE */
.app-layout.sidebar-collapsed .brand-meta,
.app-layout.sidebar-collapsed .sidebar-group-title,
.app-layout.sidebar-collapsed .nav-label,
.app-layout.sidebar-collapsed .user-meta { display: none; }
.app-layout.sidebar-collapsed .sidebar-brand { justify-content: center; }
.app-layout.sidebar-collapsed .sidebar-brand-info { display: none; }
.app-layout.sidebar-collapsed #btn-sidebar-oauth { padding: 8px; }
.app-layout.sidebar-collapsed .sidebar-nav .tab { justify-content: center; padding: 9px; }
.app-layout.sidebar-collapsed .sidebar-nav .tab .tab-cnt {
  position: absolute; top: 3px; right: 3px; font-size: 9px; padding: 0 4px;
}
.app-layout.sidebar-collapsed .sidebar-footer { flex-direction: column; }

/* WORKSPACE & STICKY TOPBAR */
.workspace { min-width: 0; display: flex; flex-direction: column; }
.workspace-body { padding: 14px 20px 84px; display: flex; flex-direction: column; gap: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 27, 0.88);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.workspace-title { font-size: 16px; font-weight: 700; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ads-subnav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
}
.subnav-pill {
  background: transparent; border: none; color: var(--muted); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: 0.14s;
}
.subnav-pill:hover { color: var(--text); }
.subnav-pill.active { background: var(--surface-2); color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

.mobile-only { display: none; }
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 55;
}

.cart-group { display: inline-flex; align-items: center; gap: 6px; }
.count-pill {
  background: rgba(56, 189, 248, 0.2); color: var(--accent); border-radius: 999px;
  padding: 1px 7px; font-size: 11px; font-weight: 700;
}
.count-pill.active { background: var(--warn); color: #05111e; }

.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer;
}
.sync-pill.done { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.4); color: var(--accent-2); }
.sync-pill.err { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); margin-left: 2px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.progress-track { height: 5px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.25s; }

/* TOOLBAR & DATE PILLS */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
}
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.date-pills {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.date-pill {
  background: transparent; border: none; color: var(--muted); border-radius: 6px;
  padding: 5px 9px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.14s;
}
.date-pill:hover { color: var(--text); }
.date-pill.active { background: var(--surface-2); color: var(--accent); }

.search-box { position: relative; display: inline-flex; align-items: center; }
.search-ico { position: absolute; left: 10px; color: var(--muted); font-size: 14px; pointer-events: none; }
#filter-search { min-width: 250px; padding-left: 28px; padding-right: 26px; }
.search-clear {
  position: absolute; right: 7px; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 15px; line-height: 1;
}
.search-clear:hover { color: var(--text); }

/* TREE CONTEXT BAR */
.context-bar {
  padding: 8px 12px; border-radius: 10px; background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3); font-size: 12.5px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tree-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.16); color: var(--accent); font-weight: 600; font-size: 12px;
}
.tree-chip button {
  background: none; border: none; color: var(--text); cursor: pointer; font-weight: 700; font-size: 13px; line-height: 1;
}

/* KPIS */
.kpi-grid {
  display: grid; grid-template-columns: repeat(8, minmax(120px, 1fr)); gap: 9px;
}
@media (max-width: 1400px) { .kpi-grid { grid-template-columns: repeat(4, minmax(140px, 1fr)); } }
@media (max-width: 720px) { .kpi-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); } }

.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  border-top: 2px solid transparent;
}
.kpi-card.kpi-accent-blue { border-top-color: var(--accent); }
.kpi-card.kpi-accent-green { border-top-color: var(--accent-2); }
.kpi-card.kpi-accent-purple { border-top-color: var(--purple); }
.kpi-card.kpi-accent-amber { border-top-color: var(--warn); }
.kpi-label { font-size: 11px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.kpi-val { font-size: 17px; font-weight: 700; }
.kpi-sub { font-size: 11.5px; font-weight: 500; color: var(--muted); }

/* PANELS & TABLES */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 15.5px; }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); }

.table-wrap { overflow: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); vertical-align: middle; }
th {
  position: sticky; top: 0; z-index: 2; background: #121b2c;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
tr:hover td { background: rgba(255, 255, 255, 0.025); }
tr.has-staged td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.subline { font-size: 11.5px; color: var(--muted); }

.copy-id {
  cursor: pointer;
  border-bottom: 1px dashed rgba(138, 156, 180, 0.45);
  transition: color 0.12s;
}
.copy-id:hover { color: var(--accent); border-bottom-color: var(--accent); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-ok { background: rgba(52, 211, 153, 0.16); color: var(--accent-2); }
.badge-pause { background: rgba(251, 191, 36, 0.16); color: var(--warn); }
.badge-bad { background: rgba(248, 113, 113, 0.16); color: var(--danger); }
.badge-info { background: rgba(56, 189, 248, 0.16); color: var(--accent); }
.queued-tag {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 3px;
  padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: rgba(251, 191, 36, 0.16); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.35);
}
.queued-tag button { background: none; border: none; color: var(--warn); cursor: pointer; font-weight: 700; }

/* SETTINGS SUBTABS */
.settings-subtabs {
  display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 3px; flex-wrap: wrap;
}
.settings-subtab {
  background: transparent; border: none; color: var(--muted); border-radius: 7px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: 0.14s;
}
.settings-subtab:hover { color: var(--text); }
.settings-subtab.active { background: var(--surface-2); color: var(--accent); }

/* LOGS TAB */
.logs-layout { display: grid; grid-template-columns: 340px 1fr; gap: 14px; }
@media (max-width: 960px) { .logs-layout { grid-template-columns: 1fr; } }
.tasks-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.task-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: 0.15s;
}
.task-item:hover { border-color: var(--accent); }
.task-item.active { border-color: var(--accent); background: rgba(56, 189, 248, 0.08); }
.task-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.task-item-meta { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.logs-console {
  background: #04070d; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.5; color: #cbd5e1; max-height: 360px; min-height: 220px;
  overflow: auto; white-space: pre-wrap; word-break: break-word;
}

/* MINI THUMBS & LINKED ADS */
.thumb-btn {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border);
  background: #04070d; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; position: relative;
}
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.media-cell { display: flex; align-items: center; gap: 10px; }
.linked-ad-pill {
  display: inline-flex; align-items: center; gap: 5px; margin: 2px 4px 2px 0;
  padding: 2px 7px; border-radius: 6px; font-size: 11.5px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.linked-ad-pill:hover { border-color: var(--accent); color: var(--accent); }

/* TOGGLE SWITCH */
.switch { position: relative; display: inline-block; width: 38px; height: 21px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; background: #334155; border-radius: 999px; transition: 0.2s;
}
.slider:before {
  position: absolute; content: ""; height: 15px; width: 15px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: var(--accent-2); }
.switch input:checked + .slider:before { transform: translateX(17px); }

/* CREATIVE CARDS */
.view-toggle { display: inline-flex; gap: 4px; }
.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.ad-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.ad-media {
  position: relative; height: 200px; background: #05080f; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ad-media img { width: 100%; height: 100%; object-fit: cover; }
.ad-media-empty { color: var(--muted); font-size: 12px; }
.ad-duration {
  position: absolute; bottom: 8px; right: 8px; background: rgba(0, 0, 0, 0.72);
  padding: 2px 7px; border-radius: 6px; font-size: 11px;
}
.ad-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ad-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ad-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--bg); padding: 8px; border-radius: 8px; font-size: 11.5px; }
.ad-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }

.checklist-box {
  max-height: 180px; overflow: auto; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px;
}

.split-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
@media (max-width: 960px) { .split-grid { grid-template-columns: 1fr; } }
.subpanel { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.subpanel h3 { font-size: 14.5px; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }

/* CART LIST & FLOATING DOCK */
.cart-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.cart-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.cart-dock {
  position: fixed;
  bottom: 18px;
  left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2);
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(15, 22, 36, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.cart-dock-info { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; }
.cart-dock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse 1.2s infinite; }
.cart-dock-actions { display: flex; align-items: center; gap: 8px; }

/* MODAL & TOAST */
.modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); display: flex;
  align-items: center; justify-content: center; padding: 16px; z-index: 100;
}
.modal-card {
  width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.modal-card.sm { max-width: 400px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.oauth-link-box { display: flex; gap: 6px; }
.oauth-link-box input { flex: 1; font-size: 12px; }

.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--surface-2); border: 1px solid var(--accent);
  color: var(--text); padding: 10px 16px; border-radius: 10px; z-index: 200; font-weight: 600;
}
.toast.err { border-color: var(--danger); color: var(--danger); }

/* HIERARCHY TREE & SETTINGS EXTRAS */
.tree-wrap { display: flex; flex-direction: column; gap: 6px; }
.tree-node {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
}
.tree-node.lvl-acc { margin-left: 14px; background: rgba(15, 23, 42, 0.55); }
.tree-node.lvl-camp { margin-left: 14px; background: rgba(15, 23, 42, 0.72); }
.tree-node.lvl-ag { margin-left: 14px; background: rgba(9, 13, 24, 0.85); }
.tree-node.lvl-ad { margin-left: 14px; background: var(--bg); }
.tree-children {
  display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 8px;
  border-top: 1px solid var(--border);
}
.tree-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) repeat(4, minmax(85px, 0.8fr)) auto;
  align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px;
}
.tree-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tree-toggle {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; flex-shrink: 0; font-size: 11px;
}
.tree-toggle:hover { border-color: var(--accent); }
.tree-lvl-pill {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px;
  background: rgba(56, 189, 248, 0.14); color: var(--accent); flex-shrink: 0;
}
.tree-lvl-pill.bc { background: rgba(168, 85, 247, 0.16); color: #c084fc; }
.tree-lvl-pill.acc { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.tree-lvl-pill.camp { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.tree-lvl-pill.ag { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.tree-lvl-pill.ad { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.tree-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tree-metric { font-size: 12.5px; white-space: nowrap; }
.tree-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.textarea-tpl {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 12.5px; resize: vertical;
}
.cron-status-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5;
}

@media (max-width: 1024px) {
  .app-layout, .app-layout.sidebar-collapsed { grid-template-columns: 1fr; }
  .mobile-only { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 256px; transform: translateX(-100%);
    transition: transform 0.2s ease; box-shadow: 12px 0 32px rgba(0, 0, 0, 0.6);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .ads-subnav { display: none; }
  .cart-dock { left: 50%; max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 960px) {
  .tree-row { grid-template-columns: 1fr; gap: 6px; }
}

/* CATALOG MANAGER EXTRAS */
.cat-kpi-grid { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
@media (max-width: 1100px) { .cat-kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.scheme-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
}
.scheme-bar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tier-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); transition: 0.14s;
}
.tier-pill.white { background: rgba(241, 245, 249, 0.12); color: #f8fafc; border-color: rgba(248, 250, 252, 0.25); }
.tier-pill.gray { background: rgba(244, 63, 94, 0.14); color: #fda4af; border-color: rgba(244, 63, 94, 0.35); }
.tier-pill:hover { filter: brightness(1.15); }

.cat-auto-rows { display: flex; flex-direction: column; gap: 8px; max-height: 310px; overflow: auto; }
.cat-auto-row {
  display: grid; grid-template-columns: 110px 1fr 1fr 32px; gap: 8px; align-items: start;
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px;
}
@media (max-width: 720px) { .cat-auto-row { grid-template-columns: 1fr; } }
.url-hint { font-size: 11px; margin-top: 3px; line-height: 1.3; }
.url-hint.ok { color: var(--accent-2); }
.url-hint.err { color: var(--danger); }
.url-hint.warn { color: var(--warn); }

.guide-list { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }

/* EMBEDDED ADMIN TOOLS (FASTPANEL DEPLOYER) */
.panel-embed { padding: 12px 14px; }
.fpd-iframe {
  width: 100%;
  height: calc(100vh - 155px);
  min-height: 620px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0f17;
}

/* LAUNCHER & AUTORULES EXTRAS */
.offer-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.offer-pill {
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.14s;
}
.offer-pill:hover { color: var(--text); border-color: var(--accent); }
.offer-pill.active { background: rgba(56, 189, 248, 0.18); border-color: var(--accent); color: var(--accent); }

.ar-groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 14px; }
@media (max-width: 720px) { .ar-groups-grid { grid-template-columns: 1fr; } }
.ar-group-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.ar-group-card.inactive { opacity: 0.72; }
.ar-rule-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px;
}
.ar-cond-row {
  display: grid; grid-template-columns: 1fr 90px 110px 30px; gap: 6px; align-items: center;
}
.ar-rule-editor {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.acc-rule-pill {
  display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 999px;
  background: rgba(192, 132, 252, 0.16); color: var(--purple); border: 1px solid rgba(192, 132, 252, 0.35);
  margin: 2px 3px 0 0; cursor: pointer;
}
.acc-rule-pill.off { opacity: 0.55; }

.launcher-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .launcher-grid { grid-template-columns: 1fr; } }
.geo-chips-box {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 4px;
  max-height: 150px; overflow: auto; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px;
}
.matrix-row {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.matrix-grid {
  display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 8px;
}
@media (max-width: 960px) { .matrix-grid { grid-template-columns: 1fr 1fr; } }
.creative-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12.5px;
}
.bm-drag-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #05111e;
  font-weight: 800; font-size: 13.5px; text-decoration: none; cursor: grab; box-shadow: 0 6px 18px rgba(56, 189, 248, 0.25);
}

/* BACKGROUND ADS SYNC STATUS BAR & NAV PROGRESS */
.ads-sync-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}
.ads-sync-pill.loading { background: rgba(56, 189, 248, 0.22); color: var(--accent); animation: pulse 1.2s infinite; }
.ads-sync-pill.done { background: rgba(52, 211, 153, 0.18); color: var(--accent-2); }
.ads-sync-pill.pending { background: rgba(251, 191, 36, 0.18); color: var(--warn); }

.nav-progress-bar {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 2px;
  height: 2.5px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.nav-progress-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

.ads-sync-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 13px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.08);
  font-size: 12.5px;
}
.ads-sync-banner.done {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.07);
}
.ads-sync-banner.warn {
  border-color: rgba(251, 191, 36, 0.36);
  background: rgba(251, 191, 36, 0.08);
}
.ads-sync-bar-track {
  width: 180px;
  height: 6px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ads-sync-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

/* LAUNCHER PLACEMENTS BOX */
.placement-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.placement-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}
.placement-hint.warn { color: var(--warn); }
.placement-hint.ok { color: var(--accent-2); }

/* VISUAL CREATIVE PICKER MODAL (9:16 CARDS) */
.scp-modal-card {
  max-width: 980px;
  width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scp-layout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 11px;
}
.scp-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.scp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px 2px;
  min-height: 220px;
  max-height: 56vh;
}
.scp-card {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.14s, transform 0.12s, box-shadow 0.14s;
  user-select: none;
}
.scp-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  transform: translateY(-1px);
}
.scp-card.selected {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 6px 18px rgba(34, 197, 94, 0.18);
}
.scp-media {
  position: relative;
  aspect-ratio: 9 / 13;
  background: #04070d;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scp-media-empty {
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  padding: 8px;
}
.scp-type-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(6, 9, 17, 0.8);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.scp-type-badge:hover {
  background: rgba(56, 189, 248, 0.9);
  color: #05111e;
}
.scp-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: rgba(6, 9, 17, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  transition: 0.14s;
}
.scp-card.selected .scp-check {
  background: #22c55e;
  border-color: #22c55e;
}
.scp-meta {
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface-2);
}
.scp-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scp-sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* CATALOG DIRECT UPLOAD ROW CONTROLS */
.cat-media-field {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cat-media-field input { flex: 1; min-width: 0; }
.cat-mini-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #04070d;
}
.creative-chip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.creative-chip-thumb {
  width: 30px;
  height: 36px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #04070d;
  flex-shrink: 0;
}
video.creative-chip-thumb {
  width: 34px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}
.scroll-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: rgba(15, 22, 34, 0.45);
}
.launch-dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  background: rgba(15, 22, 34, 0.45);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.launch-dropzone:hover,
.launch-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
}
.launch-upload-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
}
.launch-upload-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}
.launch-upload-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease;
}
#launch-creatives-list {
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}
.scp-sentinel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
}
.tree-loading-row {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(15, 22, 34, 0.45);
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tree-loading-row.err {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}
.tree-ad-thumb {
  width: 28px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: #04070d;
  flex-shrink: 0;
  cursor: pointer;
}
.tree-title.clickable {
  cursor: pointer;
}
.tree-title.clickable:hover strong {
  color: var(--accent);
}
.launch-acc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.launch-acc-pill:hover {
  border-color: rgba(56, 189, 248, 0.55);
}
.launch-acc-pill.selected {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}
.matrix-row.selected {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.05);
}
#live-tree-container.drill-mode > .tree-node {
  margin-left: 0;
}
.tree-drill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
}
.tree-crumbs-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tree-crumb {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.tree-crumb:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
}
.tree-crumb.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--text);
  font-weight: 600;
}
.tree-crumb-sep {
  color: var(--muted);
  font-size: 13px;
  opacity: 0.65;
}
.tree-enter-btn {
  font-size: 11px;
  padding: 3px 7px;
  opacity: 0.78;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.tree-enter-btn:hover {
  opacity: 1;
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--accent);
}
.date-range-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
}
.date-range-box input[type="date"] {
  padding: 4px 7px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  width: 128px;
}
.date-range-sep {
  color: var(--muted);
  font-size: 12px;
}
th.th-sort {
  cursor: pointer;
  user-select: none;
  transition: color 0.14s ease;
}
th.th-sort:hover,
th.th-sort.active-sort {
  color: var(--accent);
}
.cr-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cr-fname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  display: inline-block;
}
.cr-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
}
.cr-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-meta-chip.acc.multi {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  cursor: help;
}
.cr-linked-td {
  max-width: 290px;
}
.cr-linked-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
.cr-ad-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 195px;
  min-width: 0;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.cr-ad-primary:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.1);
}
.cr-ad-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.cr-ad-spend {
  flex-shrink: 0;
  font-weight: 600;
  color: #38bdf8;
  font-size: 11px;
}
.cr-ad-more-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  cursor: help;
  white-space: nowrap;
}
.cr-lib-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px dashed rgba(148, 163, 184, 0.22);
}
.cr-lib-badge.cached {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}


