/* ============================================
   inRide Admin Dashboard - Design System
   Matching Flutter App Brand Identity
   RTL Arabic Layout
   ============================================ */

/* ---- Google Fonts Import ---- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
  /* Primary Blues - from AppColors */
  --light-blue: #42A5F5;
  --medium-blue: #1E88E5;
  --dark-blue: #0D47A1;
  --dark-navy: #1E3A8A;
  --accent-blue: #2979FF;

  /* Blue Gradients */
  --gradient-blue: linear-gradient(135deg, #2196F3, #1976D2, #0D47A1);
  --gradient-blue-horizontal: linear-gradient(90deg, #2196F3, #1976D2, #0D47A1);
  --gradient-light-blue: linear-gradient(135deg, #64B5F6, #1E88E5);

  /* Backgrounds */
  --bg-primary: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;

  /* Text */
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;

  /* Borders */
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;

  /* Status */
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --error: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-blue: 0 4px 16px rgba(30, 136, 229, 0.25);

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

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 280px;
  --sidebar-collapsed: 80px;
  --header-height: 72px;
}

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

html {
  direction: rtl;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ============================================
   LAYOUT
   ============================================ */

.app-layout {
  display: flex;
  min-height: 100vh;
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth);
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  background: var(--gradient-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-blue);
}

.sidebar-logo span {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: white;
}

.sidebar-brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.sidebar-brand p {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  padding: 8px 16px;
  margin-top: 12px;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(30, 136, 229, 0.06);
  color: var(--medium-blue);
}

.nav-item.active {
  background: rgba(30, 136, 229, 0.1);
  color: var(--medium-blue);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--gradient-blue);
  border-radius: var(--radius-full);
}

.nav-item i {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.nav-item .badge {
  margin-right: auto;
  margin-left: 0;
  background: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.sidebar-user-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-user-info span {
  font-size: 11px;
  color: var(--text-light);
}

.nav-item-logout {
  color: var(--error);
}

.nav-item-logout:hover {
  background: var(--error-bg);
  color: var(--error);
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.header-title h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.header-title p {
  font-size: 12px;
  color: var(--text-light);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-primary);
  cursor: pointer;
}

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

.header-search {
  position: relative;
  width: 280px;
}

.header-search input {
  width: 100%;
  height: 42px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  padding: 0 16px 0 40px;
  font-size: 13px;
  color: var(--text-primary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.header-search input::placeholder {
  color: var(--text-light);
}

.header-search input:focus {
  border-color: var(--medium-blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.header-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}

.header-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  position: relative;
  transition: all var(--transition-fast);
}

.header-icon-btn:hover {
  background: rgba(30, 136, 229, 0.08);
  color: var(--medium-blue);
}

.header-icon-btn .notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--error);
  border-radius: 50%;
  border: 2px solid white;
}

/* ---- Page Content ---- */
.page-content {
  flex: 1;
  padding: 28px 32px;
}

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

/* ---- Stats Cards Grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
  animation: slideUp 0.5s ease forwards;
  opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.stat-card.blue::after { background: var(--gradient-blue-horizontal); }
.stat-card.green::after { background: var(--success); }
.stat-card.orange::after { background: var(--warning); }
.stat-card.red::after { background: var(--error); }

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

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-card.blue .stat-card-icon {
  background: rgba(30, 136, 229, 0.1);
  color: var(--medium-blue);
}

.stat-card.green .stat-card-icon {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card.orange .stat-card-icon {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-card.red .stat-card-icon {
  background: var(--error-bg);
  color: var(--error);
}

.stat-card-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.stat-card-trend.up {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card-trend.down {
  background: var(--error-bg);
  color: var(--error);
}

.stat-card-value {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.card-body {
  padding: 24px;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Grid Layouts ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* ---- Tables ---- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

.data-table thead th {
  text-align: right;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(30, 136, 229, 0.03);
}

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

/* ---- Status Badges ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.completed {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.cancelled {
  background: var(--error-bg);
  color: var(--error);
}

.status-badge.active {
  background: rgba(30, 136, 229, 0.1);
  color: var(--medium-blue);
}

.status-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge.verified {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.submitted {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge.unregistered {
  background: var(--error-bg);
  color: var(--error);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-blue);
  color: white;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 136, 229, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--medium-blue);
  border: 1.5px solid var(--medium-blue);
}

.btn-outline:hover {
  background: rgba(30, 136, 229, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: #DC2626;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Button Active Pressed Effect */
.btn:active,
button:active,
.nav-item:active,
.header-icon-btn:active,
.filter-btn:active {
  transform: scale(0.96) translateY(0) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform 0.05s ease !important;
}

/* ---- User/Driver Row Items ---- */
.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  flex-shrink: 0;
}

.user-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-light-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.user-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}

.user-sub {
  font-size: 11px;
  color: var(--text-light);
}

/* ---- Route Column ---- */
.route-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.route-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 4px;
}

