/**
 * One Nestiko - Admin Panel
 * Inspired by LittleInspire Admin v2 Design
 * Deep dark sidebar, collapsible menus, premium feel
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-w: 272px;
  --sidebar-bg: #0c0f1d;
  --sidebar-bg-2: #111427;
  --sidebar-text: rgba(255,255,255,0.85);
  --sidebar-muted: rgba(255,255,255,0.45);
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active-bg: rgba(99, 102, 241, 0.15);
  --sidebar-active-border: #6366f1;
  --sidebar-active-text: #a5b4fc;
  --sidebar-divider: rgba(255,255,255,0.06);
  --header-h: 64px;
  --header-bg: #ffffff;
  --header-border: #e5e7eb;
  --gap: 24px;
  --gap-sm: 16px;
  --gap-xs: 8px;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.1);
  --blue: #3b82f6;
  --green: #10b981;
  --red: #ef4444;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
  --duration-slow: 300ms;
}

/* ===== DARK MODE ===== */
.dark-mode {
  --header-bg: #1e1e2d;
  --header-border: #2d2d3d;
  --surface: #1e1e2d;
  --surface-2: #252536;
  --surface-3: #2d2d3d;
  --border: #3d3d4d;
  --border-light: #2d2d3d;
  --text: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  color: var(--text); -webkit-font-smoothing: antialiased;
  margin: 0; padding: 0; background: var(--surface-2);
}

/* ===== AUTH PAGES ===== */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0c0f1d 0%, #1a1d35 50%, #111427 100%);
  padding: 24px; position: relative; overflow: hidden;
}
.auth-wrap::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99,102,241,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(139,92,246,0.06) 0%, transparent 60%);
  animation: authBgShift 20s ease-in-out infinite alternate;
}
@keyframes authBgShift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, -5%) scale(1.1); }
}
.auth-card {
  width: 100%; max-width: 440px; position: relative; z-index: 1;
  background: rgba(255,255,255,0.03); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
  padding: 48px 40px; box-shadow: 0 32px 64px rgba(0,0,0,0.3);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px; box-shadow: 0 8px 32px rgba(99,102,241,0.3);
}
.auth-logo-icon svg { width: 28px; height: 28px; color: white; }
.auth-title {
  font-size: 24px; font-weight: 700; color: white; margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.auth-subtitle { font-size: 14px; color: rgba(255,255,255,0.5); margin: 0; }

.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7);
  letter-spacing: 0.01em;
}
.auth-input-wrap { position: relative; }
.auth-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: rgba(255,255,255,0.3);
  pointer-events: none;
}
.auth-input {
  width: 100%; padding: 12px 14px 12px 44px; font-size: 14px; font-family: var(--font);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); color: white; outline: none;
  transition: all var(--duration) var(--ease);
}
.auth-input::placeholder { color: rgba(255,255,255,0.3); }
.auth-input:focus {
  border-color: var(--primary); background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.auth-error {
  font-size: 12px; color: #f87171; margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.auth-error svg { width: 14px; height: 14px; flex-shrink: 0; }

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.auth-remember {
  display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.6);
  cursor: pointer;
}
.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary);
  border-radius: 4px; cursor: pointer;
}
.auth-forgot {
  color: var(--primary); text-decoration: none; font-weight: 500;
  transition: color var(--duration) var(--ease);
}
.auth-forgot:hover { color: #818cf8; }

.auth-btn {
  width: 100%; padding: 13px 24px; font-size: 15px; font-weight: 600;
  font-family: var(--font); color: white; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: var(--radius-lg);
  transition: all var(--duration) var(--ease);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}
.auth-btn:active { transform: translateY(0); }
.auth-btn svg { width: 18px; height: 18px; }

.auth-alt {
  text-align: center; font-size: 14px; color: rgba(255,255,255,0.5);
  margin-top: 8px;
}
.auth-alt a {
  color: var(--primary); font-weight: 600; text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.auth-alt a:hover { color: #818cf8; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.3); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}

.auth-status {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  background: rgba(16,185,129,0.1); color: #34d399;
  border: 1px solid rgba(16,185,129,0.2);
}

/* ===== DASHBOARD LAYOUT ===== */
.app-wrap { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1050;
  display: flex; flex-direction: column;
  transition: transform var(--duration-slow) var(--ease);
  overflow: hidden;
}
.sidebar::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0.05) 50%, transparent 100%);
  pointer-events: none;
}

