/* ============================================================
   SIM World (عالم الشريحة) - Design System & Stylesheet
   Strict Reference UI Implementation | Mobile-First | RTL Arabic
   English Numerals Enforcement (0123456789)
   ============================================================ */

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

:root {
  --font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette - Exact Match to Visual Reference */
  --bg-app: #F0F4F9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #F8FAFC;
  --bg-glass: rgba(255, 255, 255, 0.96);
  
  /* Dark Navy Sidebar Tokens */
  --sidebar-bg: #121E2B;
  --sidebar-hover: #1A2A3A;
  --sidebar-active: #10B981;
  --sidebar-text: #8FA3B8;
  --sidebar-text-active: #ffffff;
  --sidebar-card-bg: #182838;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  
  --border-subtle: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-focus: #10B981;
  
  /* Neutral Typography */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  
  /* Semantic Accent Tones from Reference */
  --emerald: #10B981;
  --emerald-light: #ECFDF5;
  --emerald-dark: #059669;
  
  --primary: #2563EB;
  --primary-light: #EFF6FF;
  
  --amber: #F59E0B;
  --amber-light: #FFFBEB;
  --amber-dark: #D97706;
  
  --rose: #EF4444;
  --rose-light: #FEF2F2;
  --rose-dark: #DC2626;
  
  --purple: #8B5CF6;
  --purple-light: #FAF5FF;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Soft Ambient Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.03), 0 6px 16px -4px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 6px 20px rgba(15, 23, 42, 0.07);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --bottom-nav-height: 64px;
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: lining-nums tabular-nums;
  -moz-font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

html, body, button, input, select, textarea, optgroup, table, th, td, label {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

button, input, select, textarea {
  font-family: inherit !important;
}

html, body {
  direction: rtl;
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

/* App Layout */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-nav-height) + 24px);
}

body.login-page-active,
body.login-page-active #app,
#app.login-mode,
#app:has(.login-page-wrapper) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 1024px) {
  body:not(.login-page-active) #app:not(.login-mode) {
    flex-direction: row;
  }
  body:not(.login-page-active) .main-container {
    padding-bottom: 32px;
    margin-right: 270px; /* Space for desktop dark sidebar */
  }
}

/* ========================================================= */
/* Top Header (Clean White Card with Search, Notifs, User)   */
/* ========================================================= */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  height: 68px;
}

.header-search-container {
  flex: 1;
  max-width: 440px;
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-input {
  width: 100%;
  height: 40px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-full);
  padding: 0 42px 0 16px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.header-search-input:focus {
  border-color: #10B981;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.header-search-icon {
  position: absolute;
  right: 14px;
  color: #94A3B8;
  font-size: 15px;
  pointer-events: none;
}

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

.header-notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.header-notif-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.header-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #EF4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.header-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.header-user-chip:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #10B981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.header-user-meta {
  display: flex;
  flex-direction: column;
}

.header-user-name {
  font-size: 13px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.header-user-role {
  font-size: 11px;
  color: #64748B;
  display: block;
  white-space: nowrap;
}

/* Mobile & Tablet Header Adaptation */
@media (max-width: 1023px) {
  .top-header {
    height: 56px;
    padding: 8px 12px;
    gap: 8px;
  }

  .mobile-only-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-only-header .brand-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-only-header .brand-logo-badge {
    width: 30px;
    height: 30px;
    font-size: 15px;
    border-radius: 8px;
  }

  .mobile-only-header .brand-title-text {
    font-size: 14px;
    font-weight: 800;
    color: #0F172A;
    white-space: nowrap;
  }

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

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

  .header-notif-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .header-user-chip {
    padding: 0;
    background: transparent;
    border: none;
    gap: 0;
    flex-shrink: 0;
  }

  .header-user-chip:hover {
    background: transparent;
    border: none;
  }

  .header-user-avatar {
    width: 36px;
    height: 36px;
    border: 2px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .header-user-meta {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .header-search-container {
    display: flex !important;
    max-width: 240px;
    flex: 1;
  }

  .header-user-chip {
    padding: 4px 10px 4px 4px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-full);
    gap: 8px;
  }

  .header-user-meta {
    display: flex !important;
    max-width: 110px;
  }
}


/* ========================================================= */
/* Desktop Dark Navy Sidebar (Exact Match to Reference)      */
/* ========================================================= */
.desktop-sidebar {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 270px;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--sidebar-border);
  z-index: 50;
  padding: 20px 16px;
  flex-direction: column;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
}

@media (min-width: 1024px) {
  .desktop-sidebar {
    display: flex;
  }
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #10B981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--sidebar-text);
  display: block;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  flex: 1;
}

.sidebar-nav-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-family: var(--font-family);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: right;
}