.route-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.route-dot.from { background: var(--medium-blue); }
.route-dot.to { background: var(--dark-blue); }

.route-line {
  width: 1.5px;
  height: 12px;
  background: var(--border-color);
}

.route-addresses {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.route-from {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.route-to {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- Vehicle Badge ---- */
.vehicle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.vehicle-badge i {
  font-size: 16px;
  color: var(--medium-blue);
}

/* ---- Price/Money ---- */
.price {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--text-primary);
}

.price-currency {
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}

/* ---- Rating ---- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rating i {
  color: #FBBF24;
  font-size: 12px;
}

.rating span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- Chart Container ---- */
.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ---- Heatmap / Activity Bar ---- */
.activity-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: 16px 0;
}

.activity-bar {
  flex: 1;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--gradient-blue);
  min-height: 10px;
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  opacity: 0;
  animation: barGrow 0.6s ease forwards;
}

.activity-bar:hover {
  opacity: 0.85;
  transform: scaleY(1.05);
  transform-origin: bottom;
}

.activity-bar:nth-child(1) { animation-delay: 0.1s; }
.activity-bar:nth-child(2) { animation-delay: 0.15s; }
.activity-bar:nth-child(3) { animation-delay: 0.2s; }
.activity-bar:nth-child(4) { animation-delay: 0.25s; }
.activity-bar:nth-child(5) { animation-delay: 0.3s; }
.activity-bar:nth-child(6) { animation-delay: 0.35s; }
.activity-bar:nth-child(7) { animation-delay: 0.4s; }

.activity-labels {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.activity-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

/* ---- Wallet Balance Card ---- */
.wallet-card {
  background: var(--gradient-blue);
  border-radius: var(--radius-2xl);
  padding: 28px;
  color: white;
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}

.wallet-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.wallet-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.wallet-card-content {
  position: relative;
  z-index: 1;
}

.wallet-label {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.wallet-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 4px;
}

.wallet-currency {
  font-size: 14px;
  opacity: 0.8;
}

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

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--medium-blue);
  color: var(--medium-blue);
}

.filter-btn.active {
  background: rgba(30, 136, 229, 0.1);
  color: var(--medium-blue);
  border-color: var(--medium-blue);
}

.filter-count {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  background: var(--medium-blue);
  color: white;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* ---- Settings Form ---- */
.settings-group {
  margin-bottom: 28px;
}

.settings-group h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-group h4 i {
  color: var(--medium-blue);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.settings-item:hover {
  border-color: var(--medium-blue);
}

.settings-item-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(30, 136, 229, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--medium-blue);
  font-size: 18px;
}

.settings-item-text h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-item-text p {
  font-size: 12px;
  color: var(--text-light);
}

.settings-input {
  width: 120px;
  height: 40px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  transition: all var(--transition-fast);
}

.settings-input:focus {
  border-color: var(--medium-blue);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border-color);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--medium-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ---- Empty State ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state i {
  font-size: 56px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-light);
}

/* ---- Driver Detail Modal / Panel ---- */
.detail-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-card {
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.detail-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ---- Live Indicator ---- */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--success-bg);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ---- Transactions List ---- */
.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.transaction-icon.income {
  background: var(--success-bg);
  color: var(--success);
}

.transaction-icon.expense {
  background: var(--error-bg);
  color: var(--error);
}

.transaction-text h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.transaction-text span {
  font-size: 11px;
  color: var(--text-light);
}

.transaction-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.transaction-amount.income {
  color: var(--success);
}

