/*
 * occasions — the public surface of the Malik family design: every page a client or guest sees (quote, contract,
 * payment, portal, invitation, tickets, the company site, error pages). malik7mb7.com «Field Dossier»: paper, ink,
 * steel links, mist ornaments, hairlines, 12px cards, mono «file» labels, a faint grid behind heroes.
 * Source: F:\Coding\design-system\MALIK-DESIGN-GUIDELINE.md §2.1, §3.1, §5.2 (decisions §9 win over §5.2).
 * Light is malik7mb7.com and the default; dark is derived from the app dark tokens (malik7mb7.com has none, §2.9)
 * and shows only when the person picks it with the header toggle (owner decision 2026-11-12).
 * IBM Plex Sans Arabic for both languages (as fb, owner 2026-11-18), Plex Mono for numbers and codes.
 * Token names are the ones the views already use (--bg, --sf, --ink, --mu, --pr…); contrast next to each pair.
 * tests/Feature/Core/HallEveningLookTest and tests/Feature/Redesign/PublicTokensContrastTest recompute them.
 */
:root {
    /* the approved fb-style design (2026-11-18, dev/design/04-style.html): quiet paper, white cards, navy bands,
       one action blue; contrast against sf (white) / bg next to each pair */
    --bg: #f4f6f9;      /* paper */
    --sf: #ffffff;      /* card */
    --sf2: #eef1f5;     /* tinted sections, table heads, icon tiles */
    --ink: #14243a;     /* 15.6 on sf, 14.3 on bg */
    --ink2: #3c4b60;    /* 9.4 on sf */
    --mu: #5a687c;      /* 5.9 on sf, 5.4 on bg */
    --pr: #1f5fd1;      /* the action button */
    --on-pr: #ffffff;   /* 5.6 */
    --pr-h: #194fb0;
    --on-pr-h: #ffffff; /* 7.3 */
    --ac: #1f5fd1;      /* links: 5.6 on sf, 5.1 on bg */
    --steel: #7d8ca0;   /* field borders, bullets: 3.4 on sf (UI only) */
    --field: #7d8ca0;
    --gold: #94b4c1;    /* mist: ornament only — the old name stays for the views */
    --mist: #94b4c1;
    --night: #0c1f38;   /* the navy band: invitation head, total box, stage bar, footer */
    --champ: #94b4c1;   /* mist on navy: 7.6 */
    --on-night: #ffffff;    /* 16.1 */
    --on-night-mu: #b9c8dc; /* 10.2 */
    --line: rgba(12, 31, 56, .09);  /* dividers */
    --line2: rgba(12, 31, 56, .16); /* card and chip borders */
    --ok: #15764a;      /* 5.9 on sf */
    --warn: #8a5a00;    /* 6.0 on sf */
    --bad: #b13522;     /* 6.0 on sf */
    --ok-bg: #e3f4ea; --warn-bg: #fdf3dc; --bad-bg: #fbe9e6;
    --neu: #46566b; --neu-bg: #eef1f5;
    --focus: #1f5fd1;   /* 5.1 on bg */
    --header-bg: #ffffff;
    --grid: rgba(12, 31, 56, .045);
    --sel: #1f5fd1; --sel-ink: #ffffff;
    --sh: 0 1px 2px rgba(12, 31, 56, .06), 0 2px 6px -2px rgba(12, 31, 56, .08);
    /* one face for both languages (as fb, owner 2026-11-18) */
    --f: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
    --fd: var(--f);     /* headings and names: the text face at 600–700 */
    --fm: "IBM Plex Mono", "IBM Plex Sans Arabic", ui-monospace, "Cascadia Mono", Consolas, monospace;
    /* money keeps the text face: Money::format() returns «1,545 د.أ.» in one piece and the dots would be monospace-wide */
    --fa: "IBM Plex Sans Arabic", system-ui, sans-serif;
    --track: 0; --track-label: 0; --fs-label: .8125rem;
    /* the names older views use inline */
    --fg: var(--ink); --muted: var(--mu); --card: var(--sf); --accent: var(--ac); --danger: var(--bad); --input: var(--sf);
    color-scheme: light;
}
:root[lang="en"] { --track: -.012em; --track-label: .08em; --fs-label: .75rem; }
/* dark only when the person picks it (owner decision 2026-11-12): public/js/theme.js sets data-theme="dark" before
   the first paint from the saved choice; light is the default, also without JS */