.sidebar-nav-item button:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.sidebar-nav-item.active button {
  background: #10B981;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.nav-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-chevron {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease;
}

.sidebar-nav-item.active .nav-chevron {
  color: #ffffff;
}

/* Sidebar Section Headers */
.sidebar-section-header {
  padding: 14px 14px 4px 14px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  list-style: none;
}
.sidebar-section-header:first-of-type {
  border-top: none;
  margin-top: 0;
}
.sidebar-section-header span {
  display: block;
}

/* Drawer Section Headers */
.drawer-section-header {
  padding: 12px 14px 4px 14px;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  list-style: none;
}
.drawer-section-header span {
  display: block;
}

/* Header Shift Handover Button */
.header-shift-handover-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #ffffff;
  border: 1px solid #059669;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
  font-family: inherit;
}
.header-shift-handover-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .header-shift-handover-btn .shift-btn-text {
    display: none;
  }
  .header-shift-handover-btn {
    padding: 6px 9px;
  }
}

/* Sidebar Bottom Section */
.sidebar-bottom-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-border);
}

.system-status-card {
  background: var(--sidebar-card-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-circle-gauge {
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-percent-text {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.system-status-info {
  flex: 1;
}

.status-label-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.status-label-sub {
  font-size: 11px;
  color: #10B981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-help-btn {
  background: var(--sidebar-card-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-help-btn:hover {
  background: #203347;
  color: #ffffff;
}

.sidebar-logout-btn {
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: #EF4444;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 10px;
  transition: var(--transition);
}

.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Mobile Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
  padding: 0 8px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  min-height: 48px;
  transition: var(--transition);
}

.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.bottom-nav-item .nav-icon {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.bottom-nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* Page Containers */
.page-content {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .page-content {
    padding: 24px;
  }
}

/* ========================================================= */
/* Greeting Row & Date Chip (Exact Match to Reference)       */
/* ========================================================= */
.dashboard-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-title-box h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.dashboard-title-box p {
  font-size: 13.5px;
  color: #64748B;
  margin: 0;
}

.dashboard-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

/* ========================================================= */
/* Top 4 KPI Metric Cards (Exact Match to Reference)         */
/* ========================================================= */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1180px) {
  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #64748B;
}

.kpi-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.kpi-icon-sales {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
}

.kpi-icon-activations {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
}

.kpi-icon-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}

.kpi-icon-rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  font-variant-numeric: lining-nums tabular-nums;
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.kpi-badge-green {
  background: #ECFDF5;
  color: #059669;
}

.kpi-badge-orange {
  background: #FFFBEB;
  color: #D97706;
}

.kpi-badge-red {
  background: #FEF2F2;
  color: #DC2626;
}

/* ========================================================= */
/* Middle Row: Quick Actions & 7-Day Chart                   */
/* ========================================================= */
.middle-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1023px) {
  .middle-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.quick-actions-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.quick-actions-header {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
}

.quick-action-tile {
  padding: 18px 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 1px solid transparent;
}

.quick-action-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.qa-orange {
  background: #FFF7ED;
  border-color: #FED7AA;
}
.qa-blue {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.qa-purple {
  background: #FAF5FF;
  border-color: #E9D5FF;
}
.qa-green {
  background: #ECFDF5;
  border-color: #A7F3D0;
}

.qa-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 2px;
}

.qa-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
}

.qa-sub {
  font-size: 11.5px;
  color: #64748B;
}

/* 7-Day Trend Chart Card */
.chart-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

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

.chart-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-filter-select {
  padding: 6px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  outline: none;
}

.chart-svg-container {
  width: 100%;
  height: 200px;
  position: relative;
  margin-top: 8px;
}

/* ========================================================= */
/* Recent Activations Table Card                             */
/* ========================================================= */
.recent-ops-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 24px;
}

.recent-ops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #F1F5F9;
}

.recent-ops-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-all-link {
  font-size: 13px;
  font-weight: 800;
  color: #2563EB;
  background: #EFF6FF;
  padding: 6px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.view-all-link:hover {
  background: #DBEAFE;
}

/* Badges Exact Reference Styling */
.badge-company-stc {
  background: #EEF2FF;
  color: #4F46E5;
  border: 1px solid #C7D2FE;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.badge-company-mobily {
  background: #F0F9FF;
  color: #0284C7;
  border: 1px solid #BAE6FD;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.badge-company-zain {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.badge-company-salam {
  background: #F0FDFA;
  color: #0D9488;
  border: 1px solid #99F6E4;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.badge-company-redbull {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
}

.company-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.company-logo-badge:hover {
  transform: scale(1.08);
}

.badge-op-direct {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-op-field {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.table-action-dots-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #64748B;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.table-action-dots-btn:hover {
  background: #F1F5F9;
  border-color: #E2E8F0;
  color: #0F172A;
}
/* Stats Grid & Stat Cards (Financial Reports & Overview) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

.stat-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
  font-variant-numeric: lining-nums tabular-nums;
  margin: 4px 0 6px;
}

.stat-card.primary .stat-value { color: #2563eb; }
.stat-card.success .stat-value { color: #059669; }
.stat-card.warning .stat-value { color: #d97706; }
.stat-card.danger .stat-value  { color: #e11d48; }

.stat-card-footer {
  font-size: 11px;
  color: var(--text-muted);
}

/* Filter Bar & Chips */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

.filter-chip.active {
  background: #10B981;
  border-color: #10B981;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}

/* Hero Card Modern SaaS */
.hero-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.hero-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #10B981;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.hero-desc {
  font-size: 13.5px;
  color: #64748B;
  margin: 0;
  line-height: 1.5;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Cards & Containers */
.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.content-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.content-card-body {
  padding: 16px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  transition: var(--transition);
  direction: rtl;
  font-variant-numeric: lining-nums tabular-nums;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #ffffff;
}

.form-control::placeholder {
  color: #94a3b8;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px;
  padding-left: 36px;
}

textarea.form-control {
  height: auto;
  min-height: 90px;
  padding: 12px 14px;
  resize: vertical;
}

/* Numeric inputs styling */
.input-iccid, .input-numeric {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Quantity Counter Input */
.quantity-control-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 48px;
  height: 48px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.qty-input {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Buttons */
.btn {
  height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  min-width: 48px;
  font-variant-numeric: lining-nums tabular-nums;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  box-shadow: 0 4px 14px var(--success-glow);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

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

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

/* Status Badges - Eye-Friendly Soft Pastels */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.badge-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-processing {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.badge-completed {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-rejected {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

/* Request Cards (Mobile First Lists) */
.request-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.request-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.request-meta-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.request-meta-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.request-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.request-detail-item .label {
  color: var(--text-muted);
  display: block;
  font-size: 11px;
}

.request-detail-item .value {
  font-weight: 600;
  color: var(--text-primary);
}

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

/* Filter bar & Chips */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.filter-chip:hover {
  border-color: var(--border-hover);
}

/* Filter chip active */
.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* ========================================================= */
/* Mobile 2-Column Responsive Card Grid System               */
/* ========================================================= */
.mobile-2col-cards-grid {
  display: none;
}

@media (max-width: 768px) {
  /* Hide heavy horizontal tables on mobile when dual view is provided */
  .desktop-table-view {
    display: none !important;
  }

  /* Make cards 2 columns on mobile */
  .mobile-2col-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 20px;
    width: 100%;
  }

  /* Universal Mobile 2-Column Item Card */
  .mobile-item-card {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 12px 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
  }

  .mobile-item-card:active {
    transform: scale(0.98);
  }

  .mobile-item-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .mobile-item-card-title {
    font-size: 13px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
  }

  .mobile-item-card-sub {
    font-size: 10.5px;
    color: #64748B;
    margin-bottom: 6px;
    display: block;
  }

  .mobile-item-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11.5px;
  }

  .mobile-item-card-metric {
    font-size: 15px;
    font-weight: 900;
    color: #059669;
    margin: 4px 0;
  }

  .mobile-item-card-metric.danger {
    color: #DC2626;
  }

  .mobile-item-card-metric.primary {
    color: #2563EB;
  }

  .mobile-item-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
  }

  .mobile-item-card-badges .badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  .mobile-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #E2E8F0;
  }

  .mobile-card-actions .btn {
    flex: 1 1 calc(50% - 5px);
    padding: 4px 6px;
    font-size: 10.5px;
    font-weight: 700;
    min-height: 28px;
    text-align: center;
    justify-content: center;
    border-radius: 8px;
  }

  .mobile-card-actions .btn-block-action {
    flex: 1 1 100% !important;
  }

  /* Section Header on mobile */
  .section-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
    margin-bottom: 16px;
  }

  .section-header .btn {
    width: 100%;
    justify-content: center;
    height: 40px;
  }

  /* Page Content Container padding on mobile */
  .page-content {
    padding: 12px 10px 80px 10px !important;
  }

  /* Top Header on mobile */
  .top-header {
    padding: 8px 12px !important;
    height: 60px !important;
  }

  .header-search-container {
    max-width: 180px !important;
  }

  .header-search-input {
    height: 36px !important;
    font-size: 12px !important;
    padding-right: 32px !important;
  }

  .header-search-icon {
    font-size: 13px !important;
    right: 10px !important;
  }

  .header-user-meta {
    display: none !important;
  }

  .header-user-chip {
    padding: 3px !important;
  }

  /* Middle row on mobile */
  .middle-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .quick-actions-card,
  .chart-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .quick-action-tile {
    padding: 12px 8px !important;
    border-radius: 10px !important;
    gap: 4px !important;
  }

  .qa-title {
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .qa-subtitle {
    font-size: 9.5px !important;
  }

  /* Compact KPI & Stat Cards on Mobile 2-Column Grid */
  .kpi-card, .stat-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
  }
  .kpi-title, .stat-label {
    font-size: 11px !important;
  }
  .kpi-icon-circle, .stat-icon-wrapper {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    margin-bottom: 6px !important;
  }
  .kpi-value, .stat-value {
    font-size: 18px !important;
    margin: 2px 0 6px !important;
  }
  .kpi-badge {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }

  .mobile-only-flex {
    display: flex !important;
  }
}

.mobile-only-flex {
  display: none !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
  .modal-sheet {
    border-radius: var(--radius-lg);
    transform: scale(0.95);
  }
}

.modal-sheet.modal-sheet-compact,
.modal-sheet.modal-sm {
  max-width: 400px !important;
}

.modal-sheet.modal-lg {
  max-width: 920px !important;
}

.modal-sheet.modal-xl {
  max-width: 1100px !important;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .modal-overlay.open .modal-sheet {
    transform: scale(1);
  }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* Button Spinner & Loading States */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: btnSpin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

@keyframes popScale {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

@media (min-width: 768px) {
  #toast-container {
    right: auto;
    left: 24px;
    width: 380px;
    align-items: flex-start;
  }
}

.toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

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

.toast-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.toast-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.toast-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Tables (Modern Responsive Eye-Comfortable Light Theme) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f8fafc;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  white-space: nowrap;
}

table.data-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1.5px solid var(--border-subtle);
  background: #f8fafc;
  letter-spacing: -0.1px;
}

table.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary);
  vertical-align: middle;
  transition: background-color 0.15s ease;
}

table.data-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

table.data-table tbody tr:hover td {
  background: #f1f5f9;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs {
  height: 29px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.company-action-btn {
  height: 28px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 750;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.company-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.08);
}

.desktop-table-view .data-table {
  min-width: 900px;
}

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

.empty-icon {
  font-size: 40px;
  opacity: 0.5;
  margin-bottom: 6px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
}

/* Demo Role Switcher Bar */
.demo-bar {
  background: #f8fafc;
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
}

.demo-title {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.demo-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========================================================= */
/* Mobile Side Drawer Overlay and Navigation */
/* ========================================================= */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--sidebar-border);
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.drawer-overlay.open .mobile-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  background: #0E1823;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #8FA3B8;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-user-card {
  padding: 14px 18px;
  background: #172635;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-nav-list {
  list-style: none;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.drawer-nav-item button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  transition: var(--transition);
}

.drawer-nav-item button:hover,
.drawer-nav-item.active button {
  background: #10B981;
  color: #ffffff;
  font-weight: 700;
}

.drawer-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--sidebar-border);
  background: #0E1823;
}