.sidebar__logo {
  height: var(--header-h); padding: 0 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--sidebar-divider); flex-shrink: 0;
}
.sidebar__logo a {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: white;
}
.sidebar__logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar__logo-icon svg { width: 20px; height: 20px; color: white; }
.sidebar__logo-text {
  font-size: 16px; font-weight: 700; color: white;
  letter-spacing: -0.01em; white-space: nowrap;
}

.sidebar__nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 12px 12px 24px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.nav__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--sidebar-muted); padding: 8px 12px 6px; margin-top: 20px; white-space: nowrap;
}
.nav__label:first-child { margin-top: 4px; }
.nav__label::after { content: ''; flex: 1; height: 1px; background: var(--sidebar-divider); }

.nav__group { list-style: none; margin: 0; padding: 0; }
.nav__item { margin: 2px 0; position: relative; }

.nav__link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius); color: var(--sidebar-text);
  text-decoration: none !important; font-weight: 500; font-size: 13.5px;
  transition: all var(--duration) var(--ease);
  position: relative; overflow: hidden; border: 1px solid transparent;
}
.nav__link:hover { background: var(--sidebar-hover); color: white; text-decoration: none !important; }
.nav__link--active {
  background: var(--sidebar-active-bg) !important;
  color: var(--sidebar-active-text) !important;
  border-color: rgba(99,102,241,0.2);
}
.nav__link--active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 24px; background: var(--sidebar-active-border); border-radius: 0 3px 3px 0;
}

.nav__icon {
  width: 36px; height: 36px; min-width: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: rgba(255,255,255,0.05);
  flex-shrink: 0; transition: all var(--duration) var(--ease);
}
.nav__icon svg { width: 18px; height: 18px; opacity: 0.85; transition: opacity var(--duration) var(--ease); }
.nav__link:hover .nav__icon { background: rgba(255,255,255,0.08); }
.nav__link:hover .nav__icon svg { opacity: 1; }
.nav__link--active .nav__icon { background: rgba(99,102,241,0.2); }
.nav__link--active .nav__icon svg { opacity: 1; color: var(--sidebar-active-text); }