.transaction-amount.expense {
  color: var(--error);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes barGrow {
  from {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: bottom;
  }
  to {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Page transition ---- */
.page-section {
  opacity: 1;
}

/* ============================================
   RESPONSIVE - ENTERPRISE PROFESSIONAL MOBILE ADAPTATION
   ============================================ */

/* Mobile Bottom Navigation Bar Tokens */
:root {
  --bottom-nav-height: 60px;
}

/* Sidebar Close Button */
.sidebar-close-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  margin-right: auto;
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.sidebar-close-btn:hover {
  background: var(--error-bg);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Body lock when sidebar is active on mobile */
body.sidebar-open {
  overflow: hidden !important;
  touch-action: none !important;
}

/* Fix login alert empty state */
.login-alert:empty,
.login-alert[style*="display: none"],
.login-alert[style*="display:none"] {
  display: none !important;
}

/* Mobile Bottom Navigation Bar (Hidden by default on Desktop) */
.mobile-bottom-nav {
  display: none;
}

/* Breakpoint: Tablets & Small Laptops (<= 1200px) */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Breakpoint: Tablets & Large Phones (<= 992px) */
@media (max-width: 992px) {
  .sidebar {
    width: min(300px, 86vw);
    max-width: 320px;
    transform: translateX(100%);
    box-shadow: none;
    z-index: 1001;
    height: 100dvh;
    visibility: hidden; /* Prevents off-canvas element from creating horizontal scroll in RTL */
    pointer-events: none;
    transition: transform var(--transition-smooth);
  }

  .sidebar.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.25) !important;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .main-content {
    margin-right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

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

  .header-search {
    width: 190px;
  }

  .overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Two column preview grids across all sections */
  [style*="1fr 380px"],
  [style*="1fr 390px"],
  [style*="1fr 400px"],
  [style*="2fr 1fr"],
  .sec-overview-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Phone mockups & previews should be centered and responsive */
  [id*="Preview"],
  [id*="Mockup"],
  .phone-preview-container {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
}

/* Breakpoint: Standard Mobile Phones (<= 768px) */
@media (max-width: 768px) {
  /* Safe body spacing for bottom nav */
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .app-layout {
    min-height: 100dvh;
  }

  .main-content {
    padding-bottom: calc(var(--bottom-nav-height) + 16px) !important;
    overflow-x: hidden !important;
  }

  /* Compact Mobile Header */
  .header {
    height: 60px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .header-right {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .mobile-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 19px;
    flex-shrink: 0;
  }

  .header-title {
    min-width: 0;
  }

  .header-title h2 {
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .header-title p {
    display: none; /* Hide subtitle to keep header sleek and uncrowded */
  }

  .header-left {
    gap: 6px;
    flex-shrink: 0;
  }

  .header-search {
    display: none !important;
  }

  .header-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  /* Notification dropdown centered on mobile screen */
  #dashboardNotifDropdown {
    position: fixed !important;
    top: 62px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
  }

  /* Page Content Container */
  .page-content {
    padding: 14px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Executive Mobile Stats Grid: 2 clean columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card {
    padding: 14px 12px !important;
    border-radius: var(--radius-lg) !important;
  }

  .stat-card-header {
    margin-bottom: 8px !important;
  }

  .stat-card-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
    border-radius: 10px !important;
  }

  .stat-card-trend {
    font-size: 10px !important;
    padding: 2px 6px !important;
    font-weight: 800 !important;
  }

  .stat-card-value {
    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
  }

  .stat-card-label {
    font-size: 11px !important;
    line-height: 1.3 !important;
    margin-top: 2px !important;
  }

  /* Grids collapse to single column */
  .grid-2,
  .grid-3,
  .detail-panel,
  .profile-details-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
  }

  /* Cards */
  .card {
    border-radius: var(--radius-lg) !important;
    margin-bottom: 14px !important;
  }

  .card-header {
    padding: 12px 14px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .card-header h3 {
    font-size: 14.5px !important;
  }

  .card-header-actions {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .card-body {
    padding: 14px 12px !important;
  }

  /* Activity Bars Chart */
  .activity-bars {
    height: 130px !important;
    gap: 6px !important;
    padding: 10px 0 !important;
  }

  .activity-labels span {
    font-size: 9.5px !important;
  }

  /* Date Filter Bar */
  .date-filter-bar {
    padding: 12px 14px !important;
    gap: 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 14px !important;
  }

  .date-filter-bar > div:first-child {
    width: 100% !important;
    font-size: 13px !important;
  }

  .date-filter-bar > div:first-child span {
    font-size: 13px !important;
  }

  .date-filter-bar > div:last-child {
    width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .date-filter-bar > div:last-child::-webkit-scrollbar {
    display: none;
  }

  .date-filter-bar .btn-sm {
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 11.5px !important;
  }

  .date-filter-bar input[type="date"] {
    width: auto !important;
    max-width: 120px !important;
    font-size: 11px !important;
    padding: 4px 6px !important;
    height: 32px !important;
  }

  /* Horizontal Filter Chips / Buttons Bar */
  .filters-bar {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 6px !important;
    margin-bottom: 14px !important;
    gap: 8px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .filters-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  /* Touch-friendly Tables */
  .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  .data-table {
    min-width: 720px !important;
  }

  .data-table thead th {
    padding: 10px 12px !important;
    font-size: 11px !important;
  }

  .data-table tbody td {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  .user-avatar,
  .user-avatar-placeholder {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
  }

  .user-name {
    font-size: 12px !important;
  }

  .user-sub {
    font-size: 10px !important;
  }

  /* Modals as Native Bottom Sheets on Mobile */
  .modal-backdrop,
  .sec-modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    z-index: 2000 !important;
  }

  .modal-card,
  .modal-content,
  .sec-modal-card,
  [id$="Modal"] > div:not(.modal-backdrop) {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 22px 22px 0 0 !important;
    margin: 0 !important;
    max-height: 92vh !important;
    animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes sheetSlideUp {
    from {
      transform: translateY(100%);
      opacity: 0.5;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .modal-header,
  .sec-modal-header {
    padding: 14px 18px !important;
  }

  .modal-body,
  .sec-modal-body {
    padding: 14px 18px !important;
    max-height: calc(88vh - 120px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-footer,
  .sec-modal-footer {
    padding: 12px 18px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .modal-footer .btn,
  .sec-modal-footer .btn {
    flex: 1 1 calc(50% - 6px) !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Form Grids within Modals */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns:1.2fr 1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Toast notification above bottom bar */
  #toastContainer {
    bottom: calc(var(--bottom-nav-height) + 12px) !important;
    left: 12px !important;
    right: 12px !important;
    max-width: calc(100vw - 24px) !important;
    margin: 0 auto !important;
    pointer-events: none;
  }

  #toastContainer > * {
    pointer-events: auto !important;
    width: 100% !important;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 990;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: center;
    justify-content: space-around;
  }

  .mobile-nav-btn {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
    position: relative;
    transition: all var(--transition-fast);
  }

  .mobile-nav-btn i {
    font-size: 20px;
    transition: transform var(--transition-fast);
  }

  .mobile-nav-btn.active {
    color: var(--medium-blue);
  }

  .mobile-nav-btn.active i {
    transform: translateY(-2px);
  }

  .mobile-nav-badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 8px);
    background: var(--error);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    min-width: 14px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
  }

  /* Communication & Support Chat */
  .comm-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: 520px !important;
  }

  .comm-sidebar {
    max-height: 280px !important;
    border-left: none !important;
    border-bottom: 2px solid var(--border-color) !important;
  }

  .comm-chat-messages {
    height: 360px !important;
    max-height: 360px !important;
    padding: 14px !important;
  }

  .comm-bubble-wrapper {
    max-width: 88% !important;
  }

  .comm-chat-input-zone {
    padding: 10px 12px !important;
  }

  /* Profile page support chat */
  .profile-details-grid .card[style*="height:650px"],
  .profile-details-grid .card[style*="height: 650px"] {
    height: 420px !important;
  }

  /* Security Center Mobile Adjustments */
  .sec-header-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  .sec-header-actions {
    justify-content: space-between !important;
    width: 100% !important;
  }

  .sec-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .sec-kpi-card {
    padding: 12px 10px !important;
    gap: 10px !important;
  }

  .sec-kpi-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }

  .sec-kpi-value {
    font-size: 19px !important;
  }

  .sec-tabs-wrapper {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .sec-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }

  .sec-tabs::-webkit-scrollbar {
    display: none;
  }

  .sec-tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 11.5px !important;
    padding: 6px 10px !important;
  }

  .sec-filters-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  .sec-search-wrapper {
    min-width: 0 !important;
    width: 100% !important;
  }

  .sec-floating-alert-container {
    left: 10px !important;
    right: 10px !important;
    max-width: calc(100vw - 20px) !important;
    top: 65px !important;
  }

  /* Document Gallery Lightbox */
  .doc-gallery-arrow {
    width: 38px !important;
    height: 38px !important;
    font-size: 20px !important;
  }

  .doc-gallery-arrow.arrow-prev { right: 8px !important; }
  .doc-gallery-arrow.arrow-next { left: 8px !important; }

  .doc-gallery-img {
    max-width: 95% !important;
    max-height: 60vh !important;
  }
}

/* Breakpoint: Small Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .page-content {
    padding: 10px 8px !important;
  }

  .login-screen {
    padding: 14px 10px !important;
  }

  .login-card {
    padding: 24px 16px !important;
    border-radius: 18px !important;
  }

  .login-logo {
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
  }

  .login-header h2 {
    font-size: 18px !important;
  }

  .login-header p {
    font-size: 12px !important;
  }

  .input-wrapper input {
    padding: 12px 38px 12px 12px !important;
    font-size: 13px !important;
  }

  .login-btn {
    padding: 12px !important;
    font-size: 14px !important;
  }

  .stat-card-value {
    font-size: 18px !important;
  }

  .stat-card-label {
    font-size: 10.5px !important;
  }
}

/* Breakpoint: Extra Narrow Phones (<= 360px) */
@media (max-width: 360px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .sec-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .modal-footer .btn,
  .sec-modal-footer .btn {
    flex: 1 1 100% !important;
  }
}

/* ---- Tooltip ---- */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ---- Misc ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-outfit { font-family: 'Outfit', sans-serif; }
.font-cairo { font-family: 'Cairo', sans-serif; }
.text-blue { color: var(--medium-blue); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-light { color: var(--text-light); }
.fw-900 { font-weight: 900; }
.fw-700 { font-weight: 700; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ---- Profile Pages & Support Chat Responsive & Custom Styles ---- */
.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .profile-details-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================
   AUTHENTICATION & LOGIN SCREEN STYLES
   ============================================ */
.hidden-layout {
  display: none !important;
}

.login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 30%, #1E88E5 0%, #0D47A1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-2xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  direction: rtl;
  text-align: right;
  animation: loginCardFadeIn 0.4s ease-out;
}

@keyframes loginCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  width: 64px;
  height: 64px;
  background: var(--gradient-blue);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-blue);
}

.login-logo span {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: #FFFFFF;
}

.login-brand h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.login-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}

.login-alert.alert-danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}

.login-alert.alert-success {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #6EE7B7;
}

.login-alert.alert-warning {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FCD34D;
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.login-footer-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================
   MODAL OVERLAY & DIALOG STYLES
   ============================================ */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6); /* Slate-900 with opacity */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; /* Controlled by JS flex/none */
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: modalFadeIn 0.25s ease-out;
  padding: 20px;
}

.modal-card, .modal-content {
  background: var(--bg-card) !important;
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  direction: rtl;
  text-align: right;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  font-size: 20px;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--border-light);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
}

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

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


@keyframes modalScaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   COMMUNICATION & LIVE CHAT CENTER MODERN UI
   ========================================================================== */
.comm-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 180px);
  min-height: 580px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  overflow: hidden;
  direction: rtl;
}

@media (max-width: 900px) {
  .comm-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
}

.comm-sidebar {
  background: #F8FAFC;
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.comm-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  background: #FFFFFF;
}

.comm-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.comm-search-input:focus {
  outline: none;
  border-color: var(--medium-blue);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.comm-filter-tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.comm-filter-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.comm-filter-btn.active {
  background: var(--dark-navy);
  color: #FFFFFF;
  border-color: var(--dark-navy);
}

.comm-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.comm-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  position: relative;
}

.comm-conv-item:hover {
  background: #F1F5F9;
}

.comm-conv-item.active {
  background: #EFF6FF;
  border-right: 3px solid var(--medium-blue);
}

.comm-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  position: relative;
  flex-shrink: 0;
}

.comm-avatar.driver {
  background: linear-gradient(135deg, #065F46, #10B981);
}

.comm-avatar-badge {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid white;
}

.comm-conv-info {
  flex: 1;
  min-width: 0;
}

.comm-conv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.comm-conv-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comm-conv-time {
  font-size: 10px;
  color: var(--text-light);
}

.comm-conv-preview {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comm-conv-badge {
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.comm-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
}

.comm-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}

.comm-chat-user-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comm-bubble-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 70%;
  margin-bottom: 8px;
}

.comm-bubble-wrapper.admin {
  align-self: flex-end;
  align-items: flex-end;
}

.comm-bubble-wrapper.user {
  align-self: flex-start;
  align-items: flex-start;
}

.comm-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #000000 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.comm-bubble-wrapper.admin .comm-bubble {
  background: #E0F2FE !important;
  color: #000000 !important;
  border: 1px solid #BAE6FD !important;
  border-bottom-left-radius: 4px;
}
.comm-bubble-wrapper.admin .comm-bubble * {
  color: #000000 !important;
}

