/* Trip Troop Travels – office system
   Palette: night-flight navy ink, cool runway sky, marigold as the one warm signal. */
:root {
  --ink: #172238;
  --ink-2: #22304b;
  --muted: #5d697d;
  --line: #d6dee8;
  --line-soft: #ebf0f5;
  --sky: #edf2f7;
  --paper: #ffffff;
  --marigold: #e9a23b;
  --marigold-soft: #fdf0da;
  --green: #1d7549;
  --green-soft: #e2f2e9;
  --red: #b3261e;
  --red-soft: #fbe7e5;
  --link: #1d4e89;
  --r-sm: 6px;
  --r-md: 10px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--sky); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h2 { font-size: 16px; margin: 0 0 14px; letter-spacing: -.005em; }
small { color: var(--muted); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.in { color: var(--green); font-weight: 600; }
.out { color: var(--red); font-weight: 600; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #c7d1e1; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 8px 24px; color: #fff; text-decoration: none; line-height: 1.25; }
.brand small { display: block; color: #8d9db6; font-size: 12px; }
.mark { flex: none; width: 38px; height: 38px; border-radius: 9px; background: var(--marigold); color: var(--ink); display: grid; place-items: center; font-weight: 800; letter-spacing: -.03em; }
.brand-logo { display: block; text-decoration: none; padding: 0 2px 22px; }
.logo-tile { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 10px 12px; min-height: 56px; }
.logo-tile img { display: block; max-width: 100%; max-height: 52px; object-fit: contain; }
.brand-logo small { display: block; color: #8d9db6; font-size: 12px; margin: 8px 4px 0; }
.side nav a { display: block; padding: 9px 12px; margin-bottom: 2px; border-radius: var(--r-sm); color: #c7d1e1; text-decoration: none; font-weight: 600; border-left: 3px solid transparent; }
.side nav a:hover { background: var(--ink-2); color: #fff; }
.side nav a.on { background: var(--ink-2); color: #fff; border-left-color: var(--marigold); }
.side-foot { margin-top: auto; border-top: 1px solid #2c3a56; padding-top: 14px; }
.me { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; padding: 6px 8px; border-radius: var(--r-sm); line-height: 1.3; }
.me:hover { background: var(--ink-2); }
.me small { display: block; color: #8d9db6; font-size: 12px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #34466a; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.linkbtn { background: none; border: 0; color: #8d9db6; font: 600 13px var(--font); padding: 8px; cursor: pointer; }
.linkbtn:hover { color: #fff; }
.scrim { display: none; }

.main { padding: 26px 34px 56px; max-width: 1320px; }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.topbar h1 { font-size: 25px; line-height: 1.2; margin: 0; letter-spacing: -.02em; flex: 1; min-width: 200px; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 700 14px/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--ink-2); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #aebbcc; }
.btn.accent { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.btn.warn { background: var(--paper); color: var(--red); border-color: #e8b7b2; }
.wa-preview { background: #e7f6dd; border: 1px solid #cfe9bf; border-radius: 10px 10px 10px 2px; padding: 12px 14px; font-size: 14px; line-height: 1.5; white-space: normal; }
code { background: #eef2f6; padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.promo-form { margin-top: 16px; }
.promo-form .form-actions { margin-top: 16px; }
.promo-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }
tr.highlight td { background: var(--marigold-soft) !important; }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.wa:hover { background: #17834a; }
.btn.small { padding: 5px 10px; font-size: 13px; }
form.inline { display: inline; }

/* ---------- Panels & layout ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; margin-bottom: 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > h2 { padding: 18px 22px 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cols { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols.wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* Figures strip: one band, divided – not a pile of cards */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 20px; }
.fig { padding: 16px 20px; border-left: 1px solid var(--line-soft); }
.fig:first-child { border-left: 0; }
.fig span { display: block; font-size: 13px; color: var(--muted); }
.fig strong { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.fig small { font-size: 12px; }
.fig.good strong { color: var(--green); }
.fig.bad strong { color: var(--red); }
a.fig-link { display: block; color: inherit; text-decoration: none; transition: background .12s; }
a.fig-link:hover { background: var(--line-soft); }
a.fig-link:focus-visible { outline: 2px solid var(--marigold); outline-offset: -2px; }
a.fig-link small { color: var(--muted); }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 700; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f8fafc; }
th.num { text-align: right; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:hover td { background: #f7f9fc; }
tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; }
td .sub { display: block; font-size: 12.5px; color: var(--muted); }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.row-actions { white-space: nowrap; text-align: right; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty a { font-weight: 700; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e3ebf6; color: var(--link); white-space: nowrap; }
.tag.confirmed { background: var(--green-soft); color: var(--green); }
.tag.pending { background: var(--marigold-soft); color: #87560f; }
.tag.cancelled { background: #eceff3; color: var(--muted); }
.tag.refunded, .tag.inactive { background: var(--red-soft); color: var(--red); }
.tag.b2b { background: var(--ink); color: #fff; letter-spacing: .04em; font-size: 11px; padding: 2px 7px; vertical-align: 2px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 20px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.field.wide { grid-column: 1 / -1; }
.req::after { content: " *"; color: var(--red); }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #c3cedb; border-radius: var(--r-sm); font: 500 15px/1.4 var(--font); background: var(--paper); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(233, 162, 59, .35); }
textarea { min-height: 90px; resize: vertical; }
input[readonly] { background: #f4f6f9; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.filter-input { margin-bottom: 6px; font-size: 13px; padding: 6px 10px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-weight: 800; font-size: 15px; margin-bottom: 12px; padding: 0; }
.seg { display: inline-flex; border: 1px solid #c3cedb; border-radius: var(--r-sm); overflow: hidden; margin-bottom: 14px; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--paper); }
.seg label + label { border-left: 1px solid #c3cedb; }
.seg input { width: auto; margin: 0; accent-color: var(--ink); }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.profit-line { margin-top: 10px; font-size: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 140px; flex: 0 1 180px; }
.filters .field.grow { flex: 1 1 240px; }
.filters label { font-size: 12.5px; }

.flash { padding: 11px 15px; border-radius: var(--r-sm); margin-bottom: 18px; border: 1px solid; font-weight: 600; }
.flash.success { background: var(--green-soft); border-color: #b5d9c5; color: var(--green); }
.flash.error { background: var(--red-soft); border-color: #eab9b4; color: var(--red); }

dl.facts { display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 13.5px; }
dl.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 14px; font-size: 14px; color: var(--muted); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar { height: 10px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

/* ---------- Dashboard ---------- */
.section-title { font-size: 14px; font-weight: 800; color: var(--muted); margin: 30px 0 12px; letter-spacing: .01em; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; align-items: start; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px 12px; }
.card-head h2 { margin: 0; font-size: 15px; }
.count { min-width: 26px; text-align: center; padding: 2px 8px; border-radius: 99px; background: var(--line-soft); font-size: 12.5px; font-weight: 800; color: var(--muted); }
.card-accent { border-color: var(--marigold); }
.card-accent .count { background: var(--marigold-soft); color: #87560f; }
.mini-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.mini-list .who { min-width: 0; }
.mini-list .who a { font-weight: 700; text-decoration: none; }
.mini-list .who .sub, .mini-list .right .sub { display: block; font-size: 12.5px; color: var(--muted); }
.mini-list .right { flex: none; text-align: right; }
.empty.small { padding: 14px 20px 20px; text-align: left; font-size: 14px; }
.cols.top { align-items: start; }
.scroll-3 { max-height: 268px; overflow-y: auto; }
.scroll-3 thead th { position: sticky; top: 0; z-index: 1; }

/* Period picker (Accounts) */
.period-bar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 20px; }
.period-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.period-form .field { min-width: 150px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13.5px; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: #f7f9fc; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13px; }
.chip:hover { border-color: #aebbcc; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tx-filters { padding: 4px 22px 14px; margin: 0; }
.report-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.report-filters .rf { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.report-filters select { width: auto; min-width: 170px; padding: 6px 10px; font-size: 14px; }
.acct-sub { display: flex; align-items: center; gap: 12px; margin: -8px 0 16px; }
.statement-head { justify-content: space-between; gap: 30px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 2px dashed var(--line); }
.statement-head span { display: block; font-size: 12px; color: var(--muted); }
.sh-co strong { display: block; font-size: 18px; margin-top: 6px; }
.sh-logo { display: block; max-height: 56px; max-width: 200px; object-fit: contain; }
.sh-acct { text-align: right; }
.sh-acct b { display: block; font-size: 16px; margin: 6px 0 2px; }
.sh-bank { display: block; max-height: 40px; max-width: 160px; object-fit: contain; margin-left: auto; }
.sh-gen { margin-top: 4px; }
.tx-filters .field { flex: 0 1 240px; }

/* Photos & logos */
.avatar-img, .avatar-ini { flex: none; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: #dfe6ef; color: var(--ink); font-weight: 800; }
.avatar-img.sm, .avatar-ini.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-img.md, .avatar-ini.md { width: 40px; height: 40px; font-size: 14px; }
.avatar-img.lg, .avatar-ini.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-img.xl, .avatar-ini.xl { width: 72px; height: 72px; font-size: 24px; }
.with-avatar { display: flex; align-items: center; gap: 10px; }
td.with-avatar { display: table-cell; }
td.with-avatar > * { vertical-align: middle; }
td.with-avatar > img, td.with-avatar > .avatar-ini { margin-right: 10px; float: left; }
td.with-avatar > div { overflow: hidden; }
.vendor-logo { max-height: 32px; max-width: 90px; object-fit: contain; background: #fff; border: 1px solid var(--line-soft); border-radius: 6px; padding: 2px 4px; }
.vendor-logo.lg { max-height: 64px; max-width: 160px; padding: 6px 10px; }
.air-logo { display: block; max-height: 22px; max-width: 100px; object-fit: contain; margin: 2px 0 4px; }
.air-logo.lg { max-height: 30px; max-width: 130px; }
td.with-avatar > .air-logo { float: none; display: block; max-height: 22px; max-width: 110px; margin: 0 0 4px; }
td.with-avatar { min-width: 170px; }
.profile-strip { display: flex; align-items: center; gap: 16px; margin: -6px 0 18px; }
.t-meta .vendor-logo { display: block; margin: 2px 0 4px; max-height: 26px; }

/* Ticket maker */
.upload-box { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 22px; border: 2px dashed var(--line); border-radius: var(--r-md); background: #f8fafc; margin: 14px 0; }
.upload-box input[type=file] { width: auto; flex: 1 1 260px; background: #fff; }
.upload-box .hint { flex-basis: 100%; margin: 0; }
.rep-row { position: relative; }
.pax-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 10px; }
.leg-row { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px; background: #fbfcfe; }
.leg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.leg-row .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .leg-row .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pair { display: flex; gap: 6px; }
details.changes { margin-top: 6px; font-size: 13px; }
details.changes summary { cursor: pointer; color: var(--link); font-weight: 600; }
details.changes table { margin-top: 6px; width: auto; font-size: 12.5px; }
details.changes td { padding: 3px 12px 3px 0; border: 0; }
details.changes tr:hover td { background: none; }
/* Customers' / vendors' bank accounts */
.pa-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 4px 22px 20px; }
.pa-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: #fbfcfe; }
.pa-top { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.pa-top b { flex: 1; line-height: 1.25; }
.pa-top .tag { flex: none; }
.pa-edit { font-size: 13px; }
.pa-num { margin: 12px 0 6px; }
.pa-num span { display: block; font: 700 17px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .03em; white-space: nowrap; overflow-x: auto; }
.pa-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; font-size: 13px; }
.pa-dl dt { color: var(--muted); } .pa-dl dd { margin: 0; }
.pa-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.pa-actions .btn { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.pa-top .vendor-logo { max-height: 28px; }
.our-list { padding: 0; }
.share-preview { white-space: pre-wrap; font: 13.5px/1.55 ui-monospace, Menlo, Consolas, monospace; background: #f7f9fc; border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 12px 14px; margin: 12px 0 0; }
.copy-mini { margin-left: 8px; vertical-align: 1px; line-height: 1.4; padding: 1px 8px; font: 700 11.5px var(--font, inherit); border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--ink); }
.copy-mini:hover { border-color: #aebbcc; }
/* Show / hide password */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: 700 12.5px inherit; color: var(--ink); cursor: pointer; }
.pw-toggle:hover { border-color: #aebbcc; }
/* Reissue page: the original ticket at a glance */
.reissue-orig { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #f8fafc; }
.reissue-orig span { display: block; font-size: 12.5px; color: var(--muted); }
.reissue-orig b { font-size: 15px; }
.refund-sum { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-sm); background: #f8fafc; border: 1px solid var(--line-soft); }
.tr-row { display: grid; grid-template-columns: 2fr 1fr 1fr 110px auto; gap: 8px; margin-bottom: 8px; }
@media (max-width: 760px) { .tr-row { grid-template-columns: 1fr 1fr; } }
/* Combined invoice picker on the sales list */
.combine-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--marigold-soft); border-bottom: 1px solid var(--line); }
/* Passport view (panel around the card) */
.pp-panel > summary { cursor: pointer; }
.pp-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 16px; }
.pp-side { flex: 1 1 220px; }
.adv-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid #b5d9c5; border-radius: var(--r-md); background: var(--green-soft); }
.adv-box { padding: 9px 11px; border: 1px dashed #9cc9ae; border-radius: var(--r-sm); background: var(--green-soft); color: var(--green); font-weight: 800; }
.pair input { min-width: 0; }
@media (max-width: 700px) { .pax-row { grid-template-columns: 1fr; } }

/* Passport card (customer page) */
.passport-card { flex: 0 1 620px; max-width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid #d8cde0;
  background: radial-gradient(circle at 70% 40%, rgba(255,255,255,.75) 0 18%, transparent 19%), repeating-linear-gradient(135deg, #f4eef7 0 6px, #efe6f3 6px 12px);
  box-shadow: 0 6px 18px rgba(60, 30, 80, .10); font-family: ui-sans-serif, system-ui, sans-serif; }
.pp-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 18px 6px; }
.pp-title { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #3d2a4f; }
.pp-country { font-size: 14px; font-weight: 800; color: #7a1f3d; text-transform: uppercase; letter-spacing: .03em; text-align: right; }
.pp-body { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 6px 18px 14px; }
.pp-photo { width: 120px; height: 150px; border-radius: 6px; overflow: hidden; background: #e2d7ea; display: grid; place-items: center; border: 1px solid #cdbfd9; }
.pp-photo img { width: 100%; height: 100%; object-fit: cover; }
.pp-photo span { font-size: 34px; font-weight: 800; color: #6b5580; }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; align-content: start; }
.pp-f span { display: block; font-size: 10px; color: #6b5a7a; text-transform: uppercase; letter-spacing: .04em; }
.pp-f b { display: block; font-size: 14px; color: #1d1626; letter-spacing: .02em; word-break: break-word; }
.pp-wide { grid-column: 1 / -1; } .pp-span2 { grid-column: span 2; }
.pp-num b { color: #7a1f3d; }
.pp-warn b { color: var(--red); }
.pp-mrz { background: rgba(255,255,255,.7); padding: 10px 18px 12px; font: 600 13.5px/1.5 "OCR B", "OCR-B", ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; color: #1d1626; overflow-x: auto; white-space: nowrap; }
@media (max-width: 620px) { .pp-body { grid-template-columns: 1fr; } .pp-photo { width: 96px; height: 120px; } .pp-grid { grid-template-columns: 1fr 1fr; } .pp-mrz { font-size: 11px; letter-spacing: .05em; } }

/* ---------- Reports ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--marigold); }
.month-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 220px; }
.mc-col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.mc-val { font-size: 11.5px; color: var(--muted); height: 18px; font-variant-numeric: tabular-nums; }
.mc-bar { position: relative; flex: 1; width: 100%; max-width: 44px; background: var(--line-soft); border-radius: 6px 6px 0 0; }
.mc-bar i, .mc-bar b { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px 6px 0 0; }
.mc-bar i { background: var(--ink); }
.mc-bar b { left: 25%; right: 25%; background: var(--marigold); }
.mc-lab { font-size: 12.5px; font-weight: 700; margin-top: 6px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.key.ink { background: var(--ink); margin-left: 0; } .key.gold { background: var(--marigold); }
.print-only { display: none; }
.logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-row input[type=file] { width: auto; }
.acct-logo { max-height: 40px; max-width: 140px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
label.check input { width: auto; margin: 0; accent-color: var(--ink); }
input.caps { text-transform: uppercase; }
input.caps::placeholder { text-transform: none; }
details.panel > summary { cursor: pointer; list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: " +"; color: var(--muted); }
details.panel[open] > summary::after { content: " –"; }

/* ---------- The ticket: sale record as a boarding pass ---------- */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) 270px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 22px; }
.t-main { padding: 24px 28px; border-top: 6px solid var(--ink); border-radius: 16px 0 0 16px; }
.t-kicker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.t-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 10px 0 4px; overflow-wrap: anywhere; }
.t-who { font-size: 15px; }
.t-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.t-meta span { display: block; font-size: 12.5px; color: var(--muted); }
.t-meta b { font-weight: 700; overflow-wrap: anywhere; }
.t-stub { position: relative; padding: 24px 24px; border-left: 2px dashed var(--line); border-top: 6px solid var(--marigold); border-radius: 0 16px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.t-stub::before, .t-stub::after { content: ""; position: absolute; left: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); border: 1px solid var(--line); }
.t-stub::before { top: -17px; clip-path: inset(50% 0 0 0); }
.t-stub::after { bottom: -14px; clip-path: inset(0 0 50% 0); }
.t-inv { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.t-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.t-due { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.t-due span { font-size: 13px; color: var(--muted); display: block; }
.t-due strong { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login-card { width: 100%; max-width: 420px; background: var(--paper); border-radius: 16px; border-top: 6px solid var(--marigold); padding: 30px 30px 26px; }
.login-card .brand { color: var(--ink); padding: 0 0 22px; }
.login-card .brand small { color: var(--muted); }
.login-logo { padding-bottom: 20px; }
.login-logo img { display: block; max-height: 64px; max-width: 220px; object-fit: contain; }
.login-card h1 { font-size: 22px; margin: 0 0 18px; letter-spacing: -.02em; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 11px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cols, .cols.wide-left { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(23, 34, 56, .45); z-index: 40; }
  .menu-btn { display: inline-flex !important; }
  .main { padding: 16px 14px 40px; }
  .topbar h1 { font-size: 21px; }
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .t-main { border-radius: 16px 16px 0 0; padding: 20px; }
  .t-stub { border-left: 0; border-top: 2px dashed var(--line); border-radius: 0 0 16px 16px; }
  .t-stub::before, .t-stub::after { display: none; }
  .t-title { font-size: 24px; }
  dl.facts { grid-template-columns: 1fr; gap: 2px 0; }
  dl.facts dd { margin-bottom: 8px; }
  .bar-row { grid-template-columns: 90px 1fr auto; }
  .month-chart { gap: 3px; height: 180px; }
  .mc-val { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  @page { margin: 12mm; }
  .print-only { display: block; }
  .tablewrap { overflow: visible !important; max-height: none !important; }
  table { font-size: 11px; }
  th { white-space: normal; font-size: 10.5px; }
  th, td { padding: 6px 7px; }
  td.with-avatar { min-width: 120px; }
  .panel { border-color: #ccd5e0; }
  .fig strong { font-size: 16px; }
  .statement-head.print-only { display: flex; }
  .figures, .panel { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .panel { break-inside: avoid; }
  .side, .topbar .actions, .no-print, .menu-btn { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .main { padding: 0; }
}

/* ---------- Hide / show the side menu (desktop). The choice is remembered in this browser. ---------- */
.brand-logo { padding-bottom: 0; }
.side-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 2px 18px 6px; }
.side-sub small { color: #8d9db6; font-size: 12px; letter-spacing: .02em; }
.side-collapse { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--ink-2); color: #c7d1e1; border: 1px solid #2c3a56; transition: background .15s, color .15s, transform .15s; }
.side-collapse:hover { background: var(--marigold); color: var(--ink); border-color: var(--marigold); transform: translateX(-2px); }
/* the slim tab on the left edge that brings the menu back */
.side-open { display: none; position: fixed; left: 0; top: 22px; z-index: 30; align-items: center; gap: 0; cursor: pointer;
  padding: 10px 12px 10px 11px; border: 0; border-left: 3px solid var(--marigold); border-radius: 0 14px 14px 0;
  background: var(--ink); color: #fff; font: 700 13px/1 var(--font); box-shadow: 0 6px 18px rgba(23, 34, 56, .25);
  transition: padding .2s ease, gap .2s ease, box-shadow .2s ease; }
.side-open span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .2s ease; }
.side-open:hover, .side-open:focus-visible { gap: 8px; padding-right: 16px; box-shadow: 0 8px 24px rgba(23, 34, 56, .35); }
.side-open:hover span, .side-open:focus-visible span { max-width: 60px; }
/* sliding the menu away */
.shell { transition: grid-template-columns .28s ease; }
.side { min-width: 0; transition: visibility 0s, padding .28s ease; }
html.side-hidden .shell { grid-template-columns: 0px minmax(0, 1fr); }
html.side-hidden .side { visibility: hidden; padding-left: 0; padding-right: 0; overflow: hidden; transition: visibility 0s .28s, padding .28s ease; }
html.side-hidden .side-open { display: inline-flex; }
html.side-hidden .main { max-width: none; padding-left: 74px; }
@media (max-width: 860px) {   /* phones keep their own Menu button */
  .side-collapse, .side-open, html.side-hidden .side-open { display: none; }
  html.side-hidden .side { visibility: visible; padding: 20px 14px; overflow-y: auto; }
  html.side-hidden .main { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .shell, .side, .side-open, .side-open span { transition: none; } }
@media print { .side-open, .side-collapse { display: none !important; } }
