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

/* ─── Role-based visibility ─────────────────────────────────────── */
/* Viewer: hide search launch, delete, dashboard, scheduled log */
body[data-role="viewer"] .yield-admin,
body[data-role="viewer"] .admin-only,
body[data-role="viewer"] .btn-card-delete { display: none !important; }
/* Yield: hide admin-only (delete, scheduled log, most settings) */
body[data-role="yield"] .admin-only,
body[data-role="yield"] .btn-card-delete { display: none !important; }
/* QA elements: only visible to super admin */
body:not([data-super-admin="true"]) .qa-sampled { background: none !important; }
body:not([data-super-admin="true"]) .qa-accent-left { border-left: none !important; }
body:not([data-super-admin="true"]) .qa-icon-cell::before { display: none !important; }
body:not([data-super-admin="true"]) .qa-summary-bar { display: none !important; }
body:not([data-super-admin="true"]) .qa-floating-next { display: none !important; }
body:not([data-super-admin="true"]) .mapped-qa-click { cursor: default !important; }

/* ─── Variables ─────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:        #EEF0F4;   /* page background — cool light grey */
  --bg-surface:#FFFFFF;   /* cards, tables, modals */
  --bg2:       #F4F5F8;   /* subtle inset / form fields */
  --bg3:       #E8EAF0;   /* even subtler / table th */

  /* Borders */
  --border:    #DDE0E8;
  --border-md: #B8BCCC;

  /* Dark elements (header bar, date-section titles, section-sep strips) */
  --dark:      #0F1117;
  --dark-2:    #1C2033;

  /* Gold */
  --gold:      #C8820A;
  --gold-lt:   #E09B1A;
  --gold-pale: #FFF8E7;
  --gold-border:#E8C06A;

  /* Semantic colours */
  --text:      #111827;
  --text-dim:  #6B7280;
  --text-lt:   #9CA3AF;
  --green:     #15803D;
  --green-bg:  #F0FDF4;
  --red:       #DC2626;
  --red-bg:    #FEF2F2;
  --amber:     #B45309;
  --amber-bg:  #FFFBEB;
  --blue:      #1D4ED8;
  --blue-bg:   #EFF6FF;

  /* Shape */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 14px rgba(0,0,0,.09), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.07);

  /* Typography */
  --font:      'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Notes sidebar */
  --notes-w: 300px;
}

