/* admin.css — Ignyx Admin Dashboard */
@import "../../css/variables.css";

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }

/* ── CSS VARS (prototype-exact overrides) ──────────────────── */
:root {
  --bg:          #f0f2f8;
  --bg2:         #ffffff;
  --bg3:         #e8eaf2;
  --text:        #0f172a;
  --text-muted:  #475569;
  --text-dim:    #94a3b8;
  --border:      rgba(0,0,0,0.07);
  --accent-lt:   #eef2ff;
  --accent-glow: rgba(79,70,229,0.18);
  --clay-outer:  6px 8px 24px rgba(0,0,0,0.09), -2px -2px 8px rgba(255,255,255,0.9);
  --clay-inner-lt: inset 3px 3px 8px rgba(255,255,255,0.85);
  --clay-inner-dk: inset -3px -3px 8px rgba(0,0,0,0.06);
  --clay-shadow: var(--clay-outer);
  --clay-sm:     3px 4px 14px rgba(0,0,0,0.08), -1px -1px 5px rgba(255,255,255,0.8);
  --sidebar-w:   230px;
}

/* ── DARK MODE VARS ────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #0f1117;
  --bg2:         #1a1d27;
  --bg3:         #252836;
  --text:        #f1f5f9;
  --text-muted:  #94a3b8;
  --text-dim:    #475569;
  --border:      rgba(255,255,255,0.07);
  --clay-shadow: 6px 8px 24px rgba(0,0,0,0.5), -2px -2px 8px rgba(255,255,255,0.03);
  --clay-sm:     3px 4px 14px rgba(0,0,0,0.4), -1px -1px 5px rgba(255,255,255,0.02);
  --accent-lt:   #1e1b4b;
}

/* ── DASHBOARD LAYOUT ──────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  box-shadow: 4px 0 24px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  z-index: 100;
  transition: transform 0.25s var(--ease);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.sidebar-logo svg { flex-shrink: 0; }
.sidebar-logo span {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0 12px;
  margin-bottom: 6px;
  margin-top: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s;
  margin-bottom: 2px;
  cursor: pointer;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active {
  background: var(--accent-lt);
  color: var(--accent);
  box-shadow: var(--clay-sm);
}
.nav-item svg { opacity: 0.7; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* hamburger */
.hamburger {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: var(--clay-sm);
  cursor: pointer;
}

/* ── MAIN CONTENT ──────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 28px 28px 40px;
  overflow-x: hidden;
  min-width: 0;
}

/* ── TOPBAR ────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.topbar-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.topbar-title p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.date-badge {
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--clay-sm);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--clay-sm);
  cursor: pointer;
}

/* ── CLAY CARD ─────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--clay-shadow);
  padding: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── KPI GRID ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--clay-shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--clay-sm);
}
.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.kpi-delta {
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.kpi-delta.up   { color: #10b981; }
.kpi-delta.down { color: #ef4444; }

/* ── GRID LAYOUTS ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }

/* ── CHART ─────────────────────────────────────────────────── */
.chart-area {
  height: 180px;
  position: relative;
  margin-top: 8px;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-bottom: 20px;
}
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: opacity 0.2s;
}
.bar:hover { opacity: 0.8; }
.bar-label { font-size: 0.6rem; color: var(--text-dim); }

