:root {
  --pine: #0a3d48;
  --pine-deep: #062a32;
  --lake: #0d6b7c;
  --kbt-blue: #0d6b7c;
  --mist: #e8eef0;
  --snow: #f7faf9;
  --saffron: #c9a227;
  --saffron-soft: #e8c97a;
  --ink: #15201c;
  --muted: #5c6f68;
  --line: rgba(10, 61, 72, 0.12);
  --danger: #b42318;
  --ok: #1f7a4d;
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 18px 50px rgba(6, 42, 50, 0.12);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  --sidebar: 272px;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 111, 122, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(200, 151, 58, 0.16), transparent 50%),
    linear-gradient(165deg, #f4f8f7 0%, #e7eef0 45%, #f8f6f0 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--lake); text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, video, canvas, svg { max-width: 100%; height: auto; }
img { display: inline-block; vertical-align: middle; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--pine-deep), var(--pine));
  color: #eef6f3;
  padding: 1.4rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 1.5rem;
  position: sticky; top: 0;
  height: 100vh; max-height: 100vh; max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.35) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.3); border-radius: 999px;
}
.sidebar .nav { flex: 1 0 auto; }
.sidebar-foot { flex-shrink: 0; margin-top: auto; }
.brand { display: flex; gap: .75rem; align-items: center; padding: .4rem .6rem 1rem; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 0 2px #0033cc, 0 0 0 3.5px #e11d2e; flex-shrink: 0; }
.brand-text { min-width: 0; }
.veloz-footer {
  text-align: center; padding: .85rem 1rem 1.25rem; font-size: .78rem; color: var(--muted);
  border-top: 1px solid var(--line); margin-top: auto;
}
.veloz-footer a { color: var(--lake); font-weight: 500; }
.content { display: flex; flex-direction: column; min-height: calc(100vh - 72px); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background:
    linear-gradient(145deg, var(--saffron-soft), var(--saffron)),
    var(--saffron);
  box-shadow: 0 8px 20px rgba(200,151,58,.35);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 10px 8px 8px;
  border: 2px solid rgba(20,53,44,.35); border-radius: 50% 50% 40% 40%;
}
.brand-name { font-family: var(--display); font-size: 1.45rem; line-height: 1; font-weight: 600; }
.brand-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-top: .2rem; }

.nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.nav-link {
  color: rgba(238,246,243,.78); padding: .7rem .9rem; border-radius: 12px;
  transition: .2s ease; font-weight: 500; font-size: .95rem;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(232,201,122,.18); color: #fff; box-shadow: inset 3px 0 0 var(--saffron-soft); }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; display: grid; gap: .75rem; }
.user-chip { padding: 0 .4rem; }
.user-chip strong { display: block; font-size: .92rem; }
.user-chip span { font-size: .75rem; opacity: .65; text-transform: uppercase; letter-spacing: .08em; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main > .content { flex: 1; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.35rem 1.75rem .5rem; gap: 1rem;
}
.page-title {
  margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  font-weight: 600; letter-spacing: -.01em; color: var(--pine-deep);
}
.content { padding: .75rem 1.75rem 2.5rem; }

.panel, .stat-card, .card {
  background: var(--card); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 1.25rem; }
.panel + .panel { margin-top: 1rem; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { padding: 1.1rem 1.2rem; position: relative; overflow: hidden; }
.stat-card::before {
  content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px;
  border-radius: 50%; background: radial-gradient(circle, rgba(47,111,122,.18), transparent 70%);
}
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.stat-value { font-family: var(--display); font-size: 2rem; margin-top: .2rem; color: var(--pine); }
.stat-hint { color: var(--muted); font-size: .82rem; margin-top: .15rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.toolbar .spacer { flex: 1; }

.btn {
  appearance: none; border: none; cursor: pointer;
  border-radius: 999px; padding: .65rem 1.15rem; font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--pine), var(--lake));
  color: #fff; box-shadow: 0 10px 24px rgba(20,53,44,.25);
}
.btn-accent {
  background: linear-gradient(135deg, var(--saffron), #a87420);
  color: #1a1408; box-shadow: 0 10px 24px rgba(200,151,58,.28);
}
.btn-ghost {
  background: transparent; color: inherit; border: 1px solid currentColor; opacity: .9;
}
.sidebar .btn-ghost { color: #eef6f3; border-color: rgba(255,255,255,.25); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid rgba(180,35,24,.3); }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; padding: .7rem .85rem; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
  font-size: 1rem; /* prevent iOS zoom on focus */
  max-width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(47,111,122,.55); box-shadow: 0 0 0 4px rgba(47,111,122,.12);
}
.textarea { min-height: 90px; resize: vertical; }
.label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; font-weight: 500; }
.field { margin-bottom: .9rem; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }

.pkg-section { margin-bottom: .85rem; border: 1px solid var(--line); border-radius: 12px; padding: .65rem .85rem; background: var(--card); }
.pkg-summary { cursor: pointer; font-weight: 600; color: var(--pine); font-family: var(--display); list-style: none; }
.pkg-summary::-webkit-details-marker { display: none; }
.pkg-stars { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem; margin-top: .35rem; }
.pkg-star-btn {
  appearance: none; border: 0; background: transparent; padding: .1rem .15rem;
  font-size: 1.55rem; line-height: 1; color: #d4d0c8; cursor: pointer;
  transition: color .12s ease, transform .12s ease;
}
.pkg-star-btn:hover:not(:disabled), .pkg-star-btn:focus-visible:not(:disabled) { color: #e0b84a; transform: scale(1.08); outline: none; }
.pkg-star-btn.is-on { color: #d4a017; }
.pkg-star-btn:disabled { cursor: default; opacity: .85; }
.pkg-form .field { margin-top: .65rem; }

.table-wrap {
  overflow: auto; border-radius: 14px; -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
table.data {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  min-width: 520px;
}
table.data th, table.data td {
  text-align: left; padding: .85rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
table.data th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600;
  background: rgba(232,238,240,.65);
}
table.data tr:hover td { background: rgba(47,111,122,.04); }
.badge {
  display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  background: rgba(47,111,122,.12); color: var(--lake);
}
.badge-ok { background: rgba(31,122,77,.12); color: var(--ok); }
.badge-warn { background: rgba(200,151,58,.18); color: #8a6418; }
.badge-danger { background: rgba(180,35,24,.12); color: var(--danger); }
.badge-muted { background: rgba(92,111,104,.12); color: var(--muted); }

.empty {
  text-align: center; padding: 2.5rem 1rem; color: var(--muted);
}
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

.tabs {
  display: flex; gap: .4rem; flex-wrap: nowrap; margin-bottom: 1rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: .35rem; scrollbar-width: thin;
}
.tabs::-webkit-scrollbar { height: 4px; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .55rem 1rem; cursor: pointer; font-weight: 500; color: var(--muted);
  white-space: nowrap; flex-shrink: 0; min-height: 40px;
}
.tab.active { background: var(--pine); color: #fff; border-color: var(--pine); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12,34,28,.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50;
  animation: fadeIn .18s ease;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}
.modal {
  width: min(640px, 100%); max-height: min(90vh, 100%); overflow: auto;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 1.35rem 1.4rem 1.2rem;
  animation: rise .22s ease;
  -webkit-overflow-scrolling: touch;
}
.modal.wide { width: min(920px, 100%); }
.modal h2 { margin: 0 0 1rem; font-family: var(--display); font-size: clamp(1.35rem, 4vw, 1.7rem); color: var(--pine-deep); }
.modal-actions {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; margin-top: 1rem;
  position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%);
  padding-top: .75rem;
}

.toast-host { position: fixed; right: 1.2rem; top: 1.2rem; z-index: 80; display: grid; gap: .5rem; }
.toast {
  background: var(--pine-deep); color: #fff; padding: .75rem 1rem; border-radius: 12px;
  box-shadow: var(--shadow); min-width: 220px; animation: rise .2s ease;
}
.toast.error { background: var(--danger); }

.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    linear-gradient(120deg, rgba(12,34,28,.72), rgba(47,111,122,.45)),
    radial-gradient(ellipse at 30% 20%, rgba(232,201,122,.35), transparent 50%),
    linear-gradient(160deg, #0c221c, #2f6f7a);
}
.login-card {
  width: min(420px, 100%); background: rgba(255,255,255,.94); border-radius: 28px;
  padding: 2rem 1.75rem; box-shadow: var(--shadow);
}
.login-card h1 {
  margin: 0; font-family: var(--display); font-size: 2.3rem; color: var(--pine-deep); text-align: center;
}
.login-card .tagline { text-align: center; color: var(--muted); margin: .35rem 0 1.5rem; }
.password-field { position: relative; display: flex; align-items: center; }
.password-field .input { padding-right: 4.25rem; width: 100%; }
.password-toggle {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: var(--lake); font-weight: 600; font-size: .82rem; padding: .35rem .55rem;
  border-radius: 8px; line-height: 1;
}
.password-toggle:hover { background: rgba(13,107,124,.08); }
.password-toggle:focus-visible { outline: 2px solid var(--lake); outline-offset: 1px; }

/* Itinerary templates (Settings gallery + booking picker) */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .85rem; }
.tpl-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; background: #fff; transition: box-shadow .15s, border-color .15s;
}
.tpl-card:hover { box-shadow: var(--shadow); }
.tpl-card.is-default, .tpl-card.is-selected { border-color: var(--lake); box-shadow: 0 0 0 2px var(--lake); }
.tpl-swatches { display: flex; height: 54px; }
.tpl-swatches span { flex: 1; }
.tpl-swatches span:first-child { flex: 2; }
.tpl-body { padding: .7rem .85rem .35rem; flex: 1; }
.tpl-body strong { display: block; color: var(--pine-deep); }
.tpl-body p { margin: .2rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.35; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .55rem .85rem .8rem; }
.director-preview {
  width: 120px; height: 120px; display: block; margin: 0 auto; border-radius: 50%;
  object-fit: cover; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--lake);
}
.pdf-template-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pdf-template-bar select { min-width: 220px; }

.day-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 1rem; margin-bottom: .75rem; background: #fff;
  transition: box-shadow .15s, border-color .15s, opacity .15s;
}
.day-cover-thumbs {
  display: flex; gap: .45rem; margin: .55rem 0 .15rem; flex-wrap: wrap;
}
.day-cover-thumbs img {
  width: 72px; height: 52px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: #e8efed;
}
.day-card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.day-card--draggable { cursor: grab; }
.day-card--draggable.is-dragging { opacity: .55; cursor: grabbing; box-shadow: var(--shadow); }
.day-card.drag-over { border-color: var(--lake); box-shadow: 0 0 0 2px rgba(13,107,124,.2); }
.day-drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; min-height: 2.5rem; color: var(--muted); font-size: 1.25rem;
  cursor: grab; user-select: none; touch-action: none; flex-shrink: 0;
}
.pricing-staff { background: linear-gradient(135deg, rgba(13,107,124,.05), rgba(201,162,39,.06)); }
.day-cost-chip {
  display: inline-block; padding: .25rem .55rem; border-radius: 8px;
  background: rgba(13,107,124,.08); color: var(--pine);
  max-width: 100%; word-break: break-word;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3dd68c; display: inline-block;
  box-shadow: 0 0 0 0 rgba(61,214,140,.7); animation: pulse 1.8s infinite; margin-right: .4rem;
}

.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
/* Grid cells may shrink below their content (wide tables scroll inside their own .table-wrap instead of widening the page) */
.split > *, .grid-2 > *, .grid-3 > *, .report-grid > *, .stats > * { min-width: 0; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: .35rem .75rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,214,140,.55); }
  70% { box-shadow: 0 0 0 10px rgba(61,214,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,214,140,0); }
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .grid-3 { grid-template-columns: 1fr; }
}

