/* TourDesk — macOS / iOS styling. Follows the system light/dark setting. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --accent: #007aff; --accent-hover: #0068d9; --accent-soft: rgba(0,122,255,.12); --on-accent: #fff;
  --green: #34c759; --orange: #ff9500; --red: #ff3b30; --indigo: #5856d6; --teal: #30b0c7;
  --bg: #f2f2f7;              /* systemGroupedBackground */
  --panel: #ffffff;           /* secondarySystemGroupedBackground */
  --panel2: #f2f2f7;          /* tertiary fills */
  --fill: rgba(118,118,128,.12);
  --fill2: rgba(118,118,128,.08);
  --line: rgba(60,60,67,.18);  /* separator */
  --line-strong: rgba(60,60,67,.29);
  --text: #1c1c1e; --muted: rgba(60,60,67,.62); --faint: rgba(60,60,67,.35);
  --side-bg: rgba(236,236,241,.72); --side-text: #1c1c1e; --side-sel: rgba(0,0,0,.07);
  --bar-bg: rgba(248,248,250,.78);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 10px rgba(0,0,0,.04);
  --shadow-pop: 0 24px 60px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  --r: 12px; --r-sm: 8px;
  --good-bg: rgba(52,199,89,.12); --warn-bg: rgba(255,149,0,.12); --bad-bg: rgba(255,59,48,.10);
  --input-bg: #fff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #0a84ff; --accent-hover: #409cff; --accent-soft: rgba(10,132,255,.18);
    --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --indigo: #5e5ce6; --teal: #40c8e0;
    --bg: #000000; --panel: #1c1c1e; --panel2: #2c2c2e;
    --fill: rgba(118,118,128,.24); --fill2: rgba(118,118,128,.16);
    --line: rgba(84,84,88,.55); --line-strong: rgba(84,84,88,.8);
    --text: #f5f5f7; --muted: rgba(235,235,245,.6); --faint: rgba(235,235,245,.3);
    --side-bg: rgba(30,30,32,.72); --side-text: #f5f5f7; --side-sel: rgba(255,255,255,.1);
    --bar-bg: rgba(22,22,24,.78);
    --shadow: 0 0 0 .5px rgba(255,255,255,.06);
    --shadow-pop: 0 24px 60px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.1);
    --good-bg: rgba(48,209,88,.16); --warn-bg: rgba(255,159,10,.16); --bad-bg: rgba(255,69,58,.16);
    --input-bg: #1c1c1e;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 var(--font); display: flex; -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: none; opacity: .85; }