.comm-bubble-wrapper.user .comm-bubble {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: 1px solid #CBD5E1 !important;
  border-bottom-right-radius: 4px;
}
.comm-bubble-wrapper.user .comm-bubble * {
  color: #000000 !important;
}

.comm-bubble-meta {
  font-size: 11px;
  font-weight: 600;
  color: #475569 !important;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.comm-chat-input-zone {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  background: #FFFFFF;
}

.comm-quick-replies {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.comm-quick-pill {
  padding: 4px 10px;
  font-size: 11px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.comm-quick-pill:hover {
  background: #EFF6FF;
  color: var(--medium-blue);
  border-color: var(--medium-blue);
}

.comm-input-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.comm-text-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
}

.comm-text-input:focus {
  outline: none;
  border-color: var(--medium-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ============================================
   LOGIN SCREEN STYLES
   ============================================ */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  padding: 20px;
  box-sizing: border-box;
}

.login-screen.hidden-login {
  display: none !important;
}

.login-card {
  background: #FFFFFF !important;
  border-radius: 24px !important;
  width: 100% !important;
  max-width: 440px !important;
  padding: 40px !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4) !important;
  text-align: right !important;
  box-sizing: border-box !important;
}

.login-header {
  text-align: center !important;
  margin-bottom: 28px !important;
}

.login-logo {
  width: 64px !important;
  height: 64px !important;
  background: linear-gradient(135deg, #2196F3, #0D47A1) !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #FFFFFF !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  margin: 0 auto 16px !important;
  box-shadow: 0 8px 20px rgba(33, 150, 243, 0.35) !important;
}

.login-header h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin: 0 0 6px !important;
}

.login-header p {
  font-size: 14px !important;
  color: #64748B !important;
  margin: 0 !important;
}

.login-alert {
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  line-height: 1.4 !important;
}

.alert-danger {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border: 1px solid #FCA5A5 !important;
}

.form-group {
  margin-bottom: 20px !important;
  text-align: right !important;
}

.form-group label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 8px !important;
}

