/* ==========================================
   ADMIN TEMPLATE - CUSTOM THEME
   Compatible with Bootstrap 5.3 + .NET Core 9
   ========================================== */

:root {
  /* Primary Theme Colors */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 70px;
  --sidebar-bg: #1e1b4b;
  --sidebar-text: rgba(255,255,255,0.8);
  --sidebar-active-bg: rgba(99,102,241,0.3);
  --sidebar-hover-bg: rgba(255,255,255,0.08);
  --sidebar-border: rgba(255,255,255,0.08);

  /* Topbar */
  --topbar-height: 64px;
  --topbar-bg: #ffffff;
  --topbar-text: #374151;
  --topbar-border: #e5e7eb;

  /* Body */
  --body-bg: #f3f4f6;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  /* Misc */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- DARK MODE ---- */
[data-theme="dark"] {
  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(255,255,255,0.06);
  --topbar-bg: #1e293b;
  --topbar-text: #e2e8f0;
  --topbar-border: #334155;
  --body-bg: #0f172a;
  --card-bg: #1e293b;
  --card-border: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

/* ==========================================
   BASE LAYOUT
   ========================================== */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-primary);
  transition: var(--transition);
  overflow-x: hidden;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  height: var(--topbar-height);
  flex-shrink: 0;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-footer-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  padding: 12px 20px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-size: 14px;
}

.nav-item-link:hover {
  background: var(--sidebar-hover-bg);
  color: white;
}

.nav-item-link.active {
  background: var(--sidebar-active-bg);
  color: white;
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item-link .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-item-link .nav-badge {
  margin-left: auto;
  background: var(--secondary);
  color: white;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-item-link .nav-chevron {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-item-link[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  background: rgba(0,0,0,0.15);
}

.nav-submenu .nav-item-link {
  padding-left: 56px;
  font-size: 13px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary);
}

.sidebar-footer-text {
  overflow: hidden;
  transition: var(--transition);
}

.sidebar-footer-text .user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.sidebar-footer-text .user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ==========================================
   TOPBAR
   ========================================== */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.sidebar.collapsed ~ .topbar,
.sidebar.collapsed ~ .main-content {
  left: var(--sidebar-collapsed-width);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.topbar-search {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.topbar-search input {
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 16px 8px 40px;
  border-radius: 30px;
  font-size: 13px;
  width: 100%;
  transition: var(--transition);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.topbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: 16px;
}

.topbar-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.topbar-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--topbar-bg);
}

.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--primary);
}

.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 28px;
  min-height: calc(100vh - var(--topbar-height));
  transition: var(--transition);
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--card-border);
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
  color: var(--text-primary);
}

/* ==========================================
   STAT CARDS
   ========================================== */