h1 { font: 700 28px/1.15 var(--font); letter-spacing: -.02em; margin: 0 0 4px; }
h2 { font: 700 21px/1.2 var(--font); letter-spacing: -.015em; margin: 0 0 4px; }
h3 { font: 600 15px/1.3 var(--font); letter-spacing: -.01em; margin: 0 0 12px; }
h4 { font: 600 11px/1.3 var(--font); margin: 20px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 8px; }
code { font: 12px var(--mono); background: var(--fill2); padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .r { text-align: right; } .nowrap { white-space: nowrap; } .mt { margin-top: 18px; } .grow { flex: 1; } .pad { padding: 14px; }
.c-red { color: var(--red); } .c-warn { color: var(--orange); } .c-ok { color: var(--green); }
::selection { background: var(--accent-soft); }

/* ------------------------------------------------ sidebar (vibrancy) */
#side { width: 232px; flex: none; background: var(--side-bg); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-right: .5px solid var(--line-strong); display: flex; flex-direction: column; padding: 18px 10px 12px; gap: 1px; overflow-y: auto; height: 100vh; position: relative; z-index: 5; }
#side a { color: var(--side-text); padding: 6px 10px; border-radius: 7px; font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 9px; }
#side a:hover { background: var(--fill2); opacity: 1; }
#side a.on { background: var(--side-sel); }
#side a.on .ico { color: var(--accent); }
#side .ico { width: 18px; height: 18px; color: var(--accent); flex: none; opacity: .95; }
#side a.sub { font-size: 12.5px; font-weight: 400; color: var(--muted); padding: 4px 10px 4px 20px; white-space: nowrap; overflow: hidden; }
#side a.sub span { overflow: hidden; text-overflow: ellipsis; }
#side a.sub .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; margin-right: 7px; }
#side a.sub.on { color: var(--text); background: var(--side-sel); } #side a.sub.on .dot { background: var(--accent); }
.side-label { font-size: 11px; font-weight: 600; color: var(--muted); padding: 14px 10px 4px; letter-spacing: .01em; }
.brand { gap: 11px !important; padding: 4px 8px 10px !important; font-weight: 700 !important; font-size: 15px !important; letter-spacing: -.01em; }
.brand:hover { background: none !important; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(180deg, #3a8dff, #1b4fd8); display: grid; place-items: center; flex: none; aspect-ratio: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.2), inset 0 .5px 0 rgba(255,255,255,.35); }
.logo svg { width: 20px; height: 20px; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.side-foot { margin-top: auto; font-size: 11px; color: var(--muted); padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.side-foot div { display: flex; align-items: center; gap: 6px; }
#live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
#live.on { background: var(--green); box-shadow: 0 0 0 3px rgba(52,199,89,.18); }
#save-state.busy { color: var(--orange); }

main { flex: 1; overflow-y: auto; height: 100vh; position: relative; }
.view { padding: 30px 36px 70px; max-width: 1480px; margin: 0 auto; }

/* ------------------------------------------------ tour title bar + segmented control */
.titlebar { position: sticky; top: 0; z-index: 4; margin: -30px -36px 24px; padding: 12px 36px; display: flex; align-items: center; gap: 18px;
  background: var(--bar-bg); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-bottom: .5px solid var(--line); flex-wrap: wrap; }
.tb-title { display: flex; flex-direction: column; min-width: 150px; }
.tb-title b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.eyebrow { font-size: 11px; color: var(--muted); font-weight: 500; }
.tb-dates { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.segmented { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 0; overflow-x: auto; max-width: 100%; }
.segmented a { color: var(--text); font-size: 12.5px; font-weight: 500; padding: 5px 13px; border-radius: 7px; white-space: nowrap; position: relative; }
.segmented a:not(.on) + a:not(.on)::before { content: ""; position: absolute; left: 0; top: 25%; height: 50%; width: .5px; background: var(--line-strong); }
.segmented a.on { background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented a.on { background: #636366; box-shadow: none; } }
.segmented a:hover { opacity: 1; }
.tabpane { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head.tight { margin-bottom: 10px; align-items: flex-start; }
.page-head p { max-width: 720px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tabs { display: none; } .tourhead { display: none; }

/* ------------------------------------------------ buttons */
.btn { font: 500 13px var(--font); background: var(--fill); color: var(--text); border: 0; padding: 6px 14px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.35; transition: background .12s, transform .06s; }
.btn:hover { background: var(--fill); filter: brightness(.96); opacity: 1; }
@media (prefers-color-scheme: dark) { .btn:hover { filter: brightness(1.2); } }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: 0 1px 2px rgba(0,122,255,.3); }
.btn.primary:hover { background: var(--accent-hover); filter: none; }
.btn.danger { background: transparent; color: var(--red); }
.btn.danger:hover { background: var(--bad-bg); filter: none; }
.btn:disabled { opacity: .38; cursor: default; transform: none; }
.btn.sm { padding: 4px 11px; font-size: 12px; border-radius: 7px; } .btn.xs { padding: 1px 8px; font-size: 11px; border-radius: 6px; }
.icon-btn { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 13px; padding: 4px 7px; border-radius: 6px; }
.icon-btn:hover { color: var(--red); background: var(--bad-bg); }

/* ------------------------------------------------ inputs */
input, select, textarea { font: 13px var(--font); color: var(--text); background: var(--input-bg); border: .5px solid var(--line-strong); border-radius: 7px; padding: 6px 9px; min-width: 0;
  box-shadow: 0 .5px 1px rgba(0,0,0,.04); transition: box-shadow .12s, border-color .12s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M2 5l3-3 3 3M2 9l3 3 3-3' fill='none' stroke='%238e8e93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); box-shadow: none; }
input[type=search] { border-radius: 9px; background: var(--fill2); border-color: transparent; padding-left: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; box-shadow: none; }
input[type=date], input[type=time] { font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 12px 16px; }
.form.cols1 { grid-template-columns: 1fr; } .form.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form.cols6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.form input, .form select { min-width: 0; max-width: 100%; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
label.block { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.row3, .row4 { display: grid; gap: 8px; margin-bottom: 6px; align-items: center; }
.row3 { grid-template-columns: 110px 1fr 32px; } .row4 { grid-template-columns: 1fr 110px 90px 130px 32px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; } .toolbar input[type=search] { width: 320px; }

/* ------------------------------------------------ cards (inset grouped) */
.card { background: var(--panel); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card.empty, td.empty, .empty { color: var(--muted); text-align: center; padding: 34px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border-radius: var(--r); padding: 15px 17px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.stat b { display: block; font: 700 clamp(19px, 1.7vw, 25px)/1.15 var(--font); letter-spacing: -.02em; margin: 6px 0 3px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 11.5px; }
.stat.good b { color: var(--green); } .stat.bad b { color: var(--red); }
.stat.good::after, .stat.bad::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; }
.stat.good::after { background: var(--green); } .stat.bad::after { background: var(--red); }
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tourcard { color: var(--text); transition: transform .15s, box-shadow .15s; position: relative; padding-top: 58px; }
.tourcard::before { content: ""; position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(180deg, #3a8dff, #1b4fd8) ; box-shadow: inset 0 .5px 0 rgba(255,255,255,.35); }
.tourcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); opacity: 1; }
.tourcard h3 { margin-bottom: 2px; }

/* ------------------------------------------------ tables (inset lists) */
.table-wrap { overflow-x: auto; border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
table.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.grid th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 10px 12px 8px; border-bottom: .5px solid var(--line); background: var(--panel); position: sticky; top: 0; letter-spacing: .01em; }
.grid td { padding: 9px 12px; border-bottom: .5px solid var(--line); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.card .grid th { padding-left: 0; } .card .grid td { padding-left: 0; }
.card .grid td:last-child, .card .grid th:last-child { padding-right: 0; }
.grid.small td, .grid.small th { padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; }
.grid tfoot td { font-weight: 600; border-top: .5px solid var(--line-strong); border-bottom: 0; }
.grid tr.click { cursor: default; } .grid tr.click:hover td { background: var(--fill2); }
.grid tbody tr.click:active td { background: var(--accent-soft); }
.grid.edit td { padding: 3px 5px; } .grid.edit input, .grid.edit select { width: 100%; padding: 5px 8px; background-color: transparent; border-color: transparent; box-shadow: none; }
.grid.edit select { padding-right: 22px; }
.grid.edit input:hover, .grid.edit select:hover { background-color: var(--fill2); }
.grid.edit input:focus { background-color: var(--input-bg); border-color: var(--accent); }
.grid input.num { text-align: right; min-width: 72px; }
.grid tr.show td:first-child { box-shadow: inset 3px 0 0 var(--accent); } .grid tr.dim td { opacity: .45; } .grid tr.sel td { background: var(--accent-soft); }
th.r, td.r { text-align: right; }

/* pills / chips / notices */
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--fill2); color: var(--muted); white-space: nowrap; }
.pill.warn { color: var(--orange); background: var(--warn-bg); } .pill.red { color: var(--red); background: var(--bad-bg); }
.pill.ok, .pill.signed { color: var(--green); background: var(--good-bg); }
.pill.received { color: var(--accent); background: var(--accent-soft); } .pill.reviewed, .pill.sent { color: var(--indigo); background: rgba(88,86,214,.13); }
.chip { display: inline-flex; align-items: center; background: var(--fill2); padding: 3px 10px; border-radius: 99px; margin: 2px; font-size: 12px; cursor: pointer; transition: background .12s; }
.chip:hover { background: var(--bad-bg); color: var(--red); }
.chip:hover::after { content: "✕"; margin-left: 6px; font-size: 10px; }
.chips select { width: auto; font-size: 12px; padding: 3px 24px 3px 9px; border-radius: 99px; }
.warnbox { background: var(--warn-bg); color: var(--text); padding: 10px 14px; border-radius: 10px; font-size: 12.5px; margin-top: 12px; border: 0; }
.warnlist { margin: 0; padding: 0; list-style: none; } .warnlist li { padding: 7px 0; border-bottom: .5px solid var(--line); font-size: 12.5px; }
.warnlist li:last-child { border: 0; } .warnlist li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 9px; vertical-align: 1px; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 7px 0; border-bottom: .5px solid var(--line); } ul.plain li:last-child { border: 0; }

/* rooming / travel */
.hotel, .leg { margin-bottom: 16px; }
.rooms-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; gap: 10px; flex-wrap: wrap; }
.drive { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--good-bg); font-size: 12.5px; }
.drive.warn { background: var(--warn-bg); } .drive.bad { background: var(--bad-bg); }

/* budget bars */
.bar { display: grid; grid-template-columns: 170px 1fr 110px; gap: 12px; align-items: center; margin-bottom: 9px; font-size: 12.5px; }
.bar div { background: var(--fill2); height: 8px; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #5ac8fa); border-radius: 99px; }
.bar b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* contracts */
.split { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.split .list { background: var(--panel); border-radius: var(--r); overflow: hidden; position: sticky; top: 76px; max-height: calc(100vh - 110px); overflow-y: auto; box-shadow: var(--shadow); }
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: .5px solid var(--line); }
.list a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: .5px solid var(--line); color: var(--text); margin: 0; }
.list a:last-child { border-bottom: 0; } .list a:hover { background: var(--fill2); opacity: 1; }
.list a.sel { background: var(--accent); color: #fff; } .list a.sel .muted { color: rgba(255,255,255,.75); } .list a.sel .pill { background: rgba(255,255,255,.22); color: #fff; }
.list a.sel .c-red, .list a.sel .c-warn { color: #fff; }
.stbox { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; font-size: 12.5px; }
.stbox div { background: var(--fill2); border-radius: 10px; padding: 10px 12px; } .stbox span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.docs .doc { display: grid; grid-template-columns: 1fr 180px auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: .5px solid var(--line); }
.drop { margin-top: 14px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; }
.drop.over, .drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); } .drop input { display: none; }
.tally { display: flex; gap: 20px; font-weight: 600; margin: 8px 0 4px; font-size: 13px; }
table.rules td { vertical-align: top; } .rules .ic, .issues .ic { width: 30px; text-align: center; font-weight: 700; }
.rules .ic, .issues .ic { font-size: 11px; }
.s-ok .ic { color: var(--green); } .s-info .ic { color: var(--teal); } .s-warn .ic, .s-missing .ic { color: var(--orange); } .s-red .ic { color: var(--red); }
.s-red td { background: rgba(255,59,48,.045); } .s-warn td, .s-missing td { background: rgba(255,149,0,.045); }
.advice { color: var(--muted); font-size: 12px; margin-top: 3px; }
.snip { width: 38%; font-size: 12px; color: var(--muted); } .snip summary { cursor: pointer; color: var(--accent); }
.verdict { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 99px; margin-left: 8px; background: var(--fill2); vertical-align: middle; }
.verdict.good { background: var(--good-bg); color: var(--green); } .verdict.warn { background: var(--warn-bg); color: var(--orange); } .verdict.bad { background: var(--bad-bg); color: var(--red); }
.lead { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.redline { margin-top: 7px; padding: 8px 12px; border-left: 3px solid var(--red); background: var(--fill2); border-radius: 0 8px 8px 0; font-family: "New York", Georgia, serif; font-size: 13px; }
pre.email, pre.doctext { white-space: pre-wrap; background: var(--fill2); padding: 16px; border-radius: 10px; font: 13px/1.55 var(--font); max-height: 60vh; overflow: auto; margin: 0; }

/* people picker */
.pick { max-height: 55vh; overflow-y: auto; margin-top: 12px; } .pick fieldset { border: 0; background: var(--fill2); border-radius: 10px; margin: 0 0 10px; padding: 8px 14px 10px; }
.pick legend { padding: 8px 0 0; float: left; width: 100%; font-weight: 600; } .pick .pk { padding: 4px 0; }

/* knowledge base */
.kb { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; height: calc(100vh - 180px); }
.kb textarea { height: 100%; font: 12.5px/1.55 var(--mono); resize: none; border-radius: var(--r); padding: 16px; }
.kbprev { overflow-y: auto; background: var(--panel); border-radius: var(--r); padding: 22px 26px; box-shadow: var(--shadow); }
.kbprev table { margin: 8px 0 16px; } .kbprev blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding-left: 12px; color: var(--muted); }

/* day sheet preview */
.paper { background: #fff; color: #111; border-radius: var(--r); padding: 34px 40px; max-width: 840px; box-shadow: var(--shadow-pop); }
.paper h3 { color: #6e6e73; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; border-bottom: .5px solid #d2d2d7; padding-bottom: 5px; margin-top: 18px; }
.paper .daysheet header { display: flex; justify-content: space-between; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 8px; }
.paper table.sched td { padding: 6px 12px 6px 0; border-bottom: .5px solid #e5e5ea; } .paper table.sched td:first-child { font-weight: 700; width: 80px; }
.paper .small, .paper footer { color: #6e6e73; font-size: 12px; } .paper footer { margin-top: 20px; border-top: .5px solid #d2d2d7; padding-top: 8px; } .pre { white-space: pre-wrap; }

/* sheets (modals) & toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.28); display: grid; place-items: center; z-index: 50; padding: 20px; animation: bgin .16s ease; backdrop-filter: blur(2px); }
@keyframes bgin { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: pop .2s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal.wide { width: min(980px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 10px; } .modal header h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 8px 20px 18px; overflow-y: auto; } .modal-body > input[type=search] { width: 100%; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: .5px solid var(--line); background: var(--fill2); border-radius: 0 0 14px 14px; }
.modal footer .btn:not(.primary):not(.danger) { background: var(--panel); box-shadow: 0 0 0 .5px var(--line-strong), 0 1px 1px rgba(0,0,0,.05); }
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: var(--bar-bg); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); padding: 9px 18px; border-radius: 99px; max-width: 460px;
  box-shadow: var(--shadow-pop); font-weight: 500; font-size: 12.5px; transition: opacity .35s, transform .35s; animation: drop .25s cubic-bezier(.2,.9,.3,1.2); display: flex; gap: 8px; align-items: center; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.toast.bad::before { background: var(--red); }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }
.toast.out { opacity: 0; transform: translateY(-10px); }

/* scrollbars (mac overlay style) */
::-webkit-scrollbar { width: 11px; height: 11px; } ::-webkit-scrollbar-thumb { background: var(--fill); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); } ::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1100px) { .two, .kb { grid-template-columns: 1fr; } .split { grid-template-columns: 1fr; } .split .list { position: static; max-height: 300px; } .form.cols6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stbox { grid-template-columns: 1fr 1fr; } .tb-dates { display: none; } }
@media (max-width: 720px) {
  body { flex-direction: column; } #side { width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; padding: 8px; align-items: center; } #side .brand { margin-right: auto; padding-bottom: 4px !important; }
  #tourlinks, .side-foot, .side-label { display: none; } #side a span { display: none; } #side a.brand span { display: inline; }
  main { height: auto; } .view { padding: 16px; } .titlebar { margin: -16px -16px 16px; padding: 10px 16px; }
  .form.cols2, .form.cols3, .form.cols6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toolbar input[type=search] { width: 100%; }
  .row4 { grid-template-columns: 1fr 1fr; } .docs .doc { grid-template-columns: 1fr; } h1 { font-size: 24px; }
}
.form label > .pill, .form label > .btn { align-self: flex-start; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: 4px; }
.dupes { display: flex; flex-direction: column; gap: 10px; }
.dupe { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; background: var(--fill2); box-shadow: none; }
.dupe-mid { text-align: center; }
@media (max-width: 720px) { .dupe { grid-template-columns: 1fr; } }
.logo-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo-prev { max-height: 56px; max-width: 240px; object-fit: contain; background: #fff; padding: 8px 12px; border-radius: 8px; box-shadow: 0 0 0 .5px var(--line-strong); }
.logo-prev.empty { color: var(--muted); font-size: 12px; background: var(--fill2); box-shadow: none; }
.side-foot .ver { color: var(--faint); margin-top: 4px; }

/* ---- flights: live status, tickets, board */
.pill.bad { color: var(--red); background: var(--bad-bg); } .pill.info { color: var(--accent); background: var(--accent-soft); }
.live { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--fill2); }
.live-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .live-row .r { margin-left: auto; }
.live-grid { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 6px; font-size: 13px; }
.live-grid i { font-style: normal; color: var(--faint); } .live-grid s { color: var(--faint); }
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; padding: 0; cursor: pointer; }
.chip .seat { font-weight: 600; color: var(--accent); margin-left: 4px; }
table.tickets { margin-top: 10px; } table.tickets td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
table.tickets tr.cancelled td { text-decoration: line-through; color: var(--faint); }
table.tickets select.sm { font-size: 12px; padding: 2px 6px; max-width: 170px; }
.board .board-row { padding: 10px 0; border-top: .5px solid var(--line); } .board .board-row:first-of-type { border-top: 0; }
.board-main { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inbox { margin-bottom: 16px; } .inbox table td .btn + .btn { margin-left: 6px; }
@media (max-width: 700px) { .live-grid { flex-direction: column; gap: 2px; } .live-grid i { display: none; } table.tickets, .inbox table { display: block; overflow-x: auto; } }

/* ================================================================ v1.11 sleek pass */
/* overflow menu */
.more { position: relative; display: inline-block; }
.btn.icon { padding: 5px 8px; line-height: 0; }
.more-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 30; padding: 5px; border-radius: 12px;
  background: var(--panel); box-shadow: var(--shadow-pop), 0 0 0 .5px var(--line-strong); }
.more.up .more-pop { top: auto; bottom: calc(100% + 6px); }
.more.open .more-pop { display: flex; flex-direction: column; animation: pop .14s ease; }
.more-pop > button, .more-pop > a, .more-pop > label { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 11px; border-radius: 7px; font: 500 13px var(--font); color: var(--text); cursor: pointer; white-space: nowrap; }
.more-pop > button:hover, .more-pop > a:hover { background: var(--accent); color: #fff; }
.more-pop > .danger { color: var(--red); } .more-pop > .danger:hover { background: var(--red); color: #fff; }
.more-pop > button:disabled { opacity: .4; pointer-events: none; }
.more-pop hr { border: 0; border-top: .5px solid var(--line); margin: 4px 6px; }

/* page head: one primary action + menu; subtitle clamps to one line */
.page-head { align-items: center; }
.page-head .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 0; font-size: 12.5px; }
.ph-text { min-width: 0; flex: 1 1 320px; }

/* collapsible sections & rows */
details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; }
.chev { flex: none; width: 8px; height: 8px; border-right: 1.8px solid var(--faint); border-bottom: 1.8px solid var(--faint); transform: rotate(-45deg); transition: transform .18s; margin: 0 4px 0 10px; }
details[open] > summary .chev { transform: rotate(45deg); }
.sec { padding: 0; } .sec + .sec, .sec.mt { margin-top: 12px; }
.sec > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; min-height: 48px; }
.sec > summary .sec-t { font: 600 15px/1.3 var(--font); letter-spacing: -.01em; flex: none; }
.sec > summary .sec-m { margin-left: auto; color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.sec > .sec-b { padding: 2px 18px 18px; }
.sec[open] > summary { border-bottom: .5px solid var(--line); margin-bottom: 14px; }

/* list of records (rows that open to edit) */
.recs { background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); overflow: visible; }
.recs + .recs { margin-top: 12px; }
.recs-h { font: 600 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 18px 4px 8px; }
.rec { border-top: .5px solid var(--line); } .rec:first-child { border-top: 0; }
.rec > summary, .row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 52px; }
.rec > summary:hover, .row.click:hover { background: var(--fill2); }
.rec[open] > summary { background: var(--fill2); }
.rs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rs-main > b, .rs-main > .t { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-main > small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-side { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.rs-side small { color: var(--muted); font-size: 11.5px; }
.rec-b { padding: 6px 16px 16px; border-top: .5px solid var(--line); }
.rec-b .form { margin-top: 10px; }
.rec-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; } .rec-actions .more { margin-left: auto; }
.sub-d { margin-top: 12px; } .sub-d > summary { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 500; font-size: 12.5px; padding: 4px 0; }
.sub-d > summary .chev { border-color: var(--accent); width: 6px; height: 6px; margin: 0 0 0 6px; }
.datebadge { flex: none; width: 44px; text-align: center; border-radius: 10px; background: var(--fill2); padding: 5px 0 6px; line-height: 1.05; }
.datebadge small { display: block; font-size: 10px; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: .04em; }
.datebadge b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.datebadge i { display: block; font-style: normal; font-size: 10px; color: var(--muted); }
.row.show .datebadge { background: var(--accent); color: #fff; } .row.show .datebadge small, .row.show .datebadge i { color: rgba(255,255,255,.85); }
.row.dim { opacity: .5; }
.modeic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 16px; }
.modeic.bus { background: rgba(88,86,214,.13); color: var(--indigo); } .modeic.train, .modeic.ferry { background: var(--good-bg); color: var(--green); } .modeic.van, .modeic.other { background: var(--fill2); color: var(--muted); }

/* people / tickets inside a leg */
.pax { margin-top: 12px; border-radius: 10px; background: var(--fill2); padding: 2px 0; }
.pax-r { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: .5px solid var(--line); } .pax-r:first-child { border-top: 0; }
.pax-r .who { flex: 1; min-width: 0; } .pax-r .who b { font-weight: 600; } .pax-r .who small { display: block; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.pax-r .seatbox { flex: none; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; } .pax-r .seatbox small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); }
.pax-r.cancelled .who, .pax-r.cancelled .seatbox { text-decoration: line-through; opacity: .5; }
.pax-add { padding: 7px 12px; border-top: .5px solid var(--line); } .pax-add select { width: 100%; font-size: 13px; }
.x { flex: none; border: 0; background: none; color: var(--faint); font-size: 15px; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; } .x:hover { background: var(--bad-bg); color: var(--red); }

/* rooms */
.room { display: grid; grid-template-columns: 26px 100px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: .5px solid var(--line); }
.room:first-child { border-top: 0; } .room .n { color: var(--muted); font-size: 12px; text-align: right; }
.room select { padding: 4px 22px 4px 8px; font-size: 12.5px; } .room .occ { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; min-width: 0; }
.room .occ select { width: auto; max-width: 150px; border-radius: 99px; background-color: transparent; border-style: dashed; }
.room .note { grid-column: 3 / 5; } .room .note input { width: 100%; font-size: 12px; padding: 4px 8px; }

/* stats: tighter */
.cards { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; } .stat b { margin: 3px 0 1px; }

/* phone bottom tab bar */
#tabbar { display: none; }
@media (max-width: 720px) {
  body { font-size: 14px; }
  input, select, textarea { font-size: 16px; padding: 7px 10px; }  /* 16px stops iOS zooming in */
  .grid.edit input, .grid.edit select, .room select, .room .note input, .chips select { font-size: 15px; }
  .form { gap: 10px 10px; } .form label { font-size: 11px; gap: 3px; }
  .view { padding: 12px 12px 110px; }
  #side { padding: 6px 10px; gap: 0; position: sticky; top: 0; z-index: 20; } #side a { padding: 7px 9px; } #side .brand small { display: none; } .logo { width: 30px; height: 30px; }
  .titlebar { margin: -12px -12px 12px; padding: 8px 14px; gap: 2px; position: static; } .titlebar .segmented { display: none; }
  .tb-title b { font-size: 16px; } .tb-dates { display: block; margin-left: 0; width: 100%; font-size: 11.5px; }
  h1 { font-size: 26px; } h2 { font-size: 22px; }
  .page-head { margin-bottom: 12px; flex-wrap: nowrap; align-items: flex-start; } .page-head .sub { display: none; } .ph-text { flex: 1 1 auto; }
  .page-head .actions { flex-wrap: nowrap; } .page-head .actions > .btn:not(.primary):not(.icon) { display: none; }
  .card { padding: 14px; } .sec > summary { padding: 12px 14px; } .sec > .sec-b { padding: 2px 14px 14px; }
  .rec > summary, .row { padding: 10px 12px; gap: 10px; } .rec-b { padding: 4px 12px 14px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 8px; } .stat { padding: 10px 12px; } .stat b { font-size: 19px; } .stat small { font-size: 11px; }
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; animation: sheet .24s cubic-bezier(.2,.9,.3,1); }
  .modal footer { border-radius: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); } .modal footer .btn { flex: 1; justify-content: center; padding: 10px; }
  #tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bar-bg); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-top: .5px solid var(--line-strong); padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); }
  #tabbar > a, #tabbar > .more > button { all: unset; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--muted); padding: 3px 0; cursor: pointer; }
  #tabbar > a svg, #tabbar > .more > button svg { width: 24px; height: 24px; } #tabbar > .on, #tabbar > .more > .on { color: var(--accent); }
  #tabbar .more-pop { min-width: 200px; } #tabbar .more-pop a { font-size: 15px; padding: 11px 14px; }
  #tabbar .more { flex: 1; display: flex; } #tabbar .more-pop { bottom: calc(100% + 10px); top: auto; right: 6px; } 
  .two { gap: 12px; } .mt { margin-top: 12px; }
  .room { grid-template-columns: 20px 86px 1fr auto; }
  .hide-s { display: none !important; }
  .toast { max-width: 92vw; }
}
@media (min-width: 721px) { .show-s { display: none !important; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
/* grouped fields inside editors */
.grp { border-top: .5px solid var(--line); margin-top: 14px; }
.grp > summary { display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; font-weight: 600; font-size: 13.5px; }
.grp > summary .chev { margin-left: auto; } .grp > summary .pill { font-weight: 600; }
.grp-b { padding: 8px 0 4px; } .grp-b h4 { margin-top: 14px; }
@media (max-width: 720px) { .row4 { grid-template-columns: 1fr 90px; } .row4 select { font-size: 15px; } .row3 { grid-template-columns: 96px 1fr 32px; } }
.more.left .more-pop { left: 0; right: auto; }
.row .chev.r { margin-left: 2px; }
.rooms-head { margin: 14px 0 4px; }
@media (min-width: 721px) { .room { grid-template-columns: 26px 100px minmax(0, 1fr) minmax(160px, 260px) auto; } .room .note { grid-column: 4; grid-row: 1; } .room .x { grid-column: 5; } }
.hotel > summary .rs-main b { font-size: 15px; }
.toolbar select.grow { flex: 1; max-width: 520px; }
@media (max-width: 720px) { .paper { padding: 18px 16px; font-size: 13px; } .paper .daysheet header { flex-direction: column; gap: 6px; } }
.recs.flat, .table-wrap.flat { box-shadow: none; background: transparent; border-radius: 0; } .recs.flat .rec > summary { padding-left: 0; padding-right: 0; } .recs.flat .rec-b { padding-left: 0; padding-right: 0; }
.row3.inc { grid-template-columns: 1fr 120px 32px; }
.two > .sec { margin-top: 0; } .two { align-items: start; }
@media (max-width: 720px) { .bar { grid-template-columns: 110px 1fr 80px; gap: 8px; font-size: 12px; } }
.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .split { grid-template-columns: 290px minmax(0, 1fr); }
@media (max-width: 1100px) { .two, .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .split .list { max-height: none; } .split .list a { padding: 10px 12px; }
  .stbox { grid-template-columns: 1fr 1fr; gap: 6px; }
}
@media (max-width: 720px) { .page-head.tight { flex-wrap: wrap; } .page-head.tight .actions { flex-wrap: wrap; } .page-head.tight .actions > .btn { display: inline-flex !important; } .page-head.tight .actions label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; flex: 1 1 140px; } }
.btn { white-space: nowrap; }
.tourcard { padding-top: 58px !important; }
.sec > summary .sec-m { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; text-align: right; }
.sec > summary .sec-m .pill { margin-left: 4px; }
.room .occ select { width: 46px; flex: none; padding: 3px 6px; text-align: center; background-image: none; color: var(--accent); font-weight: 600; }

@media (max-width: 720px) { .form .span2, .form .span3 { grid-column: 1 / -1; } }

/* Hide money mode */
body.nomoney .money-card, body.nomoney [data-rid="pe:pay"], body.nomoney [data-rid="dy:deal"], body.nomoney [data-rid="st:co"], body.nomoney [data-rid="paypolicy"], body.nomoney [data-exp],
body.nomoney label:has(> :is([data-k=rate], [data-k=perDiem], [data-k=costPerPerson], [data-k=groupCost], [data-k=suiteRate], [data-k=amount], [data-k=fee], [data-k=whtPct], [data-k=currency], [data-k=rateType], [data-k=basis],
  [data-f=rate], [data-f=perDiem], [data-f=fee], [data-f=feeCurrency], [data-f=deal], [data-f=whtPct], [data-f=rateType], [data-f=agentPct], [data-f=managementPct], [data-f=contingencyPct], [data-f=includeVat], [data-f=currency], [data-f=vatRegistered], [data-f=company])) { display: none !important; }
#side a#privacy.on { color: var(--orange); } #side a#privacy.on .ico { color: var(--orange); }
.rs-main > small.paxnames { white-space: normal; color: var(--text); opacity: .8; line-height: 1.35; margin-top: 1px; } .rs-main > small.paxnames b { font-weight: 600; color: var(--accent); }

/* sign-in */
.login { min-height: 100vh; width: 100%; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 30px 26px; text-align: left; }
.login-card h2 { margin: 6px 0 0; } .login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.login-card .btn { justify-content: center; padding: 10px; font-size: 15px; } .login-card .err { color: var(--red); min-height: 1em; margin: 0; font-size: 12.5px; }
.logo.big { width: 52px; height: 52px; border-radius: 13px; } .logo.big svg { width: 30px; height: 30px; }

/* read-only logins */
body.readonly .x, body.readonly .pax-add, body.readonly [data-rmpax], body.readonly .room .occ select, body.readonly .room .x, body.readonly [data-addroom], body.readonly .inbox .btn { display: none !important; }
body.readonly .chip:hover { background: var(--fill2); color: inherit; } body.readonly .chip:hover::after { content: none; }
body.readonly input:disabled, body.readonly select:disabled, body.readonly textarea:disabled { opacity: 1; color: var(--text); background: transparent; border-color: transparent; box-shadow: none; -webkit-text-fill-color: var(--text); }
body.readonly select:disabled { background-image: none; padding-right: 9px; }
body.readonly .room .note:has(input:placeholder-shown) { display: none; }
.contact { display: flex; gap: 6px; flex: none; }
body.readonly .modal .icon-btn, body.readonly .rooms-head .more { display: none !important; }