.input-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.input-wrapper i {
  position: absolute !important;
  right: 14px !important;
  font-size: 18px !important;
  color: #94A3B8 !important;
  pointer-events: none !important;
}

.input-wrapper input {
  width: 100% !important;
  padding: 14px 44px 14px 16px !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  transition: all 0.2s !important;
  box-sizing: border-box !important;
  background: #F8FAFC !important;
  color: #0F172A !important;
}

.input-wrapper input:focus {
  outline: none !important;
  border-color: #1E3A8A !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

.login-btn {
  width: 100% !important;
  padding: 14px !important;
  background: #1E3A8A !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
  margin-top: 10px !important;
}

.login-btn:hover {
  background: #1e40af !important;
}

.hidden-layout {
  display: none !important;
}

.doc-viewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ============================================
   Interactive Document Lightbox Gallery
   ============================================ */
.doc-gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  user-select: none;
  animation: docGalleryFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  font-family: 'Cairo', sans-serif;
}

@keyframes docGalleryFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.doc-gallery-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  z-index: 10;
}

.doc-gallery-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-gallery-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-gallery-counter {
  font-size: 12px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.3);
  color: #60A5FA;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  font-family: 'Outfit', sans-serif;
}

.doc-gallery-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-gallery-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #F8FAFC;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.doc-gallery-btn:hover {
  background: rgba(37, 99, 235, 0.6);
  border-color: #3B82F6;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.doc-gallery-btn.btn-close:hover {
  background: rgba(239, 68, 68, 0.7);
  border-color: #EF4444;
}

