/* ============================================================
   WETRAVELS FLIGHT MANAGEMENT PORTAL - GLOBAL STYLES
   Color Palette: Deep Space Blue + Electric Teal + Amber Gold
   ============================================================ */

:root {
  /* Primary Palette */
  --primary-900: #0A0F1E;
  --primary-800: #0D1526;
  --primary-700: #111C35;
  --primary-600: #162040;
  --primary-500: #1A2550;
  --primary-400: #243166;
  --primary-300: #2E3D7A;
  --primary-200: #3D5096;

  /* Accent - Electric Teal */
  --teal-500: #00D4B4;
  --teal-400: #00EDD0;
  --teal-300: #4FFCE8;
  --teal-200: #9AFEF2;
  --teal-100: #D6FEF9;
  --teal-600: #00B89C;
  --teal-700: #009B84;

  /* Accent - Amber Gold */
  --amber-500: #F5A623;
  --amber-400: #FFB84D;
  --amber-300: #FFCF7D;
  --amber-600: #D48B0E;
  --amber-700: #B37309;

  /* Accent - Rose/Alert */
  --rose-500: #FF4E6A;
  --rose-400: #FF7189;
  --rose-600: #E03455;

  /* Accent - Violet */
  --violet-500: #7C5CFC;
  --violet-400: #9980FD;
  --violet-600: #6342E8;

  /* Neutrals */
  --gray-50:  #F8FAFF;
  --gray-100: #EEF1FA;
  --gray-200: #DDE3F2;
  --gray-300: #C4CDE8;
  --gray-400: #9AAACF;
  --gray-500: #6B7EB8;
  --gray-600: #4A5B8E;
  --gray-700: #2E3D6B;
  --gray-800: #1E2A4A;
  --gray-900: #111826;

  /* Semantic */
  --success: #10D876;
  --warning: #F5A623;
  --danger:  #FF4E6A;
  --info:    #00D4B4;

  /* Backgrounds */
  --bg-base:    #F0F4FF;
  --bg-surface: #FFFFFF;
  --bg-elevated:#FFFFFF;
  --bg-sidebar: var(--primary-800);
  --bg-header:  var(--primary-900);

  /* Text */
  --text-primary:   #1A2550;
  --text-secondary: #4A5B8E;
  --text-muted:     #9AAACF;
  --text-on-dark:   #FFFFFF;
  --text-on-teal:   #0A0F1E;

  /* Borders */
  --border-color: #DDE3F2;
  --border-focus: var(--teal-500);

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(10,15,30,0.08), 0 1px 2px rgba(10,15,30,0.04);
  --shadow-md:  0 4px 12px rgba(10,15,30,0.10), 0 2px 6px rgba(10,15,30,0.06);
  --shadow-lg:  0 10px 30px rgba(10,15,30,0.14), 0 4px 12px rgba(10,15,30,0.08);
  --shadow-xl:  0 20px 60px rgba(10,15,30,0.20);
  --shadow-teal: 0 4px 20px rgba(0,212,180,0.30);
  --shadow-amber: 0 4px 20px rgba(245,166,35,0.30);
  --shadow-glass: 0 8px 32px 0 rgba(10, 15, 30, 0.1);

  /* Premium Gradients */
  --grad-teal: linear-gradient(135deg, #00D4B4 0%, #00B89C 100%);
  --grad-violet: linear-gradient(135deg, #7C5CFC 0%, #6342E8 100%);
  --grad-amber: linear-gradient(135deg, #F5A623 0%, #D48B0E 100%);
  --grad-rose: linear-gradient(135deg, #FF4E6A 0%, #E03455 100%);
  --grad-dark: linear-gradient(135deg, #0A0F1E 0%, #162040 100%);

  /* Sizing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 68px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Additional Semantic Backgrounds */
  --bg-card: var(--bg-surface);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

body.dark-theme .glass-card {
  --glass-bg: rgba(13, 21, 38, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* ---- DARK THEME OVERRIDES ---- */
body.dark-theme {
  --bg-base: #060913;
  --bg-surface: #0D1526;
  --bg-elevated: #111C35;
  --bg-sidebar: #060913;
  --bg-header: #0D1526;
  --bg-card: #0D1526;

  --text-primary: #EEF1FA;
  --text-secondary: #9AAACF;
  --text-muted: #6B7EB8;
  --text-on-teal: #060913; /* Dark text on bright teal buttons */

  --border-color: #1E2A4A;
  
  --gray-50: #111C35;
  --gray-100: #1A2550;
  --gray-200: #1E2A4A;
  --gray-300: #2E3D6B;

  /* Brighter semantic colors for Dark Mode */
  --teal-500: #00FFD5;
  --teal-600: #00EBC7;
  --teal-700: #00D4B4;
  
  --amber-500: #FFB340;
  --rose-500: #FF6B81;
}

/* Specific Dark Mode Button Enhancements */
body.dark-theme .btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--gray-300);
}
body.dark-theme .btn-secondary:hover {
  background: var(--gray-300);
  border-color: var(--teal-500);
}
body.dark-theme .btn-ghost:hover {
  background: rgba(255,255,255,0.05);
}
body.dark-theme .badge-info {
  background: rgba(0, 255, 213, 0.15);
  color: var(--teal-500);
}
body.dark-theme .notif-icon.teal {
  background: rgba(0, 255, 213, 0.2);
  color: var(--teal-500);
}
body.dark-theme .topbar-search {
  background: var(--bg-elevated);
  border-color: var(--gray-200);
}

/* Force body background in dark mode */
body.dark-theme {
  background-color: var(--bg-base) !important;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

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

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: width var(--transition-base);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: var(--header-height);
}

.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: var(--shadow-teal);
}

.sidebar-logo .logo-text {
  display: flex; flex-direction: column;
  overflow: hidden;
}

.sidebar-logo .logo-text .brand { font-size: 1.05rem; font-weight: 700; color: #fff; white-space: nowrap; }
.sidebar-logo .logo-text .tagline { font-size: 0.68rem; color: var(--gray-400); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.8px; }

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-title { display: none; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gray-500);
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-left-color: rgba(0,212,180,0.4);
}

.nav-item.active {
  background: rgba(0,212,180,0.12);
  color: var(--teal-400);
  border-left-color: var(--teal-500);
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--rose-500);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}
.sidebar.collapsed .nav-item .badge { display: none; }

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.user-card:hover { background: rgba(255,255,255,0.07); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--violet-500), var(--teal-600));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-info { overflow: hidden; }
.user-info .user-name { font-size: 0.82rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .user-role { font-size: 0.68rem; color: var(--teal-400); }

.sidebar.collapsed .user-info { display: none; }

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

.main-content.sidebar-collapsed { margin-left: var(--sidebar-collapsed); }

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

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

.sidebar-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}
.sidebar-toggle:hover { background: var(--gray-100); color: var(--text-primary); }

.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.breadcrumb span { color: var(--text-secondary); }
.breadcrumb .sep { color: var(--gray-300); }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  width: 280px;
  transition: all var(--transition-fast);
}
.topbar-search:focus-within {
  border-color: var(--teal-500);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(0,212,180,0.12);
}
.topbar-search input {
  border: none; background: none;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search .search-icon { color: var(--text-muted); font-size: 0.9rem; }

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

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
  position: relative;
}
.icon-btn:hover { background: var(--gray-100); color: var(--text-primary); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--rose-500);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

/* ---- PAGE CONTENT ---- */
.page-content {
  flex: 1;
  padding: 28px;
}

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.page-header-left p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.page-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  color: var(--text-on-teal);
  box-shadow: var(--shadow-teal);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,212,180,0.40);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--rose-600), var(--rose-500));
  color: #fff;
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,78,106,0.40);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(16,185,129,0.40);
}