/* ─── Base ──────────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-lt); text-decoration: underline; }

/* ─── App shell ─────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* ─── Header ────────────────────────────────────────────────────── */
header {
  background: var(--dark);
  border-bottom: 3px solid var(--gold);
  padding: 0 calc(36px + var(--notes-w)) 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.logo-stay { color: #22c55e; }
.logo-ahead { color: #ffffff; }
.logo-arrow {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}
.logo-arrow svg { width: 14px; height: 14px; }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-actions { display: flex; gap: 0; align-items: center; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  cursor: pointer; border: 2px solid transparent;
  transition: all .14s; white-space: nowrap;
  font-family: var(--font); letter-spacing: .01em;
  text-transform: uppercase; font-size: 12px;
}
.btn-primary {
  background: var(--gold); color: #fff;
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-lt); border-color: var(--gold-lt); }

/* Primary on dark header */
header .btn-primary {
  background: var(--gold); color: #fff; border-color: var(--gold);
  box-shadow: none;
}
header .btn-primary:hover { background: var(--gold-lt); border-color: var(--gold-lt); }

.btn-secondary {
  background: var(--bg-surface); color: var(--text);
  border-color: var(--border-md);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  background: transparent; color: var(--text-dim);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-md); color: var(--text); background: var(--bg3); }

/* Ghost on dark header */
header .btn-ghost {
  color: rgba(255,255,255,.65); border-color: rgba(255,255,255,.2);
  background: transparent;
}
header .btn-ghost:hover {
  color: #fff; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08);
}

.btn-danger {
  background: transparent; color: var(--red);
  border-color: #fecaca; text-transform: none;
}
.btn-danger:hover { background: var(--red-bg); border-color: #fca5a5; }

.btn-outline-red {
  background: transparent; color: var(--red);
  border: 1.5px solid var(--red); font-weight: 600;
}
.btn-outline-red:hover { background: rgba(239,68,68,.08); }

.btn-outline-amber {
  background: transparent; color: #b45309;
  border: 1.5px solid #b45309; font-weight: 600;
}
.btn-outline-amber:hover { background: rgba(180,83,9,.08); }

.btn-sm  { padding: 5px 12px; font-size: 11px; }
.btn-icon{ padding: 5px 8px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Header action buttons — colorful solid trio */
.header-actions { gap: 10px !important; }
.btn-act {
  padding: 8px 18px; font-size: 11.5px; font-weight: 700;
  border-radius: 8px; letter-spacing: .03em;
  text-transform: uppercase; border: none; color: #fff;
  transition: all .15s; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.btn-act-green {
  background: #15803d;
}
.btn-act-green:hover {
  background: #22c55e;
  box-shadow: 0 2px 12px rgba(21,128,61,.45);
}
.btn-act-yellow {
  background: #eab308; color: #422006;
}
.btn-act-yellow:hover {
  background: #facc15;
  box-shadow: 0 2px 12px rgba(234,179,8,.45);
}
.btn-act-pink {
  background: #be185d;
}
.btn-act-pink:hover {
  background: #db2777;
  box-shadow: 0 2px 12px rgba(190,24,93,.45);
}
.btn-act-red {
  background: #b91c1c;
}
.btn-act-red:hover {
  background: #dc2626;
  box-shadow: 0 2px 12px rgba(185,28,28,.45);
}

/* ─── Main ──────────────────────────────────────────────────────── */
main { flex: 1; padding: 36px calc(36px + var(--notes-w)) 72px 36px; max-width: 1440px; margin: 0 auto; width: 100%; }

/* ─── Pages ─────────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ─── Section title ─────────────────────────────────────────────── */
.section-title {
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
  text-transform: uppercase; letter-spacing: .12em;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── Search cards ──────────────────────────────────────────────── */
.searches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.searches-card-view { }

.search-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-left: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .12s;
}
.search-card:hover {
  background: var(--bg2);
}

.search-card .card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.card-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.card-badges .status-badge,
.card-badges .sug-card-badge { padding: 3px 6px; letter-spacing: .05em; }
.card-date { font-size: 11px; color: var(--text-lt); letter-spacing: .04em; }
.card-hotel { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.card-dates { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.card-competitors { font-size: 12px; color: var(--text-lt); }
.card-room-type { font-size: 12px; color: var(--text-dim); margin-bottom: 2px; }
.card-meta-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.card-meta-label {
  font-size: 10px; font-weight: 700; color: var(--text-lt);
  text-transform: uppercase; letter-spacing: .06em;
  min-width: 58px; flex-shrink: 0;
}
.card-meta-value { font-size: 12px; color: var(--text-dim); }
.card-meta-value-lg { font-size: 14px; font-weight: 700; color: var(--text); }
.card-recs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; }

/* ─── Card frame variants (badges only, no border changes) ───────── */
.search-card.card-frame-cancelled,
.search-card.card-frame-running,
.search-card.card-frame-adjust { }

/* ─── Full-width older searches divider ─────────────────────────── */
.card-older-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0;
}
.card-older-divider::before,
.card-older-divider::after {
  content: ""; flex: 1; height: 2px; background: var(--red);
}
.card-older-divider span {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--red); white-space: nowrap;
}

.btn-card-delete {
  background: none; border: none; cursor: pointer;
  color: var(--text-lt); font-size: 14px; line-height: 1;
  padding: 2px 6px; border-radius: 4px; transition: all .12s;
}
.btn-card-delete:hover { background: var(--red-bg); color: var(--red); }

/* ─── Booking.com score badge ────────────────────────────────────── */
.bcom-score {
  display: inline-flex; align-items: center; justify-content: center;
  background: #003580;            /* booking.com brand blue */
  color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 28px; height: 22px; padding: 0 5px;
  border-radius: 4px 4px 4px 0;  /* square top-right, rounded bottom-left like bcom */
  margin-left: 7px;
  letter-spacing: .02em;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}
/* In table headers (list view) the score sits below the name */
th .bcom-score { display: block; margin: 3px auto 0; width: fit-content; font-size: 10px; }

/* ─── OCC badge ─────────────────────────────────────────────────── */
.occ-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: var(--radius-sm); margin-left: 10px;
  letter-spacing: .03em;
}
.occ-val  { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.occ-high { background: #fef9c3; color: #713f12; border: 1px solid #fde047; }
.occ-na   { background: var(--bg3); color: var(--text-lt); border: 1px solid var(--border); }
.occ-stale { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }

/* OCC badge in list table */
.list-occ-cell {
  font-size: 11px; font-weight: 700; text-align: center; vertical-align: middle;
}
.list-occ-cell .occ-badge,
.list-occ-cell .demand-badge { display: block; margin: 2px auto; white-space: nowrap; }

/* ─── Calendar ───────────────────────────────────────────────────── */
.searches-calendar {
  display: block;
  width: 100%;
}
.cal-toolbar {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-month-label {
  font-size: 18px; font-weight: 800; min-width: 160px; text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 700;
  color: var(--text-lt); text-transform: uppercase; letter-spacing: .07em;
  padding: 6px 0;
}
.cal-day {
  min-height: 120px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.cal-day.cal-empty {
  background: var(--bg2);
  border-color: transparent;
  box-shadow: none;
}
.cal-day.cal-today {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.cal-day-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 6px;
}
.cal-day-num {
  font-size: 13px; font-weight: 700; color: var(--text-dim);
}
.cal-day.cal-today .cal-day-num { color: var(--gold); }
.cal-occ {
  font-size: 10px; font-weight: 700; padding: 2px 5px;
  border-radius: var(--radius-sm); margin-bottom: 4px;
  text-align: center; letter-spacing: .03em;
}
.cal-occ.occ-val  { background: #dcfce7; color: #166534; }
.cal-occ.occ-high { background: #fef9c3; color: #713f12; }
.cal-occ.occ-na   { background: var(--bg3); color: var(--text-lt); font-size: 9px; }

/* Calendar KPI metrics row (OCC / ADR / RevPAR) */
.cal-kpi-row {
  display: flex; flex-direction: column; gap: 2px; margin-top: 4px;
}
.cal-kpi {
  font-size: 9px; font-weight: 600; letter-spacing: .02em;
  display: flex; justify-content: space-between; align-items: baseline;
  line-height: 1.3;
}
.cal-kpi-label { color: var(--text-lt); text-transform: uppercase; font-size: 8px; letter-spacing: .05em; }
.cal-kpi-value { font-family: var(--font-mono); color: var(--text); }
.cal-kpi-na    { font-family: var(--font-mono); color: var(--text-lt); }

/* Calendar strategy badge */
.cal-strategy {
  font-size: 9px; font-weight: 700; padding: 3px 0;
  border-radius: var(--radius-sm); margin-top: auto;
  text-align: center; cursor: pointer; user-select: none;
  letter-spacing: .03em; width: 100%;
}
.cal-strategy:hover { filter: brightness(0.9); }
.cal-strategy-passive    { background: #e5e7eb; color: #374151; }
.cal-strategy-aggressive { background: #fee2e2; color: #991b1b; }
.cal-strategy-dismissive { background: #ede9fe; color: #5b21b6; }
.cal-strategy-past { opacity: 0.45; cursor: default; pointer-events: none; }

/* ─── Strategy section cards ───────────────────────────────────── */
.strat-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-surface);
}
.strat-card-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 12px;
}

/* Factor toggle rows */
.factor-list { display: flex; flex-direction: column; gap: 8px; }
.factor-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}
.factor-row.factor-disabled { opacity: .5; }
.factor-info { flex: 1; min-width: 0; }
.factor-label { font-size: 13px; font-weight: 600; color: var(--text); }
.factor-desc  { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.factor-soon  { font-size: 10px; color: var(--amber); font-weight: 400; margin-left: 6px; }

.factor-toggle {
  position: relative; width: 52px; height: 26px;
  border-radius: 13px; border: none; cursor: pointer;
  transition: background .2s;
  flex-shrink: 0; margin-left: 12px;
  display: flex; align-items: center;
}
.factor-toggle.factor-on  { background: var(--green); }
.factor-toggle.factor-off { background: var(--border-md); }
.factor-toggle[disabled]  { cursor: not-allowed; }
.factor-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%; background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.factor-toggle.factor-on .factor-toggle-knob { transform: translateX(26px); }
.factor-toggle-text {
  font-size: 9px; font-weight: 700; letter-spacing: .05em;
  color: #fff; width: 100%; text-align: center;
  pointer-events: none;
}

/* ─── Status badges ─────────────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase; letter-spacing: .07em;
}
.status-running   { background: var(--blue-bg);  color: var(--blue);  border: 1px solid #bfdbfe; }
.status-completed { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }
.status-feedback  { background: var(--amber-bg); color: var(--amber); border: 1px solid #fde68a; }
.status-error     { background: var(--red-bg);   color: var(--red);   border: 1px solid #fecaca; }
.status-cancelled { background: var(--bg3);      color: var(--text-dim); border: 1px solid var(--border); }
.status-paused    { background: #fef3c7;         color: #92400e;        border: 1px solid #fde68a; }
.status-queued    { background: #ede9fe;         color: #5b21b6;        border: 1px solid #c4b5fd; }

.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ─── Empty state ───────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px;
  grid-column: 1 / -1; color: var(--text-dim);
}
.empty-state .icon { font-size: 40px; margin-bottom: 14px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ─── Modal overlay ─────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,17,23,.6); backdrop-filter: blur(3px);
  z-index: 200;
  align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 40px 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 680px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .16s ease;
}
@keyframes slideIn { from{transform:translateY(-12px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.1px; }
.modal-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 18px; cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: var(--radius-sm); transition: all .12s;
}
.modal-close:hover { background: var(--bg3); color: var(--text); }
.modal-body { padding: 24px; max-height: 65vh; overflow-y: auto; }
.modal-footer {
  padding: 14px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--bg2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-section { margin-bottom: 24px; }
.form-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-dim);
  margin-bottom: 12px; border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

input[type="text"], input[type="url"], input[type="date"], select {
  width: 100%; background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); padding: 8px 11px; font-size: 13px;
  outline: none; transition: border-color .14s, box-shadow .14s;
  font-family: var(--font);
}
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,130,10,.12);
  background: var(--bg-surface);
}
input::placeholder { color: var(--text-lt); }
select option { background: var(--bg-surface); }

.competitor-row {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
.competitor-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.competitor-number { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }
.competitor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.competitor-fields .url-field { grid-column: 1 / -1; }
.competitor-actions { margin-top: 10px; display: flex; gap: 6px; }

.date-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.date-row input { flex: 1; }

/* date mode toggle */
.date-mode-toggle { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.date-mode-btn {
  padding: 4px 12px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  transition: background .15s, color .15s;
}
.date-mode-btn.active { background: var(--accent); color: #fff; }
.date-mode-btn:not(.active):hover { background: var(--surface2); color: var(--text); }

/* range picker */
.range-options { display: flex; gap: 8px; margin-bottom: 10px; }
.range-btn {
  padding: 6px 18px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-dim); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.range-btn.active {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.range-btn:not(.active):hover { border-color: var(--text-dim); color: var(--text); }
.range-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* toggle */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toggle-label { font-size: 13px; font-weight: 700; }
.toggle-desc  { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border); border-radius: 24px; transition: .2s;
}
.slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: #fff;
  border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
input:checked + .slider { background: var(--gold); }
input:checked + .slider::before { transform: translateX(18px); }

/* ─── Primary hotel chips ───────────────────────────────────────── */
.own-hotel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.own-hotel-chip {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 10px; cursor: pointer; text-align: center;
  font-size: 12px; font-weight: 700; color: var(--text-dim);
  transition: all .14s; user-select: none;
  box-shadow: var(--shadow-sm); letter-spacing: .01em;
}
.own-hotel-chip:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-pale); }
.own-hotel-chip.selected {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(200,130,10,.14);
}

/* ─── Saved hotel groups (benchmark-grouped) ────────────────────── */
.saved-hotel-groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.sh-group-unassigned {
  grid-column: 1 / -1;   /* spans all columns */
}
.sh-group-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--sh-color, var(--text-dim));
  padding-bottom: 5px;
  border-bottom: 2px solid var(--sh-color, var(--border));
  margin-bottom: 5px;
  text-align: center;
}
.sh-group-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 36px;
  border-radius: 8px;
  padding: 3px;
  transition: background .12s, outline .12s;
}
.sh-group-body.drag-over {
  background: rgba(0,0,0,.04);
  outline: 2px dashed var(--border);
  outline-offset: 1px;
}
.sh-empty {
  font-size: 10px;
  color: var(--text-lt);
  text-align: center;
  padding: 7px 0;
  font-style: italic;
  border: 1.5px dashed var(--border);
  border-radius: 6px;
}

/* ─── Saved hotel pill ──────────────────────────────────────────── */
.saved-pill {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 7px;
  font-size: 11px; cursor: grab; color: var(--text-dim);
  transition: all .12s; font-weight: 600;
  user-select: none;
}
.saved-pill:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-pale); }
.saved-pill.dragging { opacity: 0.35; cursor: grabbing; }
.saved-pill-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-delete {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  font-size: 9px; font-weight: 800; line-height: 1;
  color: var(--text-dim); background: var(--bg3);
  cursor: pointer; transition: all .12s; flex-shrink: 0;
}
.pill-delete:hover { background: var(--red); color: #fff; }
.chip-edit {
  display: inline-block; margin-left: 5px;
  font-size: 11px; opacity: .5; cursor: pointer; vertical-align: middle;
  transition: opacity .12s;
}
.own-hotel-chip:hover .chip-edit { opacity: 1; }

/* ─── Progress ──────────────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--bg3); border-radius: 2px; height: 6px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--gold); border-radius: 2px; transition: width .4s;
}
.progress-text { font-size: 12px; color: var(--text-dim); }

/* ─── Results ───────────────────────────────────────────────────── */
.results-header { margin-bottom: 28px; }
.results-meta { font-size: 13px; color: var(--text-dim); margin-top: 6px; }

/* ─── Family rate block ─────────────────────────────────────────── */
.family-rate-block {
  margin-bottom: 12px;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  overflow: hidden;
}
.family-rate-header {
  background: color-mix(in srgb, var(--gold) 10%, var(--bg2));
  padding: 10px 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.family-rate-title {
  font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase;
  letter-spacing: .07em;
}
.family-rate-sub {
  font-size: 12px; color: var(--text-dim);
}
.family-rate-table { border-top: 1.5px solid var(--gold-lt, #e4bb6a); }
.family-own-row td { background: color-mix(in srgb, var(--gold) 5%, var(--bg-surface)); }
.family-price {
  font-size: 15px; font-weight: 700; color: var(--gold);
}
.family-type-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 20px;
}
.family-type-badge.single {
  background: #dcfce7; color: #166534;
}
.family-type-badge.multi {
  background: #fef9c3; color: #92400e;
}
.family-na {
  font-size: 11px; color: var(--text-dim); font-style: italic;
}
body.dark .family-type-badge.single { background: #14532d; color: #86efac; }
body.dark .family-type-badge.multi  { background: #78350f; color: #fde68a; }

.date-section { margin-bottom: 36px; }
.date-section-title {
  font-size: 11px; font-weight: 700; padding: 10px 18px;
  background: var(--dark); color: rgba(255,255,255,.9);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: .1em;
}

.results-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
}

table { width: 100%; border-collapse: collapse; background: var(--bg-surface); }

th {
  background: var(--bg3); text-align: left; padding: 9px 16px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim);
  border-bottom: 1.5px solid var(--border); white-space: nowrap;
  font-family: var(--font);
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
tr:last-child td { border-bottom: none; }

tr.own-row { background: var(--gold-pale); }
tr.own-row td:first-child { border-left: 4px solid var(--gold); padding-left: 12px; }
tr.own-row:hover { background: #FDEFC3; }
tr.comp-row:hover { background: var(--bg2); }

tr.section-sep td {
  background: var(--dark-2);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.55); padding: 5px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ─── Benchmark badges ──────────────────────────────────────────── */
.bench {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  font-family: var(--font);
}
.bench-High    { background: var(--red-bg);   color: var(--red);   border: 1px solid #fecaca; }
.bench-Low     { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }
.bench-Similar { background: var(--blue-bg);  color: var(--blue);  border: 1px solid #bfdbfe; }
.bench-Info    { background: var(--bg3);      color: var(--text-dim); border: 1px solid var(--border); }
.bench-Own     { background: var(--gold-pale); color: var(--gold); border: 1px solid var(--gold-border); }

/* ─── Recommendation badges ─────────────────────────────────────── */
.rec {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
}
.rec-MAINTAIN { background: var(--green-bg); color: var(--green); border: 1px solid #86efac; }
.rec-INCREASE { background: var(--amber-bg); color: var(--amber); border: 1px solid #fde68a; }
.rec-DECREASE { background: var(--red-bg);   color: var(--red);   border: 1px solid #fca5a5; }

/* ─── Price cell ────────────────────────────────────────────────── */
.price-cell { white-space: nowrap; }
.price-val {
  font-weight: 600; font-size: 15px; cursor: pointer; color: var(--text);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.price-val:hover { color: var(--gold); text-decoration: underline; }
.price-cancel { font-size: 11px; color: var(--text-dim); margin-left: 5px; font-family: var(--font); }
.price-cancel.nr { color: var(--red); font-weight: 700; }
.price-empty   { color: var(--text-lt); font-style: italic; font-size: 12px; }
.price-err     { color: var(--red); font-weight: 700; font-size: 12px; cursor: pointer; font-family: var(--font-mono); letter-spacing: .04em; }
.price-err:hover { text-decoration: underline; }
.price-na      { color: #92400e; font-weight: 600; font-size: 12px; cursor: pointer; font-family: var(--font-mono); letter-spacing: .04em; }
.price-na:hover { text-decoration: underline; }
.price-pending { color: var(--text-lt); font-size: 12px; }
.room-type-cell { font-size: 12px; max-width: 160px; white-space: normal; line-height: 1.4; }
.notes-cell { font-size: 12px; color: var(--text-dim); max-width: 220px; line-height: 1.45; }

/* ─── QA Screenshot modal ───────────────────────────────────────── */
.qa-modal { max-width: 900px; }
.qa-img-wrap {
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1.5px solid var(--border); margin-bottom: 16px;
}
.qa-img-wrap img { display: block; width: 100%; cursor: zoom-in; }

/* ─── Screenshot lightbox ───────────────────────────────────────── */
.screenshot-lightbox {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.88); overflow-y: auto;
  padding: 40px 24px;
}
.screenshot-lightbox.open { display: block; }
.screenshot-lightbox img {
  display: block; margin: 0 auto;
  max-width: 100%; height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
  position: fixed; top: 14px; right: 18px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 20px; line-height: 1;
  padding: 4px 10px; border-radius: var(--radius-sm);
  cursor: pointer; z-index: 401;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

.qa-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa-detail {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.qa-detail-label { font-size: 10px; color: var(--text-lt); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 3px; font-weight: 700; }
.qa-detail-value { font-size: 14px; font-weight: 700; color: var(--text); font-family: var(--font-mono); }

/* ─── Misc utilities ────────────────────────────────────────────── */
.text-dim { color: var(--text-dim); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* ─── Spinner ───────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--gold);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Feedback column ───────────────────────────────────────────── */
.feedback-cell { padding: 7px 14px; }
.feedback-row  { display: flex; align-items: center; gap: 5px; }

.feedback-input {
  flex: 1; min-width: 0; padding: 5px 8px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; background: var(--bg2); color: var(--text);
  font-family: var(--font); transition: border-color .14s;
}
.feedback-input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(200,130,10,.1); }
.feedback-input[readonly] { color: var(--text-dim); cursor: default; background: var(--bg3); border-color: var(--border); }

.feedback-send-btn {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gold);
  background: var(--gold-pale); color: var(--gold);
  cursor: pointer; transition: background .12s, color .12s, transform .08s;
  padding: 0;
}
.feedback-send-btn:hover:not(:disabled) { background: var(--gold); color: #fff; }
.feedback-send-btn:active:not(:disabled) { transform: scale(.88); }
.feedback-send-btn.sent {
  border-color: var(--green); background: var(--green-bg); color: var(--green); cursor: default;
}
.feedback-send-btn:disabled:not(.sent) { opacity: 0.45; cursor: not-allowed; }

/* ─── Sparkle burst ─────────────────────────────────────────────── */
.sparkle-dot {
  position: fixed; width: 5px; height: 5px; border-radius: 50%;
  pointer-events: none; z-index: 9999; transform: translate(-50%,-50%);
  animation: sparkle-burst .55s ease-out forwards;
}
@keyframes sparkle-burst {
  0%   { transform: translate(-50%,-50%) rotate(var(--a)) translateX(0px)  scale(1.2); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(-50%,-50%) rotate(var(--a)) translateX(22px) scale(0);   opacity: 0; }
}

.feedback-footer {
  display: flex; align-items: center; gap: 14px;
  margin-top: 20px; padding: 14px 18px;
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* ─── Feedback report (inline + home page) ──────────────────────── */
.feedback-report-inline {
  margin-top: 28px; padding: 22px;
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.feedback-report-inline h3 {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim);
  margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.feedback-report-inline h3:first-child { margin-top: 0; }

.feedback-all-good {
  color: var(--green); font-weight: 600; font-size: 13px;
  padding: 12px 16px; background: var(--green-bg);
  border: 1px solid #bbf7d0; border-radius: var(--radius-sm);
}
.feedback-banner-warn {
  background: var(--amber-bg); border: 1px solid #fde68a;
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px;
  color: var(--amber); font-size: 12px; font-weight: 600;
}

.feedback-issue {
  padding: 11px 14px; margin-bottom: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.feedback-issue.possibly-wrong { border-color: #fde68a; background: var(--amber-bg); }
.feedback-issue-hotel { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.feedback-issue-desc  { font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.feedback-issue-warning {
  margin-top: 8px; font-size: 12px; color: var(--amber);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.feedback-suggestion {
  padding: 12px 14px; margin-bottom: 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.severity-high   { background: var(--red-bg);   border-color: #fecaca; }
.severity-medium { background: var(--amber-bg); border-color: #fde68a; }
.severity-low    { background: var(--bg2);      border-color: var(--border); }
.severity-info   { background: var(--green-bg); border-color: #bbf7d0; }
.feedback-suggestion-title  { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.feedback-suggestion-prompt {
  font-size: 12px; color: var(--text-dim); line-height: 1.6;
  margin-bottom: 8px; white-space: pre-wrap;
}

/* Home page feedback report cards */
.feedback-report-card {
  background: var(--bg-surface); border: 1.5px solid var(--gold);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.feedback-report-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 13px;
}

/* ─── Section header (title + view toggle) ──────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-header .section-title { margin-bottom: 0; flex: 1; }

/* ─── View toggle ───────────────────────────────────────────────── */
.view-toggle {
  display: flex; align-items: center;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.view-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 13px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; border-radius: 7px;
  background: transparent; color: var(--text-dim);
  transition: background .15s, color .15s, box-shadow .15s;
  font-family: var(--font); letter-spacing: 0; text-transform: none;
  white-space: nowrap; line-height: 1;
}
.view-toggle-btn svg { flex-shrink: 0; }
.view-toggle-btn:hover { color: var(--text); background: rgba(0,0,0,.06); }
.view-toggle-btn.active {
  background: var(--bg-surface); color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
}

/* ─── List view ─────────────────────────────────────────────────── */
.searches-list { display: flex; flex-direction: column; gap: 12px; }

.list-group {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-top-color .15s, box-shadow .15s;
  overflow: hidden;
}
.list-group:hover { border-top-color: var(--gold); box-shadow: var(--shadow); }

.list-group-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.list-group-hotel { font-size: 14px; font-weight: 800; color: var(--text); flex: 1; }
.list-group-ts    { font-size: 11px; color: var(--text-lt); white-space: nowrap; }
.list-past-count  { color: var(--text-lt); font-weight: 400; }

/* ── Historical data bar ── */
.list-historical-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 14px;
}
.list-historical-btn {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 5px 13px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color .14s, color .14s, background .14s;
}
.list-historical-btn:hover,
.list-historical-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}
.list-historical-hint {
  font-size: 11px;
  color: var(--text-lt);
}

.list-table-wrap { overflow-x: auto; }

.list-price-table { width: 100%; border-collapse: collapse; background: var(--bg-surface); }
.list-price-table th {
  background: var(--bg3); text-align: center; padding: 7px 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim);
  border-bottom: 1.5px solid var(--border); white-space: nowrap;
  font-family: var(--font);
}
.list-price-table th:first-child { text-align: left; }
.list-price-table td {
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.list-price-table tr:last-child td { border-bottom: none; }
.list-price-table tr:hover td { background: var(--bg2); }

/* ─── List view cells ────────────────────────────────────────────── */
.list-date-cell-td { white-space: nowrap; padding-right: 20px; }
.list-date-main    { font-size: 13px; font-weight: 600; color: var(--text); }
.list-date-sub     { font-size: 10px; color: var(--text-lt); margin-top: 2px; }
.list-history-btn  {
  display: inline-block; margin-top: 5px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 10px; font-weight: 700; font-family: var(--font);
  color: var(--blue); letter-spacing: .03em;
}
.list-history-btn:hover { text-decoration: underline; }

.list-comp-cell      { white-space: nowrap; vertical-align: top; padding-top: 10px; max-width: 110px; }
.list-comp-name      { font-size: 9px; font-weight: 700; color: var(--text-lt);
                       text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px;
                       max-width: 82px; overflow: hidden; text-overflow: ellipsis; }
.list-comp-price     { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

.list-rec-td         { white-space: nowrap; vertical-align: top; padding-top: 10px; }
.list-rec-wrap       { display: inline-flex; flex-direction: column; gap: 6px; align-items: stretch; }
.list-rec-wrap .rec  { justify-content: center; }
.list-rec-btns       { display: flex; gap: 4px; }

.list-refresh-td     { text-align: right; width: 44px; vertical-align: middle; }
.list-refresh-btn    {
  background: none; border: 1.5px solid var(--border); border-radius: 6px;
  color: var(--text-lt); font-size: 16px; line-height: 1;
  padding: 4px 9px; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.list-refresh-btn:hover { background: var(--blue-bg); color: var(--blue); border-color: #bfdbfe; }

.list-row-refreshing   { opacity: 0.35; pointer-events: none; }
.list-history-row td   { background: var(--bg2); }

.list-price-cell { white-space: nowrap; font-family: var(--font-mono); font-size: 14px; font-weight: 600; vertical-align: top; padding-top: 10px; }

/* ─── List view: quality group columns ──────────────────────────── */
.list-quality-cell {
  white-space: nowrap; font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  vertical-align: top; padding-top: 10px; text-align: center; min-width: 80px;
}
.list-comp-range      { font-weight: 400; }
.list-comp-range-text { color: var(--text-lt); font-size: 12px; }
.list-mapped-similar td { border-bottom: 2px solid var(--border); }

/* ─── List view: three-line quality cells (Option A redesign) ──── */
.list-q3-cell {
  padding: 6px 10px;
  min-width: 115px;
  text-align: center;
  vertical-align: middle;
}
.list-q3-line {
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  text-align: center; line-height: 1.6;
}
.list-q3-label {
  font-size: 10px; font-family: var(--font); line-height: 1.6;
}
.list-q3-rec-maintain  { color: var(--green); }
.list-q3-rec-increase  { color: var(--amber); }
.list-q3-rec-decrease  { color: var(--red); }
.list-q3-na { color: var(--text-lt); text-align: center; padding: 8px 10px; font-size: 12px; vertical-align: middle; }

/* Label column between date and quality groups */
.list-label-col {
  vertical-align: middle; padding: 6px 8px; white-space: nowrap; width: 85px;
  border-left: 2px solid var(--red);
}
.list-label-line {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-dim); line-height: 1.6; font-family: var(--font);
}

/* Strategy button in list view */
.list-strat-td { text-align: center; vertical-align: middle; white-space: nowrap; }
.list-strat-btn {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 4px; border: 1.5px solid var(--border);
  cursor: pointer; font-family: var(--font); background: var(--bg-surface); color: var(--text-dim);
}
.list-strat-passive    { }
.list-strat-aggressive { border-color: var(--red); color: var(--red); }
.list-strat-dismissive { border-color: #7C3AED; color: #7C3AED; }

/* History expand indicator on rows */
.list-date-row.list-has-history { cursor: pointer; }
.list-date-row.list-has-history .list-date-cell-td::after {
  content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid var(--text-lt); vertical-align: middle;
}
.list-date-row.list-has-history.list-expanded .list-date-cell-td::after {
  border-top: none; border-bottom: 4px solid var(--text-lt);
}

/* Unmapped manual search spanning cell */
.list-unmapped-cell {
  text-align: center; padding-top: 10px; vertical-align: top;
  font-family: var(--font); font-size: 13px;
}
.list-unmapped-room  { color: var(--text-lt); margin-right: 6px; }
.list-unmapped-price { font-family: var(--font-mono); font-weight: 600; margin-right: 6px; }
.list-unmapped-tag   {
  display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 1px 5px; border-radius: 3px;
  background: var(--bg2); color: var(--text-lt); border: 1px solid var(--border);
}

/* Price verification colours */
.lp-verified   { color: var(--text); }
.lp-unverified { color: var(--text-dim); }
.lp-issue      { color: var(--red); font-weight: 700; }

/* ─── List view: price-with-note tooltip ────────────────────────── */
.lp-note-wrap { display: inline-block; }
.lp-has-note {
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 3px;
  cursor: help;
}

/* Global fixed-position balloon — appended to <body> via JS,
   position:fixed so it escapes any overflow:auto parent */
.global-note-balloon {
  position: fixed;
  z-index: 9999;
  display: none;
  background: #FFF0F6;
  color: #9D174D;
  border: 1.5px solid #F9A8D4;
  font-size: 11px;
  font-family: var(--font);
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 10px;
  max-width: 240px;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(157,23,77,.18), 0 2px 6px rgba(157,23,77,.1);
  white-space: pre-wrap;
  word-break: break-word;
}
/* Arrow: ::before draws border-colour triangle, ::after draws fill-colour on top */
.global-note-balloon::before {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #F9A8D4;
}
.global-note-balloon::after {
  content: '';
  position: absolute;
  top: calc(100% - 1px); left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #FFF0F6;
}

/* ─── Hotel columns (card view) ─────────────────────────────────── */
.searches-hotel-columns {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 10px;
}
.hotel-column {
  flex: 1 0 230px;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hotel-column-header {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  padding: 9px 14px;
  background: var(--dark);
  color: rgba(255,255,255,.85);
  border-radius: var(--radius-sm);
  text-align: center;
  border-bottom: 2px solid var(--gold);
  /* Not sticky — avoids covering the first card when scrolled */
  margin-bottom: 4px;
}
.hotel-col-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 11px; color: var(--text-lt); font-style: italic;
  background: var(--bg-surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ─── Scheduled search log ────────────────────────────────────────── */
.sched-log-list { display: flex; flex-direction: column; gap: 2px; }
.sched-log-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-surface); border: 1.5px solid var(--border);
  transition: border-color .12s, background .12s;
}
.sched-log-row:hover { border-color: var(--gold); background: var(--bg3); }
.sched-log-date { font-size: 12px; color: var(--text-dim); min-width: 130px; }
.sched-log-hotel { font-size: 12px; font-weight: 600; min-width: 110px; }
.sched-log-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; min-width: 100px; }
.sched-log-arrival { font-size: 12px; flex: 1; }

/* ─── Hotel schedule cards ────────────────────────────────────────── */
.sched-hotel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.sched-hotel-card {
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.sched-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.sched-hotel-name { font-size: 13px; font-weight: 700; }
.sched-card-body { transition: opacity .15s; }
.sched-day-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg2);
  color: var(--text-dim); font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all .12s;
  display: inline-flex; align-items: center; justify-content: center;
}
.sched-day-btn.sched-day-on {
  background: var(--gold); color: #fff; border-color: var(--gold);
}
.sched-day-btn:hover { border-color: var(--gold); }
.sched-times-wrap { display: flex; flex-direction: column; }

/* ─── Sort select ────────────────────────────────────────────────── */
.sort-select {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  color: var(--text-dim);
  padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  height: 34px;
  transition: border-color .15s, color .15s;
  width: auto;
}
.sort-select:hover, .sort-select:focus {
  border-color: var(--gold); color: var(--text); outline: none;
  box-shadow: 0 0 0 3px rgba(200,130,10,.1);
}

.list-no-data { padding: 14px 16px; font-size: 12px; color: var(--text-dim); font-style: italic; }

/* ─── Rec cell layout (badge + IMPLTD/RJCTD row) ────────────────── */
.rec-action-cell       { display: inline-flex; flex-direction: column; gap: 5px; align-items: stretch; }
.rec-action-cell .rec  { justify-content: center; }
.rec-status-row        { display: flex; align-items: center; gap: 4px; }

/* ─── Suggestion status buttons (IMPLTD / RJCTD) ────────────────── */
.feedback-suggestion-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 5px;
}
.feedback-suggestion-header .feedback-suggestion-title { margin-bottom: 0; flex: 1; }
.sug-info-btn {
  flex-shrink: 0;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 10px; font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-style: italic; font-family: Georgia, serif;
  transition: background .12s, border-color .12s, color .12s;
  line-height: 1;
}
.sug-info-btn:hover { background: #FFF0F6; border-color: #F9A8D4; color: #9D174D; }

.sug-actions {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.sug-status-btns { display: flex; gap: 5px; }
.sug-status-btn {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--radius-sm); border: 1.5px solid;
  cursor: pointer; font-family: var(--font); transition: all .14s;
  background: transparent;
}
.sug-impl { border-color: var(--green); color: var(--green); }
.sug-impl:hover:not(:disabled) { background: var(--green-bg); }
.sug-impl.selected { background: var(--green); color: #fff; border-color: var(--green); }

.sug-rjct { border-color: var(--text-lt); color: var(--text-dim); }
.sug-rjct:hover:not(:disabled) { background: var(--bg3); border-color: var(--text-dim); }
.sug-rjct.selected { background: var(--text-dim); color: #fff; border-color: var(--text-dim); }

.sug-status-btn.dimmed { opacity: 0.28; }
.sug-status-btn:disabled { cursor: not-allowed; }

/* ─── Card view: suggestion action badges ────────────────────────── */
.sug-card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.sug-card-done   { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }
.sug-card-adjust { background: var(--amber-bg); color: var(--amber); border: 1px solid #fde68a; }

/* ─── Welcome Screen ────────────────────────────────────────────── */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.welcome-screen.dismissing {
  animation: welcomeDismiss .55s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes welcomeDismiss {
  to { opacity: 0; transform: scale(1.05); }
}

/* ── Background gradient + floating particles ── */
.welcome-bg-gradient {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 40%, #ecfdf5 70%, #f8fafc 100%);
}
.welcome-particles { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.welcome-particle {
  position: absolute; border-radius: 50%; opacity: 0;
  animation: wParticleFloat linear infinite;
}
@keyframes wParticleFloat {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* ── Text logo ── */
.welcome-text-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  margin-bottom: 8px;
}
.wl-stay { color: #22c55e; }
.wl-ahead { color: #1e293b; }
.wl-arrow { color: #22c55e; font-size: 24px; margin-left: 4px; }

/* ── Legacy (disabled) ── */
.welcome-floaters { display: none; }
.welcome-floater {
  position: absolute;
  bottom: -60px;
  user-select: none;
  will-change: transform, opacity;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0)      rotate(0deg);  }
  85%  { opacity: inherit; }
  100% { transform: translateY(-110vh) rotate(25deg); opacity: 0; }
}

/* ── Centre content ── */
.welcome-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  gap: 0;
}

/* ── Welcome logo image ── */
.welcome-logo {
  width: clamp(280px, 55vw, 600px);
  height: auto;
  margin-bottom: 10px;
}

/* ── Header logo image ── */
.header-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* ── Slogan (hidden — already part of the logo image) ── */
.welcome-slogan { display: none; }

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

/* ── Stats row ── */
/* ── Welcome carousel (right side) ── */
.welcome-carousel {
  position: fixed;
  right: 5vw;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp .6s ease .2s backwards;
  z-index: 2;
}
.welcome-carousel .settings-deco-svg {
  max-height: 320px;
  width: 100%;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.10));
}
.welcome-carousel.wc-fade .settings-deco-svg {
  animation: wcFadeIn .8s ease;
}
@keyframes wcFadeIn {
  0%   { opacity: 0; transform: scale(.92) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
/* Hide on narrow screens */
@media (max-width: 900px) {
  .welcome-carousel { display: none; }
}

.welcome-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp .7s ease .35s backwards;
}
.welcome-stat {
  background: #f8f9fb;
  border: 1.5px solid #e2e6ee;
  border-radius: 16px;
  padding: 22px 30px 18px;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.welcome-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.ws-impl { border-color: #bbf7d0; }
.ws-impl:hover { border-color: #15803d; }
.ws-wait { border-color: #fde68a; }
.ws-wait:hover { border-color: #b45309; }
.ws-rjct { border-color: #e2e6ee; }
.ws-rjct:hover { border-color: #9ca3af; }

.ws-icon  { font-size: 24px; line-height: 1; margin-bottom: 2px; }
.ws-num   {
  font-size: 46px; font-weight: 800; line-height: 1;
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: -.02em;
}
.ws-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
}

/* ── CTA button (now lives inside the login card) ── */
.welcome-btn {
  width: 100%;
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  letter-spacing: .04em;
  transition: background .14s, transform .14s, box-shadow .14s;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(21,128,61,.30);
}
.welcome-btn:hover {
  background: #166534;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21,128,61,.38);
}
.welcome-btn:active { transform: scale(.97); box-shadow: none; }

/* ── Hint line ── */
.welcome-hint {
  font-size: 11px;
  color: var(--text-lt);
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: fadeInUp .7s ease .55s backwards;
}

/* ── Login card ── */
.welcome-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
  margin: 0 auto 24px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 20px;
  padding: 26px 24px 22px;
  box-shadow: 0 8px 32px rgba(21,128,61,.12);
  animation: fadeInUp .7s ease .45s backwards;
}
.welcome-login-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #15803d;
  text-align: center;
  margin-bottom: 2px;
}
/* lp-note-wrap is inline-block by default — override to block inside login */
.welcome-input-group {
  display: block !important;
}
.welcome-input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #166534;
  margin-bottom: 5px;
}
.welcome-input {
  width: 100%;
  padding: 11px 14px;
  height: 44px;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
}
/* Strip native browser chrome ONLY from username so it renders
   with CSS like the password field's native look */
#wlUser {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 8px;
  border: 1.5px solid #bbf7d0;
  height: 44px;
  padding: 11px 14px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}
.welcome-input:focus {
  outline: none;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21,128,61,.15);
}
/* Suppress browser-injected credential / contact-fill icons */
.welcome-input::-webkit-credentials-auto-fill-button,
.welcome-input::-webkit-contacts-auto-fill-button,
.welcome-input::-webkit-caps-lock-indicator,
.welcome-input::-webkit-strong-password-auto-fill-button,
.welcome-input::-webkit-textfield-decoration-container {
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
}
/* Override browser autofill yellow/blue background */
.welcome-input:-webkit-autofill,
.welcome-input:-webkit-autofill:hover,
.welcome-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
  border: 1.5px solid #bbf7d0 !important;
  border-radius: 10px !important;
}
.welcome-input.shake {
  animation: inputShake .35s ease;
}
@keyframes inputShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.welcome-login-error {
  font-size: 12px;
  color: var(--red);
  text-align: center;
  font-weight: 600;
  margin-top: -4px;
}

/* ── Changelog (bottom-left) ── */
.welcome-changelog {
  position: absolute;
  bottom: 16px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  max-height: 35vh;
  overflow-y: auto;
  animation: fadeInUp .7s ease .8s backwards;
  scrollbar-width: thin;
  padding-right: 6px;
}
.welcome-changelog-block { display: flex; flex-direction: column; gap: 5px; }
.welcome-changelog-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-lt);
  margin-bottom: 2px;
}
.wc-ongoing { color: var(--amber); }

.welcome-changelog-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.welcome-changelog-list li {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.welcome-changelog-list li strong { color: var(--text); font-weight: 700; }

.cl-done {
  font-size: 10px;
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}
.cl-wip {
  font-size: 10px;
  color: var(--amber);
  font-weight: 700;
  flex-shrink: 0;
}
.cl-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #fde68a;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* ── Version badge (bottom-right) ── */
.welcome-version {
  margin-top: 24px;
  font-size: 10px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: .5px;
  font-family: var(--font-mono);
}

/* ─── Notes Ticker ───────────────────────────────────────────────── */
.notes-ticker {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 36px;
  background: #050d1a;
  border-top: 2px solid var(--gold);
  display: flex; align-items: stretch;
  z-index: 300;
  overflow: hidden;
  font-family: var(--font-mono);
}
.notes-ticker-label {
  flex-shrink: 0;
  background: var(--gold);
  color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  padding: 0 14px;
  display: flex; align-items: center;
  white-space: nowrap;
  border-right: 2px solid var(--gold-lt);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.notes-ticker-wrap {
  flex: 1; overflow: hidden; display: flex; align-items: center;
}
.notes-ticker-track {
  display: inline-flex; align-items: center;
  white-space: nowrap;
  animation: notes-ticker-scroll linear infinite;
  will-change: transform;
}
.notes-ticker-track:hover { animation-play-state: paused; cursor: default; }
@keyframes notes-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-sep {
  color: var(--gold); font-size: 11px; opacity: .55;
  padding: 0 10px;
  flex-shrink: 0;
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0 4px;
}
.ticker-hotel {
  font-size: 9px; font-weight: 700; letter-spacing: .1em;
  color: var(--gold); text-transform: uppercase;
  background: rgba(200,130,10,.15);
  padding: 1px 6px; border-radius: 2px;
  border: 1px solid rgba(200,130,10,.3);
  flex-shrink: 0;
}
.ticker-type-icon { font-size: 10px; opacity: .55; flex-shrink: 0; }
.ticker-text {
  font-size: 11px; color: #e2e8f0; letter-spacing: .015em;
}
.ticker-date {
  font-size: 9px; font-weight: 700; color: #94a3b8;
  letter-spacing: .06em; flex-shrink: 0;
}

/* ─── Demand Events Ticker ──────────────────────────────────────── */
.demand-ticker {
  position: fixed; bottom: 36px; left: 0; right: 0;
  height: 36px;
  background: #0a0520;
  border-top: 2px solid #7c3aed;
  display: flex; align-items: stretch;
  z-index: 300;
  overflow: hidden;
  font-family: var(--font-mono);
}
.demand-ticker-label {
  flex-shrink: 0;
  background: #7c3aed;
  color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  padding: 0 14px;
  display: flex; align-items: center;
  white-space: nowrap;
  border-right: 2px solid #a78bfa;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.demand-ticker-wrap {
  flex: 1; overflow: hidden; display: flex; align-items: center;
}
.demand-ticker-track {
  display: inline-flex; align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: demand-ticker-scroll linear infinite;
}
.demand-ticker-track:hover { animation-play-state: paused; cursor: default; }
@keyframes demand-ticker-scroll {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.dt-sep {
  color: #7c3aed; font-size: 11px; opacity: .55;
  padding: 0 10px;
  flex-shrink: 0;
}
.dt-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 4px;
}
.dt-flag { font-size: 12px; flex-shrink: 0; }
.dt-name {
  font-size: 11px; color: #e2e8f0; letter-spacing: .015em;
}
.dt-dates {
  font-size: 9px; font-weight: 700; color: #94a3b8;
  letter-spacing: .06em; flex-shrink: 0;
}
.dt-impact-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.dt-impact-high   { background: #ef4444; }
.dt-impact-medium { background: #3b82f6; }
.dt-impact-low    { background: #94a3b8; }

/* Stacking: demand ticker above notes ticker.
   Notes is always at bottom:0. Demand sits at bottom:36px when notes visible. */
.demand-ticker { bottom: 36px; }

/* ─── Demand Event Badges ──────────────────────────────────────── */
.demand-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: var(--radius-sm); margin-left: 6px;
  letter-spacing: .02em; white-space: nowrap;
}
.demand-badge-high {
  background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
}
.demand-badge-medium {
  background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd;
}
.demand-badge-low {
  background: var(--bg3); color: var(--text-lt); border: 1px solid var(--border);
}
body.dark .demand-badge-high {
  background: #451a03; color: #fcd34d; border-color: #92400e;
}
body.dark .demand-badge-medium {
  background: #172554; color: #93c5fd; border-color: #1e40af;
}

/* ─── Demand Events Settings ───────────────────────────────────── */
.de-timeline-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.de-timeline-label {
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.de-timeline {
  position: relative; height: 24px;
  background: var(--bg3); border-radius: 4px; overflow: hidden;
}
.de-timeline-today {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--gold); z-index: 2;
}
.de-timeline-bar {
  position: absolute; top: 3px; height: 18px;
  border-radius: 3px; opacity: 0.7;
  cursor: default;
}
.de-timeline-bar:hover { opacity: 1; }
.de-timeline-legend {
  display: flex; gap: 14px; margin-top: 8px; font-size: 11px; color: var(--text-dim);
}
.de-legend-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 4px; vertical-align: middle;
}

.de-country-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.de-country-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); background: var(--bg2);
  cursor: pointer; transition: all .15s;
  font-family: inherit; color: var(--text-dim);
}
.de-country-card:hover { border-color: var(--border-md); }
.de-country-card.de-country-on {
  border-color: #7c3aed; background: rgba(124,58,237,.08);
  color: var(--text);
}
.de-country-flag { font-size: 22px; }
.de-country-name { font-size: 12px; font-weight: 600; }
.de-country-count { font-size: 10px; color: var(--text-dim); }

.de-event-row, .de-builtin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.de-event-name { font-weight: 600; min-width: 120px; }
.de-event-dates { font-size: 11px; color: var(--text-dim); min-width: 160px; }
.de-event-type {
  font-size: 10px; font-weight: 600; padding: 1px 6px;
  border-radius: 3px; text-transform: uppercase; letter-spacing: .06em;
}
.de-type-holiday    { background: #fef3c7; color: #92400e; }
.de-type-school_vacation { background: #dbeafe; color: #1e40af; }
.de-type-custom     { background: #f3e8ff; color: #6b21a8; }
.de-type-concert    { background: #fce7f3; color: #9d174d; }
.de-type-sports     { background: #d1fae5; color: #065f46; }
.de-type-festival   { background: #f3e8ff; color: #6b21a8; }
.de-type-conference { background: #e0e7ff; color: #3730a3; }
.de-event-impact {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 3px; text-transform: uppercase;
}
.de-impact-high   { background: #fecaca; color: #991b1b; }
.de-impact-medium { background: #dbeafe; color: #1e40af; }
.de-impact-low    { background: var(--bg3); color: var(--text-dim); }
.de-event-city { font-size: 11px; color: var(--text-dim); }

.de-pending-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.de-pending-info { flex: 1; font-size: 13px; }
.de-pending-dates { font-size: 11px; color: var(--text-dim); margin-left: 8px; }
.de-pending-city { font-size: 11px; color: var(--text-dim); margin-left: 8px; }
.de-pending-note { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.4; }
.de-pending-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.de-pending-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: #7c3aed; color: #fff; font-size: 10px; font-weight: 700;
  margin-left: 6px;
}

.settings-field-title {
  font-size: 14px; font-weight: 700; margin-bottom: 8px;
}

/* Calendar demand event icon (top-right corner of day cell) */
.cal-event-icon {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 14px; line-height: 1; padding: 2px 4px;
  border: 2px solid transparent; border-radius: 4px;
  cursor: pointer; position: relative;
}
.cal-event-count {
  font-size: 9px; font-weight: 700; color: var(--text-lt);
  background: var(--bg3); border-radius: 50%;
  min-width: 14px; height: 14px; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1;
}
/* Keep old classes for list/card view demand label stacks */
.cal-event-stack {
  display: flex; flex-direction: column; gap: 2px; margin-top: 2px;
}
.cal-event-label {
  display: block; font-size: 10px; line-height: 1.3; padding: 1px 4px;
  border-radius: 3px; color: #fff; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; text-decoration: none; cursor: default;
}
a.cal-event-label { cursor: pointer; }
a.cal-event-label:hover { filter: brightness(1.15); text-decoration: underline; }
.cal-event-more {
  font-size: 9px; color: var(--text-dim); text-align: center; margin-top: 1px;
}

body.dark .de-type-holiday    { background: #451a03; color: #fcd34d; }
body.dark .de-type-school_vacation { background: #172554; color: #93c5fd; }
body.dark .de-type-custom     { background: #3b0764; color: #d8b4fe; }
body.dark .de-type-concert    { background: #500724; color: #f9a8d4; }
body.dark .de-type-sports     { background: #022c22; color: #6ee7b7; }
body.dark .de-type-festival   { background: #3b0764; color: #d8b4fe; }
body.dark .de-type-conference { background: #1e1b4b; color: #a5b4fc; }
body.dark .de-impact-high   { background: #450a0a; color: #fca5a5; }
body.dark .de-impact-medium { background: #172554; color: #93c5fd; }

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-lt); }

/* ─── Notes sidebar ──────────────────────────────────────────────── */
.notes-panel {
  position: fixed; right: 0; top: 67px; bottom: 36px;
  width: var(--notes-w);
  background: #fefce8;
  border-left: 2px solid #fcd34d;
  z-index: 95;
  display: flex; flex-direction: column;
  transition: transform .2s ease;
  overflow: hidden;
  box-shadow: -3px 0 16px rgba(0,0,0,.10);
}
.notes-panel.minimized { transform: translateX(100%); }

/* FAB — visible when panel is collapsed */
.notes-toggle-fab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 96;
  background: #f59e0b; color: #78350f;
  border: none; border-radius: 6px 0 0 6px;
  padding: 13px 7px; cursor: pointer;
  box-shadow: -2px 0 10px rgba(0,0,0,.18);
  writing-mode: vertical-rl;
  font-family: 'Caveat', cursive; font-size: 14px; font-weight: 700; letter-spacing: .06em;
  display: none; align-items: center; gap: 5px;
  transition: background .12s;
}
.notes-toggle-fab.visible { display: flex; }
.notes-toggle-fab:hover { background: #d97706; }

/* Header strip */
.notes-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: #fde68a;
  border-bottom: 1.5px solid #fcd34d;
  flex-shrink: 0;
}
.notes-title {
  font-family: 'Caveat', cursive;
  font-weight: 700; font-size: 16px; color: #78350f; letter-spacing: .02em;
}
.notes-min-btn {
  background: none; border: none; cursor: pointer;
  color: #92400e; font-size: 14px; padding: 2px 5px;
  border-radius: 4px; transition: background .12s; line-height: 1;
}
.notes-min-btn:hover { background: rgba(0,0,0,.08); }

/* Add form — slides in below header */
.notes-add-form {
  padding: 10px 14px 12px 14px;
  background: #fef9c3;
  border-bottom: 1.5px solid #fcd34d;
  flex-shrink: 0;
}
.notes-select {
  width: 100%; margin-bottom: 8px;
  background: transparent; color: #4b5563;
  border: none; border-bottom: 1.5px solid #f97316;
  font-family: 'Caveat', cursive; font-size: 15px;
  padding: 2px 2px 3px; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.notes-type-row { display: flex; gap: 6px; margin-bottom: 8px; }
.notes-type-btn {
  flex: 1; font-family: 'Caveat', cursive; font-size: 14px; font-weight: 600;
  padding: 3px 6px; border-radius: 4px;
  border: 1.5px solid #fcd34d;
  background: transparent; color: #78350f; cursor: pointer;
  transition: all .12s;
}
.notes-type-btn.active {
  background: #f97316; border-color: #ea580c; color: #fff;
}
.notes-date-input {
  width: 100%; margin-bottom: 8px;
  background: transparent; color: #4b5563;
  border: none; border-bottom: 1.5px solid #f97316;
  font-family: 'Caveat', cursive; font-size: 14px;
  padding: 2px 2px 3px; outline: none;
}
.notes-input-row { display: flex; align-items: center; gap: 6px; }
.notes-text-input {
  flex: 1; background: transparent; color: #374151;
  border: none; border-bottom: 1.5px solid #f97316;
  font-family: 'Caveat', cursive; font-size: 16px;
  padding: 2px 2px 3px; outline: none;
}
.notes-text-input::placeholder { color: #a16207; opacity: .6; }
.notes-add-btn {
  background: #f97316; border: none; border-radius: 4px;
  color: #fff; font-size: 16px; font-weight: 700; line-height: 1;
  padding: 4px 10px; cursor: pointer; transition: background .12s; flex-shrink: 0;
}
.notes-add-btn:hover { background: #ea580c; }

/* Notes body — ruled notepad lines */
.notes-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  position: relative;
  background-color: #fefce8;
  background-image:
    linear-gradient(to right, #fca5a5 1px, transparent 1px),
    repeating-linear-gradient(
      to bottom,
      transparent 0px, transparent 31px,
      #fed7aa 31px, #fed7aa 32px
    );
  background-position: 28px 0, 0 0;
  background-size: 100% 100%, 100% 32px;
  background-repeat: no-repeat, repeat;
}

/* Notes list */
.notes-list { padding: 4px 10px 60px 34px; }
.notes-group-label {
  font-family: 'Caveat', cursive;
  font-size: 12px; font-weight: 700;
  color: #c2410c; letter-spacing: .04em;
  padding: 10px 0 3px; border-bottom: 1px solid #fed7aa;
  margin-bottom: 2px;
}
.note-item {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 5px 0; min-height: 32px;
}
.note-check {
  width: 14px; height: 14px; margin-top: 4px; flex-shrink: 0;
  cursor: pointer; accent-color: #f97316;
}
.note-date-badge {
  font-family: 'Caveat', cursive;
  font-size: 12px; font-weight: 600; color: #c2410c;
  white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.note-text {
  flex: 1; font-family: 'Caveat', cursive;
  font-size: 15px; color: #374151; line-height: 1.45;
  word-break: break-word; cursor: text;
}
.note-text.checked { text-decoration: line-through; color: #9ca3af; }
.note-text.hl-yellow { background: #fef08a; border-radius: 2px; padding: 0 3px; }
.note-text.hl-red    { background: #fecdd3; border-radius: 2px; padding: 0 3px; }

/* Note edit wrap + highlight picker */
.note-edit-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.note-hl-picker { display: flex; align-items: center; gap: 5px; }
.note-hl-label  { font-family: 'Caveat', cursive; font-size: 11px; color: #a16207; }
.note-hl-dot    { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid transparent; cursor: pointer; padding: 0; flex-shrink: 0; transition: transform .12s; }
.note-hl-dot.hl-none   { background: #fff; border-color: #d1d5db; }
.note-hl-dot.hl-yellow { background: #fef08a; border-color: #fde047; }
.note-hl-dot.hl-red    { background: #fecdd3; border-color: #f9a8d4; }
.note-hl-dot.active    { transform: scale(1.3); border-width: 2px; }

.note-edit-input {
  flex: 1; background: transparent; color: #374151;
  border: none; border-bottom: 1.5px solid #f97316;
  font-family: 'Caveat', cursive; font-size: 15px;
  padding: 0 2px; outline: none; min-width: 0; width: 100%;
}
/* Hover-add indicator — floats over empty lines */
.notes-add-indicator {
  position: absolute; left: 0; right: 0; height: 32px;
  display: flex; align-items: center; padding-left: 6px; gap: 5px;
  pointer-events: none;
  z-index: 2;
}
.notes-ind-icon {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(249,115,22,.18); color: #f97316;
  font-size: 17px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notes-ind-text {
  font-family: 'Caveat', cursive; font-size: 13px;
  color: #a16207; opacity: .7;
}
.note-del {
  background: none; border: none; cursor: pointer; color: #fb923c;
  font-size: 13px; padding: 0 2px; opacity: 0; flex-shrink: 0;
  transition: opacity .12s; margin-top: 3px;
}
.note-item:hover .note-del { opacity: 1; }

/* ─── Settings button (header) ─────────────────────────────────── */
.btn-settings {
  position: relative; padding: 8px 12px; font-size: 16px; letter-spacing: 0;
}
.settings-wip-dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #f97316; border: 1.5px solid var(--dark);
}

/* ─── Settings overlay ─────────────────────────────────────────── */
.settings-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: stretch; justify-content: flex-end;
  background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.settings-overlay.open { opacity: 1; pointer-events: auto; }

.settings-panel {
  width: min(680px, 96vw); background: var(--bg-surface);
  box-shadow: -8px 0 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.25,.8,.25,1), width .26s cubic-bezier(.25,.8,.25,1);
}
.settings-overlay.open .settings-panel { transform: translateX(0); }
.settings-panel--wide { width: min(1400px, 98vw); }

.settings-panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  background: var(--dark); border-bottom: 3px solid var(--gold);
  flex-shrink: 0;
}
.settings-panel-title {
  font-size: 15px; font-weight: 800; color: #fff; letter-spacing: .02em;
  flex: 1;
}
.settings-wip-badge {
  font-size: 11px; font-weight: 700; color: #f97316;
  background: rgba(249,115,22,.15); border: 1px solid rgba(249,115,22,.4);
  border-radius: var(--radius-sm); padding: 3px 8px; letter-spacing: .04em;
}
.settings-close-btn {
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
  transition: color .15s;
}
.settings-close-btn:hover { color: #fff; }

.settings-layout {
  display: flex; flex: 1; overflow: hidden;
}
.settings-nav {
  width: 170px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg2); padding: 16px 0;
  overflow-y: auto;
}
.settings-nav-btn {
  display: block; width: 100%;
  text-align: left; padding: 9px 18px;
  font-size: 13px; font-weight: 600; font-family: var(--font);
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); border-left: 3px solid transparent;
  transition: all .14s;
}
.settings-nav-btn:hover { background: var(--bg3); color: var(--text); }
.settings-nav-btn.active {
  color: var(--gold); background: var(--gold-pale);
  border-left-color: var(--gold);
}
.settings-content {
  flex: 1; overflow: hidden; padding: 0; display: flex; flex-direction: column;
}

/* Two-column layout: form on left, illustration on right */
.settings-2col {
  flex: 1; display: flex; min-height: 0; overflow: visible;
}
.settings-form-col {
  width: 480px; flex-shrink: 0; overflow-y: auto; overflow-x: visible; padding: 24px;
  border-right: 1px solid var(--border);
}
.settings-deco-col {
  flex: 1; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 24px; gap: 14px;
  background: var(--bg2); position: relative;
}
.settings-deco-col::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 65% 55% at 50% 62%, rgba(200,130,10,.07) 0%, transparent 70%);
}
.settings-deco-col.no-deco { background: transparent !important; }
.settings-deco-col.no-deco::before { display: none; }
.settings-deco-col > * {
  animation: decoFadeIn .5s ease;
}
@keyframes decoFadeIn {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.settings-deco-tagline {
  font-size: 20px; font-weight: 900; color: var(--gold);
  letter-spacing: .05em; text-align: center; margin: 0; line-height: 1.2;
}
.settings-deco-svg {
  flex: 0 1 auto; max-height: 360px; width: 100%; max-width: 240px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.12));
}
.settings-deco-sub {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  letter-spacing: .07em; text-transform: uppercase; text-align: center; margin: 0;
}

/* Full-width padded wrapper for mapping / own-hotels sections */
.settings-padded {
  flex: 1; overflow-y: auto; padding: 16px 20px;
}
/* When occupancy 2-col fills settings-padded, remove scroll and let columns handle it */
.settings-padded:has(.occ-2col) {
  overflow: hidden; padding: 0;
}
.settings-section-title {
  font-size: 16px; font-weight: 800; margin-bottom: 20px;
  color: var(--text);
}
.settings-field {
  margin-bottom: 18px;
}
.settings-field label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 6px;
}
.settings-field select, .settings-field input[type="text"],
.settings-field input[type="password"] {
  width: 100%; padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg2); color: var(--text);
  font-family: var(--font); font-size: 13px;
}
.settings-field select:focus, .settings-field input:focus {
  outline: none; border-color: var(--gold);
}
.settings-row {
  display: flex; gap: 16px; align-items: flex-start;
}
.settings-row .settings-field { flex: 1; }
.settings-wip-notice {
  background: #fff7ed; border: 1px dashed #f97316;
  border-radius: var(--radius); padding: 16px 18px;
  font-size: 13px; color: #9a3412; margin-top: 24px;
  display: flex; gap: 10px; align-items: flex-start;
}
.settings-wip-notice .wip-icon { font-size: 18px; flex-shrink: 0; }

/* ─── Scrape duration chip (in result rows) ─────────────────────── */
.scrape-dur-chip {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--text-lt); background: var(--bg3);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px; margin-left: 6px; white-space: nowrap;
  vertical-align: middle; letter-spacing: .02em;
}
.scrape-timing-value {
  font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums;
}

/* ─── Competitor Mapping Table ──────────────────────────────────── */
.map-hotel-tabs {
  display: flex; gap: 0; margin-bottom: 12px;
  border-bottom: 2px solid var(--border); flex-wrap: wrap;
}
.map-tab-btn {
  padding: 7px 16px; font-size: 13px; font-weight: 600;
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: var(--text-dim);
  font-family: var(--font); transition: color .14s;
}
.map-tab-btn:hover { color: var(--text); }
.map-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.map-type-toggle {
  display: inline-flex; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px;
}
.map-toggle-btn {
  padding: 5px 16px; font-size: 12px; font-weight: 700;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-family: var(--font);
  transition: background .12s, color .12s;
}
.map-toggle-btn.active { background: var(--gold); color: #fff; }
.map-table-wrap {
  overflow-x: auto; border: 1.5px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px;
}
.map-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.map-hotel-name-header {
  background: var(--bg3); position: sticky; left: 0; z-index: 2;
  min-width: 155px; border-right: 1.5px solid var(--border-md);
  border-bottom: 1px solid var(--border);
  padding: 7px 10px;
}
.map-col-group-header {
  background: var(--bg3); font-weight: 700; font-size: 11px;
  text-align: center; padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  white-space: nowrap; color: var(--text);
}
.map-col-header {
  background: var(--bg3); font-size: 11px; font-weight: 600;
  color: var(--text-dim); text-align: center;
  padding: 5px 6px; white-space: nowrap;
  border-bottom: 1.5px solid var(--border-md);
  border-left: 1px solid var(--border);
  min-width: 105px;
}
.map-hotel-row td { border-bottom: 1px solid var(--border); }
.map-hotel-name {
  position: sticky; left: 0; background: var(--bg-surface);
  font-weight: 700; font-size: 12px;
  padding: 8px 10px; min-width: 155px;
  border-right: 1.5px solid var(--border-md);
  z-index: 1; white-space: nowrap;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px;
}
.map-own-row .map-hotel-name { color: var(--gold); }
.map-bench-select {
  font-size: 10px; padding: 1px 3px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--bg-surface); color: var(--text);
  cursor: pointer; margin-left: 4px; vertical-align: middle;
}
.mapped-bl-tag {
  display: inline-block; font-size: 9px; padding: 1px 5px; border-radius: 3px;
  font-weight: 600; vertical-align: middle; margin-left: 4px; letter-spacing: .02em;
}
.map-remove-comp {
  background: none; border: none; cursor: pointer; font-size: 14px;
  color: var(--text-lt); line-height: 1; padding: 0 2px;
  font-family: var(--font); transition: color .12s;
}
.map-remove-comp:hover { color: var(--red); }
.map-recheck-comp {
  background: none; border: none; cursor: pointer; font-size: 14px;
  color: var(--text-lt); line-height: 1; padding: 0 2px;
  font-family: var(--font); transition: color .12s;
}
.map-recheck-comp:hover { color: var(--gold); }
.map-cell {
  padding: 5px; min-width: 105px; height: 50px;
  text-align: center; vertical-align: middle;
  border-left: 1px solid var(--border);
  transition: background .12s;
  overflow: visible;
}
.map-cell.drag-over { background: var(--gold-pale); border-color: var(--gold-border); }
.map-card {
  display: inline-block; max-width: 94px;
  background: var(--bg-surface); color: var(--text);
  border: 1.5px solid var(--gold-border);
  border-radius: 12px; padding: 3px 8px;
  font-size: 11px; font-weight: 600;
  cursor: grab; user-select: none;
  white-space: normal; word-break: break-word;
  line-height: 1.3; text-align: center;
  transition: opacity .12s, box-shadow .12s;
  position: relative; overflow: visible;
}
.map-card:hover { box-shadow: var(--shadow-sm); }

/* Room size tooltip (violet balloon) */
.map-card[data-size-tip]:hover::after {
  content: attr(data-size-tip);
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: #9b59b6; color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  z-index: 20; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.map-card[data-size-tip]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px); left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #9b59b6;
  pointer-events: none; z-index: 20;
}
.map-card.dragging { opacity: 0.3; cursor: grabbing; }
.map-staging-row td { border-bottom: 2px solid var(--border-md); }
.map-staging-label {
  position: sticky; left: 0; background: var(--bg2);
  font-size: 10px; font-weight: 700; color: var(--text-lt);
  text-transform: uppercase; padding: 5px 10px;
  border-right: 1.5px solid var(--border-md);
  white-space: nowrap; min-width: 155px;
  letter-spacing: .04em; vertical-align: middle;
}
.map-staging {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 6px 10px; min-height: 36px;
  background: var(--bg2); transition: background .12s;
}
.map-staging.drag-over { background: var(--gold-pale); }
.map-staging-empty { font-size: 11px; color: var(--text-lt); align-self: center; }

/* Dismiss button on cards */
.map-card .map-dismiss-btn {
  position: absolute; top: -7px; right: -7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-lt); color: var(--bg-surface);
  border: none; font-size: 10px; line-height: 16px;
  cursor: pointer; padding: 0; z-index: 2;
  text-align: center; font-weight: 700;
  opacity: 0; transition: opacity .15s;
  pointer-events: none;
}
.map-card:hover .map-dismiss-btn { opacity: 1; pointer-events: auto; }
.map-card .map-dismiss-btn:hover { background: #c0392b; color: #fff; }

/* Dismissed inline tag (shown in hotel name cell) */
.map-dismissed-inline {
  font-size: 9px; font-weight: 600;
  color: var(--text-lt); background: var(--bg2);
  border: 1px dashed var(--border); border-radius: 8px;
  padding: 1px 7px; order: 99; flex-basis: 100%;
  cursor: pointer; user-select: none;
  transition: color .12s, border-color .12s;
  width: fit-content;
}
.map-dismissed-inline:hover, .map-dismissed-inline.active {
  color: var(--text); border-color: var(--gold-border);
}
/* Dismissed row */
.map-dismissed-row td { border-bottom: 1px dashed var(--border); }
.map-dismissed-cards {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 6px 10px; min-height: 0;
}
.map-dismissed-cards .map-card {
  opacity: 0.5; border-style: dashed;
}
.map-dismissed-cards .map-card:hover { opacity: 0.8; }
.map-restore-btn {
  position: absolute; top: -7px; right: -7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #27ae60; color: #fff;
  border: none; font-size: 10px; line-height: 16px;
  cursor: pointer; padding: 0; z-index: 2;
  text-align: center; font-weight: 700;
  opacity: 0; transition: opacity .15s;
  pointer-events: none;
}
.map-dismissed-cards .map-card:hover .map-restore-btn { opacity: 1; pointer-events: auto; }

/* Re-check diff panel */
.map-diff-panel { padding: 4px 0; }
.map-diff-header {
  font-size: 14px; margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.map-diff-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.map-diff-table th {
  text-align: left; font-weight: 600; font-size: 11px;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em;
  padding: 6px 10px; border-bottom: 2px solid var(--border-md);
}
.map-diff-row td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.map-diff-name { font-weight: 600; }
.map-diff-new-name { color: var(--gold); }
.map-diff-status {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
}
.map-diff-ok      { color: var(--text-lt); }
.map-diff-removed { color: #c0392b; }
.map-diff-added   { color: #27ae60; }
.map-diff-select {
  font-size: 12px; padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text); font-family: var(--font);
}

/* ── Cross-hotel propagation popup ───────────────────────────────────── */
.map-propagate-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.map-propagate-overlay.visible { opacity: 1; }
.map-propagate-popup {
  background: var(--bg-surface); border-radius: 16px;
  padding: 28px 32px 24px; max-width: 420px; width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  text-align: center; transform: scale(.92); transition: transform .2s;
}
.map-propagate-overlay.visible .map-propagate-popup { transform: scale(1); }
.map-propagate-icon { font-size: 32px; margin-bottom: 8px; }
.map-propagate-title {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px;
}
.map-propagate-body {
  font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 18px;
  text-align: left;
}
.map-propagate-body ul {
  margin: 6px 0 6px 18px; padding: 0; list-style: disc;
}
.map-propagate-body li {
  font-weight: 600; color: var(--text); font-size: 13px;
}
.map-propagate-actions {
  display: flex; gap: 10px; justify-content: center;
}

/* ── Standard dialog (alert / confirm / prompt) ────────────────────── */
.std-dialog-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.std-dialog-overlay.visible { opacity: 1; }
.std-dialog-popup {
  background: var(--bg-surface); border-radius: 16px;
  padding: 28px 32px 24px; max-width: 420px; width: 90%;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  text-align: center; transform: scale(.92); transition: transform .2s;
}
.std-dialog-overlay.visible .std-dialog-popup { transform: scale(1); }
.std-dialog-icon { font-size: 32px; margin-bottom: 8px; }
.std-dialog-title {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 10px;
}
.std-dialog-body {
  font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 18px;
}
.std-dialog-input {
  width: 100%; padding: 9px 12px; margin-bottom: 16px;
  border: 1.5px solid var(--border-md); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  background: var(--bg2); color: var(--text);
  outline: none; transition: border-color .15s;
}
.std-dialog-input:focus { border-color: var(--gold); }
.std-dialog-actions {
  display: flex; gap: 10px; justify-content: center;
}

/* ── Progress dialog (blocking) ─────────────────────────────────────── */
.progress-dialog-lock .std-dialog-icon {
  animation: progress-pulse 1.2s ease-in-out infinite;
}
@keyframes progress-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(1.1); }
}
.progress-dialog-lock .progress-dialog-count {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-weight: 600;
}

/* ── Tutorial balloons ───────────────────────────────────────────────── */
.tut-dot {
  position: fixed; z-index: 9999;
  width: 22px; height: 22px; border-radius: 50%;
  background: #27ae60; color: #fff;
  font-size: 12px; font-weight: 800; line-height: 22px;
  text-align: center; cursor: default;
  box-shadow: 0 2px 8px rgba(39,174,96,.35);
  transition: transform .15s;
  pointer-events: auto;
}
.tut-dot:hover { transform: scale(1.15); }
.tut-balloon {
  display: none; position: absolute;
  width: 220px; padding: 10px 13px;
  background: #27ae60; color: #fff;
  border-radius: 10px; font-size: 12px; font-weight: 500;
  line-height: 1.5; box-shadow: 0 4px 16px rgba(39,174,96,.3);
  pointer-events: none; white-space: normal;
}
.tut-dot:hover .tut-balloon { display: block; }
/* Position balloon based on dot position */
.tut-dot[data-pos="right"] .tut-balloon  { left: 30px; top: 50%; transform: translateY(-50%); }
.tut-dot[data-pos="left"]  .tut-balloon  { right: 30px; top: 50%; transform: translateY(-50%); }
.tut-dot[data-pos="below"] .tut-balloon  { top: 30px; left: 50%; transform: translateX(-50%); }
.tut-dot[data-pos="above"] .tut-balloon  { bottom: 30px; left: 50%; transform: translateX(-50%); }
.map-add-comp { margin-top: 10px; }
.map-add-comp-form {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; margin-top: 8px;
}
.map-add-comp-form input[type="text"] {
  padding: 7px 10px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg2);
  color: var(--text); font-family: var(--font); font-size: 13px;
}
.map-add-comp-form input[type="text"]:focus {
  outline: none; border-color: var(--gold);
}
.map-add-comp-form input#mapCompUrl  { width: 260px; }
.map-add-comp-form input#mapCompName { width: 170px; }

/* ─── Search parameters stepper ────────────────────────────────── */
.search-params-row {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.child-ages-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
/* Inline age selects next to children stepper */
.child-ages-inline {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.child-age-wrap { display: flex; align-items: center; }
.child-age-select {
  font-size: 12px; padding: 4px 6px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg2); color: var(--text);
  cursor: pointer;
}
.child-age-select:focus { outline: none; border-color: var(--gold); }
.child-age-label {
  font-size: 11px; color: var(--text-lt); display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}
/* Children + ages group — highlighted frame when ages are shown */
.children-ages-group {
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; transition: border-color 0.2s, background 0.2s;
}
.children-ages-group.has-ages {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
}
.search-param-item {
  display: flex; align-items: center; gap: 12px;
}
.search-param-label {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
.stepper {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.stepper-btn {
  width: 30px; height: 30px; font-size: 16px; font-weight: 700;
  background: var(--bg2); border: none; cursor: pointer;
  color: var(--text); transition: background .14s;
  font-family: var(--font);
}
.stepper-btn:hover { background: var(--bg3); color: var(--gold); }
.stepper-val {
  width: 32px; text-align: center; font-size: 14px;
  font-weight: 700; color: var(--text);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 0 4px; line-height: 30px;
}

/* ─── Card params chip ──────────────────────────────────────────── */
.card-params-chip {
  font-size: 10px; font-weight: 700; color: var(--text-dim);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 2px 6px;
  letter-spacing: .03em;
}

/* ─── Mapped Results Table ───────────────────────────────────────── */
.mapped-date-section {
  margin-bottom: 32px;
}
.mapped-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
}
.mapped-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mapped-results-table th,
.mapped-results-table td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.mapped-group-header {
  background: var(--bg3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  border-bottom: 2px solid var(--border-md) !important;
}
.mapped-col-header {
  background: var(--bg2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}
.mapped-hotel-name-header,
.mapped-hotel-name {
  text-align: left !important;
  padding-left: 10px !important;
  min-width: 100px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.mapped-own-row {
  background: var(--gold-pale) !important;
}
.mapped-own-row td { font-weight: 600; }
.mapped-own-price { color: var(--gold); font-weight: 700; }
.mapped-comp-row td { font-weight: 400; }
.mapped-price-cell { font-family: var(--font-mono); font-size: 12px; }
.mapped-empty { color: var(--text-lt); }
.mapped-range-row {
  border-top: 2px solid var(--border-md) !important;
  background: var(--bg2);
}
.mapped-range-cell {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.mapped-rec-row {
  background: var(--bg3);
}
.mapped-rec-cell { font-size: 11px; min-width: 80px; vertical-align: top; }

/* Specific price recommendation cell */
.rec-top { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.rec-price-val { font-size: 13px; font-weight: 800; }
.rec-price-up { color: #15803D; }
.rec-price-down { color: #DC2626; }
.rec-price-same { color: #64748b; }
.rec-delta { font-size: 9px; font-weight: 600; }
.rec-delta-up { color: #22c55e; }
.rec-delta-down { color: #ef4444; }
.rec-delta-same { color: #cbd5e1; }

/* Position bar */
.rec-bar-outer { margin-top: 4px; height: 6px; background: #f1f3f7; border-radius: 3px; position: relative; }
.rec-bar-comp { position: absolute; top: 0; height: 6px; background: #e2e8f0; border-radius: 3px; }
.rec-dot { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 1; }
.rec-dot-own { background: #C8820A; }
.rec-dot-rec { background: #15803D; }
.rec-bar-labels { display: flex; justify-content: space-between; font-size: 8px; color: #b0b8c8; margin-top: 2px; }

/* Dark mode overrides for rec cells */
body.dark .rec-bar-outer { background: #334155; }
body.dark .rec-bar-comp { background: #475569; }
body.dark .rec-dot { border-color: #1e293b; }
body.dark .rec-bar-labels { color: #64748b; }
body.dark .rec-price-same { color: #94a3b8; }
body.dark .rec-delta-same { color: #475569; }
.mapped-bl-summary-row {
  background: var(--bg2);
  cursor: default;
}
.mapped-bl-summary-row td { font-family: var(--font-mono); font-size: 12px; }
/* Similar benchmark row highlight (indigo tint) */
.mapped-similar-row { background: #EEF0FF !important; }
.mapped-similar-row td { border-bottom-color: #D4D8FC; }
.mapped-similar-row .mapped-bl-tag { box-shadow: 0 0 0 2px #EEF0FF, 0 0 0 3.5px #6366f1; }
.mapped-detail-row { background: var(--bg-surface); }
/* Strategy badge in mapped results header */
.mapped-strat-badge {
  font-size: 9px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-sm); text-transform: uppercase;
  letter-spacing: .04em; cursor: pointer; user-select: none;
  margin-left: auto;
}
.mapped-strat-badge:hover { filter: brightness(1.2); }
.mapped-strat-passive    { background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); }
.mapped-strat-aggressive { background: rgba(239,68,68,.25); color: #fca5a5; }
.mapped-strat-dismissive { background: rgba(124,58,237,.25); color: #c4b5fd; }

/* ── Mapped results header bar: IMPLTD / RJCTD buttons ── */
.mapped-bar-divider { width: 1px; height: 18px; background: rgba(255,255,255,.15); margin: 0 4px; flex-shrink: 0; }
.mapped-bar-action-btns { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.date-section-title .sug-rjct { border-color: var(--text-lt); color: rgba(255,255,255,.45); }
.date-section-title .sug-rjct:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.date-section-title .sug-rjct.selected { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }

/* ── QA Sampling highlight ── */
.qa-sampled { position: relative; }
.qa-accent-left { border-left: 3px solid var(--gold) !important; }
.qa-icon-cell::after {
  content: "QA"; position: absolute; top: 2px; right: 2px;
  font-size: 7px; font-weight: 800; letter-spacing: .04em;
  background: var(--gold); color: #fff;
  padding: 1px 4px; border-radius: 3px; line-height: 1.2;
}
.qa-resolved { opacity: 0.7; }
.qa-resolved.qa-icon-cell::after { background: var(--green); content: "✓"; }

.qa-summary-bar {
  background: var(--amber-bg, #FFFBEB); border: 1.5px solid var(--gold-border, #E8C06A);
  border-radius: 8px; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; font-size: 13px;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.qa-summary-icon { font-size: 18px; }
.qa-summary-text { flex: 1; }
.qa-summary-text strong { color: var(--gold); }
.qa-summary-links { display: flex; gap: 6px; flex-wrap: wrap; }
.qa-summary-link {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  background: var(--gold); color: #fff; text-decoration: none;
  font-weight: 600; cursor: pointer; border: none; font-family: var(--font);
}
.qa-summary-link:hover { background: var(--gold-lt); }

.qa-floating-next {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--gold); color: #fff; border: none;
  border-radius: 24px; padding: 12px 22px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 100; transition: transform 0.15s, box-shadow 0.15s;
  font-family: var(--font);
}
.qa-floating-next:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }
.qa-floating-count {
  background: #fff; color: var(--gold); font-weight: 800;
  border-radius: 50%; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; margin-left: 8px;
}

.mapped-expand-btn {
  color: var(--text-dim); letter-spacing: .03em;
}
.mapped-expand-btn:hover { color: var(--text); }

/* Mapped search — error cell (mapped but scrape failed) */
.mapped-err {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.mapped-na {
  color: #92400e;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Mapped search — clickable price cell */
.mapped-qa-click { cursor: pointer; }
.mapped-qa-click:hover { text-decoration: underline; }

/* Mapped search — non-room-only warning underline */
.mapped-has-note {
  text-decoration: underline dashed;
  text-decoration-color: var(--amber);
  text-underline-offset: 3px;
  cursor: help;
}

/* Mapped search — hover tooltip balloon */
.mapped-note-balloon {
  position: fixed;
  z-index: 9999;
  display: none;
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #f59e0b;
  font-size: 11px;
  font-family: var(--font);
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  max-width: 280px;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(245,158,11,.18), 0 2px 6px rgba(245,158,11,.1);
  white-space: pre-wrap;
  word-break: break-word;
}
.mapped-note-balloon::before {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #f59e0b;
}
.mapped-note-balloon::after {
  content: '';
  position: absolute;
  top: calc(100% - 1px); left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fef3c7;
}

/* ─── Market Overview badge ─────────────────────────────────────── */
.status-mapped {
  background: #6366f1;
  color: #fff;
}

/* ─── Mapped search modal ───────────────────────────────────────── */
.mapped-hotel-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.mapped-hotel-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  background: var(--bg2);
  transition: border-color .15s;
}
.mapped-hotel-check:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.mapped-hotel-check input { cursor: pointer; }
.mapped-hotel-check.no-mapping {
  opacity: .5;
  cursor: not-allowed;
}
.mapped-hotel-check.no-mapping input { cursor: not-allowed; }
.mapped-no-data {
  font-size: 10px;
  color: var(--text-lt);
  font-style: italic;
  margin-left: 2px;
}

/* ─── Mapping search params (settings) ──────────────────────────── */
.map-search-params {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0 16px;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.map-params-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.map-param-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-param-group label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}
.stepper-mini {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}
.stepper-mini .stepper-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper-mini .stepper-btn:hover { color: var(--gold); }
.stepper-mini .stepper-val {
  min-width: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Market Overview button on dark header */
header .btn-secondary {
  background: transparent;
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.25);
}
header .btn-secondary:hover {
  color: #fff;
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
}

/* ─── Dark mode ─────────────────────────────────────────────────── */
body.dark {
  --bg:        #12141E;
  --bg-surface:#1C1F2E;
  --bg2:       #232639;
  --bg3:       #2A2D40;
  --border:    #2E3145;
  --border-md: #3D4160;
  --text:      #E8EAF0;
  --text-dim:  #8B90A8;
  --text-lt:   #5A6080;
  --gold-pale: #2A2210;
}

/* ── Color Themes ── */
/* B&W — monochrome, no color accent */
body.theme-bw {
  --gold: #4b5563; --gold-lt: #6b7280; --gold-pale: #f3f4f6; --gold-border: #9ca3af;
  --green: #374151; --green-bg: #f9fafb;
  --amber: #4b5563; --amber-bg: #f3f4f6;
  --blue: #374151; --blue-bg: #f3f4f6;
}
body.dark.theme-bw {
  --gold: #9ca3af; --gold-lt: #d1d5db; --gold-pale: #1f2937;
  --green: #9ca3af; --amber: #9ca3af; --blue: #9ca3af;
}

/* Blue */
body.theme-blue {
  --gold: #2563eb; --gold-lt: #3b82f6; --gold-pale: #eff6ff; --gold-border: #93c5fd;
  --green: #15803D; --amber: #1d4ed8; --amber-bg: #eff6ff;
}
body.dark.theme-blue {
  --gold: #60a5fa; --gold-lt: #93c5fd; --gold-pale: #1e293b;
}

/* Purple */
body.theme-purple {
  --gold: #7c3aed; --gold-lt: #8b5cf6; --gold-pale: #f5f3ff; --gold-border: #c4b5fd;
  --green: #15803D; --amber: #6d28d9; --amber-bg: #f5f3ff;
}
body.dark.theme-purple {
  --gold: #a78bfa; --gold-lt: #c4b5fd; --gold-pale: #1e1b4b;
}

/* ── Dark mode: Welcome screen ── */
body.dark .welcome-screen {
  background: #12141E;
}
body.dark .welcome-bg-gradient {
  background: linear-gradient(135deg, #12141E 0%, #1a1d2e 40%, #12141E 100%);
}
body.dark .wl-ahead { color: #ffffff; }
body.dark .welcome-stat {
  background: #1C1F2E;
  border-color: #2E3145;
}
body.dark .welcome-stat:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
body.dark .ws-impl { border-color: #14532d; }
body.dark .ws-impl:hover { border-color: #22c55e; }
body.dark .ws-wait { border-color: #78350f; }
body.dark .ws-wait:hover { border-color: #f59e0b; }
body.dark .ws-rjct { border-color: #2E3145; }
body.dark .ws-rjct:hover { border-color: #6b7280; }
body.dark .welcome-login {
  background: #1a2332;
  border-color: #1b4332;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
body.dark .welcome-login-title {
  color: #4ade80;
}
body.dark .welcome-input-label {
  color: #86efac;
}
body.dark .welcome-input {
  background: #12141E;
  border-color: #1b4332;
  color: #E8EAF0;
}
body.dark #wlUser {
  background: #12141E;
  border-color: #1b4332;
  color: #E8EAF0;
}
body.dark .welcome-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}
body.dark .welcome-input:-webkit-autofill,
body.dark .welcome-input:-webkit-autofill:hover,
body.dark .welcome-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #12141E inset !important;
  -webkit-text-fill-color: #E8EAF0 !important;
  border-color: #1b4332 !important;
}
body.dark .welcome-btn {
  background: #166534;
  box-shadow: 0 4px 16px rgba(22,101,52,.40);
}
body.dark .welcome-btn:hover {
  background: #15803d;
  box-shadow: 0 8px 24px rgba(22,101,52,.50);
}
body.dark .welcome-logo {
  filter: brightness(1.8) saturate(.85);
}
body.dark .welcome-changelog-list li strong {
  color: #E8EAF0;
}
body.dark .cl-tag {
  background: #2A2210;
  border-color: #78350f;
}

/* ── Alert Center ────────────────────────────────────────────────── */
#btnAlertCenter { position: relative; }
.alert-card {
  background: var(--bg-surface);
  border-left: 2px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 8px;
  transition: background .12s;
}
.alert-card:hover { background: var(--bg2); }
.alert-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  font-size: 13px;
}
.alert-type-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; padding: 2px 7px; border-radius: 4px;
  border: 1.5px solid; white-space: nowrap;
  background: var(--bg-surface);
}
.alert-hotel-name {
  font-weight: 600; color: var(--text); white-space: nowrap;
}
.alert-summary {
  flex: 1; color: var(--text-dim); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alert-time {
  font-size: 10px; color: var(--text-lt); white-space: nowrap;
}
.alert-resolve-btn {
  font-size: 12px; padding: 2px 8px; border-radius: 4px;
  border: 1.5px solid var(--green); color: var(--green);
  background: var(--bg-surface); cursor: pointer;
}
.alert-resolve-btn:hover { background: var(--green); color: #fff; }
.alert-card-detail {
  display: none; padding: 0 14px 12px;
}
.alert-card.alert-expanded .alert-card-detail { display: block; }
.alert-expanded-default { display: block !important; }
.alert-email-iframe {
  width: 100%; height: 400px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-top: 8px; background: #fff;
}
/* CM Test Mapping dialog */
.cm-test-overlay .map-propagate-popup { overflow: hidden; }
.cm-test-room-table th { font-size: 11px; color: var(--text-dim); }
.cm-test-room-table tr:hover { background: var(--bg2); }
.cm-test-email-preview iframe { height: 300px; }
.alert-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── CM Mapping table in Settings ────────────────────────────────── */
.cm-mapping-table {
  width: 100%; border-collapse: collapse; background: var(--bg-surface);
  font-size: 13px;
}
.cm-mapping-table th {
  background: var(--bg3); text-align: left; padding: 7px 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim);
  border-bottom: 1.5px solid var(--border);
}
.cm-mapping-table td {
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cm-mapping-table tr:hover td { background: var(--bg2); }
.cm-room-tag {
  display: inline-block; font-size: 11px; padding: 1px 6px;
  border: 1px solid var(--border); border-radius: 3px;
  margin: 1px 3px 1px 0; color: var(--text-dim);
}

/* Room type inventory in Settings */
.rt-inv-hotel-title {
  font-size: 12px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 16px 0 8px;
}
.rt-inv-table {
  width: 100%; border-collapse: collapse; background: var(--bg-surface);
  font-size: 13px; margin-bottom: 12px;
}
.rt-inv-table th {
  background: var(--bg3); text-align: left; padding: 6px 12px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim);
  border-bottom: 1.5px solid var(--border);
}
.rt-inv-table td {
  padding: 6px 12px; border-bottom: 1px solid var(--border);
}
.rt-inv-table input[type="number"] {
  width: 70px; padding: 4px 8px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg2);
  color: var(--text); font-family: var(--font-mono); font-size: 13px;
}
.rt-inv-dismissed { opacity: .4; }
.rt-inv-dismissed input[type="number"] { background: var(--bg3); }
.rt-inv-dismiss-btn {
  background: none; border: 1px solid var(--border); border-radius: 3px;
  width: 20px; height: 20px; line-height: 18px; text-align: center;
  font-size: 13px; color: var(--text-dim); cursor: pointer;
  padding: 0; margin-right: 6px; vertical-align: middle;
}
.rt-inv-dismiss-btn:hover { background: var(--bg3); color: var(--text); }

/* ── Dark mode: Strategy & Calendar strategy badges ── */
body.dark .cal-strategy-passive    { background: #2A2D40; color: #9CA3AF; }
body.dark .cal-strategy-aggressive { background: #450a0a; color: #fca5a5; }
body.dark .cal-strategy-dismissive { background: #2e1065; color: #c4b5fd; }
body.dark .mapped-similar-row { background: #1E2048 !important; }
body.dark .mapped-similar-row td { border-bottom-color: #2D3070; }
body.dark .mapped-similar-row .mapped-bl-tag { box-shadow: 0 0 0 2px #1E2048, 0 0 0 3.5px #818cf8; }
body.dark .list-strat-aggressive { border-color: #fca5a5; color: #fca5a5; }
body.dark .list-strat-dismissive { border-color: #c4b5fd; color: #c4b5fd; }
body.dark .strat-card { background: var(--bg2); border-color: var(--border); }
body.dark .factor-row { background: var(--bg3); border-color: var(--border); }
body.dark .factor-toggle.factor-off { background: var(--border-md); }

/* ─── Dashboard View ───────────────────────────────────────────── */
.dashboard-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 !important;
}
.dash-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.dash-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.dash-section-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.dash-section-header h3 { margin-bottom: 0; }
.dash-chips-row { display: flex; gap: 4px; flex-wrap: wrap; }
.dash-chip {
  padding: 3px 10px; font-size: 10px; font-weight: 700;
  border: 1.5px solid var(--c, #999); border-radius: 14px;
  cursor: pointer; transition: all .15s; font-family: inherit;
  background: transparent; color: var(--c, #999); opacity: 0.35;
}
.dash-chip.active {
  background: var(--c, #999); color: #fff; opacity: 1;
}
.dash-chip:hover:not(.active) { opacity: 0.7; }
.dash-main-chart { grid-column: 1 / -1; }
.dash-main-chart canvas { height: 360px !important; }
.dash-yesterday { grid-column: 1; }
.dash-pickup { grid-column: 1 / span 2; }
.dash-pace { grid-column: 3; }

.dash-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 14px;
}
.dash-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

/* Metric tiles */
.dash-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}
.dash-metric-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.dash-metric-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.dash-metric-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-lt);
}

/* Responsive: stack on narrow screens */
@media (max-width: 900px) {
  .dashboard-view { grid-template-columns: 1fr; }
  .dash-main-chart,
  .dash-yesterday,
  .dash-pickup,
  .dash-pace { grid-column: 1; }
}

/* ─── Occupancy Two-Column Layout ──────────────────────────────── */
.occ-2col {
  display: flex; gap: 0; min-height: 0; flex: 1; height: 100%;
}
.occ-col-left {
  width: 420px; flex-shrink: 0; overflow-y: auto; padding: 24px;
  border-right: 1px solid var(--border);
}
.occ-col-right {
  flex: 1; min-width: 0; overflow-y: auto; padding: 24px;
}
.occ-deco-inline {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 0 8px; gap: 10px; opacity: .7;
}
.occ-deco-inline .settings-deco-svg {
  max-height: 180px; max-width: 140px;
}
.occ-deco-inline .settings-deco-tagline {
  font-size: 14px;
}
.occ-deco-inline .settings-deco-sub {
  font-size: 11px;
}

/* ─── Help Content ─────────────────────────────────────────────── */
.help-content {
  max-width: 720px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
}
.help-content h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 8px;
}
.help-content h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 20px 0 10px;
}
.help-content h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 14px 0 6px;
}
.help-content p {
  margin: 6px 0 10px;
}
.help-intro {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}
.help-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
.help-content ul, .help-content ol {
  padding-left: 22px;
  margin: 6px 0 12px;
}
.help-content li {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.6;
}
.help-content code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg3);
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.help-content strong {
  font-weight: 600;
}
.help-settings-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  background: var(--bg-surface);
}
.help-settings-table th,
.help-settings-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
}
.help-settings-table th {
  background: var(--bg3);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text-dim);
}
.help-settings-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
  width: 140px;
}

/* Dark mode help */
body.dark .help-content code {
  background: var(--bg3);
  border-color: var(--border);
}
body.dark .help-settings-table th {
  background: var(--bg3);
}
body.dark .help-settings-table td,
body.dark .help-settings-table th {
  border-color: var(--border);
}

/* ── Own Hotels drag reorder ─────────────────────────────────────────── */
tr.oh-row { transition: opacity 0.15s; }
tr.oh-drag-over { outline: 2px solid var(--gold); outline-offset: -2px; background: var(--gold-pale, rgba(180,83,9,0.06)); }
.oh-drag-handle:active { cursor: grabbing; }
