/* Boost Board. Each brand defines its own tokens; nothing brand-coloured sits outside them. */
:root {
  --brand: #232424; --on-brand: #fff; --brand-text: #232424; --ink: #232424; --line-base: #B4B9B7; --canvas-base: #B4B9B7;
  --top-bg: #fff; --top-ink: #232424; --danger: #A32A22; --warn-bg: #FFF3E0; --warn-ink: #7A4A00;
  --head-font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body-font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
}
html[data-brand="auto"] {
  --brand: #9F0202; --on-brand: #fff; --brand-text: #9F0202; --ink: #232424; --line-base: #B4B9B7;
  --top-bg: #fff; --top-ink: #232424; --danger: #BD0000;
  --head-font: "Tomato Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --body-font: "Neue Montreal", "IBM Plex Sans", system-ui, sans-serif;
}
html[data-brand="rental"] {
  --brand: #9EC3E7; --on-brand: #221F20; --brand-text: #221F20; --ink: #221F20; --line-base: #221F20; --canvas-base: #9EC3E7;
  --top-bg: #9EC3E7; --top-ink: #fff; --danger: #A32A22;
  --head-font: "CY Grotesk Grand", "IBM Plex Sans", system-ui, sans-serif;
  --body-font: "Neue Montreal", "IBM Plex Sans", system-ui, sans-serif;
}
html[lang="ar"], html[lang="ar"][data-brand="auto"] { --head-font: "IBM Plex Sans Arabic", system-ui, sans-serif; --body-font: "IBM Plex Sans Arabic", system-ui, sans-serif; }
html[lang="ar"][data-brand="rental"] { --head-font: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif; --body-font: "IBM Plex Sans Arabic", system-ui, sans-serif; }
:root {
  --line: color-mix(in srgb, var(--line-base) 38%, transparent);
  --line-strong: color-mix(in srgb, var(--line-base) 70%, transparent);
  --muted: color-mix(in srgb, var(--ink) 66%, white);
  --tint: color-mix(in srgb, var(--ink) 5%, white);
  --canvas: color-mix(in srgb, var(--canvas-base) 14%, white);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.45 var(--body-font); }
h1, h2, h4 { font-family: var(--head-font); margin: 0; line-height: 1.2; font-weight: 600; }
h1 { font-size: 22px; } h2 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
small { font-size: 11px; color: var(--muted); font-weight: 400; }