.btn-icon {
  appearance: none; border: 1px solid var(--line); background: #fff;
  border-radius: 12px; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer;
  display: none; align-items: center; justify-content: center; flex-shrink: 0;
}
.mobile-only { display: none; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(12,34,28,.45);
  z-index: 40; backdrop-filter: blur(3px);
}
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag-chip {
  display: inline-flex; padding: .25rem .55rem; border-radius: 999px; font-size: .75rem;
  background: rgba(74,109,140,.12); color: var(--lake); border: 1px solid rgba(74,109,140,.2);
}
.tag-chip.selected { background: var(--lake); color: #fff; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.bar-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; font-size: .88rem; }
.bar-label { min-width: 5.5rem; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bar-val { min-width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; font-size: .82rem; }
.bar-track { flex: 1; height: 8px; background: rgba(74,109,140,.12); border-radius: 999px; overflow: hidden; min-width: 0; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--lake), var(--kbt-blue)); border-radius: 999px; transition: width .35s ease; }

/* Executive performance board */
.ep-board { margin-bottom: 1.75rem; }
.ep-head { margin-bottom: 1rem; }
.ep-title { margin: 0 0 .25rem; font-size: 1.35rem; color: var(--pine); font-family: var(--display); }
.ep-sub { margin: 0; font-size: .88rem; max-width: 40rem; line-height: 1.45; }
.ep-section-title { margin: 0 0 .85rem; font-size: 1.1rem; color: var(--pine); font-family: var(--display); }
.ep-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: .65rem;
  margin-bottom: 1rem;
}
.ep-metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .85rem .9rem;
  box-shadow: 0 8px 24px rgba(6, 42, 50, 0.06);
}
.ep-metric-val { font-size: 1.25rem; font-weight: 700; color: var(--pine); font-variant-numeric: tabular-nums; line-height: 1.2; word-break: break-word; }
.ep-metric-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: .2rem; }
.ep-metric-hint { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.ep-warn { color: var(--danger); font-style: normal; font-weight: 600; }
.ep-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ep-panel { min-width: 0; }
.ep-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem .75rem; align-items: baseline; margin-bottom: .85rem; }
.ep-leaderboard { display: grid; gap: .65rem; }
.ep-lead-row { display: flex; gap: .65rem; align-items: flex-start; }
.ep-lead-body { flex: 1; min-width: 0; }
.ep-lead-body .bar-row { margin-bottom: 0; }
.ep-lead-body .bar-label { display: none; }
.ep-lead-top { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; margin-bottom: .35rem; }
.ep-lead-name { font-weight: 600; flex: 1; min-width: 0; }
.ep-role-tag {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .03em;
  padding: .15rem .4rem; border-radius: 6px;
  background: rgba(10, 61, 72, 0.08); color: var(--pine);
}
.ep-rank {
  flex-shrink: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; background: rgba(10,61,72,.1); color: var(--pine);
}
.ep-rank-1 { background: linear-gradient(145deg, #c9a227, #e8c97a); color: #3a2a00; }
.ep-rank-2 { background: linear-gradient(145deg, #8a9aa3, #c5d0d5); color: #1a2428; }
.ep-rank-3 { background: linear-gradient(145deg, #b06a3c, #d4a07a); color: #2a1508; }
.ep-legend { display: flex; flex-wrap: wrap; gap: .45rem .85rem; margin-bottom: .75rem; font-size: .78rem; }
.ep-legend-item { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.ep-legend-item i { width: .65rem; height: .65rem; border-radius: 2px; display: inline-block; }
.ep-months { display: grid; gap: .45rem; }
.ep-month-row { display: grid; grid-template-columns: 5.5rem 1fr 4.5rem; gap: .5rem; align-items: center; font-size: .8rem; }
.ep-month-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-month-total { text-align: right; font-size: .78rem; }
.ep-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: rgba(74,109,140,.1); min-width: 0; }
.ep-stack-seg { height: 100%; min-width: 3px; }
.ep-stack-empty { flex: 1; }
.ep-compare { margin-bottom: 1rem; }
.ep-compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.ep-compare-label { font-size: .78rem; font-weight: 600; color: var(--pine); margin-bottom: .55rem; }
.ep-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.ep-card { padding: 1rem 1.05rem; display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.ep-card-head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.ep-card-id { display: flex; gap: .55rem; align-items: flex-start; min-width: 0; }
.ep-card-id h3 { margin: 0; font-size: 1.05rem; color: var(--pine); line-height: 1.25; }
.ep-card-rev { text-align: right; flex-shrink: 0; }
.ep-card-rev-val { font-size: 1.15rem; font-weight: 700; color: var(--ok); }
.ep-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .45rem;
}
.ep-card-stats > div {
  background: rgba(10, 61, 72, 0.04);
  border-radius: 10px;
  padding: .5rem .45rem;
  text-align: center;
  min-width: 0;
}
.ep-card-stats b {
  display: block; font-size: .92rem; color: var(--pine);
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ep-card-stats span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ep-card-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.ep-chip {
  font-size: .72rem; padding: .2rem .45rem; border-radius: 999px;
  background: rgba(74,109,140,.1); color: var(--lake);
}
.ep-chip-ok { background: rgba(31,122,77,.12); color: var(--ok); }
.ep-chip-trip { background: rgba(13,107,124,.14); color: var(--lake); }
.ep-chip-done { background: rgba(10,61,72,.1); color: var(--pine); }
.ep-chip-quote { background: rgba(201,162,39,.18); color: #7a5e10; }
.ep-chip-bad { background: rgba(180,35,24,.1); color: var(--danger); }
.ep-card-foot {
  display: flex; flex-wrap: wrap; gap: .35rem .75rem;
  font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .65rem;
}
.ep-mini-bars { display: grid; gap: .25rem; }
.ep-mini-bars .bar-label { min-width: 4.5rem; font-size: .75rem; }

/* Reports tabs + leads performance */
.report-tabs { margin-bottom: 1.1rem; }
.lp-funnel { margin-bottom: 1rem; }
.lp-funnel-track {
  display: flex; align-items: flex-end; gap: .55rem;
  min-height: 160px; padding-top: .5rem;
}
.lp-funnel-step {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: .45rem; min-width: 0; flex: 1;
}
.lp-funnel-bar {
  width: 100%; max-width: 72px; min-height: 12px; border-radius: 10px 10px 4px 4px;
  margin: 0 auto; transition: height .35s ease;
}
.lp-funnel-meta { text-align: center; font-size: .75rem; color: var(--muted); }
.lp-funnel-meta b { display: block; font-size: 1.05rem; color: var(--pine); }
.lp-funnel-meta em { font-style: normal; opacity: .85; }
.lp-funnel-mobile { display: none; margin-top: .5rem; }
.lp-month-row {
  display: grid; grid-template-columns: 5.5rem 1fr auto; gap: .5rem;
  align-items: center; font-size: .8rem; margin-bottom: .45rem;
}
.lp-month-bars {
  position: relative; height: 14px; border-radius: 7px;
  background: rgba(74,109,140,.08); overflow: hidden;
}
.lp-month-base, .lp-month-won, .lp-month-lost {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px;
}
.lp-month-base { background: rgba(61,126,166,.45); }
.lp-month-won { background: #1b6b5a; }
.lp-month-lost { background: #b45309; opacity: .9; }
.lp-source-row { margin-bottom: .55rem; }
.lp-source-row .bar-row { margin-bottom: .15rem; }
.lp-source-meta { font-size: .72rem; padding-left: calc(5.5rem + .75rem); margin-bottom: .15rem; }
.lp-card .ep-card-rev-val { color: var(--pine); }

@media (max-width: 960px) {
  .lp-funnel-track { display: none; }
  .lp-funnel-mobile { display: block; }
  .lp-month-row { grid-template-columns: 4.5rem 1fr; }
  .lp-month-row .ep-month-total { grid-column: 2; text-align: left; font-size: .75rem; }
  .lp-source-meta { padding-left: 0; }
}

/* Lead follow-ups board */
.fu-board { margin-bottom: 1.15rem; }
.fu-board-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
  align-items: flex-start; margin-bottom: .85rem;
}
.fu-title { margin: 0 0 .2rem; font-size: 1.15rem; color: var(--pine); font-family: var(--display); }
.fu-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.fu-filters .btn.active { background: var(--pine); color: #fff; border-color: var(--pine); }
.fu-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .55rem; margin-bottom: .85rem;
}
.fu-kpi {
  background: rgba(10,61,72,.04); border-radius: 12px; padding: .65rem .75rem; text-align: center;
}
.fu-kpi b { display: block; font-size: 1.2rem; color: var(--pine); }
.fu-kpi span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fu-list { display: grid; gap: .55rem; }
.fu-row {
  display: flex; flex-wrap: wrap; gap: .65rem; justify-content: space-between; align-items: center;
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.fu-row.is-overdue { border-color: rgba(180,35,24,.35); background: rgba(180,35,24,.04); }
.fu-row-main { min-width: 0; flex: 1; }
.fu-row-top { display: flex; flex-wrap: wrap; gap: .35rem .55rem; align-items: center; margin-bottom: .2rem; }
.fu-channel {
  font-size: .72rem; padding: .12rem .4rem; border-radius: 999px;
  background: rgba(13,107,124,.12); color: var(--lake);
}
.fu-flag {
  font-size: .72rem; font-weight: 700; color: var(--danger);
  text-transform: uppercase; letter-spacing: .04em;
}
.fu-row-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.fu-lead-box {
  margin: .75rem 0 0; padding: .75rem .85rem; border: 1px dashed var(--line); border-radius: 12px;
  background: rgba(10,61,72,.03);
}
.fu-lead-head { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: .55rem; }
.fu-lead-head strong { flex: 1; color: var(--pine); }
.fu-mini {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .45rem; align-items: center;
  padding: .45rem 0; border-top: 1px solid var(--line); font-size: .88rem;
}
.fu-mini.is-overdue b { color: var(--danger); }
.fu-mini-actions { display: flex; gap: .3rem; }

@media (max-width: 960px) {
  .fu-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .fu-row { align-items: flex-start; }
  .fu-row-actions { width: 100%; }
}
.star-rating { display: flex; gap: .35rem; font-size: 1.6rem; }
.star-rating button { background: none; border: none; cursor: pointer; opacity: .35; padding: 0; }
.star-rating button.on { opacity: 1; color: var(--saffron); }
.login-logo { max-width: 140px; max-height: 140px; width: 140px; height: 140px; object-fit: contain; margin: 0 auto 1rem; display: block; background: #fff; padding: 6px; border-radius: 50%; box-shadow: 0 0 0 4px #0033cc, 0 0 0 7px #e11d2e; }
.login-veloz { text-align: center; margin-top: 1.5rem; font-size: .78rem; color: rgba(255,255,255,.65); }
.login-veloz a { color: rgba(255,255,255,.85); }

@media (max-width: 960px) {
  .mobile-only { display: inline-flex; }
  .btn-icon.mobile-only { display: inline-flex; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: min(var(--sidebar), 86vw);
    transform: translateX(-105%); transition: transform .25s ease;
    height: 100dvh; max-height: 100dvh; overflow-y: auto;
    padding-top: max(1.4rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .nav { flex-direction: column; }
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .topbar {
    padding: .85rem 1rem;
    padding-top: max(.85rem, env(safe-area-inset-top, 0px));
    gap: .65rem; position: sticky; top: 0; z-index: 30;
    background: rgba(244,248,247,.92); backdrop-filter: blur(10px);
  }
  .page-title { font-size: 1.4rem; line-height: 1.2; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content {
    padding: .5rem 1rem 2.5rem;
    padding-bottom: max(2.5rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
  }
  .stats { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .stat-value { font-size: 1.65rem; }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
  .ep-layout { grid-template-columns: 1fr; }
  .ep-compare-grid { grid-template-columns: 1fr; }
  .ep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ep-month-row { grid-template-columns: 4.5rem 1fr 3.75rem; gap: .35rem; }
  .ep-cards { grid-template-columns: 1fr; }
  .split, .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .modal {
    width: 100%; max-height: min(92dvh, 100%);
    border-radius: 18px 18px 0 0; align-self: flex-end;
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .modal.wide { width: 100%; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-actions { justify-content: stretch; }
  .modal-actions .btn { flex: 1; min-height: 44px; text-align: center; }
  .toast-host {
    left: 1rem; right: 1rem; top: auto;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
  .toast { min-width: 0; width: 100%; }
  table.data { font-size: .85rem; }
  table.data th, table.data td { padding: .65rem .5rem; }
  .kv { grid-template-columns: 1fr; }
  .toolbar { gap: .5rem; }
  .toolbar .btn, .toolbar .btn-sm { min-height: 40px; }
  .panel { padding: 1rem; }
  .brand-name { font-size: 1.25rem; }
  .login-card { padding: 1.5rem 1.15rem; border-radius: 22px; }
  .login-card h1 { font-size: clamp(1.45rem, 6vw, 2rem); }
  .login-logo { width: 112px; height: 112px; max-width: 112px; max-height: 112px; }
  .day-card .toolbar { align-items: flex-start; }
  .day-card h3 { font-size: .98rem; line-height: 1.3; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
  .catalog-pkg-head { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .notif-panel {
    left: 12px; right: 12px; width: auto;
    top: max(56px, calc(env(safe-area-inset-top, 0px) + 48px));
  }
  .veloz-footer { font-size: .72rem; padding: .75rem .75rem 1.5rem; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .spacer { display: none; }
  .toolbar .btn, .toolbar a.btn { width: 100%; text-align: center; justify-content: center; }
  /* Search boxes and filters in a stacked toolbar line up with the buttons (overrides inline max-widths) */
  .toolbar > .input, .toolbar > .select, .toolbar > input, .toolbar > select { width: 100%; max-width: none !important; }
  .topbar-actions { gap: .35rem; }
  .btn-sm { padding: .5rem .85rem; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .dash-quicklinks { grid-template-columns: repeat(2, 1fr); }
  .dash-mini-stats { grid-template-columns: 1fr 1fr; }
  .dash-hero { padding: 1rem; }
  .dash-hero-title { font-size: 1.15rem; }
  .kanban-col { flex: 0 0 85vw; min-width: 85vw; }
  .act-row, .form-row { display: grid !important; grid-template-columns: 1fr !important; gap: .45rem; }
  .pricing-staff .grid-3 { grid-template-columns: 1fr; }
  .day-cost-chip { display: block; }
}

/* Touch devices: larger hit areas, less hover-dependent affordances */
@media (hover: none) and (pointer: coarse) {
  .btn, .tab, .nav-link, .catalog-card { min-height: 44px; }
  .btn:hover, .catalog-card:hover, .dash-qlink:hover { transform: none; }
  .day-card--draggable { cursor: grab; }
  .input, .select, .textarea { padding: .8rem .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Features 200 dashboard */
.features-summary .stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.features-summary .stat { background: var(--card); padding: .75rem 1.25rem; border-radius: 12px; min-width: 100px; }
.features-summary .stat strong { display: block; font-size: 1.5rem; }
.features-summary .stat-ok strong { color: var(--ok); }
.features-summary .stat-warn strong { color: var(--saffron); }
.features-filters { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.features-filters .btn.active { background: var(--pine); color: #fff; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .65rem; }
.feature-card { background: var(--card); border-radius: 12px; padding: .75rem; border: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; font-size: .88rem; }
.feature-card.ok { border-left: 3px solid var(--ok); }
.feature-card.fail { border-left: 3px solid var(--danger); }
.feature-card .feature-id { font-size: .75rem; color: var(--muted); }

/* Dashboard pipeline + kanban */
.dash-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1.25rem 1.4rem; }
.dash-hero-title { margin: 0; font-family: var(--display); font-size: 1.35rem; color: var(--pine-deep); }
.dash-hero-sub { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; max-width: 42rem; }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.dash-quicklinks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.dash-qlink {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .85rem .5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: center;
  font-size: .82rem; font-weight: 600; color: var(--pine); transition: transform .15s, box-shadow .15s;
}
.dash-qlink:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--lake); }
.dash-qicon { font-size: 1.25rem; line-height: 1; }

.dash-visual { margin-bottom: 1rem; padding: 1.1rem 1.25rem; }
.dash-visual-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; }
.dash-bars { display: grid; gap: .45rem; margin-bottom: 1rem; }
.dash-bar-row { display: grid; grid-template-columns: 110px 1fr 28px; gap: .6rem; align-items: center; font-size: .82rem; }
.dash-bar-label { color: var(--muted); }
.dash-bar-track { height: 8px; background: rgba(20,53,44,.08); border-radius: 99px; overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.dash-bar-count { font-weight: 700; text-align: right; color: var(--pine); }
.dash-mini-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.dash-mini-stat {
  display: block; padding: .75rem; border-radius: 12px; background: rgba(255,255,255,.55);
  border: 1px solid var(--line); text-align: center;
}
.dash-mini-stat:hover { background: #fff; }
.dash-mini-val { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--pine); }
.dash-mini-label { display: block; font-size: .72rem; color: var(--muted); margin-top: .15rem; text-transform: uppercase; letter-spacing: .06em; }

.dash-kanban-wrap { overflow: hidden; }
.kanban { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; min-height: 320px; align-items: flex-start; }
.kanban-col { flex: 0 0 240px; min-width: 240px; background: rgba(255,255,255,.45); border: 1px solid var(--line); border-radius: 14px; }
.kanban-col-head {
  display: flex; justify-content: space-between; align-items: center; padding: .65rem .75rem;
  border-bottom: 3px solid var(--stage-color, var(--lake)); border-radius: 14px 14px 0 0;
  background: rgba(255,255,255,.7);
}
.kanban-col-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pine); }
.kanban-col-count { font-size: .75rem; background: var(--pine); color: #fff; border-radius: 99px; padding: .1rem .45rem; min-width: 1.4rem; text-align: center; }
.kanban-col-body { padding: .55rem; display: grid; gap: .5rem; max-height: 480px; overflow-y: auto; min-height: 72px; transition: background .15s, box-shadow .15s; }
.kanban-col-body.is-drag-over {
  background: rgba(74,109,140,.12);
  box-shadow: inset 0 0 0 2px rgba(74,109,140,.35);
  border-radius: 10px;
}
.kanban-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(12,34,28,.06); display: grid; grid-template-columns: auto 1fr;
  align-items: stretch; transition: opacity .15s, transform .15s;
}
.kanban-card.is-dragging { opacity: .45; transform: scale(.98); }
.kanban-drag-handle {
  display: flex; align-items: center; justify-content: center; width: 28px; cursor: grab;
  color: var(--muted); font-size: 1rem; user-select: none; touch-action: none;
  border-right: 1px solid var(--line); background: rgba(20,53,44,.03);
}
.kanban-drag-handle:active { cursor: grabbing; color: var(--lake); }
.kanban-card-link { display: block; padding: .65rem .7rem; color: inherit; min-width: 0; }
.kanban-card-link:hover { background: rgba(74,109,140,.06); }
.kanban-card-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.kanban-card-sub { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.kanban-card-meta { font-size: .72rem; color: var(--lake); margin-top: .35rem; line-height: 1.35; }
.kanban-empty {
  text-align: center; color: var(--muted); font-size: .82rem; padding: 1.25rem .5rem;
  border: 2px dashed rgba(20,53,44,.12); border-radius: 10px;
}

.journey-stepper { display: flex; flex-wrap: wrap; gap: .35rem 0; margin-top: .5rem; }
.journey-step { display: flex; align-items: center; gap: .35rem; flex: 1 1 auto; min-width: 80px; font-size: .72rem; color: var(--muted); position: relative; padding-right: .5rem; }
.journey-step:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 50%; width: 12px; height: 2px; background: var(--line); transform: translateY(-50%); }
.journey-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.journey-step.done .journey-dot { background: var(--ok); }
.journey-step.active .journey-dot { background: var(--lake); box-shadow: 0 0 0 3px rgba(74,109,140,.25); }
.journey-step.active .journey-label { color: var(--pine); font-weight: 700; }
.cust-journey-panel { margin-bottom: 1rem; }

/* Catalog (hotels / cabs / destinations) */
.catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.25rem;
}
.catalog-stack {
  display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.25rem;
}
.catalog-item {
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow); overflow: hidden;
}
.catalog-item.is-open { outline: 2px solid var(--lake); }
.catalog-item-head {
  appearance: none; width: 100%; display: grid; grid-template-columns: 96px 1fr auto;
  gap: .85rem; align-items: center; border: 0; background: transparent;
  padding: .65rem .85rem; cursor: pointer; color: inherit; font: inherit; text-align: left;
}
.catalog-item-head:hover { background: rgba(74,109,140,.06); }
.catalog-item-media {
  width: 96px; height: 72px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(26,51,68,.2), rgba(200,151,58,.2));
  background-size: cover; background-position: center; flex-shrink: 0;
}
.catalog-item-main { min-width: 0; }
.catalog-item-main strong { display: block; }
.catalog-item-chevron {
  font-size: 1.1rem; color: var(--muted); transition: transform .2s ease; padding: 0 .25rem;
}
.catalog-item.is-open .catalog-item-chevron { transform: rotate(180deg); color: var(--pine); }
.catalog-item-body {
  border-top: 1px solid var(--line); padding: 1rem 1.1rem 1.15rem;
  background: rgba(255,255,255,.45); animation: catalogExpand .22s ease;
}
@keyframes catalogExpand {
  from { opacity: .4; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.catalog-card {
  appearance: none; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  padding: 0; overflow: hidden; text-align: left; cursor: pointer; color: inherit; font: inherit;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.catalog-card:hover { transform: translateY(-2px); }
.catalog-card.active { outline: 2px solid var(--lake); }
.catalog-card-media {
  height: 120px; background: linear-gradient(135deg, rgba(26,51,68,.2), rgba(200,151,58,.2));
  background-size: cover; background-position: center;
}
.catalog-card-body { padding: .85rem 1rem 1rem; }
.catalog-card-meta { font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.catalog-detail { margin-top: .5rem; }
.catalog-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.catalog-photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.catalog-upload-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .35rem 0 .75rem; }
.catalog-photo-tile {
  position: relative; width: 112px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #fff;
}
.catalog-photo-tile.is-cover { border-color: var(--pine); box-shadow: 0 0 0 2px rgba(74,109,140,.25); }
.catalog-photo-tile img { display: block; width: 112px; height: 84px; object-fit: cover; border: 0; border-radius: 0; }
.catalog-photo-badge {
  position: absolute; top: 4px; left: 4px; font-size: .65rem; font-weight: 700;
  background: var(--pine); color: #fff; padding: .15rem .4rem; border-radius: 6px;
}
.catalog-photo-actions {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: rgba(255,255,255,.95);
  border-top: 1px solid var(--line);
}
.catalog-photo-actions .btn-xs { padding: .15rem .35rem; font-size: .68rem; min-height: 0; line-height: 1.2; }
.catalog-photos.empty-gallery { min-height: 48px; align-items: center; }
.guide-photo-strip { display: flex; gap: .45rem; overflow-x: auto; padding: .35rem 0 .6rem; -webkit-overflow-scrolling: touch; }
.guide-photo-strip img {
  flex: 0 0 auto; width: 120px; height: 80px; object-fit: cover; border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
}
.catalog-pkg-list { display: grid; gap: .85rem; }
.catalog-pkg {
  border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: rgba(255,255,255,.6);
}
.catalog-pkg.inactive { opacity: .55; }
.catalog-pkg-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.catalog-pkg-rate { font-weight: 700; color: var(--pine); white-space: nowrap; }
.catalog-incl {
  white-space: pre-wrap; font: inherit; font-size: .85rem; background: #f4f7f6; padding: .55rem .7rem;
  border-radius: 8px; margin: .35rem 0;
}
.catalog-facilities { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.catalog-facility {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: .3rem .65rem;
  border-radius: 999px; background: rgba(74,109,140,.12); color: var(--pine); border: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .dash-quicklinks { grid-template-columns: repeat(3, 1fr); }
  .dash-mini-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .dash-quicklinks { grid-template-columns: repeat(2, 1fr); }
  .dash-mini-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-bar-row { grid-template-columns: 90px 1fr 24px; }
}

/* Dark mode (Ctrl+Shift+D) */
html[data-theme="dark"] {
  --ink: #e8eef0;
  --muted: #9ab0a8;
  --line: rgba(255,255,255,.08);
  --card: rgba(20, 40, 50, 0.92);
  --snow: #0f2230;
}
html[data-theme="dark"] body {
  background: linear-gradient(165deg, #0f2230 0%, #1a3344 50%, #152028 100%);
  color: var(--ink);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] table.data { color: var(--ink); }
html[data-density="compact"] table.data th,
html[data-density="compact"] table.data td { padding: .4rem .5rem; font-size: .82rem; }

/* CRM / Guide install banner — once per IP */
.pwa-install-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.pwa-install-banner.is-visible { transform: translateY(0); pointer-events: auto; }
.pwa-install-card {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  max-width: 520px; margin: 0 auto;
  background: #0a3a42; color: #eef6f3;
  border-radius: 18px; padding: .85rem 1rem;
  box-shadow: 0 16px 40px rgba(6, 30, 34, .45);
  border: 1px solid rgba(255,255,255,.12);
}
.pwa-install-icon {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  background: #fff; flex-shrink: 0;
}
.pwa-install-copy { flex: 1; min-width: 140px; }
.pwa-install-copy strong { display: block; font-size: .95rem; margin-bottom: .15rem; }
.pwa-install-hint { margin: 0; font-size: .78rem; line-height: 1.35; opacity: .88; }
.pwa-install-actions { display: flex; gap: .4rem; align-items: center; margin-left: auto; }
.pwa-install-btn {
  appearance: none; border: none; border-radius: 999px;
  padding: .55rem .95rem; font: inherit; font-weight: 700; font-size: .85rem;
  background: linear-gradient(135deg, #c8973a, #b8842f); color: #fff; cursor: pointer;
}
.pwa-install-dismiss {
  appearance: none; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  padding: .5rem .75rem; font: inherit; font-size: .78rem;
  background: transparent; color: #cfe3df; cursor: pointer;
}

/* Date fields (day month year picker) */
.kbt-date-alt { background-color: #fff; cursor: pointer; }
.kbt-date-alt[disabled] { cursor: not-allowed; opacity: .7; }
.flatpickr-calendar { font-family: inherit; z-index: 100000; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--lake, #0d6b7c); border-color: var(--lake, #0d6b7c); }

[hidden] { display: none !important; }

/* ─── Itinerary tab — compact layout ─────────────────────────────────── */
.itin-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .85rem; }
.itin-head h2 { font-size: 1.1rem; margin: 0; line-height: 1.3; }
/* Title takes its own line on phones; the buttons wrap below it instead of crushing it */
.itin-head-title { min-width: 0; flex: 1 1 16rem; }
.itin-head .itin-sub { color: var(--muted); font-size: .85rem; }
.itin-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin-bottom: .85rem; overflow: hidden; }
.itin-strip > div { padding: .8rem 1rem; border-left: 1px solid var(--line); min-width: 0; }
.itin-strip > div:first-child { border-left: 0; }
.itin-k { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.itin-v { font-size: 1.08rem; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itin-v small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.itin-link { background: none; border: 0; padding: 0; color: var(--lake, #0d6b7c); font-size: .8rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.itin-margin { display: flex; gap: .35rem; align-items: center; }
.itin-margin .input { padding: .3rem .5rem; height: auto; max-width: 8.5rem; }
.itin-drawer { margin-bottom: .85rem; }
.itin-more { position: relative; }
.itin-more > summary { list-style: none; }
.itin-more > summary::-webkit-details-marker { display: none; }
.itin-menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 40; width: min(27rem, 92vw);
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(6, 42, 50, .14); padding: 1rem; }
.itin-menu h4 { margin: 0 0 .45rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.itin-menu section + section { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .85rem; }
.itin-days { padding: .25rem .6rem; }
.itin-days .day-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: .8rem .4rem;
  display: grid; grid-template-columns: auto 1fr auto; gap: 0 .65rem; align-items: start; background: transparent; }
.itin-days .day-card:last-child { border-bottom: 0; }
.itin-days .day-card.drag-over { border-radius: 10px; }
.itin-days .day-drag-handle { width: 1.3rem; min-height: 1.6rem; font-size: 1rem; opacity: .45; }
.itin-days .day-card:hover .day-drag-handle { opacity: 1; }
.itin-day-top { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.itin-day-no { font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: var(--pine); background: rgba(13, 107, 124, .09); border-radius: 999px; padding: .12rem .5rem; white-space: nowrap; }
.itin-day-title { font-weight: 600; font-size: .98rem; }
.itin-day-meta { color: var(--muted); font-size: .84rem; margin-top: .2rem; }
.itin-dot { margin: 0 .35rem; opacity: .5; }
.itin-day-acts { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.itin-day-side { text-align: right; white-space: nowrap; }
.itin-day-cost { font-weight: 600; font-size: .9rem; cursor: help; }
.itin-day-btns { display: flex; gap: .25rem; justify-content: flex-end; margin-top: .3rem; opacity: .55; transition: opacity .15s; }
.itin-days .day-card:hover .itin-day-btns { opacity: 1; }
.itin-day-btns .btn { padding: .2rem .55rem; font-size: .78rem; }
@media (max-width: 860px) {
  .itin-strip { grid-template-columns: 1fr 1fr; }
  .itin-strip > div:nth-child(3) { border-left: 0; }
  .itin-strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* Settings → Leads from Google Sheet */
#sheetLeadsPanel .sl-h{font-family:var(--display);color:var(--pine);display:flex;align-items:center;gap:.5rem}
#sheetLeadsPanel .sl-warn{background:#fff7e6;border:1px solid #f3d19c;color:#8a5a00;border-radius:10px;padding:.55rem .8rem;font-size:.88rem;margin:0 0 1rem}
#sheetLeadsPanel .sl-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem;align-items:end;margin:0 0 .75rem}
#sheetLeadsPanel .sl-stats span{display:block;font-size:.78rem}
#sheetLeadsPanel .sl-setup>summary{cursor:pointer;font-weight:600;color:var(--pine);margin:.25rem 0 .75rem}
#sheetLeadsPanel .sl-row{display:flex;gap:.75rem;margin:0 0 1rem}
#sheetLeadsPanel .sl-step{flex:none;width:1.6rem;height:1.6rem;border-radius:50%;display:grid;place-items:center;font-size:.8rem;font-weight:700;background:var(--line);color:var(--pine)}
#sheetLeadsPanel .sl-step.done{background:var(--pine);color:#fff}
#sheetLeadsPanel .sl-ol{margin:.4rem 0 .6rem;padding-left:1.2rem;font-size:.88rem;line-height:1.55}
#sheetLeadsPanel .sl-code{max-height:220px;overflow:auto;background:#0f1d26;color:#d7e6ee;border-radius:10px;padding:.8rem;font-size:.74rem;line-height:1.45;white-space:pre;margin:0}
#sheetLeadsPanel .sl-copy{position:absolute;top:.4rem;right:.6rem;background:#fff;font-size:.78rem;padding:.25rem .6rem}
#sheetLeadsPanel .sl-test{border-radius:10px;padding:.6rem .85rem;margin-top:.75rem;font-size:.88rem}
#sheetLeadsPanel .sl-test.ok{background:#eef8f1;border:1px solid #b9dfc6}
#sheetLeadsPanel .sl-test.bad{background:#fdeeee;border:1px solid #f0b8b8}
#sheetLeadsPanel .sl-test ul{margin:.3rem 0;padding-left:1.1rem}

/* "Receive leads" switch (Dashboard + Users) */
.rl-switch{position:relative;display:inline-block;width:2.4rem;height:1.35rem;flex:none;cursor:pointer}
.rl-switch input{opacity:0;width:0;height:0;position:absolute}
.rl-switch span{position:absolute;inset:0;border-radius:999px;background:#cfd6da;transition:background .15s}
.rl-switch span::before{content:"";position:absolute;width:1.05rem;height:1.05rem;left:.15rem;top:.15rem;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.rl-switch input:checked+span{background:#12805c}
.rl-switch input:checked+span::before{transform:translateX(1.05rem)}
.rl-switch input:disabled+span{opacity:.45;cursor:not-allowed}
.rl-switch input:focus-visible+span{outline:2px solid var(--pine);outline-offset:2px}
.rl-switch.rl-lg{width:3rem;height:1.65rem}
.rl-switch.rl-lg span::before{width:1.3rem;height:1.3rem;left:.18rem;top:.18rem}
.rl-switch.rl-lg input:checked+span::before{transform:translateX(1.35rem)}

/* WhatsApp → Link with phone number (pairing code) */
.wa-code-box{border:1px solid var(--line);border-radius:12px;padding:.9rem 1rem;margin:.2rem 0 .8rem;background:#fbfaf6;text-align:center}
.wa-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:2rem;font-weight:700;letter-spacing:.18em;color:var(--pine,#0d3b4f);margin:.25rem 0 .45rem;user-select:all}

/* "⋯ More" menu on the Itinerary tab: on phones a full-width sheet under the header,
   instead of a dropdown that runs off the left edge (kept last so it wins over the base rules) */
@media (max-width: 640px) {
  .itin-head { position: relative; }
  .itin-more { position: static; }
  .itin-menu { left: 0; right: 0; width: auto; }
}

/* Attendance — offices & geofence */
.att-office-list { list-style: none; margin: .7rem 0 0; padding: 0; font-size: .86rem; display: grid; gap: .3rem; }
.att-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .45rem; vertical-align: middle; }
.att-offices { display: grid; gap: .55rem; }
.att-office { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
.att-office.is-off { opacity: .6; }
.att-office > div:first-child { min-width: 0; }
.att-office-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.att-editor { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: var(--card); }
/* Attendance log filters: the date picker's display field doesn't copy the inline width */
@media (min-width: 521px) {
  #attendanceRoot .toolbar > .input, #attendanceRoot .toolbar > .select { max-width: 180px; }
}

/* Itinerary: price warning + travel-dates banner */
.itin-warn { margin-top: .35rem; font-size: .78rem; color: #b42318; line-height: 1.35; }
.itin-banner { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff7e6; border: 1px solid #f3d08a; border-left: 4px solid #d18b00; border-radius: 12px; padding: .7rem .9rem; margin-bottom: .85rem; font-size: .88rem; }
.itin-banner > div { flex: 1 1 22rem; min-width: 0; }

/* Itinerary: pricing checks */
.pc-box { background: #fff5f3; border: 1px solid #f2c4bb; border-left: 4px solid #c2410c; border-radius: 12px; padding: .7rem .95rem; margin-bottom: .85rem; font-size: .88rem; }
.pc-head { margin-bottom: .3rem; }
.pc-box ul { margin: 0; padding-left: 1.1rem; }
.pc-box li { margin: .2rem 0; }
