/* ============================================================
   OMNIDISPATCH GLOBAL — MASTER ADMIN & CONTROL TOWER STYLES
   High-Precision Dark/Slate Executive Theme for Multi-Country Dispatch,
   24-Hour Hourly Capacity Grid, Supplier Accounting & Booking.com API Gateway
   ============================================================ */

:root {
  --bg-base: #0a0d14;
  --bg-surface: #101522;
  --bg-card: #151b2b;
  --bg-card-hover: #1b2338;
  --bg-input: #0c101a;
  --border-subtle: #1e273d;
  --border-active: #2f3e61;
  --border-highlight: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --accent-blue: #2563eb;
  --accent-blue-light: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 13.5px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ============================================================
   TOPBAR & HEADER
   ============================================================ */
.admin-topbar {
  height: 64px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon-wrap {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Country Desk Selector */
.country-desk-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  padding: 4px 10px;
  border-radius: var(--radius-md);
}

.country-desk-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.country-select-input {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.country-select-input option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Topbar Controls (Right) */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-health-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--accent-emerald-light);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 1.8s infinite;
}

@keyframes pulse-glow {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.currency-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.btn-icon-control {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-icon-control:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-simulate-job {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

/* ============================================================
   SPLIT PORTAL WELCOME SCREEN (50% TEDARİK vs 50% BOOKING.COM)
   ============================================================ */
.split-portal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
  min-height: calc(100vh - 130px);
}

.portal-half {
  background: linear-gradient(180deg, #0d1322 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.portal-half.supplier-half {
  border-top: 4px solid #3b82f6;
}

.portal-half.booking-half {
  border-top: 4px solid #f59e0b;
}

.portal-half:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.portal-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.portal-half.supplier-half .portal-icon-box {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.portal-half.booking-half .portal-icon-box {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.portal-title-area h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-white);
  margin-bottom: 4px;
}

.portal-title-area p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.portal-modules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.portal-mod-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portal-mod-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.portal-mod-card .mod-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.portal-mod-card .mod-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-enter-portal {
  width: 100%;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-enter-supplier {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-enter-supplier:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  transform: translateY(-1px);
}

.btn-enter-booking {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #000000;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.btn-enter-booking:hover {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  transform: translateY(-1px);
}

.topbar-hub-toggle {
  display: inline-flex;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.topbar-hub-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.topbar-hub-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.topbar-hub-btn.active#tb-hub-supplier {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.topbar-hub-btn.active#tb-hub-booking {
  background: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

/* ============================================================
   MASTER 2-HUB DUAL CONTROLLER BAR (TEDARİK vs BOOKING.COM)
   ============================================================ */
.master-hub-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #070a12;
  border-bottom: 2px solid var(--border-subtle);
  padding: 8px 18px;
  gap: 12px;
}

.hub-tab-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0f1524;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hub-tab-btn:hover {
  background: #141c30;
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.hub-tab-btn.active {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.45), rgba(15, 23, 42, 0.95));
  border-color: #3b82f6;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.25), inset 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.hub-tab-btn.active#hub-btn-booking {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.3), rgba(15, 23, 42, 0.95));
  border-color: #f59e0b;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.25), inset 0 0 0 1px rgba(245, 158, 11, 0.5);
}

.hub-btn-ico {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-tab-btn.active .hub-btn-ico {
  background: rgba(59, 130, 246, 0.2);
}

.hub-tab-btn.active#hub-btn-booking .hub-btn-ico {
  background: rgba(245, 158, 11, 0.2);
}

.hub-btn-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-btn-txt strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-white);
}

.hub-tab-btn.active#hub-btn-booking .hub-btn-txt strong {
  color: #fcd34d;
}

.hub-tab-btn.active#hub-btn-supplier .hub-btn-txt strong {
  color: #60a5fa;
}

.hub-btn-txt small {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   SECONDARY NAV (MASTER TABS — MODERN PILL DESIGN)
   ============================================================ */
.admin-navbar {
  background-color: #0d121f;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 6px 16px;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) transparent;
  min-height: 48px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  scroll-behavior: smooth;
}

.admin-navbar::-webkit-scrollbar {
  height: 4px;
}

.admin-navbar::-webkit-scrollbar-track {
  background: transparent;
}

.admin-navbar::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.35);
  border-radius: 4px;
}