.btn-amber {
  background: linear-gradient(135deg, var(--amber-600), var(--amber-500));
  color: #fff;
  box-shadow: var(--shadow-amber);
}
.btn-amber:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245,166,35,0.40);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-md); }

/* ---- CARDS ---- */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 100%;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

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

.card-body { padding: 22px; }
.card-body.no-pad { padding: 0; }

/* ---- STAT CARDS ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.teal::before { background: linear-gradient(90deg, var(--teal-600), var(--teal-400)); }
.stat-card.amber::before { background: linear-gradient(90deg, var(--amber-600), var(--amber-400)); }
.stat-card.rose::before { background: linear-gradient(90deg, var(--rose-600), var(--rose-400)); }
.stat-card.violet::before { background: linear-gradient(90deg, var(--violet-600), var(--violet-400)); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--primary-300), var(--primary-200)); }

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.stat-icon.teal { background: rgba(0,212,180,0.12); color: var(--teal-600); }
.stat-icon.amber { background: rgba(245,166,35,0.12); color: var(--amber-600); }
.stat-icon.rose { background: rgba(255,78,106,0.12); color: var(--rose-500); }
.stat-icon.violet { background: rgba(124,92,252,0.12); color: var(--violet-500); }
.stat-icon.blue { background: rgba(26,37,80,0.08); color: var(--primary-300); }

.stat-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.stat-badge.up { background: rgba(16,216,118,0.12); color: #0ab85e; }
.stat-badge.down { background: rgba(255,78,106,0.12); color: var(--rose-500); }

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---- BADGES / STATUS CHIPS ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success { background: rgba(16,216,118,0.12); color: #0ab85e; }
.badge-success::before { background: #0ab85e; }

.badge-warning { background: rgba(245,166,35,0.14); color: var(--amber-600); }
.badge-warning::before { background: var(--amber-500); }

.badge-danger { background: rgba(255,78,106,0.12); color: var(--rose-500); }
.badge-danger::before { background: var(--rose-500); }

.badge-info { background: rgba(0,212,180,0.12); color: var(--teal-700); }
.badge-info::before { background: var(--teal-500); }

.badge-purple { background: rgba(124,92,252,0.12); color: var(--violet-600); }
.badge-purple::before { background: var(--violet-500); }

.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-gray::before { background: var(--gray-400); }

.badge-dark { background: var(--primary-600); color: rgba(255,255,255,0.9); }
.badge-dark::before { background: var(--teal-400); }

/* ---- TABLES ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
}

thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--border-color);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

.td-bold { font-weight: 600; }
.td-muted { color: var(--text-secondary); font-size: 0.8rem; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 20px; }

label, .form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  background: var(--bg-surface);
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(0,212,180,0.14);
}

textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

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

/* ---- TABS ---- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-item {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
  color: var(--teal-600);
  border-bottom-color: var(--teal-500);
}
.tab-item .tab-count {
  background: var(--gray-100);
  color: var(--text-secondary);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}
.tab-item.active .tab-count { background: rgba(0,212,180,0.14); color: var(--teal-700); }

/* ---- FILTERS BAR ---- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  transition: border-color var(--transition-fast);
}
.filter-group:focus-within { border-color: var(--teal-500); }
.filter-group select {
  border: none; background: none; font-size: 0.82rem; color: var(--text-primary);
  outline: none; cursor: pointer; min-width: 100px;
  padding: 0;
}
.filter-group .filter-label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  flex: 1;
  min-width: 200px;
  transition: border-color var(--transition-fast);
}
.search-bar:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(0,212,180,0.10); }
.search-bar input {
  border: none; background: none; outline: none;
  font-size: 0.85rem; color: var(--text-primary);
  width: 100%; padding: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-icon { color: var(--text-muted); font-size: 0.85rem; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,30,0.6);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; background: var(--bg-surface); z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ---- ALERTS ---- */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