:root[data-theme="dark"] {
    --bg: #0a1626;
    --sf: #102238;
    --sf2: #0d1d31;
    --ink: #e9eff7;     /* 16.4 on bg, 14.5 on sf */
    --ink2: #c3cedc;    /* 10.5 on sf */
    --mu: #98a8bd;      /* 6.9 on sf */
    --pr: #8cb1ff;      /* the night button: light blue, navy text */
    --on-pr: #08162a;   /* 8.6 */
    --pr-h: #a6c3ff;
    --on-pr-h: #08162a; /* 10.4 */
    --ac: #8fb5ff;      /* 7.6 on sf */
    --steel: #6b84a3; --field: #6b84a3; /* 3.6 on sf */
    --gold: #4c6a8c; --mist: #4c6a8c;
    --night: #071224;
    --champ: #8fb5ff;   /* 9.0 on night */
    --on-night: #e9eff7;
    --on-night-mu: #98a8bd;
    --line: rgba(143, 169, 194, .18);
    --line2: rgba(143, 169, 194, .32);
    --ok: #4cc28a; --warn: #f2b544; --bad: #f0806f;
    --ok-bg: #12362a; --warn-bg: #3a2e14; --bad-bg: #3d1c19;
    --neu: #c3cedc; --neu-bg: #1f3550;
    --focus: #8fb5ff;   /* 7.6 on sf */
    --header-bg: #0d1d31;
    --grid: rgba(143, 169, 194, .05);
    --sel: #16305a; --sel-ink: #e9eff7;
    --sh: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -18px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--f); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; max-width: var(--w, 760px); margin: 0 auto; padding: 20px 16px 40px; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; margin: 0 0 .5rem; text-wrap: balance; letter-spacing: var(--track); }
:lang(ar) :is(h1, h2, h3), :is(h1, h2, h3):lang(ar) { line-height: 1.45; letter-spacing: 0; }
h1 { font: 700 clamp(min(1.75rem, 11vw), 4.2vw, 2.45rem)/1.3 var(--fd); }
h2 { font: 700 1.375rem/1.35 var(--fd); }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: var(--ac); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
bdi { unicode-bidi: isolate; }
img { max-width: 100%; height: auto; }
::selection { background: var(--sel); color: var(--sel-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
html { scrollbar-color: var(--line2) transparent; }
.muted { color: var(--mu); font-size: .9375rem; }
.lead { color: var(--ink2); font-size: 1.0625rem; max-width: 62ch; }
.num, .m { font-family: var(--fm); font-variant-numeric: tabular-nums; }
.oc-nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* the «file» voice of malik7mb7: a mono label with a small ink square and a hairline to the end (§3.1) */
.file-line { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 var(--fs-label)/1.4 var(--fm); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--mu); }
.file-line::before { content: ""; width: 9px; height: 9px; background: var(--ink); flex: none; }
.file-line::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.kicker { font: 600 var(--fs-label)/1.5 var(--fm); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--mu); margin: 0 0 6px; }
/* Arabic words in a mono label take the text face: Plex Mono has no Arabic, and its wide space opened gaps between
   the words (guideline §2.4); digits and codes inside stay mono through .ltr / bdi */
:lang(ar) :is(.file-line, .kicker, .oc-hero .from, .oc-stage, .stamp) { font-family: var(--f); }
:lang(ar) :is(.file-line, .kicker, .stamp) :is(.ltr, bdi) { font-family: var(--fm); }
/* the 34px grid behind heroes only */
.oc-grid { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 34px 34px; }

