/* =====================================================
   7kas — Design System
   ===================================================== */

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

:root {
  --sidebar-width: 260px;
  --topbar-height: 64px;

  /* Brand — 7kas palette (origami hummingbird) */
  --brand-primary:   #7a2a8f;
  --brand-secondary: #c972ad;
  --brand-gradient:  linear-gradient(135deg, #7a2a8f 0%, #c972ad 50%, #46c5e5 100%);
  --brand-accent:    #46c5e5;

  /* Sidebar */
  --sidebar-bg:      #1a1230;
  --sidebar-text:    #c4b5d8;
  --sidebar-hover:   rgba(201,114,173,.16);
  --sidebar-active:  rgba(201,114,173,.25);
  --sidebar-border:  rgba(255,255,255,.08);

  /* Content */
  --content-bg:      #f4f6fc;
  --topbar-bg:       #ffffff;
  --card-bg:         #ffffff;

  /* Text */
  --text-primary:    #0f172a;
  --text-secondary:  #64748b;
  --text-muted:      #94a3b8;

  /* Status */
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #3b82f6;

  /* UI */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --transition:  all .2s ease;
}

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

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--content-bg);
  -webkit-font-smoothing: antialiased;
}

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

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo .logo-icon {
  width: 100%;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
}

.sidebar-logo .logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -.3px;
  line-height: 1.1;
}

.sidebar-logo .logo-text span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--sidebar-text);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: none;
}
.sidebar-content::-webkit-scrollbar { display: none; }

/* PBX info badge */
.sidebar-pbx {
  margin: 4px 12px 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.07);
  border-radius: var(--radius-md);
  border: 1px solid var(--sidebar-border);
}
.sidebar-pbx .pbx-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--sidebar-text);
  font-weight: 500;
}
.sidebar-pbx .pbx-name {
  font-size: 13px;
  color: #ffffff;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pbx-dot { width:7px;height:7px;border-radius:50%;background:var(--success);flex-shrink:0; }

/* Section label */
.nav-section {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(160,172,210,.6);
}

/* Nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px;
  margin: 1px 8px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #eed8f0;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--brand-primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon {
  width: 18px; text-align: center;
  font-size: 15px;
  flex-shrink: 0;
  opacity: .8;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--brand-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: var(--sidebar-width); right: 0;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid #e8ecf4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 999;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.breadcrumb-nav .crumb-active {
  color: var(--text-primary);
  font-weight: 600;
}
.breadcrumb-sep { color: var(--text-muted); font-size: 12px; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid #e8ecf4;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 15px;
  transition: var(--transition);
  text-decoration: none;
}
.topbar-btn:hover { background: #f8f5fa; color: var(--brand-primary); border-color: #d8b4e8; }

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-lg);
  border: 1px solid #e8ecf4;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.user-menu:hover { background: #f8f5fa; border-color: #d8b4e8; }

.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info { line-height: 1.2; }
.user-info .user-name { font-size: 13px; font-weight: 600; }
.user-info .user-role { font-size: 11px; color: var(--text-secondary); }

/* ── MAIN CONTENT ───────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-container {
  flex: 1;
  padding: 28px;
  max-width: 1600px;
}

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

.page-title-block { flex: 1; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.4px;
  margin-bottom: 3px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── STATS ROW ──────────────────────────────────────── */
.stats-row, .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e8ecf4;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(122,42,143,.1); color: var(--brand-primary); }
.stat-icon.green  { background: rgba(16,185,129,.1); color: var(--success); }
.stat-icon.orange { background: rgba(245,158,11,.1); color: var(--warning); }
.stat-icon.red    { background: rgba(239,68,68,.1);  color: var(--danger); }
.stat-icon.purple { background: rgba(124,58,237,.1); color: var(--brand-secondary); }
.stat-icon.teal   { background: rgba(20,184,166,.1); color: #14b8a6; }

.stat-info .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}
.stat-info .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 3px;
}
.stat-info .stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid #e8ecf4;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid #f1f4fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title i { color: var(--brand-primary); font-size: 15px; }

.card-body { padding: 22px; }

