/* Vintage Journeys (India · MP · Odisha) — operations app. One stylesheet; every colour comes from the tokens below.
   Brand theme, shared by all three companies: midnight navy (#0F2440) with a clear blue (#1D63C9) for actions, charcoal grey from
   "INDIA JOURNEYS" and its double rules, and the warm cream of the website and the light logo. */

:root {
  /* top bar: royal blue with cream text and a cream / grey double rule like the logo's */
  --bar: #0f2440;
  --bar-2: #173257;
  --bar-3: #0b1c33;
  --bar-text: #ffffff;
  --bar-faint: #aebfd6;
  --accent: #ffffff;            /* brand mark on the blue bar */
  --brand-grey: #606060;        /* logo grey: rules, secondary marks */
  /* surfaces and lines: clean white and light blue-grey */
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --hover: #eef3f8;
  --line: #e2e8ef;
  --line-strong: #cdd6e0;
  /* text (the website's slate body colour) */
  --text: #1d2b36;
  --text-2: #4d5b68;
  --muted: #6e7a85;
  --faint: #a6aeb5;
  /* actions: clear blue */
  --primary: #1d63c9;
  --primary-hover: #164fa3;
  --primary-soft: #eaf1fc;
  --primary-line: #bcd2f2;
  --focus: #8fb4ea;
  --link: #1d63c9;
  --link-soft: #eef4fd;
  --link-line: #c2d6f3;
  /* status */
  --green: #2f7d3b;
  --green-soft: #ecf7ee;
  --green-line: #bfe3c5;
  --red: #b4322b;
  --red-soft: #fdf1f0;
  --red-line: #f3c4c0;
  --amber: #b45a0a;
  --amber-soft: #fff7ea;
  --amber-line: #f5d29b;
  --highlight: #ffefc2;
  --cyan-soft: #eef4fd;
  --dark-band: #0f2440;
  /* shape and type: League Spartan (the website's font) for headings and controls, Figtree for reading */
  --radius: 8px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "League Spartan", "Figtree", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --shadow-pop: 0 10px 28px rgba(15, 36, 64, .16), 0 2px 6px rgba(15, 36, 64, .08);
}

* { box-sizing: border-box; }
html { font-size: 14.5px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.45;
       min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 600; letter-spacing: 0; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; } h4 { font-size: 1rem; }