/* ---------- surfaces ---------- */
.card { background: var(--sf); border: 1px solid var(--line2); border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: var(--sh); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { font-size: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { display: inline-block; font-size: .8125rem; line-height: 1.6; padding: 2px 10px; border-radius: 999px; background: var(--sf); border: 1px solid var(--line2); color: var(--ink); }
/* an ink panel at night stays apart from the page: a hairline edge (audit 4: «the navy card barely shows at 1440») */
:root[data-theme="dark"] :is(.oc-hero, .oc-total, .oc-band, .oc-foot) { box-shadow: inset 0 0 0 1px var(--line2); }

/* ---------- controls: 44px targets, 9px corners, one ink primary ---------- */
button, .btn {
    font: 600 .9375rem/1.25 var(--f); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px; border-radius: 9px; cursor: pointer; text-decoration: none; text-align: center;
    border: 1.5px solid var(--pr); background: transparent; color: var(--ink);
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
button:hover, .btn:hover { background: var(--pr); color: var(--on-pr); }
button:active:not([disabled]), .btn:active { transform: translateY(1px); }
@media (hover: hover) { button:not([disabled]):hover, .btn:hover { transform: translateY(-1px); } }
button[disabled] { background: var(--sf2); border-color: var(--line2); color: var(--mu); cursor: not-allowed; }
.primary, button.primary, .btn.primary { background: var(--pr); border-color: var(--pr); color: var(--on-pr); }
.primary:hover, button.primary:hover, .btn.primary:hover { background: var(--pr-h); border-color: var(--pr-h); color: var(--on-pr-h); }
.danger { color: var(--bad); border-color: var(--bad); }
.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn.quiet, button.quiet { border-color: transparent; background: transparent; color: var(--ac); padding-inline: 8px; text-decoration: underline; }
.btn.quiet:hover, button.quiet:hover { background: transparent; color: var(--ink); }
.btn.wide, button.wide { width: 100%; }
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .9375rem; }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; min-height: 44px; padding-block: 10px; margin: 0; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pr); flex: none; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select, textarea {
    font: inherit; width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 9px;
    border: 1px solid var(--field); background: var(--sf); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--mu); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--bad); }
/* a day field in words, not the browser's «mm/dd/yyyy» (O-1, <x-oc.public-date>): a button the size of a box,
   over the native date field that is still sent; the native one sits under the button so its picker opens there */
.oc-pdate { position: relative; display: block; }
.oc-pdate-btn {
    width: 100%; min-height: 44px; justify-content: flex-start; gap: 10px; padding: 10px 13px; border-radius: 9px;
    font: 400 1rem/1.7 var(--f); text-align: start; border: 1px solid var(--field); background: var(--sf); color: var(--ink);
}
.oc-pdate-btn:hover { background: var(--sf); color: var(--ink); border-color: var(--ink); }
.oc-pdate-btn:active:not([disabled]) { transform: none; }
@media (hover: hover) { .oc-pdate-btn:not([disabled]):hover { transform: none; } }
.oc-pdate-btn[aria-invalid=true] { border-color: var(--bad); }
.oc-pdate-icon { width: 18px; height: 18px; flex: none; color: var(--ac); }
.oc-pdate-text { min-width: 0; overflow-wrap: anywhere; }
.oc-pdate[data-empty=true] .oc-pdate-text { color: var(--mu); }
.oc-pdate .oc-pdate-native {
    position: absolute; inset-inline: 0; bottom: 0; width: 100% !important; height: 1px !important; min-height: 0 !important;
    padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none;
}
/* a file field in the page's language, not the browser's «No file chosen» (DA-11) */
.file { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.file input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.file .btn { pointer-events: none; }
.file:focus-within .btn { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- messages: tinted slips, a word with the colour ---------- */
.msg { padding: 12px 16px; border-radius: 12px; margin: 0 0 14px; border: 1px solid transparent; }
.msg.err { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.msg.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.msg.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }

/* ---------- page frame: the paper header with the company chip, the ink footer ---------- */
.oc-top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--header-bg); }
.oc-top .in { max-width: var(--w, 760px); margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.oc-top .co { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; min-width: 0; }
.oc-top .co span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the company's monogram in an ink chip (no gold ring, §5.2) */
.oc-mono { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--night); border: 1px solid var(--mist); display: grid; place-items: center; font: 700 1.0625rem/1 var(--f); color: var(--on-night); }
/* the light / dark toggle: a 44px square in the header; the moon shows by day, the sun at night (public/js/theme.js) */
.oc-theme { min-width: 44px; min-height: 44px; padding: 0; border-radius: 8px; background: var(--sf); border: 1px solid var(--line2); color: var(--ink); flex: none; }
.oc-theme:hover { background: var(--sf2); color: var(--ink); border-color: var(--steel); }
@media (hover: hover) { .oc-theme:not([disabled]):hover { transform: none; } }
.oc-theme svg { width: 20px; height: 20px; }
.oc-theme .sun, :root[data-theme="dark"] .oc-theme .moon { display: none; }
:root[data-theme="dark"] .oc-theme .sun { display: block; }
.oc-top .end { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.oc-theme-corner { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 10; }
.oc-top .oc-brand { min-height: 44px; }
.oc-top .oc-brand svg { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.oc-top .oc-brand .wm { font: 600 1rem/1 var(--fm); direction: ltr; unicode-bidi: isolate; }
/* the language switch: a bordered white button in mono naming the other language (malik7mb7 header) */
.oc-top .lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 8px; background: var(--sf); border: 1px solid var(--line2); color: var(--ink); font: 600 .8rem/1 var(--fm); text-decoration: none; flex: none; }
.oc-top .lang:hover { border-color: var(--steel); }
.oc-foot { background: var(--night); color: var(--on-night-mu); text-align: center; font-size: .875rem; padding: 6px 16px calc(6px + env(safe-area-inset-bottom)); margin-top: 24px; }
.oc-foot a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.oc-foot a:hover { color: var(--on-night); }
.oc-foot .wm { font: 600 .875rem/1 var(--fm); direction: ltr; unicode-bidi: isolate; color: var(--on-night); }

/* a hairline with a small mist spark in the middle */
.oc-rule { display: flex; align-items: center; gap: 10px; margin: 14px 8px; color: var(--mist); }
.oc-rule::before, .oc-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.oc-rule svg { width: 12px; height: 12px; flex: none; }

/* ---------- the ink head (invitation, ticket, pass): flat ink, the arch drawn in mist ---------- */
.oc-hero {
    background: var(--night); color: var(--on-night);
    text-align: center; padding: 22px 18px 26px; border-radius: 0 0 16px 16px; margin: -20px -16px 0;
}
.oc-hero .from { font: 600 var(--fs-label)/1.5 var(--fm); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--champ); margin: 0; }
.oc-hero h1 { color: var(--on-night); }
.oc-hero .kind { color: var(--on-night-mu); font-size: .9375rem; margin: 0 0 .25rem; }
.oc-arch { position: relative; width: min(270px, 72vw); aspect-ratio: 250 / 262; margin: 10px auto 0; }
.oc-arch svg.frame { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--champ); overflow: visible; }
.oc-arch .in { position: absolute; inset: 24% 9% 7%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
/* the couple's names: Plex Sans Arabic SemiBold (§9 decision 3) */
.oc-arch .name { font: 600 clamp(1.75rem, 8vw, 2.4rem)/1.3 var(--fd); color: var(--on-night); margin: 0; overflow-wrap: anywhere; }
.oc-arch svg.frame path { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
    .oc-arch svg.frame path.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: oc-draw 900ms cubic-bezier(.16, 1, .3, 1) 100ms forwards; }
    .oc-arch .in { animation: oc-rise 300ms cubic-bezier(.16, 1, .3, 1) 700ms both; }
}
@keyframes oc-draw { to { stroke-dashoffset: 0; } }
@keyframes oc-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* when / where / section, three columns divided by hairlines */
.oc-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); text-align: center; margin: 16px 0 4px; }
.oc-details > div { padding: 2px 8px; }
.oc-details > div + div { border-inline-start: 1px solid var(--line2); }
.oc-details b { display: block; font-weight: 600; line-height: 1.4; }
.oc-details small { display: block; font-size: .8125rem; color: var(--mu); }

