/* hub-app.css — Disney Quote Hub */

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

:root {
  --blue-dark:   #003087;
  --blue:        #185FA5;
  --blue-mid:    #378ADD;
  --blue-light:  #E6F1FB;
  --teal:        #0F6E56;
  --teal-light:  #E1F5EE;
  --amber:       #BA7517;
  --amber-light: #FAEEDA;
  --red:         #A32D2D;
  --red-light:   #FCEBEB;
  --border:      #E4E4E4;
  --border-mid:  #CCCCCC;
  --bg:          #F5F6F8;
  --surface:     #FFFFFF;
  --text:        #1A1A1A;
  --text-muted:  #6B7280;
  --text-light:  #9CA3AF;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --sidebar-w:   272px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ── Layout shell ──────────────────────────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
}

.sidebar-section {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}

.section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 4px;
  margin-bottom: 8px;
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.client-item {
  padding: 9px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.1s;
  border: 1px solid transparent;
}

.client-item:hover { background: var(--bg); }

.client-item.active {
  background: var(--blue-light);
  border-color: rgba(55, 138, 221, 0.3);
}

.client-item .ci-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-item.active .ci-name { color: var(--blue-dark); }

.client-item .ci-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-item.active .ci-meta { color: var(--blue); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-mid);
  flex-shrink: 0;
}

.status-dot.connected { background: #1D9E75; }
.status-dot.error { background: #E24B4A; }

/* ── Main area ────────────────────────────────────────────────────────────── */

.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ── Empty state ──────────────────────────────────────────────────────────── */

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
  max-width: 360px;
  line-height: 1.6;
}

/* ── Client view ──────────────────────────────────────────────────────────── */

.client-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.client-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.client-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.client-meta-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

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

.quote-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--amber-light);
  color: var(--amber);
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */

.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.tab {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.12s;
}

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

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* ── Tab panels ──────────────────────────────────────────────────────────── */

.tab-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.tab-panel.active { display: block; }

.panel-inner {
  padding: 24px;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-label {
  font-size: 12px;
  color: var(--text-muted);
}

.sort-controls {
  display: flex;
  gap: 4px;
}

/* ── Quote grid ───────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════
   SWIM-LANE CARD GRID
   The label column and card columns share identical row heights
   by using the same min-height on every paired element.
   Gutters between cards use box-shadow so borders don't double.
═══════════════════════════════════════════════════════════════ */

/* Row height tokens — single source of truth */
:root {
  --lane-h-hotel:   62px;
  --lane-h-dates:   30px;
  --lane-h-nights:  28px;
  --lane-h-party:   30px;
  --lane-h-room:    52px;
  --lane-h-promo:   38px;
  --lane-h-tickets: 54px;
  --lane-h-hopper:  32px;
  --lane-h-dining:  38px;
  --lane-h-price:   52px;
  --lane-h-sub:     28px;
  --lane-h-diff:    34px;
  /* Header area heights (badge row + actions row) */
  --hdr-badge:  36px;
  --hdr-action: 44px;
}

.quote-grid-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 20px 20px 0 20px;
  overflow-x: auto;
  gap: 0;
  margin-bottom: 24px;
}

/* ── Label sidebar ───────────────────────────────────────────── */
.qc-lane-labels {
  flex-shrink: 0;
  min-width: 88px;
  max-width: 88px;
  margin-right: 12px;
  /* Push labels down past the badge+actions header */
  padding-top: calc(var(--hdr-badge) + var(--hdr-action) + 1px);
}

