:root {
  --sidebar-bg: #061647;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: rgba(255, 255, 255, 0.14);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-text-active: #ffffff;
  --accent: #c9a227;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e3e7f0;
  --text: #1a2340;
  --muted: #6b7591;
  --danger: #c0392b;
  --success: #1e8e5a;
  --warn: #9a6b00;
  --info: #2f5bea;
  --info-soft: #eaf0ff;
  --create: #1a8f3c;
  --sidebar-w: 248px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.2s ease;
}
.brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--sidebar-bg);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brand-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}
.nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  padding: 12px 12px 6px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
}
.nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.nav a.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #fff;
}
.muted-light { font-size: 11px; color: rgba(255, 255, 255, 0.4); margin-bottom: 2px; }

/* Main area */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header h1 { font-size: 18px; margin: 0; font-weight: 600; flex: 1; }
.menu-btn {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--text);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}
.content { flex: 1; padding: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.spacer { flex: 1; }

/* Forms & buttons */
h2 { font-size: 20px; margin: 0 0 6px; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.small { font-size: 12px; margin: 6px 0 0; }
label, .field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.field-label { margin-bottom: 8px; }
input[type=email], input[type=password], input[type=text], input[type=search],
input[type=number], input[type=date], select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(6, 22, 71, 0.25); border-color: var(--sidebar-bg); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  background: none;
  color: var(--text);
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.primary { background: var(--sidebar-bg); color: #fff; }
.btn.create { background: var(--create); color: #fff; font-weight: 600; padding: 10px 18px; }
.btn.create:hover { filter: brightness(0.95); }
.btn.ghost { border-color: var(--border); background: var(--surface); }
.btn.link { color: var(--sidebar-bg); padding: 9px 4px; }
.btn.link.danger { color: var(--danger); }
.btn.block { width: 100%; }
.file-btn { margin: 0; font-weight: 400; }
.error { color: var(--danger); font-size: 13px; }
.success { color: var(--success); font-size: 13px; }

/* Auth screens */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--sidebar-bg); }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
}
.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--sidebar-bg);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 20px;
}
.google-btn { gap: 10px; padding: 11px 16px; font-weight: 500; }
.google-btn:hover { border-color: var(--sidebar-bg); }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.org-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.org-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.org-item:hover { border-color: var(--sidebar-bg); }
.org-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--sidebar-bg);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
}

/* Org switcher */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(6, 22, 71, 0.12);
}
.dropdown-label { font-size: 11px; color: var(--muted); text-transform: uppercase; padding: 6px 10px; }
.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.dropdown-menu button:hover { background: var(--bg); }
.dropdown-menu button.current { font-weight: 600; color: var(--sidebar-bg); }

/* Settings */
.settings { max-width: 560px; }
.logo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  font-size: 28px;
  font-weight: 700;
  color: var(--sidebar-bg);
  flex-shrink: 0;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