.mobile-only-header {
  display: flex;
}

@media (min-width: 1024px) {
  .mobile-only-header {
    display: none !important;
  }
}

.chart-tooltip-badge {
  position: absolute;
  top: 18px;
  left: 22%;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 800;
  color: #0F172A;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  text-align: center;
  pointer-events: none;
  z-index: 5;
}

.mobile-hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 18px;
  color: #1E293B;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: var(--transition);
}

.mobile-hamburger-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

@media (min-width: 1024px) {
  .mobile-hamburger-btn {
    display: none !important;
  }
}

/* ========================================================= */
/* Direct Activation Responsive Layout (Hero & Footer)       */
/* ========================================================= */
.direct-hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  gap: 8px;
}

.direct-hero-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.direct-hero-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.direct-hero-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 640px) {
  .direct-hero-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
    gap: 4px;
    margin-bottom: 8px;
  }

  .direct-hero-subtitle {
    font-size: 11px;
  }
}

/* Direct Activation Bottom Action Footer */
.direct-action-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.direct-total-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.direct-total-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.direct-total-value {
  font-size: 20px;
  font-weight: 900;
  color: #059669;
  font-family: monospace, var(--font-family);
  letter-spacing: -0.5px;
}

.direct-submit-btn {
  height: 44px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  background: #10b981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.direct-submit-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.direct-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Mobile Responsiveness for Direct Action Footer */
@media (max-width: 640px) {
  .direct-action-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 24px;
  }

  .direct-total-box {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 8px;
  }

  .direct-total-label {
    font-size: 12.5px;
  }

  .direct-total-value {
    font-size: 20px;
  }

  .direct-submit-btn {
    width: 100%;
    height: 46px;
    font-size: 14.5px;
  }
}