.stat-card {
  border-radius: var(--border-radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.stat-card .stat-trend {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-gradient-1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.stat-gradient-2 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.stat-gradient-3 { background: linear-gradient(135deg, #10b981, #059669); }
.stat-gradient-4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }

/* ==========================================
   PAGE HEADER
   ========================================== */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.breadcrumb-item, .breadcrumb-item a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--primary);
}

/* ==========================================
   THEME CUSTOMIZER PANEL
   ========================================== */
.theme-panel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: var(--card-bg);
  border-left: 1px solid var(--card-border);
  z-index: 1100;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.theme-panel.open {
  right: 0;
}

.theme-panel-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-panel-body {
  padding: 20px;
}

.theme-panel-section {
  margin-bottom: 24px;
}

.theme-panel-section h6 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}

.color-swatch.active, .color-swatch:hover {
  border-color: var(--text-primary);
  transform: scale(1.1);
}

.theme-toggle-btn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 1099;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

/* ==========================================
   NOTIFICATION TOAST
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.custom-toast {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  transition: var(--transition);
}

.custom-toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-icon.success { background: rgba(16,185,129,0.15); color: var(--success); }
.toast-icon.error { background: rgba(239,68,68,0.15); color: var(--danger); }
.toast-icon.warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.toast-icon.info { background: rgba(99,102,241,0.15); color: var(--primary); }

.toast-content .toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-content .toast-msg {
  font-size: 12px;
  color: var(--text-secondary);
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

/* ==========================================
   NOTIFICATION BAR (TOP ALERT)
   ========================================== */
.notification-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2100;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.notification-bar.show {
  transform: translateY(0);
}

.notification-bar.info { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; }
.notification-bar.success { background: linear-gradient(135deg, var(--success), #34d399); color: white; }
.notification-bar.warning { background: linear-gradient(135deg, var(--warning), #fbbf24); color: white; }
.notification-bar.danger { background: linear-gradient(135deg, var(--danger), #f87171); color: white; }

/* ==========================================
   WIZARD / STEPPER
   ========================================== */
.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--card-border);
  z-index: 0;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
  margin-bottom: 8px;
}

.wizard-step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
}

.wizard-step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.wizard-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.wizard-step.completed .step-label {
  color: var(--success);
}

.wizard-content {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   DATA TABLES
   ========================================== */
.table {
  color: var(--text-primary);
}

.table th {
  background: var(--body-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--card-border);
  padding: 12px 16px;
}

.table td {
  border-bottom: 1px solid var(--card-border);
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 14px;
}

.table tbody tr:hover td {
  background: rgba(99,102,241,0.04);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================
   BADGES
   ========================================== */
.badge-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================
   FORMS
   ========================================== */
.form-control, .form-select {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-group-text {
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}

/* Floating label override */
.form-floating > .form-control,
.form-floating > .form-select {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--card-border);
}

.form-floating > label {
  color: var(--text-muted);
}

/* Range */
.form-range::-webkit-slider-thumb {
  background: var(--primary);
}

/* Switch */
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-dark);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #3730a3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, var(--primary-dark), #db2777);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}

/* ==========================================
   CHARTS PLACEHOLDER
   ========================================== */
.chart-container {
  position: relative;
  height: 260px;
}

/* ==========================================
   ACTIVITY FEED
   ========================================== */
.activity-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.activity-content .activity-text {
  font-size: 13px;
  color: var(--text-primary);
}

.activity-content .activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================
   QUICK ACTIONS
   ========================================== */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--border-radius-sm);
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
}

.quick-action:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.3);
}

.quick-action .action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99,102,241,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.quick-action:hover .action-icon {
  background: rgba(255,255,255,0.2);
}

.quick-action span {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* ==========================================
   MODAL OVERRIDES
   ========================================== */
.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
}

.modal-header {
  border-bottom: 1px solid var(--card-border);
  background: transparent;
}

.modal-footer {
  border-top: 1px solid var(--card-border);
}

.modal-title {
  color: var(--text-primary);
  font-weight: 600;
}

.btn-close {
  filter: none;
}

[data-theme="dark"] .btn-close {
  filter: invert(1);
}

/* ==========================================
   PROGRESS & MISC
   ========================================== */
.progress {
  background: var(--body-bg);
  border-radius: 10px;
  height: 8px;
}

.progress-bar {
  border-radius: 10px;
}

/* ==========================================
   TOPBAR COLOR THEMES
   ========================================== */
.topbar[data-color="purple"] { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; }
.topbar[data-color="pink"]   { background: linear-gradient(135deg, #ec4899, #f43f5e); border-color: transparent; }
.topbar[data-color="teal"]   { background: linear-gradient(135deg, #06b6d4, #0891b2); border-color: transparent; }
.topbar[data-color="dark"]   { background: #1e293b; border-color: #334155; }
.topbar[data-color="green"]  { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; }

.topbar[data-color="purple"] .topbar-btn,
.topbar[data-color="pink"] .topbar-btn,
.topbar[data-color="teal"] .topbar-btn,
.topbar[data-color="dark"] .topbar-btn,
.topbar[data-color="green"] .topbar-btn {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
  color: white;
}

.topbar[data-color]:not([data-color="white"]) .topbar-search input {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
  color: white;
}

.topbar[data-color]:not([data-color="white"]) .topbar-search input::placeholder {
  color: rgba(255,255,255,0.6);
}

.topbar[data-color]:not([data-color="white"]) .topbar-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .topbar, .main-content {
    left: 0 !important;
  }
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==========================================
   UTILITIES
   ========================================== */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-soft { background: rgba(99,102,241,0.1) !important; }
.bg-success-soft { background: rgba(16,185,129,0.1) !important; }
.bg-danger-soft { background: rgba(239,68,68,0.1) !important; }
.bg-warning-soft { background: rgba(245,158,11,0.1) !important; }
.bg-info-soft { background: rgba(6,182,212,0.1) !important; }
.rounded-xl { border-radius: var(--border-radius) !important; }
.rounded-lg { border-radius: var(--border-radius-sm) !important; }
.fw-semibold { font-weight: 600 !important; }
.text-xs { font-size: 11px !important; }
.text-sm { font-size: 13px !important; }

/* avatar group */
.avatar-group {
  display: flex;
}
.avatar-group .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
  margin-left: -8px;
  overflow: hidden;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
}
.avatar-group .avatar:first-child { margin-left: 0; }