/* Lists */
.content > .error { margin: 0 0 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar input, .toolbar select { margin-top: 0; width: auto; min-width: 200px; }
.card.flush { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .center { text-align: center; }
.table .nowrap { white-space: nowrap; }
.table .truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn { padding: 2px 6px; }
.table .actions .error { margin-right: 8px; }
.strong { font-weight: 500; }
.sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg);
  color: var(--muted);
  white-space: nowrap;
}
.badge.active { background: #e6f4ec; color: var(--success); }
.badge.completed { background: #e8ecf8; color: var(--sidebar-bg); }
.badge.warn { background: #fdf3e1; color: var(--warn); margin-left: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.current { color: var(--text); font-weight: 600; border-bottom-color: var(--sidebar-bg); }
.tabs button:disabled { cursor: default; opacity: 0.55; }
.tabs .count { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

/* Campaigns page */
.page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -24px -24px 24px;
  padding: 20px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.page-head .btn { white-space: nowrap; }
.page-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--info);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.page-icon svg { width: 20px; height: 20px; }
.page-title { font-size: 22px; margin: 0; }
.page-sub { font-size: 14px; color: var(--muted); min-height: 1em; }

.filter-card { margin-bottom: 24px; padding: 16px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-row select { margin-top: 0; width: auto; min-width: 180px; }
.search { position: relative; flex: 0 1 440px; margin: 0; font-weight: 400; }
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search input { margin-top: 0; padding-left: 36px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.seg button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.seg button.on { background: var(--sidebar-bg); color: #fff; }
.seg svg { width: 16px; height: 16px; }
.seg.labeled button { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 12px; font: inherit; font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pills button {
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.pills button:hover { background: var(--bg); }
.pills button.on { background: var(--info-soft); border-color: #c9d7fb; color: var(--info); }

.table-card-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 16px 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 4px 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--info);
  cursor: pointer;
}
.tab-link.on { color: var(--text); }
.tab-link svg { width: 18px; height: 18px; color: var(--info); }

.table.lined th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  padding: 14px 16px;
}
.table.lined th, .table.lined td { border-right: 1px solid var(--border); vertical-align: middle; }
.table.lined th:last-child, .table.lined td:last-child { border-right: 0; }
.th-icon { display: inline-flex; align-items: center; gap: 8px; }
.th-icon svg { width: 16px; height: 16px; }
.name-cell { display: flex; gap: 12px; align-items: stretch; min-width: 240px; }
.name-cell .bar { width: 4px; border-radius: 4px; background: var(--info); flex-shrink: 0; }
.name-link { color: var(--text); text-decoration: none; }
.name-link:hover { color: var(--info); text-decoration: underline; }
.cc-name.name-link { display: block; }
.sub-line { font-size: 12px; color: var(--muted); margin-top: 3px; }
.delivery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg);
  color: var(--text);
}
.delivery svg { width: 13px; height: 13px; }
.delivery.active { background: var(--sidebar-bg); color: #fff; border-radius: 999px; }
.delivery.completed { background: #e6f4ec; color: var(--success); }
.row-actions { position: relative; display: inline-block; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.row-menu {
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(6, 22, 71, 0.12);
  z-index: 5;
}
.row-menu.down { right: 0; top: calc(100% + 4px); transform: none; flex-direction: column; min-width: 140px; }
.row-menu button {
  border: 0;
  background: none;
  padding: 6px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.row-menu button:hover { background: var(--bg); }
.row-menu button:disabled { opacity: 0.45; cursor: default; }
.row-menu button.danger { color: var(--danger); }

.campaign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.campaign-card { display: flex; flex-direction: column; gap: 4px; border-left: 4px solid var(--info); }
.cc-top { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.cc-top .btn { padding: 2px 6px; font-size: 13px; }
.cc-name { font-weight: 600; font-size: 15px; }
.cc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.cc-stats dt { font-size: 12px; color: var(--muted); }
.cc-stats dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.card.empty { padding: 40px 16px; }

/* One campaign's page */
.back-link { padding: 6px 2px; font-weight: 500; }
.campaign-title { min-width: 0; }
.campaign-title .page-title { overflow-wrap: anywhere; }
.campaign-actions { display: flex; align-items: center; gap: 10px; }
/* Rupiah amounts are long: smaller numbers, and tiles that never overflow */
.campaign-stats .stat-tile { min-width: 0; }
.campaign-stats .stat-num { font-size: 24px; overflow-wrap: anywhere; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h3 { margin: 0; font-size: 18px; }
.notice { margin: -4px 0 16px; }
.kol-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kol-empty b { color: var(--text); }
.kol-empty .btn { margin-top: 10px; }
/* Six delivery tiles: one row on wide screens */
.stat-grid.campaign-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.campaign-stats .stat-tile { padding: 18px; }
.campaign-stats .stat-num { font-size: 22px; }

/* A campaign's posts */
.post-tools .search { flex: 1 1 320px; }
.post-tools .search input { width: 100%; min-width: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.post-card { display: flex; flex-direction: column; padding: 0; overflow: visible; }
.post-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.post-top .badge.warn { margin-left: 0; }
.post-kind { display: inline-grid; place-items: center; color: var(--muted); }
.post-kind svg { width: 18px; height: 18px; }
.post-cover { position: relative; display: block; aspect-ratio: 9 / 11; background: var(--bg); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.post-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 28px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  color: #fff;
}
.post-who { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-plat { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.35); flex-shrink: 0; }
.post-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.post-kol { display: flex; align-items: center; gap: 6px; }
.post-kol .badge.warn { margin-left: 0; }
.post-link { font-size: 13px; color: var(--info); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-caption {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.post-body .error { margin: 0; }
.post-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.post-stats div { border-radius: 10px; padding: 8px 10px; }
.post-stats b { display: block; font-size: 16px; }
.post-stats span { font-size: 12px; }
.post-stats .views { background: #eef3ff; color: #1d3fae; }
.post-stats .likes { background: #fff0f3; color: #9f1239; }
.post-stats .comments { background: #ecfbf1; color: #166534; }
.post-stats .shares { background: #f8f0ff; color: #6b21a8; }
.post-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--border); }
.post-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 320px; }
.post-thumb { width: 40px; height: 52px; border-radius: 8px; background: var(--bg); overflow: hidden; flex-shrink: 0; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cell-text { min-width: 0; }
.post-cell-text a { color: var(--text); }
.truncate-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-hint { margin: -8px 0 16px; font-size: 13px; color: var(--muted); }
.field-hint.warn { color: var(--warn); }
.add-post-empty { padding: 12px 0 4px; text-align: center; color: var(--muted); }

/* Influencers (KOLs) page */
.stat-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.stat-num { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--text); }
.stat-label { font-size: 14px; font-weight: 600; margin-top: 4px; }
.stat-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.stat-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-tile.blue { background: linear-gradient(135deg, #eef3ff, #e3eaff); border-color: #c9d7fb; color: #1d3fae; }
.stat-tile.blue .stat-icon { background: var(--info); }
.stat-tile.violet { background: linear-gradient(135deg, #f8f0ff, #f3e6fd); border-color: #e7d2fb; color: #6b21a8; }
.stat-tile.violet .stat-icon { background: #111; }
.stat-tile.rose { background: linear-gradient(135deg, #fff0f3, #ffe4ea); border-color: #fbcdd8; color: #9f1239; }
.stat-tile.rose .stat-icon { background: #e1306c; }
.stat-tile.green { background: linear-gradient(135deg, #ecfbf1, #dcf7e6); border-color: #b9ebcb; color: #166534; }
.stat-tile.green .stat-icon { background: #22a35a; }
.stat-tile.amber { background: linear-gradient(135deg, #fff9eb, #fff1d1); border-color: #fbe0a3; color: #92400e; }
.stat-tile.amber .stat-icon { background: #f5a524; }
.stat-tile.slate { background: linear-gradient(135deg, #f4f6fa, #e9edf4); border-color: #d5dbe7; color: #334155; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.summary.warm { background: linear-gradient(135deg, #fff7f2, #ffeee6); border-color: #fbd5c3; }
.summary.cool { background: linear-gradient(135deg, #f1f4ff, #e8edff); border-color: #cfd9fb; }
.summary-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.summary-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.summary-icon svg { width: 20px; height: 20px; }
.summary-icon.slate { background: #475569; }
.summary-icon.orange { background: #ea580c; }
.summary-icon.indigo { background: #4f46e5; }
.summary-title { font-weight: 600; font-size: 16px; }
.summary-rows { margin: 0; display: grid; gap: 10px; }
.summary-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary-rows dt { color: var(--muted); }
.summary-rows dd { margin: 0; font-weight: 700; }
.summary-rows .total { border-top: 1px solid var(--border); padding-top: 10px; }

.inf-filters { margin-bottom: 20px; }
.inf-filters .search { flex: 1 1 320px; }
.inf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.inf-card { display: flex; flex-direction: column; gap: 14px; transition: box-shadow 0.2s, border-color 0.2s; }
.highlight { border-color: var(--info) !important; box-shadow: 0 0 0 3px rgba(47, 91, 234, 0.25); }
tr.highlight td { background: var(--info-soft); }
.inf-head { display: flex; gap: 12px; align-items: flex-start; }
.inf-title { flex: 1; min-width: 0; }
.inf-title .cc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inf-avatar {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--info-soft);
  color: var(--info);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.inf-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.inf-avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.inf-avatar.sm img { border-radius: 9px; }
.status-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: #cbd2e1;
}
.status-dot.synced { background: #22a35a; }
.status-dot.pending { background: #f5a524; }
.status-dot.failed { background: var(--danger); }
.plat-badges { display: flex; gap: 6px; margin-top: 6px; }
.plat-badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.plat-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plat-row { display: flex; align-items: center; gap: 10px; }
.plat-row .grow { flex: 1; min-width: 0; }
.plat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.plat-icon svg { width: 18px; height: 18px; }
.plat-icon.tiktok { background: #111; }
.plat-icon.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.handle { color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handle:hover { text-decoration: underline; }
.sync-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--bg);
  color: var(--muted);
}
.sync-badge.synced { background: #e6f4ec; color: var(--success); }
.sync-badge.pending { background: #fff1d1; color: #92400e; animation: pulse 1.4s ease-in-out infinite; }
.sync-badge.failed { background: #fde8e6; color: var(--danger); cursor: help; }
.sync-badge.manual { background: var(--info-soft); color: var(--info); }
@keyframes pulse { 50% { opacity: 0.55; } }
.plat-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.plat-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 4px; text-align: center; }
.plat-stats b { display: block; font-size: 14px; }
.plat-stats span { font-size: 11px; color: var(--muted); }
.sync-btn { padding: 7px 12px; font-size: 13px; font-weight: 500; }
.manual-link { padding: 0; font-size: 12px; align-self: center; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error.small { margin: 0; font-size: 12px; }
.perf {
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #f3f6ff, #eaf7f6);
  border: 1px solid #d6e0fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.perf-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; }
.perf-active { font-size: 12px; color: var(--success); font-weight: 500; }
.perf-active::before { content: "●"; margin-right: 4px; }
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perf-grid div { background: var(--surface); border-radius: 10px; padding: 10px; text-align: center; }
.perf-grid b { display: block; font-size: 18px; color: var(--info); }
.perf-grid span { font-size: 12px; color: var(--muted); }
.grade { font-weight: 800; }
.grade.g-Ap, .grade.g-A { color: #16a34a; }
.grade.g-Bp, .grade.g-B { color: #7c3aed; }
.grade.g-C { color: var(--muted); }
.btn.rate { background: #22a35a; color: #fff; font-weight: 600; font-size: 13px; padding: 8px 12px; }
.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 8px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.no-data b { color: var(--text); font-weight: 600; }
.inf-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.tbl-plat { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.muted-text { color: var(--muted); }

/* Influencer form */
.at-input {
  display: flex;
  align-items: center;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.at-input span { padding: 0 2px 0 12px; color: var(--muted); }
.at-input input { margin-top: 0; border: 0; padding-left: 2px; }
.at-input input:focus { outline: none; }
.at-input:focus-within { outline: 2px solid rgba(6, 22, 71, 0.25); border-color: var(--sidebar-bg); }
.hint { font-size: 12px; color: var(--muted); margin: -8px 0 12px; }
.conflicts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.conflict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e6;
  border: 1px solid #fbe0a3;
  color: #7a4b00;
  font-size: 13px;
}
.conflict .btn.link { padding: 2px 4px; white-space: nowrap; }

/* A brand's report users */
.viewer-list { border: 1px solid var(--border); border-radius: 12px; max-height: 300px; overflow-y: auto; margin-bottom: 16px; }
.viewer-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.viewer-row:last-of-type { border-bottom: 0; }
.viewer-row .grow { flex: 1; min-width: 0; }
.viewer-row .sub-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Add KOLs to a campaign */
.modal.pick { max-width: 640px; }
.modal.pick h2 { margin-bottom: 4px; }
.modal.pick > .muted { margin-bottom: 16px; }
.pick-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pick-tools .search { flex: 1 1 220px; }
.pick-tools select { margin-top: 0; width: auto; }
.pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.pick-bar label.check { margin: 0; }
.pick-list { border: 1px solid var(--border); border-radius: 12px; max-height: 360px; overflow-y: auto; }
.pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  cursor: pointer;
}
.pick-row:last-of-type { border-bottom: 0; }
.pick-row:hover { background: var(--bg); }
.pick-row.on { background: var(--info-soft); }
.pick-row input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.pick-main { flex: 1; min-width: 0; }
.pick-main .strong, .pick-main .sub-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-nums { text-align: right; font-size: 13px; white-space: nowrap; }
.new-inf { padding: 10px 0 0; }

/* Form modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 22, 71, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
}
.modal.wide { max-width: 560px; }
.modal h2 { margin-bottom: 20px; text-transform: capitalize; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats-tabs { margin-bottom: 16px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.backdrop { display: none; }
label .hint { display: block; margin: 4px 0 0; font-weight: 400; }

/* Campaign description, tags and status */
.delivery.paused { background: #fff4e0; color: var(--warn); }
.cc-desc, .campaign-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.cc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.campaign-desc { max-width: 720px; white-space: pre-line; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { padding: 2px 8px; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: 12px; font-weight: 500; }
.tag.more { background: var(--bg); color: var(--muted); }

/* Share menu */
.share-menu { min-width: 220px; }
.menu-note { font-size: 12px; color: var(--muted); padding: 4px 10px 6px; max-width: 220px; white-space: normal; }

/* Campaign targets */
.targets { margin-bottom: 20px; }
.targets h3 { margin: 0 0 12px; font-size: 16px; }
.target-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.target { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.target.ok { border-color: #b9ebcb; background: #f3fbf6; }
.target.off { border-color: #fbcdd8; background: #fff6f8; }
.target-label { font-size: 12px; color: var(--muted); }
.target-value { font-size: 18px; font-weight: 700; }
.target-now { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.target.ok .target-now b { color: var(--success); }
.target.off .target-now b { color: var(--danger); }

/* Posts: sortable headers and pages */
.th-sort {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.th-sort:hover, .th-sort.on { color: var(--text); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }

/* Metrics tab */
.top-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 24px; }
.top-post { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.top-post:hover { box-shadow: 0 6px 20px rgba(6, 22, 71, 0.08); }
.top-post .rank { grid-row: span 2; align-self: center; font-size: 18px; font-weight: 700; color: var(--info); }
.top-post-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-post-who .sub-line { display: block; margin-top: 0; overflow: hidden; text-overflow: ellipsis; }
.section-head select { width: auto; margin-top: 0; }
.top-post-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.top-post-nums b { color: var(--text); }
.metric-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 24px; }
.metric-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.metric-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.metric-card dt { font-size: 12px; color: var(--muted); }
.metric-card dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }

/* Notifications */
.bell { position: relative; }
.bell.on { background: var(--bg); }
.bell-count {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.alerts-menu { width: 360px; max-width: calc(100vw - 32px); padding: 0; z-index: 25; }
.alerts-head { padding: 12px 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
.alerts-list { max-height: 380px; overflow-y: auto; }
.dropdown-menu .alert-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.alert-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: #fff4e0; color: var(--warn); }
.alert-icon.critical { background: #fde8ec; color: var(--danger); }
.alert-icon svg { width: 15px; height: 15px; }
.alert-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alert-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.alert-line { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.alert-time { font-size: 11px; color: var(--muted); }
.sev-pill { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #fff4e0; color: var(--warn); }
.sev-pill.critical { background: var(--danger); color: #fff; }
.alerts-empty { display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.alerts-empty b { color: var(--success); font-size: 14px; }
.dropdown-menu .alerts-foot { text-align: center; font-weight: 600; padding: 12px; border-radius: 0 0 10px 10px; }

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-tile.wide { grid-column: 1 / -1; }
  .stat-grid.campaign-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .page-head { margin: -16px -16px 16px; padding: 16px; flex-wrap: wrap; }
  .header { padding: 0 16px; gap: 8px; }
  .header .btn.ghost { padding: 8px 10px; }
  .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(6, 22, 71, 0.45);
    z-index: 30;
  }
}

@media (max-width: 600px) {
  .toolbar input, .toolbar select, .filter-row select, .search { flex: 1 1 100%; min-width: 0; }
  .toolbar .spacer, .filter-row .spacer { display: none; }
  .toolbar .btn.primary { width: 100%; }
  .page-head .btn.create { width: 100%; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid.campaign-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-tools .spacer { display: none; }
  .post-cover { aspect-ratio: 4 / 3; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .campaign-title { flex: 1 1 100%; order: 1; }
  .campaign-actions { order: 2; }
  .pick-tools select { flex: 1 1 40%; }
  .pick-nums { display: none; }
  .alerts-menu { position: fixed; left: 16px; right: 16px; top: calc(var(--header-h) - 4px); width: auto; max-width: none; }
  .top-posts { grid-template-columns: 1fr; }
  .pager { justify-content: space-between; }
}

/* Dashboard */
.stat-grid.dash-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 24px; }
.dash-card { padding: 0; overflow: hidden; }
.dash-card-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dash-card-head h3 { margin: 0; font-size: 16px; flex: 1; }
.attn-count { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.dash-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.dash-item:last-of-type { border-bottom: 0; }
.dash-item:hover { background: var(--bg); }
.dash-item-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.dash-item-text .sub-line { margin-top: 0; overflow-wrap: anywhere; }
.dash-item-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.attn-dot { flex-shrink: 0; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--info); }
.attn-dot.warning { background: #e0a100; }
.attn-dot.critical { background: var(--danger); }
.soon-when { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--warn); white-space: nowrap; }
.soon-when.today { color: var(--danger); }
.dash-empty { display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.dash-empty b { color: var(--success); font-size: 14px; }
.dash-table .off { color: var(--danger); font-weight: 600; }
.sched.overdue { color: var(--danger); font-weight: 600; }
.sched.soon { color: var(--warn); font-weight: 600; }

/* Dashboard: performance */
.dash-perf-head { margin-top: 32px; }
.dash-cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-card-head select { width: auto; margin-top: 0; padding: 6px 10px; font-size: 13px; }
.dash-card-head .btn.link { padding: 0 2px; font-size: 13px; }
.dash-empty.muted { padding: 20px 16px; }
.seg.small button { height: 26px; padding: 0 10px; font-size: 13px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.rank-row:last-of-type { border-bottom: 0; }
.rank-n { width: 20px; flex-shrink: 0; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); }
.rank-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rank-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-main .sub-line { margin-top: 1px; }
.rank-num { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-num .sub-line { margin-top: 1px; }
.post-thumb.sm { width: 32px; height: 40px; border-radius: 6px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.link-btn:hover { color: var(--info); text-decoration: underline; }

/* Weekly views: columns from one baseline, a hairline grid, a tooltip */
.trend-card { margin-bottom: 24px; }
.trend { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; padding: 28px 16px 14px; }
.trend-axis { position: relative; height: 180px; min-width: 30px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trend-axis span { position: absolute; right: 0; transform: translateY(50%); }
.trend-plot { position: relative; height: 180px; }
.trend-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
.trend-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.trend-col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 0 1px; border: 0; border-radius: 4px; background: none; cursor: default; }
.trend-col.on { background: rgba(47, 91, 234, 0.07); }
.trend-col:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.trend-bar { width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--info); }
.trend-peak { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; pointer-events: none; }
.trend-tip {
  position: absolute;
  top: -20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(6, 22, 71, 0.12);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
}
.trend-tip b { color: var(--text); font-size: 13px; }
.trend-x { grid-column: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; }
.trend-card .table-wrap { border-top: 1px solid var(--border); }

@media (max-width: 1200px) {
  .stat-grid.dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dash-cols, .dash-cols.even { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stat-grid.dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend { padding-left: 8px; }
  .trend-x span:nth-child(even) { visibility: hidden; }
}

/* AI Assistant: connecting an AI client to the dashboard's MCP tools */
.ai-page { display: flex; flex-direction: column; gap: 16px; max-width: 960px; }
.ai-page h3 { margin: 0 0 12px; font-size: 16px; }
.ai-intro .muted { margin-bottom: 16px; max-width: 720px; }
.ai-url { display: flex; align-items: center; gap: 8px; }
.ai-url code, .ai-code pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}
.ai-code { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; }
.ai-code pre { white-space: pre; }
.ai-hint { margin: 10px 0 0; }
.ai-steps { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.ai-steps code { font-size: 13px; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.ai-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ai-examples, .ai-list { margin: 0; padding-left: 18px; display: grid; gap: 10px; font-size: 14px; }
.ai-examples .link-btn { font-weight: 500; }
@media (max-width: 900px) {
  .ai-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ai-url { flex-wrap: wrap; }
  .ai-url .btn { width: 100%; }
}