body.role-employee:not(.show-profit) .admin-only {
  display: none !important;
}

.alert-title { font-weight: 700; margin-bottom: 2px; }

.alert-success { background: rgba(16,216,118,0.10); border: 1px solid rgba(16,216,118,0.30); color: #0a9454; }
.alert-warning { background: rgba(245,166,35,0.10); border: 1px solid rgba(245,166,35,0.30); color: var(--amber-700); }
.alert-danger  { background: rgba(255,78,106,0.10); border: 1px solid rgba(255,78,106,0.30); color: var(--rose-600); }
.alert-info    { background: rgba(0,212,180,0.10); border: 1px solid rgba(0,212,180,0.30); color: var(--teal-700); }

/* ---- AVATAR STACK ---- */
.avatar-stack { display: flex; }
.avatar-stack .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #fff;
}
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute; left: 9px; top: 0; bottom: 0;
  width: 2px; background: var(--border-color);
}
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-dot {
  position: absolute; left: -23px; top: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--teal-500);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--teal-500);
}
.timeline-dot.warning { background: var(--amber-500); box-shadow: 0 0 0 2px var(--amber-500); }
.timeline-dot.danger  { background: var(--rose-500); box-shadow: 0 0 0 2px var(--rose-500); }
.timeline-dot.gray    { background: var(--gray-300); box-shadow: 0 0 0 2px var(--gray-300); }