/* ---------- the reply card: a stub with a dashed mist tear edge and two notches ---------- */
.oc-reply { position: relative; background: var(--sf); border-radius: 6px 6px 12px 12px; padding: 24px 18px 18px; margin: 22px 0 16px; box-shadow: var(--sh); border: 1px solid var(--line2); border-top: 0; }
.oc-reply::before { content: ""; position: absolute; top: 0; inset-inline: 16px; border-top: 2px dashed var(--mist); }
.oc-reply .notch { position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line2); }
.oc-reply .notch:first-of-type { inset-inline-start: -10px; }
.oc-reply .notch:last-of-type { inset-inline-end: -10px; }
.oc-reply h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.oc-reply .choices { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 12px; }
.oc-reply .choices button { width: 100%; min-height: 48px; font-size: 1.0625rem; }
.oc-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.oc-count input { width: 5.5rem !important; text-align: center; font-family: var(--fm); }

/* the entry code: mist corner ticks around the QR, on white so any phone can read it */
.oc-qr { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--sf); border: 1px solid var(--line2); border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: var(--sh); }
.oc-qr .code { position: relative; width: 148px; padding: 8px; background: #fff; border-radius: 8px; }
.oc-qr .code svg { display: block; width: 100%; height: auto; }
.oc-qr .code::before, .oc-qr .code::after, .oc-qr .code i::before, .oc-qr .code i::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--steel); }
.oc-qr .code::before { top: -6px; inset-inline-start: -6px; border-top-width: 2px; border-inline-start-width: 2px; }
.oc-qr .code::after { top: -6px; inset-inline-end: -6px; border-top-width: 2px; border-inline-end-width: 2px; }
.oc-qr .code i::before { bottom: -6px; inset-inline-start: -6px; border-bottom-width: 2px; border-inline-start-width: 2px; }
.oc-qr .code i::after { bottom: -6px; inset-inline-end: -6px; border-bottom-width: 2px; border-inline-end-width: 2px; }
.oc-qr details { margin-top: 6px; font-size: .875rem; color: var(--mu); }
.oc-qr summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.oc-qr .manual { font: 600 1rem/1.4 var(--fm); letter-spacing: .04em; direction: ltr; unicode-bidi: isolate; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 380px) { .oc-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---------- a document on a phone: lines as a key/value list, the ink total band, numbered steps (D4) ---------- */
.oc-doc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.oc-doc-head .ref { font: 600 .8125rem/1.4 var(--fm); color: var(--mu); direction: ltr; unicode-bidi: isolate; }
.oc-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.oc-lines li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.oc-lines li:last-child { border-bottom: 0; }
.oc-lines .what { min-width: 0; overflow-wrap: anywhere; }
.oc-lines .what small { display: block; color: var(--mu); font-size: .8125rem; margin-top: 2px; }
.oc-lines .amt { font-family: var(--fa); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.oc-lines li.opt { align-items: center; }
.oc-lines li.opt label { margin: 0; padding: 0; min-height: 44px; align-items: center; }
.oc-total { background: var(--night); color: var(--on-night); border-radius: 12px; padding: 14px 18px; margin: 0 0 16px; }
.oc-total .r { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; line-height: 1.9; color: var(--on-night-mu); }
.oc-total .r .amt, .oc-total .g .amt { font-family: var(--fa); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.oc-total .g { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid color-mix(in srgb, var(--champ) 45%, transparent); margin-top: 6px; padding-top: 8px; }
.oc-total .g b { font-size: 1rem; color: var(--on-night); }
.oc-total .g .amt { font-size: 1.625rem; font-weight: 700; color: var(--on-night); letter-spacing: -.01em; }
.oc-total .dep { font-size: .875rem; color: var(--on-night-mu); margin: 4px 0 0; }
.oc-total .g:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
/* large text (200 %): when a label and its figure cannot share a row, the figure drops to its own row, still at the
   end and in one piece (money is never split; same rule as estore D25) */
.oc-total .g, .oc-total .r, .oc-lines li, .oc-cta .row { flex-wrap: wrap; }
.oc-total .g .amt, .oc-total .r .amt, .oc-lines .amt { margin-inline-start: auto; }
.oc-cta .row > form, .oc-cta .row > .btn, .oc-cta .row > button { min-width: min(100%, 12rem); }
/* the three steps «الموافقة ← توقيع العقد ← العربون»: numbered squares, the current one ink (§3.1 process) */
.oc-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 16px; padding: 0; font-size: .875rem; color: var(--mu); }
.oc-steps li { display: flex; align-items: center; gap: 8px; }
.oc-steps b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--field); font: 600 .8125rem/1 var(--fm); color: var(--mu); background: var(--sf); }
.oc-steps .on { color: var(--ink); font-weight: 700; }
.oc-steps .on b { background: var(--pr); border-color: var(--pr); color: var(--on-pr); }
.oc-steps .done b { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.oc-next { border-color: color-mix(in srgb, var(--ok) 45%, var(--line2)); box-shadow: var(--sh), inset 3px 0 0 var(--ok); }
[dir="rtl"] .oc-next { box-shadow: var(--sh), inset -3px 0 0 var(--ok); }
.oc-next h2 { font-size: 1.25rem; }
/* the decision bar: stays at the bottom of the screen, with the total beside the button (the malik7mb7 action bar) */
.oc-cta { position: sticky; bottom: 0; z-index: 5; margin: 0 -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--header-bg); border-top: 1px solid var(--line2); box-shadow: 0 -8px 24px -20px rgba(33, 52, 72, .45); }
.oc-cta .row { display: flex; align-items: center; gap: 12px; }
.oc-cta .sum { flex: none; line-height: 1.2; }
.oc-cta .sum small { display: block; font-size: .8125rem; color: var(--mu); }
.oc-cta .sum .amt { font: 700 1.125rem/1.2 var(--fa); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.oc-cta .row > form, .oc-cta .row > .btn, .oc-cta .row > button { flex: 1; }
.oc-cta .row button, .oc-cta .row .btn { width: 100%; min-height: 50px; font-size: 1.0625rem; }
.oc-cta .sub { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: .875rem; }
.oc-cta .sub button { min-height: 44px; padding: 6px 4px; border: 0; background: none; color: var(--ac); text-decoration: underline; }
.oc-cta .sub button:hover { background: none; color: var(--ink); transform: none; }

/* ---------- tables become key/value rows on a phone ---------- */
.oc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.oc-table th { text-align: start; font-weight: 600; color: var(--mu); font-size: .8125rem; padding: 8px 6px; border-bottom: 1px solid var(--line2); }
.oc-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.oc-table td.amt { font-family: var(--fa); white-space: nowrap; }
@media (max-width: 560px) {
    .oc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .oc-table, .oc-table tbody, .oc-table tr, .oc-table td { display: block; width: 100%; }
    .oc-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
    .oc-table td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; }
    .oc-table td[data-label]::before { content: attr(data-label); color: var(--mu); font-size: .8125rem; }
}