/* ── DATA TABLE ─────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead th {
  padding: 11px 14px;
  background: #f8faff;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid #e8ecf4;
  white-space: nowrap;
  text-align: left;
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f4fa;
  transition: background .12s;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f8faff; }

.data-table tbody td {
  padding: 12px 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

.td-primary {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}
.td-secondary { color: var(--text-secondary); }
.td-mono { font-family: 'Courier New', monospace; font-size: 13px; font-weight: 600; }

/* ── SEARCH BAR ─────────────────────────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f4fa;
  background: #fff;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}
.search-box i {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}
.search-box input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid #e8ecf4;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background: #f8faff;
  outline: none;
  transition: var(--transition);
}
.search-box input:focus { border-color: var(--brand-primary); background: #fff; box-shadow: 0 0 0 3px rgba(122,42,143,.1); }

.record-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

.badge-green  { background: rgba(16,185,129,.12); color: #059669; }
.badge-red    { background: rgba(239,68,68,.12);  color: #dc2626; }
.badge-blue   { background: rgba(79,110,247,.12); color: #3b5fe2; }
.badge-orange { background: rgba(245,158,11,.12); color: #d97706; }
.badge-gray   { background: rgba(100,116,139,.1); color: #4b5563; }
.badge-purple { background: rgba(124,58,237,.12); color: #7c3aed; }
.badge-teal   { background: rgba(20,184,166,.12); color: #0d9488; }

.badge i { font-size: 8px; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn i { font-size: 13px; }

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(122,42,143,.3);
}
.btn-primary:hover { opacity: .9; box-shadow: 0 4px 12px rgba(122,42,143,.4); transform: translateY(-1px); color: #fff; }

.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover { opacity:.9; color:#fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-danger:hover  { opacity:.9; color:#fff; }
.btn-warning  { background: var(--warning); color: #fff; }

.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover { background: #eef0f8; color: var(--text-primary); }

.btn-outline {
  background: transparent;
  border: 1px solid #e8ecf4;
  color: var(--text-secondary);
}
.btn-outline:hover { background: #f8f5fa; border-color: #d8b4e8; color: var(--brand-primary); }

.btn-sm { padding: 5px 10px; font-size: 12px; gap: 5px; }
.btn-sm i { font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: var(--radius-sm); }

/* Icon-only action buttons */
.action-btns { display: flex; align-items: center; gap: 5px; }
.btn-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  text-decoration: none;
}
.btn-icon-view   { background: rgba(122,42,143,.1); color: var(--brand-primary); }
.btn-icon-edit   { background: rgba(245,158,11,.1); color: var(--warning); }
.btn-icon-delete { background: rgba(239,68,68,.1);  color: var(--danger); }
.btn-icon:hover  { filter: brightness(1.1); transform: scale(1.08); }

/* ── FORMS ──────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.full   { grid-template-columns: 1fr; }
.form-span-2      { grid-column: span 2; }

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-control {
  padding: 9px 13px;
  border: 1px solid #e8ecf4;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.form-control:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(122,42,143,.1); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: #f8faff; color: var(--text-muted); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

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

.form-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f4fa;
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.form-section-title i { color: var(--brand-primary); }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  cursor: pointer;
  transition: .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--brand-primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* ── ALERTS ─────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert i { font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.alert-success { background: rgba(16,185,129,.1); color: #065f46; border: 1px solid rgba(16,185,129,.25); }
.alert-danger  { background: rgba(239,68,68,.1);  color: #991b1b; border: 1px solid rgba(239,68,68,.25); }
.alert-info    { background: rgba(122,42,143,.1);  color: #1e40af; border: 1px solid rgba(79,110,247,.25); }
.alert-warning { background: rgba(245,158,11,.1);  color: #92400e; border: 1px solid rgba(245,158,11,.25); }

/* ── FILTER FORMS ────────────────────────────────────── */
.filter-form { width: 100%; }
.filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.filter-select, .filter-input {
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(122,42,143,.1);
}
@media (max-width: 768px) {
  .filter-row { flex-direction: column; }
  .filter-group { width: 100%; }
}