.timeline-time { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 3px; }
.timeline-content { font-size: 0.85rem; color: var(--text-primary); }
.timeline-content .by { color: var(--text-secondary); font-size: 0.78rem; }

/* ---- PROGRESS ---- */
.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
  transition: width 0.6s ease;
}
.progress-fill.amber { background: linear-gradient(90deg, var(--amber-600), var(--amber-400)); }
.progress-fill.rose  { background: linear-gradient(90deg, var(--rose-600), var(--rose-400)); }
.progress-fill.violet{ background: linear-gradient(90deg, var(--violet-600), var(--violet-400)); }

/* ---- PAGINATION ---- */
.pagination {
  display: flex; align-items: center; gap: 4px;
  margin-top: 20px;
  justify-content: center;
}
.page-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.page-btn:hover { background: var(--gray-100); color: var(--text-primary); }
.page-btn.active {
  background: var(--teal-500);
  color: var(--text-on-teal);
  border-color: var(--teal-500);
}

/* ---- SECTION HEADER ---- */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.section-title .icon { color: var(--teal-600); }

/* ---- EMPTY STATE ---- */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 30px; text-align: center;
  color: var(--text-secondary);
}
.empty-state .icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.empty-state p { font-size: 0.85rem; max-width: 300px; }

/* ---- DROPDOWN MENU ---- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 500;
  display: none;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item.danger { color: var(--rose-500); }
.dropdown-divider { border-top: 1px solid var(--border-color); margin: 4px 0; }

/* ---- TOOLTIPS ---- */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900); color: #fff;
  font-size: 0.73rem; font-weight: 500;
  padding: 5px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity var(--transition-fast);
  z-index: 9999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ---- NOTIFICATION DOT ---- */
.notif-dot {
  width: 8px; height: 8px;
  background: var(--rose-500);
  border-radius: 50%;
  display: inline-block;
}

/* ---- GRID UTILITIES ---- */
.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-1-2 { grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-2-1 { grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-3-1 { grid-template-columns: 3fr 1fr; gap: 24px; }

/* ---- FLEX UTILITIES ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* ---- SPACING ---- */
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }

/* ---- COLORS ---- */
.text-teal { color: var(--teal-600); }
.text-amber { color: var(--amber-600); }
.text-rose { color: var(--rose-500); }
.text-violet { color: var(--violet-500); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: #0ab85e; }

/* ---- DIVIDER ---- */
.divider { border: none; border-top: 1px solid var(--border-color); margin: 20px 0; }

/* ---- QUICK INFO ROWS ---- */
.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--text-muted); width: 140px; flex-shrink: 0; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.info-row .info-value { color: var(--text-primary); font-weight: 500; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .grid-3-1 { grid-template-columns: 1fr; }
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-1-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .logo-text, .sidebar .nav-label, .sidebar .nav-section-title, .sidebar .user-info { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 12px; }
  .sidebar .nav-item .badge { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); }
  .page-content { padding: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .topbar-search { display: none; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

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

/* ---- LOADING SPINNER ---- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--teal-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- TOAST ---- */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}

.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--gray-900); color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  font-size: 0.85rem; font-weight: 500;
  animation: slideInToast 0.3s ease;
  border-left: 3px solid var(--teal-500);
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.error   { border-left-color: var(--danger); }

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

/* ---- ROLE BADGE ---- */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
}
.role-badge.admin { background: rgba(124,92,252,0.14); color: var(--violet-600); }
.role-badge.employee { background: rgba(0,212,180,0.12); color: var(--teal-700); }