.doc-gallery-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}

.doc-gallery-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.doc-gallery-img {
  max-width: 90%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

.doc-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 26px;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.doc-gallery-arrow:hover {
  background: #2563EB;
  border-color: #60A5FA;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

.doc-gallery-arrow.arrow-prev {
  right: 24px;
}

.doc-gallery-arrow.arrow-next {
  left: 24px;
}

.doc-gallery-footer {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  z-index: 10;
}

.doc-gallery-thumb {
  width: 60px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: #1e293b;
}

.doc-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doc-gallery-thumb:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.doc-gallery-thumb.active {
  opacity: 1;
  border-color: #3B82F6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
  transform: scale(1.05);
}

/* ---- Rewards & Referrals Polished Brand Styles ---- */
.switch-control-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  margin: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #64748B !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: #FFFFFF;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background-color: #10B981 !important;
  border-color: #059669 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.55), inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #FFFFFF;
}

/* Switches inside dark banners */
[style*="background:linear-gradient"] .slider,
.card[style*="background:linear-gradient"] .slider {
  background-color: rgba(255, 255, 255, 0.25) !important;
  border: 2px solid rgba(255, 255, 255, 0.45) !important;
}

[style*="background:linear-gradient"] input:checked + .slider,
.card[style*="background:linear-gradient"] input:checked + .slider {
  background-color: #10B981 !important;
  border-color: #34D399 !important;
}

/* Light Context switches (for tables and forms) */
.switch.switch-light .slider {
  background-color: #CBD5E1 !important;
  border: 1.5px solid #94A3B8 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.switch.switch-light input:checked + .slider {
  background-color: #10B981 !important;
  border-color: #059669 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
}

/* Status Pill badge next to switches */
.switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: all 0.25s ease;
  user-select: none;
}