.qc-lane-label {
  display: flex;
  align-items: center;
  padding: 0 10px 0 0;
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-top: 1px solid transparent; /* invisible — just for spacing consistency */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qc-lane-label.lbl-hotel   { min-height: var(--lane-h-hotel);   align-items: flex-start; padding-top: 10px; }
.qc-lane-label.lbl-dates   { min-height: var(--lane-h-dates);   }
.qc-lane-label.lbl-nights  { min-height: var(--lane-h-nights);  }
.qc-lane-label.lbl-party   { min-height: var(--lane-h-party);   }
.qc-lane-label.lbl-room    { min-height: var(--lane-h-room);    align-items: flex-start; padding-top: 10px; }
.qc-lane-label.lbl-promo   { min-height: var(--lane-h-promo);   }
.qc-lane-label.lbl-tickets { min-height: var(--lane-h-tickets); align-items: flex-start; padding-top: 10px; }
.qc-lane-label.lbl-hopper  { min-height: var(--lane-h-hopper);  }
.qc-lane-label.lbl-dining  { min-height: var(--lane-h-dining);  }
.qc-lane-label.lbl-price   { min-height: var(--lane-h-price);   }
.qc-lane-label.lbl-sub     { min-height: var(--lane-h-sub);     }
.qc-lane-label.lbl-diff    { min-height: var(--lane-h-diff);    }

/* ── Card grid ───────────────────────────────────────────────── */
.quote-grid {
  display: block;
}

.quote-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0;
  position: relative;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  max-width: 260px;
  flex: 1 1 200px;
  overflow: hidden;  /* keep border-radius on children */
}
.quote-card.best        { border-color: var(--blue); }
.quote-card.recommended { border-color: var(--amber); }

/* ── Non-lane header (badge row + actions) ───────────────────── */
.qc-badge-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 8px 10px 4px;
  min-height: var(--hdr-badge);
}

.qc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 8px;
  min-height: var(--hdr-action);
  border-bottom: 2px solid var(--border);
}

/* ── Swim lanes ──────────────────────────────────────────────── */
.qc-lane {
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  line-height: 1.35;
  word-break: break-word;
}
.qc-lane-na { color: var(--text-muted); font-style: italic; font-size: 12px; }

.qc-lane-hotel   { min-height: var(--lane-h-hotel);   font-weight: 600; font-size: 13px; align-items: flex-start; padding-top: 10px; padding-bottom: 8px; }
.qc-lane-dates   { min-height: var(--lane-h-dates);   font-size: 12px; color: var(--text-muted); }
.qc-lane-nights  { min-height: var(--lane-h-nights);  font-size: 12px; font-weight: 600; color: var(--text-muted); }
.qc-lane-party   { min-height: var(--lane-h-party);   font-size: 12px; color: var(--text-muted); }
.qc-lane-room    { min-height: var(--lane-h-room);    font-size: 12px; font-weight: 500; align-items: flex-start; padding-top: 10px; padding-bottom: 8px; }
.qc-lane-promo   { min-height: var(--lane-h-promo);   font-size: 11px; color: #0F6E56; }
.qc-lane-tickets { min-height: var(--lane-h-tickets); font-size: 12px; align-items: flex-start; padding-top: 10px; padding-bottom: 8px; }
.qc-lane-hopper  { min-height: var(--lane-h-hopper);  font-size: 12px; }
.qc-lane-dining  { min-height: var(--lane-h-dining);  font-size: 12px; }

.qc-hopper-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 20px;
  background: #E1F5EE; color: #0F6E56;
}
.qc-lane-price   { min-height: var(--lane-h-price);   font-size: 26px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; border-top: 2px solid #e8e8e8; }
.qc-lane-sub     { min-height: var(--lane-h-sub);     font-size: 12px; color: var(--text-muted); }

/* diff row */
.qc-diff {
  min-height: var(--lane-h-diff);
  padding: 0 12px;
  font-size: 12px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
}
.qc-diff.plus { color: #999; }
.qc-diff.zero { color: #0F6E56; font-weight: 600; }

/* ── Price formatting ────────────────────────────────────────── */
.qc-price-suffix { font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em;
                   text-transform: uppercase; margin-left: 5px; opacity: 0.75; }

/* ── Badges ──────────────────────────────────────────────────── */
.qc-badge        { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; letter-spacing: 0.03em; }
.qc-badge-best   { background: var(--blue); color: white; }
.qc-badge-rec    { background: var(--amber); color: white; }
.qc-offer-badge  { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; flex-shrink: 0; }

/* ── Icon buttons ────────────────────────────────────────────── */
.qc-icon-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border); background: white;
  color: var(--text-light); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: all 0.1s; padding: 0;
}
.qc-icon-btn:hover    { border-color: var(--blue-mid); color: var(--blue); }
.qc-icon-btn.active   { background: var(--amber); border-color: var(--amber); color: white; }
.qc-icon-del:hover    { border-color: var(--red); color: var(--red); background: var(--red-light); }
.qc-quote-num {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.03em; opacity: 0.7;
}
.quote-card.recommended { border-color: #BA7517; }

.add-card {
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  min-height: 160px;
  transition: background 0.1s, border-color 0.1s;
  background: transparent;
  width: 100%;
  padding: 16px;
}

.add-card:hover {
  background: var(--surface);
  border-color: var(--blue-mid);
  color: var(--blue);
}

.add-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: border-color 0.1s;
}

.add-card:hover .add-card-icon { border-color: var(--blue-mid); }

/* ── Summary bar ─────────────────────────────────────────────────────────── */

.summary-bar {
  display: flex;
  gap: 32px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.summary-bar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 0 0 0;
}

.btn-tiny-danger {
  color: var(--red);
  border-color: #f5c1c1;
}
.btn-tiny-danger:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.stat { text-align: center; }

.stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-value.green { color: var(--teal); }
.stat-value.red   { color: var(--red); }

/* ── Detail form ─────────────────────────────────────────────────────────── */

.detail-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
}

