/* LimaPOS Consulting — scaffold styling. Deliberately small; shares the
   core's Deep Navy palette so the module reads as one product. */
:root {
  --navy: #1e3a5f; --navy-dk: #16293f; --blue: #3b82f6; --blue-dk: #2563eb;
  --ink: #1e293b; --muted: #64748b; --line: #e2e8f0; --surface: #f1f5f9;
  --ok: #047857; --warn: #b45309; --card: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--surface); color: var(--ink); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: var(--blue-dk); text-decoration: none; }

/* Marketing header — used ONLY by the public landing page (views/pages/landing.php). */
.topbar { background: linear-gradient(135deg, var(--navy), var(--navy-dk)); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.brand b { font-weight: 800; }
.brand .dot { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--blue), #4f46e5);
  box-shadow: 0 4px 12px rgba(59,130,246,.5); }
.tabs { display: flex; gap: 18px; margin-left: 8px; }
.tabs a { color: rgba(255,255,255,.72); font-weight: 600; font-size: 13.5px; padding: 4px 2px; }
.tabs a.active, .tabs a:hover { color: #fff; }

/* ── App shell: left sidebar + content (mirrors limapos_web) ───────────── */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy-dk); display: flex; flex-direction: column; position: sticky; top: 0;
  height: 100vh; }
.sidebar-logo { display: flex; align-items: center; gap: 11px; padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo .dot { width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--blue), #4f46e5); box-shadow: 0 4px 12px rgba(59,130,246,.5);
  position: relative; }
.sidebar-logo .dot::after { content: "C"; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 800; font-size: 15px; }
.sidebar-logo .wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-logo .wordmark .title { color: #fff; font-weight: 800; font-size: 16px; }
.sidebar-logo .wordmark .subtitle { color: rgba(255,255,255,.5); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 9px;
  color: #cfd6e4; font-size: 13.5px; font-weight: 600; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: var(--blue); }
.nav-icon { width: 18px; height: 18px; flex: none; opacity: .85; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sb-foot-btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 9px;
  background: transparent; border: 0; color: #cfd6e4; font-size: 13.5px; font-weight: 700; cursor: pointer;
  font-family: inherit; }
.sb-foot-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.content { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 28px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20; }
.app-topbar-title { margin: 0; font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.app-topbar .grow { flex: 1; }
/* Account identity pill — leads with the business name, greeting/role beneath. */
.account-chip { display: flex; align-items: center; gap: 10px; max-width: 300px;
  padding: 4px 15px 4px 5px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); }
.greet-avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.account-text { display: flex; flex-direction: column; line-height: 1.28; min-width: 0; }
.account-biz { font-size: 14px; font-weight: 800; color: var(--navy); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-sub { font-size: 11.5px; color: var(--muted); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-sub strong { color: var(--ink); font-weight: 700; }
.account-sub .sep { opacity: .5; margin: 0 2px; }
.topbar-btn { background: transparent; border: 1px solid var(--line); border-radius: 9px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; }
.topbar-btn:hover { background: var(--surface); color: var(--navy); border-color: var(--blue); }
.sidebar-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--navy);
  width: 38px; height: 38px; border-radius: 9px; align-items: center; justify-content: center; }
.sidebar-toggle:hover { background: var(--surface); }
.sidebar-scrim { display: none; }

/* ── Rail mode: the sidebar collapsed to icons (desktop only) ──────────────
   The class lives on <html>, set from localStorage before first paint, so a
   collapsed sidebar doesn't flash open on every page load. */
.rail-btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 9px;
  background: transparent; border: 0; color: rgba(255,255,255,.55); font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; }
.rail-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail-btn svg { width: 18px; height: 18px; flex: none; transition: transform .18s; }

@media (min-width: 861px) {
  .nav-rail .app { grid-template-columns: 76px 1fr; }
  .nav-rail .sidebar-logo { padding: 18px 0; justify-content: center; }
  .nav-rail .sidebar-logo .wordmark { display: none; }
  .nav-rail .sidebar nav { padding: 14px 10px; }
  .nav-rail .sidebar nav a,
  .nav-rail .sb-foot-btn,
  .nav-rail .rail-btn { justify-content: center; gap: 0; padding: 11px 0; }
  .nav-rail .sidebar nav a .label,
  .nav-rail .sb-foot-btn .label { display: none; }
  /* The active marker moves inside: a left border would shove the icon off-centre. */
  .nav-rail .sidebar nav a { border-left-color: transparent; }
  .nav-rail .sidebar nav a.active { box-shadow: inset 3px 0 0 var(--blue); }
  .nav-rail .rail-btn svg { transform: rotate(180deg); }
  .nav-rail .nav-icon { width: 20px; height: 20px; opacity: 1; }
}
@media (max-width: 860px) { .rail-btn { display: none; } }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; max-width: 84vw; z-index: 60;
    transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(15,23,42,.4); }
  .sidebar.open ~ .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 55; }
  .sidebar-toggle { display: inline-flex; }
  /* The drawer is a layer over the page; the page behind it must not scroll. */
  body.nav-open { overflow: hidden; }
  /* Collapse the account pill to just the avatar on narrow screens. */
  .account-text { display: none; }
  .account-chip { padding: 0; background: transparent; border: 0; max-width: none; }
  .app-topbar { padding: 10px 14px; gap: 10px; }
  .app-topbar-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 560px) {
  /* Below this the topbar is icons fighting for room: the shield and the "?"
     are reachable from Settings and the page itself, so they stand down first. */
  #security-btn { display: none; }
  .app-topbar { padding: 8px 10px; gap: 6px; }
  .topbar-btn { width: 34px; height: 34px; }
}

/* Guided tour ("pop guides") */

/* Contextual help ("?" explainer, Phase 4d) */
.topbar-btn.help-q { font-weight: 800; font-size: 16px; color: var(--blue-dk); }
.topbar-btn.help-q:hover { background: #eff6ff; }
.help-back { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 1150; display: none;
  align-items: center; justify-content: center; padding: 24px; }
.help-back.on { display: flex; }
.help-card { background: #fff; border-radius: 16px; max-width: 440px; width: 100%; padding: 22px 24px 20px;
  box-shadow: 0 24px 60px -12px rgba(15,23,42,.5); animation: help-pop .2s ease; }
@keyframes help-pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.help-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.help-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue-dk); background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 3px 10px; }
.help-x { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.help-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); letter-spacing: -.01em; }
.help-card p { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.6; }
.help-foot { display: flex; justify-content: flex-end; margin-top: 18px; }

/* Guided tour ("pop guides") */
#tour-overlay { position: fixed; inset: 0; z-index: 1200; display: none; }
#tour-spot { position: absolute; border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(15,23,42,.62), 0 0 0 3px rgba(59,130,246,.9);
  transition: all .25s ease; pointer-events: none; }
#tour-card { position: absolute; width: 320px; max-width: calc(100vw - 32px); background: #fff;
  border-radius: 14px; padding: 18px 20px; box-shadow: 0 20px 50px -12px rgba(15,23,42,.5);
  transition: all .25s ease; }
#tour-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
#tour-card p { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.tour-foot { display: flex; align-items: center; gap: 8px; }
#tour-dots { display: flex; gap: 5px; flex: 1; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dot.on { background: var(--blue); }
.tour-foot button { border: 0; border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; }
#tour-skip { background: transparent; color: var(--muted); }
#tour-back { background: var(--surface); color: var(--navy); }
#tour-next { background: var(--blue); color: #fff; }

/* Page (content area inside the app shell) */
.page { padding: 26px 28px 60px; max-width: 1240px; }
.hero { margin-bottom: 26px; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; color: var(--navy); letter-spacing: -.02em; }
.hero .lead { color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 60ch; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.card h2 { font-size: 15px; margin: 0 0 14px; color: var(--navy); }
.card.next { margin-top: 18px; }
.card.next ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.8; font-size: 14px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; color: var(--ink); }
.muted { color: var(--muted); font-weight: 500; }