/* ---- PRIORITY DOT ---- */
.priority-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px;
}
.priority-dot.high   { background: var(--rose-500); }
.priority-dot.medium { background: var(--amber-500); }
.priority-dot.low    { background: var(--success); }

/* ---- TIMELINE ---- */
.timeline-item { position:relative; padding-left:28px; padding-bottom:20px; border-left:2px solid var(--border-color); }
.timeline-item:last-child { border-left-color:transparent; }
.timeline-dot { position:absolute; left:-7px; top:0; width:12px; height:12px; border-radius:50%; background:var(--border-color); border:2px solid var(--bg-surface); }
.timeline-dot.active { background:var(--teal-500); box-shadow:0 0 0 3px rgba(0,212,180,0.2); }

/* ---- PAGINATION ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; }
.page-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-color); background: var(--bg-surface);
  border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition-fast);
}
.page-btn:hover:not(:disabled) { border-color: var(--teal-500); color: var(--teal-600); background: var(--gray-50); }
.page-btn.active { background: var(--teal-500); border-color: var(--teal-500); color: var(--text-on-teal); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- HIGHLIGHT BOX ---- */
.highlight-box {
  background: linear-gradient(135deg, rgba(0,212,180,0.08), rgba(26,37,80,0.04));
  border: 1px solid rgba(0,212,180,0.20);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.highlight-box.amber {
  background: linear-gradient(135deg, rgba(245,166,35,0.08), rgba(26,37,80,0.03));
  border-color: rgba(245,166,35,0.25);
}

/* ---- CUSTOM CHECKBOX ---- */
.custom-checkbox {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 0.85rem; color: var(--text-primary);
}
.custom-checkbox input { display: none; }
.custom-checkbox .checkmark {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border-color);
  background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.custom-checkbox input:checked + .checkmark {
  background: var(--teal-500);
  border-color: var(--teal-500);
  color: #fff;
  font-size: 0.65rem;
}

/* ---- FLIGHT ROUTE DISPLAY ---- */
.flight-route {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
}
.flight-route .airport { font-size: 1.2rem; color: var(--text-primary); }
.flight-route .route-line {
  flex: 1; display: flex; align-items: center; gap: 6px;
  color: var(--text-muted);
}
.flight-route .route-line::before,
.flight-route .route-line::after {
  content: ''; flex: 1; height: 1px; background: var(--border-color);
}
.flight-route .plane-icon { color: var(--teal-500); font-size: 1.1rem; }

/* ---- DARK CARD VARIANT ---- */
.card-dark {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}
.card-dark .card-title { color: rgba(255,255,255,0.85); }

/* ---- ANNOUNCEMENT BANNER ---- */
.announcement-banner {
  background: linear-gradient(90deg, var(--primary-700), var(--primary-500));
  color: #fff;
  padding: 10px 22px;
  font-size: 0.82rem;
  display: flex; align-items: center; gap: 12px;
}

/* ---- SIDEBAR TOGGLE ARROW ---- */
.toggle-arrow {
  position: absolute; right: -12px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  z-index: 300;
  transition: all var(--transition-fast);
}
.toggle-arrow:hover { background: var(--teal-500); color: #fff; border-color: var(--teal-500); }