/* ========================================================= */
/* Expandable Report Tables & Drilldown Accordion */
/* ========================================================= */
.drilldown-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.drilldown-row {
  background: #f8fafc;
}

.drilldown-container {
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin: 6px 0;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.subtable-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
}

.drilldown-subtable {
  width: 100%;
  border-collapse: collapse;
}

.drilldown-subtable th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
}

.drilldown-subtable td {
  padding: 9px 12px !important;
  font-size: 12px !important;
  border-bottom: 1px solid #f1f5f9;
}

.drilldown-subtable tr:last-child td {
  border-bottom: none;
}

/* Print Styles */
@media print {
  .desktop-sidebar, .bottom-nav, .top-header, .filter-bar, .no-print, button {
    display: none !important;
  }
  .main-container {
    margin: 0 !important;
    padding: 0 !important;
  }
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt !important;
  }
  .content-card {
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
    break-inside: avoid;
  }
  .data-table, .drilldown-subtable {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
  }
  .data-table th, .data-table td {
    border: 1px solid #dddddd !important;
  }
  .drilldown-row {
    display: table-row !important;
  }
}
/* Company Brand Grid Cards (Direct Activation) - Compact Full Screen No-Scroll */
.company-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

@media (max-width: 1024px) {
  .company-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .company-card-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
}