/* ---------- statuses: tinted round pills with a word (the admin pairs), never colour alone ---------- */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.state.ok { background: var(--ok-bg); color: var(--ok); }
.state.warn { background: var(--warn-bg); color: var(--warn); }
.state.bad { background: var(--bad-bg); color: var(--bad); }
.state.quiet { background: var(--neu-bg); color: var(--neu); }

/* ---------- the seat map (D12): the hall scrolls and zooms as one picture, the stage stays in view ---------- */
.oc-hall { position: relative; border: 1px solid var(--line2); border-radius: 12px; background: var(--sf2); }
.oc-hall .zoom { display: flex; justify-content: flex-end; gap: 6px; padding: 6px; border-bottom: 1px solid var(--line2); }
.oc-hall .zoom button { min-width: 44px; padding: 6px 10px; font-family: var(--fm); }
.oc-hall .scroll { overflow: auto; max-height: 70vh; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.oc-hall .plan { width: max-content; min-width: 100%; padding: 0 12px 12px; transform-origin: top center; }
.oc-stage { position: sticky; top: 0; z-index: 2; margin: 0 -12px 12px; padding: 6px 12px; text-align: center; font: 600 var(--fs-label)/1.6 var(--fm); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--on-night); background: var(--night); border-bottom: 2px solid var(--champ); }
.oc-hall .seat-row { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; margin-bottom: 6px; }
/* the row letter stays in view while the row scrolls sideways (audit 4: it opened out of view on phones) */
.oc-hall .seat-row .lbl { position: sticky; inset-inline-start: 0; z-index: 1; width: 30px; height: 44px; flex: none; display: grid; place-items: center; text-align: center; font: 600 .8125rem/1 var(--fm); color: var(--mu); background: var(--sf2); }
/* a seat: free (white), chosen (ink), taken (O-3: red ground, red number at AA in both themes, struck through and
   dashed so «taken» is not said by colour alone; the key under the hint names all three) */