.nav__icon--indigo { background: rgba(99,102,241,0.15) !important; color: #818cf8 !important; }
.nav__icon--blue { background: rgba(59,130,246,0.15) !important; color: #60a5fa !important; }
.nav__icon--purple { background: rgba(139,92,246,0.15) !important; color: #a78bfa !important; }
.nav__icon--green { background: rgba(16,185,129,0.15) !important; color: #34d399 !important; }
.nav__icon--orange { background: rgba(245,158,11,0.15) !important; color: #fbbf24 !important; }
.nav__icon--pink { background: rgba(236,72,153,0.15) !important; color: #f472b6 !important; }
.nav__icon--cyan { background: rgba(6,182,212,0.15) !important; color: #22d3ee !important; }
.nav__icon--red { background: rgba(239,68,68,0.15) !important; color: #f87171 !important; }

.nav__text { display: flex; flex-direction: column; min-width: 0; }
.nav__text-main { font-size: 13.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__text-sub { font-size: 11px; color: var(--sidebar-muted); line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__link:hover .nav__text-sub { color: rgba(255,255,255,0.55); }
.nav__link--active .nav__text-sub { color: rgba(165,180,252,0.7); }

/* Sidebar submenu toggle */
.nav__toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border-radius: var(--radius); color: var(--sidebar-text);
  font-weight: 500; font-size: 13.5px; background: transparent;
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-align: left; font-family: inherit;
}
.nav__toggle:hover { background: var(--sidebar-hover); color: white; }
.nav__toggle-arrow {
  margin-left: auto; width: 16px; height: 16px; opacity: 0.4; flex-shrink: 0;
  transition: transform var(--duration-slow) var(--ease), opacity var(--duration) var(--ease);
}
.nav__toggle:hover .nav__toggle-arrow { opacity: 0.7; }
.nav__toggle[aria-expanded="true"] .nav__toggle-arrow { transform: rotate(90deg); opacity: 0.7; }

.nav__sub {
  list-style: none; margin: 0; padding: 0 0 4px 0;
  overflow: hidden; max-height: 0;
  transition: max-height var(--duration-slow) var(--ease);
}
.nav__sub.is-open { max-height: 500px; }
.nav__sub .nav__link { padding: 8px 12px 8px 60px; font-size: 13px; color: var(--sidebar-muted); }
.nav__sub .nav__link::before {
  content: ''; position: absolute; left: 30px; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.15); transform: translateY(-50%);
  transition: all var(--duration) var(--ease);
}
.nav__sub .nav__link:hover { color: white; }
.nav__sub .nav__link:hover::before { background: rgba(255,255,255,0.4); }
.nav__sub .nav__link--active { color: var(--sidebar-active-text) !important; background: transparent !important; }
.nav__sub .nav__link--active::before { background: var(--sidebar-active-border) !important; }

/* Sidebar footer */
.sidebar__footer { padding: 16px; border-top: 1px solid var(--sidebar-divider); flex-shrink: 0; }
.sidebar__user {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius); background: rgba(255,255,255,0.04);
  transition: background var(--duration) var(--ease);
  color: var(--sidebar-text); cursor: pointer; border: none; width: 100%;
  font-family: inherit; text-align: left; text-decoration: none !important;
}
.sidebar__user:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar__user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.sidebar__user-info { min-width: 0; }
.sidebar__user-name { font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role { font-size: 11px; color: var(--sidebar-muted); }

/* Sidebar overlay */
.sidebar-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1040;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: all var(--duration-slow) var(--ease);
}
.sidebar-overlay.is-visible { opacity: 1; visibility: visible; }

/* ===== MAIN CONTENT ===== */
.main {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
  transition: margin-left var(--duration-slow) var(--ease);
}

/* ===== HEADER ===== */
.header {
  height: var(--header-h); position: sticky; top: 0; z-index: 1030;
  background: var(--header-bg); border-bottom: 1px solid var(--header-border);
  display: flex; align-items: center; padding: 0 var(--gap); gap: 16px;
  backdrop-filter: blur(12px);
}
.sidebar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-2); padding: 6px; border-radius: var(--radius-sm);
  transition: background var(--duration) var(--ease);
}
.sidebar-toggle:hover { background: var(--surface-3); }
.sidebar-toggle svg { width: 22px; height: 22px; }

.header__brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--text);
}

.header__search {
  flex: 1; max-width: 400px; position: relative;
}
.header__search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-3); pointer-events: none;
}
.header__search-input {
  width: 100%; padding: 9px 60px 9px 38px; font-size: 13px; font-family: var(--font);
  background: var(--surface-3); border: 1px solid transparent; border-radius: 10px;
  color: var(--text); outline: none;
  transition: all var(--duration) var(--ease);
}
.header__search-input::placeholder { color: var(--text-3); }
.header__search-input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-light); }
.header__search-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--text-3);
  background: var(--surface); padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--border);
}

.header__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header__btn {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: var(--surface-3); color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--duration) var(--ease); text-decoration: none;
}
.header__btn:hover { background: var(--surface-2); color: var(--primary); }
.header__btn svg { width: 18px; height: 18px; }

.header__divider { width: 1px; height: 28px; background: var(--border); margin: 0 6px; }