.company-select-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
  user-select: none;
  min-height: 72px;
}

@media (max-width: 640px) {
  .company-select-card {
    padding: 6px 4px !important;
    min-height: 64px;
  }
  .company-select-card .company-logo-badge {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 6px !important;
    padding: 2px !important;
  }
}

.company-select-card:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
}

.company-select-card .company-logo-badge {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 8px !important;
  padding: 3px !important;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.company-select-card:hover .company-logo-badge {
  transform: scale(1.06);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.company-select-card.selected .company-logo-badge {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.15);
}

.company-select-card.selected {
  border-color: #10B981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 3px 8px rgba(16, 185, 129, 0.12) !important;
}

.company-select-card .card-company-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.company-select-card.selected .card-company-name {
  color: #065f46;
}

.company-select-card .card-check-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10B981;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.company-select-card.selected .card-check-badge {
  display: flex !important;
}

/* Two-column inputs grid on desktop */
.direct-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .direct-inputs-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.role-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin: 3px;
}

.role-badge-chip.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

/* Package Cards Grid (Direct Activation) - Compact */
.package-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

@media (max-width: 640px) {
  .package-card-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.package-select-card {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  user-select: none;
}

.package-select-card:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
}

.package-select-card.selected {
  border-color: #10B981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.25) !important;
}

