body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: #020617;
  color: #f5f5f5;
}

.navbar {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  background: #111827;
  border-bottom: 1px solid #1f2933;
}

.brand {
  color: #f97316;
  text-decoration: none;
  font-weight: 600;
}

.user-label {
  margin-right: 10px;
  font-size: 0.9rem;
}

.container {
  padding: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: #111827;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #1f2933;
}

.metric {
  margin: 4px 0;
}

.hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.auth-card {
  max-width: 360px;
  margin: 80px auto;
  padding: 24px;
  background: #111827;
  border-radius: 12px;
  border: 1px solid #1f2933;
}

.auth-card input {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #f5f5f5;
}

button {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: #f97316;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

.flash {
  margin: 10px 20px 0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.flash-danger {
  background: #7f1d1d;
  color: #fee2e2;
}

.admin-header {
  padding: 16px 24px;
  border-bottom: 1px solid #1f2933;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b0c10;
}

.admin-header h1 {
  margin: 0;
  font-size: 20px;
}

.admin-nav a {
  color: #9ca3af;
  margin-left: 16px;
  text-decoration: none;
  font-size: 14px;
}

.admin-nav a.active {
  color: #fff;
  font-weight: 600;
}

.admin-nav a:hover {
  color: #e5e7eb;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #9ca3af;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.nav-dropdown.active > button,
.nav-dropdown > button:hover {
  color: #fff;
  border-color: #fff;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 0 20px 35px rgba(0,0,0,0.45);
  z-index: 40;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 6px 16px;
  color: #9ca3af;
  text-decoration: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.admin-footer {
  padding: 16px 24px;
  border-top: 1px solid #222;
  color: #666;
  font-size: 11px;
  text-align: center;
  margin-top: 32px;
  background: #0b0c10;
}

/* ---- Google admin helpers (bootstrap-lite) ---- */
.container-fluid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.p-0 { padding: 0 !important; }
.py-3 {
  padding-top: 24px;
  padding-bottom: 24px;
}
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.text-muted { color: #9ca3af; }
.text-end { text-align: right; }
.small { font-size: 0.85rem; color: #9ca3af; }
.fw-semibold { font-weight: 600; }
.fs-3 { font-size: 1.5rem; }
.fs-5 { font-size: 1.1rem; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.col-12 { flex: 1 1 100%; }
.col-6 { flex: 1 1 calc(50% - 20px); }
.col-md-4 { flex: 1 1 calc(33.33% - 20px); }
.col-xl-6 { flex: 1 1 calc(50% - 20px); }
.col-xl-3 { flex: 1 1 calc(25% - 20px); }
@media (max-width: 768px) {
  .col-6,
  .col-md-4,
  .col-xl-6,
  .col-xl-3 {
    flex: 1 1 100%;
  }
}

.card {
  background: #111827;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #1f2933;
}
.card-header {
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.card-body {
  padding: 0;
}
.card.shadow-sm {
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.form-control,
.form-select {
  background: #050712;
  border: 1px solid #1f2937;
  border-radius: 6px;
  padding: 6px 10px;
  color: #f5f5f5;
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79,70,229,0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: #2563eb;
  color: #f5f5f5;
}
.btn-outline-secondary {
  background: transparent;
  border: 1px solid #4b5563;
  color: #9ca3af;
}
.btn-outline-secondary:hover {
  color: #fff;
  border-color: #fff;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table thead {
  background: rgba(255,255,255,0.05);
}
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.table tbody tr:hover {
  background: rgba(255,255,255,0.05);
}
.table-sm th,
.table-sm td {
  padding: 6px 10px;
}
.table-light {
  background: rgba(255,255,255,0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #1f2937;
  border: 1px solid #4b5563;
}
.text-bg-info {
  background: rgba(14,165,233,0.2);
  border-color: rgba(14,165,233,0.4);
  color: #bae6fd;
}

/* =========================
   ADS2 Admin Shell (v1)
   ========================= */

:root{
  --ads-bg:#0b0f1a;
  --ads-panel:#111827;
  --ads-panel-2:#0f172a;
  --ads-border:rgba(255,255,255,.08);
  --ads-text:rgba(255,255,255,.92);
  --ads-muted:rgba(255,255,255,.62);
  --ads-soft:rgba(255,255,255,.04);
  --ads-accent:#6366f1;
  --ads-accent-2:#22c55e;
  --ads-danger:#ef4444;

  --ads-radius:16px;
  --ads-radius-sm:12px;
  --ads-shadow:0 10px 30px rgba(0,0,0,.35);
  --ads-font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  
  /* Additional variables for campaign details */
  --card-bg: #111827;
  --border: #1f2933;
  --muted: #9ca3af;
  --text: #f5f5f5;
  --warning: #f59e0b;
}

.admin-shell{
  font-family:var(--ads-font);
  color:var(--ads-text);
  background:var(--ads-bg);
  min-height:100vh;
  display:grid;
  grid-template-columns: 272px 1fr;
}

.admin-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:16px 14px;
  border-right:1px solid var(--ads-border);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.admin-brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px 14px;
  margin-bottom:10px;
}

.admin-brand .title{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.admin-brand .title strong{ font-size:14px; letter-spacing:.2px; }
.admin-brand .title span{ font-size:12px; color:var(--ads-muted); }

.admin-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:8px;
}

.admin-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:12px;
  text-decoration:none;
  color:var(--ads-text);
  border:1px solid transparent;
  background:transparent;
}
.admin-nav a .ico{ width:20px; text-align:center; opacity:.9; }
.admin-nav a .meta{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}
.admin-nav a .meta .label{ font-weight:650; font-size:13px; }
.admin-nav a .meta .hint{ font-size:12px; color:var(--ads-muted); }

.admin-nav a:hover{
  background:var(--ads-soft);
  border-color:var(--ads-border);
}

.admin-nav a.active{
  background:rgba(99,102,241,.14);
  border-color:rgba(99,102,241,.35);
}
.admin-nav a.active .meta .hint{ color:rgba(199,210,254,.88); }

.admin-main{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.admin-topbar{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--ads-border);
  background:rgba(11,15,26,.78);
  backdrop-filter: blur(10px);
}

.admin-topbar-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.admin-burger{
  display:none;
  border:1px solid var(--ads-border);
  background:var(--ads-soft);
  color:var(--ads-text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}

.admin-heading{
  min-width:0;
}
.admin-heading .h{
  font-size:14px;
  font-weight:750;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.admin-heading .s{
  font-size:12px;
  color:var(--ads-muted);
  margin-top:2px;
}

.admin-user{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}
.admin-avatar{
  width:34px; height:34px;
  border-radius:999px;
  display:grid; place-items:center;
  background:rgba(255,255,255,.08);
  border:1px solid var(--ads-border);
  font-weight:750;
}
.admin-user .who{
  display:flex;
  flex-direction:column;
  line-height:1.15;
  text-align:right;
}
.admin-user .who .welcome{ font-size:12px; color:var(--ads-muted); }
.admin-user .who .email{ font-size:13px; font-weight:650; }

.admin-content{
  padding:18px 16px 22px;
}

.ads2-pagehead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.ads2-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.ads2-title h1{
  font-size:20px;
  margin:0;
  letter-spacing:.2px;
}
.ads2-title .sub{
  font-size:12px;
  color:var(--ads-muted);
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.ads2-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 10px;
  border-radius:999px;
  background:var(--ads-soft);
  border:1px solid var(--ads-border);
  color:var(--ads-text);
  font-size:12px;
}

.ads2-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}

.ads2-card{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border:1px solid var(--ads-border);
  border-radius:var(--ads-radius);
  box-shadow:var(--ads-shadow);
}

.ads2-card .hd{
  padding:12px 14px;
  border-bottom:1px solid var(--ads-border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.ads2-card .bd{ padding:12px 14px; }

.ads2-grid-kpi{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
  margin-bottom:12px;
}
.ads2-kpi{
  grid-column: span 3;
  padding:14px;
}
.ads2-kpi .k{
  font-size:12px;
  color:var(--ads-muted);
  margin-bottom:6px;
}
.ads2-kpi .v{
  font-size:22px;
  font-weight:800;
  letter-spacing:.2px;
}
.ads2-kpi .d{
  margin-top:6px;
  font-size:12px;
  color:var(--ads-muted);
}

.ads2-grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:12px;
}

.ads2-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.ads2-table th, .ads2-table td{
  padding:10px 10px;
  border-bottom:1px solid var(--ads-border);
  vertical-align:top;
}
.ads2-table th{
  font-size:12px;
  color:var(--ads-muted);
  font-weight:650;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.ads2-table tr:hover{ background:rgba(255,255,255,.03); }

.ads2-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ads2-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--ads-border);
  background:rgba(255,255,255,.03);
  text-decoration:none;
  color:var(--ads-text);
}
.ads2-item:hover{ border-color:rgba(99,102,241,.35); background:rgba(99,102,241,.08); }
.ads2-item .left{ min-width:0; }
.ads2-item .left .t{
  font-weight:750;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ads2-item .left .s{
  margin-top:4px;
  font-size:12px;
  color:var(--ads-muted);
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ads2-item .right{
  text-align:right;
  white-space:nowrap;
}
.ads2-item .right .v{ font-weight:800; }
.ads2-item .right .s{ font-size:12px; color:var(--ads-muted); margin-top:4px; }

/* Mobile: sidebar becomes drawer */
.admin-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  z-index:40;
}

@media (max-width: 992px){
  .admin-shell{
    grid-template-columns: 1fr;
  }

  .admin-burger{ display:inline-flex; }

  .admin-sidebar{
    position:fixed;
    left:0; top:0;
    width: 86vw;
    max-width: 320px;
    transform: translateX(-105%);
    transition: transform .18s ease;
    z-index:50;
    box-shadow: var(--ads-shadow);
    background: var(--ads-bg);
  }

  .admin-shell.nav-open .admin-sidebar{
    transform: translateX(0);
  }

  .admin-shell.nav-open .admin-overlay{
    display:block;
  }

  .ads2-grid-kpi{ grid-template-columns: repeat(6, 1fr); }
  .ads2-kpi{ grid-column: span 6; }
  .ads2-grid-2{ grid-template-columns: 1fr; }
}

/* helper */
.ads2-muted{ color:var(--ads-muted); }
.ads2-link{ color:rgba(199,210,254,.95); text-decoration:none; }
.ads2-link:hover{ text-decoration:underline; }

/* =========================
   ADS2 Mobile-first Admin (Topbar + Tabs)
   ========================= */
.ads2-app{
  --bg:#0b0f1a;
  --panel:#0f172a;
  --card:rgba(255,255,255,.06);
  --border:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --accent:#6366f1;
  --shadow:0 14px 35px rgba(0,0,0,.35);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:var(--bg);
  min-height:100vh;
}

.ads2-topbar{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 14px;
  background:rgba(11,15,26,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.ads2-brand{
  display:flex; flex-direction:column; line-height:1.1;
}
.ads2-brand strong{ font-size:14px; letter-spacing:.2px; }
.ads2-brand span{ font-size:12px; color:var(--muted); }

.ads2-who{
  display:flex; align-items:center; gap:10px;
}
.ads2-avatar{
  width:34px; height:34px; border-radius:999px;
  display:grid; place-items:center;
  background:rgba(255,255,255,.08);
  border:1px solid var(--border);
  font-weight:800;
}
.ads2-who .meta{ display:flex; flex-direction:column; line-height:1.1; text-align:right; }
.ads2-who .meta .small{ font-size:12px; color:var(--muted); }
.ads2-who .meta .email{ font-size:13px; font-weight:700; max-width:44vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.ads2-tabs{
  position:sticky; top:58px; z-index:25;
  display:flex; gap:8px;
  padding:10px 12px;
  overflow:auto;
  border-bottom:1px solid var(--border);
  background:rgba(11,15,26,.72);
  backdrop-filter: blur(10px);
  -webkit-overflow-scrolling: touch;
}
.ads2-tabs::-webkit-scrollbar{ height:6px; }
.ads2-tab{
  flex:0 0 auto;
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}
.ads2-tab .hint{ font-weight:600; color:var(--muted); font-size:12px; }
.ads2-tab.active{
  border-color:rgba(99,102,241,.55);
  background:rgba(99,102,241,.16);
}

.ads2-content{
  padding:14px;
  max-width:1200px;
  margin:0 auto;
}

.ads2-pagehead{
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  flex-wrap:wrap;
  margin:10px 0 12px;
}
.ads2-title h1{ margin:0; font-size:20px; letter-spacing:.2px; }
.ads2-sub{ margin-top:6px; display:flex; flex-wrap:wrap; gap:8px; color:var(--muted); font-size:12px; }
.ads2-chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:3px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.035);
  color:var(--text);
}

.ads2-card{
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius:16px;
  box-shadow:var(--shadow);
}
.ads2-card .hd{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.ads2-card .bd{ padding:12px 14px; }

.ads2-grid-kpi{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:12px;
  margin:12px 0;
}
.ads2-kpi{ grid-column: span 3; padding:14px; }
.ads2-kpi .k{ font-size:12px; color:var(--muted); margin-bottom:6px; }
.ads2-kpi .v{ font-size:22px; font-weight:900; letter-spacing:.2px; }
.ads2-kpi .d{ margin-top:6px; font-size:12px; color:var(--muted); }

.ads2-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:12px;
}

.ads2-tablewrap{ overflow:auto; }
.ads2-table{ width:100%; border-collapse:collapse; font-size:13px; }
.ads2-table th, .ads2-table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
.ads2-table th{
  font-size:12px;
  color:var(--muted);
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.ads2-table tr:hover{ background:rgba(255,255,255,.03); }

.ads2-list{ display:flex; flex-direction:column; gap:10px; }
.ads2-item{
  display:flex; justify-content:space-between; gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  text-decoration:none;
  color:var(--text);
}
.ads2-item .t{ font-weight:850; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:62vw; }
.ads2-item .s{ margin-top:5px; font-size:12px; color:var(--muted); display:flex; flex-wrap:wrap; gap:8px; }
.ads2-item .r{ text-align:right; white-space:nowrap; }
.ads2-item .r .v{ font-weight:900; }
.ads2-item .r .s{ margin-top:4px; font-size:12px; color:var(--muted); }

.only-mobile{ display:none; }
.only-desktop{ display:block; }

@media (max-width: 992px){
  .ads2-who .meta .email{ max-width:52vw; }
  .ads2-grid-kpi{ grid-template-columns:repeat(6, 1fr); }
  .ads2-kpi{ grid-column: span 6; } /* 2 cards per row feel on most phones */
  .ads2-grid-2{ grid-template-columns:1fr; }
  .only-mobile{ display:block; }
  .only-desktop{ display:none; }
}

/* Light-weight controls (in case bootstrap isn't present) */
.ads2-app input[type="date"], .ads2-app select{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
}
.ads2-app .btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:12px;
  padding:8px 12px;
  font-weight:800;
  text-decoration:none;
}
.ads2-app .btn-primary{
  border-color:rgba(99,102,241,.55);
  background:rgba(99,102,241,.22);
}
.ads2-app .btn:hover{ filter:brightness(1.08); }

/* =========================
   ADS2 Header dropdown/drawer menu
   ========================= */
.ads2-iconbtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}
.ads2-iconbtn:hover{ filter:brightness(1.12); }

.ads2-menuwrap{
  position:fixed;
  inset:0;
  z-index:80;
  display:block;
}
.ads2-menu-backdrop{
  position:absolute; inset:0;
  background:rgba(0,0,0,.55);
  opacity:0;
  transition:opacity 160ms ease;
}
.ads2-menu-panel{
  position:absolute;
  top:0; right:0;
  height:100%;
  width:min(360px, 92vw);
  background:rgba(15,23,42,.96);
  backdrop-filter: blur(12px);
  border-left:1px solid var(--border);
  box-shadow:var(--shadow);
  transform:translateX(16px);
  opacity:0;
  transition:transform 160ms ease, opacity 160ms ease;
  display:flex;
  flex-direction:column;
}
.ads2-menuwrap.open .ads2-menu-backdrop{ opacity:1; }
.ads2-menuwrap.open .ads2-menu-panel{ transform:translateX(0); opacity:1; }

.ads2-menu-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
}
.ads2-menu-title{ font-weight:950; letter-spacing:.2px; }
.ads2-menu{
  padding:10px 10px 14px;
  overflow:auto;
}
.ads2-menu-link{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color:var(--text);
  border:1px solid transparent;
}
.ads2-menu-link:hover{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.08);
}
.ads2-menu-link.active{
  background:rgba(99,102,241,.16);
  border-color:rgba(99,102,241,.55);
}
.ads2-menu-link.danger{
  margin-top:8px;
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.30);
}
.ads2-menu-link small{ color:var(--muted); font-weight:700; }

.ads2-menu-group{
  margin-top:10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.03);
  overflow:hidden;
}
.ads2-menu-group summary{
  list-style:none;
  cursor:pointer;
  padding:10px 12px;
  display:flex; align-items:center; justify-content:space-between;
  font-weight:900;
}
.ads2-menu-group summary::-webkit-details-marker{ display:none; }
.ads2-menu-group summary span.h{ color:var(--muted); font-weight:800; font-size:12px; }
.ads2-menu-group summary.active{
  background:rgba(99,102,241,.12);
}
.ads2-menu-sub{
  border-top:1px solid rgba(255,255,255,.08);
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

@media (min-width: 992px){
  /* feels like a dropdown on desktop */
  .ads2-menu-panel{
    top:62px;
    right:12px;
    height:auto;
    max-height:calc(100vh - 84px);
    border-radius:16px;
    border:1px solid var(--border);
    border-left:1px solid var(--border);
  }
}

/* =========================
   ADS2 Unified Design System
   ========================= */

:root{
  --bg:#0b0c10;
  --panel: rgba(255,255,255,.03);
  --panel2: rgba(255,255,255,.05);
  --text:#f5f5f5;
  --muted:#9ca3af;
  --border: rgba(148,163,184,.18);
  --shadow: 0 18px 45px rgba(0,0,0,.45);
  --accent:#6366f1;
  --accent2:#22d3ee;
  --danger:#ef4444;
  --success:#22c55e;
}

html,body{height:100%;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
a{color:inherit;}
code{color:#c7d2fe;}

.ads2-content{ padding:16px 12px 44px; }
@media (min-width: 900px){ .ads2-content{ padding:20px 18px 60px; } }

.ads2-page{ max-width: 1280px; margin: 0 auto; }

.ads2-pagehead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin: 6px 0 12px;
}
.ads2-title{ margin:0; font-size:20px; font-weight:950; letter-spacing:.2px; }
.ads2-subtitle{ margin-top:4px; font-size:12px; color:var(--muted); }

.ads2-hint{
  margin: 10px 0 14px;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}

.ads2-flash{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: var(--panel);
  margin: 10px 0 14px;
  font-size:13px;
}
.ads2-flash--danger{ background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.30); color:#ffd1d1; }
.ads2-flash--success{ background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.28); color:#c7f9d2; }

.ads2-filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  align-items:end;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom:10px;
}
.ads2-group{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.ads2-label{ font-size:12px; color:var(--muted); font-weight:800; margin-right:2px; }

.ads2-input, .ads2-select{
  background: rgba(2,6,23,.6);
  border: 1px solid rgba(148,163,184,.22);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
}
.ads2-input:focus, .ads2-select:focus{
  outline:none;
  border-color: rgba(99,102,241,.65);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}

.ads2-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(99,102,241,.55);
  background: rgba(99,102,241,.16);
  color: var(--text);
  text-decoration:none;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.ads2-btn:hover{ filter:brightness(1.08); }
.ads2-btn--ghost{
  border-color: rgba(148,163,184,.22);
  background: rgba(255,255,255,.03);
}
.ads2-btn--ghost:hover{ background: rgba(255,255,255,.06); }

.ads2-summary{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.22);
  background: linear-gradient(135deg, rgba(45,212,191,0.10), rgba(99,102,241,0.08));
  margin: 10px 0 14px;
  font-size:12px;
}
.ads2-summary .k{ color:var(--muted); font-weight:800; margin-right:6px; }
.ads2-summary .v{ font-variant-numeric: tabular-nums; font-weight:900; color:#e5e7eb; }

.ads2-surface{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.ads2-only-mobile{ display:block; }
.ads2-only-desktop{ display:none; }
@media (min-width: 900px){
  .ads2-only-mobile{ display:none; }
  .ads2-only-desktop{ display:block; }
}

/* Cards (mobile) */
.ads2-cards{ display:flex; flex-direction:column; gap:10px; padding:12px; }
.ads2-card{
  border:1px solid rgba(148,163,184,.18);
  border-radius:16px;
  background: rgba(255,255,255,.03);
  padding:12px;
}
.ads2-cardtitle{ font-weight:950; font-size:14px; margin:0 0 2px; }
.ads2-cardtitle a{ text-decoration:none; }
.ads2-cardtitle a:hover{ text-decoration:underline; }
.ads2-cardsub{ font-size:11px; color:var(--muted); }
.ads2-cardgrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px 10px;
  margin-top:10px;
}
.ads2-metric{ font-size:12px; }
.ads2-metric .k{ color:var(--muted); font-weight:800; font-size:11px; }
.ads2-metric .v{ font-variant-numeric:tabular-nums; font-weight:900; }

/* Pills */
.ads2-pills{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.pill{
  display:inline-flex;
  align-items:center;
  padding:3px 9px;
  border-radius:999px;
  font-size:10px;
  border:1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}
.pill-click{ cursor:pointer; }
.pill-click:hover{ border-color: rgba(99,102,241,.60); filter:brightness(1.1); }

.pill-obj{ background: rgba(99,102,241,.14); color:#c7d2fe; border-color: rgba(99,102,241,.35); }
.pill-buying{ background: rgba(34,197,94,.10); color:#a7f3d0; border-color: rgba(34,197,94,.25); }
.pill-status{ background: rgba(236,72,153,.10); color:#fbcfe8; border-color: rgba(236,72,153,.25); }
.pill-sales{ background: rgba(34,197,94,.10); color:#86efac; border-color: rgba(34,197,94,.25); }
.pill-owner-pm{ background: rgba(59,130,246,.12); color:#bfdbfe; border-color: rgba(59,130,246,.25); }
.pill-owner-ads{ background: rgba(16,185,129,.10); color:#a7f3d0; border-color: rgba(16,185,129,.25); }
.pill-account{ background: rgba(34,197,94,.10); color:#a7f3d0; border-color: rgba(34,197,94,.25); }
.pill-type{ background: rgba(148,163,184,.10); color:#e5e7eb; border-color: rgba(148,163,184,.18); }

.pill-status-active{ background: rgba(34,197,94,.12); color:#bbf7d0; border-color: rgba(34,197,94,.30); }
.pill-status-paused{ background: rgba(249,115,22,.14); color:#fed7aa; border-color: rgba(249,115,22,.30); }
.pill-status-other{ background: rgba(148,163,184,.08); color:#e5e7eb; border-color: rgba(148,163,184,.18); }

/* Tables (desktop) */
.ads2-table-wrap{ overflow:auto; }
.ads2-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
}
.ads2-table th, .ads2-table td{
  padding:10px 10px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  vertical-align:top;
}
.ads2-table th{
  position:sticky;
  top:0;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  z-index:2;
}
.ads2-table tr:hover td{ background: rgba(255,255,255,.03); }
.ads2-num{ text-align:right; white-space:nowrap; font-variant-numeric: tabular-nums; }
.ads2-sub{ font-size:11px; color: var(--muted); margin-top:3px; }

/* Campaign Details Template Styles - moved from inline styles for better maintainability */

/* Fix CSS variables for campaign details */
:root {
  --card-bg: #111827;
  --warning: #f59e0b;
}

.ads2-metric {
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  background: #111827;
  border: 1px solid #1f2933;
  color: #f5f5f5;
}

.metric-label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 4px;
  font-weight: 600;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #f5f5f5;
}

.metric-desc {
  font-size: 0.75rem;
  color: #9ca3af;
}

.text-success { 
  color: #22c55e; 
}

.text-warning { 
  color: #f59e0b; 
}

.text-info { 
  color: #3b82f6; 
}

.text-muted { 
  color: #9ca3af; 
}

.owner-info {
  text-align: center;
  padding: 8px;
}

.owner-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #f5f5f5;
}

.owner-code {
  font-size: 0.85rem;
  color: #9ca3af;
  font-family: monospace;
}

.ads2-btn--small {
  padding: 4px 8px;
  font-size: 0.85rem;
}

.ads2-grid-1 {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.ads2-grid-3 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Ensure proper dark theme styling for all campaign details elements */
.ads2-hint {
  color: #9ca3af;
  background: rgba(17, 24, 39, 0.5);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #1f2933;
}

.ads2-card .ads2-metric {
  background: #0f172a;
  border: 1px solid #1f2933;
}

.ads2-card .hd {
  color: #f5f5f5;
  font-weight: 600;
  background: rgba(17, 24, 39, 0.8);
}

.ads2-card .bd {
  background: #111827;
}

/* Fix table styling in campaign details */
.ads2-table {
  background: #111827;
  color: #f5f5f5;
}

.ads2-table th {
  background: #0f172a;
  color: #9ca3af;
  border-bottom: 1px solid #1f2933;
}

.ads2-table td {
  border-bottom: 1px solid #1f2933;
  color: #f5f5f5;
}

.ads2-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Enhance pill styling for better visibility */
.pill {
  background: #1f2933;
  color: #e5e7eb;
  border: 1px solid #374151;
  font-weight: 600;
}

/* Fix button styling */
.ads2-btn--primary {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  font-weight: 600;
}

.ads2-btn--primary:hover {
  background: #5855eb;
  border-color: #5855eb;
}

/* Header Navigation Styles - Missing CSS for adminHeader.ejs */
.ads2-topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ads2-navlink {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.ads2-navlink:hover {
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.ads2-navlink.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.ads2-navlink.muted {
  color: #6b7280;
  font-size: 13px;
  cursor: default;
}

.ads2-navlink.muted:hover {
  background: transparent;
  border-color: transparent;
}

/* Dropdown Navigation */
.ads2-dd {
  position: relative;
  display: inline-block;
}

.ads2-dd summary {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  list-style: none;
  transition: all 0.15s ease;
}

.ads2-dd summary::-webkit-details-marker {
  display: none;
}

.ads2-dd summary:hover {
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.ads2-dd summary.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.ads2-dd summary .caret {
  margin-left: 4px;
  font-size: 12px;
  transition: transform 0.15s ease;
}

.ads2-dd[open] summary .caret {
  transform: rotate(180deg);
}

.ads2-ddmenu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.ads2-ddmenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ads2-ddmenu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.ads2-ddmenu a span {
  font-weight: 600;
  font-size: 14px;
}

.ads2-ddmenu a small {
  font-size: 11px;
  color: #6b7280;
  font-family: monospace;
}

/* Mobile Navigation Styles */
.ads2-mobilebtn {
  display: none;
}

.ads2-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  transition: opacity 0.2s ease;
}

.ads2-sheet[hidden] {
  display: none;
}

.ads2-sheet .bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.ads2-sheet .panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 90vw);
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ads2-sheet.open .panel {
  transform: translateX(0);
}

.ads2-sheethead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ads2-sheethead strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.ads2-sheetnav {
  padding: 16px 0;
  overflow-y: auto;
  flex: 1;
}

.ads2-sheetnav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  color: #9ca3af;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.ads2-sheetnav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.ads2-sheetnav a.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
  border-right: 3px solid #6366f1;
}

.ads2-sheetnav a.danger {
  color: #ef4444;
  margin-top: 8px;
}

.ads2-sheetnav a.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.ads2-sheetnav .sec {
  padding: 16px 20px 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
}

.ads2-sheetnav .sec:first-child {
  border-top: none;
  margin-top: 0;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  .ads2-topnav {
    display: none;
  }
  
  .ads2-mobilebtn {
    display: inline-flex;
  }
}

/* =========================
   Analytics Page Styles
   ========================= */

/* Analytics KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.kpi {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
}

.kpi .k {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kpi .v {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #f5f5f5;
  margin-bottom: 8px;
}

.kpi .d {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi .d span {
  color: #9ca3af;
}

.kpi .d strong {
  color: #f5f5f5;
}

/* Delta indicators */
.delta {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
}

.delta.up {
  color: #bbf7d0;
  border-color: rgba(34,197,94,.30);
  background: rgba(34,197,94,.12);
}

.delta.down {
  color: #fecaca;
  border-color: rgba(239,68,68,.30);
  background: rgba(239,68,68,.12);
}

.delta.neutral {
  color: #e5e7eb;
  border-color: rgba(148,163,184,.18);
  background: rgba(148,163,184,.08);
}

/* Chip styling */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.03);
  color: #9ca3af;
}

/* Visualization Grid */
.viz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.viz-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  overflow: hidden;
}

.viz-card .hd {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.viz-card .bd {
  padding: 0;
}

.viz-title {
  font-size: 16px;
  font-weight: 700;
  color: #f5f5f5;
  margin-bottom: 4px;
}

.viz-sub {
  font-size: 12px;
  color: #9ca3af;
}

/* Charts */
.chart {
  min-height: 300px;
  background: rgba(2,6,23,.6);
}

.chart--tall {
  min-height: 400px;
}

.chart--wide {
  min-height: 350px;
}

/* Table styling for analytics */
.table-analytics {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: #111827;
}

.table-analytics th,
.table-analytics td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  vertical-align: top;
}

.table-analytics th {
  background: #0f172a;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-analytics td {
  color: #f5f5f5;
}

.table-analytics tr:hover td {
  background: rgba(255,255,255,.03);
}

/* Mobile responsiveness for analytics */
@media (max-width: 768px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }
  
  .viz-grid {
    grid-template-columns: 1fr;
  }
  
  .viz-card .hd {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Active button state for analytics filters */
.ads2-btn.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: #ffffff !important;
}

.ads2-btn--ghost.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: #ffffff !important;
}

/* ---- Public dashboard widget tables ---- */
table.widget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.widget-table th,
.widget-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.widget-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 600;
}

.creative-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creative-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.creative-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creative-thumb-placeholder {
  font-size: 0.7rem;
  color: #64748b;
  padding: 0 6px;
  text-align: center;
}

.creative-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.creative-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.creative-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.creative-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-decoration: none;
  border: 1px solid rgba(248, 250, 252, 0.25);
  color: #f8fafc;
  background: rgba(248, 250, 252, 0.08);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.creative-chip:hover {
  border-color: #f97316;
  color: #f97316;
}

.creative-chip-facebook {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.15);
}

.creative-chip-instagram {
  border-color: #e1306c;
  background: rgba(225, 48, 108, 0.15);
}

.creative-chip-tiktok {
  border-color: #25f4ee;
  background: rgba(37, 244, 238, 0.15);
  color: #e0fcff;
}

.creative-chip-destination,
.creative-chip-ad,
.creative-chip-landing {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.stat-pill {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.85);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-sub {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #cbd5f5;
}

.guardrail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.risk-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin-bottom: 4px;
}

.risk-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.geo-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.geo-platform {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.85);
}

.geo-platform header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.geo-country-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.geo-country-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
}