.header__user {
  display: flex; align-items: center; gap: 10px; text-decoration: none !important;
  color: var(--text); padding: 4px 8px 4px 4px; border-radius: 10px;
  transition: background var(--duration) var(--ease); cursor: pointer;
}
.header__user:hover { background: var(--surface-3); }
.header__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; flex-shrink: 0;
}
.header__user-info { display: flex; flex-direction: column; }
.header__name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.header__role { font-size: 11px; color: var(--text-3); line-height: 1.3; }
.header__user-chevron { width: 16px; height: 16px; color: var(--text-3); }

/* Theme toggle */
.theme-toggle {
  width: 50px; height: 26px; border-radius: 13px; border: none; cursor: pointer;
  background: var(--surface-3); position: relative; padding: 0;
  transition: background var(--duration) var(--ease);
}
.theme-toggle__track { display: flex; align-items: center; width: 100%; height: 100%; position: relative; }
.theme-toggle__thumb {
  width: 20px; height: 20px; border-radius: 50%; background: white;
  position: absolute; left: 3px; top: 3px;
  transition: transform var(--duration-slow) var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.theme-toggle__icon { position: absolute; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; }
.theme-toggle__icon--sun { left: 6px; color: #f59e0b; }
.theme-toggle__icon--moon { right: 6px; color: var(--text-3); }
.theme-toggle__icon svg { width: 14px; height: 14px; }
.dark-mode .theme-toggle { background: #374151; }
.dark-mode .theme-toggle__thumb { transform: translateX(24px); background: #1e1e2d; }

/* ===== CONTENT ===== */
.content { flex: 1; padding: var(--gap); }

/* ===== DASHBOARD CARDS ===== */
.welcome-banner {
  padding: 32px; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  color: white; position: relative; overflow: hidden; margin-bottom: var(--gap);
}
.welcome-banner::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.welcome-banner h2 { font-size: 24px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.02em; }
.welcome-banner p { font-size: 15px; opacity: 0.85; margin: 0; max-width: 500px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap-sm); margin-bottom: var(--gap);
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; position: relative; overflow: hidden;
  transition: all var(--duration) var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stat-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card__icon svg { width: 22px; height: 22px; }
.stat-card__icon--indigo { background: rgba(99,102,241,0.1); color: var(--primary); }
.stat-card__icon--green { background: rgba(16,185,129,0.1); color: var(--green); }
.stat-card__icon--blue { background: rgba(59,130,246,0.1); color: var(--blue); }
.stat-card__icon--orange { background: rgba(245,158,11,0.1); color: var(--orange); }
.stat-card__value { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.02em; }
.stat-card__label { font-size: 13px; color: var(--text-3); font-weight: 500; }

.section-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  margin-bottom: var(--gap);
}
.section-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-card__title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }

/* ===== BUTTONS ===== */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white; border: none; padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; font-family: var(--font); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.btn-primary-custom:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,0.35); }
.btn-ghost {
  background: transparent; color: var(--text-2); border: 1px solid var(--border);
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; font-family: var(--font); cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

/* ===== FORM STYLES (Dashboard) ===== */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.form-control-custom {
  width: 100%; padding: 10px 14px; font-size: 14px; font-family: var(--font);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); outline: none;
  transition: all var(--duration) var(--ease);
}
.form-control-custom:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Alert */
.alert-custom {
  padding: 14px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(16,185,129,0.1); color: #059669; border: 1px solid rgba(16,185,129,0.2); }
.alert-danger { background: rgba(239,68,68,0.1); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }

/* Dropdown menu */
.dropdown-menu {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); padding: 8px; background: var(--surface);
  min-width: 200px;
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  color: var(--text-2); transition: all var(--duration) var(--ease);
}
.dropdown-item:hover { background: var(--surface-3); color: var(--text); }
.dropdown-item svg { width: 16px; height: 16px; }
.dropdown-item--danger { color: var(--red) !important; }
.dropdown-item--danger:hover { background: rgba(239,68,68,0.05); }
.dropdown-header { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); padding: 6px 12px; }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1060;
  background: var(--header-bg); border-top: 1px solid var(--header-border);
  padding: 4px 0 env(safe-area-inset-bottom, 4px);
}
.mobile-nav__inner { display: flex; align-items: center; justify-content: space-around; }
.mobile-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px; text-decoration: none !important; color: var(--text-3);
  font-size: 10px; font-weight: 600; border: none; background: none; cursor: pointer;
  transition: color var(--duration) var(--ease);
}
.mobile-nav__item svg { width: 20px; height: 20px; }
.mobile-nav__item--active { color: var(--primary); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state__icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary-light); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.empty-state__icon svg { width: 36px; height: 36px; color: var(--primary); }
.empty-state__title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state__text { font-size: 14px; color: var(--text-3); max-width: 400px; margin: 0 auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .header__brand { display: none; }
  .mobile-nav { display: block; }
  .content { padding-bottom: 80px; }
}
@media (max-width: 768px) {
  .header__search { display: none; }
  .header__user-info { display: none; }
  .header__user-chevron { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .content { padding: var(--gap-sm); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
}

/* Bootstrap dropdown override */
.header__user.dropdown-toggle::after { display: none !important; }

/* ===== DARK MODE: Bootstrap Overrides ===== */
.dark-mode .table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); color: var(--text); }
.dark-mode .table > :not(caption) > * > * { background-color: transparent; color: var(--text); border-bottom-color: var(--border); box-shadow: none; }
.dark-mode .table-hover > tbody > tr:hover > * { background-color: var(--surface-3); color: var(--text); --bs-table-bg-state: var(--surface-3); }
.dark-mode .table-bordered > :not(caption) > * > * { border-color: var(--border); }
.dark-mode .table thead th { background-color: var(--surface-2) !important; color: var(--text) !important; border-color: var(--border) !important; }