.package-select-card .pkg-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.package-select-card.selected .pkg-name {
  color: #065f46;
}

.package-select-card .pkg-price {
  font-size: 13px;
  font-weight: 800;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.package-select-card .card-check-badge {
  position: static;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10B981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

/* Company Logo Badge Enhancements */
.company-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.company-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Modal Company Logo Picker Grid */
.logo-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 14px;
}

@media (max-width: 540px) {
  .logo-picker-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

.logo-picker-item {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-align: center;
  user-select: none;
  min-height: 78px;
}

.logo-picker-item:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.logo-picker-item.selected {
  border-color: #10B981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.25) !important;
}

.logo-picker-item .picker-logo-box {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  padding: 3px;
}

.logo-picker-item .picker-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-picker-item .logo-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.logo-picker-item.selected .logo-label {
  color: #065f46;
}

.logo-picker-item .logo-check-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #10B981;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 900;
}

.logo-picker-item.selected .logo-check-badge {
  display: flex !important;
}

/* ========================================================= */
/* Modern Login Page & Card Design (World-Class Aesthetics)  */
/* ========================================================= */
.login-page-wrapper {
  min-height: 100vh;
  width: 100%;
  min-width: 100%;
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  background: radial-gradient(circle at 50% 20%, #e0f2fe 0%, #f8fafc 40%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  margin: 0 auto;
}

.login-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

.login-orb-1 {
  top: -120px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: #2563eb;
}

.login-orb-2 {
  bottom: -120px;
  left: -100px;
  width: 420px;
  height: 420px;
  background: #10b981;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: 38px 32px 30px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.8);
  animation: loginCardFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-brand-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.38);
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease;
}

.login-brand-icon:hover {
  transform: scale(1.05) rotate(-3deg);
}

.login-title {
  font-size: 23px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
  text-align: center;
}

.login-subtitle {
  font-size: 13px;
  color: #64748B;
  font-weight: 600;
  margin: 0 0 14px;
  text-align: center;
}

.login-badge-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #15803d;
}

.login-field-wrap {
  margin-bottom: 18px;
}

.login-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 7px;
}

.login-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  right: 14px;
  color: #94A3B8;
  font-size: 17px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.login-input-field {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-family: var(--font-family);
  font-size: 14.5px;
  font-weight: 700;
  color: #0F172A;
  outline: none;
  direction: rtl;
  text-align: right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-input-field.input-numeric {
  direction: ltr;
  text-align: right;
}

.login-input-field.has-toggle {
  padding-left: 44px;
}

.login-input-field:focus {
  background: #ffffff;
  border-color: #10B981;
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, 0.15);
}

.login-input-field::placeholder {
  color: #94A3B8;
  font-weight: 500;
  font-size: 13.5px;
}

.login-pwd-toggle-btn {
  position: absolute;
  left: 10px;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  color: #64748B;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.login-pwd-toggle-btn:hover {
  color: #0F172A;
  background: #E2E8F0;
}

/* Remember Me Checkbox */
.login-remember-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 24px;
  user-select: none;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
}