.detail-form .form-row.full { grid-column: 1 / -1; }

/* ── Code block ──────────────────────────────────────────────────────────── */

.code-block {
  background: #f8f8f8;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #374151;
  overflow-x: auto;
  white-space: pre;
  max-height: 480px;
  overflow-y: auto;
}

.helper-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.setup-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.endpoint-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.endpoint {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.endpoint code {
  font-family: monospace;
  font-size: 12px;
  color: var(--blue);
  min-width: 160px;
}

.endpoint span { color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-mid);
  background: var(--surface);
  color: var(--text);
  transition: background 0.1s, border-color 0.1s;
  white-space: nowrap;
}

.btn:hover { background: var(--bg); }
.btn:active { transform: scale(0.98); }

.btn.full-width { width: 100%; }

.btn-primary {
  background: var(--blue-dark);
  color: white;
  border-color: var(--blue-dark);
}
.btn-primary:hover { background: #002070; }

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border-color: rgba(163,45,45,0.3);
}
.btn-danger:hover { background: #f5c1c1; }

.btn-outline {
  background: transparent;
  border-color: var(--border-mid);
}
.btn-outline:hover { background: var(--bg); }

.btn-tiny {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-mid);
  background: var(--surface);
  color: var(--text-muted);
  transition: all 0.1s;
}
.btn-tiny:hover, .btn-tiny.active {
  background: var(--blue-dark);
  color: white;
  border-color: var(--blue-dark);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-row label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-row input, .form-row select, .form-row textarea {
  padding: 9px 11px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.12s;
  font-family: var(--font);
  width: 100%;
}

.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(55,138,221,0.12);
}

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

/* ── Modal ───────────────────────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 480px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

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

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a1a;
  color: white;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 2000;
  max-width: 320px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: var(--teal); }
.toast.error { background: var(--red); }

/* ═══════════════════════════════════════════════════════════════
   GROUPED LAYOUT — date rows, category headers, variant stacks
   Row heights are CSS-variable driven so sidebar labels align.
═══════════════════════════════════════════════════════════════ */

:root {
  /* Shared hotel-header row heights */
  --qc-h-hotel:   58px;
  --qc-h-party:   28px;
  --qc-h-room:    46px;
  /* Per-variant row heights (fixed so sidebar aligns) */
  --qc-h-vroom:   36px;   /* room type per variant */
  --qc-h-vlabel:  32px;   /* variant action row (badge + # + buttons) */
  --qc-h-vpromo:  24px;   /* offer/promo label row */
  --qc-h-vinc:    30px;   /* includes badges row */
  --qc-h-vprice:  48px;   /* main price */
  --qc-h-vsub:    24px;   /* per-night sub */
  /* Sidebar width */
  --qc-sidebar:   88px;
}

/* ── Wrapper for the whole quote section ─────────────────────── */
.quote-grid-wrapper {
  position: relative;
  padding: 0 20px 20px 20px;
  overflow-x: auto;
}

/* ── Date-row header: compact, sits above the category label ──── */
.qc-date-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 20px 12px 20px;
  border-bottom: 2px solid #003087;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.qc-date-label {
  font-size: 13px;
  font-weight: 700;
  color: #003087;
  letter-spacing: -0.01em;
}

.qc-nights-badge {
  font-size: 10px;
  font-weight: 700;
  color: white;
  background: #003087;
  border-radius: 20px;
  padding: 2px 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Hotel row: sidebar + scrolling card area ─────────────────── */
.qc-hotel-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding-bottom: 24px;
}

