/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-hover: #f9fafb;
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;

  --green: #059669;
  --green-light: #ecfdf5;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --red: #dc2626;
  --red-light: #fef2f2;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 14px rgba(0,0,0,.08);

  --sidebar-w: 240px;
  --header-h: 64px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

/* ─── App Layout ─────────────────────────────────────────── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}
.sidebar-brand i { font-size: 22px; }
.sidebar-brand-text { display: flex; flex-direction: column; gap: 2px; }
.sidebar-brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s ease;
}
.nav-btn:hover { background: var(--surface-hover); color: var(--text); }
.nav-btn.active { background: var(--primary-light); color: var(--primary); }
.nav-btn i { font-size: 18px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}
.btn-logout:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.connection-status.connected .status-dot { background: var(--green); }
.connection-status.connected .status-text { color: var(--green); }
.connection-status.disconnected .status-dot { background: var(--red); }
.connection-status.disconnected .status-text { color: var(--red); }

/* ─── Main ───────────────────────────────────────────────── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header h1 { font-size: 18px; font-weight: 600; }

.mobile-menu-btn {
  display: none;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text);
  padding: 4px;
}

/* ─── Views ──────────────────────────────────────────────── */
.view {
  display: none;
  padding: 28px;
  padding-top: 36px;
  flex: 1;
}
.view.active { display: block; }

/* ─── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow .15s ease;
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-pending .stat-icon { background: var(--amber-light); color: var(--amber); }
.stat-sent .stat-icon { background: var(--green-light); color: var(--green); }
.stat-failed .stat-icon { background: var(--red-light); color: var(--red); }
.stat-contacts .stat-icon { background: var(--primary-light); color: var(--primary); }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-secondary); }

/* ─── Section ────────────────────────────────────────────── */
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

/* ─── View Toolbar ───────────────────────────────────────── */
.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}
.filter-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .15s ease;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active { background: var(--primary); color: #fff; }

.tag-filter {
  width: auto !important;
  min-width: 160px;
  max-width: 220px;
  padding: 6px 12px;
  font-size: 13px;
}

.msg-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  margin-left: 4px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-header .section-title { margin-bottom: 0; }
.section-header .tag-filter { min-width: 140px; }

.tags-input-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.btn-tag-plus {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px dashed var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: all .15s;
}
.btn-tag-plus:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.tag-input {
  width: 160px !important;
  flex-shrink: 0;
}
.tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
}
.tag-chip-remove {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  opacity: .7;
  font-size: 14px;
  line-height: 1;
}
.tag-chip-remove:hover { opacity: 1; }

.tag-add-popover {
  position: absolute;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 6px;
  align-items: center;
}
.tag-add-popover input {
  width: 140px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.tag-plus-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tag-inline-input {
  display: none;
  width: 100px;
  padding: 4px 8px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
}
.tag-inline-input:focus {
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* ─── Message Cards ──────────────────────────────────────── */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all .15s ease;
}
.msg-card:hover { box-shadow: var(--shadow-sm); border-color: #d1d5db; }

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 600;
}

.msg-body { flex: 1; min-width: 0; }
.msg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 8px;
  flex-wrap: wrap;
}
.msg-name { font-weight: 600; font-size: 14px; }
.msg-phone { font-size: 12px; color: var(--text-muted); }
.msg-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 60px;
  overflow: hidden;
}
.msg-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
}
.msg-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.msg-time i { font-size: 14px; }

.msg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-pending { background: var(--amber-light); color: var(--amber); }
.badge-sent { background: var(--green-light); color: var(--green); }
.badge-failed { background: var(--red-light); color: var(--red); }

.msg-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.msg-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.msg-action-btn:hover { background: var(--surface-hover); color: var(--text); }
.msg-action-btn.danger:hover { background: var(--red-light); color: var(--red); }
.msg-action-btn.send:hover { background: var(--green-light); color: var(--green); }

/* ─── Contacts List ──────────────────────────────────────── */
.contacts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all .15s ease;
}
.contact-card:hover { box-shadow: var(--shadow-sm); }
.contact-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.contact-info { flex: 1; min-width: 0; }
.contact-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-phone { font-size: 12px; color: var(--text-muted); }
.contact-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.contact-actions { display: flex; gap: 4px; }
.contact-action-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.contact-action-btn:hover { background: var(--surface-hover); color: var(--text); }
.contact-action-btn.danger:hover { background: var(--red-light); color: var(--red); }

.groups-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.group-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: all .15s ease;
}
.group-card:hover { box-shadow: var(--shadow-sm); }
.group-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
}
.group-info { flex: 1; min-width: 0; }
.group-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-id { font-size: 11px; color: var(--text-muted); }
.group-actions { display: flex; gap: 4px; }
.group-actions .btn { padding: 6px 10px; font-size: 14px; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn i { font-size: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

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

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  transform: translateY(10px) scale(.98);
  transition: transform .25s ease;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 560px; max-height: 85vh; }

.import-hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.import-search-wrap {
  position: relative; margin-bottom: 14px;
}
.import-search-wrap i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: var(--text-muted);
}
.import-search-wrap input { padding-left: 36px; }
.import-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 24px; color: var(--text-muted); font-size: 14px;
}
.import-loading.hidden { display: none; }
.import-list {
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 16px;
}
.import-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: var(--surface-hover);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.import-item-info { flex: 1; min-width: 0; }
.import-item-name { font-weight: 600; font-size: 13px; }
.import-item-phone { font-size: 11px; color: var(--text-muted); }
.import-item-badge { font-size: 10px; padding: 2px 6px; border-radius: 20px; background: var(--primary-light); color: var(--primary); }
.import-item-btn {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  border: none; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background .15s;
}
.import-item-btn:hover { background: var(--primary-hover); }
.import-item-btn.added { background: var(--green); cursor: default; }
.import-item-btn.added:hover { background: var(--green); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.modal-close:hover { background: var(--surface-hover); color: var(--text); }

.modal-body { padding: 20px 24px 24px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ─── Form ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.char-count { text-align: right; }

.media-attach-wrap { display: flex; flex-direction: column; gap: 10px; }
.media-attach-btn { width: fit-content; }
.media-preview {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.media-preview.has-media { display: flex; }
.media-preview img {
  max-width: 200px;
  max-height: 150px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}
.media-preview-remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--red);
  background: var(--red-light);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: fit-content;
}
.media-preview-remove:hover { background: #fecaca; }

.msg-media-thumb {
  max-width: 120px;
  max-height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-top: 6px;
  border: 1px solid var(--border);
}

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

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ─── Quick Schedule ─────────────────────────────────────── */
.quick-schedule {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.quick-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.quick-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all .15s ease;
}
.quick-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  animation: toastIn .3s ease;
  max-width: 360px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--primary); }
.toast i { font-size: 18px; flex-shrink: 0; }
.toast.success i { color: var(--green); }
.toast.error i { color: var(--red); }
.toast.info i { color: var(--primary); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }

  .main { margin-left: 0; }
  .mobile-menu-btn { display: flex; }

  .view { padding: 16px; }
  .header { padding: 0 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 22px; }

  .contacts-list { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .btn span { display: none; }
  .btn i { margin: 0; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ─── Overlay backdrop for mobile sidebar ────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 99;
}
.sidebar-backdrop.visible {
  display: block;
}
