/* ── SaharaTrek Ops - Main Stylesheet ── */

:root {
  /* Desert-inspired palette */
  --sand-50: #fdf8f0;
  --sand-100: #f9f0e1;
  --sand-200: #f0dfc3;
  --sand-300: #e4c89a;
  --sand-400: #d4a96e;
  --sand-500: #c48d4a;
  --sand-600: #a8723a;
  --sand-700: #8a5a30;
  --sand-800: #6e4727;
  --sand-900: #4a2f1a;

  --terracotta: #c4553a;
  --terracotta-light: #e8765d;
  --ocean: #2d7d9a;
  --ocean-light: #3a9fc4;
  --olive: #6b7c3e;
  --olive-light: #8ba04e;

  /* Neutrals */
  --gray-50: #fafaf9;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Functional */
  --success: #4a8c5c;
  --warning: #c48d4a;
  --danger: #c4553a;
  --info: #2d7d9a;

  /* Spacing */
  --sidebar-width: 220px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--gray-50);
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sand-900);
  color: var(--sand-200);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  -webkit-app-region: drag;
}

.sidebar-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.logo-icon {
  font-size: 22px;
  color: var(--sand-400);
}

.logo-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--sand-100);
  display: block;
  letter-spacing: 0.5px;
}

.logo-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sand-500);
  display: block;
}

.nav-section {
  padding: 12px 8px 4px;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sand-600);
  padding: 4px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--sand-300);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  -webkit-app-region: no-drag;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--sand-100);
}

.nav-item.active {
  background: rgba(196, 141, 74, 0.2);
  color: var(--sand-100);
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.agent-badge {
  font-size: 12px;
  color: var(--sand-400);
  padding: 4px 0;
}

.data-path {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--sand-600);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ── */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

#page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.page-header .subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--sand-700);
  color: white;
  border-color: var(--sand-800);
}

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

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-danger {
  background: white;
  color: var(--danger);
  border-color: var(--gray-300);
}

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

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-icon {
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.12s ease;
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.data-table thead {
  background: var(--sand-50);
}

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-700);
}

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

.data-table tr:hover td {
  background: var(--sand-50);
}

.data-table .actions {
  text-align: right;
  white-space: nowrap;
}

.data-table .currency {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.data-table .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge-accommodation { background: #fef3c7; color: #92400e; }
.badge-transport { background: #dbeafe; color: #1e40af; }
.badge-guide { background: #e0e7ff; color: #3730a3; }
.badge-activity { background: #d1fae5; color: #065f46; }
.badge-multi { background: #f3e8ff; color: #6b21a8; }

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

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  color: var(--gray-800);
  background: white;
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--sand-500);
  box-shadow: 0 0 0 3px rgba(196, 141, 74, 0.15);
}

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

.form-select {
  appearance: auto;
}

.form-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.form-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sand-600);
}

.form-checkbox-row label {
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}

.form-price-row {
  display: flex;
  gap: 8px;
  align-items: end;
}

.form-price-row .price-input {
  flex: 1;
}

.form-price-row .currency-select {
  width: 90px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
}

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

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

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

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--gray-100);
}

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
.toast-warning { background: var(--warning); }

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

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Card Layout (for settings, etc) ── */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
}

/* ── Search / Filter bar ── */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  max-width: 320px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10px center no-repeat;
}

.search-input:focus {
  outline: none;
  border-color: var(--sand-500);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  background: white;
  color: var(--gray-700);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Utility ── */
.hidden { display: none !important; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 12px; }
.text-mono { font-family: 'JetBrains Mono', monospace; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }

/* ── Catalog Picker ── */
.catalog-pick-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s ease;
  font-size: 13px;
}

.catalog-pick-item:hover {
  background: var(--sand-100);
}

/* === Itineraries === */
.editor-layout { display: flex; gap: 16px; min-height: calc(100vh - 120px); }
.editor-sidebar { width: 280px; flex-shrink: 0; }
.editor-main { flex: 1; min-width: 0; }
.sidebar-info { margin-bottom: 12px; }
.vehicle-info { padding: 10px; background: var(--surface-2); border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.link-accent { color: var(--accent); font-size: 12px; }
.day-tabs { display: flex; flex-direction: column; gap: 4px; }
.day-tab { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: background 0.15s; border: 1px solid transparent; }
.day-tab:hover { background: var(--surface-2); }
.day-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.meal-checks { display: flex; gap: 16px; margin-bottom: 16px; font-size: 13px; }
.meal-checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.5; margin-bottom: 8px; }
.day-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 4px; border-radius: 8px; border-left: 3px solid var(--accent); background: var(--surface-2); font-size: 13px; }
.item-type-label { font-size: 10px; text-transform: uppercase; opacity: 0.5; min-width: 70px; letter-spacing: 0.5px; }
.item-text { flex: 1; }
.item-actions { display: flex; gap: 2px; }
.btn-icon-sm { background: none; border: none; color: var(--text-2); cursor: pointer; padding: 2px 6px; font-size: 14px; border-radius: 4px; }
.btn-icon-sm:hover { color: var(--accent); background: var(--surface-2); }
.btn-icon-sm:disabled { opacity: 0.3; cursor: default; }
.inline-select { padding: 4px 6px; font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--text); max-width: 200px; }
.empty-hint { opacity: 0.5; font-size: 13px; padding: 20px 0; }

