:root {
  --primary: #0f766e;        /* Deep UAE Teal */
  --primary-dark: #0b544e;   /* Dark Teal */
  --primary-light: #14b8a6;  /* Teal Accent */
  --primary-subtle: #f0fdfa; /* Teal Tint */
  --accent: #f59e0b;         /* Warm Amber / Orange */
  --accent-dark: #d97706;    /* Deep Amber */
  --accent-light: #fef3c7;   /* Amber Tint */
  
  --bg: #f8fafc;             /* Modern clean neutral */
  --card: #ffffff;           /* Pure white card surface */
  --text: #0f172a;           /* Slate 900 text */
  --text-muted: #64748b;     /* Slate 500 */
  --border: #e2e8f0;         /* Slate 200 border */
  --border-light: #f1f5f9;
  
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --success: #10b981;
  --success-bg: #d1fae5;
  --info: #0284c7;
  --info-bg: #e0f2fe;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --purple: #8b5cf6;
  --purple-bg: #ede9fe;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.09), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

#app {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #0b4b46 0%, #062f2c 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
  gap: 8px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand .logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
  transition: opacity 0.2s ease;
}

.brand h1 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand span {
  font-size: 10.5px;
  color: #99f6e4;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ccfbf1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-section-title {
  padding: 12px 18px 4px 18px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5eead4;
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.nav-item {
  padding: 9px 18px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ccfbf1;
  border-left: 3px solid transparent;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.nav-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-item-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.nav-item-label {
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.14);
  border-left-color: var(--accent);
  font-weight: 600;
  color: #ffffff;
}

.nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  color: #99f6e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.sidebar-footer .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px #10b981;
}

/* Collapsed Sidebar Styles */
.sidebar.collapsed {
  width: 68px;
}