/* ── Sidebar label column ─────────────────────────────────────── */
.qc-lane-labels {
  flex-shrink: 0;
  width: var(--qc-sidebar);
  padding-right: 8px;
  padding-top: 30px; /* push labels down past the horizontal category header */
}

.qc-lane-label {
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  padding-right: 6px;
}

/* Hotel-header labels — match card lane heights exactly */
.qc-lane-label.lbl-hotel  { height: var(--qc-h-hotel);  align-items: flex-start; padding-top: 10px; }
.qc-lane-label.lbl-party  { height: var(--qc-h-party);  }
/* Variant labels — one set repeats per variant */
.qc-lane-label.lbl-vroom  { height: var(--qc-h-vroom);  border-top: 2px solid #e8e8e8; align-items: flex-start; padding-top: 8px; }
.qc-lane-label.lbl-vhdr   { height: var(--qc-h-vlabel); color: #555; font-size: 9px; }
.qc-lane-label.lbl-vpromo { height: var(--qc-h-vpromo); color: #bbb; font-size: 9px; }
.qc-lane-label.lbl-vinc   { height: var(--qc-h-vinc);   }
.qc-lane-label.lbl-vprice { height: var(--qc-h-vprice); }
.qc-lane-label.lbl-vsub   { height: var(--qc-h-vsub);   }

/* ── Scrolling card area (flex row of groups) ─────────────────── */
.qc-cards-scroll {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
}

/* ── Category group ───────────────────────────────────────────── */
.qc-cat-group {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Category header row — horizontal, above the cards */
.qc-cat-header {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
}

.qc-cat-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bbb;
}

.qc-cat-rule {
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

/* Cards in this category sit in a flex row */
.qc-cat-cards {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 0 8px;
}

/* Thin vertical divider between category groups */
.qc-cat-group + .qc-cat-group {
  border-left: 1.5px solid #eee;
  padding-left: 4px;
}

/* ── Hotel card ───────────────────────────────────────────────── */
.quote-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  min-width: 200px;
  max-width: 260px;
  flex: 1 1 200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.quote-card.best        { border-color: var(--blue); }
.quote-card.recommended { border-color: var(--amber); }

/* Fixed-height hotel header rows (aligned with sidebar) */
.qc-lane { padding: 0 12px; display: flex; align-items: center;
           font-size: 13px; color: var(--text); border-top: 1px solid #f0f0f0; line-height: 1.3; }
.qc-lane:first-child { border-top: none; }

.qc-lane-hotel {
  height: var(--qc-h-hotel); font-weight: 600; font-size: 13px;
  align-items: flex-start; padding-top: 10px; padding-bottom: 6px;
  word-break: break-word;
}
.qc-lane-party { height: var(--qc-h-party); font-size: 12px; color: var(--text-muted); }
.qc-lane-room  {
  height: var(--qc-h-room); font-size: 12px; font-weight: 500;
  align-items: flex-start; padding-top: 8px; padding-bottom: 8px;
  word-break: break-word;
}

/* ── Variants container ───────────────────────────────────────── */
.qc-variants {
  display: flex;
  flex-direction: column;
  border-top: 2px solid #e8e8e8;
}

/* ── Individual variant — fixed-height rows ───────────────────── */
.qc-variant {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #f0f0f0;
}
.qc-variant:first-child { border-top: none; }
.qc-variant-rec  { background: #fffbf0; }

/* Fixed-height variant rows matching sidebar labels */
.qc-variant-room {
  height: var(--qc-h-vroom);
  display: flex; align-items: flex-start;
  padding: 8px 12px 4px;
  font-size: 12px; font-weight: 600; color: var(--text);
  border-top: 2px solid #306793;
  background: #baddf8;
  line-height: 1.3; word-break: break-word;
}
.qc-variant:first-child .qc-variant-room { border-top: none; }

.qc-variant-header {
  height: var(--qc-h-vlabel);
  display: flex; align-items: center;
  padding: 0 10px; gap: 5px;
}

/* Offer/promo label — own fixed-height row below header */
.qc-variant-label {
  height: var(--qc-h-vpromo);
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 11px; color: var(--text-muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #fafafa;
}

.qc-variant-includes {
  height: var(--qc-h-vinc);
  display: flex; align-items: center;
  padding: 0 10px;
  gap: 4px; flex-wrap: wrap;
  overflow: hidden;
}

.qc-inc-badge {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px;
  white-space: nowrap;
}

.qc-variant-price {
  height: var(--qc-h-vprice);
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; white-space: nowrap;
}

.qc-variant-sub {
  height: var(--qc-h-vsub);
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 11px; color: var(--text-muted);
}





/* Badge row above cards */
.qc-badge-row {
  display: flex; gap: 5px; flex-wrap: wrap;
  padding: 6px 10px 4px;
  min-height: 32px;
}


/* ── Per-night toggle ─────────────────────────────────────────── */
.hide-per-night .qc-variant-sub   { display: none; }
.hide-per-night .qc-lane-label.lbl-vsub { display: none; }

/* ── Recommended variant room — golden override ───────────────── */
.qc-variant-room-rec {
  background: #f5c842;
  border-top-color: #b8860b;
  color: #3d2800;
}

/* ── Highlight cheapest bar ───────────────────────────────────── */
.highlight-cheapest-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 6px;
  border-bottom: 1px solid var(--border);
  background: #fffdf5;
  flex-wrap: wrap;
}

.highlight-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.highlight-btn-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.hlt-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: white;
  color: #666;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.02em;
}
.hlt-btn:hover:not(:disabled) {
  border-color: #b8860b;
  color: #3d2800;
  background: #fef9e7;
}
.hlt-btn.active {
  background: #f5c842;
  border-color: #b8860b;
  color: #3d2800;
}
.hlt-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.hlt-clear {
  border-color: #eee;
  color: #bbb;
  margin-left: 4px;
}
.hlt-clear:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

/* Golden highlight on matching variant room row */
.qc-highlighted {
  background: #f5c842 !important;
  border-top-color: #b8860b !important;
  color: #3d2800 !important;
}

/* ═══════════════════════════════════════════════════════════════
   STATE & CONTENT MANAGEMENT
═══════════════════════════════════════════════════════════════ */

/* ── Sidebar section label row ────────────────────────────────── */
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 4px;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.sidebar-toggle:hover { opacity: 1; }

/* ── Sidebar search ───────────────────────────────────────────── */
.sidebar-search {
  padding: 0 8px 6px;
}
.sidebar-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 9px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text);
  outline: none;
}
.sidebar-search input:focus { border-color: var(--blue-mid); }

/* ── Client item — status pip + warning ───────────────────────── */
.client-item {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.client-status-pip {
  width: 3px;
  align-self: stretch;
  border-radius: 0;
  flex-shrink: 0;
  margin-right: 8px;
}

.ci-body { flex: 1; min-width: 0; }

.ci-warn {
  font-size: 13px;
  flex-shrink: 0;
  margin-left: 4px;
  opacity: 0.8;
}

.ci-archived {
  font-size: 9px;
  color: #bbb;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Yellow left border on zero-quote trips */
.client-item-warn {
  background: #fffbf0;
}
.client-item-warn .client-status-pip {
  background: #f5c842 !important;
}

/* ── Trip status bar ──────────────────────────────────────────── */
.trip-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 6px;
  border-bottom: 1px solid var(--border);
  background: #f8f8fc;
  flex-wrap: wrap;
}

/* Status-specific active colours */
#status-hold.active      { background: #fef3c7; border-color: #b45309; color: #78350f; }
#status-deposit.active   { background: #e6f4ec; border-color: #1a7f4b; color: #14532d; }
#status-paid.active      { background: #E1F5EE; border-color: #0F6E56; color: #064e3b; }
#status-travelled.active { background: #dbeafe; border-color: #1d4ed8; color: #1e3a8a; }
#status-postponed.active { background: #ede9fe; border-color: #6d28d9; color: #4c1d95; }
#status-cancelled.active { background: #fee2e2; border-color: #A32D2D; color: #7f1d1d; }
#status-ghosted.active   { background: #f3f4f6; border-color: #9ca3af; color: #374151; }

/* ── Trip notes tab ───────────────────────────────────────────── */
.notes-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  height: 100%;
}

.trip-notes-field {
  flex: 1;
  min-height: 300px;
  padding: 14px 16px;
  font-size: 13px;
  font-family: -apple-system, sans-serif;
  line-height: 1.6;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color 0.15s;
}
.trip-notes-field:focus { border-color: var(--blue-mid); }

/* ═══════════════════════════════════════════════════════════════
   COMPARISON TAB CONTROLS — unified shaded bar
═══════════════════════════════════════════════════════════════ */

.comparison-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #f4f6f9;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.comparison-controls-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-right: 1px solid var(--border);
  flex-wrap: wrap;
}

.comparison-controls-group:last-child {
  border-right: none;
  flex: 1; /* highlight group takes remaining width */
}

.comparison-controls-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  white-space: nowrap;
  margin-right: 2px;
}

/* ─── Login screen ─────────────────────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0; background: #f0f4f8;
  display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.login-card {
  background: white; border-radius: 12px; padding: 36px 40px;
  width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.login-logo { text-align: center; margin-bottom: 8px; }
.login-agency-name { text-align: center; font-size: 15px; font-weight: 700; color: #003087; margin-bottom: 4px; }
.login-title { text-align: center; font-size: 18px; font-weight: 600; color: #1a2340; margin-bottom: 20px; }
.login-error { color: #A32D2D; font-size: 12px; min-height: 18px; margin-bottom: 6px; text-align: center; }

/* ─── Sidebar agent name ────────────────────────────────────────────────────── */
.sidebar-agent {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer-row {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
}
.sidebar-footer-row .hub-status { flex: 1; }
.btn-icon {
  background: none; border: none; cursor: pointer; font-size: 16px;
  padding: 2px 4px; border-radius: 4px; color: #6b7a99; line-height: 1;
}
.btn-icon:hover { background: #f0f4f8; color: #003087; }

/* ─── Hamburger / ⋯ menu ────────────────────────────────────────────────────── */
.ham-menu-wrap { position: relative; }
.ham-trigger { padding: 6px 10px; font-size: 18px; line-height: 1; }
.ham-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 999;
  background: white; border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12); min-width: 180px;
  display: none; flex-direction: column; overflow: hidden;
}
.ham-menu.open { display: flex; }
.ham-menu button {
  background: none; border: none; text-align: left; padding: 9px 14px;
  font-size: 13px; cursor: pointer; color: #1a2340; white-space: nowrap;
}
.ham-menu button:hover { background: #f0f4f8; }
.ham-menu button.danger { color: #A32D2D; }
.ham-menu hr { margin: 4px 0; border: none; border-top: 1px solid #eee; }

/* ─── Admin modal ───────────────────────────────────────────────────────────── */
.modal-wide { width: min(680px, 95vw); }
.admin-section-title {
  font-size: 13px; font-weight: 700; color: #003087; text-transform: uppercase;
  letter-spacing: .04em; margin: 0 0 12px;
}
.admin-add-user {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 14px; margin-bottom: 16px;
}
.admin-user-list { display: flex; flex-direction: column; gap: 8px; }
.admin-user-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: white;
}
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name { font-size: 13px; font-weight: 600; color: #1a2340; }
.admin-user-meta { font-size: 11px; color: #6b7a99; margin-top: 1px; }
.admin-user-role {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
  background: #e8eef8; color: #003087; text-transform: uppercase; letter-spacing: .04em;
}
.admin-user-role.admin { background: #fef3c7; color: #92400e; }
.admin-token-row {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
}
.admin-token-code {
  font-family: monospace; font-size: 10px; background: #f0f4f8;
  padding: 2px 6px; border-radius: 4px; color: #475569;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-sm { font-size: 11px; padding: 3px 10px; }
.field-hint { font-size: 10px; color: #aaa; font-weight: 400; }

/* ─── Extension setup — API token display ───────────────────────────────────── */
.api-token-row {
  display: flex; align-items: center; gap: 10px;
  background: #f0f4f8; border-radius: 8px; padding: 12px 14px; margin: 10px 0;
}
.api-token-display {
  font-family: monospace; font-size: 12px; color: #003087;
  flex: 1; word-break: break-all;
}

/* ─── Admin user list scroll + edit form ────────────────────────────────────── */
.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.admin-user-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.admin-user-row {
  background: white;
  border-radius: 0;
  border: none;
  border-bottom: none;
}
.admin-edit-form {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 14px;
}
