/* ═══════════════════════════════════════════════════════════════════════════
   WaveDesk — Design System | Modern Clean Light Theme
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Primary */
  --primary:          #5d87ff;
  --primary-dark:     #4570ea;
  --primary-muted:    #ecf2ff;

  /* Semantic Colors */
  --success:          #13deb9;
  --success-muted:    #e6fffa;
  --warning:          #ffae1f;
  --warning-muted:    #fef5e5;
  --danger:           #fa896b;
  --danger-muted:     #fbf2ef;
  --info:             #539bff;
  --info-muted:       #e8f7ff;

  /* Backgrounds */
  --bg-body:          #f0f2f5;  /* Page background */
  --bg-sidebar:       #ffffff;  /* Sidebar */
  --bg-topbar:        #ffffff;  /* Topbar */
  --bg-card:          #ffffff;  /* Cards */
  --bg-hover:         #f6f8fc;  /* Hover state */
  --bg-input:         #ffffff;  /* Inputs */

  /* Text */
  --text-heading:     #1e293b;  /* Dark headings */
  --text-body:        #475569;  /* Body text */
  --text-muted:       #94a3b8;  /* Muted / placeholder */
  --text-invert:      #ffffff;  /* Text on dark bg */

  /* Borders */
  --border-color:     #e2e8f0;
  --border-light:     #f1f5f9;

  /* Sidebar */
  --sidebar-w:        260px;

  /* Topbar */
  --topbar-h:         70px;

  /* Shadows */
  --shadow-sm:   0 1px 3px 0 rgba(0,0,0,.04), 0 1px 2px -1px rgba(0,0,0,.04);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -4px rgba(0,0,0,.07);
  --shadow-card: 0 2px 12px rgba(0,0,0,.06);

  /* Radius */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Transition */
  --t: all 0.18s ease;

  /* Font */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.wd-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.wd-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1000;
  transition: transform .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.wd-sidebar::-webkit-scrollbar { width: 4px; }
.wd-sidebar::-webkit-scrollbar-track { background: transparent; }
.wd-sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.wd-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  flex-shrink: 0;
}

.wd-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(93,135,255,.3);
}

.wd-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -.4px;
}

.wd-logo-text span { color: var(--primary); }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.wd-nav { padding: 16px 0; flex: 1; }

.wd-nav-section { padding: 0 14px; }

.wd-nav-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 8px 8px;
  display: block;
}

.wd-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--text-body);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--t);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 2px;
}

.wd-nav-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
  text-decoration: none;
}

.wd-nav-item.active {
  background: var(--primary-muted);
  color: var(--primary);
  font-weight: 600;
}

.wd-nav-item.active .wd-nav-icon { color: var(--primary); }

.wd-nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--t);
}

.wd-nav-item:hover .wd-nav-icon,
.wd-nav-item.active .wd-nav-icon { color: var(--primary); }

.wd-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.wd-nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
}

/* ─── Submenu ────────────────────────────────────────────────────────────── */
.wd-nav-submenu {
  padding-left: 28px;
  margin-top: 2px;
  margin-bottom: 2px;
  list-style: none;
}

.wd-nav-submenu .wd-nav-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  margin-bottom: 2px;
}

.wd-nav-submenu .wd-nav-item:hover,
.wd-nav-submenu .wd-nav-item.active {
  color: var(--primary);
  background: var(--bg-hover);
  font-weight: 600;
}

.wd-nav-item[data-bs-toggle="collapse"]::after {
  content: "\F282"; /* chevron-down from bootstrap icons */
  font-family: "bootstrap-icons" !important;
  margin-left: auto;
  transition: transform 0.2s ease;
  font-size: 11px;
  color: var(--text-muted);
}

.wd-nav-item[data-bs-toggle="collapse"][aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* ─── Sidebar Footer ─────────────────────────────────────────────────────── */
.wd-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.wd-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  transition: var(--t);
  text-decoration: none;
}

.wd-user-card:hover { background: var(--bg-hover); }

.wd-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-user-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.wd-topbar {
  height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.wd-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-body);
  font-size: 22px;
  padding: 4px;
  border-radius: var(--r-xs);
  transition: var(--t);
}