/* ── TABLE ─────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 0 8px 10px 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover { color: var(--text); }
.data-table th .sort-arrow { margin-left: 4px; opacity: 0.4; }
.data-table th.sorted .sort-arrow { opacity: 1; color: var(--accent); }
.data-table td {
  padding: 10px 8px 10px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg3); }

/* ── CHIPS / BADGES ────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.chip.indigo { background: var(--accent-lt); color: var(--accent); }
.chip.green  { background: #d1fae5; color: #065f46; }
.chip.yellow { background: #fef3c7; color: #92400e; }
.chip.red    { background: #fee2e2; color: #991b1b; }

.status-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.status-chip.active  { background: #d1fae5; color: #065f46; }
.status-chip.paused  { background: #fef3c7; color: #92400e; }
.status-chip.pending { background: #e0f2fe; color: #075985; }
.status-chip.sold    { background: #d1fae5; color: #065f46; }
.status-chip.rejected{ background: #fee2e2; color: #991b1b; }
.status-chip.new     { background: var(--accent-lt); color: var(--accent); }

.revenue-chip {
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 20px;
}

.v-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-block;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
  border: none;
}
.btn-primary:hover { background: #4338ca; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--bg3);
  color: var(--text-muted);
  border: none;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  border: none;
}
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 4px 10px; font-size: 0.72rem; }

/* ── FORM ELEMENTS ─────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.form-input, .form-select {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lt);
}
.form-input.error { border-color: #ef4444; }
.form-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.form-error {
  font-size: 0.72rem;
  color: #ef4444;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── LIVE FEED ─────────────────────────────────────────────── */
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.feed-info { flex: 1; min-width: 0; }
.feed-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.feed-detail { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.feed-time { font-size: 0.68rem; color: var(--text-dim); flex-shrink: 0; }

/* ── DOMAIN ROW ────────────────────────────────────────────── */
.domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.domain-row:last-child { border-bottom: none; }
.domain-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.domain-name { flex: 1; font-weight: 500; }
.domain-uptime { color: var(--text-muted); font-size: 0.72rem; }
.uptime-bar { width: 60px; height: 4px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.uptime-fill { height: 100%; background: #10b981; border-radius: 4px; }

/* ── PULSE DOT ─────────────────────────────────────────────── */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── VERTICAL GRID ─────────────────────────────────────────── */
.vertical-section { margin-bottom: 24px; }
.vertical-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.vertical-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.v-card {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--clay-shadow);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.v-card:hover { transform: translateY(-3px); box-shadow: 8px 12px 32px rgba(0,0,0,0.13); }
.v-card.expanded { grid-column: span 2; }
.v-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.v-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: var(--clay-sm);
}
.v-card-name  { font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.v-card-count { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; }
.v-card-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 1px; }
.v-card-live  {
  position: absolute; top: 12px; right: 12px;
  display: flex; align-items: center; gap: 4px;
  font-size: 0.65rem; font-weight: 600;
}
.v-drill { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.v-card.expanded .v-drill { display: block; }
.v-drill-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; font-size: 0.75rem; }
.v-drill-label { color: var(--text-muted); }
.v-drill-value { font-weight: 600; color: var(--text); }
.v-drill-bar-wrap { height: 4px; background: var(--bg3); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.v-drill-bar { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.v-drill-sites { margin-top: 10px; }
.v-drill-site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px; border-radius: 8px; font-size: 0.72rem; margin-bottom: 3px;
}
.v-drill-site:hover { background: var(--bg3); }
.v-drill-site-name  { color: var(--text-muted); }
.v-drill-site-leads { font-weight: 700; }

/* ── BOT ALERT STRIP ───────────────────────────────────────── */
.bot-strip {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.8rem;
}
.bot-strip strong { color: #92400e; }
.bot-strip span   { color: #78350f; }

/* ── POSTBACK TABLE (alias) ────────────────────────────────── */
.postback-table { width: 100%; border-collapse: collapse; }
.postback-table th {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-dim);
  padding: 0 0 10px; text-align: left; border-bottom: 1px solid var(--border);
}
.postback-table td {
  padding: 10px 0; font-size: 0.82rem;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.postback-table tr:last-child td { border-bottom: none; }
.advertiser-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* ── TOAST NOTIFICATIONS ───────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg2);
  border-radius: var(--radius-sm);
  box-shadow: var(--clay-shadow);
  padding: 12px 16px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: all;
  animation: toast-in 0.25s ease;
  max-width: 320px;
  border-left: 3px solid var(--accent);
}
.toast.success { border-left-color: #10b981; }
.toast.error   { border-left-color: #ef4444; }
.toast.warning { border-left-color: #f59e0b; }
.toast-close {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ── SKELETON LOADING ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line  { height: 16px; margin-bottom: 8px; }
.skeleton-value { height: 36px; width: 120px; margin-bottom: 4px; }
.skeleton-kpi   { height: 110px; border-radius: var(--radius); }

/* ── SECTION TABS ──────────────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--clay-shadow);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  animation: slide-up 0.2s ease;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { cursor: pointer; color: var(--text-dim); font-size: 1.2rem; }

/* ── PAGINATION ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-muted);
  transition: all 0.15s;
}
.page-btn:hover    { background: var(--bg3); color: var(--text); }
.page-btn.active   { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── FILTER BAR ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar .form-input,
.filter-bar .form-select {
  padding: 6px 10px;
  font-size: 0.8rem;
}
.filter-bar .form-input { width: 220px; }

/* ── URL BUILDER OUTPUT ────────────────────────────────────── */
.url-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--accent);
  min-height: 52px;
  margin-top: 8px;
}

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── LOGIN PAGE ────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-card {
  background: var(--bg2);
  border-radius: var(--radius);
  box-shadow: var(--clay-shadow);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}
.login-logo span {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}
.login-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}
.login-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 0.9rem;
  margin-top: 4px;
}
.login-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #991b1b;
  margin-bottom: 14px;
  display: none;
}
.login-error.show { display: block; }

/* ── DOMAIN FILTER SELECT (topbar C3) ─────────────────────── */
.domain-filter-select {
  background: var(--card, var(--bg2));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: var(--clay-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  max-width: 160px;
}
.domain-filter-select:hover {
  border-color: var(--accent);
}
.domain-filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lt);
}

/* ── THEME TOGGLE ──────────────────────────────────────────── */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--clay-sm);
  transition: all 0.15s;
  border: none;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg); color: var(--text); }