/* Status badges */
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.status-draft { background: rgba(255,193,7,0.15); color: #ffc107; }
.status-confirmed { background: rgba(40,167,69,0.15); color: #28a745; }
.status-completed { background: rgba(0,123,255,0.15); color: #007bff; }
.status-cancelled { background: rgba(220,53,69,0.15); color: #dc3545; }
.status-archived { background: rgba(138,131,120,0.18); color: #8a8378; }
.list-card.is-archived { opacity: 0.75; }

/* Meta tags */
.meta-tag { display: inline-block; font-size: 12px; opacity: 0.6; margin-right: 8px; }

/* List cards */
.list-card { display: flex; justify-content: space-between; align-items: center; cursor: pointer; margin-bottom: 8px; transition: border-color 0.15s; }
.list-card:hover { border-color: var(--accent); }
.card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.btn-danger-text { color: var(--danger, #dc3545) !important; }

/* Catalog picker in modal */
.catalog-city { margin-bottom: 8px; }
.catalog-city-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 0; cursor: pointer; opacity: 0.6; }
.catalog-city-title:hover { opacity: 1; }
.catalog-pick-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; margin-bottom: 2px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.catalog-pick-item:hover { background: var(--surface-2, rgba(255,255,255,0.05)); }
.pick-plus { font-weight: 700; color: var(--accent); font-size: 16px; opacity: 0; transition: opacity 0.1s; }
.catalog-pick-item:hover .pick-plus { opacity: 1; }

/* Pricing */
.pricing-breakdown { font-size: 13px; }
.pricing-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border, rgba(255,255,255,0.06)); }
.pricing-total { font-weight: 700; color: var(--accent); border-top: 2px solid var(--border); margin-top: 8px; padding-top: 8px; }

/* Accommodation section in itinerary editor */
.acc-section { margin-bottom: 16px; }
.acc-card { padding: 12px; background: var(--surface-2, rgba(0,0,0,0.03)); border-radius: 8px; border: 1px solid var(--border, rgba(0,0,0,0.08)); }
.acc-card-header { display: flex; justify-content: space-between; align-items: center; }
.acc-same { opacity: 0.7; font-style: italic; display: flex; justify-content: space-between; align-items: center; }

/* Day tab actions (move up/down/remove) */
.day-tab-actions { display: flex; gap: 1px; flex-shrink: 0; }
.day-tab-actions .btn-icon-sm { font-size: 11px; padding: 1px 4px; }

/* Pricing grouped by day */
.pricing-day-header { font-weight: 700; font-size: 13px; padding: 10px 0 4px; margin-top: 8px; border-bottom: 1px solid var(--border, rgba(0,0,0,0.08)); }
.pricing-line-indent { padding-left: 16px; font-size: 12px; }

/* Improved editor layout — sidebar stays visible */
.editor-layout { display: flex; gap: 20px; }
.editor-sidebar { width: 280px; flex-shrink: 0; position: sticky; top: 0; align-self: flex-start; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 16px; }
.editor-main { flex: 1; min-width: 0; }

/* Active day tab stands out more */
.day-tab.active { background: var(--accent, #b8860b); color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* Day tab compact layout with date */
.day-tab { font-size: 12px; padding: 8px 10px; line-height: 1.3; }

/* Locked prices badge */
.locked-badge { padding: 6px 10px; margin-bottom: 8px; background: rgba(40,167,69,0.1); border: 1px solid rgba(40,167,69,0.3); border-radius: 6px; font-size: 11px; color: #28a745; font-weight: 600; }

/* Drag and drop */
.day-tab[draggable], .day-item[draggable] { cursor: grab; }
.day-tab[draggable]:active, .day-item[draggable]:active { cursor: grabbing; }
.day-tab.dragging, .day-item.dragging { opacity: 0.4; }
.day-tab.drag-over { border-top: 2px solid var(--accent, #b8860b) !important; }
.day-item.drag-over { border-top: 2px solid var(--accent, #b8860b) !important; }
.day-tab-grip, .item-grip { cursor: grab; opacity: 0.3; font-size: 14px; user-select: none; padding-right: 4px; }
.day-tab-grip:hover, .item-grip:hover { opacity: 0.7; }
.day-tab-label { flex: 1; min-width: 0; overflow: hidden; }

/* Payment badges */
.payment-badge { padding: 6px 10px; margin-bottom: 4px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(255,193,7,0.1); border: 1px solid rgba(255,193,7,0.3); color: #e6a817; }
.paid-badge { background: rgba(40,167,69,0.1); border-color: rgba(40,167,69,0.3); color: #28a745; }

/* New status badges */
.status-quoted { background: rgba(0,123,255,0.15); color: #007bff; }
.status-deposit_paid { background: rgba(255,193,7,0.15); color: #e6a817; }
.status-paid { background: rgba(40,167,69,0.15); color: #28a745; }

/* Tracking log */
.tracking-event { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border, rgba(0,0,0,0.06)); }
.tracking-icon { font-size: 16px; flex-shrink: 0; padding-top: 2px; }
.tracking-detail { font-size: 13px; }
.tracking-date { font-size: 11px; opacity: 0.5; margin-top: 2px; }

/* Catalog picker */
.catalog-city { margin-bottom: 4px; }
.catalog-city-title { padding: 10px 12px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--sand-100, #f5f0eb); border-radius: 6px; user-select: none; }
.catalog-city-title:hover { background: var(--sand-200, #e8ddd0); }
.city-arrow { display: inline-block; width: 16px; font-size: 11px; }
.catalog-pick-item { display: flex; align-items: center; padding: 8px 12px 8px 28px; cursor: pointer; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 13px; }
.catalog-pick-item:hover { background: rgba(184,134,11,0.08); }
.catalog-pick-item span:first-child { flex: 1; }
.pick-meta { font-size: 11px; opacity: 0.5; margin-right: 8px; white-space: nowrap; }
.pick-plus { font-size: 18px; font-weight: 700; color: var(--sand-600, #a8723a); padding-left: 8px; }

/* ── Itinerary editor UX improvements ── */
.day-item { font-size: 15px; padding: 10px 12px; min-height: 44px; align-items: center; }
.item-icon { font-size: 16px; flex-shrink: 0; }
.item-text { font-size: 15px; flex: 1; min-width: 0; }
.day-header h2 { font-size: 22px; }
.section-label { font-size: 13px; font-weight: 700; letter-spacing: 0.5px; color: var(--gray-500); margin: 16px 0 8px; }
.form-label { font-size: 13px; }
.form-input, .form-select { font-size: 15px; padding: 10px 12px; }
.meal-checks label { font-size: 14px; padding: 6px 12px; }
.editor-main { padding: 24px 28px; }
.sidebar-info { font-size: 13px; }
.meta-tag { font-size: 12px; }
.day-tab { font-size: 13px; padding: 10px 12px; }
.day-tab.active { font-size: 13px; }
.empty-hint { font-size: 14px; color: var(--gray-400); text-align: center; padding: 24px; }
.btn-sm { font-size: 13px; padding: 6px 14px; }
.text-mono { font-family: 'DM Sans', monospace; font-size: 14px; }

/* Price click hint */
.day-item .text-mono:hover { text-decoration: underline !important; }

/* ══ Polish pass: loading, search, filters, unsaved-changes ══ */
.btn-ghost { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-ghost:hover { background: var(--sand-50); border-color: var(--sand-400); color: var(--sand-800); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-actions .action-divider { width: 1px; align-self: stretch; background: var(--gray-300); margin: 4px 4px; }
.page-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 80px 20px; color: var(--gray-500); font-size: 14px; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--sand-200); border-top-color: var(--sand-600); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.list-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.list-search { flex: 1; min-width: 220px; max-width: 380px; padding: 9px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius-md); font-family: inherit; font-size: 13px; background: #fff; }
.list-search:focus { outline: none; border-color: var(--sand-500); box-shadow: 0 0 0 3px rgba(196,141,74,0.15); }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--gray-300); background: #fff; color: var(--gray-600); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.chip:hover { border-color: var(--sand-500); color: var(--sand-800); }
.chip.active { background: var(--sand-700); border-color: var(--sand-800); color: #fff; }
.chip .chip-count { opacity: 0.65; font-weight: 500; margin-left: 4px; }
.filter-empty { display: none; text-align: center; padding: 40px 20px; color: var(--gray-500); font-size: 14px; }
.btn-save-dirty { background: var(--terracotta) !important; border-color: var(--terracotta) !important; color: #fff !important; animation: savePulse 1.8s ease-in-out infinite; }
@keyframes savePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196,85,58,0.45); } 50% { box-shadow: 0 0 0 7px rgba(196,85,58,0); } }
@keyframes modalShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.modal-shake { animation: modalShake 0.35s ease; }

/* ── Version chips & day vehicle line (v6) ── */
.version-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.version-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--gray-300); border-radius: 999px; padding: 3px 10px; font-size: 12px; background: #fff; }
.version-chip a { cursor: pointer; color: var(--gray-700); text-decoration: none; }
.version-chip.primary { background: var(--sand-100); border-color: var(--sand-500); font-weight: 600; }
.version-chip .version-x { color: #c0392b; opacity: 0.5; font-size: 11px; }
.version-chip .version-x:hover { opacity: 1; }
.day-vehicle-line { background: var(--sand-50, #faf6f0); border: 1px solid var(--sand-200, #e8dcc8); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }

/* ── Inquiry badges + Draft Sent status (v9) ── */
.inq-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.5px; }
.inq-badge-new { background: #e67e22; color: #fff; animation: savePulse 2s ease-in-out infinite; }
.inq-badge-replied { background: #1e7e34; color: #fff; }
.status-draft_sent { background: #6f42c1; color: #fff; font-weight: 700; }

/* ── Booking progress bar (9 stages) ── */
.bk-wrap { margin-top: 10px; }
.bk-steps { display: flex; align-items: center; max-width: 420px; }
.bk-step { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid var(--gray-300); flex: none; }
.bk-step.done { background: var(--sand-600, #b08341); border-color: var(--sand-700, #96702f); }
.bk-link { flex: 1; height: 2px; background: var(--gray-300); min-width: 6px; }
.bk-caption { font-size: 11px; color: var(--gray-500); margin-top: 5px; font-weight: 600; }

/* ── Editor action bar: clickable stage segments ── */
.bk-actions { display: flex; width: 100%; margin-top: 10px; border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-300); }
.bk-act { flex: 1 1 0; border: none; border-right: 1px solid rgba(0,0,0,0.12); background: #f1f0ec; color: #666; font-size: 10.5px; font-weight: 600; padding: 8px 4px; cursor: pointer; line-height: 1.25; text-align: center; font-family: inherit; }
.bk-act:last-child { border-right: none; }
.bk-act.done { background: #28a745; color: #fff; }
.bk-act.next { box-shadow: inset 0 -3px 0 var(--sand-600, #b08341); background: #fff; color: #333; }
.bk-act.done.next { background: #28a745; color: #fff; }
.bk-act.part { background: #f5c542; color: #5a4400; }
.bk-act.part.next { background: #f5c542; color: #5a4400; }
.bk-step.part { background: #f5c542; border-color: #d9a520; }
.bk-view { cursor: default; white-space: normal; font-size: 9.5px; padding: 5px 2px; line-height: 1.15; display: flex; align-items: center; justify-content: center; }
.bk-view:hover { filter: none; }
.bk-act:hover { filter: brightness(0.93); }

/* ── Vendors status board ── */
.vboard { font-size: 12px; font-weight: 700; opacity: 0.75; margin-bottom: 10px; }
.vrow { border: 1px solid var(--border, #e3ded6); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.vrow.amber { background: #fff8e6; border-color: #e6c46a; }
.vrow.vdone { opacity: 0.55; }
.vrow-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vrow-name { flex: 1 1 140px; font-size: 13px; min-width: 120px; }
.vrow-name .vsub { font-size: 11px; opacity: 0.6; }
.vbar-wrap { flex: 2 1 320px; min-width: 280px; }
.vbar { display: flex; width: 100%; border: 1px solid var(--gray-300, #ccc); border-radius: 8px; overflow: hidden; }
.vseg { flex: 1 1 0; border: none; border-right: 1px solid rgba(0,0,0,0.12); background: #f1f0ec; color: #777; font-size: 10.5px; font-weight: 600; padding: 6px 2px; cursor: pointer; font-family: inherit; white-space: nowrap; text-align: center; }
.vseg:last-child { border-right: none; }
.vseg.done { background: #28a745; color: #fff; }
.vseg:hover { filter: brightness(0.94); }
.vbar-dates { display: flex; }
.vdate-cell { flex: 1 1 0; text-align: center; }
.vchip-date { border: none; background: transparent; font-size: 10px; width: 96px; text-align: center; color: #888; padding: 1px 0; font-family: inherit; cursor: pointer; }
.vchip-date-fixed { font-size: 10px; color: #888; min-height: 14px; }
.vwait { font-size: 11.5px; color: #a5710a; font-weight: 600; margin-top: 6px; }