.login-remember-wrapper:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin: 0;
  width: 100%;
}

.remember-checkbox {
  width: 19px;
  height: 19px;
  accent-color: #10B981;
  cursor: pointer;
  border-radius: 5px;
  margin: 0;
}

/* Submit Button */
.login-btn-submit {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.2px;
}

.login-btn-submit:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.42);
}

.login-btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.login-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.login-footer-info {
  margin-top: 24px;
  text-align: center;
  border-top: 1px dashed #E2E8F0;
  padding-top: 16px;
}

.login-footer-text {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-footer-sub {
  font-size: 10.5px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Commissions Module & Operator Pills */
.custom-horizontal-pills {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.custom-horizontal-pills::-webkit-scrollbar {
  height: 6px;
}

.custom-horizontal-pills::-webkit-scrollbar-track {
  background: transparent;
}

.custom-horizontal-pills::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.custom-horizontal-pills::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.operator-pill-btn:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary, #3b82f6) !important;
}

.operator-pill-btn:active {
  transform: translateY(0);
}

/* Commission Company Card Grid */
.commission-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

@media (max-width: 640px) {
  .commission-company-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .commission-company-card {
    min-height: 88px !important;
    padding: 8px 4px !important;
  }
  .commission-company-card .card-company-name {
    font-size: 11px !important;
  }
}

.commission-company-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.16) !important;
}

.commission-company-card:active {
  transform: translateY(0);
}

/* ========================================================= */
/* Modern Report Date Controls & Button System               */
/* ========================================================= */
.report-date-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.report-date-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #0F172A;
}

.report-date-icon {
  font-size: 16px;
}

.report-active-range-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  border-radius: 20px;
}

.report-presets-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.custom-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
  background: #F8FAFC;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed #CBD5E1;
}

.custom-date-field {
  flex: 1;
  min-width: 140px;
}

.custom-date-field .form-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.custom-date-btn-wrap {
  flex-shrink: 0;
}

.custom-date-btn-wrap .btn {
  height: 38px;
  padding: 0 18px;
  font-weight: 700;
}

/* Unified Action Buttons & Mobile Balance */
.mobile-card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.mobile-card-actions .btn {
  height: 36px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: center;
}