.seat { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 8px; font: 500 .8125rem/1 var(--fm); border: 1px solid var(--field); cursor: pointer; background: var(--sf); color: var(--ink); }
.seat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seat:has(input:checked), .seat-key .sw.mine { background: var(--pr); color: var(--on-pr); border-color: var(--pr); }
.seat:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.seat-key .sw.taken, .seat.taken {
    background: var(--bad-bg); color: var(--bad); border: 1px dashed color-mix(in srgb, var(--bad) 60%, transparent); font-weight: 600;
    text-decoration: line-through; text-decoration-thickness: 1.5px; cursor: not-allowed;
}
.seat-key { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 0; font-size: .875rem; color: var(--ink); }
.seat-key li { display: inline-flex; align-items: center; gap: 8px; }
.seat-key .sw { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font: 500 .75rem/1 var(--fm); border: 1px solid var(--field); background: var(--sf); color: var(--ink); cursor: default; }

/* ---------- utility ---------- */
/* a link that stands on its own line is a 44px target (a link inside a sentence is excused, §6.2) */
a.tap { display: inline-flex; align-items: center; min-height: 44px; }
summary { cursor: pointer; padding-block: 10px; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.hide-sm { display: initial; }
@media (max-width: 560px) { .hide-sm { display: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
    button:active, .btn:active, button:hover, .btn:hover { transform: none !important; }
}
@media print {
    body { background: #fff; color: #000; }
    .oc-cta, .oc-top a.lang, .no-print { display: none !important; }
    .card { box-shadow: none; }
}