.sidebar.collapsed .brand {
  padding: 14px 8px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sidebar.collapsed .brand-left {
  justify-content: center;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-footer-text {
  display: none !important;
}

.sidebar.collapsed .nav-item {
  padding: 11px 0;
  justify-content: center;
  border-left: 3px solid transparent;
}

.sidebar.collapsed .nav-item.active {
  background: rgba(255, 255, 255, 0.18);
  border-left-color: var(--accent);
}

.sidebar.collapsed .nav-item-content {
  justify-content: center;
}

.sidebar.collapsed .nav-item-icon {
  font-size: 20px;
  width: auto;
}

.sidebar.collapsed .sidebar-footer {
  justify-content: center;
  padding: 12px 0;
}

/* --- APP WRAPPER & TOP UTILITY BAR --- */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.global-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.global-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

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

.profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
}

.profile-pill:hover {
  background: #e2e8f0;
}

.profile-avatar {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* --- MAIN CONTENT AREA --- */
.main {
  flex: 1;
  padding: 24px 36px;
  overflow-y: auto;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.topbar .sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

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

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: #451a03;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--accent-dark);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn.primary {
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #ffffff;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn.secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

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

.btn.outline-teal:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn.small {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 6px;
}

.btn.danger {
  background: #ffffff;
  color: var(--danger);
  border: 1px solid #fca5a5;
}

.btn.danger:hover {
  background: var(--danger);
  color: #ffffff;
}

/* --- CARDS & METRICS --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

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

.card .label {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card .value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.card .value.accent {
  color: var(--accent-dark);
}

.card .hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- PANELS --- */
.panel {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.panel h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  text-align: left;
}

th {
  background: #eef2f6;
  padding: 12px 14px;
  border-bottom: 2px solid #cbd5e1;
  color: #1e293b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

input[type="checkbox"].booking-row-check, #selectAllBookings, .combined-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text);
  vertical-align: top;
  line-height: 1.45;
}

tr:last-child td {
  border-bottom: 1px solid #e2e8f0;
}

tr:hover td {
  background: #f8fafc;
}

/* Cell Truncation with Ellipsis */
.cell-truncate {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-truncate-lg {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-truncate-sm {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- BADGES --- */
.badge {
  display: inline-block;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.badge.Confirmed { background: #dbeafe; color: #1e40af; }
.badge.Assigned { background: #fef3c7; color: #92400e; }
.badge.PickedUp, .badge.Picked\ Up { background: #e0e7ff; color: #3730a3; }
.badge.Completed { background: #d1fae5; color: #065f46; }
.badge.Cancelled { background: #fee2e2; color: #991b1b; }

.badge.In\ Progress, .badge.InProgress { background: #e0f2fe; color: #0369a1; }

.badge.Paid { background: #d1fae5; color: #065f46; }
.badge.Pending { background: #fef3c7; color: #92400e; }

.badge.Approved { background: #d1fae5; color: #065f46; }
.badge.Settled { background: #e0e7ff; color: #3730a3; }
.badge.Draft { background: #f1f5f9; color: #475569; }
.badge.Sent { background: #e0f2fe; color: #0369a1; }

.badge.Active { background: #d1fae5; color: #065f46; }
.badge.ExpiringSoon, .badge.Expiring\ Soon { background: #fed7aa; color: #9a3412; }
.badge.UnderReview, .badge.Under\ Review { background: #fef3c7; color: #92400e; }
.badge.Inactive { background: #f1f5f9; color: #64748b; }

/* Service Type Color-Coded Pills */
.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  line-height: 1.35;
}

.service-pill.Departure {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}

.service-pill.Arrival {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.service-pill.One-wayTransfer, .service-pill.One-way {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.service-pill.Two-wayTransfer, .service-pill.Two-way {
  background: #ccfbf1;
  color: #0f766e;
  border-color: #99f6e4;
}

.service-pill.HalfDayTour, .service-pill.HalfDay {
  background: #e0e7ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.service-pill.FullDayTour, .service-pill.FullDay {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.service-pill.DesertSafari {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.service-pill.DhowCruiseActivities, .service-pill.DhowCruise, .service-pill.Activities {
  background: #cffafe;
  color: #0e7490;
  border-color: #a5f3fc;
}

/* --- TABS --- */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  overflow-x: auto;
}

.tab {
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -3px;
  white-space: nowrap;
}

.tab:hover {
  color: var(--primary);
  background: #f1f5f9;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #ffffff;
  font-weight: 700;
}

/* --- SEARCH & FILTERS BAR --- */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  width: 260px;
  max-width: 100%;
  outline: none;
  background: #ffffff;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

/* --- MODALS --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 28px;
  width: 520px;
  max-width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--primary-dark);
}

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

.modal-close:hover {
  color: var(--text);
}

.field {
  margin-bottom: 13px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 600;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* --- SEARCHABLE SELECT & CURRENCY CONVERTER --- */
.search-select-wrapper {
  position: relative;
  width: 100%;
}

.search-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 38px;
  color: var(--text);
}

.search-select-trigger:hover, .search-select-trigger.active {
  border-color: var(--primary);
}

.search-select-trigger.active {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.search-select-label {
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  gap: 4px;
}

.search-select-arrow {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  transition: transform 0.15s ease;
}

.search-select-trigger.active .search-select-arrow {
  transform: rotate(180deg);
}

.search-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  z-index: 1100;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.search-select-dropdown.open {
  display: flex;
}

.search-select-search-box {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.search-select-search-box input {
  width: 100%;
  padding: 6px 9px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
}

.search-select-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}

.search-select-options {
  max-height: 220px;
  overflow-y: auto;
}

.search-select-option {
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s ease;
  border-bottom: 1px solid #f8fafc;
}

.search-select-option:hover {
  background: #f0fdfa;
}

.search-select-option.selected {
  background: #ccfbf1;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* --- ROW ACTIONS & UTILITIES --- */
.row-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 36px 18px;
  font-size: 13px;
}

.muted {
  color: var(--text-muted);
  font-size: 11.5px;
}

.text-right {
  text-align: right;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* --- CUSTOMER PORTAL --- */
.customer-portal-view {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.portal-switch-banner {
  background: #0f766e;
  color: #fff;
  border-radius: 10px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
}

.customer-header {
  background: linear-gradient(135deg, #0f766e 0%, #0b544e 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.customer-header h2 {
  margin: 0 0 4px 0;
  font-size: 21px;
  color: #ffffff;
}

.customer-header p {
  margin: 0;
  color: #ccfbf1;
  font-size: 12.5px;
}

.customer-picker-box {
  background: rgba(255, 255, 255, 0.15);
  padding: 9px 13px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.customer-picker-box label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  color: #fde68a;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

select.customer-picker {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 12.5px;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  outline: none;
}

/* --- INVOICE PRINT PREVIEW MODAL --- */
.invoice-slip {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  font-size: 12.5px;
}

.invoice-slip-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.invoice-slip-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

.invoice-slip-meta {
  text-align: right;
  font-size: 11.5px;
  color: var(--text-muted);
}

.invoice-slip-total {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* --- RESPONSIVENESS --- */
@media (max-width: 900px) {
  #app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .content-wrapper {
    height: auto;
  }
  .main {
    padding: 18px 14px;
  }
}

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

/* ==========================================================================
   COMMAND CENTER DASHBOARD STYLES
   ========================================================================== */

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

@keyframes pulseLive {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.dash-command-center {
  animation: dashSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Header & Quick Action Bar */
.dash-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 16px 22px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px -2px rgba(15, 118, 110, 0.05);
}

.dash-header-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-header-title .sub {
  margin: 3px 0 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.dash-live-clock {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
  padding: 8px 14px;
  border-radius: 12px;
}

.dash-live-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseLive 2s infinite ease-in-out;
}

.dash-clock-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  font-weight: 800;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.dash-clock-zone {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0d9488;
  background: #ccfbf1;
  padding: 2px 6px;
  border-radius: 4px;
}

.dash-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.dash-pill-btn.primary {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.25);
}

.dash-pill-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(15, 118, 110, 0.35);
}

.dash-pill-btn.secondary {
  background: #ffffff;
  color: var(--text);
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.dash-pill-btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
  transform: translateY(-1px);
}

/* KPI Strip (6 Cards) */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 1400px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

@media (max-width: 500px) {
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.dash-kpi-card {
  background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px -2px rgba(15, 118, 110, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dash-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(15, 118, 110, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  border-color: #99f6e4;
}

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

.dash-kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.dash-kpi-icon {
  font-size: 18px;
  opacity: 0.85;
}

.dash-kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-bottom: 8px;
}

.dash-kpi-sparkline {
  width: 100%;
  height: 28px;
  margin-bottom: 8px;
}

.dash-kpi-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
}

.dash-trend-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: 10.5px;
  padding: 1.5px 6px;
  border-radius: 6px;
}

.dash-trend-tag.up {
  background: #ecfdf5;
  color: #059669;
}

.dash-trend-tag.down {
  background: #fef2f2;
  color: #dc2626;
}

.dash-trend-tag.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.dash-kpi-sub {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

/* Charts Grid (3 Charts) */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: 16px;
}

@media (max-width: 1200px) {
  .dash-charts-grid {
    grid-template-columns: 1fr;
  }
}

.dash-chart-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px -2px rgba(15, 118, 110, 0.05);
  display: flex;
  flex-direction: column;
}

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

.dash-chart-header h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 7px;
}

.dash-chart-meta {
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Live Operations Panel & Activity Feed */
.dash-ops-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}

@media (max-width: 1000px) {
  .dash-ops-grid {
    grid-template-columns: 1fr;
  }
}

.dash-mission-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.dash-mission-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
}

.dash-mission-item:hover {
  border-color: #99f6e4;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08);
}

.dash-mission-item.next-up-highlight {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
  position: relative;
}

.dash-mission-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-urgency-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.urgency-critical {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: pulseLive 1.8s infinite ease-in-out;
}

.urgency-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.urgency-normal {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.dash-mission-route {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4;
}

.dash-mission-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px dashed #f1f5f9;
  padding-top: 6px;
}

/* Activity Feed Timeline */
.dash-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.dash-timeline-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
}

.dash-timeline-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dash-timeline-body {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
}

.dash-timeline-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-timeline-time {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Skeleton Loading State */
.dash-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite;
  border-radius: 8px;
}