.wd-hamburger:hover { color: var(--primary); background: var(--bg-hover); }

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.topbar-icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-body);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
  font-size: 16px;
  position: relative;
}

.topbar-icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--primary);
}

.notification-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ─── Content Area ───────────────────────────────────────────────────────── */
.wd-content {
  flex: 1;
  padding: 28px;
  max-width: 1600px;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Avatar ─────────────────────────────────────────────────────────────── */
.wd-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.wd-avatar-placeholder {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.wd-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  transition: var(--t);
}

.wd-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.wd-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -.2px;
}

.wd-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── KPI / Stat Card ────────────────────────────────────────────────────── */
.wd-stat {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--t);
  overflow: hidden;
  position: relative;
}

.wd-stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.wd-stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.wd-stat-icon.primary { background: var(--primary-muted); color: var(--primary); }
.wd-stat-icon.success { background: var(--success-muted); color: var(--success); }
.wd-stat-icon.warning { background: var(--warning-muted); color: var(--warning); }
.wd-stat-icon.danger  { background: var(--danger-muted);  color: var(--danger); }
.wd-stat-icon.info    { background: var(--info-muted);    color: var(--info); }

.wd-stat-body { flex: 1; min-width: 0; }

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

.wd-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 3px;
}

.wd-stat-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
}

.wd-stat-trend.up   { background: var(--success-muted); color: var(--success); }
.wd-stat-trend.down { background: var(--danger-muted);  color: var(--danger); }

/* ─── Page Header ────────────────────────────────────────────────────────── */
.wd-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.wd-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -.5px;
  line-height: 1.2;
}

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

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-wd-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 10px 22px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(93,135,255,.3);
  font-family: var(--font);
  line-height: 1;
}

.btn-wd-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(93,135,255,.4);
  transform: translateY(-1px);
}

.btn-wd-secondary {
  background: var(--primary-muted);
  color: var(--primary);
  border: none;
  border-radius: var(--r-sm);
  padding: 10px 22px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font);
  line-height: 1;
}

.btn-wd-secondary:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.btn-wd-ghost {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  padding: 9px 18px;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font);
  line-height: 1;
}

.btn-wd-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--primary);
  text-decoration: none;
}

/* Sizes */
.btn-sm { padding: 6px 14px !important; font-size: 12px !important; }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.wd-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
}

.wd-badge-primary { background: var(--primary-muted);  color: var(--primary); }
.wd-badge-success { background: var(--success-muted); color: #0ea99d; }
.wd-badge-warning { background: var(--warning-muted); color: #c88b00; }
.wd-badge-danger  { background: var(--danger-muted);  color: #d95f3b; }
.wd-badge-info    { background: var(--info-muted);    color: var(--info); }
.wd-badge-muted   { background: var(--border-light);  color: var(--text-muted); }

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

.wd-table thead tr {
  border-bottom: 1px solid var(--border-color);
}

.wd-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.wd-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
  vertical-align: middle;
  transition: var(--t);
}

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

.wd-table tbody tr:hover td {
  background: var(--bg-hover);
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.wd-input,
.wd-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  color: var(--text-heading);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  transition: var(--t);
  outline: none;
  appearance: none;
}

.wd-input:focus,
.wd-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(93,135,255,.1);
}

.wd-input::placeholder { color: var(--text-muted); }

.wd-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.wd-form-group { margin-bottom: 18px; }

.wd-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* ─── Modals ─────────────────────────────────────────────────────────────── */
.modal-content {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-body) !important;
}

.modal-header {
  border-bottom: 1px solid var(--border-color) !important;
  padding: 20px 24px !important;
}

.modal-footer {
  border-top: 1px solid var(--border-color) !important;
  padding: 16px 24px !important;
}

.modal-title {
  font-family: var(--font) !important;
  font-weight: 700 !important;
  color: var(--text-heading) !important;
  font-size: 16px !important;
}

.btn-close { opacity: .5 !important; }
.btn-close:hover { opacity: 1 !important; }

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--r-sm) !important;
  font-size: 14px !important;
  border: none !important;
  border-left: 3px solid !important;
}