.company-action-btn {
  height: 32px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ========================================================= */
/* Reports Advanced Multi-Dimensional Filter Bar (Desktop)   */
/* ========================================================= */
.reports-filter-dropdowns {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(210px, 1.25fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: flex-end;
  padding-top: 16px;
  border-top: 1.5px solid #F1F5F9;
}

@media (max-width: 1200px) and (min-width: 769px) {
  .reports-filter-dropdowns {
    grid-template-columns: repeat(2, 1fr) auto;
  }
  .reports-filter-dropdowns .filter-reset-wrap {
    grid-column: 1 / -1;
  }
}

.filter-control-card {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 10px 12px;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-control-card:hover {
  border-color: #94A3B8;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.filter-control-card.is-active {
  border-color: #2563EB;
  background: #F8FAFC;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.filter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.filter-card-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.filter-card-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.filter-card-badge {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-control-card.is-active .filter-card-badge {
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 800;
}

.filter-select-input {
  height: 42px;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  border: 1.5px solid #CBD5E1;
  color: #0F172A;
  background-color: #FFFFFF;
  padding: 0 12px 0 34px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: left 10px center;
  background-repeat: no-repeat;
  transition: all 0.2s ease;
}

.filter-select-input:focus {
  border-color: #2563EB;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background-color: #FFFFFF;
}

/* ========================================================= */
/* Reports Navigation Tab Bar (Desktop & Mobile)             */
/* ========================================================= */
.reports-nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.reports-nav-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.reports-nav-tab {
  flex: 1;
  min-width: max-content;
  height: 44px;
  padding: 0 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.reports-nav-tab:hover {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.reports-nav-tab.is-active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  color: #FFFFFF !important;
  font-weight: 800;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

.reports-nav-tab .tab-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.reports-nav-tab .tab-text {
  line-height: 1.2;
}

@media (max-width: 900px) {
  .reports-nav-tabs {
    gap: 6px;
    padding: 5px;
  }
  .reports-nav-tab {
    flex: initial;
    flex-shrink: 0;
    height: 40px;
    padding: 0 14px;
    font-size: 12.5px;
  }
}

/* Branch Accounts & Debts Component Styles */
.branch-account-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  border: 1.5px solid #334155;
  position: relative;
  overflow: hidden;
}

.branch-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.branch-account-kpi {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
}

/* ========================================================= */
/* System-Wide Mobile UI Optimization (Non-Direct Pages)      */
/* ========================================================= */
@media (max-width: 768px) {
  /* Prevent horizontal overflow across all pages */
  html, body {
    overflow-x: hidden !important;
  }

  .main-container {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .page-content {
    padding: 10px 10px 92px 10px !important;
    overflow-x: hidden !important;
  }

  /* Universal Branch Cards System */
  .branch-system-card {
    border-radius: 14px !important;
    margin-bottom: 18px !important;
  }

  .branch-header-banner {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .branch-header-banner > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .branch-header-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .branch-header-controls .btn,
  .branch-header-controls button {
    grid-column: span 2 !important;
    width: 100% !important;
    height: 40px !important;
    justify-content: center !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }

  .company-package-group {
    border-radius: 10px !important;
    margin-bottom: 14px !important;
  }

  /* Filter Bar Scrollability */
  .filter-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    gap: 6px !important;
  }

  .filter-chip {
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
  }

  /* Commissions Screen Optimization */
  .commission-active-header {
    padding: 12px 14px !important;
  }

  .commission-header-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 8px !important;
  }

  .commission-header-actions .btn {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
    justify-content: center !important;
    height: 38px !important;
  }

  .commission-header-actions .btn:first-child {
    grid-column: span 2 !important;
    height: 42px !important;
    font-size: 13px !important;
  }

  .commission-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .commission-kpi-grid > div {
    padding: 12px 10px !important;
    border-radius: 12px !important;
  }

  .commission-kpi-grid > div [dir="ltr"] {
    font-size: 18px !important;
    margin: 6px 0 2px 0 !important;
  }

  /* Reports View Mobile Enhancements */
  .hero-card {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 14px !important;
  }

  .hero-title {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }

  .hero-card .btn {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 8px !important;
    height: 40px !important;
  }

  .report-date-control-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .report-presets-bar {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    padding-bottom: 6px !important;
  }

  .custom-date-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 10px !important;
  }

  .custom-date-field {
    width: 100% !important;
    min-width: 100% !important;
  }

  .custom-date-btn-wrap {
    width: 100% !important;
  }

  .custom-date-btn-wrap .btn {
    width: 100% !important;
    height: 40px !important;
    justify-content: center !important;
  }

  .desktop-table-view {
    display: none !important;
  }

  .mobile-cards-view {
    display: flex !important;
  }

  .reports-filter-dropdowns {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .reports-filter-dropdowns > div {
    width: 100% !important;
  }

  .reports-filter-dropdowns .btn {
    width: 100% !important;
    justify-content: center !important;
    height: 38px !important;
  }

  .emp-card-header {
    padding: 12px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .emp-card-stats-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .emp-card-stats-row > div {
    padding: 6px 8px !important;
    font-size: 11px !important;
  }

  .emp-card-stats-row .btn {
    grid-column: span 2 !important;
    width: 100% !important;
    height: 38px !important;
    justify-content: center !important;
  }

  .drilldown-subtable th,
  .drilldown-subtable td {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
  }

  /* Dashboard Recent Ops Card */
  .recent-ops-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
  }

  .recent-ops-header {
    margin-bottom: 10px !important;
  }

  /* Modals Mobile Bottom Sheet Polish */
  .modal-overlay {
    align-items: flex-end !important;
  }

  .modal-sheet {
    border-radius: 20px 20px 0 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: 88vh !important;
    margin: 0 !important;
  }

  .modal-header {
    padding: 14px 16px !important;
  }

  .modal-body {
    padding: 16px 14px !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    padding: 12px 14px !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    height: 42px !important;
    font-size: 14px !important;
    justify-content: center !important;
  }
}