.switch-pill.active {
  background: #10B981 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.switch-pill.inactive {
  background: rgba(100, 116, 139, 0.2) !important;
  color: #64748B !important;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Hero Monitor Card for Active Mission (Guaranteed Dark High-Contrast Theme) */
.rewards-hero-card {
  background: linear-gradient(135deg, #0A192F 0%, #0D3268 50%, #1565C0 100%) !important;
  color: #FFFFFF !important;
  padding: 24px !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 12px 36px rgba(13, 71, 161, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  position: relative !important;
  overflow: hidden !important;
}

.rewards-hero-card h3,
.rewards-hero-card h4,
.rewards-hero-card p,
.rewards-hero-card span:not(.badge):not(.switch-pill) {
  color: #FFFFFF;
}

.rewards-hero-card .hero-stat-box {
  background: rgba(10, 25, 47, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  text-align: center !important;
  backdrop-filter: blur(8px);
}

.filter-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-tab-btn:hover {
  color: var(--medium-blue);
  background: rgba(30, 136, 229, 0.06);
  border-color: rgba(30, 136, 229, 0.15);
}

.filter-tab-btn.active {
  background: rgba(30, 136, 229, 0.1);
  color: var(--medium-blue);
  font-weight: 700;
  border-color: var(--medium-blue);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   PROMO CODES & BARCODE GENERATOR STYLES
   ========================================================================== */
.barcode-preview-box {
  background: #FFFFFF;
  border: 1px dashed #CBD5E1;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.barcode-preview-box:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.promo-ticket-card {
  position: relative;
  background: linear-gradient(135deg, #0D47A1 0%, #1565C0 60%, #1E88E5 100%);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(13, 71, 161, 0.25);
  overflow: hidden;
}
.promo-ticket-card::before,
.promo-ticket-card::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  background: var(--bg-primary, #F8FAFC);
  border-radius: 50%;
  transform: translateY(-50%);
}
.promo-ticket-card::before { left: -12px; }
.promo-ticket-card::after { right: -12px; }

.barcode-svg-container svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.promo-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  color: #0F172A;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.15s ease;
}
.promo-code-badge:hover {
  background: #E2E8F0;
  border-color: #3B82F6;
  color: #1D4ED8;
}

.preset-chip-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-chip-btn:hover {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #FFFFFF;
}