.alert-success { background: var(--success-muted) !important; color: #0e9d8e !important; border-color: var(--success) !important; }
.alert-danger  { background: var(--danger-muted)  !important; color: #c74a2e !important; border-color: var(--danger)  !important; }
.alert-warning { background: var(--warning-muted) !important; color: #c28200 !important; border-color: var(--warning) !important; }
.alert-info    { background: var(--info-muted)    !important; color: var(--info)   !important; border-color: var(--info)    !important; }

/* ─── Dropdown ───────────────────────────────────────────────────────────── */
.dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 6px !important;
  font-family: var(--font) !important;
}

.dropdown-item {
  color: var(--text-body) !important;
  border-radius: var(--r-xs) !important;
  font-size: 13.5px !important;
  padding: 9px 14px !important;
  font-weight: 500 !important;
  transition: var(--t) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--bg-hover) !important;
  color: var(--primary) !important;
}

.dropdown-header {
  color: var(--text-muted) !important;
  font-size: 10.5px !important;
  letter-spacing: .8px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

.dropdown-divider { border-color: var(--border-color) !important; margin: 4px 0 !important; }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.wd-pagination {
  display: flex; align-items: center; gap: 4px;
  margin-top: 20px; justify-content: center;
}

.wd-page-link {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  color: var(--text-body);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: var(--t);
}

.wd-page-link:hover { background: var(--primary-muted); color: var(--primary); border-color: var(--primary-muted); text-decoration: none; }
.wd-page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(93,135,255,.25); }

/* ─── Status Dots ────────────────────────────────────────────────────────── */
.wd-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.wd-dot.online  { background: var(--success); box-shadow: 0 0 6px rgba(19,222,185,.5); }
.wd-dot.offline { background: var(--text-muted); }
.wd-dot.busy    { background: var(--warning); }

/* ─── Empty State ────────────────────────────────────────────────────────── */
.wd-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}

.wd-empty-icon {
  width: 64px; height: 64px;
  background: var(--border-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--text-muted);
  margin-bottom: 16px;
}

.wd-empty-title { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.wd-empty-text  { font-size: 13px; color: var(--text-muted); max-width: 300px; margin-bottom: 20px; }

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

.wd-toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px;
  color: var(--text-body);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn .3s ease forwards;
  max-width: 360px;
  min-width: 280px;
}

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

/* ─── Progress ───────────────────────────────────────────────────────────── */
.wd-progress-bar {
  width: 100%; height: 6px;
  background: var(--border-light);
  border-radius: var(--r-full);
  overflow: hidden;
}

.wd-progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--primary);
  transition: width .6s ease;
}

/* ─── Impersonate Bar ────────────────────────────────────────────────────── */
.wd-impersonate-bar {
  background: var(--warning);
  color: #fff;
  padding: 8px 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 13px; font-weight: 500;
  position: sticky; top: 0; z-index: 9999;
}

/* ─── Overlay Mobile ─────────────────────────────────────────────────────── */
.wd-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;
}

/* ─── WhatsApp Color ─────────────────────────────────────────────────────── */
.text-wa { color: #25d366 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .wd-sidebar {
    transform: translateX(-100%);
  }

  .wd-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

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

  .wd-hamburger {
    display: flex;
  }

  .wd-content {
    padding: 20px 16px;
  }
}

@media (max-width: 640px) {
  .wd-stat-value { font-size: 22px; }
  .wd-stat-icon  { width: 44px; height: 44px; font-size: 18px; }
  .wd-page-title { font-size: 18px; }
}

/* ─── Scrollbar global ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Sidebar scripts helpers ────────────────────────────────────────────── */
#sidebarOverlay.d-none { display: none !important; }

/* ─── Bootstrap overrides ────────────────────────────────────────────────── */
.form-control, .form-select {
  font-family: var(--font) !important;
  font-size: 14px !important;
  border-color: var(--border-color) !important;
  border-radius: var(--r-sm) !important;
  color: var(--text-heading) !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(93,135,255,.1) !important;
}

.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  font-family: var(--font) !important;
}

.btn-primary:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.text-primary { color: var(--primary) !important; }
.bg-primary   { background-color: var(--primary) !important; }