.chip { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 700; color: var(--navy); margin-right: 4px; }
.stats { display: flex; gap: 22px; }
.stats .n { display: block; font-size: 26px; font-weight: 800; color: var(--navy); }
.stats .l { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.note { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.note.ok { color: var(--ok); } .note.warn { color: var(--warn); }
code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }

/* Error page */
.err-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dk)); }
.err-card { background: #fff; border-radius: 18px; max-width: 440px; width: 100%; padding: 40px 36px;
  text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.err-mark { width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 18px; color: #fff;
  background: linear-gradient(135deg, var(--blue), #4f46e5); display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 25px; }
.err-code { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--blue); text-transform: uppercase; }
.err-card h1 { color: var(--navy); font-size: 22px; margin: 8px 0 10px; }
.err-card p { color: var(--muted); line-height: 1.6; font-size: 14px; margin: 0 0 24px; }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.err-actions a { padding: 11px 18px; border-radius: 10px; font-weight: 700; font-size: 13.5px; }
.err-actions .primary { background: var(--blue); color: #fff; }
.err-actions .secondary { background: var(--surface); color: var(--navy); border: 1px solid var(--line); }

/* ── Marketing landing (Phase 4a) ─────────────────────────────────────── */
.cta-small { background: var(--blue); color: #fff; padding: 8px 16px; border-radius: 9px;
  font-weight: 700; font-size: 13px; }
.cta-small:hover { background: var(--blue-dk); }
.mk-hero { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dk) 70%); color: #fff;
  padding: 76px 0 84px; }
.mk-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.025em; margin: 10px 0 16px; }
.mk-hero p { color: rgba(255,255,255,.78); font-size: 16.5px; line-height: 1.65; max-width: 62ch; margin: 0 0 26px; }
.mk-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.mk-cta a, .ind-detail .act a, .btn-main { display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 11px; font-weight: 800; font-size: 14.5px; border: 0; cursor: pointer; }
.mk-cta .primary, .ind-detail .act .primary, .btn-main { background: var(--blue); color: #fff; }
.mk-cta .primary:hover, .btn-main:hover { background: var(--blue-dk); }
.mk-cta .secondary { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.ind-detail .act .secondary { background: var(--surface); color: var(--navy); border: 1px solid var(--line); }
.mk-section { padding: 70px 0; }
.mk-section.alt { background: #fff; }
.mk-section h2 { font-size: 30px; color: var(--navy); letter-spacing: -.02em; margin: 0 0 10px; }
.mk-section h2 em { font-style: normal; color: var(--blue-dk); }
.mk-lead { color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 64ch; margin: 0 0 30px; }
.mk-note { color: var(--muted); font-size: 13.5px; }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ind-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .12s, box-shadow .15s; }
.ind-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.ind-card .ic { font-size: 26px; }
.ind-card .nm { font-weight: 800; color: var(--navy); font-size: 14.5px; line-height: 1.3; }
.ind-card .tg { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ind-detail { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 28px; margin-bottom: 18px; scroll-margin-top: 80px; }
.ind-detail .head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ind-detail .head .ic { font-size: 30px; }
.ind-detail .head h3 { margin: 0; color: var(--navy); font-size: 19px; }
.ind-detail .head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.ind-detail .head .chip.focus { margin-left: auto; background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.ind-detail ul { margin: 0 0 16px; padding-left: 20px; color: var(--ink); font-size: 14px; line-height: 1.8; }
.ind-detail .act { display: flex; gap: 10px; }
.mk-foot { background: var(--navy-dk); color: rgba(255,255,255,.6); padding: 26px 0; font-size: 13.5px; }
.mk-foot a { color: #93c5fd; }
.mk-foot .foot-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-blurb { max-width: 56ch; }
.foot-support { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.foot-support strong { color: rgba(255,255,255,.85); font-weight: 700; margin-bottom: 2px; }
.foot-support a { font-weight: 600; }
@media (max-width: 620px) { .mk-foot .foot-grid { flex-direction: column; } .foot-support { text-align: left; } }
/* Legal links row (Terms / Privacy) under the marketing footer. */
.foot-legal { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.foot-legal a { font-weight: 600; }

/* How it works — numbered step cards */
.hiw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.hiw-step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; }
.hiw-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; font-size: 16px; margin-bottom: 14px; }
.hiw-step h3 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.hiw-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Feature grid — tick list of capabilities */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 22px; }
.feat { display: flex; align-items: flex-start; gap: 11px; color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.feat-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #ecfdf5; color: var(--ok);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-top: 1px; }

/* Why grid */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 8px; }
.why h3 { margin: 0 0 6px; color: var(--navy); font-size: 16px; }
.why p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Closing CTA band */
.cta-band { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dk) 70%); color: #fff; padding: 56px 0; text-align: center; }
.cta-band h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.78); font-size: 15.5px; margin: 0 0 22px; }
.cta-band .mk-cta { justify-content: center; }

/* Pricing — the standard monthly plan beside Enterprise. The cards stretch to
   a common height so the two CTAs line up however long the feature lists get. */
.price-wrap { display: flex; justify-content: center; align-items: stretch;
  gap: 22px; margin-top: 8px; flex-wrap: wrap; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 34px; max-width: 460px; width: 100%; flex: 1 1 380px; text-align: center;
  box-shadow: 0 18px 44px rgba(15,23,42,.10);
  display: flex; flex-direction: column; }
/* The list is what varies in length, so it takes the slack. */
.price-card .price-list { flex: 1; }
/* The card is a column flexbox now, and a flex item stretches by default —
   without this the pill badge spans the whole card. */
.price-card .price-eyebrow { align-self: center; }
.price-card.enterprise { background: linear-gradient(180deg, #fff, #f8fafc);
  border-color: #cbd5e1; }
.price-card.enterprise .price-eyebrow { color: var(--navy); background: #eef2f7; border-color: #cbd5e1; }
.price-amt.talk { font-size: 38px; letter-spacing: -.02em; }
.price-cta.ghost { background: var(--navy); }
.price-cta.ghost:hover { background: var(--navy-dk); }
.price-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue-dk); background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.price-figure { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 6px; }
.price-cur { font-size: 20px; font-weight: 700; color: var(--navy); }
.price-amt { font-size: 52px; font-weight: 800; color: var(--navy); letter-spacing: -.03em; line-height: 1; }
.price-per { font-size: 17px; font-weight: 600; color: var(--muted); }
.price-note { color: var(--muted); font-size: 14px; margin: 0 0 22px; line-height: 1.5; }
.price-list { list-style: none; margin: 0 0 24px; padding: 0; text-align: left; display: grid; gap: 11px; }
.price-list li { display: flex; align-items: flex-start; gap: 11px; color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.price-cta { display: inline-flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box;
  background: var(--blue); color: #fff; font-weight: 700; padding: 13px 20px; border-radius: 12px; font-size: 15px; }
.price-cta:hover { background: var(--blue-dk); }
.price-help { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }

@media (max-width: 820px) { .hiw-grid { grid-template-columns: 1fr; } .price-card { padding: 26px 22px; } }

/* Marketing/landing — mobile */
@media (max-width: 620px) {
  .topbar .wrap { gap: 12px; height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .tabs { gap: 14px; margin-left: 0; }
  .mk-hero { padding: 46px 0 54px; }
  .mk-hero h1 { font-size: 29px; }
  .mk-hero p { font-size: 15px; }
  .mk-section { padding: 44px 0; }
  .mk-section h2 { font-size: 24px; }
  .ind-detail { padding: 20px; }
  .ind-detail .act { flex-wrap: wrap; }
}

/* ── Industry selector (Phase 4b) ─────────────────────────────────────── */
.vert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.vert-card { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; transition: border-color .12s; }
.vert-card input { position: absolute; opacity: 0; pointer-events: none; }
.vert-card:hover { border-color: var(--blue); }
.vert-card.on { border-color: var(--blue); background: #eff6ff; }
.vert-card .ic { font-size: 24px; }
.vert-card .nm { font-weight: 800; color: var(--navy); font-size: 14px; }
.vert-card .tg { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.vert-card .primary-flag { display: none; position: absolute; top: 10px; right: 10px;
  background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.vert-card.primary .primary-flag { display: block; }
.btn-main { margin-top: 6px; }

/* ── Bookings page ────────────────────────────────────────────────────── */
.bk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .bk-cols { grid-template-columns: 1fr; } }
.bk-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.bk-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; }
.bk-row > div:first-child { flex: 1; }
.chip.ok { background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.chip.full { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.chip.st-pending { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.chip.st-confirmed { background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.chip.st-cancelled, .chip.st-completed { color: var(--muted); }
.bk-row .acts { display: flex; gap: 6px; }
.bk-row .acts button { border: 0; background: var(--blue); color: #fff; border-radius: 8px;
  padding: 7px 11px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.bk-row .acts button.ghost { background: var(--surface); color: var(--navy); border: 1px solid var(--line); }
.mini-forms { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.mini-forms summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--navy); }
form.mini { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
form.mini.col { flex-direction: column; align-items: stretch; }
form.mini strong { font-size: 12px; color: var(--muted); width: 100%; }
form.mini input, form.mini select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 13px; flex: 1; min-width: 110px; }
form.mini button { border: 0; background: var(--navy); color: #fff; border-radius: 8px;
  padding: 8px 14px; font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: inherit; }
form.mini .row2 { display: grid; grid-template-columns: 1fr 90px; gap: 6px; }
#nb-cust-hits .hit { display: block; width: 100%; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 4px;
  font-size: 13px; cursor: pointer; font-family: inherit; }
#nb-cust-hits .hit:hover { border-color: var(--blue); }

/* ── Bookings page v2 (guided, calendar-style, modal-driven) ──────────── */
.bk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; margin-bottom: 18px; }
.bk-head h1 { font-size: 26px; margin: 0 0 6px; color: var(--navy); letter-spacing: -.02em; }
.bk-head .lead { color: var(--muted); font-size: 14px; margin: 0; max-width: 62ch; }
.bk-head-actions { display: flex; gap: 8px; align-items: center; }
.btn-ghost.sm, .btn-main.sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-mini { border: 0; background: var(--blue); color: #fff; border-radius: 8px; padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-mini:hover { background: var(--blue-dk); }
.btn-mini.ghost { background: var(--surface); color: var(--navy); border: 1px solid var(--line); }
.linky { background: none; border: 0; color: var(--blue-dk); font-weight: 700; font-size: 13px;
  cursor: pointer; padding: 4px 0; font-family: inherit; }

/* Guided setup checklist (sequenced: one active step, later steps locked) */
.setup-card { margin-bottom: 18px; max-width: 960px; position: relative; }
.setup-dismiss { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.setup-dismiss:hover { background: var(--surface); color: var(--navy); }
.setup-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.setup-top h2 { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
/* Progress dots ●●○ — filled = done, ringed = the active next step. */
.pdots { display: flex; gap: 8px; align-self: center; }
.pdot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); transition: all .3s; }
.pdot.on { background: var(--ok); border-color: var(--ok); }
.pdot.active { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(59,130,246,.18); }
.setup-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
@media (max-width: 820px) { .setup-steps { grid-template-columns: 1fr; } }
.setup-step { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column;
  gap: 10px; align-items: flex-start; transition: border-color .3s, background .3s, box-shadow .3s, opacity .3s; }
.setup-step .step-ctl { margin-top: auto; padding-top: 4px; }
/* Done — green, settled. */
.setup-step.done { background: #f0fdf4; border-color: #bbf7d0; }
.setup-step.done .step-num { background: var(--ok); }
/* Active — the one step to act on now; lights up (Fix 3). */
.setup-step.active { border-color: var(--blue); background: #f5f9ff; box-shadow: 0 6px 20px -8px rgba(59,130,246,.4);
  animation: step-pop .35s ease; }
@keyframes step-pop { from { transform: translateY(4px); opacity: .4; } to { transform: none; opacity: 1; } }
.setup-step.active .step-num { background: var(--blue); }
/* Locked — greyed until the prior step is done; not clickable. */
.setup-step.locked { opacity: .55; background: var(--surface); }
.setup-step.locked .step-num { background: var(--line); color: var(--muted); }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800;
  font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.step-body { display: flex; flex-direction: column; gap: 3px; }
.step-body strong { font-size: 14.5px; color: var(--navy); }
.step-body .note { font-size: 12.5px; line-height: 1.5; }
.step-badge.done { display: inline-block; font-size: 12px; font-weight: 800; color: var(--ok); }
.step-lock { display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted); }

/* Schedule + bookings grid */
.bk-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .bk-grid { grid-template-columns: 1fr; } }
.sched { display: flex; flex-direction: column; }
.sched-day { border-top: 1px solid var(--line); }
.sched-day:first-child { border-top: 0; }
.sched-date { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 12px 20px 6px; }
.slot-row { display: flex; align-items: center; gap: 12px; padding: 9px 20px; }
.slot-row:hover { background: var(--surface); }
.slot-time { font-weight: 800; color: var(--navy); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 92px; }
.slot-main { flex: 1; min-width: 0; font-size: 13.5px; }
.slot-main strong { color: var(--ink); }
.seats-chip { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.seats-chip.ok { background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; }
.seats-chip.low { background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; }
.seats-chip.full { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.sched-empty { padding: 30px 20px; text-align: center; color: var(--muted); }
.sched-empty p { margin: 0 0 10px; font-weight: 600; }

.bk-list2 { display: flex; flex-direction: column; padding: 6px 14px 14px; gap: 8px; }
.booking-card { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; transition: border-color .12s, box-shadow .12s; }
.booking-card:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(15,23,42,.06); }
.bc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-top strong { font-size: 13.5px; color: var(--navy); }
.bc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin: 6px 0 9px; }
.bc-meta .bc-who { font-weight: 700; color: var(--ink); }
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bc-total { font-weight: 800; color: var(--navy); font-size: 14px; }
.bc-acts { display: flex; gap: 6px; }

/* Link from Tours setup → the full Staff & Assets page (same records). */
.rs-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 14px;
  border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 11px; }
.rs-link:hover { border-color: var(--blue); }
.rs-link > span:first-child { font-weight: 800; color: var(--navy); font-size: 13.5px; }
.rs-link .note { color: var(--blue-dk); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1100; display: none;
  align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-back.on { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; box-shadow: 0 24px 60px -12px rgba(15,23,42,.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px;
  border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; color: var(--navy); }
.modal-x { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.field > label .note { font-weight: 500; }
.in { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; font-size: 14px;
  color: var(--ink); background: #fff; width: 100%; }
.in:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hits { display: flex; flex-direction: column; gap: 2px; }
.hits .hit { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink); }
.hits .hit:hover { border-color: var(--blue); }
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #eff6ff;
  border: 1px solid #bfdbfe; border-radius: 9px; padding: 9px 12px; font-weight: 700; color: var(--navy); font-size: 14px; }
.newclient { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface);
  border-radius: 10px; }
.quote { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface);
  border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: var(--muted); }
.quote strong { color: var(--navy); font-size: 16px; }
.quote .q-net { color: var(--ink); font-weight: 600; }
.confirm-amt { display: flex; align-items: center; justify-content: space-between; background: var(--surface);
  border-radius: 10px; padding: 14px 16px; margin: 6px 0 14px; }
.confirm-amt span { font-weight: 700; color: var(--navy); }
.confirm-amt strong { font-size: 20px; color: var(--navy); }
.rf-opt { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--navy);
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 7px; cursor: pointer; }
.rf-opt:has(input:checked) { border-color: var(--blue); background: var(--surface); }
.rf-opt input[type="radio"] { margin: 0; }
.rf-pct { width: 66px; padding: 4px 8px; text-align: right; margin-left: auto; }
.rf-pct:disabled { opacity: .45; }
.tabs2 { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs2 button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 4px; margin-bottom: -1px;
  font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; font-family: inherit; }
.tabs2 button.on { color: var(--navy); border-bottom-color: var(--blue); }
.setup-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; max-height: 340px; overflow-y: auto; }
.lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.lrow > span:first-child { font-weight: 700; color: var(--ink); }
.setup-add { border-top: 1px solid var(--line); padding-top: 14px; }

/* Price tiers (tourism adult/child/group) + inline tour edit */
.svc-card { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 8px; }
.svc-card.svc-off { opacity: .6; background: var(--surface); }
.svc-card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.svc-card-head strong { color: var(--navy); font-size: 14px; }
.svc-card-head .note { flex: 1; }
.svc-card-head .svc-edit-btn { align-self: center; }
.svc-edit { background: var(--surface); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.svc-edit .field { margin-bottom: 10px; }
.se-active { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); margin: 2px 0; }
.se-active input { width: 15px; height: 15px; }

/* Departure detail (manage a scheduled instance) */
.dep-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface); border-radius: 10px; padding: 12px 14px; margin-bottom: 6px; }
.dep-head strong { color: var(--navy); font-size: 14px; }
.dep-bookings { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; max-height: 180px; overflow-y: auto; }
.dep-bk { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.dep-bk strong { color: var(--ink); }
.tier-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; background: #eff6ff; border: 1px solid #bfdbfe;
  color: var(--navy); border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 12.5px; font-weight: 700; }
.tier-chip .tier-x { background: none; border: 0; color: #64748b; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tier-chip .tier-x:hover { color: #b91c1c; }
.tier-add { display: grid; grid-template-columns: 1fr 110px auto; gap: 6px; }
.tier-add .in { padding: 7px 10px; font-size: 13px; }
.lbl-sm { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.tier-grid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.tier-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; }
.tier-nm { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tier-row .in { padding: 8px 10px; text-align: right; }

/* Toast */
#bk-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(15,23,42,.35); opacity: 0; pointer-events: none; transition: all .25s; z-index: 1300; }
#bk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#bk-toast.bad { background: #b91c1c; }

/* ── Profitability (management depth) ─────────────────────────────────── */
.pf-list { display: flex; flex-direction: column; }
.pf-row { padding: 14px 20px; border-top: 1px solid var(--line); }
.pf-row:first-child { border-top: 0; }
.pf-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pf-row-top strong { color: var(--navy); font-size: 14px; }
.pf-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pf-margin { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.pf-margin.good { background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; }
.pf-margin.mid { background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; }
.pf-margin.bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pf-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-bottom: 10px; }
@media (max-width: 640px) { .pf-bars { grid-template-columns: 1fr; } }
.pf-bar-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.pf-bar-head > span:first-child { font-weight: 700; color: var(--muted); }
.pf-bar-r { color: var(--ink); font-weight: 600; }
.pf-bar-r.over { color: #b91c1c; }
.pf-track { height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.pf-fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.pf-fill.ok { background: #10b981; } .pf-fill.near { background: #f59e0b; } .pf-fill.over { background: #ef4444; }
.pf-metrics { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.pf-metrics b { color: var(--navy); font-weight: 800; }

/* ── Extension packs ──────────────────────────────────────────────────── */
.ck-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--ok); border-radius: 10px;
  padding: 14px 16px; font-weight: 700; font-size: 15px; margin-top: 12px; line-height: 1.5; }
.ck-bad { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px;
  padding: 14px 16px; font-weight: 700; font-size: 15px; margin-top: 12px; }
.bk-row .qr { margin-left: 4px; }
.bk-row .qr img, .bk-row .qr canvas { display: block; border: 4px solid #fff; border-radius: 4px; }
label.bk-row { cursor: pointer; }
label.bk-row input[type=checkbox] { width: 17px; height: 17px; }
.chip.trust { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.trust-banner { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 12px;
  padding: 12px 16px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.55; }

/* ── Dashboard / Overview ─────────────────────────────────────────────── */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; margin-bottom: 22px; }
.dash-head h1 { font-size: 27px; margin: 2px 0 6px; color: var(--navy); letter-spacing: -.02em; }
.dash-head .lead { color: var(--muted); font-size: 14.5px; margin: 0; }
.dash-head-actions { display: flex; gap: 10px; }
.btn-ghost { display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 11px;
  font-weight: 800; font-size: 14px; background: var(--card); color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(15,23,42,.05);
  transition: border-color .14s, transform .12s, box-shadow .14s; color: inherit; }
.stat-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,.09); }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 19px; margin-bottom: 12px; background: #eff6ff; }
.stat-icon.blue { background: #eff6ff; } .stat-icon.green { background: #ecfdf5; }
.stat-icon.amber { background: #fffbeb; } .stat-icon.violet { background: #f5f3ff; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.15; margin: 3px 0 2px; }
.stat-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mini-stats a { display: inline-flex; align-items: baseline; gap: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 12.5px;
  color: var(--muted); font-weight: 600; }
.mini-stats a:hover { border-color: var(--blue); }
.mini-stats b { color: var(--navy); font-size: 15px; font-weight: 800; }

.dash-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .dash-cols { grid-template-columns: 1fr; } }
.mt { margin-top: 16px; }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head.pad { padding: 18px 20px 0; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; margin: 0; color: var(--navy); }
.card-head .muted, .mini-h .muted { font-weight: 500; font-size: 12.5px; }
.link-accent { font-size: 13px; font-weight: 700; color: var(--blue-dk); }
.mini-h { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 18px 0 10px; }

.status-bars { display: flex; flex-direction: column; gap: 9px; }
.sbar { display: grid; grid-template-columns: 78px 1fr 28px; align-items: center; gap: 10px; }
.sbar-l { font-size: 12.5px; font-weight: 700; color: var(--ink); text-transform: capitalize; }
.sbar-track { height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.sbar-fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.sbar-fill.st-confirmed { background: #10b981; } .sbar-fill.st-pending { background: #f59e0b; }
.sbar-fill.st-completed { background: #64748b; } .sbar-fill.st-cancelled { background: #cbd5e1; }
.sbar-n { font-size: 12.5px; font-weight: 800; color: var(--navy); text-align: right; }

.svc-list { display: flex; flex-direction: column; gap: 7px; }
.svc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.svc-row:last-child { border-bottom: 0; }
.svc-net { font-weight: 800; color: var(--navy); }

.table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dash-table th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); padding: 8px 20px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 11px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .num, .num { text-align: right; }
.dash-table td.muted { color: var(--muted); }

.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 800;
  text-transform: capitalize; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.badge.st-confirmed { background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.badge.st-pending { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.badge.st-completed { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.badge.st-cancelled { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.pay-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pay-strip .sso-note { flex: 1; min-width: 260px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.pay-strip .sso-note strong { color: var(--ink); }
.ok-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(4,120,87,.15); margin-right: 4px; }

/* ── Accounting statement tables ──────────────────────────────────────── */
.stmt td, .stmt th { font-size: 13.5px; }
.stmt tr.ac-sec td { font-weight: 800; color: var(--navy); text-transform: uppercase;
  font-size: 11px; letter-spacing: .05em; padding-top: 14px; border-bottom: 0; }
.stmt tr.ac-tot td { font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); }
.stmt tr.ac-net td { font-weight: 800; color: var(--navy); font-size: 15px;
  border-top: 2px solid var(--navy); background: var(--surface); }
.stmt td.num { white-space: nowrap; }
#ac-tabs { margin-bottom: 16px; flex-wrap: wrap; }

/* ── Manual journal editor ────────────────────────────────────────────── */
/* Five columns: account · per-line description · debit · credit · remove. */
.jr-line, .jr-head { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) 108px 108px 28px;
  gap: 8px; margin-bottom: 8px; align-items: center; }
.jr-head { margin-bottom: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) {
  .jr-head { display: none; }
  .jr-line { grid-template-columns: 1fr 1fr 28px; }
  .jr-line .jr-acct, .jr-line .jr-note { grid-column: 1 / span 2; }
  .jr-line .jr-del { grid-column: 3; justify-self: end; }
}
.jr-line .jr-del { background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.jr-line .jr-del:hover { color: #b91c1c; }
.jr-balance { display: flex; gap: 18px; align-items: center; justify-content: flex-end; margin: 12px 0 4px;
  font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.jr-balance b { color: var(--navy); }
.jr-ok { color: var(--ok); font-weight: 800; }
.jr-bad { color: #b91c1c; font-weight: 800; }
.jr-auto { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin: 4px 0 10px; }

/* Count of journals awaiting approval, on the Journals tab itself. */
.tab-dot { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: #f59e0b; color: #fff; font-size: 11px; font-weight: 800; line-height: 1.5; text-align: center; }

/* ── Manual journal list ──────────────────────────────────────────────── */
.mj-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.mj-filters .in { height: 34px; padding: 0 10px; font-size: 13px; width: auto; min-width: 130px; }
.mj-filters #mj-q { min-width: 220px; flex: 1 1 220px; }
.mj-row { cursor: pointer; }
.mj-row:hover { background: #f8fafc; }

/* A statement figure you can open: the journals behind it. */
.rep-drill { cursor: pointer; }
.rep-drill:hover { background: #f0f7ff; }
.rep-drill td:first-child::after { content: " ›"; color: var(--muted); font-weight: 700; opacity: 0; }
.rep-drill:hover td:first-child::after { opacity: 1; }
@media print { .rep-drill td:first-child::after { content: ""; } }

/* ── One journal, in full ─────────────────────────────────────────────── */
.jv-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px;
  padding: 12px 14px; background: #f8fafc; border-radius: 10px; font-size: 13.5px; }
.jv-meta > div { display: flex; flex-direction: column; gap: 3px; }
.jv-meta span:first-child { font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.jv-sec { margin: 16px 0 0; }
.jv-att { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line);
  font-size: 13.5px; flex-wrap: wrap; }
.jv-att .btn-mini { margin-left: auto; }
.jv-upload { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.jv-upload .in { width: auto; flex: 1 1 200px; font-size: 13px; }
.jv-hist { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink); line-height: 1.7; }
.jv-hist li { margin-bottom: 2px; }

/* Drill-down table: give the narration room and stop dates, references and
   amounts from wrapping onto three lines. It scrolls sideways in its wrap
   rather than crushing every column to fit. */
#dd-body .rep-table { min-width: 720px; }
#dd-body .rep-table td:nth-child(1),
#dd-body .rep-table td:nth-child(2),
#dd-body .rep-table td:nth-child(n+4),
#dd-body .rep-table th { white-space: nowrap; }
#dd-body .rep-table td:nth-child(3) { min-width: 260px; white-space: normal; }

/* Filter-responsive totals line (Bookings / Departures lists). */
.list-summary { font-size: 13px; color: var(--muted); font-weight: 600; margin: 2px 0 12px; display: flex;
  align-items: center; flex-wrap: wrap; gap: 2px; }
.list-summary:empty { display: none; }
.list-summary strong { color: var(--navy); font-weight: 800; font-variant-numeric: tabular-nums; }
.list-summary .ls-scope { margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--navy); text-transform: capitalize; }

/* ── Print (statements / reports) ─────────────────────────────────────── */
.print-head { display: none; }
@media print {
  .sidebar, .app-topbar, .sidebar-scrim, #tour-overlay, .help-back, .modal-back,
  .no-print, .dash-head, .hero, #bk-toast { display: none !important; }
  .app, .content { display: block; }
  .page { padding: 0; max-width: none; }
  body { background: #fff; }
  .print-head { display: block; margin-bottom: 16px; border-bottom: 2px solid var(--navy); padding-bottom: 10px; }
  .print-head .ph-biz { font-size: 20px; font-weight: 800; color: var(--navy); }
  .print-head .ph-doc { font-size: 13px; color: var(--muted); margin-top: 2px; }
  .card, .card-pad, .rp-tile { box-shadow: none !important; border: 1px solid #e2e8f0; break-inside: avoid; }
  .stat-card { break-inside: avoid; }
  a[href] { color: inherit; text-decoration: none; }
  @page { margin: 15mm; }
}

/* ── Reports (Phase 5) ────────────────────────────────────────────────── */
.rp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.rp-tile { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.rp-tile .l { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.rp-tile .n { font-size: 24px; font-weight: 800; color: var(--navy); }
.rp-tile .s { font-size: 13px; color: var(--muted); font-weight: 600; }
a.bk-row { color: inherit; }
a.bk-row:hover { border-color: var(--blue); }

/* ── Accounting (reference layout) ─────────────────────────────────────── */
/* Top-level: underline tabs — Ledger | Reports | Asset Register. */
.tabs2.ac-toptabs { margin-bottom: 20px; gap: 26px; }
.tabs2.ac-toptabs button { font-size: 16px; font-weight: 800; padding: 10px 2px 12px;
  border-bottom-width: 3px; color: var(--ink); }
.tabs2.ac-toptabs button.on { color: var(--blue-dk); border-bottom-color: var(--blue); }

/* Controls row: From/To + scope left, + Manual Journal right. */
.ac-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.ac-controls .ac-lbl { font-size: 13px; font-weight: 700; color: var(--ink); }
.ac-controls .in { width: auto; }
.ac-controls .ac-date { padding: 9px 12px; border-radius: 10px; }
.ac-controls .ac-scope { padding: 9px 12px; border-radius: 10px; min-width: 150px; }
.ac-controls .grow { flex: 1; }

/* Sub-tabs: active = light-blue pill, inactive = plain text. */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills button { border: 0; background: transparent; color: var(--ink); border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
  transition: all .12s; }
.pills button:hover { color: var(--blue-dk); }
.pills button.on { background: #dbeafe; color: var(--blue-dk); }

/* Report card: white, rounded, title inside; banded thead; roomy rows. */
.rep-card { padding: 0; overflow: hidden; }
.rep-title { display: flex; align-items: baseline; gap: 12px; padding: 20px 24px 14px; }
.rep-title h2 { margin: 0; font-size: 17px; color: var(--navy); letter-spacing: -.01em; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table thead th { background: #f8fafc; text-align: left; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 11px 24px; }
.rep-table thead th.num { text-align: right; }
.rep-table td { padding: 14px 24px; border-bottom: 1px solid #eef2f7; color: var(--ink); }
.rep-table tr:last-child td { border-bottom: 0; }
.rep-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rep-table td.rep-code { color: var(--muted); font-weight: 600; width: 90px; white-space: nowrap; }
.rep-code-inline { color: var(--muted); font-size: 12px; font-weight: 600; }
.rep-table tr.rep-sec td { font-weight: 800; color: var(--navy); text-transform: uppercase;
  font-size: 11px; letter-spacing: .06em; padding-top: 18px; padding-bottom: 6px; border-bottom: 0; }
.rep-table tr.rep-sub td { font-weight: 700; border-top: 1px solid var(--line); background: #fbfcfe; }
.rep-table tr.rep-total td { font-weight: 800; color: var(--navy); font-size: 15px;
  border-top: 2px solid var(--navy); background: var(--surface); }
.rep-table tr.rep-jhead td { background: #f8fafc; font-size: 13px; color: var(--ink);
  padding-top: 12px; padding-bottom: 12px; }

/* On-report branded header (screen), footer (screen + print), compare toggle. */
.rep-doc-head { display: flex; align-items: center; gap: 14px; max-width: 720px;
  margin: 0 0 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.rep-doc-head img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; }
.rep-doc-biz { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.rep-doc-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rep-doc-gen { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.rep-doc-foot { max-width: 720px; margin: 10px 0 0; padding-top: 8px;
  border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.rep-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.rep-toggle input { margin: 0; }

/* ── Aged Debtors ─────────────────────────────────────────────────────── */
.ac-stats { margin-bottom: 18px; }
/* auto-fit rather than a fixed 4: Aged Debtors has four buckets, Aged
   Creditors five (Current is its own, being not-yet-due rather than late). */
.age-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; padding: 18px 24px; }
@media (max-width: 620px) { .age-cols { grid-template-columns: repeat(2, 1fr); } }
.age-col { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: var(--card); cursor: pointer; display: flex; flex-direction: column; gap: 7px; font-family: inherit;
  transition: border-color .12s, box-shadow .12s; }
.age-col:hover { border-color: var(--blue); }
.age-col.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.age-l { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.age-v { font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.age-bar { height: 6px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.age-fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.age-col.age-ok .age-fill { background: #10b981; }
.age-col.age-warn .age-fill { background: #f59e0b; }
.age-col.age-warn2 .age-fill { background: #f97316; }
.age-col.age-bad .age-fill { background: #ef4444; }
.age-col.age-bad .age-v { color: #b91c1c; }

.debt-controls { display: flex; gap: 10px; align-items: center; padding: 0 24px 16px; flex-wrap: wrap; }
.debt-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; }
.debt-search .in { padding-left: 36px; }
.debt-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.debt-controls select.in { width: auto; min-width: 150px; flex: none; }

.debt-table td { vertical-align: top; }
.debt-table .debt-toggle { display: inline-flex; align-items: flex-start; gap: 9px; background: none; border: 0;
  padding: 0; cursor: pointer; font-family: inherit; text-align: left; color: var(--navy); }
.debt-toggle .caret { color: var(--muted); font-size: 11px; line-height: 1.5; width: 10px; flex: none; }
.debt-who strong { font-weight: 700; }
.debt-table .email { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.debt-row:hover { background: #f8fafc; }
.debt-row.open { background: #eff6ff; }
.debt-table td.age-c-warn { color: #b45309; }
.debt-table td.age-c-warn2 { color: #c2410c; }
.debt-table td.age-c-bad { color: #b91c1c; font-weight: 700; }
.debt-drill td { padding: 0; background: #f8fafc; }
.debt-drill-in { padding: 4px 24px 12px 43px; }
.sub-table { width: 100%; border-collapse: collapse; }
.sub-table th { text-align: left; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); }
.sub-table th.num, .sub-table td.num { text-align: right; }
.sub-table td { padding: 8px 10px; font-size: 13px; border-bottom: 1px solid #eef2f7; color: var(--ink); }
.sub-table tr:last-child td { border-bottom: 0; }
.cred-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

/* The subledger↔GL tie-out, stated at the foot of a report that claims it. */
.recon-line { display: flex; gap: 10px; align-items: flex-start; margin: 0 24px 20px; padding: 11px 14px;
  border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; }
.recon-line.ok  { background: #f0fdf4; border-color: #bbf7d0; border-left-color: var(--ok); color: #14532d; }
.recon-line.bad { background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; color: #7f1d1d; }

/* ── Bills tab (the A/P workbench) ─────────────────────────────────────── */
.bl-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
/* `.fb-search` is only ever styled under a parent (.filter-bar, .log-filters,
   .dep-toolbar), so the icon needs its own rules here — without them the SVG
   renders at its natural size and swallows the page. */
.bl-search { flex: 1 1 260px; max-width: 420px; position: relative; display: flex; align-items: center; }
.bl-search .in { padding-left: 36px; }
.bl-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; flex: none; }
/* Same reason as the search icon above: the date-window chip is defined under
   .filter-bar, and the Invoices/Bills toolbar is a .bl-bar. */
.bl-bar > .in { width: auto; flex: none; }
.bl-bar .fb-dates { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.bl-bar .fb-dates .in { width: auto; min-width: 148px; flex: none; }
.bl-bar .fb-dash { color: var(--muted); font-weight: 700; }
@media (max-width: 640px) {
  .bl-bar > .in, .bl-bar .fb-dates { width: 100%; }
  .bl-bar .fb-dates .in { flex: 1; min-width: 0; }
}
.bl-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bl-pill { border: 1px solid var(--line); background: var(--card); color: var(--navy); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .12s, background .12s; }
.bl-pill:hover { border-color: var(--blue); }
.bl-pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.bl-count { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; font-size: 11px;
  font-weight: 800; background: #eef2f7; color: var(--muted); }
.bl-pill.on .bl-count { background: rgba(255,255,255,.22); color: #fff; }
.sup-retired td { opacity: .6; }

/* Bill line editor (supplier bill modal) */
.bl-lines { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.bl-lines table { width: 100%; border-collapse: collapse; }
.bl-lines th { text-align: left; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 8px 8px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.bl-lines td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.bl-lines tr:last-child td { border-bottom: 0; }
.bl-lines .in { padding: 7px 9px; font-size: 13px; }
.bl-lines td.num, .bl-lines th.num { text-align: right; }
.bl-net { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.bl-rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
  padding: 4px 6px; border-radius: 6px; font-family: inherit; }
.bl-rm:hover { color: #dc2626; background: #fef2f2; }
.bl-totals { display: flex; justify-content: flex-end; gap: 26px; padding: 12px 4px 2px; font-size: 13px; }
.bl-totals strong { font-size: 15px; }

/* Shared pagination control (Departures, Bookings, Payments, Guests, Aged Creditors) */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 16px; }
.pager-btn { border: 1px solid var(--line); background: var(--card); color: var(--navy); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.pager-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue-dk); }
.pager-btn:disabled { opacity: .4; cursor: default; }
.pager-info { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Co-branded sidebar logo (client business logo + Powered by LimaPOS) ── */
.sidebar-logo .biz-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: contain;
  background: #fff; padding: 2px; flex: none; }
.sidebar-logo.branded .wordmark .title { font-size: 14px; line-height: 1.2; overflow: hidden;
  text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ── Header utility icons (shield / gear / sign-out) ─────────────────── */
a.topbar-btn { text-decoration: none; }
.topbar-btn.on { background: #eff6ff; color: var(--blue-dk); border-color: var(--blue); }

/* ── Resources page (Staff & Assets) ──────────────────────────────────── */
.rs-row { cursor: pointer; }
.rs-detail > td { background: var(--surface); }
/* Give-a-login section inside the Staff add/edit modal */
.rs-login { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.rs-login-toggle { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.rs-login-toggle input { width: 16px; height: 16px; flex: none; }
.rs-login-toggle strong { color: var(--navy); }
#rs-login-fields { margin-top: 12px; background: var(--surface); border-radius: 10px; padding: 12px 12px 4px; }

.rs-roster { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.rs-roster-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; font-size: 12.5px;
  color: var(--ink); padding: 4px 0; }
.rs-roster-row .num { text-align: right; color: var(--muted); font-weight: 600; }

/* ── Settings page ────────────────────────────────────────────────────── */
.logo-row { display: flex; gap: 16px; align-items: flex-start; }
.logo-preview { width: 96px; height: 96px; border: 1px dashed var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none;
  background: var(--surface); font-size: 12px; text-align: center; padding: 6px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-toggles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.st-toggles label { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600;
  color: var(--ink); }
.st-toggles input[type=checkbox] { width: 16px; height: 16px; }
.field textarea.in { resize: vertical; min-height: 64px; }

/* ── Standalone auth pages (login / signup) ───────────────────────────── */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 16px; background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dk) 70%); }
.auth-card { background: #fff; border-radius: 18px; width: 100%; max-width: 460px;
  padding: 36px 36px 30px; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.auth-brand { color: var(--navy); font-size: 17px; margin-bottom: 22px; }
.auth-brand .dot { width: 30px; height: 30px; border-radius: 9px; }
.auth-card h1 { margin: 0 0 6px; font-size: 23px; color: var(--navy); letter-spacing: -.02em; }
.auth-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.auth-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }
.auth-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }
.auth-note { background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 11px 14px; font-size: 12.5px; line-height: 1.5; margin: 4px 0 2px; }
.auth-note a { font-weight: 700; }
.auth-btn { width: 100%; margin-top: 4px; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-alt a { font-weight: 700; }
.auth-forgot { display: block; text-align: right; margin: -8px 0 4px; font-size: 12.5px; font-weight: 600; }
.auth-code { font-size: 20px; letter-spacing: .35em; font-variant-numeric: tabular-nums; text-align: center; }

/* ── 2FA enrolment (Settings → Security) ──────────────────────────────── */
.fa-qr-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.fa-qr-row #fa-qr img, .fa-qr-row #fa-qr canvas { border: 8px solid #fff; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15,23,42,.15); }
.fa-qr-row code { max-width: 220px; font-size: 12px; }

/* ── Clients / Guests page ────────────────────────────────────────────── */
.cu-layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .cu-layout { grid-template-columns: 1fr; } }
.cu-search-wrap { padding: 14px 20px 6px; }
.cu-search { position: relative; display: flex; align-items: center; }
.cu-search-ic { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.cu-search input { width: 100%; padding: 11px 12px 11px 38px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 14px; background: var(--surface); }
.cu-search input:focus { outline: 0; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.cu-hits { display: flex; flex-direction: column; padding: 6px 12px 14px; max-height: 560px; overflow-y: auto; }
.cu-hit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none;
  border: 0; border-radius: 11px; padding: 10px 12px; cursor: pointer; font-family: inherit; }
.cu-hit:hover { background: var(--surface); }
.cu-hit.on { background: #eff6ff; }
.cu-hit-av { width: 38px; height: 38px; border-radius: 50%; flex: none; color: #fff; font-weight: 800;
  font-size: 14px; display: flex; align-items: center; justify-content: center; }
.cu-hit-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cu-hit-body strong { font-size: 14px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-hit-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-hit-arrow { width: 16px; height: 16px; color: var(--muted); flex: none; opacity: 0; transition: opacity .12s; }
.cu-hit:hover .cu-hit-arrow, .cu-hit.on .cu-hit-arrow { opacity: 1; }

.cu-detail { min-height: 280px; }
.cu-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 50px 24px; color: var(--muted); min-height: 260px; }
.cu-empty-ic { font-size: 40px; opacity: .6; }
.cu-empty p { margin: 0; font-size: 14px; max-width: 34ch; line-height: 1.5; }
.cu-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cu-avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; color: #fff; font-weight: 800;
  font-size: 20px; display: flex; align-items: center; justify-content: center; }
.cu-detail-head h2 { font-size: 20px; color: var(--navy); }
.cu-contact { margin: 0 0 16px; }
.cu-contact a { color: var(--blue-dk); font-weight: 600; }
.cu-stat-row { display: flex; gap: 12px; margin-bottom: 20px; }
.cu-stat { flex: 1; background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.cu-stat-n { display: block; font-size: 20px; font-weight: 800; color: var(--navy); }
.cu-stat-l { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.cu-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cu-row:last-child { border-bottom: 0; }
.cu-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cu-row-main strong, .cu-row-main a { font-size: 13.5px; }
.cu-row-main .muted { font-size: 12px; }
.cu-row-amt { color: var(--navy); font-size: 14px; white-space: nowrap; }

/* ── Tours and Travel catalogue (tours-redesign-prompt.md, Tasks 1–2) ──── */
textarea.in { min-height: 66px; resize: vertical; line-height: 1.5; }
.tours-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .tours-layout { grid-template-columns: 1fr; } }

/* Sectioned add-a-tour form (Basics / Capacity / Pricing / Policies). */
.tour-form { padding: 0; overflow: hidden; }
.tf-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.tf-head h2 { margin: 0; font-size: 17px; color: var(--navy); }
.tf-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.tf-sec { padding: 18px 22px; border-top: 1px solid var(--line); }
.tf-sec:first-of-type { border-top: 0; }
.tf-sec .sec-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px; }
.tf-sec .field:last-child { margin-bottom: 0; }
.tf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line);
  background: var(--surface); }

/* Inline, visible price-tier table (no more "see tiers above" footnote). */
.ptier { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ptier-row { display: grid; grid-template-columns: 1.2fr 1fr 34px; gap: 8px; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--line); }
.ptier-row.head { border-top: 0; background: var(--surface); font-size: 11.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ptier-row .in { padding: 7px 10px; font-size: 13px; }
.ptier-name { font-size: 13.5px; }
.ptier-x { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
  padding: 0; border-radius: 6px; }
.ptier-x:hover { color: #b91c1c; }
.ptier-add { padding: 8px 12px; border-top: 1px solid var(--line); }
.ptier-add button { background: var(--surface); border: 1px solid var(--line); color: var(--navy); border-radius: 8px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.ptier-add button:hover { border-color: var(--blue); }
.tf-caption { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.tf-caption.micro { font-size: 11px; margin: 1px 0 0; line-height: 1.35; }
/* A field whose value is currently overridden (flat price when tiers are set) —
   still editable, just visibly de-emphasised so the active input is obvious. */
.field.dimmed { opacity: .5; transition: opacity .15s ease; }
.field.dimmed:focus-within { opacity: 1; }

/* Tour list (catalogue view) */
.tour-list { display: flex; flex-direction: column; gap: 10px; }
.tour-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tour-item.off { opacity: .6; background: var(--surface); }
.tour-item-head { display: flex; align-items: baseline; gap: 8px; }
.tour-item-head strong { font-size: 15px; color: var(--navy); }
.tour-item-head .price { margin-left: auto; font-weight: 800; color: var(--navy); font-size: 14px; }
.tour-desc { font-size: 13px; color: var(--ink); margin: 6px 0 0; line-height: 1.5; }
.tour-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.tour-meta b { color: var(--ink); font-weight: 700; }
.tour-item .tier-chips { margin-top: 10px; margin-bottom: 0; }
.tour-item-foot { display: flex; gap: 8px; margin-top: 12px; }

/* ── Bookings page v3 (Task 3: cards → filters → table → detail) ───────── */
.stat-card.warn { background: #fffbeb; border-color: #fde68a; }
.stat-card.warn .stat-value, .stat-card.warn .stat-label { color: var(--warn); }
/* Overdue money is not a warning, it is a problem — it gets its own colour so
   an amber "in draft" tile beside it doesn't read as equally urgent. */
.stat-card.bad { background: #fef2f2; border-color: #fecaca; }
.stat-card.bad .stat-value, .stat-card.bad .stat-label { color: #b91c1c; }
.stat-card.bad.plain:hover { border-color: #fecaca; }
.stat-card.plain { cursor: default; }
.stat-card.plain:hover { transform: none; border-color: var(--line); box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.stat-card.warn.plain:hover { border-color: #fde68a; }

.filter-bar { display: flex; gap: 8px; margin: 16px 0 12px; flex-wrap: wrap; }
.filter-bar .fb-search { flex: 1; min-width: 200px; position: relative; display: flex; align-items: center; }
.filter-bar .fb-search .in { padding-left: 36px; }
.filter-bar .fb-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.filter-bar select.in { width: auto; min-width: 150px; flex: none; }
/* Custom date range — shown only when "Custom…" is picked, so it must sit in
   the bar without reflowing the controls around it when it appears. */
.filter-bar .fb-dates { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.filter-bar .fb-dates .in { width: auto; min-width: 148px; flex: none; }
.filter-bar .fb-dash { color: var(--muted); font-weight: 700; }
.filter-bar .btn-mini { align-self: center; }
@media (max-width: 640px) {
  .filter-bar .fb-dates { width: 100%; }
  .filter-bar .fb-dates .in { flex: 1; min-width: 0; }
}

/* Grid "table" mirroring the mockup; collapses to cards on mobile. */
.bkt { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.bkt-grid { display: grid; grid-template-columns: 1.5fr 1.3fr 1fr .6fr 1fr 1fr; gap: 10px; align-items: center; }
.bkt-head { padding: 11px 16px; background: var(--surface); font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); }
.bkt-row { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 13.5px; cursor: pointer;
  width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; font-family: inherit; }
.bkt-row:hover { background: #f8fafc; }
.bkt-row.open { background: #eff6ff; }
.bkt-lead strong { display: block; color: var(--navy); font-weight: 700; }
.bkt-lead .email { font-size: 12px; color: var(--muted); }
.bkt-row .tourcell { color: var(--ink); }
.bkt-row .depcell, .bkt-row .paxcell { color: var(--ink); font-variant-numeric: tabular-nums; }
.bkt-muted { color: var(--muted); }
.badge.pay-paid { background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.badge.pay-unpaid { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.badge.pay-none { background: var(--surface); border-color: var(--line); color: var(--muted); }
.bkt-empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* Expanded booking detail */
.bkt-detail { border-top: 1px solid var(--line); background: #fbfdff; padding: 16px 18px; }
.bkt-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bkt-detail-head .bd-id { font-weight: 800; font-size: 15px; color: var(--navy); }
.bkt-detail-head .bd-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.trav-table { border-top: 1px solid var(--line); }
.trav-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 10px; }
.trav-head { padding: 8px 0 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.trav-row { padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.trav-row .lead-flag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--blue-dk); background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 1px 7px; }
.doc-ok { color: var(--ok); font-weight: 700; }
.doc-miss { color: #b91c1c; font-weight: 700; }
.doc-pending { color: var(--warn); font-weight: 700; }
.bkt-detail-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 760px) {
  .bkt-head { display: none; }
  .bkt-grid { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .bkt-row .tourcell, .bkt-row .depcell, .bkt-row .paxcell { color: var(--muted); font-size: 12.5px; }
  .trav-grid { grid-template-columns: 1fr; }
  .trav-head { display: none; }
  .trav-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
}

/* Tours list: sort control + destructive actions (tours-cleanup Stage 1) */
.tsort { display: inline-flex; align-items: center; gap: 8px; }
.tsort select.in { width: auto; padding: 7px 10px; font-size: 13px; }
.btn-mini.danger { background: #fff; color: #b91c1c; border: 1px solid #fecaca; }
.btn-mini.danger:hover { background: #fef2f2; border-color: #ef4444; }
.btn-main.danger-btn { background: #dc2626; }
.btn-main.danger-btn:hover { background: #b91c1c; }

/* Staff Logs filter row + Accounting asset-tab action bar (Stage 2 split) */
.log-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.log-filters select.in { width: auto; min-width: 150px; flex: none; }
/* Search box inside the Logs filter row — same treatment as .filter-bar so the
   magnifier icon is constrained (unscoped, it renders at its full SVG size). */
.log-filters .fb-search { position: relative; display: flex; align-items: center; }
.log-filters .fb-search .in { padding-left: 36px; }
.log-filters .fb-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.ac-assets-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* ── Departures page (tours-cleanup Stage 3) ──────────────────────────── */
.badge.st-muted { background: var(--surface); border-color: var(--line); color: var(--muted); }
.dep-toolbar { display: flex; gap: 8px; margin: 16px 0 12px; flex-wrap: wrap; align-items: center; }
.dep-toolbar .fb-search { flex: 1; min-width: 180px; position: relative; display: flex; align-items: center; }
.dep-toolbar .fb-search .in { padding-left: 36px; }
.dep-toolbar .fb-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.dep-toolbar select.in { width: auto; min-width: 150px; flex: none; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.view-toggle button { border: 0; background: #fff; padding: 9px 15px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit; }
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.on { background: var(--surface); color: var(--navy); }

.dep-grid { display: grid; gap: 10px; align-items: center; }
.bk-grid { display: grid; grid-template-columns: 1.3fr .6fr 1fr 1fr; gap: 8px; align-items: center; }

/* Departure detail sections */
.dep-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.dep-sec .field { margin-bottom: 0; }
.dep-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.asg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.asg-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink); }
.asg-chip.primary { background: #eff6ff; border-color: #bfdbfe; }
.asg-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-dk); }
.asg-x { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.asg-x:hover { color: #b91c1c; }
.asg-add { display: flex; gap: 8px; align-items: center; }
.asg-add select.in { width: auto; min-width: 180px; flex: none; }
.bk-sub .bkt-row { padding: 10px 12px; }
.bk-sub .bkt-detail { background: #fff; }

/* Check-in (scoped to a departure) */
.ci-cell { display: flex; justify-content: flex-end; }
.mini-h.ci-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-head .btn-mini { text-transform: none; letter-spacing: 0; }
.ci-title { font-size: 16px; font-weight: 800; color: var(--navy); }
.ci-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.ci-search { position: relative; display: flex; align-items: center; margin-bottom: 12px; }
.ci-search .in { padding-left: 36px; }
.ci-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.ci-grid { display: grid; grid-template-columns: 2fr .6fr 1fr 1.3fr; gap: 8px; align-items: center; }
.ci-grid .email { display: block; font-size: 12px; color: var(--muted); }
.ci-grid.is-in { background: #f0fdf4; }
.ci-arr { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ci-yes { color: #166534; font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ci-undo { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; font-family: inherit; }
.ci-undo:hover { color: var(--navy); }
.ci-flag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .03em; color: #166534; background: #dcfce7; border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
@media (max-width: 560px) { .ci-stats { grid-template-columns: 1fr; } }

/* Calendar view */
.cal { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px; border-bottom: 1px solid var(--line); }
.cal-nav strong { font-size: 15px; color: var(--navy); min-width: 140px; text-align: center; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface); }
.cal-dow span { padding: 7px; text-align: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); }
.cal-cell { min-height: 96px; background: var(--card); padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.empty { background: var(--surface); }
.cal-day { font-size: 12px; font-weight: 700; color: var(--muted); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-cell.today .cal-day { background: var(--blue); color: #fff; }
.cal-chip { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.st-confirmed { background: #dcfce7; color: #166534; }
.cal-chip.st-pending { background: #fef3c7; color: #92400e; }
.cal-chip.st-cancelled { background: #fee2e2; color: #991b1b; }
.cal-chip.st-muted { background: #e2e8f0; color: #475569; }

/* Generate-recurring weekday picker */
.rc-days { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-day { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; }
.rc-day input { margin: 0; }

@media (max-width: 760px) {
  .bkt-head.dep-grid { display: none; }
  .dep-grid { grid-template-columns: 1fr 1fr !important; row-gap: 4px; }
  .cal-cell { min-height: 70px; }
  .cal-chip { font-size: 10px; }
}

/* Two-column traveller breakdown (Waivers/document-status removed — Stage 4) */
.trav-two { display: grid; grid-template-columns: 1.4fr 2fr; gap: 10px; }

/* Owner-access banner (admin panel "Log in as owner", migration 018).
   Deliberately high-contrast and full-width above the topbar — a borrowed
   session must never be mistaken for the admin's own. */
.imp-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff;
  padding: 9px 18px; font-size: 12.5px; font-weight: 600; }
.imp-banner strong { font-weight: 800; }
.imp-banner a { margin-left: auto; color: #fff; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 5px 11px;
  text-decoration: none; font-weight: 700; white-space: nowrap; }
.imp-banner a:hover { background: rgba(255,255,255,.28); }

/* Cash-flow secondary cards (By activity / By account) side by side. */
.rep-grid2 { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.rep-grid2 > .rep-card { flex: 1 1 340px; margin-top: 16px; }

/* Guests list: booking count + what they owe, under the contact line. */
.cu-hit-meta { color: var(--muted); }
.cu-owes { color: var(--warn); font-weight: 700; }

/* ── Report charts ────────────────────────────────────────────────────────
   Hand-rolled inline SVG: no chart library, so the reports page stays a
   single request and prints as it renders. Colours are declared once here as
   roles — the two-series trend pair and the four booking-status hues were run
   through the palette checks against a white card surface (the status set
   warns on the green/amber CVD pair, which is why every status ships a legend
   swatch AND its label, never colour alone). */
.viz {
  --viz-surface: #fff;
  --viz-grid: #e8edf3;
  --viz-muted: var(--muted);
  --viz-1: #2563eb;   /* invoiced */
  --viz-2: #eb6834;   /* received */
  --viz-bar: #2563eb; /* single-series magnitude */
  --viz-track: #eef2f7;
  --viz-confirmed: #047857; --viz-pending: #b45309;
  --viz-completed: #4338ca; --viz-cancelled: #b91c1c;
  position: relative;
}
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-grid-line { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-axis { fill: var(--viz-muted); font-size: 11px; font-weight: 600; }
.viz-axis.num { font-variant-numeric: tabular-nums; }
.viz-label { fill: var(--ink); font-size: 11.5px; font-weight: 700; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { stroke: var(--viz-surface); stroke-width: 2; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 0; opacity: .35; }
.viz-empty { color: var(--muted); font-size: 13px; margin: 18px 0 6px; }

/* Legend — always present for two or more series; the swatch carries the
   colour so the text never has to. */
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.viz-key { display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
  font-weight: 700; color: var(--ink); }
.viz-key i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.viz-key span { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Tooltip: positioned over the chart, never inside the SVG. */
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--navy);
  color: #fff; border-radius: 9px; padding: 8px 11px; font-size: 12px; line-height: 1.5;
  box-shadow: 0 8px 24px -8px rgba(15,23,42,.5); white-space: nowrap; display: none; }
.viz-tip.on { display: block; }
.viz-tip b { font-weight: 800; }
.viz-tip .r { display: flex; align-items: center; gap: 7px; }
.viz-tip .r i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.viz-tip .r em { font-style: normal; margin-left: auto; padding-left: 14px;
  font-variant-numeric: tabular-nums; font-weight: 700; }

/* Utilization meter — the unfilled track is a lighter step of the fill's ramp,
   so the ratio reads across the whole bar rather than only where it stops. */
.viz-meter { height: 8px; border-radius: 999px; background: var(--viz-track); overflow: hidden; margin-top: 7px; }
.viz-meter i { display: block; height: 100%; border-radius: 999px; background: var(--viz-bar); }
.viz-meter i.hot { background: var(--viz-pending); }
.viz-meter i.full { background: var(--viz-confirmed); }

@media print {
  .viz-tip { display: none !important; }
  .viz { break-inside: avoid; }
}

/* Settings — base currency picker (shown only while the ledger is empty). */
.cur-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cur-row .in { width: auto; min-width: 260px; flex: 0 1 320px; }

/* Read-only banner — the tenant's subscription is unpaid (feature spec Step 3).
   Amber rather than red: the account is not gone, and everything they built is
   still here. Sits above the topbar for the same reason the owner-access banner
   does — it must be true on every screen, not just the one they landed on. */
.pay-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #b45309, #92400e); color: #fff;
  padding: 9px 18px; font-size: 12.5px; font-weight: 600; line-height: 1.6; }
.pay-banner strong { font-weight: 800; }
.pay-banner .pay-dot { width: 9px; height: 9px; border-radius: 50%; background: #fde68a; flex: none;
  box-shadow: 0 0 0 3px rgba(253,230,138,.28); }
.pay-banner .pay-note { display: block; opacity: .92; font-weight: 500; }
.pay-banner a { margin-left: auto; color: #fff; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 5px 11px;
  text-decoration: none; font-weight: 700; white-space: nowrap; }
.pay-banner a:hover { background: rgba(255,255,255,.28); }
@media print { .pay-banner { display: none; } }

/* Signup email verification (feature spec Step 6) — reuses the auth card. */
.auth-notice { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; border-radius: 10px;
  padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }
.auth-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.btn-link { background: none; border: 0; padding: 0; font-family: inherit; font-size: 13px;
  font-weight: 700; color: var(--blue-dk); cursor: pointer; text-decoration: underline; }
.btn-link:hover { color: var(--navy); }

/* ── Invoice editor: a form-sheet variant of the generic modal ─────────────
   Scoped to `.modal.wide` and the `fm-*` / `inv-*` classes, so every other
   modal sharing this shell (bills, receipts, credit notes, journals) is
   untouched. Same fields, same ids, same handlers — presentation only. */

/* The line table has seven columns; 560px could not show them, so it scrolled
   and hid VAT, Net and the remove button — the three things you check before
   saving. */
.modal.wide { max-width: 900px; }

/* A form this tall needs its own scroll, or the primary action sits below the
   fold and the page scrolls behind the overlay. */
.modal.wide .modal-body { max-height: calc(100vh - 168px); overflow-y: auto; padding-bottom: 0; }

/* ── Sections ─────────────────────────────────────────────────────────────
   Section headings were the same weight and size as field labels, so the form
   read as one undifferentiated list. They are now smaller, upper-case and
   muted, on a rule: quieter than a label, but unmistakably a different level. */
.fm-sec { margin: 0 0 20px; }
.fm-sec:last-of-type { margin-bottom: 0; }
.fm-sec-t { display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
  font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); }
.fm-sec-t::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fm-sec-t .fm-hint { text-transform: none; letter-spacing: 0; font-weight: 600;
  font-size: 11.5px; color: #7c8798; }

/* Rows align to the top: a note under one field used to stretch its neighbour's
   cell, leaving the dead gap under "Invoice date". */
.modal.wide .row2 { align-items: start; gap: 16px; }
.modal.wide .field { margin-bottom: 0; }
.modal.wide .row2 + .row2 { margin-top: 14px; }

/* ── Inputs ───────────────────────────────────────────────────────────────
   One height, one radius, one placeholder colour across text, number, date and
   select. The account dropdown was visibly a different control from the field
   beside it. */
.modal.wide .in { height: 38px; padding: 0 11px; border-radius: 9px; font-size: 13.5px; }
.modal.wide textarea.in { height: auto; padding: 9px 11px; }
.modal.wide select.in { appearance: none; -webkit-appearance: none; padding-right: 30px;
  cursor: pointer; background-repeat: no-repeat; background-position: right 10px center;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
/* Contrast: the browser default placeholder grey falls under 4.5:1 on white. */
.modal.wide .in::placeholder { color: #7c8798; opacity: 1; }
.modal.wide input[type=date].in::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.modal.wide input[type=date].in:hover::-webkit-calendar-picker-indicator { opacity: .9; }

/* ── Line items ───────────────────────────────────────────────────────────
   A shaded, bordered block so the repeating grid reads as one object rather
   than loose rows, with column widths that fit without a scrollbar. */
.inv-lines { border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; overflow: hidden; }
.inv-lines table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.inv-lines thead th { text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); padding: 9px 10px; background: #f4f8fc;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.inv-lines thead th.num, .inv-lines tbody td.num { text-align: right; }
.inv-lines tbody td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.inv-lines tbody tr:last-child td { border-bottom: 0; }
.inv-lines .in { background: #fff; }
.inv-lines .in.num { text-align: right; }
.inv-lines td.in-n { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy);
  font-size: 13.5px; white-space: nowrap; }
.inv-lines col.c-acct { width: 26%; }
.inv-lines col.c-qty  { width: 72px; }
.inv-lines col.c-unit { width: 104px; }
.inv-lines col.c-vat  { width: 72px; }
.inv-lines col.c-net  { width: 112px; }
.inv-lines col.c-del  { width: 42px; }
.inv-lines .jr-del { width: 26px; height: 26px; border-radius: 7px; border: 1px solid transparent;
  background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.inv-lines .jr-del:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.inv-lines .jr-del:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.inv-addline { margin-top: 10px; }

/* Below this width the seven columns stop fitting, so each line becomes a card
   carrying its column names as labels. The markup is unchanged — the same
   <tr>/<td> the handlers query — so no behaviour depends on the width. */
@media (max-width: 780px) {
  .inv-lines table, .inv-lines thead, .inv-lines tbody, .inv-lines tr, .inv-lines td { display: block; width: auto; }
  .inv-lines colgroup, .inv-lines thead { display: none; }
  .inv-lines tbody tr { position: relative; padding: 12px 44px 12px 12px; border-bottom: 1px solid var(--line); }
  .inv-lines tbody tr:last-child { border-bottom: 0; }
  .inv-lines tbody td { border: 0; padding: 0 0 8px; display: grid; grid-template-columns: 92px 1fr;
    align-items: center; gap: 10px; text-align: left; }
  .inv-lines tbody td::before { content: attr(data-label); font-size: 10.5px; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .inv-lines tbody td:last-child { position: absolute; top: 10px; right: 10px; padding: 0; display: block; }
  .inv-lines tbody td:last-child::before { content: none; }
  .modal.wide .row2 { grid-template-columns: 1fr; }
}

/* ── Totals ───────────────────────────────────────────────────────────────
   The output of the form, so it gets a card of its own and the total gets the
   weight. It used to be three equal inline spans. */
.inv-totals { margin: 16px 0 0 auto; width: 300px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px 14px; }
.inv-totals .r { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--muted); padding: 3px 0; }
.inv-totals .r b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.inv-totals .r.tot { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 800; color: var(--navy); }
.inv-totals .r.tot b { font-size: 18px; color: var(--navy); letter-spacing: -.01em; }

/* ── Actions ──────────────────────────────────────────────────────────────
   Sticky, so the primary action is reachable without scrolling a long form,
   and separated from the fields by a rule rather than floating in white. */
.modal.wide .modal-foot { position: sticky; bottom: 0; margin: 20px -22px 0; padding: 14px 22px;
  background: #fff; border-top: 1px solid var(--line); gap: 8px; align-items: center; }
.modal.wide .modal-foot .spacer { flex: 1; }

/* The close control was a bare glyph with no hit area and no focus state. */
.modal-x { width: 34px; height: 34px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; }
.modal-x:hover { background: var(--surface); color: var(--navy); }
.modal-x:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* Visually hidden, still announced — used for the line table's remove column,
   which has an icon-only control and no visible header. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A note that belongs to a row rather than to one field in it. */
.modal.wide .fm-note { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: #7c8798; }

/* The generic modal host's own width, moved off the element.
   It carried style="max-width:560px" inline, which outranks any class — so
   `.modal.wide` silently did nothing and the invoice line table overflowed,
   collapsing its Description column to zero. Both rules are id-level here so
   the wide variant can actually win. */
#gm-modal { max-width: 560px; }
#gm-modal.wide { max-width: 900px; }

/* The supplier bill's net cell wraps its figure in a <span class="bl-net">
   (the handler updates that span), so it needs the same numeric treatment the
   invoice's plain `td.in-n` gets. Both editors share .inv-lines, and this keeps
   them identical rather than nearly-identical. */
.inv-lines td.bl-netcell { font-variant-numeric: tabular-nums; font-weight: 700;
  color: var(--navy); font-size: 13.5px; white-space: nowrap; }

/* NOTE: .bl-lines / .bl-totals / .bl-rm above are no longer referenced — the
   bill editor now uses .inv-lines / .inv-totals / .jr-del, the same components
   as the invoice editor. Left in place rather than deleted: they are inert, and
   removing rules is a separate, riskier change from unifying the two forms. */

/* A field whose value belongs to another document (an asset's cost, date and
   funding come from the supplier bill that bought it). Readable, plainly not
   editable, and not mistaken for a disabled form. */
.in.in-locked,
.in.in-locked:focus {
  background: #f6f7f9;
  color: #4b5563;
  border-color: #e3e6ea;
  cursor: not-allowed;
  box-shadow: none;
}

/* "of which by …" memo rows under a cash account in the Cash Flow statement.
   They restate part of the row above by payment method — not extra cash — so
   they are indented and quieter than the account line they belong to. */
.rep-table tr.cf-method td { padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.rep-table tr.cf-method td:nth-child(2) { padding-left: 26px; }