p { margin: 0 0 .6rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
img { max-width: 100%; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .tiny { font-size: .78rem; }
.strong { font-weight: 600; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.top { align-items: flex-start; } .grow { flex: 1; min-width: 0; }
.dot-sep > * + *::before { content: "•"; margin: 0 .4rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- App shell: blue sidebar on the left, slim white header ---------- */
body.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
html.nav-compact body.app { grid-template-columns: 68px minmax(0, 1fr); }
.shell { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.shell > main.page { flex: 1; }

.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
           background: var(--bar); color: #fff; z-index: 50; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.sb-brand { display: flex; align-items: center; padding: 18px 20px 14px; }
.sb-brand:hover { text-decoration: none; }
.sb-logo { display: block; width: 100%; max-width: 196px; height: auto; }
.sb-logo-mark { display: none; width: 30px; height: auto; }
.auth-logo { display: block; width: 210px; height: auto; margin: 0 0 1.2rem; }
.sb-nav { flex: 1; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-label { margin: 16px 12px 4px; font-size: .82rem; font-weight: 600;
            color: rgba(255,255,255,.5); }
.sb-link, .nav-group > summary { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px;
           color: rgba(255,255,255,.86); font-family: var(--font-head); font-size: 1.08rem; font-weight: 500; cursor: pointer;
           list-style: none; user-select: none; white-space: nowrap; }
.nav-group > summary::-webkit-details-marker { display: none; }
.sb-link:hover, .nav-group > summary:hover { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.sb-link.active, .nav-group.current > summary { background: rgba(255,255,255,.15); color: #fff; }
.nav-group > summary .chev { margin-left: auto; opacity: .7; transition: transform .15s; }
.nav-group[open] > summary .chev { transform: rotate(180deg); }
.nav-group[open] { padding-bottom: 4px; }
.sb-sub { display: block; margin: 1px 0; padding: 7px 12px 7px 42px; border-radius: 8px; color: rgba(255,255,255,.74);
          font-size: .97rem; white-space: nowrap; }
.sb-sub:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sb-sub.active { color: #fff; font-weight: 600; background: rgba(255,255,255,.12); box-shadow: inset 3px 0 0 #fff; }
.sb-foot { padding: 10px 12px 14px; border-top: 1px solid rgba(255,255,255,.12); }
.sb-collapse { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px;
               background: none; color: rgba(255,255,255,.7); font: inherit; font-size: .95rem; cursor: pointer; }
.sb-collapse:hover { background: rgba(255,255,255,.09); color: #fff; }
/* icons-only sidebar */
html.nav-compact .sb-logo, html.nav-compact .sb-nav span, html.nav-compact .sb-sub, html.nav-compact .sb-label,
html.nav-compact .nav-group .chev, html.nav-compact .sb-collapse span { display: none; }
html.nav-compact .sb-brand { padding: 18px 0 14px; justify-content: center; }
html.nav-compact .sb-logo-mark { display: block; }
html.nav-compact .sb-link, html.nav-compact .nav-group > summary, html.nav-compact .sb-collapse { justify-content: center; padding: 10px 0; }
html.nav-compact .sb-collapse svg { transform: rotate(180deg); }

.appbar { height: 60px; display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; background: var(--surface);
          border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.appbar .icon-btn { background: none; border: 0; padding: .45rem; border-radius: 8px; cursor: pointer; position: relative;
                    display: inline-flex; color: var(--text-2); }
.appbar .icon-btn:hover { background: var(--hover); color: var(--text); }
.avatar-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border: 1px solid var(--line);
              border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; cursor: pointer; }
.avatar-btn:hover { background: var(--hover); }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary);
          color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1rem; padding-top: 2px; }
.avatar-name { font-weight: 600; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: #fa5252; border-radius: 50%; }
.appbar .menu-toggle { display: none; }
.topsearch { flex: 1; max-width: 620px; position: relative; }
.topsearch input, .topsearch input[type=search] { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
                   border-radius: 999px; padding: .55rem 1rem .55rem 2.5rem; font: inherit; font-size: 1rem; min-height: 0; }
.topsearch input[type=search]::placeholder { color: var(--faint); }
.topsearch input[type=search]:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--primary); background: var(--surface); }
.topsearch > svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.nav-scrim { display: none; }
.brand-mark { display: inline-flex; width: 36px; height: 36px; border-radius: 8px; background: var(--primary); color: #fff;
              align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem;
              padding-top: 3px; flex: none; }
.brand-mark:hover { text-decoration: none; }
/* phones and small tablets: the sidebar slides in over the page */
@media (max-width: 980px) {
  body.app, html.nav-compact body.app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(10, 25, 40, .45); z-index: 45; }
  html.nav-compact .sb-logo, html.nav-compact .sb-nav span, html.nav-compact .sb-sub, html.nav-compact .sb-label { display: revert; }
  html.nav-compact .sb-logo-mark { display: none; }
  html.nav-compact .sb-brand { padding: 18px 20px 14px; justify-content: flex-start; }
  .appbar .menu-toggle { display: inline-flex; }
  .sb-collapse { display: none; }
  .appbar-new { display: none; }
}

/* Dropdown menus */
.dd { position: relative; }
.dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface);
           color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop);
           padding: .35rem 0; z-index: 60; }
.dd-menu.right { left: auto; right: 0; }
.dd.open > .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: block; width: 100%; text-align: left; padding: .5rem 1rem; color: var(--text) !important;
           background: none; border: 0; font: inherit; cursor: pointer; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); text-decoration: none; }
.dd-menu .dd-label { padding: .45rem 1rem .2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dd-menu hr { margin: .35rem 0; }
.dd-menu .danger { color: var(--red) !important; }
/* trip list "Sort By": opens on hover (and on click / keyboard), options as radios */
.sort-dd:hover > .dd-menu, .sort-dd:focus-within > .dd-menu { display: block; }
.sort-dd > .dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.dd-menu.sort-menu { min-width: 340px; padding: .4rem 0; }
.sort-cur { margin-left: .15rem; color: var(--text-2); }
.dd-menu.sort-menu a { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.2rem; font-size: 1.05rem; }
.dd-menu.trip-menu { min-width: 170px; padding: .35rem 0; font-weight: 400; font-size: 1.05rem; }
.dd-menu.trip-menu a, .dd-menu.trip-menu button { display: flex; align-items: center; gap: .55rem; padding: .7rem 1.1rem; }

/* Notifications popover */
.notif-pop { width: 380px; max-height: 420px; overflow: auto; padding: 0; }
.notif-pop header { display: flex; justify-content: space-between; padding: .7rem 1rem; border-bottom: 1px solid var(--line);
                    position: sticky; top: 0; background: var(--surface); }
.notif-item { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.notif-item.unread { background: var(--primary-soft); }
.notif-item .title { font-weight: 600; }

/* ---------- Page header band ---------- */
.page-head { background: var(--bg); border-bottom: 1px solid var(--line); padding: .9rem 1.5rem; display: flex; align-items: center;
             gap: 1rem; flex-wrap: wrap; min-height: 68px; }
.page-head h1 { font-size: 1.6rem; }
.page-sub { margin-top: .1rem; color: var(--muted); font-size: .95rem; }
.page-head .back { display: inline-flex; color: var(--text); padding: .2rem; border-radius: 4px; }
.page-head .back:hover { background: var(--line); text-decoration: none; }
.crumbs { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: 1.02rem; padding-left: 1rem;
          border-left: 1px solid var(--line-strong); flex-wrap: wrap; }
.crumbs a { color: var(--muted); } .crumbs span.sep::before { content: "›"; }
.head-actions { margin-left: auto; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

main.page { flex: 1; width: 100%; }
.pad { padding: 1.25rem 1.5rem; }
.narrow { max-width: 1180px; margin: 1.5rem auto; padding: 0 1rem; }
.footer { color: var(--muted); padding: 1.2rem 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; background: var(--bg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem;
       padding: .52rem 1.05rem; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface);
       color: var(--primary); cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--primary-soft); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.soft { background: var(--primary-soft); border-color: var(--primary-line); }
.btn.plain { border-color: transparent; background: none; color: var(--text-2); }
.btn.plain:hover { background: var(--line); }
.btn.danger { color: var(--red); } .btn.danger:hover { background: var(--red-soft); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.sm { padding: .3rem .65rem; font-size: .88rem; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.icon-link { display: inline-flex; align-items: center; color: var(--muted); padding: .15rem; border-radius: 4px; background: none;
             border: 0; cursor: pointer; }
.icon-link:hover { color: var(--primary); background: var(--primary-soft); }
.kebab { display: inline-flex; padding: .25rem; border-radius: 4px; background: none; border: 0; cursor: pointer; color: var(--text-2); }
.kebab:hover { background: var(--line); }

/* ---------- Search box with filter toggle ---------- */
.searchbox { position: relative; min-width: 280px; width: 520px; max-width: 100%; }
.searchbox input, .searchbox input[type=search] { width: 100%; padding: .55rem 2.6rem .55rem 2.4rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
                   font: inherit; font-size: 1rem; background: var(--surface); }
.searchbox input:focus { outline: 2px solid var(--focus); border-color: var(--primary); }
.searchbox .lead { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox .trail { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); }
.searchbox .trail .count-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

/* ---------- Layout with left status tabs ---------- */
.with-tabs { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: calc(100vh - 200px); }
.with-tabs.wide-tabs { grid-template-columns: 230px minmax(0, 1fr); }
.with-tabs.with-filters { grid-template-columns: 180px minmax(0, 1fr) 360px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); }
.split.with-filters { grid-template-columns: minmax(0, 1fr) 360px; }
.vtabs { background: var(--surface); border-right: 1px solid var(--line); padding: 1rem 0; }
.vtabs a { display: block; padding: .8rem 1.4rem .8rem 2rem; color: var(--text-2); font-family: var(--font-head); font-size: 1.1rem; font-weight: 500;
           border-left: 3px solid transparent; }
.vtabs a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.vtabs a.active { color: var(--primary-hover); font-weight: 600; background: var(--primary-soft); border-left-color: var(--primary); }
.vtabs .count { float: right; color: var(--muted); font-weight: 500; font-size: .9rem; }
.vtabs .group { padding: .9rem 2rem .3rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tab-body { padding: 1.1rem 1.5rem 2rem; min-width: 0; }
/* List pages: status filter chips above the list (the list then takes the full width) */
.with-tabs:has(> .chipbar) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.with-tabs.with-filters:has(> .chipbar) { grid-template-columns: minmax(0, 1fr) 360px; }
.with-tabs:has(> .chipbar) > .chipbar { grid-column: 1 / -1; }
.with-tabs:has(> .chipbar) > .tab-body { padding-top: .6rem; }
.chipbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1.1rem 1.5rem .3rem; }
.fchip { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .8rem; border-radius: 6px;
         border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-family: var(--font-head);
         font-size: 1.02rem; font-weight: 500; white-space: nowrap; }
.fchip:not(:has(.n)) { padding-right: .95rem; }
.fchip:hover { border-color: var(--primary-line); color: var(--primary); text-decoration: none; }
.fchip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.fchip .n { min-width: 0; padding: 0; color: var(--muted);
            font-family: var(--font); font-size: .8rem; font-weight: 700; text-align: center; }
.fchip.on .n { color: rgba(255, 255, 255, .8); }
.chip-group { margin: 0 .2rem 0 .8rem; font-size: .85rem; font-weight: 600; color: var(--muted); }

.showing { display: flex; align-items: center; gap: .5rem; color: var(--text-2); font-weight: 500; font-size: .98rem; margin-bottom: .9rem; }
.showing b { color: var(--text); font-weight: 700; }
.showing .refresh { color: var(--text-2); display: inline-flex; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.list-toolbar .showing { margin: 0; }

/* ---------- Horizontal tabs ---------- */
.htabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); background: var(--surface); padding: 0 1.5rem;
         overflow-x: auto; }
.htabs a { padding: 1rem 1rem .9rem; color: var(--text-2); font-family: var(--font-head); font-weight: 500; font-size: 1.1rem; border-bottom: 3px solid transparent;
           white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.htabs a:hover { color: var(--text); text-decoration: none; }
.htabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.htabs .badge-count { border: 1px solid var(--line-strong); border-radius: 50%; min-width: 22px; height: 22px; font-size: .8rem;
                      display: inline-flex; align-items: center; justify-content: center; }
.subtabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.subtabs a { padding: .7rem 1rem; color: var(--text-2); font-weight: 500; border-bottom: 3px solid transparent; }
.subtabs a.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.subtabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between;
             align-items: center; gap: 1rem; }
.card-head h3 { font-size: 1.15rem; }
.card-body { padding: 1.1rem 1.2rem; }
.section-title { font-size: 1.3rem; margin: 1.3rem 0 .8rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stat-label { color: var(--muted); font-weight: 500; font-size: .95rem; }
.stat-value { font-size: 1.8rem; font-weight: 600; letter-spacing: -.02em; }
.stat-grid { display: flex; gap: 2.5rem; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-weight: 600; font-size: .88rem;
                color: var(--text-2); padding: .75rem 1.1rem; border-bottom: 1px solid var(--line);
                white-space: nowrap; vertical-align: bottom; background: var(--surface-2); }
table.data td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .98rem; }
table.data tbody tr:hover > td { background: var(--primary-soft); }
table.data tr:last-child > td { border-bottom: 0; }
table.data th.right, table.data td.right { text-align: right; }
table.data td.actions { width: 1%; white-space: nowrap; text-align: right; }
table.data .sub { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
table.data .id-link { font-weight: 600; font-size: 1.08rem; display: inline-flex; align-items: center; gap: .2rem; }
table.data.compact td, table.data.compact th { padding: .55rem .8rem; }
table.data tfoot td { font-weight: 600; background: var(--primary-soft) !important; }
table.grouped td.group-row { background: var(--surface-2) !important; font-size: 1.05rem; }
table.nested { width: 100%; border-collapse: collapse; border: 1px solid var(--line); }
table.nested td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: .55rem .7rem; background: var(--surface) !important; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money sup.cur { font-size: .66em; color: var(--muted); margin-right: .25em; font-weight: 500; letter-spacing: .02em; vertical-align: .7em; }
.money.big { font-size: 1.9rem; font-weight: 600; } .money.lg { font-size: 1.3rem; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.contact-icons { display: inline-flex; gap: .45rem; margin-left: .4rem; vertical-align: middle; color: var(--muted); }
.contact-icons a { color: var(--muted); display: inline-flex; } .contact-icons a:hover { color: var(--primary); }

/* ---------- Badges / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .65rem; border-radius: 999px; font-size: .85rem;
        font-weight: 600; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.pill.red { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.pill.blue { background: var(--primary-soft); color: var(--primary); border-color: var(--focus); }
.pill.cyan { background: var(--cyan-soft); color: var(--link); border-color: var(--link-line); }
.pill.dark { background: var(--dark-band); color: #fff; border-color: var(--dark-band); }
.pill.new { background: var(--green); color: #fff; border: 0; font-size: .72rem; padding: .1rem .45rem; border-radius: 10px; }
.status-line { font-weight: 600; } .status-line .by { font-weight: 400; color: var(--muted); font-size: .88rem; display: block; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: var(--primary-soft);
        border: 1px solid var(--focus); font-size: .9rem; }
.chip button { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0; font-size: 1rem; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-badge { display: inline-flex; padding: .1rem .5rem; border-radius: 4px; font-size: .88rem; font-weight: 600; border: 1px solid var(--line-strong); }
.day-badge.first { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.day-badge.last { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.city-chip { display: inline-flex; gap: .35rem; align-items: center; font-weight: 600; }
.city-chip .n { background: var(--primary-soft); color: var(--primary); border-radius: 4px; padding: 0 .4rem; font-size: .85rem; }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 2.4rem; }
.form-section { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.form-section:first-child { padding-top: .4rem; } .form-section:last-of-type { border-bottom: 0; }
.form-section .intro h3 { font-size: 1.25rem; display: flex; gap: .5rem; align-items: center; }
.form-section .intro p { color: var(--muted); margin-top: .35rem; font-size: .98rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.2rem; align-content: start; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields.one { grid-template-columns: minmax(0, 1fr); }
.fields .span-2 { grid-column: span 2; } .fields .span-all { grid-column: 1 / -1; }
.field label, .label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .98rem; }
.field label .opt { font-weight: 400; color: var(--muted); font-size: .88rem; margin-left: .25rem; }
.field .help { color: var(--muted); font-size: .86rem; margin-top: .3rem; }
.field .errors { margin-top: .35rem; }
.field-error { display: inline-block; background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); border-radius: 4px;
               padding: .1rem .5rem; font-size: .85rem; font-weight: 500; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=datetime-local], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); padding: .55rem .75rem; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--surface); min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 90px; resize: vertical; }
select[multiple] { min-height: 120px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red-line); }
.checkbox { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-tiles { display: flex; gap: .75rem; flex-wrap: wrap; }
.check-tiles label { border: 1px solid var(--line-strong); border-radius: 5px; padding: .6rem 1rem; display: inline-flex; gap: .5rem;
                     align-items: center; font-weight: 600; cursor: pointer; background: var(--surface-2); }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.radio-cards label { display: flex; gap: .7rem; padding: 1.1rem 1.2rem; cursor: pointer; margin: 0; }
.radio-cards label:has(input:checked) { background: var(--primary-soft); }
.radio-cards .title { font-weight: 600; font-size: 1.05rem; } .radio-cards .desc { color: var(--text-2); font-weight: 400; font-size: .92rem; margin-top: .25rem; }
.radio-cards .eg { font-weight: 600; font-size: .9rem; color: var(--text-2); margin-top: .35rem; }
.form-actions { display: flex; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.form-actions.offset { padding-left: calc(300px + 2rem); }
.protip { text-align: center; margin: 1.6rem 0; color: var(--text-2); } .protip b { color: var(--text); }
.info-box { background: var(--primary-soft); border: 1px solid var(--focus); color: var(--primary-hover); border-radius: 5px; padding: .9rem 1rem; display: flex; gap: .6rem; }
.warn-box { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber); border-radius: 5px; padding: .9rem 1rem;
            display: flex; gap: .6rem; align-items: center; font-weight: 500; }
.inline-fields { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-fields input { width: auto; }
.input-group { display: flex; } .input-group > * { border-radius: 0 !important; } .input-group > :first-child { border-radius: 5px 0 0 5px !important; }
.input-group > :last-child { border-radius: 0 5px 5px 0 !important; } .input-group > * + * { margin-left: -1px; }

/* Date picker (static/js/app.js) */
.dp { position: relative; width: 100%; }
.dp-pop { position: fixed; z-index: 90; width: 330px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
          box-shadow: var(--shadow-pop); padding: .7rem .7rem .6rem; }
.dp-head { display: flex; align-items: center; padding: .2rem .4rem .6rem; font-size: 1.05rem; }
.dp-head button { background: none; border: 0; font-size: 1.5rem; line-height: 1; padding: .1rem .55rem; cursor: pointer; border-radius: 4px; color: var(--text); }
.dp-head button:hover { background: var(--bg); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-wd { font-size: .85rem; font-weight: 600; color: var(--text-2); padding: .3rem 0 .5rem; }
.dp-day { background: none; border: 0; border-radius: 5px; font: inherit; font-size: 1rem; font-weight: 500; padding: .45rem 0; cursor: pointer; color: var(--text); }
.dp-day.out { color: var(--text-2); }
.dp-day:hover { background: var(--primary-soft); }
.dp-day.today { background: var(--hover); font-weight: 700; }
.dp-day.sel { background: var(--primary); color: #fff; font-weight: 700; }
.dp-day:disabled { color: var(--line-strong); cursor: default; background: none; }
.date-range .dp { min-width: 0; }

/* Autocomplete & multi-select */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 2px); background: var(--surface); border: 1px solid var(--line-strong);
           border-radius: 5px; box-shadow: var(--shadow-pop); max-height: 280px; overflow: auto; z-index: 70; display: none; }
.ac-list.open { display: block; }
.ac-item { padding: .5rem .75rem; cursor: pointer; } .ac-item .sub { color: var(--muted); font-size: .85rem; }
.ac-item.active, .ac-item:hover { background: var(--primary-soft); }
.ac-empty { padding: .6rem .75rem; color: var(--muted); }
.ac-item.ac-add { display: flex; align-items: center; gap: .5rem; background: var(--hover); border-bottom: 1px solid var(--line); }
/* record pickers list their options as radios; the picked one is checked (click it again to clear) */
.ac-item.ac-opt { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; }
.ac-item.ac-opt + .ac-item.ac-opt { border-top: 1px solid var(--line); }
.ac-radio { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--muted); background: var(--surface); }
.ac-radio.on { border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--surface); background: var(--primary); }
.ac-add .ac-radio { margin-left: .05rem; }
.ac-check { flex: none; width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid var(--muted); background: var(--surface); position: relative; }
.ac-check.on { background: var(--primary); border-color: var(--primary); }
.ac-check.on::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ac-item.ac-add:has(.ac-radio) { padding: .7rem .8rem; }
.ac-list:has(.ac-opt) { max-height: 290px; overflow-y: auto; }
.ac-item .ac-reach { color: var(--text-2); margin-top: .15rem; }
.ac-item .ac-reach svg { vertical-align: -2px; margin-right: .15rem; color: var(--muted); }
.ac-item.ac-add.active, .ac-item.ac-add:hover { background: var(--primary-soft); }
/* Add Trip Source Details (New Query) */
.src-dlg .modal-body { max-height: calc(100vh - 160px); }
.src-dlg [hidden] { display: none !important; }
.src-dlg .radio-cards { margin-bottom: .4rem; }
.src-dlg .radio-cards input { align-self: flex-start; margin-top: .3rem; flex: none; width: 16px; height: 16px; accent-color: var(--primary); }
.src-dlg .form-section { grid-template-columns: 300px minmax(0, 1fr); }
.src-phones { display: flex; flex-direction: column; gap: .5rem; }
.src-phone { display: flex; align-items: stretch; }
.src-phone select { width: 150px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.src-phone input { width: 190px; border-radius: 0; border-left: 0; }
.src-phone .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; padding: 0 .85rem; color: var(--primary); }
.src-dlg .src-errors:empty { display: none; }
dialog.modal.ct-dlg { width: min(1000px, calc(100vw - 2rem)); }
/* New Query: Destination and Duration / Guest Details */
.nq-block { display: flex; flex-direction: column; gap: 1.2rem; }
.nq-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.nq-pax { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
.nq-pax:not(:has(.field:not([hidden]))) { display: none; }
.nq-adults { width: 130px; } .nq-foc { width: 175px; } .nq-sal { width: 230px; } .nq-name { width: 290px; } .nq-wide { width: 420px; max-width: 100%; }
.nq-info { color: var(--text-2); display: inline-flex; vertical-align: -3px; cursor: help; }
.nq-ages { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nq-age { display: inline-flex; align-items: center; }
.nq-age input { width: 80px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nq-x { border: 1px solid var(--line-strong); border-left: 0; background: var(--surface); height: 100%; min-height: 40px; padding: 0 .55rem;
        border-radius: 0 5px 5px 0; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; }
.nq-ico { width: 64px; justify-content: center; color: var(--primary); padding: 0; min-height: 40px; }
.nq-phone-line { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.nq-block [hidden] { display: none !important; }
#tourist-match .info-box { margin: 0; }
@media (max-width: 760px) { .nq-row3 { grid-template-columns: 1fr; } .nq-sal, .nq-name, .nq-wide { width: 100%; } .nq-phone-line { gap: .6rem; } }
.ct-dlg .ct-actions { border-top: 1px solid var(--line); margin-top: 1.6rem; padding-top: 1.6rem; display: flex; gap: 1rem; }
@media (max-width: 760px) { .src-dlg .form-section { grid-template-columns: 1fr; } .src-phone input { width: auto; flex: 1; } .src-phone select { width: 110px; } }
.ac-picked { color: var(--text-2); font-size: .88rem; margin-top: .3rem; font-weight: 600; }
.ms { border: 1px solid var(--line-strong); border-radius: 5px; padding: .3rem; background: var(--surface); min-height: 40px; position: relative; }
.ms .chips { padding: .1rem; } .ms input.ms-search { border: 0; outline: 0; min-height: 30px; padding: .2rem .4rem; width: 100%; }
.ms-chips:not(:empty) { margin-top: .5rem; }
.ms-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .7rem; border: 1px solid var(--focus); border-radius: 4px;
           background: var(--primary-soft); color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; }
.ms-chip:hover { border-color: var(--primary); }
.ms:focus-within { outline: 2px solid var(--focus); border-color: var(--primary); }

/* ---------- Filters side panel ---------- */
.filters { background: var(--surface); border-left: 1px solid var(--line); padding: 0; display: none; }
.with-filters > .filters { display: block; }
.filters .f-head { padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.filters .f-body { padding: 1.2rem 1.3rem; display: grid; gap: 1.25rem; }
.filters .f-body .field > label { font-weight: 600; font-size: 1.02rem; }
.filters .f-body .checkbox { font-weight: 600; font-size: 1.02rem; }
/* Share Package → Email */
.share-toggles { display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; padding: .9rem 1.5rem; background: var(--surface-2);
                 border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-toggles .checkbox { font-weight: 600; font-size: 1.02rem; }
/* "☐ Price Breakup (Component Wise Total) ▾": the label is the type picker */
.share-breakup { display: inline-flex; align-items: center; gap: .45rem; }
.share-breakup input { width: 16px; height: 16px; accent-color: var(--primary); }
.share-breakup select { width: auto; border: 0; background-color: transparent; font-weight: 600; font-size: 1.02rem;
                        padding: 0 1.6rem 0 0; min-height: 0; cursor: pointer; color: var(--text);
                        field-sizing: content; /* as wide as the chosen type, so ▾ follows the text */ }
.share-breakup select:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.share-email-body { position: relative; background: var(--surface); padding-top: 0; }
.share-email-actions { position: sticky; top: 0; z-index: 2; float: right; display: flex; gap: .6rem; align-items: center;
                       background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px;
                       padding: .55rem .8rem; margin: 0 -1.5rem 0 1rem; }
.share-email { padding-top: 1.2rem; color: #111; overflow-x: auto; }
.share-email-to { clear: both; margin-top: 1rem; }
.live-loading .tab-body { opacity: .55; transition: opacity .15s; pointer-events: none; }
.filters .f-dlabel { display: flex; justify-content: space-between; align-items: center; }
.filters .f-cal { color: var(--text-2); display: inline-flex; }
.filters .date-range { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .3rem; }
.filters .f-foot { padding: 1.2rem 1.3rem; border-top: 1px solid var(--line); display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; }
.filters .f-foot .btn.primary { padding: .65rem 1.3rem; font-size: 1.05rem; }
.date-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: .4rem; align-items: center; }

/* ---------- Pagination / empty ---------- */
.pager { display: flex; justify-content: center; gap: 1.2rem; margin: 1.4rem 0; }
.empty { text-align: center; padding: 3.5rem 1rem; color: var(--text-2); }
.empty .icon { color: var(--muted); margin-bottom: .6rem; } .empty h3 { font-weight: 500; font-size: 1.3rem; margin-bottom: .9rem; }
.caught-up { text-align: center; padding: 1.5rem 1rem; } .caught-up h3 { font-size: 1.2rem; margin-bottom: .5rem; }

/* ---------- Messages ---------- */
.messages { position: fixed; top: 70px; right: 1.2rem; z-index: 80; display: grid; gap: .5rem; max-width: 420px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .75rem 1rem;
       box-shadow: var(--shadow-pop); display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; }
.msg.success { border-left-color: var(--green); } .msg.error { border-left-color: var(--red); } .msg.warning { border-left-color: #f59f00; }
.msg button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1.1rem; line-height: 1; }

/* ---------- Dialog ---------- */
dialog.modal { border: 0; border-radius: 8px; padding: 0; width: min(760px, calc(100vw - 2rem)); box-shadow: var(--shadow-pop); color: var(--text); }
dialog.modal.wide { width: min(1280px, calc(100vw - 2rem)); } dialog.modal.small { width: min(480px, calc(100vw - 2rem)); }
dialog.modal::backdrop { background: rgba(16, 20, 24, .55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.35rem; }
.modal-body { padding: 1.3rem 1.5rem; max-height: calc(100vh - 220px); overflow: auto; }
.modal-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; gap: .75rem; justify-content: flex-end; }
.close-x { background: none; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; padding: .3rem; display: inline-flex; }

/* ---------- Trip page: summary panel with fact tiles and segmented section tabs ---------- */
.trip-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1.1rem 1.5rem 0; }
.th-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.th-title { min-width: 0; }
.th-back { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.th-back:hover { color: var(--primary); text-decoration: none; }
.trip-hero h1 { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; line-height: 1.2; color: var(--text); }
.trip-hero h1 .th-dest { color: var(--text-2); font-weight: 400; }
.th-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .5rem; }
.th-id { font-family: var(--mono); font-size: .92rem; color: var(--text-2); }
.th-src { color: var(--muted); font-size: .92rem; }
.th-actions > .btn { display: inline-flex; align-items: center; gap: .35rem; }
.th-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 1.1rem; border-top: 1px solid var(--line); }
.th-fact { padding: .8rem 1.1rem .7rem; border-left: 1px solid var(--line); min-width: 0; }
.th-fact:first-child { border-left: 0; padding-left: 0; }
.th-k { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .86rem; }
.th-k .icon-link { margin-left: auto; }
.th-v { margin-top: .15rem; font-size: 1.05rem; font-weight: 600; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; overflow-wrap: anywhere; }
.th-s { margin-top: .1rem; font-size: .88rem; color: var(--text-2); min-height: 1.1em; }
.th-money .th-v { font-variant-numeric: tabular-nums; }
.th-taglist { display: inline-flex; align-items: center; gap: .3rem; margin-left: .4rem; padding-left: .7rem; border-left: 1px solid var(--line);
               color: var(--muted); font-size: .92rem; }
.th-team { margin-top: .25rem; font-size: .95rem; display: flex; align-items: center; gap: .35rem; }
.th-team-edit { margin-left: auto; }
.th-role { display: inline-block; min-width: 3rem; color: var(--muted); font-size: .86rem; }
.seg-tabs { display: flex; gap: .3rem; margin-top: 1rem; overflow-x: auto; }
.seg-tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border-radius: 9px 9px 0 0;
              color: var(--text-2); font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; white-space: nowrap;
              border: 1px solid transparent; border-bottom: none; margin-bottom: -1px; }
.seg-tabs a:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.seg-tabs a.active { color: var(--primary); font-weight: 600; background: var(--bg); border-color: var(--line); }
.seg-tabs .n { min-width: 0; padding: 0; color: var(--muted);
               font-family: var(--font); font-size: .78rem; font-weight: 700; text-align: center; }
.seg-tabs a.active .n { color: var(--primary); }
.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 1.25rem; padding: 1.25rem 1.5rem; }
.trip-layout.full { grid-template-columns: minmax(0, 1fr); }

/* Quote display */
.option-band { display: inline-block; background: var(--dark-band); color: #fff; font-weight: 600; font-size: 1.15rem; padding: .55rem .8rem; border-radius: 4px; }
.band { background: var(--dark-band); color: #fff; padding: .75rem 1.2rem; display: flex; justify-content: space-between; align-items: center; border-radius: 4px; }
.svc-block { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1rem; margin: 1rem 0; }
.svc-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex;
            align-items: center; justify-content: center; }
.price-option { display: inline-block; margin-right: 2.2rem; margin-bottom: .8rem; }
.price-option .name { font-weight: 600; font-size: 1.05rem; border-bottom: 2px solid var(--text); display: inline-block; margin-bottom: .4rem; }
.price-option .sell { color: var(--link); font-size: 2rem; font-weight: 600; }
.day-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.day-row .day { text-align: center; } .day-row .day b { display: block; font-size: 1.2rem; }
.day-tile { border: 1px solid var(--link-line); border-radius: 5px; text-align: center; overflow: hidden; width: 150px; flex: none; }
.day-tile .t { background: var(--cyan-soft); color: var(--link); font-family: var(--mono); font-weight: 700; padding: .5rem; }
.day-tile .d { padding: .4rem; line-height: 1.6; }
.incl li::marker { color: #40c057; } .excl li::marker { color: #f03e3e; }
.itin-day { display: flex; gap: 1.8rem; margin-bottom: 1.4rem; }
.markdown p:last-child { margin-bottom: 0; } .markdown ol, .markdown ul { padding-left: 1.4rem; }
details.fold > summary { font-size: 1.35rem; font-weight: 600; cursor: pointer; margin: 1.2rem 0; list-style: none; }
details.fold > summary::before { content: "▶"; font-size: .9rem; margin-right: .6rem; vertical-align: .1em; }
details.fold[open] > summary::before { content: "▼"; }
.suggest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
/* New Quote tab: suggestions (left) beside Tasks & Comments (right) */
.nq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; align-items: start; }
.nq-main { border-right: 1px solid var(--line); min-height: 100%; }
.nq-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 2.2rem;
           background: var(--surface); border-bottom: 1px solid var(--line); }
.nq-head h2 { font-size: 1.3rem; font-weight: 600; max-width: 440px; line-height: 1.45; }
.nq-head .searchbox { width: 580px; }
.nq-head .searchbox input { padding-top: .7rem; padding-bottom: .7rem; }
.nq-cards { padding: 1.9rem .6rem 2rem; }
.nq-side { padding: 1.2rem 1.2rem; }
.sg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 1.2rem 1.2rem; }
.sg-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem 1.2rem; margin: 0 -1.2rem;
           border-bottom: 1px solid var(--line); }
.sg-who { color: var(--text-2); font-size: 1rem; }
.sg-cities { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.sg-cities .city-chip { font-size: 1.1rem; }
.sg-cities .city-chip .n { border: 1px solid var(--focus); padding: .05rem .55rem; font-size: .95rem; }
.sg-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: 0 -.2rem .7rem; padding: .6rem .8rem 0; }
.sg-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: .7rem 1.6rem .85rem; font-size: 1.1rem;
                  color: var(--text-2); cursor: pointer; font-weight: 500; }
.sg-tabs button.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.sg-tabs button:hover { color: var(--text); }
.sg-day { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 4px;
          padding: .45rem .55rem; margin-bottom: .6rem; }
.sg-day .day-chip { flex: none; }
.sg-day:has(.svc-chip + .svc-chip) { flex-wrap: wrap; }  /* several services that day */
.sg-day .svc-chip { align-items: center; padding: .25rem .65rem; min-width: 0; }
.sg-day .svc-chip svg { flex: none; }
.sg-none { padding: .4rem 0 .6rem; }
.sg-hotels { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 4px; margin-bottom: .6rem; }
.sg-hotels th { text-align: left; font-weight: 600; padding: .75rem 1.2rem; border-bottom: 1px solid var(--line); }
.sg-hotels td { padding: .9rem 1.2rem; vertical-align: top; }
.sg-hotels tr + tr td { border-top: 1px solid var(--line); }
.sg-hotels .r { text-align: right; }
.sg-hotels .sg-opt td { font-weight: 600; background: var(--surface-2, var(--surface-2)); padding: .5rem 1.2rem; }
.sg-nights { display: inline-block; border: 1px solid var(--focus); background: var(--primary-soft); color: var(--primary); border-radius: 4px;
             padding: .25rem .75rem; max-width: 150px; font-weight: 500; }
.sg-loc { font-size: .9rem; white-space: nowrap; } .sg-loc svg { vertical-align: -3px; }
.sg-details { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; margin: .1rem 0 .9rem; font-size: .9rem; }
.sg-details dd { margin: 0; text-align: right; font-weight: 600; }
.sg-use { margin-top: 1.1rem; padding: .7rem; font-size: 1.1rem; }
.day-chip { display: inline-flex; border: 1px solid var(--focus); background: var(--primary-soft); color: var(--primary); padding: .15rem .6rem; border-radius: 4px; font-weight: 600; }
.svc-chip { display: inline-flex; gap: .4rem; background: var(--highlight); padding: .2rem .6rem; border-radius: 4px; }

/* ---------- Quote builder (trips/quote_builder.html + static/js/quote_builder.js) ---------- */
.qb { --qb-gap: 2.6rem; --qb-total-bg: var(--primary-soft); --qb-total-line: var(--primary-line); --qb-total-text: var(--primary); --qb-amber-bg: #fff3d6; --qb-amber-line: #f5d38a; --qb-amber-text: #a85d00; --qb-cyan-bg: var(--link-soft); }
.qb-errors { padding: 1rem 1.5rem 0; } .qb-errors ul { margin: .35rem 0 0 1.1rem; padding: 0; font-weight: 400; }
.qb-sec { background: var(--surface); padding: 1.6rem 1.5rem 1.4rem; }
.qb-sec + .qb-sec { margin-top: var(--qb-gap); }
.qb-sec.qb-joined, .qb-sec.qb-tight { margin-top: 0; }
.qb-sec.qb-tight { padding-top: 1.3rem; }
.qb-sec.qb-last { border-top: 1px solid var(--line); }
.qb-basic { background: var(--bg); padding-bottom: 2.2rem; }
.qb-basic + .qb-sec, .qb-sec.qb-summary { margin-top: 0; }
.qb select, #qb-dlg select, #qb-dlg2 select {
  appearance: none; -webkit-appearance: none; padding-right: 2.3rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23343a40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center / 16px; }
.qb select[disabled] { background-color: var(--hover); color: var(--muted); }
.qb-dlgnote { margin-top: 1.2rem; }
.qb-title { font-size: 1.6rem; font-weight: 600; }
.qb-desc { color: var(--text-2); font-size: 1.05rem; margin: .35rem 0 .7rem; }
.qb-basics { display: flex; flex-wrap: wrap; gap: 1.6rem 2.2rem; align-items: center; margin: .3rem 0 1.1rem; }
.qb-stat-l { color: var(--muted); font-weight: 500; font-size: .9rem; }
.qb-stat-v { font-size: 1.25rem; font-weight: 600; margin-top: .25rem; }
.qb-editbasic { align-self: center; }
.qb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.qb-packages { padding: .95rem 1.2rem; }
.qb-pk { display: flex; align-items: center; gap: 1rem; } .qb-pk h3 { font-size: 1.25rem; }
.qb-pk-names { color: var(--text-2); margin-top: .35rem; font-weight: 500; }
.qb-sq { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border: 1px solid var(--line-strong);
         border-radius: 5px; background: var(--surface); color: var(--primary); cursor: pointer; padding: 0 .4rem; flex: none; }
.qb-sq:hover { background: var(--primary-soft); } .qb-sq.on { background: var(--primary-soft); border-color: var(--focus); }
.qb-sq[disabled] { opacity: .4; pointer-events: none; }
.qb-head { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: .9rem; align-items: start; margin-bottom: 1.4rem; }
.qb-head h2 { font-size: 1.6rem; display: flex; align-items: center; gap: .6rem; }
.qb-head p { color: var(--text-2); font-size: 1.05rem; margin: .3rem 0 0; }
.qb-head .qb-tip { font-size: .93rem; color: var(--text-2); margin-top: .45rem; }
.qb-head .qb-tip svg { vertical-align: -3px; margin-right: .2rem; }
.qb-head .qb-tip b { color: var(--text); }
.qb-icon { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.qb-icon.sm { width: 48px; height: 48px; }
.qb-new { display: inline-flex; align-items: center; gap: .2rem; background: var(--green); color: #fff; border-radius: 999px; font-size: .72rem;
          font-weight: 700; padding: .12rem .5rem; letter-spacing: .02em; }
.qb-addfirst { margin-top: .2rem; font-size: 1.05rem; padding: .65rem 1.2rem; }
.qb-outline { color: var(--primary); }
.qb-more { display: flex; justify-content: flex-end; margin: 1rem 0 .4rem; }
.qb-subsec { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.4rem; }
.qb-subsec h3 { font-size: 1.15rem; }
.qb-totals { display: flex; justify-content: flex-end; margin-top: .9rem; }
.qb-total-box { display: inline-flex; gap: .4rem; align-items: baseline; background: var(--qb-total-bg); color: var(--qb-total-text);
                border: 1px solid var(--qb-total-line); border-radius: 5px; padding: .75rem 1.3rem; font-weight: 600; font-size: 1.08rem; }
.qb-total-box.col { flex-direction: column; align-items: flex-end; gap: .45rem; }
.qb-total-box .money sup.cur { color: var(--qb-total-text); }
.qb-optbar { background: var(--dark-band); color: #fff; display: flex; gap: .6rem; align-items: center; padding: .6rem 1rem; border-radius: 4px; margin: 1rem 0 .4rem; }
.qb-optbar b { font-size: 1.05rem; }
.qb-optband { background: var(--dark-band); color: #fff; display: flex; justify-content: space-between; padding: .65rem 1rem; border-radius: 4px; margin: 1.4rem 0 .6rem; }
.qb-optband b { font-size: 1.05rem; } .qb-optband span { color: var(--line-strong); }

/* fields */
.qb-grid { display: grid; gap: .9rem 1.1rem; align-items: start; }
.qb-f { min-width: 0; position: relative; }
.qb-f > label { display: flex; align-items: center; gap: .35rem; font-weight: 600; font-size: 1rem; margin-bottom: .4rem; min-height: 1.4em; }
.qb-f > label .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.qb-f input[disabled] { background: var(--hover); color: var(--muted); }
.qb-inline { display: flex; gap: .5rem; align-items: center; } .qb-inline > .cb { flex: 1; min-width: 0; }
.qb-sub { color: var(--text-2); font-size: .9rem; margin-top: .35rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.qb-signed { display: inline-flex; color: var(--text-2); vertical-align: middle; }
.qb-expand { background: none; border: 0; padding: 0 .1rem; cursor: pointer; color: var(--muted); font: inherit; font-weight: 400; display: inline-flex; align-items: center; gap: .05rem; }
.qb-expand:hover, .qb-expand.on { color: var(--primary); }
.qb-ico { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 4px; padding: .3rem; cursor: pointer; color: var(--text-2); }
.qb-ico:hover { background: var(--bg); color: var(--primary); }
.qb-linkico { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; cursor: pointer; color: var(--text-2); font: inherit; font-weight: 600; padding: .2rem .3rem; }
.qb-linkico:hover { color: var(--primary); }
.qb-x { align-self: center; margin-top: 1.7rem; background: none; border: 0; cursor: pointer; color: var(--text-2); padding: .3rem; border-radius: 4px; display: inline-flex; }
.qb-x:hover { background: var(--red-soft); color: var(--red); }
.qb-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.qb-chip { display: inline-flex; align-items: center; gap: .45rem; background: var(--primary-soft); border: 1px solid var(--focus); border-radius: 5px;
           padding: .3rem .6rem; font-size: .95rem; cursor: pointer; }
.qb-chip input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.qb-pop { position: absolute; z-index: 75; top: 4.6rem; right: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
          box-shadow: var(--shadow-pop); padding: .8rem 1rem; display: grid; gap: .45rem; min-width: 190px; }
.qb-pop-t { font-weight: 600; }

/* combobox */
.cb { position: relative; }
.cb-in { width: 100%; }
.cb[data-locked] .cb-in { background: var(--hover); cursor: default; }
.cb-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 1px); z-index: 70; background: var(--surface); border: 1px solid var(--line-strong);
           border-radius: 0 0 5px 5px; box-shadow: var(--shadow-pop); max-height: 260px; overflow-y: auto; min-width: 180px; }
.cb-list.open { display: block; }
.cb-item { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 1rem; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.cb-item:last-child { border-bottom: 0; }
.cb-item:hover, .cb-item.active { background: var(--hover); }
.cb-mark { flex: none; width: 16px; height: 16px; margin-top: .18rem; border: 1.5px solid var(--muted); background: var(--surface); }
.cb-mark.radio { border-radius: 50%; } .cb-mark.box { border-radius: 3px; }
.cb-mark.radio.on { border-color: var(--primary); box-shadow: inset 0 0 0 3px var(--surface); background: var(--primary); }
.cb-mark.box.on { border-color: var(--primary); background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cb-text { min-width: 0; } .cb-sub { display: block; color: var(--muted); font-size: .86rem; margin-top: .1rem; }
.cb-sign { display: block; color: var(--text-2); margin-top: .15rem; }
.cb-empty { padding: .7rem 1rem; color: var(--muted); }

/* hotel rows */
.qb-hrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr); border-bottom: 4px solid var(--line); margin-bottom: .2rem; }
.qb-hleft { padding: .4rem 1.4rem 1.4rem 0; border-right: 1px solid var(--line); display: grid; gap: 1.1rem; align-content: start; }
.qb-hgrid-a { grid-template-columns: 1.3fr 1.55fr .75fr 1fr; }
.qb-hgrid-s { grid-template-columns: 1.6fr .8fr 1fr; }
.qb-hgrid-b { grid-template-columns: 150px 125px 88px 88px 88px auto; }
.qb-comp { font-weight: 600; font-size: 1.05rem; padding-top: .55rem; } .qb-comp span { font-weight: 400; color: var(--text-2); }
.qb-similar { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.qb-simlist { display: grid; gap: .2rem; font-size: .93rem; }
.qb-cmtf input { max-width: 640px; }
.qb-hprices { padding: .4rem 0 1.2rem 1.4rem; display: flex; flex-direction: column; }
.qb-ph { display: flex; align-items: center; gap: .3rem; min-height: 2.2rem; margin-bottom: .6rem; }
.qb-ph h3 { font-size: 1.25rem; } .qb-ph h4 { font-size: 1.08rem; font-weight: 600; }
.qb-fill { color: var(--text-2); font-size: .95rem; margin: .4rem 0 1rem; }
.qb-ptable { border: 1px solid var(--line); border-radius: 5px; }
.qb-ptable table { width: 100%; border-collapse: collapse; }
.qb-ptable th { text-align: left; font-weight: 600; padding: .7rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.qb-ptable td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.qb-ptable tr:last-child td { border-bottom: 0; }
.qb-ptable input { min-height: 36px; padding: .35rem .6rem; }
.qb-hsum { font-size: .78em; vertical-align: .55em; font-weight: 600; }
.qb-tiny { font-size: .82rem; color: var(--text-2); } .qb-tiny.dark { color: var(--text); } .qb-tiny.link { color: var(--link); }
.qb-na { color: var(--qb-amber-text); white-space: nowrap; font-size: 1.02rem; } .qb-na sup.cur { color: var(--qb-amber-text); }
.qb-na-plain { color: var(--text-2); }
.qb-given { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 5px;
            padding: .45rem .9rem; cursor: pointer; font: inherit; min-width: 120px; justify-content: center; color: var(--text); }
.qb-given:hover { border-color: var(--primary); }
.qb-given.warn { background: #fcc419; border-color: #fab005; color: var(--text); }
.qb-given.warn sup.cur { color: var(--bar-2); }
.qb-given sup.cur { font-size: .66em; color: var(--muted); vertical-align: .7em; }
.qb-pactions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.1rem; }

/* given price dialog */
.qb-gtable { border: 1px solid var(--line); border-radius: 5px; }
.qb-gtable table { width: 100%; border-collapse: collapse; }
.qb-gtable th, .qb-gtable td { padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); text-align: left; }
.qb-gtable thead th { font-weight: 600; } .qb-gtable tbody th { font-weight: 600; }
.qb-gtable tfoot td { border-top: 2px solid var(--line); border-bottom: 0; }
.qb-gtable input { max-width: 160px; }
.qb-gtable .c { text-align: center; } .qb-gtable .r { text-align: right; }
.qb-foot { justify-content: flex-start; }
.qb-samenights { margin-top: 1.4rem; font-size: 1.02rem; font-weight: 600; }
dialog.modal .modal-head h2 { font-weight: 600; }

/* similar hotels dialog */
.qb-simbase { display: flex; flex-wrap: wrap; gap: 1.2rem 2.6rem; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: 6px; padding: 1.2rem 2.4rem 1.6rem; margin-bottom: 1.6rem; }
.qb-simbase .l { color: var(--text-2); margin-bottom: .2rem; } .qb-simbase b { font-size: 1.05rem; }
.qb-stars { color: var(--muted); letter-spacing: .1em; } .qb-stars .off { color: var(--line); }
#qb-dlg .qb-hrow { margin-bottom: 1.2rem; }

/* transports */
.qb-samecab { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: var(--cyan-soft); border: 1px solid var(--link-line);
              border-radius: 5px; padding: .75rem 1.2rem; margin-bottom: 1.8rem; min-height: 50px; }
.qb-samecab .checkbox { font-weight: 600; font-size: 1.02rem; }
.qb-samechip { display: inline-flex; align-items: center; gap: .6rem; background: var(--primary-soft); border: 1px solid var(--focus); border-radius: 5px;
               color: var(--primary); font: inherit; font-weight: 600; font-size: 1.02rem; padding: .55rem 1rem; cursor: pointer; }
.qb-samechip:hover { background: var(--primary-line); }
.qb-cabset table td { vertical-align: middle; }
.qb-cabset .qb-inline { max-width: 330px; }
.qb-cabqty { width: 130px !important; }
.qb-cabset-add { padding: .8rem 1.2rem; border-top: 2px solid var(--line); }
.qb-cablabel { font-size: 1.02rem; line-height: 1.5; }
/* "Add new Transport Service" dialog */
.qb-ns { padding-top: 1.2rem; }
.qb-ns-quick { display: flex; justify-content: flex-end; }
.qb-ns-quick .btn { gap: .55rem; color: var(--text); }
.qb-ns-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.4rem 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.qb-ns-intro h3 { font-size: 1.45rem; display: flex; gap: .6rem; align-items: center; }
.qb-ns-intro p { color: var(--text-2); font-size: 1.05rem; margin: .5rem 0 0 2.2rem; line-height: 1.55; }
.qb-ns-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.4rem; align-content: start; }
.qb-ns-fields .span-all { grid-column: 1 / -1; }
.qb-ns-three { display: grid; grid-template-columns: 1fr .8fr 1fr; gap: 1.2rem; }
.qb-locrow { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.qb-ico.red { color: var(--red); }
.qb-nscheck { font-weight: 600; }
.qb-closure { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; } .qb-closure input { max-width: 200px; }
.qb-ns-summary { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
                 padding: 1.3rem 1.3rem 1.5rem; margin-top: 2.2rem; }
.qb-ns-summary .t { font-size: 1.6rem; font-weight: 600; margin-top: 1rem; }
.qb-ns-summary .d { color: var(--text-2); font-size: 1.05rem; white-space: pre-wrap; margin-top: .2rem; }
.qb-ns-foot { justify-content: center; gap: 1.2rem; }
.qb-ns-foot .btn { padding: .75rem 1.3rem; font-size: 1.05rem; }
/* "Add new Hotel" dialog (shares the section layout above) */
.qb-nh-intro h3 { font-size: 1.6rem; }
.qb-nh-intro p { margin-left: 0; }
.qb-nh-bullets { margin: .6rem 0 0; padding-left: 1.2rem; color: var(--text-2); font-size: .95rem; line-height: 1.55; }
.qb-nh-bullets li + li { margin-top: .2rem; }
.qb-nh-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qb-nh-loc .cb { max-width: calc(50% - .7rem); }
.qb-nh-toggle { display: inline-flex; gap: 2rem; align-items: center; background: none; border: 0; font: inherit; font-weight: 600; font-size: 1.05rem; cursor: pointer; padding: .4rem 0; }
.qb-nh-note { color: var(--text-2); font-size: 1.02rem; margin: .4rem 0 0; }
.qb-nh-sub { font-size: 1.15rem; font-weight: 600; }
.qb-nh-groups { border-left: 1px solid var(--line); margin-top: 1rem; }
.qb-nh-group { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1rem 1.4rem; padding: 1rem 1.2rem 1.3rem; border-bottom: 1px solid var(--line); }
.qb-nh-beds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: .9rem; }
.qb-nh-rooms input { max-width: 130px; }
.qb-nh-gx { position: absolute; top: .6rem; right: .4rem; }
.qb-nh-gadd { padding: 1rem 1.2rem 0; }
.qb-nh-ages { display: flex; gap: 1.4rem; } .qb-nh-ages input { width: 130px; }
@media (max-width: 900px) { .qb-ns-sec, .qb-ns-fields, .qb-ns-three, .qb-nh-group { grid-template-columns: 1fr; } .qb-ns-intro p { margin-left: 0; } .qb-nh-loc .cb { max-width: none; } }
.qb-datecell { white-space: nowrap; }
.qb-ptable tr.qb-cabday td { border-top: 1px solid var(--line); }
/* Same Cab Type for All: the price table needs no cab pickers, so the service fields get more room */
.qb-item.same { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 46px; }
.qb-item.same .qb-tmain { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.4rem; }
.qb-item.same .qb-tmain .qb-kind { grid-column: 1 / -1; }
.qb-item.same .qb-tmain .qb-wloc { grid-column: 1; grid-row: 2; }
.qb-item.same .qb-tmain .qb-wtype { grid-column: 2; grid-row: 2; }
.qb-item.same .qb-tmain .qb-two { grid-column: 2; grid-row: 3; }
.qb-qty { width: 72px !important; }
.qb-block { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.4rem; border-bottom: 4px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.6rem; }
.qb-bdays .qb-chips { flex-direction: column; align-items: flex-start; }
.qb-bmain { min-width: 0; }
.qb-item { display: grid; grid-template-columns: minmax(280px, 470px) minmax(0, 1fr) 46px; gap: 1rem 1.4rem; padding-bottom: 1.6rem; }
.qb-item + .qb-item { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.qb-imain { display: grid; gap: 1rem; align-content: start; }
.qb-kind { display: inline-flex; gap: .35rem; align-items: center; color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
           text-decoration-color: var(--focus); margin-bottom: -.6rem; width: max-content; }
.qb-wloc { max-width: 100%; } .qb-wtype { max-width: 100%; }
.qb-wtype .qb-inline > .cb { max-width: 285px; }
.qb-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qb-two.sm { grid-template-columns: repeat(2, minmax(0, 145px)); }
.qb-iprices { min-width: 0; padding-top: 1.5rem; }
.qb-iprices .qb-ptable td { vertical-align: top; padding: .75rem .7rem; }
.qb-iprices .qb-ptable th { padding: .7rem; }
.qb-iprices .qb-ptable tr:not(.qb-cabday) > td:first-child, .qb-iprices .qb-ptable th:first-child { padding-left: 1rem; width: 52%; }
.qb-iprices .qb-ptable .cb { min-width: 120px; }
.qb-iprices .qb-ptable .qb-inline { gap: .2rem; }
.qb-givenin { width: 100% !important; min-width: 80px; max-width: 130px; }
.qb-iprices .qb-qty { width: 64px !important; }
.qb-addmore { display: inline-flex; align-items: center; gap: .6rem; background: none; border: 0; color: var(--text-2); font: inherit; font-size: 1.05rem;
              font-weight: 600; cursor: pointer; padding: .7rem 0; }
.qb-addmore:hover { color: var(--primary); }
.qb-cmt { margin-top: .6rem; }
.qb-iact { display: grid; gap: .8rem; align-content: start; padding-top: 3.2rem; }
.qb-iact .qb-sq { width: 42px; height: 38px; }
.qb-badd { display: flex; gap: 1.2rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.3rem; }
.qb-bfoot { display: flex; justify-content: flex-end; gap: 1.6rem; margin-top: 1.2rem; }
.qb-reorder { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.qb-reorder li { display: flex; gap: .6rem; align-items: center; border: 1px solid var(--line); border-radius: 5px; padding: .55rem .8rem; }
.qb-reorder li .grow { display: flex; gap: .5rem; align-items: center; }

/* extras & flights */
.qb-xrow { margin: .4rem 0 1.4rem; }
.qb-xrow.hotel { grid-template-columns: repeat(5, minmax(0, 1fr)) 40px; }
.qb-xrow.trip { grid-template-columns: repeat(4, minmax(0, 1fr)) 40px; }
.qb-flight { grid-template-columns: repeat(4, minmax(0, 1fr)) repeat(2, minmax(0, 1.15fr)) 80px 1fr 40px; margin-bottom: 1.2rem; }
.qb-note { margin-top: 1rem; align-items: center; }

/* summary */
.qb-summary { background: var(--qb-cyan-bg); }
.qb-sstats { display: flex; gap: 2.6rem; padding: 1.2rem 1.4rem; margin: .4rem 0 1.8rem; }
.qb-sblock { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: .9rem; margin: 1.4rem 0 .4rem; }
.qb-sblock h3 { font-size: 1.25rem; margin: .7rem 0 .7rem; }
.qb-sblock.qb-stransport { align-items: center; } .qb-sblock.qb-stransport h3 { margin: 0; }
.qb-sicon { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.qb-stable { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; margin-bottom: 1rem; }
.qb-stable table { width: 100%; border-collapse: collapse; }
.qb-stable th { text-align: left; font-weight: 600; padding: .8rem 1.3rem; border-bottom: 1px solid var(--line); }
.qb-stable td { padding: .85rem 1.3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.qb-stable tr:last-child td { border-bottom: 0; }
.qb-stable .r { text-align: right; }
.qb-sum-box { display: inline-flex; gap: .4rem; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: .6rem 1.2rem; font-size: 1.05rem; }
.qb-misconf { display: flex; gap: 1rem; background: var(--qb-amber-bg); border: 1px solid var(--qb-amber-line); color: var(--qb-amber-text); border-radius: 6px; padding: 1.3rem 1.5rem; margin: 1rem 0 1.6rem; }
.qb-misconf h4 { font-size: 1.05rem; margin-bottom: .6rem; }
.qb-misconf p { margin: 0 0 .5rem; font-size: 1.02rem; }
.qb-misconf dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem .6rem; margin: .5rem 0 1rem; font-size: 1.02rem; line-height: 1.6; }
.qb-misconf dt { font-weight: 600; } .qb-misconf dd { margin: 0; }
.qb-back { display: inline-flex; gap: .5rem; align-items: center; background: none; border: 0; color: var(--text-2); font: inherit; font-weight: 600; font-size: 1.05rem;
           cursor: pointer; padding: .4rem 1.4rem; margin-bottom: .8rem; }
.qb-back:hover { color: var(--text); }
.qb-skip { display: flex; gap: .4rem; align-items: center; font-size: .92rem !important; }
.qb-sday { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 1.4rem; margin-bottom: 1rem; }
.qb-sdaytile { background: var(--surface); text-align: center; padding: .9rem .5rem; border-radius: 5px; align-self: start; }
.qb-sdaytile b { font-size: 1.2rem; display: block; }
.qb-sdaycards { display: grid; gap: .8rem; }
.qb-scard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 160px; gap: 1rem; background: var(--surface); border: 1px solid var(--line);
            border-radius: 6px; padding: 1.1rem 1.3rem 1.6rem; }
.qb-scard b { font-size: 1.05rem; } .qb-scard .r { text-align: right; }
.qb-scab + .qb-scab { margin-top: .6rem; }
#qb-cost { display: grid; gap: 1rem; justify-items: end; margin-top: 3rem; }
.qb-costrow { display: flex; gap: 1.6rem; align-items: stretch; flex-wrap: wrap; justify-content: flex-end; }
.qb-costname { align-self: center; font-weight: 600; }
.qb-costbox { display: flex; align-items: center; gap: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .9rem 1.3rem; }
.qb-costbox .l { font-weight: 600; font-size: 1.05rem; }
.qb-costbox .v { font-size: 1.3rem; margin-top: .25rem; }
.qb-costbox.hl { background: var(--primary-soft); border-color: var(--primary-line); display: block; } .qb-costbox.hl .l { color: var(--primary); }
.qb-plus { font-size: 1.3rem; }
.qb-cost-note { text-align: right; font-size: .95rem; margin: .6rem 0 0; }

/* pricing */
.qb-strategy { display: flex; gap: 2.6rem; flex-wrap: wrap; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: 6px; padding: 1.2rem 1.4rem; }
.qb-strategy select, .qb-strategy input { min-width: 0; }
.qb-strategy .qb-f:first-child select { width: 290px; } .qb-strategy #qb-currency { width: 146px; } .qb-foc { width: 112px !important; }
.qb-info { display: inline-flex; color: var(--text); cursor: help; }
.qb-ptitle { color: var(--link); font-size: 1.3rem; font-weight: 600; margin: 2rem 0 1.2rem; }
.qb-mwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.qb-mtable { width: 100%; border-collapse: collapse; min-width: 900px; }
.qb-mtable th { background: var(--hover); padding: .9rem 1.2rem; font-weight: 600; vertical-align: bottom; white-space: nowrap; }
.qb-mtable th > div { margin-bottom: .45rem; }
.qb-mtable th.qb-blank { background: var(--surface); width: 140px; }
.qb-mtable td { padding: .95rem 1.2rem; vertical-align: top; border-top: 1px solid var(--line); }
.qb-mtable .r { text-align: right; } .qb-mtable .c { text-align: center; }
.qb-mtable th.qb-rcol, .qb-mtable td.qb-rcol { background: var(--primary-soft); border-left: 1px solid var(--line); }
.qb-mtable .qb-totrow td { background: var(--qb-total-bg); font-weight: 600; font-size: 1.05rem; }
.qb-mtable .qb-totrow td.qb-rcol { background: var(--qb-total-bg); }
.qb-hsel { width: auto; min-width: 140px; } .qb-round { width: auto; min-height: 34px; padding: .2rem .5rem; margin-left: .3rem; }
.qb-gst { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; cursor: pointer; }
.qb-gst input { width: 16px; height: 16px; accent-color: var(--primary); }
.qb-pctw { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.qb-pct { width: 78px !important; }
.qb-mk { display: inline-flex; align-items: center; gap: .4rem; } .qb-mk input { width: 118px; }
.qb-eq, .qb-curl { font-size: .86rem; color: var(--text-2); font-style: italic; margin-top: .3rem; font-weight: 400; }
.qb-mtable.comp td:first-child, .qb-mtable.comp th.qb-compcol { background: var(--hover); text-align: left; }
.qb-mtable.comp td:first-child { font-size: 1.05rem; }
.qb-mtable.comp tfoot td { background: var(--qb-total-bg) !important; font-weight: 600; font-size: 1.05rem; border-top: 2px solid var(--line-strong); }
.qb-mtable.comp tbody td { padding-bottom: 1.6rem; }
.qb-mtable .qb-gstcol .qb-pctw { margin-top: .35rem; }
.qb-ppline { text-align: right; margin-top: .7rem; font-size: 1.02rem; }
/* Per-Person settings and group rows */
.qb-ppset { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.75fr); gap: 2rem; align-items: start; margin-top: 2rem; }
.qb-ppset .qb-ptitle { margin: 0 0 1.2rem; }
.qb-pppax { font-weight: 600; font-size: 1.05rem; margin-bottom: 1.1rem; }
.qb-pphead { margin-bottom: .8rem; font-size: 1.02rem; }
.qb-ppex { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.qb-ppex label { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; cursor: pointer; }
.qb-ppex label input { width: 16px; height: 16px; accent-color: var(--primary); }
.qb-ppn { width: 78px !important; display: inline-block; }
.qb-ppn:disabled { color: var(--text-3, var(--faint)); }
.qb-ppnote { font-weight: 600; margin-top: 1.1rem; }
.qb-ppright { border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.qb-pptable { width: 100%; border-collapse: collapse; }
.qb-pptable th { padding: .9rem 1.3rem; text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); }
.qb-pptable td { padding: .9rem 1.3rem; font-weight: 600; }
.qb-pptable tr + tr td { border-top: 1px solid var(--line); }
.qb-pptable .c { text-align: center; }
.qb-segk { color: var(--text-2); font-weight: 400; font-size: .9rem; }
.qb-seg + .qb-seg { margin-left: 1.4rem; }  /* "Hotels: 7,200   Transports: 9,000" */
.qb-mtable.qb-pp td.qb-ppfor { background: var(--hover); }
.qb-mtable.qb-pp th.qb-blank, .qb-mtable.qb-pp td.qb-ppfor { width: 22%; min-width: 230px; }  /* "/Child with Extra Bed/Mattress" on one line */
.qb-mtable.qb-pp tbody td { padding-bottom: 1.4rem; }
.qb-mtable.qb-pp tfoot td { border-top: 1px solid var(--line); }
.qb-mtable .qb-gm { width: 130px; }
.qb-mkv { font-style: italic; }
.qb-rwarn { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.4rem; padding: 1.1rem 1.4rem; border: 1px solid #f5c26b;
            background: var(--qb-amber-bg); border-radius: 6px; color: var(--amber); }
.qb-rwarn-t { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.qb-rwarn p { margin: .35rem 0 0; font-size: 1.05rem; }
.qb-rwarn .money sup, .qb-rwarn sup { color: inherit; }
.qb-final-wide { flex: 1 1 100%; max-width: 1020px; }
.qb-finalpp { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.qb-finalpp table { width: 100%; border-collapse: collapse; font-size: 1.08rem; }
.qb-finalpp th { font-weight: 600; padding: .9rem 1.3rem; border-bottom: 1px solid var(--line); }
.qb-finalpp td { padding: 1rem 1.3rem; } .qb-finalpp .r { text-align: right; }
.qb-finalpp tbody tr + tr td { border-top: 1px solid var(--line); }
.qb-finalpp tfoot tr:first-child td { border-top: 2px solid var(--line-strong); padding-bottom: .3rem; }
.qb-fpt { font-size: 1.5rem; font-weight: 600; }
.qb-fpv { font-size: 1.6rem; font-weight: 700; white-space: nowrap; }
.qb-fpv sup { font-family: var(--mono); font-size: 1rem; font-weight: 400; color: var(--text-2); margin-right: .35rem; vertical-align: .7em; }
.qb-fptax { font-weight: 600; padding-top: 0 !important; }
@media (max-width: 860px) { .qb-ppset { grid-template-columns: 1fr; } }
.qb-remarks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; margin-top: 1.6rem; }
.qb-remarks .md-box textarea { min-height: 150px; }
.qb-remarks > .field > textarea { min-height: 80px; }

/* final price */
.qb-final { background: var(--qb-cyan-bg); border: 1px solid var(--link-line); border-radius: 6px; padding: 1.2rem 1.4rem 1.4rem; }
.qb-final-head { display: flex; gap: .8rem; align-items: center; }
.qb-final-head h2 { font-size: 1.6rem; } .qb-final-head p { margin: .1rem 0 0; color: var(--text-2); font-size: 1.05rem; }
#qb-final { display: flex; gap: 3rem; flex-wrap: wrap; }
.qb-final-opt { margin-top: 1rem; }
.qb-final-name { font-weight: 600; border-bottom: 2px solid var(--text); display: inline-block; margin-bottom: .3rem; }
.qb-final-price { font-size: 2.4rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.qb-final-price sup { font-family: var(--mono); font-size: 1.25rem; font-weight: 400; color: var(--text-2); vertical-align: .9em; margin-right: .3rem; }
.qb-final-pp { color: var(--text-2); margin-top: .2rem; }
.qb-final-tax { font-weight: 600; margin-top: .7rem; font-size: 1.05rem; }
.qb-actions { display: flex; gap: 1.2rem; align-items: center; border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 2.6rem; }
.qb-actions .btn { padding: .75rem 1.35rem; font-size: 1.05rem; }
.qb-kids { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.qb-kid { display: inline-flex; align-items: center; gap: .2rem; } .qb-kid input { width: 82px; }
.qb-bdlg .qb-kids { flex-wrap: wrap; max-width: 420px; }
/* Edit Quote's Basic Details */
.qb-bdlg { display: flex; flex-direction: column; gap: 1.3rem; }
.qb-binfo, .qb-bwarn { display: flex; gap: .9rem; align-items: flex-start; border-radius: 6px; padding: 1.1rem 1.4rem; }
.qb-binfo svg, .qb-bwarn svg { flex: none; margin-top: .15rem; }
.qb-binfo { background: var(--primary-soft); border: 1px solid var(--focus); color: var(--primary); }
.qb-binfo > div > b:first-child { display: block; font-size: 1.15rem; font-weight: 600; line-height: 1.45; }
.qb-binfo p { margin: .55rem 0 0; line-height: 1.55; }
.qb-bwarn { background: var(--qb-amber-bg, #fff8e1); border: 1px solid #f5c26b; color: var(--amber); align-items: center; }
.qb-binfo + .qb-bwarn { position: relative; margin-top: .5rem; }
.qb-binfo + .qb-bwarn::before, .qb-bwarn + .qb-brow::before { content: ""; position: absolute; left: 0; right: 0; top: -1.05rem; border-top: 1px solid var(--line); }
.qb-bwarn + .qb-brow { position: relative; margin-top: .5rem; }
.qb-brow { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
.qb-bstart { width: 325px; } .qb-bnum { width: 195px; } .qb-badults { width: 160px; } .qb-bfoc { width: 175px; }
.qb-kidadd { width: 64px; justify-content: center; color: var(--primary); padding: 0; min-height: 40px; }
.qb-bdfoot { display: flex; gap: 1.6rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.6rem; margin-top: .4rem; }
.qb-bdfoot .btn.primary { padding: .7rem 1.3rem; font-size: 1.05rem; }
@media (max-width: 600px) { .qb-bstart, .qb-bnum, .qb-badults, .qb-bfoc { width: 100%; } }
.qb-optedit { display: flex; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.qb-optn { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }

@media (max-width: 1200px) {
  .qb-hgrid-a { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-item, .qb-item.same { grid-template-columns: minmax(0, 1fr) 46px; } .qb-iprices { grid-column: 1; grid-row: 2; padding-top: 0; }
  .qb-iact { grid-row: 1 / span 2; grid-column: 2; }
}
@media (max-width: 980px) {
  .qb-hrow { grid-template-columns: 1fr; } .qb-hleft { border-right: 0; padding-right: 0; } .qb-hprices { padding-left: 0; }
  .qb-hgrid-b { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qb-block { grid-template-columns: 1fr; }
  .qb-xrow.hotel, .qb-xrow.trip, .qb-flight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qb-x { margin-top: 0; justify-self: start; }
  .qb-remarks { grid-template-columns: 1fr; }
  .qb-scard { grid-template-columns: 1fr; } .qb-scard .r { text-align: left; }
  .qb-sday { grid-template-columns: 1fr; } .qb-sdaytile { text-align: left; }
}
@media (max-width: 600px) {
  .qb-sec { padding-left: 1rem; padding-right: 1rem; }
  .qb-item, .qb-item.same { grid-template-columns: minmax(0, 1fr); } .qb-iprices { grid-row: auto; }
  .qb-item.same .qb-tmain { grid-template-columns: minmax(0, 1fr); }
  .qb-item.same .qb-tmain > * { grid-column: auto !important; grid-row: auto !important; }
  .qb-iact { grid-column: auto; grid-row: auto; display: flex; padding-top: 0; }
  .qb-ptable th, .qb-ptable td, .qb-iprices .qb-ptable th, .qb-iprices .qb-ptable td { padding: .55rem .4rem; }
  .qb-iprices .qb-ptable tr:not(.qb-cabday) > td:first-child, .qb-iprices .qb-ptable th:first-child { padding-left: .6rem; width: auto; }
  .qb-iprices .qb-ptable .cb { min-width: 96px; }
  .qb-iprices [data-act="open-cab"] { display: none; }
  .qb-iprices .qb-qty { width: 50px !important; } .qb-givenin { min-width: 64px; }
  .qb-given { min-width: 0; padding: .45rem .55rem; }
  .qb-ph { flex-wrap: wrap; }
  .qb-hgrid-a, .qb-hgrid-s, .qb-two { grid-template-columns: 1fr; }
  .qb-head { grid-template-columns: 1fr; } .qb-icon { width: 44px; height: 44px; }
  .qb-sblock { grid-template-columns: 1fr; } .qb-sicon { display: none; }
}

/* Calendar strip */
.cal { display: grid; grid-template-columns: repeat(12, minmax(150px, 1fr)); overflow-x: auto; background: var(--surface); border-top: 1px solid var(--line); }
.cal .col { border-right: 1px solid var(--line); min-width: 150px; }
.cal .dh { text-align: center; padding: .7rem .3rem; border-bottom: 1px solid var(--line); }
.cal .dh .dn { font-size: 1.8rem; font-weight: 600; line-height: 1.2; } .cal .dh.today .dn { background: var(--primary); color: #fff; border-radius: 50%; display: inline-block; width: 48px; height: 48px; line-height: 48px; }
.cal .dh.sun { color: var(--link); }
.cal .sum { text-align: center; font-size: 1.5rem; font-weight: 600; padding: .5rem; border-bottom: 1px solid var(--line); }
.cal .sum .c { color: var(--green); } .cal .sum .a { color: #f76707; }
.cal .ev { margin: .4rem; padding: .5rem .6rem; border-radius: 4px; font-size: .88rem; line-height: 1.35; display: block; color: var(--text); }
.cal .ev:hover { text-decoration: none; filter: brightness(.97); }
.cal .ev .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .none { text-align: center; color: var(--muted); font-size: .85rem; padding: .3rem; background: var(--cyan-soft); margin: .4rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; }
.dot.ok { background: #40c057; } .dot.pending { background: #fab005; }
.ev-0 { background: var(--link-soft); } .ev-1 { background: #fff0f6; } .ev-2 { background: var(--amber-soft); } .ev-3 { background: var(--link-soft); } .ev-4 { background: #f3f0ff; } .ev-5 { background: #fff4e6; }

/* Dashboard */
.dash { padding: 1.5rem; display: grid; gap: 1.5rem; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.dash-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-row { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.metric-row .m .l { color: var(--text-2); font-weight: 500; font-size: 1.02rem; display: inline-flex; align-items: center; gap: .25rem; }
.metric-row .m .v { font-size: 1.6rem; font-weight: 600; margin-top: .3rem; }
.toggle { display: inline-flex; gap: .2rem; } .toggle a { padding: .35rem .75rem; border-radius: 5px; color: var(--text-2); font-weight: 500; }
.toggle a.active { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--focus); } .toggle a:hover { text-decoration: none; }
.period-nav { display: inline-flex; align-items: center; gap: .4rem; }

/* Auth */
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 400px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2rem; }

/* Print helpers (screen pages) */
@media print { .sidebar, .appbar, .footer, .head-actions, .vtabs, .filters { display: none !important; } body { background: #fff; display: block !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .nq-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .nq-head .searchbox { width: 420px; }
  .with-tabs.with-filters { grid-template-columns: 180px minmax(0, 1fr); }
  .split.with-filters { grid-template-columns: minmax(0, 1fr); }
  .with-filters .filters { position: fixed; right: 0; top: 60px; bottom: 0; width: 360px; overflow: auto; z-index: 50; box-shadow: var(--shadow-pop); }
  .trip-layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .dash-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .topsearch { max-width: none; }
  .with-tabs, .with-tabs.wide-tabs { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .vtabs { display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .vtabs a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: .8rem 1rem; }
  .vtabs a.active { border-bottom-color: var(--primary); }
  .vtabs .group { display: none; }
  .chipbar { flex-wrap: nowrap; overflow-x: auto; padding: .8rem 1rem .3rem; }
  .form-section { grid-template-columns: 1fr; gap: 1rem; } .form-actions.offset { padding-left: 0; }
  .form-card { padding: 1.2rem; }
  .th-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-layout { grid-template-columns: 1fr; padding: 1rem; }
  .suggest-grid, .dash-grid, .dash-grid.four { grid-template-columns: 1fr; }
  .searchbox { width: 100%; }
  .nq-layout { grid-template-columns: 1fr; } .nq-main { border-right: 0; }
  .nq-head { flex-direction: column; align-items: stretch; padding: 1rem; } .nq-head .searchbox { width: 100%; }
  .sg-tabs button { padding: .6rem .9rem .75rem; }
}
@media (max-width: 600px) {
  .page-head, .pad, .tab-body, .dash { padding-left: 1rem; padding-right: 1rem; }
  .topsearch input { font-size: .9rem; }
  .appbar .hide-sm { display: none; }
  .fields, .fields.three { grid-template-columns: 1fr; } .fields .span-2 { grid-column: auto; }
  .radio-cards { grid-template-columns: 1fr; }
  .crumbs { display: none; }
  .head-actions { margin-left: 0; width: 100%; }
  .trip-hero { padding: .9rem 1rem 0; } .trip-hero h1 { font-size: 1.35rem; } .th-top { flex-wrap: wrap; }
  .htabs { padding: 0 .5rem; }
}

/* in-page anchors land below the fixed top bar */
.form-section[id], .itin-day[id] { scroll-margin-top: 90px; }

/* ---- Edit Itinerary ---- */
.itin-editor-head { gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.itin-editor-head h2 { margin: 0; font-size: 1.45rem; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 1.4rem; margin: .8rem 0 0 .6rem; }
.summary-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; line-height: 1.55; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.caps { text-transform: uppercase; letter-spacing: .04em; font-size: .86rem; }
.stars { color: var(--text-2); letter-spacing: .05em; } .stars .off { color: var(--line); }
.night-chip { display: inline-block; padding: .05rem .55rem; border-radius: 999px; background: var(--primary-soft);
  border: 1px solid var(--focus); color: var(--primary); font-weight: 600; font-size: .86rem; }
.cab-title { font-size: 1.35rem; font-weight: 600; margin-bottom: .2rem; }
.extras-head { font-weight: 500; font-size: 1.35rem; letter-spacing: .02em; margin: 1.6rem 0 .5rem .6rem; }
.extras-head + p, .extras-head ~ .plain-list { margin-left: .6rem; }
.plain-list { list-style: none; padding: 0; margin: 0 0 .6rem; } .plain-list li { padding: .15rem 0; }
.incexc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.5rem 3rem; }
.incexc-head { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.incexc-row { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; }
.incexc-row.dragging { opacity: .45; }
.incexc-inputs { flex: 1; display: grid; gap: .45rem; min-width: 0; }
.drag-handle { color: var(--muted); cursor: grab; display: inline-flex; padding: .2rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 4px;
  padding: .3rem; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--bg); color: var(--text); } .icon-btn.red { color: var(--red); }
.itin-days { border: 1px solid var(--line); border-radius: var(--radius); }
.itin-edit-day { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 2fr); gap: 1.4rem 2.4rem; align-items: start;
  padding: 1.4rem 2.2rem; scroll-margin-top: 90px; }
.itin-edit-day + .itin-edit-day { border-top: 1px solid var(--line); }
.itin-edit-day .day-tile { width: auto; }
.itin-edit-day textarea { min-height: 200px; }
@media (max-width: 900px) { .itin-edit-day { grid-template-columns: 1fr; padding: 1rem; } .itin-edit-day .day-tile { width: 150px; } }
.md-box { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.md-bar { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .4rem;
  background: var(--bg); border-bottom: 1px solid var(--line-strong); padding: .4rem .8rem 0; }
.md-tabs button { font: inherit; background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 5px 5px 0 0;
  padding: .55rem 1.1rem; cursor: pointer; color: var(--muted); margin-bottom: -1px; }
.md-tabs button.active { background: var(--surface); border-color: var(--line-strong); color: var(--text); font-weight: 600; }
.md-tools { display: flex; gap: .15rem; padding-bottom: .35rem; }
.md-tools button { font: inherit; min-width: 2rem; background: none; border: 0; border-radius: 4px; padding: .3rem .45rem; cursor: pointer;
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; }
.md-tools button:hover { background: var(--surface); }
.md-tools.disabled { opacity: .4; pointer-events: none; }
.md-box textarea { border: 0; border-radius: 0; min-height: 220px; display: block; }
.md-box textarea:focus { outline: 0; }
.md-preview { padding: .8rem 1rem; min-height: 220px; }
.terms-preview { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 1rem 1.3rem;
  max-height: 260px; overflow-y: auto; }
.itin-editor .option-band { margin-top: 1.2rem; }

/* ---- Trip → Services Bookings ---- */
.bk-section { margin-bottom: 2.2rem; scroll-margin-top: 5rem; }
.bk-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.bk-head h2 { font-size: 1.25rem; }
.bk-table td { vertical-align: top; }
.icon-link.inline { padding: 0 .1rem; vertical-align: -2px; }
.stars { letter-spacing: 1px; color: var(--line-strong); } .stars .on { color: #f59f00; }
.bk-day { display: flex; gap: 1rem; align-items: stretch; margin-bottom: .8rem; }
.bk-daybox { flex: none; width: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .9rem; }
.bk-daycard { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.bk-svc { display: flex; align-items: flex-start; gap: 1rem; padding: .75rem 1rem; }
.bk-svc + .bk-svc { border-top: 1px solid var(--line); }
.bk-svc .bk-cab { width: 190px; flex: none; }
.bk-svc .bk-price { width: 170px; flex: none; text-align: right; }
.bk-svc .bk-act { width: 56px; flex: none; text-align: right; white-space: nowrap; }
@media (max-width: 760px) {
  .bk-day { flex-direction: column; } .bk-daybox { width: auto; }
  .bk-head { flex-wrap: wrap; }
  .bk-svc { flex-wrap: wrap; } .bk-svc > .grow { flex-basis: 100%; } .bk-svc .bk-cab { flex: 1; width: auto; }
  .bk-svc .bk-price { width: auto; }
}
/* ---- Share Hotel Booking ---- */
.hs-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding: .9rem 1.5rem;
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.hs-contacts > a:first-child { font-weight: 600; display: inline-flex; align-items: center; gap: .2rem; }
.hs-subject { padding: .8rem 1.5rem .2rem; background: var(--bg); display: grid; gap: .5rem; }
.hs-subject-box { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .65rem .9rem; font-size: 1rem; }
.wa-bubble { max-width: 680px; margin: 0 auto; background: #dcf8c6; border-radius: 8px; padding: 1rem 1.2rem;
  font-size: 1.02rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
/* ---- Hotel booking → Edit Booking Details ---- */
.bd { padding: 0; }
.bd [hidden] { display: none !important; }
.bd-svc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); border-bottom: 3px solid var(--line); }
.bd-left { padding: 1.4rem 1.5rem; border-right: 1px solid var(--line); }
.bd-right { padding: 1.4rem 1.5rem; }
.bd-right h3 { font-size: 1.15rem; }
.bd-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 1rem; align-items: start; }
.bd-row.bd-occ { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.2fr); margin-top: 1.2rem; }
.bd-row .field { margin: 0; }
.bd-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.bd-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border: 1px solid var(--primary-line);
  border-radius: 4px; background: var(--primary-soft); font-size: .95rem; cursor: pointer; }
.bd-comp { padding-top: .45rem; font-weight: 600; }
.bd-prices td, .bd-prices th { vertical-align: top; }
.bd-na { color: var(--amber); font-weight: 600; }
.bd-booked { display: inline-flex; align-items: center; gap: .2rem; }
.bd-booked input { width: 8.5rem; text-align: right; font-weight: 600; color: var(--primary); }
.bd-acts { margin-top: .9rem; gap: .6rem; }
.bd-add { padding: 1.2rem 1.5rem; }
.bd-people { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 0 1.5rem 1rem; }
.bd-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.bd-guests { background: var(--surface-2); }
.bd-box h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.bd-guests-label { font-size: 1.05rem; }
.bd-foot { display: flex; gap: .8rem; padding: 1rem 1.5rem 1.5rem; }
@media (max-width: 1000px) {
  .bd-svc, .bd-people { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .bd .table-card { overflow-x: auto; } .bd-booked input { width: 6.5rem; }
  .bd-left, .bd-right { padding: 1.1rem 1rem; }
  .bd-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .bd-row, .bd-row.bd-occ { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-row .bd-nights { grid-column: 1 / -1; }
}
[data-show-if][hidden] { display: none !important; }
/* ---- Update Booking Status ---- */
.st-body { display: grid; gap: 1.1rem; }
.st-status select { width: auto; min-width: 13rem; }
.st-booked { display: grid; gap: 1rem; }
.st-rule { border: 0; border-top: 1px solid var(--line); margin: .4rem 0; }
.modal-foot.st-foot { justify-content: flex-start; }
/* ---- Update Booking Status: tags, booked step, instalments; Add New Supplier ---- */
.st-top { display: grid; grid-template-columns: 13rem minmax(0, 24rem); gap: 1.2rem; align-items: start; }
.st-top .field { margin: 0; }
.st-errors { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-radius: var(--radius);
  background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red); font-weight: 500; }
.st-warn { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--radius);
  background: var(--amber-soft); border: 1px solid #ffe066; color: var(--amber); font-size: 1.02rem; }
.st-warn b { color: #d9480f; }
.st-booked, .st-changed { display: grid; gap: 1.1rem; }
.st-changed > .btn { justify-self: start; }
.st-summary { border: 1px solid var(--primary-line); background: var(--primary-soft); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.st-facts { gap: 2.5rem; margin-bottom: 1rem; font-size: 1.05rem; }
.st-nights td { vertical-align: top; }
.st-room-next { margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.st-rate { display: grid; grid-template-columns: 5.5rem 1fr; gap: .4rem; }
.st-price { font-size: 1.6rem; font-weight: 600; }
.st-edit { border-top: 1px solid var(--primary-line); padding-top: .9rem; margin-top: .4rem; }
.st-supplier { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.st-supplier .ac { min-width: 16rem; }
.st-direct { padding: .55rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-weight: 600; }
.st-contacts { align-items: start; }
.st-cnf input { max-width: 36rem; }
.st-pref { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.2rem; display: grid; gap: .45rem; justify-items: start; }
.st-pref-name { font-size: 1.1rem; font-weight: 600; color: var(--text-2); }
.st-inst-head .st-dates { color: var(--amber); }
.st-inst td { vertical-align: middle; }
.st-amt { display: flex; align-items: center; gap: .4rem; }
.st-amt input { width: 9rem; }
.st-amt [data-pct] { width: 7rem; }
.st-swap { color: var(--muted); }
.bk-voucher { display: inline-flex; align-items: center; gap: .3rem; color: var(--amber); font-weight: 600; margin-top: .3rem; }
.amber { color: var(--amber); }
tr.bk-inactive td { color: var(--muted); }
tr.bk-inactive .stay-lines, tr.bk-inactive a.strong { opacity: .75; }
.sp-body { display: grid; gap: 0; }
.sp-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.sp-sec:last-child { border-bottom: 0; }
.sp-sec h3 { display: flex; align-items: center; gap: .4rem; font-size: 1.15rem; margin-bottom: .3rem; }
.sp-box { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sp-phone select { width: 7rem; }
.sp-errors:not(:empty) { padding: .7rem .9rem; border-radius: var(--radius); background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red); margin-bottom: .6rem; }
@media (max-width: 760px) {
  .st-top, .sp-sec { grid-template-columns: minmax(0, 1fr); }
  .st-facts { gap: 1rem; flex-wrap: wrap; }
  .st-amt input { width: 6rem; } .st-amt [data-pct] { width: 4.5rem; }
}
/* short status dialogs let pickers overlay the dialog edge; the long Booked step scrolls */
dialog#dlg-status { overflow: visible; }
#dlg-status .st-body { overflow: visible; max-height: none; }
#dlg-status .st-form:has(#st-status option[value="booked"]:checked) .st-body { overflow: auto; max-height: none; }
.st-inst tfoot td { background: var(--surface) !important; }
[data-ct-designation][hidden] { display: none !important; }
.sp-phone { flex-wrap: nowrap; } .sp-phone select { flex: none; } .sp-phone input { flex: 1; min-width: 0; }

/* Add New Supplier: cab supplier type cards, inline phone add, preference fields per service */
.sp-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sp-type { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-2); cursor: pointer; }
.sp-type:has(input:checked) { border-color: var(--primary-line); background: var(--primary-soft); box-shadow: 0 2px 6px rgba(59, 91, 219, .12); }
.sp-type input { margin-top: .25rem; }
.sp-type > span { display: grid; gap: .35rem; justify-items: start; }
.sp-type b { font-size: 1.05rem; }
.sp-phone { display: flex; align-items: stretch; gap: 0; }
.sp-phone + .sp-phone { margin-top: .5rem; }
.sp-phone select { width: 8rem; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sp-phone input { border-radius: 0; margin-left: -1px; }
.sp-phone .sp-phone-btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; color: var(--primary); padding: 0 .9rem; }
.sp-prefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; align-items: start; }
.sp-prefs .field { margin: 0; }
.sp-actions { border-bottom: 0; }
@media (max-width: 760px) { .sp-types, .sp-prefs { grid-template-columns: minmax(0, 1fr); } }.sp-type input { accent-color: var(--primary); }

/* Services Bookings ⋮ menus */
.dd-menu.bk-menu { min-width: 300px; padding: .4rem 0; font-size: 1.05rem; }
.dd-menu.bk-menu a, .dd-menu.bk-menu button { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem; }
.dd-menu.bk-menu form { margin: 0; }
tr.bk-self td { background: var(--surface-2); }
/* Hotel Booking Details (clicking the hotel's name) */
.bk-hotel-name { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; text-align: left; }
.bk-hotel-name:hover { text-decoration: underline; }
.hv-body { display: grid; gap: 1.2rem; }
.hv-facts { gap: 2.5rem; flex-wrap: wrap; }
.hv-hotel { font-size: 1.2rem; font-weight: 600; }
.hv-val { font-size: 1.15rem; display: flex; align-items: center; gap: .3rem; }
.hv-table td { vertical-align: top; }
.hv-booked { font-size: 1.05rem; }
.hv-table tfoot td { background: var(--surface) !important; border-top: 2px solid var(--line); font-size: 1.05rem; }
.hv-guest { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border: 1px solid var(--green-line);
  border-radius: var(--radius); background: var(--green-soft); color: var(--green); font-weight: 500; }
.hv-actions { gap: .8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.hv-activities h3 { color: var(--primary); font-size: 1.1rem; margin-bottom: .3rem; }
.hv-activities ul { padding-left: 1.2rem; line-height: 2; margin-top: .4rem; }.hv-table tfoot tr, .hv-table tfoot td { background: var(--surface) !important; }
.hv-guest svg + svg, .hv-guest .lead-star svg { fill: currentColor; }

/* Share Operational Bookings */
.btn.primary-soft { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.ops-pick { padding: .9rem 1.5rem; background: var(--surface-2); border-bottom: 1px solid var(--line); display: grid; gap: .6rem; }
.ops-pick[hidden] { display: none; }
.ops-pick-list { display: grid; gap: .35rem; max-height: 14rem; overflow: auto; }
.ops-pick-list .checkbox { align-items: flex-start; }
.ops-hint { padding: .9rem 1.5rem 0; color: var(--text-2); }
code.wa-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; background: none; white-space: pre; }
/* Dialogs loaded with data-url: one column that fits the window. Head and toggles stay; only the body scrolls
   (and contains anything positioned inside it, e.g. the hidden copy text), so no second scrollbar or blank space. */
dialog.modal[open] > [data-dialog-content] { display: flex; flex-direction: column; max-height: calc(100vh - 2.5rem); }
dialog.modal[open] > [data-dialog-content] > form:has(> .modal-body) { display: flex; flex-direction: column; min-height: 0; }
dialog.modal[open] > [data-dialog-content] .modal-body { flex: 1 1 auto; min-height: 0; max-height: none; position: relative; }
dialog.modal[open]:has(> [data-dialog-content]) { overflow: hidden; }
/* Assign Service Provider to Schedules */
.as-body { display: grid; gap: .9rem; }
.as-body h3 { font-size: 1.3rem; }
.as-step { display: grid; gap: .9rem; }
.as-step[hidden], .as-preview[hidden], [data-as-needs-supplier][hidden], .as-remarks [hidden] { display: none !important; }
.as-all { padding: 1rem 1.2rem; background: var(--surface-2); border-radius: var(--radius); font-weight: 600; }
.as-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.2rem; display: grid; gap: .6rem; }
.as-group { font-weight: 600; font-size: 1.05rem; }
.as-line { padding-left: 1rem; font-weight: 500; }
.as-provider { display: grid; grid-template-columns: repeat(3, minmax(0, 18rem)); gap: 1.2rem; align-items: start; }
.as-provider .field { margin: 0; }
.as-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.as-left { padding: 1rem 1.2rem; border-right: 1px solid var(--line); display: grid; gap: .5rem; align-content: start; }
.as-title { font-weight: 600; }
.as-right { padding: 1rem 1.2rem; display: grid; gap: .7rem; }
.as-cabrow { display: grid; grid-template-columns: 1fr auto 10rem; gap: 1rem; align-items: start; }
.as-cabname { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.05rem; }
.as-cabicon { display: inline-flex; padding: .35rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.as-selling { padding-top: 1.7rem; }
.as-price { margin: 0; }
.as-remarks { display: grid; gap: .5rem; }
.as-remarks textarea { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-2); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.link-btn:hover { color: var(--primary); }
.as-confirm { padding: 1rem 1.2rem; background: var(--surface-2); border-radius: var(--radius); display: grid; gap: .9rem; }
.as-confirm .checkbox { align-items: flex-start; }
.as-pref { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .9rem 0 0 1.6rem; }
.as-foot { display: flex; align-items: center; gap: .8rem; }
.as-foot .grow { flex: 1; }
.bk-svc .bk-supplier { width: 220px; flex: none; }
@media (max-width: 900px) {
  .as-provider, .as-preview, .as-cabrow { grid-template-columns: minmax(0, 1fr); }
  .as-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .as-selling { padding-top: 0; }
  .bk-svc .bk-supplier { width: auto; }
}.as-foot [hidden], .as-pick-error[hidden], .as-form [data-st-set-pref][hidden], .as-form #st-pref-pick[hidden] { display: none !important; }
.as-remarks textarea::placeholder { color: var(--text-2); }

/* Update Transport Service and Activity Timings */
.tm-body { display: grid; gap: .8rem; background: var(--bg); }
.tm-day { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: .8rem; align-items: start; }
.tm-day .bk-daybox { min-height: 0; text-align: center; }
.tm-day .bk-daybox:empty { visibility: hidden; }
.tm-dayname { color: var(--primary); font-size: 1.05rem; }
.tm-card { background: var(--surface); border-radius: var(--radius); }
.tm-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.2rem; padding: 1rem 1.3rem; }
.tm-cabs .tm-block { border-top: 1px solid var(--line); padding-left: 2.6rem; }
.tm-cabs[hidden] { display: none; }
.tm-title { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .8rem; font-size: 1.05rem; }
.tm-remarks { padding-left: 2.6rem; }
.tm-cabs .tm-remarks { padding-left: 0; }
.tm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.2rem; align-items: start; }
.tm-fields .field { margin: 0; }
.tm-suffix { display: flex; align-items: stretch; }
.tm-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tm-suffix span { display: flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--line); border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-2); color: var(--muted); }
.tm-hotel { display: grid; gap: .3rem; margin-top: .45rem; }
.tm-hotel select { font-size: .85rem; padding: .25rem .4rem; }
.tm-place input:disabled { background: var(--primary-soft); color: var(--text); }
.tm-cabwise { grid-column: 1 / -1; }
.tm-off .tm-remarks, .tm-off .tm-fields .field { opacity: .45; pointer-events: none; }
.tm-form .as-remarks [hidden] { display: none !important; }
@media (max-width: 900px) {
  .tm-day, .tm-block, .tm-fields { grid-template-columns: minmax(0, 1fr); }
  .tm-remarks, .tm-cabs .tm-block { padding-left: 0; }
}
/* check-in / check-out hotel choice: a chevron beside the checkbox (the full text shows in the list) */
.tm-hotel { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; }
.tm-hotel select { width: 2.1rem; flex: none; padding: .1rem .2rem; border: 0; background-color: transparent; color: transparent;
  cursor: pointer; font-size: .95rem; }
.tm-hotel select option { color: var(--text); }
.tm-hotel select:focus { outline: 2px solid var(--primary-soft); }.tm-hotel select { -webkit-appearance: none; appearance: none; width: 1.7rem; height: 1.5rem; padding: 0; border-radius: 4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat; }
.tm-hotel select:hover { background-color: var(--surface-2); }

.tm-time { position: relative; }
.tm-time .ac-list { min-width: 100%; }
.tm-place.is-hotel > label { color: var(--muted); }
.tm-place input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
/* Operational Services rows: centred day box, bold cab, no row actions */
.bk-daybox { text-align: center; }
.bk-daybox b { color: var(--primary); font-weight: 600; font-size: 1.05rem; }
.bk-svc { padding: .9rem 1.3rem 1.6rem; }
.bk-svc .bk-cab { font-weight: 600; }
.bk-svc .bk-cab .sub, .bk-svc .bk-cab .bk-voucher { font-weight: 400; }
.bk-svc .bk-cab .bk-voucher { font-weight: 600; }
.bk-svc .bk-price { width: auto; min-width: 170px; margin-left: auto; }.bk-svc > .grow { flex: 0 0 34%; min-width: 0; }
.bk-svc .bk-cab { width: 22%; }
.bk-svc .bk-supplier { width: 22%; }
@media (max-width: 760px) { .bk-svc > .grow, .bk-svc .bk-cab, .bk-svc .bk-supplier { flex-basis: 100%; width: auto; } }
/* ---- Trip → Docs ---- */
.docs-tab { margin-top: 0; grid-template-columns: 165px minmax(0, 1fr); }
.docs-tab > .vtabs, .docs-list { padding: 12px 0; }
.docs-tab > .vtabs a, .docs-list a { font-size: 14px; line-height: 21px; padding: 10px 12px 10px 25px; margin-bottom: 9px;
  color: var(--muted); font-weight: 500; border-left: 4px solid transparent; }
.docs-tab > .vtabs a:hover, .docs-list a:hover { background: var(--surface-2); color: var(--text); }
.docs-tab > .vtabs a.active, .docs-list a.active { background: var(--primary-soft); color: var(--primary-hover); font-weight: 600; border-left-color: var(--primary); }
.docs-tab .docs-body { padding: 0; background: var(--surface); }
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.docs-layout.with-list { grid-template-columns: 262px minmax(0, 1fr); }
.docs-list { background: var(--surface); border-right: 1px solid var(--line); }
.docs-list a { display: block; font-weight: 600; }
.docs-list a b { font-weight: inherit; }
.docs-list .sub { font-size: 13px; line-height: 16px; font-weight: 400; color: var(--muted); }
.docs-main { min-width: 0; }
.docs-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 16px; padding: 15.5px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.docs-toggles.trip { display: block; }
.docs-toggles .docs-toggles-in { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 16px; max-width: 868px; margin: 0 auto; }
.docs-toggles .checkbox, .docs-contact { display: inline-flex; align-items: center; gap: 9px; margin: 0;
  font-size: 14px; line-height: 22px; font-weight: 600; color: var(--text); }
.docs-toggles input[type=checkbox] { width: 13px; height: 13px; margin: 0; flex: none; accent-color: var(--primary); }
.docs-contact { gap: 3px; }
.docs-contact select { width: auto; min-width: 0; min-height: 0; flex: none; height: 22px; border: 0; border-radius: 0; box-shadow: none;
  background-color: transparent; background-position: right 0 center; padding: 0 17px 0 0;
  font-size: 14px; line-height: 22px; font-weight: 600; color: var(--text); cursor: pointer; }
.docs-paper-wrap { position: relative; background: var(--surface); padding: 0 1.5rem 2rem; }
.docs-actions { position: absolute; top: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 0;
  height: 46px; padding: 0 7px 0 7.5px; background: var(--surface);
  border: 1px solid var(--line); border-top: 0; border-right: 0; border-radius: 0 0 0 6px; }
.docs-actions .btn { height: 30px; min-height: 0; padding: 0 10px; gap: 4px; border: 0; border-radius: 4px; box-shadow: none;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1; }
.docs-actions .btn:hover { background: var(--hover); color: var(--text); }
.docs-actions .btn.primary { padding: 0 8px; background: var(--primary); color: #fff; }
.docs-actions .btn.primary:hover { background: var(--primary-hover); color: #fff; }
.docs-actions [data-docs-refresh] { color: var(--muted); margin-right: 15.5px; }
.docs-actions [data-copy-html] { margin-right: 9px; }
.docs-actions [data-docs-print] { margin-right: 5px; }
.docs-tab .doc-paper { padding-top: 48px; overflow-x: auto; }
@media (max-width: 900px) { .docs-layout.with-list { grid-template-columns: minmax(0, 1fr); } .docs-list { border-right: 0; border-bottom: 1px solid var(--line); } }

.docs-page { padding: 1.1rem 1.5rem 2rem; }
.docs-page h2 { margin-bottom: 1rem; }
.docs-page .docs-note { margin-top: .7rem; }
@media (max-width: 980px) {
  .docs-tab { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
  .docs-tab > .vtabs, .docs-list { padding: 0; }
  .docs-tab > .vtabs a, .docs-list a { margin: 0; padding: 10px 14px; border-left: 0; border-bottom: 3px solid transparent; }
  .docs-tab > .vtabs a.active, .docs-list a.active { border-bottom-color: var(--primary); }
}
@media (max-width: 700px) {
  .docs-paper-wrap { padding: 0 .75rem 1.5rem; }
  .docs-actions { position: static; width: max-content; max-width: 100%; flex-wrap: wrap; margin: 0 -.75rem 0 auto; }
  .docs-tab .doc-paper { padding-top: 1.2rem; }
  .docs-toggles, .docs-toggles .docs-toggles-in { gap: 10px 14px; }
  .docs-toggles { padding: 12px .75rem; }
  .docs-page { padding: 1rem .75rem 1.5rem; }
}

/* ---- Update Instalments Amount (accounting schedule dialog) ---- */
.inst-form .modal-head h2 { font-size: 20px; font-weight: 600; }
.inst-form .modal-body { padding: 17px 24px 0; font-size: 15px; }
.inst-total { background: var(--primary-soft); border-radius: 8px; padding: 16px 16px 16px; }
.inst-total-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.inst-total-label span { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.inst-total input { width: 320px; max-width: 100%; height: 36px; min-height: 0; padding: 0 16px; font-size: 15px; background: #fff; }
.inst-title { margin: 22px 0 12px; font-size: 20px; font-weight: 600; color: var(--text); }
.inst-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.inst-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.inst-table th { text-align: left; font-size: 15px; font-weight: 600; color: var(--text); padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.inst-table th:first-child { width: 62px; }
.inst-table th:nth-child(2) { width: 357px; }
.inst-table th:nth-child(4) { width: 60px; }
.inst-table tfoot[hidden] { display: none; }
.inst-table td { padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.inst-table tfoot td { border-bottom: 0; padding: 12px 16px; }
.inst-n { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; color: var(--text); padding-top: 20px !important; }
.inst-paid td { vertical-align: middle; color: var(--muted); }
.inst-amt { display: flex; align-items: center; gap: 8px; }
.inst-amt input { width: 122px; height: 36px; min-height: 0; padding: 0 16px; font-size: 15px; }
.inst-amt [data-inst-pct] { width: 105px; }
.inst-swap { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1; }
.inst-amt > span:last-child { font-size: 15px; color: var(--text); }
.inst-hint { display: block; margin: 8px 0 0 3px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; }
.inst-hint:hover { color: var(--primary); }
.inst-hint[hidden], .inst-rm[hidden], [data-inst-add][hidden], [data-inst-left][hidden] { display: none !important; }
.inst-rm { display: inline-grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--primary); cursor: pointer; }
.inst-rm:hover { background: var(--hover); }
.inst-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inst-add .btn { height: 29px; min-height: 0; padding: 0 12px; gap: 6px; font-size: 15px; font-weight: 600; }
.inst-left { padding: 2px 8px; border: 1px solid var(--amber-line); border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 14px; font-weight: 600; }
.inst-left.over { border-color: var(--red-line); background: var(--red-soft); color: var(--red); }
.inst-comments { display: block; margin-top: 20px; }
.inst-comments span { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.inst-comments textarea { min-height: 59px; height: 59px; padding: 10px 16px; font-size: 15px; }
.inst-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 16px 0 16px; border-top: 1px solid var(--line); }
.inst-foot .btn { height: 35px; min-height: 0; font-size: 16px; font-weight: 600; }
.inst-foot .btn.primary { padding: 0 16px; }
.inst-foot .btn.plain { padding: 0 14px; color: var(--muted); }
/* date input that reads "5 Sep, 2026 (Sat)" */
.pdate { position: relative; display: block; margin: 0; cursor: pointer; }
.pdate input { width: 248px; max-width: 100%; height: 36px; min-height: 0; padding: 0 16px; color: transparent; cursor: pointer; }
.pdate input::-webkit-datetime-edit { color: transparent; }
.pdate input::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; inset: 0; width: auto; height: auto; cursor: pointer; }
.pdate-text { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 15px; color: var(--text); }
.pdate-text.empty { color: var(--faint); }
@media (max-width: 760px) {
  .inst-table thead { display: none; }
  .inst-table, .inst-table tbody, .inst-table tr, .inst-table td { display: block; width: auto; }
  .inst-table tr[data-inst-row] { position: relative; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .inst-table td { border: 0; padding: 4px 12px; }
  .inst-n { padding-top: 4px !important; }
  .inst-table td.right { position: absolute; top: 8px; right: 0; }
  .inst-amt input { width: 100px; } .inst-amt [data-inst-pct] { width: 70px; }
}
/* ---- Log Payment dialog ---- */
dialog.modal:has(.lp-form), dialog.modal:has(.inst-form) { width: min(768px, calc(100vw - 2rem)); max-width: none; }
.lp-form .modal-head h2 { font-size: 20px; font-weight: 600; }
.lp-form .modal-body { padding: 17px 24px 0; font-size: 15px; color: var(--text); }
.lp-review { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lp-review-head { padding: 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.lp-review-body { padding: 16px; }
.lp-facts { display: grid; grid-template-columns: 245px 218px minmax(0, 1fr); gap: 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.lp-k { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.lp-v { font-size: 18px; font-weight: 500; line-height: 1.3; }
.lp-s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.lp-s a { color: var(--muted); vertical-align: -2px; }
.lp-trip { display: block; font-size: 16px; font-weight: 500; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--link); vertical-align: 0; }
.lp-all { margin: 32px 0 12px; font-size: 15px; }
.lp-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lp-table { width: 100%; border-collapse: collapse; }
.lp-table th { text-align: left; padding: 12px 16px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--line); }
.lp-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.lp-table tr:last-child td { border-bottom: 0; }
.lp-table .right { text-align: right; }
.lp-muted { font-size: 13px; color: var(--muted); }
.lp-here { display: inline-block; margin-left: 4px; padding: 1px 8px; border: 1px solid var(--primary-line); border-radius: 4px; background: var(--primary-soft); color: var(--primary-hover); font-size: 13px; font-weight: 500; }
.lp-badge { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 600; }
.lp-badge.amber { border-color: var(--amber-line); color: var(--amber); }
.lp-badge.green { border-color: var(--green-line); color: var(--green); }
.lp-total td { font-size: 15px; }
.lp-title { margin: 38px 0 14px; font-size: 22px; font-weight: 600; }
.lp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lp-field { display: block; margin: 0; }
.lp-field > span { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.lp-field > span small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.lp-field input, .lp-field select { height: 36px; min-height: 0; padding: 0 16px; font-size: 15px; }
.lp-field input[readonly] { background: #fff; color: var(--text); }
.lp-rule { border: 0; border-top: 1px solid var(--line); margin: 32px 0 40px; }
.lp-paid { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.lp-amount input { width: 130px; }
.lp-on .pdate input { width: 250px; }
.lp-ref input { width: 100%; }
.lp-form .inst-foot { margin-top: 32px; padding: 32px 0 24px; }
@media (max-width: 760px) {
  .lp-facts { grid-template-columns: 1fr 1fr; gap: 14px; }
  .lp-contact { grid-column: 1 / -1; }
  .lp-two { grid-template-columns: 1fr; }
  .lp-card { overflow-x: auto; }
}
/* ---- Add Task/Comment dialog + instalment comments ---- */
dialog.modal:has(.tk-form) { width: min(768px, calc(100vw - 2rem)); max-width: none; }
.tk-form .modal-head h2 { font-size: 20px; font-weight: 600; }
.tk-form .modal-body { padding: 17px 24px 0; font-size: 15px; color: var(--text); }
.tk-on { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.tk-text textarea { width: 100%; min-height: 100px; height: 100px; padding: 12px 16px; font-size: 15px; }
.tk-actionable { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 20px 16px; border-radius: 6px; background: var(--surface-2); cursor: pointer; }
.tk-actionable input { width: 14px; height: 14px; margin: 4px 0 0; flex: none; accent-color: var(--primary); }
.tk-actionable b { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.tk-actionable small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); letter-spacing: .01em; }
.tk-when { display: flex; flex-wrap: wrap; gap: 16px 28px; margin-top: 20px; }
.tk-when[hidden] { display: none; }
.tk-due .pdate input { width: 250px; }
.tk-assign .ac { width: 318px; max-width: 100%; }
.tk-assign .ac input[type=text] { height: 36px; min-height: 0; padding: 0 16px; font-size: 15px; }
.tk-help { margin-top: 6px; font-size: 13px; color: var(--muted); letter-spacing: .01em; }
.tk-form .inst-foot { margin-top: 32px; padding: 32px 0 20px; }
.tk-form .field-error { margin-top: 4px; color: var(--red); font-size: 13px; }
.ins-comments { max-width: 280px; }
.ins-c { margin-bottom: .45rem; }
.ins-c-text { white-space: pre-line; font-size: .95rem; }
.ins-c.done .ins-c-text { color: var(--muted); text-decoration: line-through; }
.ins-add { display: inline-flex; align-items: center; gap: .45rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 1.05rem; cursor: pointer; }
.ins-add:hover { color: var(--primary); }
.ins-add svg { color: var(--muted); }
/* ---- Top-bar trip search dropdown ---- */
.qs-pop { position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 120; background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 0 0 6px 6px; box-shadow: 0 12px 28px rgba(16, 24, 40, .18); overflow: hidden; }
.qs-pop[hidden] { display: none; }
.qs-head { padding: 12px 20px 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
.qs-list { display: grid; margin: 0 8px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qs-card { display: grid; grid-template-columns: 161px minmax(0, 1fr) auto; gap: 0 10px; align-items: start;
  padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.qs-card:last-child { border-bottom: 0; }
.qs-card:hover, .qs-card.active { background: var(--surface-2); text-decoration: none; }
.qs-main { font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-id { color: var(--link); font-weight: 600; }
.qs-sub { margin-top: 2px; font-size: 13px; color: var(--text); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-end { display: grid; justify-items: start; gap: 4px; min-width: 92px; }
.qs-amt { font-size: 15px; line-height: 1.35; }
.qs-amt sup { font-size: 9px; color: var(--muted); vertical-align: 6px; }
.qs-status { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 4px;
  font-size: 13px; font-weight: 500; color: var(--text); background: #fff; white-space: nowrap; }
.qs-status.on_trip { border-color: var(--link-line); background: var(--link-soft); color: var(--link); }
.qs-status.converted { border-color: var(--green-line); color: var(--green); }
.qs-status.canceled, .qs-status.dropped { border-color: var(--red-line); color: var(--red); }
.qs-status.past { color: var(--muted); }
.qs-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--link); }
.qs-empty { padding: 6px 20px 14px; font-size: 14px; color: var(--muted); }
.qs-archived { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 10px 16px 12px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--muted); cursor: pointer; }
.topsearch .qs-archived input { width: 13px; height: 13px; margin: 0; padding: 0; border: 0; background: none; accent-color: var(--primary); }
@media (max-width: 600px) {
  .qs-card { grid-template-columns: minmax(0, 1fr) auto; }
  .qs-card .qs-col:nth-child(2) { grid-column: 1; grid-row: 2; margin-top: 6px; }
  .qs-end { grid-row: 1 / span 2; grid-column: 2; }
}
.topsearch .qs-pop a.qs-card, .topsearch .qs-pop a.qs-card:hover, .topsearch .qs-main, .topsearch .qs-amt { color: var(--text); opacity: 1; }
.topsearch .qs-pop .qs-id { color: var(--link); }
.topsearch .qs-pop .qs-status.on_trip { color: var(--link); }
.topsearch .qs-pop .qs-hit { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.topsearch .qs-pop .qs-hit svg { position: static; transform: none; color: var(--muted); }
.topsearch .qs-pop .qs-hit mark { background: var(--highlight); color: var(--text); padding: 0 1px; border-radius: 2px; }
/* ---------- Forms open as a panel sliding in from the right (confirmations stay centred) ---------- */
dialog.modal:not(.confirm) { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100vh; height: 100dvh; max-height: none;
  max-width: calc(100vw - 4rem); border-radius: 0; overflow: hidden; box-shadow: -8px 0 24px rgba(10, 30, 50, .14); }
dialog.modal:not(.confirm)[open] { display: flex; flex-direction: column; animation: drawer-in .24s cubic-bezier(.2, .8, .2, 1); }
dialog.modal:not(.confirm)[open] > form,
dialog.modal:not(.confirm)[open] > [data-dialog-content],
dialog.modal:not(.confirm)[open] > [data-dialog-content] > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; }
/* a form that only holds options (no body inside) keeps its natural height above the scrolling body */
dialog.modal:not(.confirm)[open] > form:not(:has(.modal-body)),
dialog.modal:not(.confirm)[open] > [data-dialog-content] > form:not(:has(.modal-body)) { flex: none; overflow: visible; }
dialog.modal:not(.confirm) .modal-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; align-content: start; }
dialog.modal:not(.confirm) .modal-head { flex: none; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line); }
dialog.modal:not(.confirm) .modal-head h2 { font-family: var(--font-head); }
dialog.modal:not(.confirm) .modal-foot { flex: none; background: var(--surface-2); }
dialog.modal:not(.confirm)::backdrop { background: rgba(10, 30, 50, .38); }
dialog.modal.confirm { border-radius: 8px; }
@keyframes drawer-in { from { transform: translateX(56px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { dialog.modal:not(.confirm) { max-width: 100vw; width: 100vw; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.modal:not(.confirm)[open] { animation: none; } }
/* ---------- Trip payments: one card per party with a progress meter ---------- */
.pay-page { padding: .4rem 1.5rem 2rem; display: grid; gap: 1rem; }
.pay-group-title { display: flex; align-items: baseline; gap: .4rem; margin-top: .8rem; font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--text); }
.pay-group-title .muted { font-weight: 400; font-size: 1rem; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pay-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 2rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.pay-card-title { min-width: 0; }
.pay-card-title h3 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.pay-meta { margin-top: .2rem; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.pay-meter { width: min(360px, 100%); }
.pay-meter-nums { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; color: var(--text-2); }
.pay-meter-nums b { font-size: 1.15rem; }
.pay-out { color: var(--primary); }
.pay-bal { color: var(--amber); font-weight: 600; white-space: nowrap; }
.pay-done { color: var(--green); font-weight: 600; }
.pay-bar { margin-top: .45rem; height: 5px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.pay-bar > span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--green); }
.pay-card.out .pay-bar > span { background: var(--primary); }
.pay-card-body { padding: .9rem 1.2rem 1.1rem; overflow-x: auto; }
/* ---------- Quote builder: numbered step cards ---------- */
.qb { counter-reset: qbstep; padding: 1.2rem 1.5rem 2rem; }
.qb-sec, .qb-basic { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.qb-sec + .qb-sec { margin-top: 1.1rem; }
.qb-sec.qb-joined, .qb-sec.qb-tight { margin-top: 0; border-top: 1px dashed var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.qb-sec:has(+ .qb-joined), .qb-sec:has(+ .qb-tight) { border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.qb-sec.qb-last { border-top: 1px dashed var(--line); }
.qb-basic { padding-bottom: 1.6rem; }
.qb-basic + .qb-sec { margin-top: 1.1rem; }
.qb-head { counter-increment: qbstep; grid-template-columns: minmax(0, 1fr); padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.qb-head h2::before { content: counter(qbstep) "."; color: var(--muted); font-weight: 500; margin-right: .1rem; }
.qb-head h2, .qb-title, .qb-final-head h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; }
.qb-hero { margin: 0; padding-bottom: 1.1rem; }
@media (max-width: 640px) { .qb { padding: .8rem .6rem 1.5rem; } }

@media (max-width: 980px) { .th-facts { column-gap: 1.2rem; } .th-fact { border-left: 0; padding-left: 0; padding-right: 0; } }

/* payment cards: the instalment table sits flush inside the card */
.pay-card-body { padding: 0 0 .9rem; }
.pay-card-body > .table-card { border: 0; border-radius: 0; box-shadow: none; }
.pay-card-body > .table-card ~ * , .pay-card-body > .btn { margin-left: 1.2rem; }

/* share panel: WhatsApp options row */
.share-wa-opts { padding: .7rem 1.5rem; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); gap: 1rem; }


/* ---------- Dashboard: grouped panels of big numbers, money-due table ---------- */
.db-head { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; padding: 1.2rem 1.5rem .2rem; }
.db-head h1 { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; }
.db-date { color: var(--muted); font-size: 1rem; }
.db { padding: .6rem 1.5rem 2rem; display: grid; gap: 1.2rem; }
.db-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: stretch; }
.db-grid2:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.db-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.db-panel-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--line); min-height: 3.4rem; }
.db-panel-head h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }
.db-panel-head h2 a, .db-split h3 a { color: inherit; display: inline-flex; align-items: center; gap: .3rem; }
.db-panel-head h2 a:hover, .db-split h3 a:hover { color: var(--primary); text-decoration: none; }
.db-note { color: var(--muted); font-size: .88rem; }
.db-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.db-seg a { padding: .25rem .7rem; font-size: .9rem; color: var(--text-2); border-left: 1px solid var(--line-strong); }
.db-seg a:first-child { border-left: 0; }
.db-seg a:hover { background: var(--surface-2); text-decoration: none; }
.db-seg a.on { background: var(--primary); color: #fff; }
.db-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.db-stat { display: block; padding: 1rem 1.2rem 1.1rem; border-left: 1px solid var(--line); color: inherit; min-width: 0; }
.db-stat:first-child { border-left: 0; }
a.db-stat:hover { background: var(--surface-2); text-decoration: none; }
.db-stat .k { color: var(--text-2); font-size: .92rem; }
.db-stat .n { margin-top: .25rem; font-size: 1.9rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.db-stat .n.red { color: var(--red); }
.db-stat .n.ok { color: var(--faint); }
.db-stat .s { font-size: .84rem; color: var(--muted); }
.db-stat .s.ok, .db-empty .ok { color: var(--green); }
.db-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.db-split > div + div { border-left: 1px solid var(--line); }
.db-split h3 { padding: .8rem 1.2rem 0; font-size: 1rem; font-weight: 600; }
.db-split .db-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-split .db-stat { padding: .6rem .9rem 1rem 1.2rem; }
.db-split .db-stat .n { font-size: 1.55rem; }
.db-scroll { max-height: 520px; overflow: auto; }
.db-due { margin: 0; }
.db-due td { vertical-align: top; }
.db-due-n { font-size: 1.2rem; }
.db-empty { margin: 0; padding: 1.6rem 1.2rem; color: var(--text-2); text-align: center; display: flex; gap: .5rem; justify-content: center; align-items: center; }
@media (max-width: 1700px) { .db-split { grid-template-columns: minmax(0, 1fr); } .db-split > div + div { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 900px) { .db-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .db, .db-head { padding-left: 1rem; padding-right: 1rem; } .db-stats, .db-split .db-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-stat:nth-child(odd) { border-left: 0; } }
/* ---------- New transactions: one card per line, From → To on top ---------- */
.txn-page { padding: 1.2rem 1.5rem 2rem; max-width: 1180px; display: grid; gap: 1rem; }
.txn-csv { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 2rem; padding: 1rem 1.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.txn-csv[hidden] { display: none; }
.txn-csv p { margin: .2rem 0 0; max-width: 640px; }
.txn-msg { margin: 0; }
.txn-rows { display: grid; gap: .9rem; }
.txn-row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .5rem 1.2rem 1.1rem; }
.txn-row.has-errors { border-color: var(--red-line); }
.txn-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.txn-n { font-family: var(--font-head); font-weight: 600; color: var(--muted); font-size: 1.05rem; }
.txn-row-actions { display: flex; gap: .2rem; }
.txn-row-actions [hidden] { display: none; }
.txn-all { margin-bottom: .6rem; }
.txn-accounts { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.txn-arrow { margin-top: 2.15rem; color: var(--muted); }
.txn-details { display: grid; grid-template-columns: 170px 170px minmax(0, 1fr); gap: .9rem 1rem; margin-top: .9rem; }
.txn-narr { grid-column: 1 / -1; }
.txn-row .field { margin: 0; }
.txn-row .opt { color: var(--muted); font-weight: 400; font-size: .86rem; }
.txn-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.1rem; }
.txn-total { margin-left: auto; font-variant-numeric: tabular-nums; }
.txn-tip { margin: .4rem 0 0; }
@media (max-width: 760px) {
  .txn-page { padding: 1rem; }
  .txn-accounts, .txn-details { grid-template-columns: minmax(0, 1fr); }
  .txn-arrow { display: none; }
  .txn-total { margin-left: 0; width: 100%; }
}
/* team detail */
.team-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.team-h { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; margin: 0 0 .6rem; }
.team-cols section > .table-card + .team-h, .team-cols section > p + .team-h { margin-top: 1.4rem; }
.danger-text { color: var(--red); }
@media (max-width: 1000px) { .team-cols { grid-template-columns: minmax(0, 1fr); } }

/* Show / hide button inside password boxes */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 2.6rem; }
.pw-eye { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); display: inline-flex; align-items: center;
  padding: .3rem; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--primary); background: var(--primary-soft); }
