/* ============================================================
   SocialIQ — shared.css
   Dark professional theme for all pages
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:           #0a0a0f;
  --sidebar-bg:   #0f0f1a;
  --card-bg:      #13131f;
  --card-hover:   #1a1a2e;
  --border:       #1e1e30;
  --border-light: #2a2a40;

  --purple:       #7c3aed;
  --purple-light: #9d6cf7;
  --purple-dim:   #3b1f6e;
  --blue:         #2563eb;
  --blue-light:   #3b82f6;
  --teal:         #0d9488;
  --orange:       #ea580c;
  --red:          #dc2626;
  --red-dim:      #4a1515;
  --green:        #16a34a;
  --green-dim:    #0f2e1a;
  --yellow:       #ca8a04;
  --yellow-dim:   #3a2800;
  --pink:         #db2777;

  --text:         #e2e8f0;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    18px;
  --radius-xl:    24px;

  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.6);

  --transition:   all 0.18s ease;
  --sidebar-w:    260px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple-light); text-decoration: none; }
a:hover { color: var(--purple); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--card-bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-dim); }

/* ── Sidebar ───────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 20px 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-light);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(124,58,237,0.08);
}

.sidebar-nav a.active {
  color: var(--purple-light);
  background: rgba(124,58,237,0.14);
  font-weight: 600;
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--purple);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav a i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

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

.sidebar-agency {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-agency span {
  color: var(--text-light);
  font-weight: 600;
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.page-header {
  padding: 28px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

.page-content {
  padding: 24px 32px 40px;
}

/* ── Client Selector Bar ───────────────────────────────────── */
.client-selector-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.client-selector-bar label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.client-selector-bar select {
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  min-width: 180px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i { color: var(--purple); font-size: 12px; }

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--border-light); transform: translateY(-1px); }

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-trend {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }
.stat-trend.neutral { color: var(--text-muted); }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-wrap { 
  background: var(--border); 
  border-radius: 99px; 
  height: 8px; 
  overflow: hidden; 
  width: 100%; 
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--purple), var(--blue-light));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.progress-fill.green { background: linear-gradient(90deg, var(--green), #4ade80); }
.progress-fill.yellow { background: linear-gradient(90deg, var(--yellow), #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, var(--red), #f87171); }

/* ── Badges & Risk Indicators ──────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-on-track { background: var(--green-dim); color: #4ade80; }
.badge-risk-medium { background: var(--yellow-dim); color: #fbbf24; }
.badge-risk-high { background: var(--red-dim); color: #f87171; }
.badge-purple { background: var(--purple-dim); color: #c4b5fd; }
.badge-blue { background: rgba(37,99,235,0.15); color: #93c5fd; }
.badge-teal { background: rgba(13,148,136,0.15); color: #5eead4; }
.badge-orange { background: rgba(234,88,12,0.15); color: #fdba74; }
.badge-gray { background: rgba(100,116,139,0.15); color: var(--text-light); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover { background: var(--purple-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,58,237,0.4); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-light);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--card-hover); color: var(--text); border-color: var(--purple-dim); }

.btn-danger {
  background: var(--red-dim);
  color: #f87171;
  border: 1px solid rgba(220,38,38,0.3);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
}

.checkbox-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--purple);
  cursor: pointer;
}

.radio-group { display: flex; flex-direction: column; gap: 10px; }

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.radio-item:hover { border-color: var(--purple-dim); }
.radio-item input[type="radio"] { accent-color: var(--purple); }

/* ── Tables ────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text-light); }

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: var(--transition);
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background: rgba(124,58,237,0.04);
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--sidebar-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal { transform: none; }

.modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 17px; font-weight: 700; }

.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-muted); font-size: 18px;
  cursor: pointer; border-radius: 6px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-light); }
.tab-btn.active { color: var(--purple-light); border-bottom-color: var(--purple); font-weight: 600; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  transform: translateX(110%);
  transition: transform 0.25s ease;
  min-width: 200px;
  max-width: 340px;
}

.toast.show { transform: none; }
.toast.success { border-left: 3px solid var(--green); color: #4ade80; }
.toast.error   { border-left: 3px solid var(--red);   color: #f87171; }
.toast.info    { border-left: 3px solid var(--blue);  color: #93c5fd; }
.toast.warning { border-left: 3px solid var(--yellow); color: #fbbf24; }

/* ── Grids ─────────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }

/* ── Section spacing ───────────────────────────────────────── */
.section { margin-bottom: 28px; }
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i { color: var(--purple); }

/* ── Platform Icons ────────────────────────────────────────── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.platform-instagram { background: rgba(219,39,119,0.15); color: #f472b6; }
.platform-tiktok    { background: rgba(0,0,0,0.3); color: #e2e8f0; border: 1px solid var(--border-light); }
.platform-linkedin  { background: rgba(37,99,235,0.15); color: #60a5fa; }
.platform-twitter, .platform-x { background: rgba(100,116,139,0.15); color: #94a3b8; }
.platform-facebook  { background: rgba(29,78,216,0.15); color: #818cf8; }
.platform-all       { background: var(--purple-dim); color: #c4b5fd; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 42px; margin-bottom: 16px; display: block; opacity: 0.3; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text-light); }
.empty-state p { font-size: 13px; margin-bottom: 20px; }

/* ── Info Box ──────────────────────────────────────────────── */
.info-box {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.info-box.info    { background: rgba(37,99,235,0.1);  border: 1px solid rgba(37,99,235,0.25); color: #93c5fd; }
.info-box.warning { background: rgba(202,138,4,0.1);  border: 1px solid rgba(202,138,4,0.25); color: #fbbf24; }
.info-box.success { background: rgba(22,163,74,0.1);  border: 1px solid rgba(22,163,74,0.25); color: #4ade80; }
.info-box.error   { background: rgba(220,38,38,0.1);  border: 1px solid rgba(220,38,38,0.25); color: #f87171; }
.info-box i { margin-top: 1px; flex-shrink: 0; }

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ── Sparkline wrapper ─────────────────────────────────────── */
.sparkline-wrap { height: 40px; }

/* ── Velocity meter ────────────────────────────────────────── */
.velocity-meter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.velocity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.velocity-label { color: var(--text-muted); }
.velocity-value { font-weight: 700; color: var(--text); }

/* ── Activity Feed ─────────────────────────────────────────── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-text { color: var(--text-light); line-height: 1.5; }
.activity-text strong { color: var(--text); }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Funnel ────────────────────────────────────────────────── */
.funnel-step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.funnel-step:hover { border-color: var(--border-light); }
.funnel-step-name { font-weight: 600; }
.funnel-step-value { font-weight: 700; color: var(--purple-light); }
.funnel-step-rate { font-size: 11px; color: var(--text-muted); }

/* ── Dropdown ──────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover { background: rgba(124,58,237,0.1); color: var(--text); }

/* ── Print styles ──────────────────────────────────────────── */
@media print {
  #sidebar, .client-selector-bar, .page-header .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { border: 1px solid #ddd !important; }
}

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

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-1-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  #sidebar {
    transform: translateX(-260px);
    transition: transform 0.25s ease;
    width: 260px;
  }

  #sidebar.open { transform: none; }

  .main-content { margin-left: 0; }

  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-light);
  }

  .grid-4 { grid-template-columns: 1fr 1fr; }
  .page-header { padding: 16px 16px 0; }
  .page-content { padding: 16px 16px 30px; }
  .client-selector-bar { padding: 10px 16px; }
}

.hamburger { display: none; }

/* ── Code block ────────────────────────────────────────────── */
.code-block {
  background: #0a0a0f;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: #a5b4fc;
  overflow-x: auto;
  white-space: pre;
}

/* ── UTM output ────────────────────────────────────────────── */
.utm-output {
  background: var(--bg);
  border: 1px solid var(--purple-dim);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: monospace;
  font-size: 12px;
  color: #c4b5fd;
  word-break: break-all;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

/* ── CSV drop zone ─────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--purple);
  background: rgba(124,58,237,0.05);
  color: var(--text-light);
}

.drop-zone i { font-size: 32px; margin-bottom: 12px; display: block; }

/* ── Color swatches ────────────────────────────────────────── */
.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}
.color-swatch.selected, .color-swatch:hover { border-color: #fff; transform: scale(1.1); }

/* ── Plan cards ────────────────────────────────────────────── */
.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
}
.plan-card:hover, .plan-card.selected { border-color: var(--purple); background: rgba(124,58,237,0.06); }
.plan-card .plan-price { font-size: 22px; font-weight: 800; color: var(--purple-light); }
.plan-card .plan-name { font-weight: 700; margin-bottom: 4px; }
.plan-card .plan-desc { font-size: 12px; color: var(--text-muted); }

/* ── Step indicator ────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.step-dot.active { background: var(--purple); color: #fff; box-shadow: 0 0 0 4px rgba(124,58,237,0.2); }
.step-dot.done { background: var(--green); color: #fff; }

.step-line {
  height: 2px;
  width: 60px;
  background: var(--border);
  transition: var(--transition);
}
.step-line.done { background: var(--green); }

/* ── Onboarding wizard ─────────────────────────────────────── */
.wizard-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: var(--bg);
}

.wizard-card {
  width: 100%;
  max-width: 560px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.wizard-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

.wizard-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}

.wizard-logo-text {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.wizard-step-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.wizard-step-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

/* ── PIN input ─────────────────────────────────────────────── */
.pin-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.pin-input {
  width: 52px; height: 52px;
  background: var(--bg);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.pin-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }

/* ── Misc utils ────────────────────────────────────────────── */
.text-muted  { color: var(--text-muted); }
.text-light  { color: var(--text-light); }
.text-green  { color: #4ade80; }
.text-red    { color: #f87171; }
.text-yellow { color: #fbbf24; }
.text-purple { color: var(--purple-light); }
.text-blue   { color: #93c5fd; }
.text-sm     { font-size: 12px; }
.text-xs     { font-size: 11px; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: monospace; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-8   { margin-bottom: 8px; }
.mb-12  { margin-bottom: 12px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ============================================================
   Backend-specific additions
   ============================================================ */

/* Client selector bar */
.client-selector-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.client-selector-bar select {
  flex: 1;
  max-width: 280px;
  font-size: 12px;
  padding: 6px 10px;
}

/* Grid 2-1 */
.grid-2-1 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .grid-2-1 { grid-template-columns: 1fr; } }

/* Form row of 3 */
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) { .form-row-3 { grid-template-columns: 1fr 1fr; } }

/* Info boxes */
.info-box {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}
.info-box.success { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.2); color: #4ade80; }
.info-box.warning { background: rgba(202,138,4,0.08); border: 1px solid rgba(202,138,4,0.2); color: #fbbf24; }
.info-box.error { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.2); color: #f87171; }
.info-box.info { background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.2); color: #93c5fd; }
.info-box i { flex-shrink: 0; margin-top: 1px; }

/* Velocity meter */
.velocity-meter { background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; margin: 8px 0; }
.velocity-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.velocity-row:last-child { border-bottom: none; }
.velocity-label { color: var(--text-muted); }
.velocity-value { color: var(--text); font-weight: 600; }

/* Code block */
.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: monospace;
  font-size: 11px;
  color: #c4b5fd;
  word-break: break-all;
}

/* Activity feed */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.activity-text { font-size: 13px; color: var(--text-light); line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Btn danger */
.btn-danger {
  background: rgba(220,38,38,0.1);
  color: #f87171;
  border: 1px solid rgba(220,38,38,0.2);
}
.btn-danger:hover { background: rgba(220,38,38,0.2); }

/* btn-xs */
.btn-xs { padding: 4px 8px; font-size: 11px; }

/* w-full */
.w-full { width: 100%; }

/* mt-12 */
.mt-12 { margin-top: 12px; }

/* Badge extra colors */
.badge-teal { background: rgba(13,148,136,0.15); color: #2dd4bf; }
.badge-orange { background: rgba(234,88,12,0.15); color: #fb923c; }
.badge-pink { background: rgba(219,39,119,0.15); color: #f472b6; }
.badge-green { background: rgba(22,163,74,0.15); color: #4ade80; }
.badge-yellow { background: rgba(202,138,4,0.15); color: #fbbf24; }
.badge-red { background: rgba(220,38,38,0.15); color: #f87171; }
.badge-gray { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* Sidebar extras */
.sidebar-tagline { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-logo-icon { font-size: 24px; }

/* Section spacing */
.section { margin-bottom: 20px; }

/* Textarea */
.form-textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  resize: vertical;
  transition: var(--transition);
}
.form-textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }

/* Table striping */
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); cursor: pointer; }

/* Sidebar nav link icon spacing */
.sidebar-link i { width: 18px; text-align: center; }

/* Section subtitle */
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