/* ── GRID PAGINATION ─────────────────────────────────── */
.grid-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f1f5f9;
}
.grid-controls-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.grid-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.grid-filter {
  position: relative;
  display: flex;
  align-items: center;
}
.grid-filter i {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 14px;
}
.grid-filter input {
  padding: 7px 12px 7px 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  width: 200px;
  transition: border-color .2s, box-shadow .2s;
}
.grid-filter input:focus {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(122,42,143,.1);
}
.grid-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}
.grid-size select {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  cursor: pointer;
}
.grid-size select:focus {
  border-color: var(--brand-primary);
}
.grid-info {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}
.grid-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid #f1f5f9;
}
.grid-pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.grid-pagination button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.grid-pagination button:disabled {
  opacity: .35;
  cursor: default;
}
.grid-pagination .pg-pages {
  display: flex;
  gap: 4px;
}
.grid-pagination .pg-btn {
  min-width: 34px;
  width: auto;
  padding: 0 8px;
}
.grid-pagination .pg-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  font-weight: 600;
}
@media (max-width: 768px) {
  .grid-controls { flex-direction: column; align-items: stretch; }
  .grid-controls-left { flex-direction: column; }
  .grid-filter input { width: 100%; }
}

/* ── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-state .empty-icon {
  font-size: 48px;
  color: #d8b4e8;
  margin-bottom: 16px;
}
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--text-muted); max-width: 280px; }

/* ── MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(.98);
  transition: transform .2s;
}
.modal-overlay.open .modal-box { transform: none; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f4fa;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); padding: 2px; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #f1f4fa; display: flex; justify-content: flex-end; gap: 10px; }
.modal-lg .modal-box { max-width: 800px; }

/* ── TABS ───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #f1f4fa;
  margin-bottom: 24px;
}
.tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover { color: var(--brand-primary); background: rgba(122,42,143,.05); }
.tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── LOGIN PAGE ─────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--sidebar-bg);
}
.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(135deg, #1a1230 0%, #2d1640 40%, #1a2a4a 100%);
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70,197,229,.12) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,114,173,.1) 0%, transparent 70%);
  bottom: -50px; left: -50px;
}
.login-left-content { position: relative; z-index: 1; text-align: center; color: #fff; max-width: 360px; }
.login-brand-icon {
  width: 72px; height: 72px;
  background: transparent;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}
.login-left-content h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.5px; }
.login-left-content p  { color: rgba(255,255,255,.6); font-size: 14px; line-height: 1.6; }
.login-features { margin-top: 36px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.login-feature {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
}
.login-feature i { color: var(--brand-accent, #46c5e5); font-size: 16px; }

.login-right {
  width: 480px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 48px;
}
.login-form-wrap { width: 100%; max-width: 360px; }
.login-form-title  { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.login-form-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 28px; }

/* ── DASHBOARD SPECIFICS ────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f8faff;
  border: 1px solid #e8ecf4;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.quick-link:hover { background: #f3eef8; border-color: #d8b4e8; color: var(--brand-primary); }
.quick-link i { font-size: 16px; width: 20px; text-align: center; }

/* ── CHIP / TAG ─────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f1f4fa;
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── PAGINATION ─────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
  border-top: 1px solid #f1f4fa;
  justify-content: flex-end;
}
.page-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid #e8ecf4;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  color: var(--text-secondary);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.page-btn.active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* ── UTILITIES ──────────────────────────────────────── */
.d-flex  { display: flex; }
.d-none  { display: none; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.w-100 { width: 100%; }
.separator { height: 1px; background: #f1f4fa; margin: 12px 0; }

/* ── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8b4e8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }

.mobile-menu-btn { display: none; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
  .login-left { display: none; }
  .login-right { width: 100%; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    left: -280px !important;
    transition: left .3s ease;
    z-index: 1100;
    width: 260px;
  }
  .sidebar.mobile-open {
    left: 0 !important;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4);
    z-index: 1050;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .main-content { margin-left: 0; }
  .topbar { left: 0; }
  .page-container { padding: 16px; }
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: var(--card-bg, #fff);
    color: var(--brand-primary);
    font-size: 20px;
    cursor: pointer;
    margin-right: 8px;
    flex-shrink: 0;
  }
}