/* header */
.top { background: var(--top-bg); color: var(--top-ink); position: sticky; inset-block-start: 0; z-index: 5; box-shadow: 0 1px 0 var(--line-strong); }
html[data-brand="auto"] .top { border-block-start: 4px solid var(--brand); }
html[data-brand="rental"] .top { border-block-start: 4px solid #fff; box-shadow: none; }
.top-row { display: flex; align-items: center; gap: 16px; padding: 10px 20px 6px; flex-wrap: wrap; }
.logo { block-size: 34px; inline-size: auto; display: block; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 6px 14px; font-weight: 500; color: #232424; }
.seg button[aria-pressed="true"] { color: #fff; }
.top-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
select { background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; min-block-size: 34px; color: var(--ink); }
.ghost { background: transparent; border: 0; padding: 6px 8px; color: inherit; border-radius: 6px; }
.tabs { display: flex; gap: 2px; padding-inline: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 8px 10px 10px; font-weight: 500; color: inherit; opacity: .72; border-block-end: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-current] { opacity: 1; font-weight: 600; }
html[data-brand="auto"] .tabs button[aria-current] { color: var(--brand-text); }
.count { display: inline-block; margin-inline-start: 6px; min-inline-size: 18px; padding: 0 5px; border-radius: 9px; background: #232424; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }

.page { padding: 18px 20px 48px; max-inline-size: 1500px; margin-inline: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; min-block-size: 36px; border-radius: 6px; border: 1px solid var(--line-strong); background: #fff; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .12s, transform .08s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.wide { inline-size: 100%; }
.link { background: none; border: 0; text-decoration: underline; color: var(--muted); }
.mini { font-size: 12px; padding: 3px 8px; min-block-size: 26px; border: 1px solid var(--line); border-radius: 5px; background: #fff; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.mini.go { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; margin-inline-start: auto; }

/* budget meters */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.meter { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.meter-head strong { font-family: var(--head-font); font-weight: 600; }
.meter-head span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.meter-head b { color: var(--ink); font-size: 15px; }
.bar { block-size: 8px; background: color-mix(in srgb, var(--ink) 9%, white); border-radius: 4px; margin-block: 8px 6px; overflow: hidden; }
.bar { display: flex; }
.bar i { display: block; block-size: 100%; background: var(--brand); }
.bar i.g { background: var(--g-seg); }
.meter-foot { font-size: 12px; color: var(--muted); }
.meter.over .bar i.b { background: var(--danger); }
.meter.over .meter-foot { color: var(--danger); font-weight: 600; }
.note { font-size: 12px; color: var(--muted); margin-block-start: 6px; display: block; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-block: 16px 12px; flex-wrap: wrap; }
.toolbar .btn:first-of-type { margin-inline-start: auto; }

/* board */
.col-tabs { display: none; }
.board { display: grid; grid-template-columns: repeat(var(--cols), minmax(216px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-block-end: 8px; }
.col { background: color-mix(in srgb, var(--ink) 4%, white); border-radius: var(--radius); padding: 10px; min-inline-size: 0; }
.col h2 { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 10px; font-size: 13px; }
.col-body { display: grid; gap: 8px; }
.empty { color: var(--muted); font-size: 13px; padding: 14px 4px; text-align: center; }
.empty.big { padding: 48px 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); border-inline-start: 3px solid var(--line-strong); overflow: hidden; }
.card.s-live { border-inline-start-color: var(--live); }
.card.s-requested { border-inline-start-color: var(--ink); }
.card.s-rejected { border-inline-start-color: var(--rej); background: var(--rej-bg); }
.card-main { display: flex; flex-direction: column; gap: 4px; inline-size: 100%; text-align: start; background: none; border: 0; padding: 10px 12px 8px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.plat { font-weight: 600; color: var(--ink); }
.card-title { font-weight: 600; font-size: 15px; font-family: var(--head-font); overflow-wrap: anywhere; }
.amounts { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.amounts b { color: var(--ink); font-weight: 600; }
.reason { font-size: 12px; color: var(--rej-ink); overflow-wrap: anywhere; }
.flag { align-self: flex-start; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: var(--warn-bg); color: var(--warn-ink); }
.flag.soft { background: var(--tint); color: var(--muted); }
.card-body { display: flex; gap: 10px; align-items: flex-start; }
.card-info { display: flex; flex-direction: column; gap: 5px; min-inline-size: 0; flex: 1; }
.thumb-wrap { position: relative; flex: none; inline-size: 92px; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: var(--tint); }
.thumb { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.thumb-wrap.video::after { content: "▶"; position: absolute; inset-block-end: 5px; inset-inline-end: 5px; inline-size: 20px; block-size: 20px; border-radius: 50%; background: rgb(0 0 0 / .62); color: #fff; font-size: 9px; line-height: 20px; text-align: center; }
.post-preview { display: block; background: var(--tint); border-radius: 8px; margin-block-end: 10px; overflow: hidden; }
.post-preview img { display: block; margin-inline: auto; max-inline-size: 100%; max-block-size: 300px; }
.form-thumb { display: block; inline-size: 92px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; margin-block-start: 6px; }
.link-rows { display: grid; gap: 8px; }
.link-row { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.link-line { display: flex; align-items: center; gap: 8px; }
.link-line input { flex: 1; min-inline-size: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; font-size: 16px; }
@media (min-width: 761px) { .link-line input { font-size: 14px; } }
.row-n { flex: none; inline-size: 22px; block-size: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--tint); font-size: 12px; font-weight: 600; }
.plat-badge { flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; background: var(--ink); color: #fff; }
.row-details { margin-block-start: 8px; }
.row-grid { display: flex; gap: 10px; align-items: flex-start; margin-block-start: 6px; }
.row-grid .form-thumb { margin-block-start: 0; flex: none; }
.row-fields { flex: 1; min-inline-size: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.money-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.grid.shared { margin-block-start: 12px; }
.table-wrap.flat { border: 0; border-radius: 0; }
.plan-top { margin-block-start: 0; grid-template-columns: 3fr 2fr; }
.grp-start { border-inline-start: 1px solid var(--line); }
.plan-table th.wrap, .plan-table td.wrap { white-space: normal; min-inline-size: 130px; }
.plan-table .nw { white-space: nowrap; }
.sub-type { display: block; font-weight: 400; }
.muted { color: var(--muted); font-size: 12px; }
.ao-status.lv-very_high { background: var(--brand); color: var(--on-brand); border-color: var(--brand); font-weight: 600; }
.ao-status.lv-none { color: var(--muted); }
.ao-status.ds-approved { background: var(--ink); color: #fff; border-color: var(--ink); }
.pi { display: inline-flex; align-items: center; justify-content: center; flex: none; inline-size: 24px; block-size: 24px; border-radius: 7px; color: #fff; background: #111; }
.pi svg { inline-size: 14px; block-size: 14px; fill: currentColor; display: block; }
.pi-instagram { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF 85%, #515BD4); }
.pi-snapchat { background: #FFFC00; color: #111; }
.pi-snapchat svg { inline-size: 17px; block-size: 17px; fill: #fff; stroke: #111; stroke-width: 1.5; stroke-linejoin: round; paint-order: stroke; }
.pi-linkedin { background: #0A66C2; }
.pi-influencers { background: var(--muted); }
.pi-label, .with-icon { display: inline-flex; align-items: center; gap: 7px; }
.pi-row { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.plat-badge { background: none !important; padding: 0 !important; }
.card-grid { display: flex; }
.card-left { flex: 1; min-inline-size: 0; }
.card-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; gap: 6px; padding: 10px; padding-inline-start: 0; }
.card-side .thumb-wrap { display: block; inline-size: 64px; }
.card-side .thumb-wrap.video::after { inline-size: 17px; block-size: 17px; line-height: 17px; font-size: 8px; inset-block-end: 3px; inset-inline-end: 3px; }
.thumb-btn { border: 0; padding: 0; background: none; border-radius: 6px; display: block; }
.card-side .mini.go { margin-inline-start: 0; }
.amounts:has(.amt) { gap: 6px; margin-block: 3px; }
.amt { display: inline-flex; flex-direction: column; padding: 3px 10px 4px; border-radius: 6px; line-height: 1.2; background: var(--amt-bg); }
.amt small { font-size: 10px; color: var(--muted); }
.amounts .amt b { font-size: 16px; font-weight: 700; color: var(--brand-text); }
html[data-brand="auto"] { --amt-bg: color-mix(in srgb, #9F0202 8%, white); }
html[data-brand="rental"] { --amt-bg: color-mix(in srgb, #9EC3E7 38%, white); }
.subj-tag { align-self: flex-start; font-size: 12px; font-weight: 600; line-height: 1.3; color: #000; overflow-wrap: anywhere; }
html[data-brand="auto"] { --subj: #9F0202; }
html[data-brand="rental"] { --subj: #A32A22; }
.riyal { display: inline-block; block-size: .82em; inline-size: auto; vertical-align: -.06em; fill: currentColor; }
.amt b i { font-style: normal; }
.amt b i .riyal { block-size: 13px; }
html[data-brand="auto"] { --g-seg: #232424; }
html[data-brand="rental"] { --g-seg: #221F20; }
:root { --live: #9FD8AE; --rej: #E8821E; --rej-bg: #FFF5EA; --rej-ink: #A85608; }
.bar i.l, .key i.l { background: var(--live); }
.strip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 8px; }
.keys { display: flex; gap: 14px; }
.key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.key i { inline-size: 10px; block-size: 10px; border-radius: 3px; background: var(--brand); }
.key i.g { background: var(--g-seg); }
.seg.small button { padding: 4px 11px; font-size: 12px; }
.mini.wa { gap: 5px; background: #25D366; border-color: #25D366; color: #fff; font-weight: 600; }
.mini.wa svg { inline-size: 12px; block-size: 12px; fill: currentColor; }
dd .mini.wa { margin-inline-start: 8px; }
.dlg-head.detail { margin-block-end: 2px; }
.detail-title { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.detail-title h2 { margin-block-start: 0; }
.dlg-head.detail ~ .post-preview, .dlg-head.detail ~ .warn:first-of-type { margin-block-start: 10px; }
.chip { align-self: flex-start; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 9px; border: 1px solid var(--line-strong); color: var(--ink); }
.adset { display: flex; justify-content: space-between; gap: 12px; padding-block: 3px; }
.adset b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.adset-note { font-size: 13px; font-weight: 500; margin-block-end: 4px; white-space: normal; }
.card-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 10px; }

.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9px; background: var(--tint); color: var(--ink); }
.pill.s-live { background: var(--live); color: #17331F; }
.pill.s-requested { background: var(--ink); color: #fff; }
.pill.s-rejected { background: var(--rej); color: #fff; }

/* dialogs */
dialog { border: 0; border-radius: 12px; padding: 20px; inline-size: min(620px, calc(100vw - 24px)); max-block-size: calc(100dvh - 32px); color: var(--ink); box-shadow: 0 18px 50px rgb(0 0 0 / .28); }
dialog::backdrop { background: rgb(20 20 20 / .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-block-end: 12px; }
.dlg-head h2 { font-size: 18px; margin-block-start: 6px; overflow-wrap: anywhere; }
.x { background: none; border: 0; font-size: 24px; line-height: 1; padding: 2px 8px; color: var(--muted); border-radius: 6px; }
dl { margin: 0; }
.row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding-block: 8px; border-block-end: 1px solid var(--line); }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
dd[dir="auto"], .reason { unicode-bidi: plaintext; }   /* each line of a bilingual caption takes its own direction */
dd .mini { margin-inline-start: 6px; }
code { font-size: 12px; background: var(--tint); padding: 2px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 16px; align-items: center; }
.spacer { flex: 1; }
.hist { margin-block-start: 14px; font-size: 13px; color: var(--muted); }
.hist ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.hist li span { color: var(--ink); }
.hint { color: var(--muted); font-size: 12px; margin-block: 4px; }
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; padding: 8px 10px; font-size: 13px; margin-block: 6px; }
.warn.soft { background: var(--tint); color: var(--ink); }
.okay { font-size: 13px; color: var(--muted); padding-block: 4px; }
.okay::before { content: "✓ "; font-weight: 700; color: var(--ink); }
.form-err { color: var(--danger); font-size: 13px; font-weight: 500; margin-block-start: 8px; min-block-size: 1em; }

/* forms */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 4px; font-size: 13px; }
.field > span { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea, .inline input { inline-size: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; font-size: 16px; }
@media (min-width: 761px) { .field input, .field select, .field textarea, .inline input { font-size: 14px; } }
textarea { resize: vertical; }
fieldset.money { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.money legend { padding: 0; font-size: 13px; font-weight: 600; margin-block-end: 6px; }

/* login */
.login { min-block-size: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; inline-size: min(360px, 100%); display: grid; gap: 12px; text-align: center; }
.login-card .field { text-align: start; }
.login-card p:not(.form-err) { color: var(--muted); }
.login-card .form-err:empty { display: none; }

/* budgets and google */
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-block-end: 14px; }
.sub { color: var(--muted); margin-block-start: 4px; }
.totals { display: flex; flex-wrap: wrap; gap: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-block-end: 14px; }
.totals div { display: grid; gap: 2px; }
.totals span { font-size: 12px; color: var(--muted); }
.totals b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--head-font); }
.totals b.sm { font-size: 14px; }
.totals .main { margin-inline-start: auto; text-align: end; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; inline-size: 100%; font-size: 13px; }
th, td { padding: 8px 10px; text-align: start; border-block-end: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child > * { border-block-end: 0; }
thead th { font-weight: 500; color: var(--muted); font-size: 12px; }
thead th.grp { color: var(--ink); font-weight: 600; text-align: center; border-inline-start: 1px solid var(--line); }
tbody th { font-weight: 600; }
td.n { font-variant-numeric: tabular-nums; }
td.n small { display: inline-block; margin-inline-start: 5px; }
td.neg { color: var(--danger); font-weight: 600; }
.cell { inline-size: 88px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; font-variant-numeric: tabular-nums; }
.budget tbody td:nth-child(6n+2) { border-inline-start: 1px solid var(--line); }
.budget .cell { inline-size: 76px; }
td.strong { font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block-start: 14px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel > h2 { margin-block-end: 10px; }
.tagbar { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; padding-block: 5px; }
.tagbar b { font-variant-numeric: tabular-nums; font-weight: 600; }
.tagbar i { grid-column: 1 / -1; block-size: 4px; border-radius: 2px; background: var(--brand); display: block; }
.inline { display: flex; gap: 8px; margin-block-end: 10px; }
.tags { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-block-size: 300px; overflow-y: auto; }
.tags li { display: flex; gap: 6px; align-items: center; }
.tags input { flex: 1; min-inline-size: 0; border: 1px solid transparent; padding: 4px 6px; border-radius: 4px; background: transparent; }
.tags input:hover, .tags input:focus { border-color: var(--line-strong); background: #fff; }
.tags .off input { color: var(--muted); text-decoration: line-through; }
.sec { margin-block: 18px 8px; }
.ao-status { font-size: 12px; min-block-size: 28px; padding: 2px 6px; }
.search-list { display: grid; gap: 8px; }
.search-list summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; flex-wrap: wrap; }
.s-name { font-weight: 600; }
.s-money { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.s-tools { display: flex; gap: 8px; align-items: center; margin-block: 10px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.kv h4 { font-size: 12px; color: var(--muted); font-weight: 500; margin-block-end: 4px; font-family: inherit; }
.kv p { font-size: 13px; overflow-wrap: anywhere; }

/* review */
.review { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.review li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; gap: 8px; padding-inline-end: 12px; }
.review .card-main { flex: 1; min-inline-size: 0; }

#toast { position: fixed; inset-block-end: 20px; inset-inline-start: 50%; translate: -50% 12px; background: #232424; color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .16s, translate .16s; z-index: 50; }
html[dir="rtl"] #toast { translate: 50% 12px; }
#toast.on { opacity: 1; translate: -50% 0; }
html[dir="rtl"] #toast.on { translate: 50% 0; }
#toast.bad { background: var(--danger); }

/* ---------- Visual system: depth, material and motion ---------- */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 12px; --r-s: 8px; --r-l: 18px;
  --shadow-1: 0 1px 2px rgb(20 22 24 / .05), 0 6px 18px -12px rgb(20 22 24 / .18);
  --shadow-2: 0 2px 6px rgb(20 22 24 / .07), 0 16px 32px -16px rgb(20 22 24 / .28);
  --glow: color-mix(in srgb, var(--brand) 42%, transparent);
  --focus: var(--ink); --tab-ind: var(--ink); --top-line: transparent;
}
html[data-brand="auto"] { --focus: #9F0202; --tab-ind: #9F0202; --top-line: #9F0202; }
html[data-brand="rental"] { --tab-ind: #fff; --top-line: #fff; }

html { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; background: var(--canvas); }
body { background: none; -webkit-font-smoothing: antialiased; }
/* A still, barely-there field behind everything: light from the top and a fine dot grid. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 440px at 50% -140px, color-mix(in srgb, var(--brand) 11%, transparent), transparent 72%),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 0) 0 0 / 22px 22px; }

html:not([lang="ar"]) h1 { letter-spacing: -.022em; }
html:not([lang="ar"]) h2, html:not([lang="ar"]) .totals b { letter-spacing: -.012em; }
h1 { font-size: 26px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* controls never select their label or wait on double-tap */
button, a.btn, a.mini, select, .tabs button { touch-action: manipulation; }
button, a.btn, a.mini { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* header: a translucent layer the page scrolls beneath */
.top { background: color-mix(in srgb, var(--top-bg) 80%, transparent); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); padding-block-start: env(safe-area-inset-top, 0px); padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); }
.tabs button { position: relative; border-block-end: 0; padding-block: 8px 12px; transition: opacity 160ms ease; }
.tabs { position: relative; }
.tab-ind { position: absolute; left: 0; inset-block-end: 2px; inline-size: 100px; block-size: 3px; border-radius: 3px; background: var(--tab-ind); transform-origin: 0 50%; pointer-events: none; transition: transform 180ms var(--ease-out); }
.tab-ind.instant { transition: none; }
html[data-brand="auto"] .tab-ind { box-shadow: 0 0 12px var(--glow); }
/* White menu text needs the full blue behind it and full strength, so Rental's bar stays solid. */
html[data-brand="rental"] .top { background: var(--top-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-brand="rental"] .tabs button { opacity: 1; }
html[data-brand="rental"] .tabs button[aria-current] { font-weight: 700; }
/* Stroke painted behind the fill, so the outline adds definition without thinning the white letters. */
html[data-brand="rental"] .tabs button, html[data-brand="rental"] .top .ghost { font-weight: 600; -webkit-text-stroke: .5px rgb(34 31 32 / .6); paint-order: stroke fill; }
html[data-brand="rental"] .tabs .count { -webkit-text-stroke: 0; }

/* Branch location preview */
[data-location]:empty, .plan-slot:empty { display: none; }
.loc-card { border: 1px solid var(--line-strong); border-radius: var(--r-s); overflow: hidden; background: #fff; }
.loc-map { display: block; inline-size: 100%; block-size: 160px; border: 0; }
.loc-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; }
.loc-text { display: grid; min-inline-size: 0; }
.loc-info .mini { flex: none; }

/* Matching details from the plan */
.plan-match { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--tint); }
.plan-match.on { background: #fff; }
.plan-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.plan-v { font-weight: 600; overflow-wrap: anywhere; }
.plan-do { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plan-use { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.plan-pick { inline-size: 100%; }
.plan-banner { display: grid; gap: 2px; margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-s); background: var(--tint); }
.plan-acts { white-space: nowrap; }
.plan-acts > * + * { margin-inline-start: 6px; }

/* Plan against budget: totals and the Both / Planned / Used switch */
.plan-top > * { min-inline-size: 0; }   /* the wide table scrolls inside its panel on a phone */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-block-end: 6px; }
tfoot th, tfoot td { font-weight: 700; border-block-start: 2px solid var(--line-strong); }
.totals .main + .main { margin-inline-start: 0; }

/* Client budget change requests */
.req-panel { margin-block-end: 16px; }
.req-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-block: 10px; border-block-start: 1px solid var(--line); }
.req-panel h2 + .req-row { border-block-start: 0; }
.req-main { display: grid; gap: 3px; min-inline-size: 0; }
.req-main p { overflow-wrap: anywhere; }
.req-reply { color: var(--muted); }
.req-amt { justify-self: start; font-variant-numeric: tabular-nums; }
.req-side { display: grid; justify-items: end; gap: 6px; flex: none; }
.req-do { display: flex; gap: 6px; }
.req-cell { white-space: nowrap; }
.req-cell > * + * { margin-inline-start: 8px; }
.pill.r-pending { background: var(--ink); color: #fff; }
.pill.r-approved { background: var(--live); color: #17331F; }
.pill.r-declined { background: var(--rej); color: #fff; }

/* The + and × beside each link field */
.line-btn { flex: none; inline-size: 38px; block-size: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); font-size: 20px; line-height: 1; transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.line-btn:active { transform: scale(.96); }
.line-btn:disabled { opacity: .4; cursor: default; }
@media (hover: hover) and (pointer: fine) { .line-btn:hover:not(:disabled) { background: var(--tint); } }
@media (pointer: coarse) { .line-btn { inline-size: 44px; block-size: 44px; } }

.seg { padding: 3px; gap: 2px; border: 0; border-radius: 11px; background: rgb(255 255 255 / .72); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; --dir: 1; }
html[dir="rtl"] .seg { --dir: -1; }
.seg button { position: relative; z-index: 1; border-radius: 8px; transition: transform 120ms var(--ease-out), color 160ms ease; }
.seg button[aria-pressed="true"] { background: transparent; }
.seg-thumb { position: absolute; inset-block: 3px; inset-inline-start: 3px; inline-size: calc((100% - 6px - (var(--n) - 1) * 2px) / var(--n)); border-radius: 8px; background: #232424;
  box-shadow: 0 1px 2px rgb(20 22 24 / .24), inset 0 1px 0 rgb(255 255 255 / .12); transform: translateX(calc(var(--dir) * var(--i) * (100% + 2px))); transition: transform 180ms var(--ease-out); pointer-events: none; }

select { border-radius: var(--r-s); transition: border-color 140ms ease, box-shadow 160ms ease; }
.ghost { border-radius: var(--r-s); transition: transform 120ms var(--ease-out), background-color 140ms ease; }

/* buttons */
.btn { position: relative; overflow: hidden; border-radius: 10px; min-block-size: 38px; border-color: var(--line-strong); box-shadow: 0 1px 2px rgb(20 22 24 / .05); transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, box-shadow 200ms ease; }
.btn:active { transform: scale(.97); }
.btn.primary, .mini.go { background-image: linear-gradient(180deg, rgb(255 255 255 / .16), rgb(255 255 255 / 0) 58%); }
.btn.primary { box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 1px 2px rgb(20 22 24 / .18), 0 10px 22px -12px var(--glow); }
html[data-brand="rental"] .btn.primary { box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 1px 2px rgb(20 22 24 / .14), 0 10px 22px -12px var(--glow); }
.btn.primary::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 34%, rgb(255 255 255 / .36) 50%, transparent 66%); transform: translateX(-120%); }
.mini { position: relative; overflow: hidden; border-radius: var(--r-s); min-block-size: 28px; border-color: var(--line-strong); transition: transform 120ms var(--ease-out), background-color 140ms ease, border-color 140ms ease; }
.mini:active, .ghost:active, .x:active, .seg button:active, .col-tabs button:active, .thumb-btn:active { transform: scale(.96); }
.mini.go { box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 1px 2px rgb(20 22 24 / .22); }
.mini.go:active, .mini.go:focus-visible { background-color: var(--subj); border-color: var(--subj); }
.mini.wa { box-shadow: inset 0 1px 0 rgb(255 255 255 / .28); }
.x { transition: transform 120ms var(--ease-out), background-color 140ms ease; }
.thumb-btn { transition: transform 120ms var(--ease-out); }

/* surfaces */
.meter, .totals, .panel, .table-wrap, .review li { border-radius: 14px; box-shadow: var(--shadow-1); }
.table-wrap.flat { box-shadow: none; border-radius: 0; }
.col { background: rgb(255 255 255 / .55); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; }
.col h2 small { background: color-mix(in srgb, var(--ink) 7%, white); color: var(--ink); font-weight: 600; padding: 1px 8px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.card { position: relative; overflow: visible; border-radius: var(--radius); box-shadow: var(--shadow-1); transition: transform 140ms var(--ease-out); }
.card::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.card-main { border-start-start-radius: calc(var(--radius) - 3px); }
.card:has(.card-main:active) { transform: scale(.985); }
.card-main { transition: background-color 140ms ease; }
.thumb-wrap { border-radius: var(--r-s); }
.amt { border-radius: var(--r-s); }
.amt small { font-size: 11px; }
.pi { box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .18), 0 1px 2px rgb(20 22 24 / .18); }
.pill { padding: 3px 10px; border-radius: 10px; }

/* budget bar: separate segments with a hairline between them */
.bar { display: block; block-size: 7px; --bar-dir: to right; --req-seg: var(--brand); --track: color-mix(in srgb, var(--ink) 9%, white);
  background: linear-gradient(var(--bar-dir), var(--g-seg) 0 var(--bar-g), var(--live) 0 calc(var(--bar-g) + var(--bar-l)), var(--req-seg) 0 calc(var(--bar-g) + var(--bar-l) + var(--bar-r)), var(--track) 0);
  transition: --bar-g 300ms var(--ease-in-out), --bar-l 300ms var(--ease-in-out), --bar-r 300ms var(--ease-in-out); }
html[dir="rtl"] .bar { --bar-dir: to left; }
.meter.over .bar { --req-seg: var(--danger); }
.totals b { font-size: 24px; }
.totals b.sm { font-size: 14px; }

/* fields */
.field input, .field select, .field textarea, .inline input, .link-line input, .cell { border-radius: 9px; transition: border-color 140ms ease, box-shadow 160ms ease; }
.field input:focus, .field select:focus, .field textarea:focus, .inline input:focus, .link-line input:focus, .cell:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.link-row { border-radius: var(--radius); background: rgb(255 255 255 / .6); }
.warn { border-radius: var(--r-s); }

/* windows */
dialog { border-radius: var(--r-l); overscroll-behavior: contain; box-shadow: 0 2px 8px rgb(20 22 24 / .12), 0 32px 72px -24px rgb(20 22 24 / .45); opacity: 0; transform: translateY(6px) scale(.975); transition: opacity 130ms ease, transform 130ms var(--ease-out), overlay 130ms allow-discrete, display 130ms allow-discrete; }
dialog[open] { opacity: 1; transform: none; transition-duration: 220ms; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(6px) scale(.975); } }
dialog::backdrop { background: rgb(15 16 18 / 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background-color 180ms ease, backdrop-filter 180ms ease, overlay 180ms allow-discrete, display 180ms allow-discrete; }
dialog[open]::backdrop { background: rgb(15 16 18 / .4); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
@starting-style { dialog[open]::backdrop { background: rgb(15 16 18 / 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } }

.login-card { border-radius: var(--r-l); box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); background: rgb(255 255 255 / .86); }
#toast { border-radius: 12px; inset-block-end: calc(20px + env(safe-area-inset-bottom, 0px)); background: rgb(30 31 33 / .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-2); transition: opacity 180ms ease, translate 240ms var(--ease-out); }

/* Hover belongs to real pointers only; on touch it would stick after a tap. */
@media (hover: hover) and (pointer: fine) {
  .ghost:hover { background: color-mix(in srgb, var(--top-ink) 10%, transparent); }
  .tabs button:hover { opacity: 1; }
  .btn:hover { background: var(--tint); }
  .btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
  html[data-brand="rental"] .btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, white); }
  .mini:hover { background: var(--tint); }
  .card.s-rejected .card-main:hover { background: color-mix(in srgb, var(--rej) 10%, white); }
  .card-main:hover { background: var(--tint); }
  .mini.wa:hover { background: #1EBE5A; }
  .x:hover { background: var(--tint); }
  .btn:hover { box-shadow: 0 2px 6px rgb(20 22 24 / .09); }
  .btn.primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 2px 4px rgb(20 22 24 / .2), 0 14px 28px -12px var(--glow); }
  .btn.primary:hover::after { transform: translateX(120%); transition: transform 640ms var(--ease-out); }
  .mini:hover { border-color: color-mix(in srgb, var(--ink) 55%, white); }
  .mini.go:hover { background-color: var(--subj); border-color: var(--subj); }
  .card:hover { transform: translateY(-1px); }
  .card:hover::after { opacity: 1; }
  .card:hover:has(.card-main:active) { transform: scale(.985); }
  tbody tr:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
}

/* Comfortable targets for fingers, kept compact for a mouse. */
@media (pointer: coarse) {
  .mini { min-block-size: 38px; padding-inline: 11px; font-size: 13px; }
  .ghost, .x { min-block-size: 42px; min-inline-size: 42px; }
  select { min-block-size: 42px; }
  .btn { min-block-size: 44px; }
  .seg button { min-block-size: 36px; }
  .tabs button { min-block-size: 44px; }
  .col-tabs button { min-block-size: 38px; }
  .ao-status { min-block-size: 38px; }
}

@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--top-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog[open]::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(15 16 18 / .55); }
  .login-card { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --rise: 0px; }
  .card, .card:hover, .btn, .mini, .ghost, .x, .seg button, .col-tabs button, .thumb-btn, .line-btn, .rrow { transform: none !important; }
  .tab-ind, .seg-thumb { transition: none; }
  .btn.primary::after { display: none; }
  .bar { transition: none; }
  .shake { animation: none; }
  dialog, dialog[open] { transform: none !important; }
}

@media (max-width: 760px) {
  .top-row { padding: 8px 16px 4px; gap: 8px 10px; }
  .logo { block-size: 26px; }
  .top-tools { margin-inline-start: 0; inline-size: 100%; justify-content: space-between; }
  .tabs { padding-inline: 8px; }
  .page { padding: 14px 16px 40px; }
  .col-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-block-end: 10px; }
  .col-tabs button { flex: none; background: #fff; border: 1px solid var(--line-strong); border-radius: 16px; padding: 5px 12px; font-size: 13px; }
  .col-tabs button[aria-pressed="true"] { background: #232424; color: #fff; border-color: #232424; }
  .col-tabs button[aria-pressed="true"] small { color: #fff; }
  .board { display: block; overflow: visible; }
  .col { display: none; background: none; padding: 0; }
  .col.on { display: block; }
  .col h2 { display: none; }
  .toolbar .btn:first-of-type { margin-inline-start: 0; }
  .toolbar select { flex: 1; min-inline-size: 120px; }
  .grid, .two { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 2px; }
  .totals { gap: 16px; }
  .totals .main { margin-inline-start: 0; text-align: start; }
  dialog { padding: 16px; }
  /* Only the tabs stay pinned on a phone, so the header doesn't eat the screen. */
  .top { display: contents; }
  .top-row { background: var(--top-bg); border-block-start: 4px solid var(--top-line); padding-block-start: calc(8px + env(safe-area-inset-top, 0px)); }
  .tabs { position: sticky; inset-block-start: 0; z-index: 5; background: color-mix(in srgb, var(--top-bg) 84%, transparent); -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px); }
  html[data-brand="auto"] .tabs { box-shadow: 0 1px 0 var(--line); }
  html[data-brand="rental"] .tabs { background: var(--top-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .page { padding-block-end: calc(40px + env(safe-area-inset-bottom, 0px)); }
  /* Windows rise from the bottom edge as sheets. */
  dialog { inline-size: 100%; max-inline-size: 100%; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; max-block-size: calc(100dvh - 24px); padding-block-end: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: opacity 160ms ease, transform 180ms var(--ease-out), overlay 180ms allow-discrete, display 180ms allow-discrete; opacity: 1; }
  dialog[open] { transform: none; transition: transform 340ms var(--ease-drawer); }
  @starting-style { dialog[open] { opacity: 1; transform: translateY(100%); } }
}

/* ---------- Board: Requested is the page, Live and Rejected the record ---------- */
.board { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); overflow: visible; }
.req-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.rail { position: sticky; inset-block-start: calc(var(--head-h, 0px) + 12px); max-block-size: calc(100dvh - var(--head-h, 0px) - 24px); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 12px; align-content: start; scrollbar-width: thin; border-radius: 14px; }
.rail-sec { padding: 6px; }
.rail-sec.s-live { --flash: color-mix(in srgb, var(--live) 75%, white); }
.rail-sec.s-rejected { --flash: color-mix(in srgb, var(--rej) 35%, white); }
.rail-sec h2 { padding: 0; display: block; }
.rail-head { display: flex; align-items: center; gap: 6px; inline-size: 100%; border: 0; background: none; padding: 6px; border-radius: 8px; text-align: start; color: var(--ink); font: 600 13px/1.2 var(--head-font); }
.rail-total { margin-inline-start: auto; font: 600 12px/1.2 var(--body-font); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chev { flex: none; inline-size: 14px; block-size: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); transition: transform 160ms var(--ease-out); }
.rail-sec.closed .chev { transform: none; }
html[dir="rtl"] .rail-sec.closed .chev { transform: scaleX(-1); }
.rail-sec.closed .rail-body { display: none; }
.rail-body { gap: 3px; padding-block-start: 4px; }
.rail-more { justify-self: start; font-size: 12px; padding: 6px; }

/* compact row: one line, opens the same window as a card */
.rrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; inline-size: 100%; min-block-size: 40px; padding: 5px 8px; border: 0; border-inline-start: 3px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-align: start; color: var(--ink); transition: transform 120ms var(--ease-out); }
.rrow.s-live { border-inline-start-color: var(--live); }
.rrow.s-rejected { border-inline-start-color: var(--rej); background: var(--rej-bg); }
.rrow .pi { inline-size: 22px; block-size: 22px; border-radius: 6px; }
.rrow .pi svg { inline-size: 12px; block-size: 12px; }
.rrow-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow-amt { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--brand-text); white-space: nowrap; }
.rrow-amt .riyal { block-size: 11px; }
.rrow-date { font-size: 12px; color: var(--muted); white-space: nowrap; min-inline-size: 40px; text-align: end; }
.rrow-reason { grid-column: 2 / -1; font-size: 12px; color: var(--rej-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.rrow:active { transform: scale(.985); }
.rrow.extra { display: none; }
.rrow.flash, .rail-head.flash { animation: flash 600ms ease both; }
@keyframes flash { from { background-color: var(--flash); } }
@media (hover: hover) and (pointer: fine) {
  .rrow:hover, .rail-head:hover { background-color: var(--tint); }
  .rrow.s-rejected:hover { background-color: color-mix(in srgb, var(--rej) 10%, white); }
}
@media (pointer: coarse) { .rrow { min-block-size: 44px; } .rail-head { min-block-size: 40px; } }

/* empty queue */
.caught { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 40px 0 44px; color: var(--muted); font-weight: 500; }
.check { inline-size: 44px; block-size: 44px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke: var(--live); }
.check path { stroke: #2F7A47; }
.check.draw circle, .check.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 500ms var(--ease-out) forwards; animation-delay: inherit; }
.check.draw path { animation-name: draw-late; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes draw-late { 0%, 35% { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* loading: progress line under the header, skeletons in the board */
.tabs-bar { position: relative; }
.progress { position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 2px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
html.is-loading .progress { opacity: 1; }
.progress::before { content: ""; position: absolute; inset-block: 0; left: 0; inline-size: 40%; background: var(--tab-ind); animation: progress 1.2s var(--ease-in-out) infinite; }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes pulse { 50% { opacity: .4; } }
.skel { pointer-events: none; }
.card.skel { display: grid; gap: 9px; padding: 14px; border-inline-start-color: var(--line); }
.card.skel::after { display: none; }
.sk { display: block; block-size: 10px; border-radius: 5px; --sk: color-mix(in srgb, var(--ink) 8%, white); --sk-hi: color-mix(in srgb, var(--ink) 3%, white);
  background: linear-gradient(90deg, var(--sk) 0 40%, var(--sk-hi) 50%, var(--sk) 60% 100%) 0 0 / 300% 100%; animation: shimmer 1.2s linear infinite; }
.sk.w40 { inline-size: 40%; } .sk.w55 { inline-size: 55%; } .sk.w70 { inline-size: 70%; } .sk.tall { block-size: 34px; }
.rrow.skel .sk { grid-column: 1 / -1; inline-size: 80%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* entrances: keyed to data-enter, so a save or a filter never replays them */
:root { --rise: 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(var(--rise)); } }
@keyframes fade { from { opacity: 0; } }
.page[data-enter="first"] > :not(.board), .page[data-enter="first"] .rail, .page[data-enter="first"] .req-grid > .card.stg { animation: rise 260ms var(--ease-out) both; }
.page[data-enter="first"] > :nth-child(2) { animation-delay: 40ms; }
.page[data-enter="first"] > :nth-child(3) { animation-delay: 80ms; }
.page[data-enter="first"] > :nth-child(n+4) { animation-delay: 120ms; }
.page[data-enter="first"] .col-req { animation: fade 260ms ease both 80ms; }
.page[data-enter="first"] .rail { animation-delay: 120ms; }
.page[data-enter="first"] .req-grid > .card.stg { animation-delay: calc(120ms + var(--i) * 40ms); }
.page[data-enter="view"] { animation: fade 140ms ease both; }
/* a tab change: the page's blocks rise in one after another (never on saves or filters) */
.page[data-enter="view"] > :not(.rp):nth-child(-n+6) { animation: rise 260ms var(--ease-out) both; --rise: 10px; }
.page[data-enter="view"] > :nth-child(2) { animation-delay: 40ms; } .page[data-enter="view"] > :nth-child(3) { animation-delay: 80ms; }
.page[data-enter="view"] > :nth-child(4) { animation-delay: 120ms; } .page[data-enter="view"] > :nth-child(5) { animation-delay: 160ms; } .page[data-enter="view"] > :nth-child(6) { animation-delay: 200ms; }
/* budget bars by tag grow from the start edge on entry */
.page[data-enter] .tagbar i { transform-origin: left; animation: grow-x 600ms var(--ease-out) both 120ms; }
html[dir="rtl"] .page[data-enter] .tagbar i { transform-origin: right; }
@keyframes grow-x { from { transform: scaleX(0); } }
/* the budget gauges fill from empty on sign-in, refresh and tab entry */
.strip-wrap.fill .ring .sg { transition-delay: calc(var(--k, 0) * 70ms + 120ms); }
/* blocks further down long pages reveal as they scroll in, and again each time they come back */
.sr { transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.sr:not(.sr-in) { opacity: 0; transform: translateY(16px); transition: none; }
.sr-now, .sr-now * { transition: none !important; }
@media (hover: hover) and (pointer: fine) {
  html[data-theme] :is(.panel, .totals, .table-wrap):not(.rp *):hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--stroke)); }
}
@media (prefers-reduced-motion: reduce) { .sr:not(.sr-in) { transform: none; } .page[data-enter="view"] > * { --rise: 0px; } .page[data-enter] .tagbar i { animation: none; } }
.login-card.rise { animation: rise 300ms var(--ease-out) both; --rise: 10px; }

/* sign-in feedback */
.shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::before { content: ""; position: absolute; inset: 0; margin: auto; inline-size: 16px; block-size: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--on-brand) 35%, transparent); border-block-start-color: var(--on-brand); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* thumbnails fade in once loaded */
img.thumb, .post-preview img, img.form-thumb { opacity: 0; transition: opacity 200ms ease; }
img.thumb.loaded, .post-preview img.loaded, img.form-thumb.loaded { opacity: 1; }

/* copy confirms on the button; the window crossfades its content */
.swap { display: inline-flex; align-items: center; gap: inherit; animation: swap-in 120ms ease-out; }
.mini.is-copied { justify-content: center; }
@keyframes swap-in { from { opacity: 0; filter: blur(2px); } }
dialog.dlg-swap > * { animation: swap-in 150ms ease-out; }

/* a card leaving Requested: the others slide to close the gap */
::view-transition { pointer-events: none; }
::view-transition-group(*) { animation-duration: 200ms; animation-timing-function: var(--ease-out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
html[data-vt="brand"] .card { view-transition-name: none !important; }

/* soft edges on scrollers, only on a side with more to see */
.tabs[data-edges], .table-wrap[data-edges] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%); }
.rail[data-edges] { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-t, 0px), #000 calc(100% - var(--fade-b, 0px)), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-t, 0px), #000 calc(100% - var(--fade-b, 0px)), transparent 100%); }

@property --bar-g { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --bar-l { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --bar-r { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

@media (max-width: 760px) {
  .board { display: block; }
  .rail { display: contents; }
  .req-grid { grid-template-columns: 1fr; }
  .rail-sec h2 { display: none; }
  .rail-sec { padding: 0; box-shadow: none; }
  .rail-body { padding-block-start: 0; }
  .rail-sec.closed .rail-body { display: grid; }
  .rrow.extra { display: grid; }
  .rail-more { display: none; }
  .tabs { position: relative; inset-block-start: auto; }
  .tabs-bar { position: sticky; inset-block-start: 0; z-index: 5; }
}

@media (prefers-reduced-motion: reduce) {
  .sk, .progress::before, .btn[aria-busy="true"]::before { animation: pulse 1.2s ease-in-out infinite; }
  .progress::before { inline-size: 100%; transform: none; }
  .chev { transition: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  dialog { opacity: 0; transition: opacity 160ms ease, overlay 160ms allow-discrete, display 160ms allow-discrete; }
  dialog[open] { opacity: 1; transition: opacity 200ms ease; }
  @starting-style { dialog[open] { opacity: 0; } }
}

/* The printed influencer request. Everything else on the page is left out. */
#print-sheet { display: none; }
@media print {
  @page { size: A4; margin: 16mm; }
  html, body { background: #fff; }
  body::before, body > *:not(#print-sheet) { display: none !important; }
  #print-sheet { display: block; color: #000; font-size: 12pt; line-height: 1.5; }
  .ps-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block-end: 12px; border-block-end: 2px solid #000; margin-block-end: 14px; }
  .ps-head img { block-size: 44px; inline-size: auto; }
  .ps-head div { text-align: end; }
  .ps-head h1 { font-size: 18pt; }
  .ps-head p { color: #444; }
  #print-sheet h2 { font-size: 13pt; margin-block: 16px 6px; }
  #print-sheet table { inline-size: 100%; border-collapse: collapse; }
  #print-sheet th, #print-sheet td { padding: 7px 0; border-block-end: 1px solid #ccc; text-align: start; vertical-align: top; }
  #print-sheet tr { break-inside: avoid; }
  #print-sheet th { inline-size: 30%; padding-inline-end: 12px; font-weight: 600; }
  #print-sheet td { overflow-wrap: anywhere; white-space: pre-wrap; }
  #print-sheet td div { white-space: normal; }
  #print-sheet a { color: #0B57D0; text-decoration: underline; }
  #print-sheet svg { block-size: .8em; inline-size: auto; fill: currentColor; }
}

/* =====================================================================
   FUTURE LAYER: dark and light themes, atmosphere, glass shell, gauges,
   reactive cards, side sheet, command palette. Everything above is the
   structure; everything below is the look.
   ===================================================================== */
html[data-theme] {
  --spring: linear(0, .35 8%, .82 20%, 1.04 32%, 1.02 44%, 1 60%, 1);
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --accent: #C9D2DC; --accent-a: #E3E8ED; --accent-b: #AEB8C2; --on-accent: #15171A;
  --ink: var(--text); --muted: var(--text-2); --tint: color-mix(in srgb, var(--text) 7%, transparent);
  --line: var(--stroke); --line-strong: color-mix(in srgb, var(--text) 18%, transparent); --canvas: var(--bg);
  --brand: var(--accent-b); --on-brand: var(--on-accent); --brand-text: var(--accent); --subj: var(--accent-b);
  --top-bg: transparent; --top-ink: var(--text); --top-line: transparent; --focus: var(--accent); --tab-ind: var(--accent);
  --glow: color-mix(in srgb, var(--accent) 45%, transparent); --amt-bg: color-mix(in srgb, var(--accent) 11%, transparent);
  --g-seg: color-mix(in srgb, var(--text) 42%, transparent);
  --radius: 18px; --r-s: 10px; --r-l: 24px;
  --glass: blur(24px) saturate(160%);
  background: var(--bg);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080A; --bg-2: #101317; --panel: rgb(255 255 255 / .045); --card: rgb(22 25 30 / .74); --field: rgb(255 255 255 / .055);
  --stroke: rgb(255 255 255 / .09); --stroke-hi: rgb(255 255 255 / .15);
  --text: #F2F4F5; --text-2: rgb(242 244 245 / .62);
  --live: #5BE38F; --rej: #FF9A3D; --rej-bg: rgb(255 154 61 / .08); --rej-ink: #FFB877;
  --warn-bg: rgb(255 190 80 / .13); --warn-ink: #FFD08A; --danger: #FF6A5E;
  --shadow-1: 0 18px 40px -26px rgb(0 0 0 / .9); --shadow-2: 0 34px 70px -30px rgb(0 0 0 / .95);
  --orb-o: .26; --grid-c: rgb(255 255 255 / .045); --ptr-o: .11; --grain-o: .07;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ECEEF2; --bg-2: #FFFFFF; --panel: rgb(255 255 255 / .62); --card: rgb(255 255 255 / .9); --field: rgb(255 255 255 / .8);
  --stroke: rgb(20 22 24 / .09); --stroke-hi: rgb(255 255 255 / .95);
  --text: #1B1C1E; --text-2: rgb(27 28 30 / .62);
  --live: #17914D; --rej: #C96A10; --rej-bg: rgb(201 106 16 / .07); --rej-ink: #9A4F08;
  --warn-bg: #FFF1DA; --warn-ink: #7A4A00; --danger: #B3261E;
  --shadow-1: 0 1px 2px rgb(20 22 24 / .04), 0 18px 36px -24px rgb(20 22 24 / .28); --shadow-2: 0 30px 60px -30px rgb(20 22 24 / .4);
  --orb-o: .34; --grid-c: rgb(20 22 24 / .05); --ptr-o: .16; --grain-o: .05;
}
html[data-theme="dark"][data-brand="auto"] { --accent: #FF5A4D; --accent-a: #D61616; --accent-b: #9F0202; --on-accent: #fff; }
html[data-theme="light"][data-brand="auto"] { --accent: #9F0202; --accent-a: #C81212; --accent-b: #9F0202; --on-accent: #fff; }
html[data-theme="dark"][data-brand="rental"] { --accent: #9EC3E7; --accent-a: #BFDAF2; --accent-b: #9EC3E7; --on-accent: #221F20; }
html[data-theme="light"][data-brand="rental"] { --accent: #2A6AA3; --accent-a: #BFDAF2; --accent-b: #9EC3E7; --on-accent: #221F20; --text: #221F20; }

html[data-theme] body { color: var(--text); }
html[data-theme] body::before { display: none; }
html[data-theme] :focus-visible { outline-color: var(--accent); }
html[data-theme]:not([lang="ar"]) .lbl, html[data-theme]:not([lang="ar"]) .col h2 > span, html[data-theme]:not([lang="ar"]) .rail-head > span:first-of-type, html[data-theme]:not([lang="ar"]) thead th { text-transform: uppercase; letter-spacing: .08em; }
.lbl { font-size: 11px; font-weight: 600; color: var(--text-2); }
html[data-theme] :is(.big, .amt b, .rrow-amt, .rrow-date, td.n, .count, .totals b, .date, .cell, .col h2 small, .rail-head small, .rail-total, .s-money, .req-amt, kbd) { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
html[data-theme] h1 { font-size: 34px; }

/* atmosphere */
.atmo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.atmo i { position: absolute; display: block; }
.orb { inline-size: 62vw; aspect-ratio: 1; border-radius: 50%; opacity: var(--orb-o); will-change: transform; }
.o1 { inset-block-start: -30vw; left: -18vw; background: radial-gradient(circle, var(--accent) 0, transparent 62%); animation: drift-a 50s ease-in-out infinite alternate; }
.o2 { inset-block-end: -34vw; right: -20vw; background: radial-gradient(circle, var(--accent-b) 0, transparent 62%); animation: drift-b 70s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(22vw, 12vw, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-18vw, -14vw, 0) scale(.9); } }
.atmo-grid { inset: 0; background: linear-gradient(var(--grid-c) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, var(--grid-c) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 85%); mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 85%); }
.atmo-ptr { top: 0; left: 0; inline-size: 600px; block-size: 600px; border-radius: 50%; opacity: var(--ptr-o); background: radial-gradient(circle, var(--accent) 0, transparent 65%); transform: translate3d(calc(50vw - 300px), -200px, 0); will-change: transform; }
.atmo-grain { inset: 0; opacity: var(--grain-o); mix-blend-mode: overlay; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* floating glass header with a sliding, glowing navigation pill */
html[data-theme] .top { position: sticky; inset-block-start: 12px; z-index: 20; margin: 12px 12px 0; padding: 8px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-radius: 22px; color: var(--text);
  background: var(--panel); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--stroke-hi), var(--shadow-2); }
html[data-theme] .top-row { display: contents; }
html[data-theme] .logo { block-size: 30px; }
html[data-theme="dark"] .logo { filter: brightness(0) invert(1); }
html[data-theme] .tabs-bar { order: 2; margin-inline: auto; min-inline-size: 0; }
html[data-theme] .top-tools { order: 3; margin-inline-start: 0; gap: 4px; }
html[data-theme] .tabs { padding: 4px; gap: 2px; border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 1px var(--stroke); }
html[data-theme] .tabs button { z-index: 1; padding: 7px 15px; border-radius: 999px; opacity: 1; color: var(--text-2); font-weight: 500; -webkit-text-stroke: 0; transition: color 200ms ease; }
html[data-theme] .tabs button[aria-current] { color: var(--on-accent); font-weight: 600; }
html[data-theme] .tab-ind { inset-block: 4px; block-size: auto; border-radius: 999px; background: linear-gradient(180deg, var(--accent-a), var(--accent-b)); box-shadow: 0 0 24px -2px var(--glow), inset 0 1px 0 rgb(255 255 255 / .32);
  transition: transform 300ms var(--spring), width 300ms var(--spring); }
html[data-theme] .tab-ind.instant { transition: none; }
html[data-theme] .count { background: var(--accent); color: var(--on-accent); }
html[data-theme] .tabs button[aria-current] .count { background: rgb(0 0 0 / .24); color: inherit; }
html[data-theme] .progress { inset-inline: 14px; }
html[data-theme] .seg { border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 1px var(--stroke); }
html[data-theme] .seg button { border-radius: 999px; color: var(--text-2); }
html[data-theme] .seg button[aria-pressed="true"] { color: var(--bg); }
html[data-theme] .seg-thumb { border-radius: 999px; background: var(--text); box-shadow: 0 2px 10px -2px rgb(0 0 0 / .4); transition: transform 300ms var(--spring); }
html[data-theme] select { background-color: var(--field); border-color: var(--line-strong); color: var(--text); border-radius: 12px; }
html[data-theme] .top .ghost, html[data-theme] .ghost { color: var(--text-2); font-weight: 500; -webkit-text-stroke: 0; border-radius: 12px; }
html[data-theme] .ghost svg { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.icon-btn, .kbd-hint { display: inline-flex; align-items: center; gap: 6px; }
html[data-theme="dark"] .ghost .i-moon, html[data-theme="light"] .ghost .i-sun { display: none; }
kbd { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--tint); color: var(--text-2); }
html[data-theme] .page { padding-block-start: 22px; }

/* budget hero: gauges and stat tiles on one glass panel */
html[data-theme] .strip-wrap { padding: 16px 18px 18px; border-radius: 24px; background: var(--panel); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--stroke-hi), var(--shadow-1); }
html[data-theme] .strip { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: stretch; }
html[data-theme] .meter { flex: 1 1 290px; display: flex; align-items: center; gap: 18px; padding: 4px; background: none; border: 0; box-shadow: none; }
.ring-wrap { position: relative; flex: none; inline-size: 136px; }
html[data-theme] .ring { display: block; inline-size: 100%; block-size: auto; margin: 0; background: none; border-radius: 0; overflow: visible; transform: rotate(135deg); filter: drop-shadow(0 0 9px var(--glow)); transition: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .trk { stroke: var(--line-strong); stroke-dasharray: 100 133.34; stroke-linecap: round; opacity: .55; }
.ring .sg { transition: stroke-dasharray 700ms var(--spring), stroke-dashoffset 700ms var(--spring); }
.ring .sg.g { stroke: var(--g-seg); } .ring .sg.l { stroke: var(--live); } .ring .sg.b { stroke: var(--accent); }
.meter.over .ring .sg.b { stroke: var(--danger); }
.ring-mid { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center; }
.ring-mid b { font: 600 30px/1 var(--mono); letter-spacing: -.03em; }
.ring-mid i { font-style: normal; font-size: 14px; color: var(--text-2); margin-inline-start: 1px; }
.ring-mid span { font-size: 11px; font-weight: 600; color: var(--text-2); }
html[data-theme] .meter-head { display: grid; justify-content: start; gap: 3px; }
html[data-theme] .meter-head .big { font-size: 34px; line-height: 1; font-weight: 600; color: var(--text); letter-spacing: -.03em; }
html[data-theme] .meter-head .of { font: 500 13px var(--mono); color: var(--text-2); }
html[data-theme] .meter-foot { margin-block-start: 8px; font-size: 12px; }
.tiles { flex: 2 1 420px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; overflow: hidden; display: grid; align-content: space-between; gap: 8px; min-block-size: 112px; padding: 14px; border-radius: 18px; background: var(--field); box-shadow: inset 0 0 0 1px var(--stroke); }
.tile .big { font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -.03em; }
.tile small { font: 500 12px var(--mono); color: var(--text-2); }
.t-req .big { color: var(--accent); } .t-live .big { color: var(--live); } .t-rej .big { color: var(--rej); }
html[data-theme] .key i.b { background: var(--accent); }

/* light that follows the cursor across any surface */
:is(.tile, .rrow, .panel, .totals)::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 240ms ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
:is(.tile, .rrow, .panel, .totals).lit::before { opacity: 1; }
html[data-theme] :is(.panel, .totals) { position: relative; overflow: hidden; }

/* request cards */
html[data-theme] .card { background: var(--card); border: 1px solid var(--stroke); border-radius: 20px; box-shadow: var(--shadow-1);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 260ms var(--ease-out); }
html[data-theme] .card.lit { background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--card); }
html[data-theme] .card::before { content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 240ms ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--accent), transparent 72%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
html[data-theme] .card.lit::before { opacity: 1; }
html[data-theme] .card.s-requested .card-grid::before { content: ""; position: absolute; inset-block: 18px; inset-inline-start: -1px; inline-size: 3px; border-radius: 3px; background: var(--accent);
  opacity: calc(.28 + .72 * var(--heat, 0)); box-shadow: 0 0 calc(14px * var(--heat, 0)) var(--accent); }
html[data-theme] .card-main { padding: 16px 18px 8px; color: var(--text); border-radius: inherit; gap: 7px; }
html[data-theme] .card-main:hover { background: none; }
html[data-theme] .card-actions { padding: 0 18px 14px; gap: 6px; }
html[data-theme] .subj-tag { font-size: 16px; font-family: var(--head-font); color: var(--text); }
html[data-theme] .amt { padding: 6px 12px 7px; border-radius: 12px; background: var(--amt-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent); }
html[data-theme] .amounts .amt b { font-size: 20px; font-weight: 600; color: var(--accent); }
.age { font-style: normal; color: var(--accent); font-weight: 600; }
html[data-theme] .chip { border-color: var(--line-strong); color: var(--text-2); }
html[data-theme] .card-side { padding: 14px; padding-inline-start: 0; }
html[data-theme] .card-side .thumb-wrap { inline-size: 86px; border-radius: 14px; box-shadow: 0 12px 24px -12px rgb(0 0 0 / .7), 0 0 0 1px var(--stroke); }
html[data-theme] .pi { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16), 0 2px 8px -2px rgb(0 0 0 / .5); border-radius: 8px; }

/* buttons */
html[data-theme] .btn { border-radius: 999px; padding-inline: 18px; background: var(--field); border-color: var(--line-strong); color: var(--text); box-shadow: none; }
html[data-theme] :is(.btn.primary, .mini.go, .plan-use) { background: linear-gradient(180deg, var(--accent-a), var(--accent-b)); border-color: transparent; color: var(--on-accent); font-weight: 600;
  box-shadow: 0 0 22px -4px var(--glow), inset 0 1px 0 rgb(255 255 255 / .32); }
html[data-theme] .btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
html[data-theme] .mini { border-radius: 999px; padding-inline: 11px; background: var(--field); border-color: var(--line-strong); color: var(--text); }
html[data-theme] .mini.wa { background: #25D366; border-color: #25D366; color: #fff; }
html[data-theme] .link { color: var(--text-2); }
html[data-theme] .line-btn { background: var(--field); border-color: var(--line-strong); color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  html[data-theme] .btn:not(.primary):hover, html[data-theme] .mini:not(.go, .wa, .plan-use):hover { background: var(--tint); border-color: color-mix(in srgb, var(--text) 34%, transparent); box-shadow: none; }
  html[data-theme] :is(.btn.primary, .mini.go, .plan-use):hover { background: linear-gradient(180deg, var(--accent-a), var(--accent-b)); filter: brightness(1.12); box-shadow: 0 0 30px -2px var(--glow), inset 0 1px 0 rgb(255 255 255 / .36); }
  html[data-theme] .rrow.s-rejected:hover { background-color: var(--tint); }
  html[data-theme] tbody tr:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
}

/* board columns and the side rail */
html[data-theme] .col { background: none; box-shadow: none; padding: 0; border-radius: 0; }
html[data-theme] .col h2 { padding: 2px 4px 12px; }
html[data-theme] .col h2 > span { font-size: 11px; color: var(--text-2); }
html[data-theme] :is(.col h2 small, .rail-head small) { background: var(--tint); color: var(--text); padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
html[data-theme] .rail-sec { padding: 8px; border-radius: 20px; background: var(--panel); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--stroke-hi); }
html[data-theme] .rail-sec.s-live { --flash: color-mix(in srgb, var(--live) 30%, transparent); }
html[data-theme] .rail-sec.s-rejected { --flash: color-mix(in srgb, var(--rej) 30%, transparent); }
html[data-theme] .rail-sec h2 { padding: 0; }
html[data-theme] .rail-head { color: var(--text); border-radius: 12px; padding: 8px; font-size: 11px; }
.rail-sec.s-live .rail-head > span:first-of-type::before, .rail-sec.s-rejected .rail-head > span:first-of-type::before { content: ""; display: inline-block; inline-size: 7px; block-size: 7px; border-radius: 50%; margin-inline-end: 8px; background: var(--live); vertical-align: 1px; }
.rail-sec.s-rejected .rail-head > span:first-of-type::before { background: var(--rej); }
.rail-sec.s-live .rail-head > span:first-of-type::before { animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
html[data-theme] .rrow { position: relative; overflow: hidden; background: none; box-shadow: none; border-inline-start: 0; border-radius: 12px; color: var(--text); padding: 6px 10px; }
html[data-theme] .rrow.s-rejected { background: none; }
html[data-theme] .rrow-amt { color: var(--text); }
html[data-theme] .check path { stroke: var(--live); }
html[data-theme] .caught { padding-block: 64px; font-size: 16px; color: var(--text-2); }
html[data-theme] .check { inline-size: 64px; block-size: 64px; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--live) 55%, transparent)); }
html[data-theme] .sk { --sk: var(--tint); --sk-hi: color-mix(in srgb, var(--text) 14%, transparent); }
html[data-theme] .col-tabs button { background: var(--field); border-color: var(--line-strong); color: var(--text); }
html[data-theme] .col-tabs button[aria-pressed="true"] { background: var(--text); border-color: transparent; color: var(--bg); }
html[data-theme] .col-tabs button[aria-pressed="true"] small { color: inherit; }

/* panels, tables, fields */
html[data-theme] :is(.totals, .panel, .table-wrap, .review li, .loc-card, .plan-match, .link-row, .plan-banner) { background: var(--panel); border-color: var(--stroke); color: var(--text); border-radius: 20px; box-shadow: inset 0 1px 0 var(--stroke-hi), var(--shadow-1); }
html[data-theme] .table-wrap.flat { background: none; box-shadow: none; border-radius: 0; }
html[data-theme] .totals { padding: 18px 22px; gap: 36px; }
html[data-theme] .totals b { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
html[data-theme] .totals b.sm { font-size: 14px; }
html[data-theme] .totals .main b { color: var(--accent); }
html[data-theme] :is(th, td) { padding-block: 13px; }
html[data-theme] thead th { font-size: 11px; }
html[data-theme] :is(.cell, .field input, .field select, .field textarea, .inline input, .link-line input) { background: var(--field); border-color: var(--line-strong); color: var(--text); border-radius: 12px; }
html[data-theme] .tags input { color: var(--text); }
html[data-theme] .tags input:is(:hover, :focus) { background: var(--field); }
html[data-theme] :is(.cell, .field input, .field select, .field textarea, .inline input, .link-line input, select):focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 24px -6px var(--glow); }
html[data-theme] .pill { background: var(--tint); color: var(--text); }
html[data-theme] :is(.pill.s-live, .pill.r-approved, .ao-status.ds-approved) { background: color-mix(in srgb, var(--live) 18%, transparent); color: var(--live); border-color: transparent; }
html[data-theme] :is(.pill.s-requested, .pill.r-pending) { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
html[data-theme] :is(.pill.s-rejected, .pill.r-declined) { background: color-mix(in srgb, var(--rej) 18%, transparent); color: var(--rej); }
html[data-theme] .ao-status.lv-very_high { background: linear-gradient(180deg, var(--accent-a), var(--accent-b)); color: var(--on-accent); border-color: transparent; box-shadow: 0 0 16px -4px var(--glow); }
html[data-theme] .tagbar i { block-size: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--accent-b), var(--accent)); box-shadow: 0 0 12px -2px var(--glow); }
html[data-theme] .x { color: var(--text-2); }

/* windows: a glass sheet from the side on a wide screen */
html[data-theme] dialog { color: var(--text); background: color-mix(in srgb, var(--bg-2) 95%, transparent); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--stroke-hi), 0 40px 100px -30px rgb(0 0 0 / .75); }
html[data-theme="dark"] dialog[open]::backdrop { background: rgb(0 0 0 / .55); }
@media (min-width: 761px) {
  html[data-theme] #dlg { --sdir: 1; margin: 12px; margin-inline-start: auto; block-size: calc(100dvh - 24px); max-block-size: none; inline-size: min(600px, calc(100vw - 24px)); padding: 26px; border-radius: 26px;
    transform: translateX(calc(var(--sdir) * 56px)); transition: opacity 180ms ease, transform 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
  html[data-theme][dir="rtl"] #dlg { --sdir: -1; }
  html[data-theme] #dlg[open] { transform: none; transition: opacity 240ms ease, transform 420ms var(--ease-drawer), overlay 420ms allow-discrete, display 420ms allow-discrete; }
  @starting-style { html[data-theme] #dlg[open] { opacity: 0; transform: translateX(calc(var(--sdir) * 56px)); } }
  html[data-theme] .dlg-head h2 { font-size: 24px; }
}
html[data-theme] .post-preview { border-radius: 18px; background: var(--tint); }
html[data-theme] .post-preview img { max-block-size: 340px; }
html[data-theme] .row { border-color: var(--stroke); padding-block: 11px; }

/* command palette */
#pal, #pal[open] { inline-size: min(600px, calc(100vw - 24px)); margin-block-start: 14vh; padding: 0; overflow: hidden; border-radius: 22px; opacity: 1; transform: none; transition: none; }
#pal input { display: block; inline-size: 100%; padding: 19px 22px; border: 0; border-block-end: 1px solid var(--stroke); background: none; color: var(--text); font-size: 17px; outline: none; box-shadow: none; }
.pal-list { display: grid; gap: 2px; padding: 8px; max-block-size: 48vh; overflow-y: auto; overscroll-behavior: contain; }
.pal-item { display: flex; align-items: center; gap: 12px; inline-size: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: none; color: var(--text); text-align: start; font-weight: 500; }
.pal-item small { margin-inline-start: auto; font: 500 12px var(--mono); color: var(--text-2); white-space: nowrap; }
.pal-item > span[dir] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item.on { background: var(--tint); box-shadow: inset 0 0 0 1px var(--stroke); }
.pal-dot { flex: none; inline-size: 7px; block-size: 7px; margin-inline: 9px 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

html[data-theme] #toast { background: color-mix(in srgb, var(--bg-2) 88%, transparent); color: var(--text); border: 1px solid var(--stroke); border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow-2); }
html[data-theme] #toast.bad { background: var(--danger); color: #fff; }

/* sign-in */
html[data-theme] .login-card { padding: 40px 34px; border-radius: 30px; gap: 14px; background: var(--panel); border-color: var(--stroke); color: var(--text); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); box-shadow: inset 0 1px 0 var(--stroke-hi), var(--shadow-2); }
html[data-theme] .login-card h1 { font-size: 32px; }
html[data-brand=""] .orb { opacity: calc(var(--orb-o) * .8); }

@media (max-width: 760px) {
  html[data-theme] .top { display: contents; }
  html[data-theme] .top-row { display: flex; margin: 10px 10px 0; padding: 8px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--stroke); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
  html[data-theme] .top-tools { inline-size: auto; margin-inline-start: auto; }
  html[data-theme] .kbd-hint kbd, html[data-theme] [data-a="logout"] { display: none; }
  html[data-theme] .tabs-bar { position: fixed; inset-inline: 10px; inset-block: auto calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30; margin: 0; border-radius: 999px; background: var(--panel); border: 1px solid var(--stroke);
    -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); box-shadow: inset 0 1px 0 var(--stroke-hi), var(--shadow-2); }
  html[data-theme] .tabs { background: none; box-shadow: none; }
  html[data-theme] .tabs button { flex: 1 0 auto; padding-inline: 12px; font-size: 13px; }
  html[data-theme] .page { padding-block-end: calc(110px + env(safe-area-inset-bottom, 0px)); }
  html[data-theme] #toast { inset-block-end: calc(84px + env(safe-area-inset-bottom, 0px)); }
  html[data-theme] .strip-wrap { padding: 12px; border-radius: 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; }
  .ring-wrap { inline-size: 112px; }
  html[data-theme] .rail-sec { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html[data-theme] .rrow { background: var(--card); box-shadow: inset 0 0 0 1px var(--stroke); }
  html[data-theme] h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .orb, .rail-sec .rail-head > span::before { animation: none !important; }
  .ring .sg, html[data-theme] .tab-ind, html[data-theme] .seg-thumb { transition: none; }
  .atmo-ptr { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  html[data-theme] :is(.top, .top-row, .tabs-bar, .strip-wrap, .rail-sec, dialog, .login-card, .totals, .panel, .table-wrap) { background: var(--bg-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media print { html[data-theme] { background: #fff; color-scheme: light; } .atmo { display: none; } }

/* Plan, Budgets, Google, Needs review: status and level controls read as glowing pills */
html[data-theme] .ao-status { border-radius: 999px; padding: 3px 10px; min-block-size: 30px; background-color: var(--field); border-color: var(--line-strong); font-weight: 600; }
html[data-theme] .ao-status.lv-high { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
html[data-theme] .ao-status.lv-low, html[data-theme] .ao-status.st-paused { color: var(--text-2); }
html[data-theme] .ao-status:is(.lv-none, .st-ended, .ds-not_started) { color: var(--text-2); border-color: var(--stroke); font-weight: 500; }
html[data-theme] .ao-status.st-active { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, transparent); box-shadow: 0 0 14px -6px var(--live); }
html[data-theme] .ao-status.st-pending, html[data-theme] .ao-status.ds-requested { color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 45%, transparent); }
html[data-theme] .ao-status.ds-in_design { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.mb { display: block; block-size: 3px; margin-block-start: 6px; border-radius: 2px; background: var(--tint); overflow: hidden; min-inline-size: 48px; }
.mb i { display: block; block-size: 100%; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.mb.over i { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
html[data-theme] .search-list details.panel { padding: 16px 18px; transition: box-shadow 200ms ease, border-color 200ms ease; }
html[data-theme] .search-list details[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: inset 0 1px 0 var(--stroke-hi), 0 0 34px -14px var(--glow), var(--shadow-1); }
html[data-theme] .search-list summary { align-items: center; list-style: none; }
html[data-theme] .search-list summary::-webkit-details-marker { display: none; }
html[data-theme] .s-name { font-size: 16px; font-family: var(--head-font); }
html[data-theme] .s-name::before { content: ""; display: inline-block; inline-size: 7px; block-size: 7px; margin-inline-end: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); vertical-align: 2px; }
html[data-theme] .s-money { font-size: 14px; color: var(--text); }
html[data-theme] .kv h4 { font-size: 11px; color: var(--text-2); }
html[data-theme] .review li { padding-inline-end: 16px; }
html[data-theme] .empty.big { padding: 90px 0; font-size: 15px; }
html[data-theme] .sec { margin-block: 26px 12px; font-size: 11px; color: var(--text-2); }
html[data-theme]:not([lang="ar"]) .sec { text-transform: uppercase; letter-spacing: .08em; }
html[data-theme] .req-row { border-color: var(--stroke); }

/* =====================================================================
   BRAND REBALANCE (Auto guideline): greys and charcoal are primary,
   red is a secondary digital colour, used small. Plain background.
   ===================================================================== */
html[data-theme] { --spot: var(--accent); --on-spot: var(--on-accent); --glow: color-mix(in srgb, var(--accent) 20%, transparent); }
html[data-theme="dark"] { --bg: #1A1B1B; --bg-2: #232424; --card: rgb(40 41 41 / .82); --text: #F4F5F5; --text-2: rgb(207 213 211 / .68); --ptr-o: .07; }
html[data-theme="light"] { --bg: #ECEEED; --text: #232424; --text-2: rgb(35 36 36 / .62); --ptr-o: .06; }
html[data-theme="dark"][data-brand="auto"] { --accent: #CFD5D3; --accent-a: #E4E8E6; --accent-b: #B4B9B7; --on-accent: #232424; --spot: #BD0000; --on-spot: #fff; }
html[data-theme="light"][data-brand="auto"] { --accent: #232424; --accent-a: #3B3C3C; --accent-b: #232424; --on-accent: #fff; --spot: #9F0202; --on-spot: #fff; }
.atmo .orb, .atmo .atmo-grid, .atmo .atmo-grain { display: none; }
.atmo-ptr { inline-size: 440px; block-size: 440px; background: radial-gradient(circle, var(--spot) 0, transparent 65%); }
html[data-theme] .count { background: var(--spot); color: var(--on-spot); }
.ring .sg.b { stroke: var(--spot); }
html[data-theme] .key i.b { background: var(--spot); }
html[data-theme] .card.s-requested .card-grid::before { background: var(--spot); box-shadow: none; }
html[data-theme] .tab-ind { box-shadow: inset 0 1px 0 rgb(255 255 255 / .32); }
.age { color: var(--text); }
.pal-dot, html[data-theme] .s-name::before, .mb i { box-shadow: none; }

/* layout switch for the Requested queue */
.req-views { display: inline-flex; gap: 2px; padding: 3px; margin-block-end: 12px; border-radius: 999px; background: var(--tint); }
.req-views button { border: 0; background: none; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 999px; transition: transform 140ms var(--ease-out); }
.req-views button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.req-views button:active { transform: scale(.96); }

/* shared one-line request row */
.trow { position: relative; display: flex; align-items: center; gap: 10px; padding-inline-end: 10px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--stroke); }
.trow-main { flex: 1; min-inline-size: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: start; border-radius: inherit; }
.trow-title { flex: 1; min-inline-size: 0; font-family: var(--head-font); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-split { flex: none; font-size: 12px; color: var(--text-2); font-family: var(--mono); }
.trow-amt { flex: none; min-inline-size: 92px; text-align: end; font-family: var(--mono); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.trow-amt i { font-style: normal; font-size: 11px; color: var(--text-2); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .trow:hover { box-shadow: inset 0 0 0 1px var(--line-strong); } }

/* view 1: timeline by day, oldest day first */
.tl { display: block; position: relative; padding-inline-start: 22px; }
.tl::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 5px; inline-size: 1px; background: var(--line-strong); }
.tl-day { position: relative; margin-block-end: 22px; }
.tl-day h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 15px; font-family: var(--head-font); font-weight: 600; }
.tl-day h3 em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--text-2); }
.tl-day h3 small { margin-inline-start: auto; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text-2); }
.tl-dot { position: absolute; inset-inline-start: -22px; inset-block-start: 5px; inline-size: 11px; block-size: 11px; border-radius: 50%; background: color-mix(in srgb, var(--spot) calc(var(--heat, 0) * 100%), var(--accent-b)); box-shadow: 0 0 0 4px var(--bg); }
.tl-rows { display: grid; gap: 8px; }

/* view 3: lanes by waiting time */
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.lane { border-radius: 18px; padding: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--stroke); }
.lane h3 { display: flex; align-items: center; gap: 8px; margin: 2px 4px 12px; font-size: 13px; font-family: var(--head-font); font-weight: 600; }
.lane h3 small { font-family: var(--mono); font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--tint); }
.lane h3 em { margin-inline-start: auto; font-style: normal; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text-2); }
.lane-late h3 small { background: var(--spot); color: var(--on-spot); }
.lane-body { display: grid; gap: 8px; }
.lrow .date { display: block; margin: 0 4px 4px; font-size: 11px; color: var(--text-2); }
.lane .trow { flex-wrap: wrap; padding: 0 10px 10px; }
.lane .trow-main { flex: 1 1 100%; flex-wrap: wrap; gap: 6px 10px; padding: 12px 4px 8px; }
.lane .trow-title { flex: 1 1 calc(100% - 40px); }
.lane .trow-split { flex: 1; }
.lane .trow-amt { min-inline-size: 0; }
.lane .trow .mini.go { flex: 1; justify-content: center; text-align: center; }
@media (max-width: 900px) { .lanes { grid-template-columns: 1fr; } .trow-split { display: none; } .trow-amt { min-inline-size: 0; } }

/* clear date on cards; list rows carry the post image */
html[data-theme] .card-top .date { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--text); font-size: 13px; font-weight: 600; }
html[data-theme] .card-top .age { font-size: 12px; font-weight: 500; color: var(--text-2); }
.trow-main { padding-block: 10px; padding-inline: 10px 14px; gap: 14px; }
.trow .thumb-wrap { inline-size: 52px; border-radius: 10px; box-shadow: 0 0 0 1px var(--stroke); }
.trow .thumb-wrap.none { background: var(--tint); }
.trow .thumb-wrap.video::after { inline-size: 16px; block-size: 16px; line-height: 16px; font-size: 7px; inset-block-end: 3px; inset-inline-end: 3px; }

/* =====================================================================
   TWO LOOKS PER BRAND (the header button switches look 1 / look 2;
   they replace dark and light). data-theme="dark" = look 1, "light" = look 2.
   ===================================================================== */
/* Auto look 2: light, built on the brand greys */
html[data-theme="light"][data-brand="auto"] {
  --bg: #DCE0DE; --panel: rgb(255 255 255 / .55); --stroke: rgb(153 158 156 / .38); --text-2: rgb(35 36 36 / .66);
}
html[data-theme="light"][data-brand="auto"] :is(.tabs, .seg, .req-views) { background: #CFD5D3; box-shadow: inset 0 0 0 1px rgb(153 158 156 / .45); }
html[data-theme="light"][data-brand="auto"] :is(.col h2 small, .rail-head small) { background: #CFD5D3; }

/* Rental look 1: blue and charcoal */
html[data-theme="dark"][data-brand="rental"] {
  --bg: #1A1819; --bg-2: #221F20; --panel: rgb(158 195 231 / .06); --card: rgb(40 37 38 / .86); --field: rgb(158 195 231 / .09);
  --stroke: rgb(158 195 231 / .2); --stroke-hi: rgb(158 195 231 / .32);
  --text: #F4F5F5; --text-2: rgb(191 218 242 / .72);
  --glow: color-mix(in srgb, #9EC3E7 40%, transparent); --ptr-o: .1;
}
html[data-theme="dark"][data-brand="rental"] .top { background: #221F20; box-shadow: inset 0 -2px 0 #9EC3E7, var(--shadow-1); }

/* Rental look 2: blue and white */
html[data-theme="light"][data-brand="rental"] {
  --bg: #FFFFFF; --bg-2: #FFFFFF; --panel: rgb(158 195 231 / .14); --card: #FFFFFF; --field: rgb(158 195 231 / .16);
  --stroke: rgb(158 195 231 / .7); --stroke-hi: #FFFFFF; --text: #221F20; --text-2: rgb(34 31 32 / .64);
  --accent: #9EC3E7; --accent-a: #BFDAF2; --accent-b: #9EC3E7; --on-accent: #221F20; --spot: #9EC3E7; --on-spot: #221F20;
  --glow: transparent; --ptr-o: .25;
}
html[data-theme="light"][data-brand="rental"] .top { background: #9EC3E7; color: #221F20; box-shadow: var(--shadow-1); }
html[data-theme="light"][data-brand="rental"] :is(.tabs, .top .seg) { background: rgb(255 255 255 / .38); box-shadow: none; }
html[data-theme="light"][data-brand="rental"] .top :is(.ghost, select, .tabs button, .seg button) { color: #221F20; }
html[data-theme="light"][data-brand="rental"] .tab-ind, html[data-theme="light"][data-brand="rental"] .seg-thumb { background: #FFFFFF; box-shadow: 0 2px 8px -3px rgb(34 31 32 / .35); }
html[data-theme="light"][data-brand="rental"] .tabs button[aria-current], html[data-theme="light"][data-brand="rental"] .seg button[aria-pressed="true"] { color: #221F20; }
html[data-theme="light"][data-brand="rental"] .top .count { background: #221F20; color: #fff; }
html[data-theme="light"][data-brand="rental"] :is(.t-req .big, .totals .main b, .amounts .amt b) { color: #221F20; }

/* Auto: action buttons in the brand's digital red */
html[data-theme][data-brand="auto"] :is(.btn.primary, .mini.go, .plan-use) { background: linear-gradient(180deg, #BD0000, #9F0202); color: #fff; border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  html[data-theme][data-brand="auto"] :is(.btn.primary, .mini.go, .plan-use):hover { background: linear-gradient(180deg, #BD0000, #9F0202); filter: brightness(1.1); box-shadow: 0 0 22px -6px rgb(189 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .25); }
}
/* Auto: the selected side of every toggle in red */
html[data-theme][data-brand="auto"] .seg-thumb, html[data-theme][data-brand="auto"] .req-views button[aria-pressed="true"] { background: linear-gradient(180deg, #BD0000, #9F0202); }
html[data-theme][data-brand="auto"] .seg button[aria-pressed="true"], html[data-theme][data-brand="auto"] .req-views button[aria-pressed="true"] { color: #fff; }

/* Card: the picture fills the side column, and keyboard focus rings the whole card */
html[data-theme] .card-side { align-items: stretch; gap: 10px; }
html[data-theme] .card-side .thumb-btn { flex: 1; min-block-size: 108px; border-radius: 14px; }
html[data-theme] .card-side .thumb-wrap { inline-size: 104px; block-size: 100%; aspect-ratio: auto; }
html[data-theme] .card-side .thumb-wrap img { inline-size: 100%; block-size: 100%; object-fit: cover; }
html[data-theme] .card-side .mini.go { justify-content: center; }
html[data-theme] .card-main:focus-visible { outline: none; }
html[data-theme] .card:has(.card-main:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Auto: the navigation pill in red too */
html[data-theme][data-brand="auto"] .tab-ind { background: linear-gradient(180deg, #BD0000, #9F0202); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22); }
html[data-theme][data-brand="auto"] .tabs button[aria-current] { color: #fff; }

/* Plan visuals and captions */
.plan-vis { inline-size: 64px; }
.plan-thumb { position: relative; inline-size: 52px; }
.plan-thumb img { display: block; inline-size: 52px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.plan-thumb small { position: absolute; inset-block-end: 3px; inset-inline-end: 3px; background: rgb(0 0 0 / .68); color: #fff; font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 999px; }
.plan-visual { max-inline-size: 720px; }
.plan-visual .slides { display: flex; gap: 10px; overflow-x: auto; padding-block-end: 8px; margin-block-end: 12px; scroll-snap-type: x mandatory; }
.plan-visual .slides img { block-size: min(52vh, 420px); inline-size: auto; border-radius: 10px; border: 1px solid var(--line); scroll-snap-align: start; flex: none; }
.plan-visual .cap { margin-block-start: 12px; }
.plan-visual .cap-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-visual .cap h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.plan-visual .cap p { margin-block-start: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }

.plan-thumb small.play { inset-block-end: 50%; inset-inline-end: 50%; transform: translate(50%, 50%); font-size: 12px; padding: 6px 7px 6px 9px; }
.plan-visual .plan-video { display: block; inline-size: auto; max-inline-size: 100%; block-size: min(62vh, 520px); border-radius: 10px; background: #000; margin-block-end: 12px; }

.ao-status.ds-posted { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
html[data-theme] .ao-status.ds-posted { background: var(--accent); color: var(--on-accent); border-color: transparent; }

/* Plan table: every level and design pill is the same width, whether it is a menu or plain text */
.plan-table td > .ao-status { display: flex; align-items: center; inline-size: 9.5rem; max-inline-size: 100%; box-sizing: border-box; text-align: start; }
.plan-table td > span.ao-status { border: 1px solid var(--line-strong, var(--line)); border-radius: 999px; padding: 3px 28px 3px 10px; min-block-size: 30px; font-weight: 500; }
.plan-table td > span.ao-status.lv-none { color: var(--muted, var(--text-2)); }
[dir="rtl"] .plan-table td > span.ao-status { padding: 3px 10px 3px 28px; }

.ao-status.ds-on_hold { color: var(--warn-ink); background: var(--warn-bg); border-color: transparent; }
html[data-theme] .ao-status.ds-on_hold { color: var(--warn-ink); background: var(--warn-bg); }

/* Plan table: fixed columns, so Auto and Rent line up exactly; the subject takes whatever is left */
.plan-table { table-layout: fixed; inline-size: 100%; min-inline-size: 1120px; }
.plan-table :is(th, td):nth-child(1) { inline-size: 80px; }
.plan-table :is(th, td):nth-child(2) { inline-size: 76px; }
.plan-table :is(th, td):nth-child(4) { inline-size: 70px; }
.plan-table :is(th, td):nth-child(5) { inline-size: 112px; }
.plan-table :is(th, td):nth-child(6) { inline-size: 160px; }
.plan-table :is(th, td):nth-child(7) { inline-size: 64px; }
.plan-table :is(th, td):nth-child(8) { inline-size: 160px; }
.plan-table :is(th, td):nth-child(9) { inline-size: 170px; }

/* Lead form builder */
.lead-form { display: grid; gap: 10px; border: 1px solid var(--line, rgba(0,0,0,.12)); border-radius: 14px; padding: 12px; }
.lead-form h3 { margin: 0; font-size: 14px; }
.lead-form .lf-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lead-form .lf-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.lead-form .lf-q { display: grid; gap: 8px; border: 1px dashed var(--line, rgba(0,0,0,.18)); border-radius: 12px; padding: 10px; margin: 0; }
.lead-form .lf-q legend { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 0 4px; }
.lead-form .lf-count { font-size: 11px; opacity: .6; }
.lf-detail { display: grid; gap: 6px; }
.lf-detail .lf-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.lf-detail small { opacity: .65; min-inline-size: 110px; }
.lf-detail ol { margin: 4px 0 0; padding-inline-start: 18px; }

.lf-tabs { display: flex; gap: 6px; }
.lf-tab { border: 1px solid var(--line, rgba(0,0,0,.15)); background: transparent; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.lf-tab[aria-selected="true"] { background: var(--accent, #a31d1d); color: #fff; border-color: transparent; }
.lf-pane { display: grid; gap: 10px; }
.tpl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.tpl-bar select { max-inline-size: 220px; }
.tpl-new { display: inline-flex; gap: 6px; align-items: center; }
.tpl-new[hidden] { display: none; }
.targeting { display: grid; gap: 6px; }
.lf-ver { display: grid; gap: 6px; padding-block: 8px; border-block-start: 1px solid var(--line, rgba(0,0,0,.1)); }
.lf-ver:first-child { border-block-start: 0; padding-block-start: 0; }
.lf-ver h4 { margin: 0; font-size: 13px; }
.lf-line em { font-style: normal; opacity: .55; margin-inline-start: 4px; }
.lf-q-detail { display: grid; gap: 4px; }
.lf-answers { display: flex; flex-wrap: wrap; gap: 6px; }
[data-lf-warn] ul { margin: 4px 0; padding-inline-start: 18px; }

/* Lead form detail: label | text | Copy, one column for every Copy button */
.lf-detail .lf-line { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px; }
.lf-detail .lf-line small { min-inline-size: 0; }
.lf-detail .lf-line .mini { justify-self: end; }
.lf-detail .lf-sub { padding-inline-start: 14px; }
@media (max-width: 520px) { .lf-detail .lf-line { grid-template-columns: minmax(0, 1fr) auto; } .lf-detail .lf-line small { grid-column: 1 / -1; } }

/* Detail view: every Copy button sits at the right edge, whatever the row */
.row dd:has(> button.mini[data-a="copy"]) { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.row dd > button.mini[data-a="copy"] { margin-inline-start: auto; flex-shrink: 0; }

/* Lead form detail: roomier lines, every other one shaded 7% toward the text colour (darker in light mode, lighter in dark mode) */
.lf-detail .lf-ver { gap: 2px; padding-block: 12px; }
.lf-detail .lf-line { padding: 9px 12px; border-radius: 10px; }
.lf-detail .lf-ver > .lf-line:nth-of-type(even) { background: color-mix(in srgb, currentColor 7%, transparent); }
.lf-detail .lf-ver > h4 { margin-block-end: 4px; }
.lf-tr { justify-self: start; }

/* Same colour, one shade apart: 4% black over the panel (5% white in dark mode) */
.lf-detail .lf-ver > .lf-line:nth-of-type(even) { background: rgb(0 0 0 / .04); }
html[data-theme="dark"] .lf-detail .lf-ver > .lf-line:nth-of-type(even) { background: rgb(255 255 255 / .05); }

/* Copy buttons in the detail view: one control, one side, one look */
dl .mini[data-a="copy"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-inline-size: 88px; min-block-size: 30px; padding: 0 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; line-height: 1; color: inherit; cursor: pointer;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  background: color-mix(in srgb, currentColor 4%, transparent);
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease, color 120ms ease;
}
dl .mini[data-a="copy"]::before {
  content: ''; inline-size: 13px; block-size: 13px; flex: none; background: currentColor; opacity: .65;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E") center / contain no-repeat;
}
dl .mini[data-a="copy"]:hover { background: color-mix(in srgb, currentColor 9%, transparent); border-color: color-mix(in srgb, currentColor 28%, transparent); }
dl .mini[data-a="copy"]:active { transform: scale(.97); }
dl .mini[data-a="copy"]:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
dl .mini[data-a="copy"].is-copied { color: #1c7c3a; border-color: color-mix(in srgb, #1c7c3a 40%, transparent); background: color-mix(in srgb, #1c7c3a 10%, transparent); }
dl .mini[data-a="copy"].is-copied::before { display: none; }
html[data-theme="dark"] dl .mini[data-a="copy"].is-copied { color: #9FD8AE; border-color: color-mix(in srgb, #9FD8AE 40%, transparent); background: color-mix(in srgb, #9FD8AE 12%, transparent); }

.lf-sub-h { margin: 6px 0 0; font-size: 13px; padding-block-start: 8px; border-block-start: 1px solid var(--line, rgba(0,0,0,.1)); }
.lf-kind { font-weight: 500; font-size: 11px; opacity: .6; margin-inline-start: 6px; }
.row dd:has(> button.mini[data-a="copy"]) { padding-inline-end: 12px; }

/* Lead form detail: full width, title above text, bigger titles */
.row.lf-row { grid-template-columns: minmax(0, 1fr); padding-block: 2px; border-block-end: 0; }
.lf-row > dd { margin: 0; }
.lf-detail .lf-ver { padding-block: 10px 6px; }
.lf-detail .lf-ver > h4 { font-size: 18px; font-weight: 650; margin: 0 0 8px; letter-spacing: -.01em; }
.lf-detail .lf-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label copy" "text copy"; gap: 3px 12px; align-items: center; padding: 10px 12px; }
.lf-detail .lf-line > small { grid-area: label; font-size: 14px; font-weight: 600; opacity: 1; color: var(--text, inherit); letter-spacing: .005em; }
.lf-detail .lf-line > small em { font-size: 12px; font-weight: 500; opacity: .55; }
.lf-detail .lf-line > span { grid-area: text; font-size: 15px; line-height: 1.45; }
.lf-detail .lf-line > .mini { grid-area: copy; align-self: center; }
.lf-detail .lf-line:not(:has(> .mini)) > span { grid-column: 1 / -1; }
.lf-detail .lf-sub { padding-inline-start: 24px; }
.lf-detail .lf-sub > small { font-weight: 500; font-size: 13px; }
.row dd:has(> button.mini[data-a="copy"]) { padding-inline-end: 12px; }

/* Plan visual: copy beside the caption, full-size images to drag or download */
.plan-visual .cap h3 { margin-block-end: 6px; }
.plan-visual .cap-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.plan-visual .cap-body p, .plan-visual .cap-pair p { margin: 0; }
.plan-visual .cap-pair { display: grid; gap: 14px; }
.plan-visual .cap-copy { position: sticky; inset-block-start: 0; white-space: nowrap; }
.plan-visual .slide { margin: 0; flex: none; display: grid; gap: 6px; justify-items: start; scroll-snap-align: start; }
.plan-visual .slide img { cursor: grab; -webkit-user-drag: element; }
.plan-visual .slide img:active { cursor: grabbing; }
html[data-theme] .plan-visual .cap-pair p + p { padding-block-start: 14px; border-block-start: 1px solid var(--stroke); }

/* Financials: invoices and the This month / This Year switch */
.tab-row { margin-block: 0 14px; }
table.inv td:nth-child(4) { white-space: normal; min-inline-size: 220px; }
.hint.warn { display: inline-block; }
h2.sec small.mb { font-weight: 500; margin-inline-start: 8px; }
.mb-panel { margin-block-start: 14px; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-block: 0 12px; color: var(--muted); }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.folder { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; text-align: start; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.folder svg { grid-row: span 2; inline-size: 28px; color: #d9a441; }
.folder span { font-weight: 600; }
.folder small { color: var(--muted); }
.folder:hover { border-color: var(--line-strong); }
td.acts { white-space: nowrap; text-align: end; }
td.acts .mini + .mini { margin-inline-start: 6px; }
a.mini { display: inline-block; text-decoration: none; }
table.files td:first-child { word-break: break-all; min-inline-size: 180px; }
details.pv { border-block-end: 1px solid var(--line); padding-block: 4px; }
details.pv summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; padding-block: 6px; font-weight: 600; }
details.pv summary small { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Quotations */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-block: 10px; }
.q-form { max-inline-size: 760px; }
.q-fixed { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-block: 10px; }
.q-fixed summary { cursor: pointer; font-weight: 600; padding-block: 4px; }
.q-items { display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.q-item .wide { grid-column: 1 / -1; }
.q-totals { display: flex; flex-wrap: wrap; gap: 20px; margin-block: 12px; }
.q-totals div { display: grid; }
.q-totals span { font-size: 12px; color: var(--muted); }
.q-totals b { font-size: 16px; font-variant-numeric: tabular-nums; }
.q-types { display: grid; gap: 8px; margin-block: 12px; }
.q-type { display: grid; gap: 2px; text-align: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; }
.q-type span { color: var(--muted); font-size: 13px; }
.q-type:hover { border-color: var(--line-strong); }
td select { max-inline-size: 170px; }
@media print {
  #print-sheet.quote { font-size: 10.5pt; line-height: 1.45; }
  #print-sheet.quote .q-top { display: flex; justify-content: space-between; gap: 16px; padding-block-end: 8px; border-block-end: 2px solid #000; margin-block-end: 10px; }
  #print-sheet.quote .q-meta { display: grid; gap: 2px; margin-block-end: 8px; }
  #print-sheet.quote .q-subject { font-size: 12pt; margin-block: 10px 6px; }
  #print-sheet.quote table.q-items-tbl th { background: #eee; font-size: 9.5pt; padding: 5px 6px; border: 1px solid #bbb; inline-size: auto; }
  #print-sheet.quote table.q-items-tbl td { padding: 5px 6px; border: 1px solid #ccc; }
  #print-sheet.quote td.n { text-align: end; white-space: nowrap; }
  #print-sheet.quote .q-links { word-break: break-all; font-size: 8.5pt; }
  #print-sheet.quote .q-totals-tbl { inline-size: 55%; margin-inline-start: auto; margin-block: 10px; }
  #print-sheet.quote .q-totals-tbl th { inline-size: auto; }
  #print-sheet.quote .q-totals-tbl td { text-align: end; }
  #print-sheet.quote .q-grand th, #print-sheet.quote .q-grand td { font-weight: 700; border-block-start: 2px solid #000; }
  #print-sheet.quote .q-foot { margin-block-start: 12px; font-size: 9.5pt; }
  #print-sheet.quote .q-line { margin-block: 2px; white-space: pre-wrap; }
}

.cell-label { display: block; font-size: 11px; font-weight: 400; color: var(--muted); white-space: normal; line-height: 1.25; margin-block-start: 2px; }
html table.budget td .cell-label, html[data-theme] table.budget td .cell-label { display: inline; margin-inline-start: 8px; white-space: nowrap; font-family: inherit; letter-spacing: 0; }

.eoy-card { margin-block: 14px; }
.eoy-card h2 { font-size: 20px; }
.eoy-line { font-size: 17px; margin-block: 6px 12px; }
.eoy-card ol, .eoy-refs { padding-inline-start: 22px; display: grid; gap: 4px; }
.eoy-card h3.sec { margin-block: 14px 6px; }
.cv-group { margin-block: 14px; }
.cv-opts { display: grid; gap: 6px; }
.cv-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line, #d9d4c8); border-radius: 10px; }
.cv-opt.on { border-color: var(--accent, #2a9d8f); background: color-mix(in srgb, var(--accent, #2a9d8f) 10%, transparent); }
.cv-opt input[type=number] { inline-size: 110px; }
.cv-gauge { display: grid; gap: 8px; }
.cv-gauge .mb { display: block; block-size: 10px; border-radius: 6px; background: rgba(128,128,128,.25); overflow: hidden; }
.cv-gauge .mb i { display: block; block-size: 100%; background: var(--accent, #2a9d8f); }
.cv-gauge .mb.over i { background: #d9534f; }
.sb { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sb figure { margin: 0; border: 1px solid var(--line, #d9d4c8); border-radius: 12px; overflow: hidden; }
.sb svg { display: block; inline-size: 100%; block-size: auto; }
.sb figcaption { padding: 10px 12px; display: grid; gap: 4px; font-size: 14px; }
.sb .pct { font-weight: 700; }
.cv-sticky { position: sticky; top: 0; z-index: 3; background: var(--bg, #fff); padding-block: 8px; }
.sb-act { margin-block: 18px; }
.sb-copy { font-size: 15px; font-weight: 600; }
.sb-pick { color: var(--accent, #2a9d8f); font-weight: 600; }
.sb figure.sb-warn { border-color: #d9534f; }
.cv-gauge small.neg { display: block; }
.eoy-old { margin-block: 18px; }
.eoy-old > summary { cursor: pointer; font-weight: 700; padding-block: 8px; }