.admin-navbar::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.6);
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

.admin-nav-item:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.admin-nav-item.active {
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #3b82f6;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.nav-counter {
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  font-family: var(--font-mono);
}

.admin-nav-item.active .nav-counter {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.nav-counter.alert {
  background: rgba(244, 63, 94, 0.3);
  color: #fecdd3;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

.nav-counter.gold {
  background: rgba(245, 158, 11, 0.25);
  color: #fef08a;
}


/* ============================================================
   MAIN CONTAINER & SECTIONS
   ============================================================ */
.admin-main {
  flex: 1;
  padding: 20px 24px 40px 24px;
  max-width: 1720px;
  margin: 0 auto;
  width: 100%;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* ============================================================
   KPI METRICS GRID
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.kpi-card:hover {
  border-color: var(--border-active);
  transform: translateY(-1px);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.kpi-card.blue::before { background: var(--accent-blue-light); }
.kpi-card.emerald::before { background: var(--accent-emerald); }
.kpi-card.amber::before { background: var(--accent-amber); }
.kpi-card.purple::before { background: var(--accent-purple); }
.kpi-card.cyan::before { background: var(--accent-cyan); }

.kpi-details {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kpi-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   FILTERS & ACTION TOOLBAR
   ============================================================ */
.filter-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-left-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-chip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.filter-chip-item label {
  font-weight: 500;
  font-size: 11.5px;
}

.filter-ctrl {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: var(--font-sans);
}

.filter-ctrl:focus {
  border-color: var(--border-highlight);
}

.search-field-wrap {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
  position: relative;
}

.search-input-master {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  outline: none;
}

.search-input-master:focus {
  border-color: var(--accent-blue-light);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-action-primary {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-action-primary:hover {
  background: var(--accent-blue-light);
}

.btn-action-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-card-master {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.master-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.master-table thead th {
  background-color: #0d121c;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.master-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.master-table tbody tr {
  transition: background-color 0.12s ease;
}

.master-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

/* Cell Components */
.booking-id-block {
  display: flex;
  flex-direction: column;
}

.booking-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #60a5fa;
  font-size: 12.5px;
}

.ota-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
}

.flight-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.flight-badge.delayed {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}

.route-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 280px;
}

.route-pickup {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.route-dropoff {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.vehicle-class-tag {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 2px;
}

/* Financial Cell */
.finance-cell {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}

.gross-val {
  font-weight: 700;
  color: var(--text-white);
  font-size: 13px;
}

.margin-val {
  font-size: 11px;
  color: var(--accent-emerald-light);
  font-weight: 600;
}

.payout-val {
  font-size: 11px;
  color: #93c5fd;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: var(--font-sans);
}

.status-pill.OFFER_RECEIVED {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-pill.SUPPLIER_DISPATCHED {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.status-pill.SUPPLIER_ACCEPTED {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.status-pill.DRIVER_ASSIGNED {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.status-pill.DRIVER_EN_ROUTE {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-pill.DRIVER_ARRIVED {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid #10b981;
}

.status-pill.PASSENGER_PICKED_UP {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  border: 1px solid #0284c7;
}

.status-pill.RIDE_COMPLETED {
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.4);
}

.status-pill.PAYOUT_SETTLED {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.status-pill.CANCELLED, .status-pill.NO_SHOW {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Action Buttons in Grid */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-grid-action {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-grid-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-grid-action.audit {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(37, 99, 235, 0.08);
}

.btn-grid-action.audit:hover {
  background: rgba(37, 99, 235, 0.2);
}

/* ============================================================
   24-HOUR HOURLY CAPACITY MATRIX & HEATBARS
   ============================================================ */
.hourly-mini-matrix {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  align-items: flex-end;
  height: 48px;
  padding: 6px 2px 2px 2px;
}

.mini-hour-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-hour-slot:hover {
  transform: translateY(-2px);
}

.mini-hour-slot.current-now {
  background: rgba(56, 189, 248, 0.15);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.mini-hour-num {
  font-size: 8px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
}

.mini-hour-bar-val {
  width: 100%;
  min-height: 3px;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.mini-hour-label {
  font-size: 8.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-white);
  margin-top: 2px;
  line-height: 1;
}

/* Hourly Grid Input Form in Modal */
.hourly-grid-wrapper {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 14px;
}

.hourly-inputs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

.hourly-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.hourly-input-card:hover {
  border-color: var(--accent-blue-light);
}

.hour-slot-badge {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #93c5fd;
}

.hourly-val-input {
  width: 100%;
  background: #0c101a;
  border: 1px solid var(--border-active);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  padding: 4px 6px;
  border-radius: 4px;
  outline: none;
}

.hourly-val-input:focus {
  border-color: var(--accent-blue-light);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.hour-sub-label {
  font-size: 9.5px;
  color: var(--text-muted);
}

.hourly-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.bulk-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-preset {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset:hover {
  background: var(--bg-card-hover);
  color: var(--text-white);
  border-color: var(--accent-blue-light);
}

/* ============================================================
   AUDIT TRAIL / TIMELINE DRAWER
   ============================================================ */
.audit-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

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

.audit-drawer {
  width: 580px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-active);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.audit-drawer-overlay.active .audit-drawer {
  transform: translateX(0);
}

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

.audit-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.btn-close-drawer:hover {
  color: var(--text-white);
}

.audit-body {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
}

.booking-summary-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 22px;
  font-size: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-label {
  color: var(--text-muted);
  font-weight: 500;
}

.summary-val {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ============================================================
   BOOKING.COM TAXI CONNECT ENTERPRISE API SUITE & PLAYGROUND
   ============================================================ */
.api-telemetry-banner {
  background: linear-gradient(135deg, #090f1d 0%, #0d172e 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.api-telemetry-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.api-gateway-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.api-endpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.api-endpoint-card {
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.api-endpoint-card:hover {
  background: #131b30;
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.api-endpoint-card.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), #0f172a);
  border-color: #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

.api-method-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.api-method-badge.post { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.api-method-badge.patch { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.api-method-badge.get { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

.api-endpoint-path {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-white);
  margin: 6px 0 4px 0;
  word-break: break-all;
}

.api-endpoint-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.api-playground-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.api-console-box {
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.api-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.api-json-textarea {
  background: #04060a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  width: 100%;
  height: 280px;
  resize: vertical;
  line-height: 1.5;
  outline: none;
}

.api-json-response {
  background: #04060a;
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px;
  width: 100%;
  height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Vertical Timeline */
.timeline-list {
  position: relative;
  padding-left: 28px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 9px;
  bottom: 8px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.timeline-item.completed .timeline-node {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.timeline-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.timeline-step-name {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #93c5fd;
}

.timeline-time {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.timeline-desc {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 6px;
}

.timeline-operator {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.timeline-code-pill {
  background: #0b0f19;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  margin-top: 6px;
  overflow-x: auto;
}

/* ============================================================
   MODALS (Test Simulator, Commission Rules, Supplier Edit)
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  width: 780px;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

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

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  font-size: 12.5px;
  font-family: var(--font-sans);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue-light);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

/* Margin Calculation Preview Card */
.margin-calc-preview {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
  font-size: 12px;
}

.margin-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.calc-box-title {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.calc-box-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ============================================================
   API GATEWAY & LOG INSPECTOR
   ============================================================ */
.api-inspector-card {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  max-height: 450px;
  overflow-y: auto;
}

.api-log-entry {
  padding: 10px 12px;
  border-bottom: 1px solid #141b2b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.api-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.http-method {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.http-method.post { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.http-method.get { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* Responsive adjustments */
@media (max-width: 1100px) {
  .admin-topbar { padding: 0 14px; height: auto; flex-wrap: wrap; gap: 10px; }
  .admin-main { padding: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-toolbar { flex-direction: column; align-items: stretch; }
  .search-field-wrap { max-width: 100%; }
  .hourly-inputs-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 650px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .margin-preview-grid { grid-template-columns: 1fr; }
  .hourly-inputs-grid { grid-template-columns: repeat(2, 1fr); }
}