.dark-mode .form-control,
.dark-mode .form-select {
  background-color: var(--surface-2); border-color: var(--border); color: var(--text);
}
.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
  background-color: var(--surface-2); border-color: var(--primary); color: var(--text);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.dark-mode .form-control::placeholder { color: var(--text-3); }
.dark-mode .form-label { color: var(--text-2); }
.dark-mode .form-check-label { color: var(--text-2); }
.dark-mode .form-check-input { background-color: var(--surface-2); border-color: var(--border); }
.dark-mode .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.dark-mode .modal-content { background-color: var(--surface); border-color: var(--border); color: var(--text); }
.dark-mode .modal-header { border-bottom-color: var(--border); }
.dark-mode .modal-footer { border-top-color: var(--border); }
.dark-mode .modal-title { color: var(--text); }
.dark-mode .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

.dark-mode .btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.dark-mode .btn-outline-secondary { color: var(--text-2); border-color: var(--border); }
.dark-mode .btn-outline-secondary:hover { background-color: var(--surface-3); color: var(--text); border-color: var(--border); }
.dark-mode .btn-outline-danger { color: var(--red); border-color: var(--red); }
.dark-mode .btn-outline-success { color: var(--green); border-color: var(--green); }
.dark-mode .btn-outline-warning { color: var(--orange); border-color: var(--orange); }
.dark-mode .btn-secondary { background-color: var(--surface-3); border-color: var(--border); color: var(--text); }

.dark-mode .dropdown-menu { background-color: var(--surface); border-color: var(--border); }
.dark-mode .dropdown-item { color: var(--text-2); }
.dark-mode .dropdown-item:hover, .dark-mode .dropdown-item:focus { background-color: var(--surface-3); color: var(--text); }
.dark-mode .dropdown-divider { border-color: var(--border); }

.dark-mode .page-link { background-color: var(--surface); border-color: var(--border); color: var(--text-2); }
.dark-mode .page-link:hover { background-color: var(--surface-3); color: var(--text); }
.dark-mode .page-item.active .page-link { background-color: var(--primary); border-color: var(--primary); }

.dark-mode input[type="date"],
.dark-mode input[type="datetime-local"],
.dark-mode input[type="number"],
.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode textarea,
.dark-mode select {
  color-scheme: dark;
}
