/* Vwayaj B2B — application styles. Logical properties (inline-start/end) so Arabic (RTL) mirrors correctly. */
:root {
  color-scheme: light;
  /* Vwayaj palette: light blue #0896FF (rgb 8 150 255), dark blue #003580 (rgb 0 53 128), white #FFFFFF,
     lighter blue #C7D1E3 (rgb 199 209 227). Text on colour uses the dark blue, which keeps contrast readable;
     the light blue marks highlights (charts, active items, focus, markers). Backgrounds are tints of these. */
  --vw-light: #0896ff;
  --vw-dark: #003580;
  --vw-lighter: #c7d1e3;
  --bg: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #e9edf4;
  --ink: #0b1730;
  --ink-2: #2b3a55;
  --muted: #5a6b85;
  --line: #c7d1e3;
  --brand: #003580;
  --brand-ink: #ffffff;
  --brand-soft: #e6f5ff;
  --accent: #0896ff;
  --ok: #047857;
  --ok-soft: #e4f5ec;
  --warn: #a16207;
  --warn-soft: #fbf3dc;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --series-1: #0896ff;
  --grid: #e3e8f1;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 6px 18px rgb(15 23 42 / 0.06);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Bengali', Vrinda, 'Nirmala UI', Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #050e1f; --surface: #0b1a33; --surface-2: #10223f; --ink: #e8eef8; --ink-2: #c9d4e6; --muted: #93a3bd; --line: #1f3354;
    --brand: #0896ff; --brand-ink: #00163a; --brand-soft: #0a2c55; --accent: #0896ff; --ok: #34d399; --ok-soft: #062b20; --warn: #facc15; --warn-soft: #33290a; --danger: #f87171; --danger-soft: #3b1010;
    --series-1: #0896ff; --grid: #1f3354; --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.3);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #050e1f; --surface: #0b1a33; --surface-2: #10223f; --ink: #e8eef8; --ink-2: #c9d4e6; --muted: #93a3bd; --line: #1f3354;
  --brand: #0896ff; --brand-ink: #00163a; --brand-soft: #0a2c55; --accent: #0896ff; --ok: #34d399; --ok-soft: #062b20; --warn: #facc15; --warn-soft: #33290a; --danger: #f87171; --danger-soft: #3b1010;
  --series-1: #0896ff; --grid: #1f3354; --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.3);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.stack > *, .grid > * { min-width: 0; }

/* layout ------------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-inline-end: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; padding: 4px 10px 14px; min-width: 0; }
.logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800; flex: none; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
[dir='rtl'] .nav-item.active { box-shadow: inset -3px 0 0 var(--accent); }
.nav-item svg { flex: none; }
.nav-item .count { margin-inline-start: auto; background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; min-height: 58px; }
.topbar .grow { flex: 1; min-width: 0; }
.topbar .menu-btn { display: none; }
.wallet-chip { display: flex; gap: 14px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface); }
.wallet-chip span { display: grid; line-height: 1.15; }
.wallet-chip small { color: var(--muted); font-size: 11px; }
.wallet-chip b { font-variant-numeric: tabular-nums; font-size: 14px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; font-weight: 700; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.user-chip .who { display: grid; line-height: 1.2; min-width: 0; }
.user-chip .who b, .user-chip .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.user-chip small { color: var(--muted); font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.page { padding: 26px 28px 64px; max-width: 1280px; width: 100%; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 23px; }
.page-head p { margin-top: 4px; color: var(--muted); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow); }
  [dir='rtl'] .side { transform: translateX(100%); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgb(0 0 0 / 0.4); z-index: 20; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .topbar .menu-btn { display: inline-grid; }
  .wallet-chip .hide-sm, .user-chip .who, .topbar .lang-in-top { display: none; }
  .page { padding: 18px 16px 56px; }
}

/* components ---------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand); filter: brightness(1.08); }
.btn-accent { background: var(--surface); border: 2px solid var(--accent); color: var(--brand); }
.btn-accent:hover { background: var(--brand-soft); border-color: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: 15px; }
.card-head p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } .g-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 12px 14px; } .kpi .value { font-size: 19px; overflow-wrap: anywhere; } }
.stack { display: grid; gap: 16px; align-content: start; }
.stack > *, .grid > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi .value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.kpi.link { text-decoration: none; color: inherit; display: block; }
.kpi.link:hover { border-color: var(--brand); }

/* forms */
.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > span .req { color: var(--danger); }
.field small { color: var(--muted); font-size: 12px; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .field select, .field textarea {
  width: 100%; font: inherit; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); min-height: 40px;
}
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.days-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.days-pick label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.input-group { display: flex; gap: 0; }
.input-group > :first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group > :last-child { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; }
.ac { position: relative; }
.ac-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 40; max-height: 280px; overflow-y: auto; }
.ac-list button { display: grid; width: 100%; text-align: start; border: 0; background: none; padding: 8px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.ac-list button:hover, .ac-list button.on { background: var(--brand-soft); }
.ac-list small { color: var(--muted); font-size: 12px; }

/* badges, notices */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.notice.warn { background: var(--warn-soft); }
.notice.danger { background: var(--danger-soft); }
.notice.ok { background: var(--ok-soft); }
.notice svg { flex: none; margin-top: 1px; }
.positive { color: var(--ok); }
.negative { color: var(--danger); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }

/* tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table .num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--line); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input { width: auto; min-width: 130px; flex: 0 1 auto; }
.toolbar .search { flex: 1 1 200px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; }
.btn-ghost { background: transparent; border-style: dashed; color: var(--muted); }
.tab[aria-selected='true'] { color: var(--brand); border-bottom-color: var(--brand); }
.type-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: thin; }
.type-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 88px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 600; text-align: center; }
.type-tab:hover { border-color: var(--brand); color: var(--brand); }
.type-tab[aria-current='page'] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); flex-wrap: wrap; }
.seg button, .seg label { border: 0; background: none; padding: 5px 13px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed='true'], .seg input:checked + span { background: var(--brand); color: var(--brand-ink); }
.seg label { padding: 0; }
.seg label span { display: block; padding: 5px 13px; border-radius: 999px; }
.seg input { position: absolute; opacity: 0; width: 0; }

/* search & results */
.search-card { padding: 18px; display: grid; gap: 14px; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.search-grid .wide { grid-column: span 2; }
@media (max-width: 640px) { .search-grid .wide { grid-column: auto; } }
.leg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 170px auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .leg-row { grid-template-columns: minmax(0, 1fr); } }
.pax-box { display: grid; gap: 10px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stepper .ctl { display: flex; align-items: center; gap: 8px; }
.stepper .ctl b { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.results { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 960px) { .results { grid-template-columns: minmax(0, 1fr); } }
.filters { padding: 14px; display: grid; gap: 16px; position: sticky; top: 74px; }
.filters h3 { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.filters .check { font-size: 13px; }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) 210px; overflow: hidden; }
.offer-main { padding: 16px 18px; display: grid; gap: 10px; min-width: 0; }
.offer-side { border-inline-start: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; align-content: center; justify-items: stretch; text-align: center; background: var(--surface-2); }
.offer-side .price { font-size: 21px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.offer-side .sub { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .offer { grid-template-columns: minmax(0, 1fr); } .offer-side { border-inline-start: 0; border-top: 1px solid var(--line); } }
.leg { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; gap: 12px; align-items: center; }
.leg .t { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.leg .end { text-align: end; }
.leg .path { display: grid; gap: 3px; text-align: center; color: var(--muted); font-size: 12px; }
.leg .path i { display: block; height: 2px; background: var(--line); position: relative; border-radius: 2px; }
.leg .path i::after { content: ''; position: absolute; inset-inline-end: -2px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
@media (max-width: 520px) { .leg { grid-template-columns: 80px minmax(0, 1fr) 80px; } .leg .t { font-size: 16px; } }
.airline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.airline-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.prod { display: grid; grid-template-columns: 210px minmax(0, 1fr); overflow: hidden; }
.prod-img { background: var(--surface-2); min-height: 170px; display: grid; place-items: center; color: var(--muted); position: relative; overflow: hidden; }
.prod-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 16px 18px; display: grid; gap: 10px; min-width: 0; }
@media (max-width: 680px) { .prod { grid-template-columns: minmax(0, 1fr); } .prod-img { min-height: 150px; } }
.opt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); }
.opt-row:first-child { border-top: 0; }
.opt-row .price { font-weight: 800; font-variant-numeric: tabular-nums; text-align: end; }
@media (max-width: 560px) { .opt-row { grid-template-columns: minmax(0, 1fr) auto; } .opt-row .actions { grid-column: 1 / -1; } }
.stars { color: #d97706; letter-spacing: 1px; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 12px; color: var(--ink-2); background: var(--surface); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 150px 150px; gap: 6px; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery img:first-child { grid-row: span 2; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 160px 100px; } .gallery img:first-child { grid-column: span 2; grid-row: auto; } .gallery img:nth-child(n+4) { display: none; } }
.price-box { display: grid; gap: 6px; }
.price-line { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.price-line.total { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; }
.traveller { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; }
.traveller-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sticky { position: sticky; top: 74px; }

/* calendars */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal .day { border: 1px solid var(--line); border-radius: 8px; min-height: 64px; padding: 5px 6px; display: grid; align-content: space-between; background: var(--surface); font-size: 12px; text-decoration: none; color: inherit; }
.cal .day { min-width: 0; overflow: hidden; overflow-wrap: anywhere; }
.cal .day b { font-size: 12px; }
.cal .day.off { background: var(--surface-2); color: var(--muted); }
.cal .day.stop { background: var(--danger-soft); }
.cal .day.best { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.cal .day .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal .pad { visibility: hidden; }
@media (max-width: 560px) { .cal .day { min-height: 54px; padding: 3px; font-size: 10.5px; } }

/* timeline, thread */
.timeline { display: grid; gap: 0; }
.timeline .ev { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding-bottom: 12px; position: relative; }
.timeline .ev::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 5px; }
.timeline .ev::after { content: ''; position: absolute; inset-inline-start: 4px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline .ev:last-child::after { display: none; }
.timeline .ev > span:empty { display: none; }
.thread { display: grid; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { margin-inline-start: auto; background: var(--brand-soft); }
.bubble .meta { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.step { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 12px; }
.step.on { background: var(--brand); color: var(--brand-ink); }
.step.done { background: var(--brand-soft); color: var(--brand); }

/* banners */
.banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.banner-card { overflow: hidden; display: grid; text-decoration: none; color: inherit; }
.banner-card .img { aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--vw-dark), var(--vw-light)); display: grid; place-items: center; color: #fff; overflow: hidden; }
.banner-card .img img { width: 100%; height: 100%; object-fit: cover; }
.banner-card .body { padding: 12px 14px; display: grid; gap: 4px; }
.broadcast { border-inline-start: 4px solid var(--brand); }
.broadcast.important { border-inline-start-color: var(--accent); }

/* charts */
.viz { position: relative; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz .gridline { stroke: var(--grid); stroke-width: 1; }
.viz .axis-label { fill: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.viz .bar { fill: var(--series-1); }
.viz .bar:hover { opacity: 0.8; }
.hbar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 4px; }
.hbar .fill { height: 100%; background: var(--series-1); border-radius: 4px; min-width: 2px; }
.hbar .v { text-align: end; font-variant-numeric: tabular-nums; }

/* auth & public pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: linear-gradient(160deg, var(--vw-dark) 0%, var(--vw-dark) 55%, var(--vw-light) 140%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.auth-side .logo { color: #fff; padding: 0; }
.auth-side h2 { font-size: 30px; line-height: 1.2; max-width: 440px; }
.auth-side p { color: var(--vw-lighter); max-width: 440px; margin-top: 12px; }
.auth-side ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: #ffffff; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: min(420px, 100%); display: grid; gap: 16px; }
.auth-box h1 { font-size: 24px; }
.auth-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
@media (max-width: 880px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-side { display: none; } }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.public-top .logo { padding: 0; }
.public-main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 64px; }
.prose { line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.pay-amount { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* modal & toast */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(580px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgb(0 0 0 / 0.25); }
dialog.modal.wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgb(5 12 18 / 0.55); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 18px 20px; display: grid; gap: 14px; max-height: 72vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#toasts { position: fixed; bottom: 20px; inset-inline-end: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; max-width: 380px; animation: toast-in 0.2s ease; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; background: var(--surface); display: grid; gap: 6px; place-items: center; cursor: pointer; }
.drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs figure { margin: 0; position: relative; width: 120px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs figure button { position: absolute; top: 4px; inset-inline-end: 4px; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.color-in { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 8px; }
.color-in input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; }
.qr { width: 200px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
[dir='rtl'] .flip { transform: scaleX(-1); }
@media print { .side, .topbar, .no-print { display: none !important; } .shell { display: block; } body { background: #fff; } .card { border: 0; } }

/* passport scan */
.dropzone { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; cursor: pointer; color: var(--ink-2); }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone svg { color: var(--brand); }
.scan-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.scan-preview { width: 100%; max-height: 320px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
@media (max-width: 760px) { .scan-grid { grid-template-columns: minmax(0, 1fr); } }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* guest reviews */
.score-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; }
.score, .score-badge .score { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px 8px 8px 0; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
[dir='rtl'] .score, [dir='rtl'] .score-badge .score { border-radius: 8px 8px 0 8px; }
.review-summary { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.big-score { display: grid; gap: 4px; }
.big-score b { display: inline-grid; place-items: center; width: 64px; height: 56px; border-radius: 12px 12px 12px 0; background: var(--brand); color: var(--brand-ink); font-size: 24px; }
[dir='rtl'] .big-score b { border-radius: 12px 12px 0 12px; }
.big-score span { font-weight: 700; font-size: 16px; }
.cat-scores .hbar { grid-template-columns: 150px minmax(0, 1fr) 40px; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.review-head { display: flex; gap: 12px; align-items: flex-start; }
.review-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.review-photos img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 640px) { .review-summary { grid-template-columns: minmax(0, 1fr); } .cat-scores .hbar { grid-template-columns: 110px minmax(0, 1fr) 34px; } }

/* maps */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; z-index: 0; background: var(--surface-2); }
.map.small { height: 280px; }
.map-label span { display: inline-block; transform: translate(-50%, -100%); white-space: nowrap; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 12px/1.4 var(--font); box-shadow: 0 1px 4px rgb(0 0 0 / 0.25); border: 1px solid var(--line); }
.map-label.active span, .map-label:hover span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.map-point span { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.35); }
.leaflet-popup-content { font: 13px/1.45 var(--font); margin: 10px 12px; }
.leaflet-container { font: 12px/1.4 var(--font); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-toggle button { border: 0; background: var(--surface); color: var(--ink-2); padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.view-toggle button[aria-pressed='true'] { background: var(--brand); color: var(--brand-ink); }
.distance { font-size: 12px; color: var(--muted); }

/* Vwayaj logo: wordmark on transparent background; on dark surfaces it sits on a white tile so “.com” stays legible. */
.brand-logo { display: block; height: 30px; width: auto; max-width: 100%; }
.logo-brand { flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 12px; }
.logo-sub { font-size: 12px; font-weight: 600; color: var(--muted); max-width: 100%; }
.auth-side .brand-logo, .public-top .brand-logo { height: 34px; }
.auth-side .brand-logo { background: #fff; padding: 7px 12px; border-radius: 10px; box-sizing: content-box; }
.auth-legal { color: var(--vw-lighter); }
.side-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 11.5px; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .brand-logo { background: #fff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; } }
:root[data-theme='dark'] .brand-logo { background: #fff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; }

/* Google Maps: HTML markers drawn by an overlay at the point (labels sit above it, the chosen point is centred). */
.gm-overlay { position: absolute; width: 0; height: 0; }
.gm-overlay.map-point span { transform: translate(-50%, -50%); touch-action: none; }
.map-popup { font: 13px/1.5 var(--font); color: #0b1730; min-width: 160px; }

/* address check panel */
.addr-check { display: grid; gap: 6px; justify-items: start; }
.addr-check > div { width: 100%; }
.addr-list { margin: 4px 0 0; padding-inline-start: 18px; display: grid; gap: 2px; font-size: 13px; }
.addr-list del { color: var(--muted); }
.addr-list ins { text-decoration: none; font-weight: 600; color: var(--ink); }
.addr-cell { font-size: 13px; line-height: 1.45; white-space: pre-line; }
.addr-cell ins { text-decoration: none; font-weight: 600; background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 3px; padding: 0 2px; }

/* --- B2C websites (BASE_URL/b2c/<slug>): the agency's brand colours in --brand / --brand-ink ---------------- */
body.b2c { display: flex; flex-direction: column; min-height: 100vh; }
body.b2c #root { flex: 1; width: 100%; max-width: 1280px; margin-inline: auto; }
.b2c-top { background: var(--surface); border-block-end: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.b2c-bar { max-width: 1280px; margin-inline: auto; padding: 10px 28px; display: flex; align-items: center; gap: 18px; }
.b2c-logo { display: flex; align-items: center; color: var(--ink); text-decoration: none; font-size: 18px; min-width: 0; }
.b2c-logo img { max-height: 44px; max-width: 220px; object-fit: contain; }
.b2c-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.b2c-nav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-weight: 500; }
.b2c-nav a:hover { background: var(--surface-2); }
.b2c-hero { background: var(--brand); color: var(--brand-ink); background-size: cover; background-position: center; }
.b2c-hero-in { max-width: 1280px; margin-inline: auto; padding: 56px 28px 40px; }
.b2c-hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.15; max-width: 780px; color: inherit; }
.b2c-hero p { max-width: 640px; margin: 12px 0 24px; opacity: 0.92; font-size: 16px; }
.b2c-types .type-tab { background: rgb(255 255 255 / 0.94); color: var(--ink); }
.b2c-service { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; text-align: center; }
.b2c-service:hover { border-color: var(--brand); }
.b2c-foot { background: var(--surface); border-block-start: 1px solid var(--line); margin-block-start: 32px; }
.b2c-foot-in { max-width: 1280px; margin-inline: auto; padding: 24px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.b2c-foot a { color: var(--ink-2); }
@media (max-width: 760px) {
  .b2c-bar { padding: 8px 16px; flex-wrap: wrap; gap: 8px; }
  .b2c-nav { order: 3; flex-basis: 100%; }
  .b2c-hero-in { padding: 32px 16px 24px; }
  .b2c-foot-in { padding: 20px 16px; }
}
.code-block { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; margin: 8px 0; }

/* banners and offers: large banners across the full width, video on demand */
.banner-wrap { display: grid; gap: 6px; }
.banner-large { grid-column: 1 / -1; display: grid; gap: 6px; }
.banner-large-in { position: relative; display: block; min-height: 180px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--vw-dark), var(--vw-light)); color: #fff; text-decoration: none; }
.banner-large-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-large-in .txt { position: relative; display: grid; gap: 6px; padding: 28px 24px; max-width: 640px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), transparent); min-height: 180px; align-content: end; }
.banner-large-in .txt b { font-size: 22px; line-height: 1.2; }
[dir="rtl"] .banner-large-in .txt { background: linear-gradient(270deg, rgba(0, 0, 0, 0.55), transparent); }
.banner-actions { display: flex; gap: 8px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 8px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b2c-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
/* subscription plans */
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plan-features li { display: flex; gap: 6px; align-items: baseline; }
/* live broadcast (announcements received while the portal is open) */
.live-broadcasts { position: fixed; inset-block-end: 16px; inset-inline-end: 16px; z-index: 60; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.live-broadcast { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 20, 60, .18); display: grid; gap: 6px; }
.live-broadcast.important { border-inline-start-color: var(--danger); }
.live-broadcast .lb-head { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.live-broadcast .lb-head .icon-btn { margin-inline-start: auto; }
.live-broadcast p { margin: 0; max-height: 9em; overflow: auto; }

/* document archive (Paperless-ngx): thumbnails, preview, notes */
.arc-thumb { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.arc-preview { display: block; width: 100%; height: 72vh; min-height: 360px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.arc-preview-img { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: 10px; }
.arc-note { border-inline-start: 3px solid var(--line); padding-inline-start: 10px; display: grid; gap: 4px; }
@media (max-width: 640px) { .arc-preview { height: 58vh; min-height: 280px; } }

/* logos and document templates: three logo slots per level, previewed on light and dark backgrounds */
.org-row { border-top: 1px solid var(--line); display: grid; gap: 8px; }
.logo-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.logo-slot { display: grid; gap: 6px; align-content: start; min-width: 0; }
.logo-prev { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.logo-prev > span { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 8px; text-align: center; }
.logo-prev .lp-light { background: #ffffff; color: #555; }
.logo-prev .lp-dark { background: #1d2430; color: #c9d1dc; }
.logo-prev img { max-width: 100%; max-height: 56px; object-fit: contain; }
.tpl-preview { display: block; width: 100%; height: 60vh; min-height: 320px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
@media (max-width: 760px) { .logo-slots { grid-template-columns: minmax(0, 1fr); } .tpl-preview { height: 50vh; min-height: 260px; } }