/* ── KPI SPARKLINE ─────────────────────────────────────────── */
.kpi-spark { display:flex; align-items:flex-end; gap:2px; height:28px; margin-top:4px; }
.kpi-spark-bar { flex:1; border-radius:2px; opacity:0.6; transition:opacity 0.2s; }
.kpi-spark-bar:hover { opacity:1; }

/* ── CHART WEEKLY STRIP ────────────────────────────────────── */
.chart-weekly-strip {
  display:flex;
  gap:20px;
  padding:12px 0 0;
  border-top:1px solid var(--border);
  font-size:0.75rem;
  color:var(--text-muted);
  flex-wrap: wrap;
}
.chart-weekly-strip strong { color:var(--text); font-weight:700; }

/* ── REVENUE BY VERTICAL ───────────────────────────────────── */
.rev-vert-item { margin-bottom:14px; }
.rev-vert-item:last-child { margin-bottom:0; }
.rev-vert-label { display:flex; justify-content:space-between; font-size:0.78rem; margin-bottom:5px; }
.rev-vert-bar-track { height:6px; background:var(--bg3); border-radius:4px; overflow:hidden; }
.rev-vert-bar-fill { height:100%; border-radius:4px; transition:width 0.5s ease; }

/* ── FEED STATUS CHIPS ─────────────────────────────────────── */
.feed-status { font-size:0.65rem; font-weight:700; padding:1px 7px; border-radius:20px; }
.feed-status.new       { background:#dbeafe; color:#1e40af; }
.feed-status.sold      { background:#d1fae5; color:#065f46; }
.feed-status.duplicate { background:#fef3c7; color:#92400e; }
.feed-domain { font-size:0.7rem; color:var(--text-dim); margin-top:1px; }

/* ── DOMAIN TABLE ──────────────────────────────────────────── */
.domain-table { width:100%; border-collapse:collapse; }
.domain-table th {
  font-size:0.68rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--text-dim);
  padding:0 0 8px;
  text-align:left;
  border-bottom:1px solid var(--border);
}
.domain-table td {
  padding:9px 0;
  font-size:0.78rem;
  border-bottom:1px solid var(--border);
  vertical-align:middle;
}
.domain-table tr:last-child td { border-bottom:none; }
.domain-ssl { font-size:0.72rem; color:var(--text-muted); }
.domain-ssl.expiring { color:#f59e0b; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .vertical-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .hamburger { display: flex; }
  .main { padding: 20px 16px 40px; padding-top: 64px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .vertical-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-title h1 { font-size: 1.2rem; }
  .filter-bar .form-input { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .vertical-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
}
