/* بالملّي | BELMELLI v3 — calm palette, one primary action per screen, keyboard and screen-reader friendly.
   Works in RTL and LTR, light and dark. */
:root {
  --font: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --brand-font: 'Alexandria', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --brand-latin: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --brand: #0E5E57; --brand-accent: #E9962E;
  --bg: #F4F6F5; --surface: #FFFFFF; --surface-2: #F2F5F4; --surface-3: #E8EDEB;
  --line: #E4EAE8; --line-strong: #D5DCD9;
  --text: #13211F; --text-2: #34403D; --text-3: #5B6B68;
  --primary: #0E5E57; --primary-2: #0A4540; --primary-soft: #E3F1EE; --primary-ink: #0A4540; --on-primary: #FFFFFF;
  --accent: #E9962E; --accent-soft: #FFF4E0;
  --ok: #18794E; --ok-soft: #DDF1E6; --warn: #8A4B00; --warn-soft: #FFF4E0; --warn-line: #F0D7A8; --bad: #A52323; --bad-soft: #FBE4E1; --info: #22508F; --info-soft: #E6EEF9;
  --side: #0F2A27; --side-2: #183B37; --side-text: #C9DAD6; --side-muted: #A9C9C3; --side-active: #1E4B46; --side-accent: #E9962E;
  --focus: #2F6FE4;
  --shadow: none; --shadow-lg: 0 12px 32px rgba(16, 32, 30, .16);
  --r: 12px; --r-sm: 10px; --r-lg: 18px;
  --c1: #0E7C70; --c2: #D08A1C; --c3: #3C6FD1; --c4: #B4477A; --c5: #6D8B22; --c6: #7A5BC8; --c7: #C4553A; --c8: #2C9AB7;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0D1715; --surface: #14211F; --surface-2: #1A2A27; --surface-3: #22342F;
  --line: #24342F; --line-strong: #2E423D;
  --text: #E8EFED; --text-2: #C3D0CC; --text-3: #A3B3AF;
  --primary: #3FB5A6; --primary-2: #5FCDBE; --primary-soft: #173A36; --primary-ink: #7FD6CA; --on-primary: #062420;
  --accent: #F2B866; --accent-soft: #2E2414;
  --ok: #5CCB92; --ok-soft: #173327; --warn: #F2B866; --warn-soft: #2E2414; --warn-line: #4A3A1E; --bad: #F08A80; --bad-soft: #3A1F1C; --info: #8DB4F0; --info-soft: #18263B;
  --side: #0F2A27; --side-2: #183B37; --side-text: #E6F0EE; --side-muted: #A9C9C3; --side-active: #1E4B46; --side-accent: #F2B866;
  --focus: #8DB4F0;
  --shadow: none; --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --c1: #3FB8A4; --c2: #E9A93F; --c3: #6E9BF0; --c4: #E07AAA; --c5: #9DBF4A; --c6: #A68BF0; --c7: #EF8467; --c8: #5CC4DF;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
h1 { font-size: 24px; } h2 { font-size: 16px; } h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--text-3); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; direction: ltr; unicode-bidi: embed; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
div.ltr { display: block; } [dir='rtl'] div.ltr { text-align: right; }
.hidden, [hidden] { display: none !important; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir='rtl'] svg.i.flip { transform: scaleX(-1); }
/* focus: always visible for keyboard users, never for mouse clicks */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.menu [tabindex="-1"]:focus-visible, .menu button:focus { background: var(--surface-2); outline: 3px solid var(--focus); outline-offset: -3px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -80px; inset-inline-start: 12px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: #fff; text-decoration: none; }
.side .logo b { font-family: var(--brand-font); font-weight: 800; font-size: 19px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; flex: none; overflow: hidden; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.branch-btn { display: flex; align-items: center; gap: 10px; background: var(--side-2); border: 0; border-radius: 12px; padding: 9px 12px; min-height: 48px; text-align: start; color: #fff; width: 100%; }
.branch-btn:hover { background: var(--side-active); }
.branch-btn .t { flex: 1; min-width: 0; }
.branch-btn b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch-btn small { display: block; color: var(--side-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch-btn.static { cursor: default; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a, .side-foot > a, .side-foot > button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--side-text); padding: 10px 12px; border-radius: 10px; min-height: 44px; font-size: 15px; font-weight: 500; text-align: start; text-decoration: none; position: relative; }
.nav a:hover, .side-foot > a:hover, .side-foot > button:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a[aria-current="page"], .side-foot > a[aria-current="page"] { background: var(--side-active); color: #fff; font-weight: 600; box-shadow: inset -3px 0 0 var(--side-accent); }
[dir='ltr'] .nav a[aria-current="page"], .side-foot > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--side-accent); }
.nav .count, .side-foot .count { margin-inline-start: auto; background: var(--accent); color: #2A1600; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 0 8px; line-height: 20px; }
.side-foot { border-top: 1px solid #234743; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.me-av { width: 32px; height: 32px; border-radius: 50%; background: #2B5C56; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.me { flex: 1; min-width: 0; }
.me span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { display: block; font-size: 12px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 24px; min-height: 68px; }
.top .ttl { min-width: 0; }
.top .ttl .crumb { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .ttl .crumb a { color: inherit; }
.top .ttl b { display: block; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn { margin-inline-start: auto; flex: 0 1 440px; display: flex; align-items: center; gap: 10px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 14px; color: var(--text-3); text-align: start; }
.search-btn:hover { border-color: var(--line-strong); }
.search-btn .txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { font-size: 12px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 6px; direction: ltr; color: var(--text-3); background: var(--surface); font-family: var(--font); white-space: nowrap; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; position: relative; flex: none; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 18px; height: 18px; border-radius: 99px; background: #B42318; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.menu-btn { display: none; }
.content { padding: 24px; max-width: 1320px; width: 100%; margin: 0 auto; }
.content:focus { outline: none; }
.demo-band { background: var(--info-soft); color: var(--info); font-size: 13px; text-align: center; padding: 5px; }
.hub { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 20px; overflow-x: auto; scrollbar-width: none; }
.hub::-webkit-scrollbar { display: none; }
.hub a { padding: 12px 16px; font-size: 15px; color: var(--text-3); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.hub a:hover { color: var(--text); text-decoration: none; }
.hub a[aria-current="page"] { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.hub .count { background: var(--accent); color: #2A1600; border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.in-hub > .page-head h1, .in-hub > * > .page-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.in-hub > .page-head .t p, .in-hub > * > .page-head .t p { margin-top: 0; }
.subnav-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 92px; }
.subnav .g { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 0 12px 4px; }
.subnav a { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--text); text-decoration: none; }
.subnav a:hover { background: var(--surface-2); text-decoration: none; }
.subnav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; }
.subnav .count { margin-inline-start: auto; background: var(--accent); color: #2A1600; border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 700; line-height: 20px; }

/* ---------- page header */
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .t { flex: 1 1 300px; min-width: 0; }
.page-head .t p { color: var(--text-3); margin-top: 4px; font-size: 14px; max-width: 760px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; color: var(--text); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.solid-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.link { border: 0; background: none; color: var(--primary); padding: 0 6px; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn.lg { height: 50px; padding: 0 22px; font-size: 15.5px; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.sm { width: 36px; }
.btn .spin { width: 16px; height: 16px; }
.btn .count { background: var(--primary-soft); color: var(--primary-ink); border-radius: 99px; padding: 0 7px; font-size: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--text-3); display: inline-flex; gap: 6px; align-items: center; min-height: 34px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; }

/* ---------- cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); min-height: 56px; }
.card-h h2 { font-size: 15px; }
.card-h h2, .card-h h3 { flex: 1; }
.card-b { padding: 18px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.spacer { flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; }
.tile .k { font-size: 13px; color: var(--text-3); }
.tile .v { font-size: 24px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12px; color: var(--text-3); }
.tile.hl { background: var(--primary-soft); border-color: transparent; }
.tile.warn { background: var(--warn-soft); border-color: transparent; }

/* ---------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.pri { background: var(--primary-soft); color: var(--primary); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; cursor: pointer; }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* ---------- forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 14px; font-weight: 600; color: var(--text); display: flex; gap: 6px; align-items: center; }
.field > label .req { color: var(--bad); }
.field .hint { font-size: 13px; color: var(--text-3); }
.field [aria-invalid='true'] { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: 13px; }
.input, select.input, textarea.input { height: 44px; width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 0 12px; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--primary); }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: var(--r-sm); }
.input.sm { height: 36px; font-size: 14px; }
.input.big { height: 54px; font-size: 20px; text-align: center; letter-spacing: .04em; }
.input[type='number'], .input.ltr-in { direction: ltr; text-align: end; }
[dir='ltr'] .input[type='number'] { text-align: start; }
.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.form-sec { grid-column: 1 / -1; font-weight: 700; font-size: 14px; color: var(--primary); padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; transition: .15s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { inset-inline-start: 19px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; }
.search { position: relative; }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-inline-start: 40px; }

/* ---------- table */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-weight: 600; color: var(--text-3); font-size: 13px; padding: 11px 14px; background: var(--surface); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td, .tbl tbody tr.click:focus-visible td { background: var(--surface-2); }
.tbl tbody tr.click:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.tbl td.n, .tbl th.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .sub { font-size: 13px; color: var(--text-3); }
.tbl-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.filters.slim { padding: 8px 14px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.fchip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary-ink); border-radius: 99px; padding: 3px 6px; padding-inline-start: 12px; font-size: 13px; font-weight: 600; }
.fchip button { border: 0; background: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: inherit; }
.fchip button:hover { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.fchip svg.i { width: 15px; height: 15px; }
.filters .input { width: auto; min-width: 150px; }
.filters .search { flex: 1; min-width: 220px; }
.filters .search .input { width: 100%; }

/* ---------- detail */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hero { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.avatar { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-size: 19px; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar.xl { width: 76px; height: 76px; border-radius: 16px; overflow: hidden; }
.result img.photo { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: var(--shadow); }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.hero .t { flex: 1; min-width: 220px; }
.hero h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero .meta { color: var(--text-3); font-size: 13.5px; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; padding: 12px 16px; cursor: pointer; color: var(--text-3); font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.tabs .count { background: var(--surface-3); border-radius: 99px; padding: 0 7px; font-size: 11.5px; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .t { flex: 1; min-width: 0; }
.list-item .t b { display: block; font-weight: 600; }
.list-item .t small { color: var(--text-3); font-size: 13px; }
.list-item.click { cursor: pointer; } .list-item.click:hover { background: var(--surface-2); }
.empty { padding: 36px 20px; text-align: center; color: var(--text-3); }
.empty svg.i { width: 34px; height: 34px; stroke-width: 1.4; margin-bottom: 8px; color: var(--line-strong); }
.empty b { display: block; color: var(--text-2); margin-bottom: 4px; font-weight: 600; }
.note { padding: 11px 14px; border-radius: var(--r); background: var(--info-soft); color: var(--info); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.note.warn { background: var(--warn-soft); color: var(--warn); } .note.bad { background: var(--bad-soft); color: var(--bad); } .note.ok { background: var(--ok-soft); color: var(--ok); }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .ev { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.timeline .ev::before { content: ''; position: absolute; inset-inline-start: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline .ev:last-child::before { display: none; }
.timeline .ev .d { width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); flex: none; margin-top: 3px; }
.timeline .ev.done .d { background: var(--primary); }
.timeline .ev.bad .d { background: var(--bad); }
.timeline .ev small { color: var(--text-3); display: block; font-size: 12.5px; }
.steps { display: flex; gap: 0; margin: 4px 0 16px; }
.steps div { flex: 1; text-align: center; font-size: 12px; color: var(--text-3); position: relative; padding-top: 22px; }
.steps div::before { content: ''; position: absolute; top: 6px; inset-inline-start: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); transform: translateX(50%); z-index: 1; }
[dir='ltr'] .steps div::before { transform: translateX(-50%); }
.steps div::after { content: ''; position: absolute; top: 11px; inset-inline-start: 0; inset-inline-end: 0; height: 2px; background: var(--surface-3); }
.steps div.on { color: var(--text); font-weight: 600; }
.steps div.on::before, .steps div.done::before { background: var(--primary); }
.steps div.done::after { background: var(--primary); }
.steps div.bad::before { background: var(--bad); }

/* ---------- drawer / modal / toast */
#layer { position: relative; z-index: 60; }
.scrim { position: fixed; inset: 0; background: rgba(8, 14, 13, .42); animation: fade .15s; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(520px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .18s ease-out; }
.drawer.wide { width: min(880px, 100vw); }
[dir='rtl'] .drawer { animation-name: slide-rtl; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 18px; }
.drawer-h h2 { flex: 1; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-f { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 24px)); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .15s ease-out; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal.wide { width: min(720px, calc(100vw - 32px)); }
.modal .drawer-b { padding: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes slide-rtl { from { transform: translateX(-40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }
#toasts { position: fixed; bottom: 18px; inset-inline-start: 50%; transform: translateX(50%); display: flex; flex-direction: column; gap: 8px; z-index: 90; align-items: center; pointer-events: none; }
[dir='ltr'] #toasts { transform: translateX(-50%); }
.toast { background: #14201E; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 520px; animation: pop2 .2s; display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
@keyframes pop2 { from { transform: translateY(10px); opacity: 0; } }
.menu { position: fixed; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 230px; max-height: calc(100vh - 20px); overflow-y: auto; z-index: 70; animation: fade .1s; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 12px; min-height: 40px; border-radius: 10px; cursor: pointer; text-align: start; font-size: 14px; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu button.bad { color: var(--bad); }
.menu .lbl { font-size: 12px; color: var(--text-3); padding: 6px 10px 2px; font-weight: 600; }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line-strong); border-top-color: var(--primary); border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 50px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 20% 10%, #1A8C7D 0%, #0B4D47 45%, #082E2B 100%); color: #E5F4F1; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h1 { font-size: 34px; color: #fff; max-width: 460px; }
.auth-art p { color: #A9D3CB; max-width: 440px; margin-top: 12px; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: #CFE9E4; }
.auth-form { display: grid; place-items: center; padding: 32px; position: relative; }
.auth-form .box { width: min(380px, 100%); }
.auth-form h2 { font-size: 22px; margin-bottom: 4px; }
.auth-tools { position: absolute; top: 16px; inset-inline-end: 16px; display: flex; gap: 6px; }
.pin-dots { display: flex; gap: 10px; justify-content: center; }
.demo-accts { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 10px; font-size: 13px; }
.demo-accts button { display: flex; width: 100%; border: 0; background: transparent; padding: 5px 8px; border-radius: 6px; cursor: pointer; justify-content: space-between; color: var(--text-2); }
.demo-accts button:hover { background: var(--surface-2); color: var(--text); }
.branch-pick { display: grid; gap: 8px; }
.branch-pick button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: start; }
.branch-pick button:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- gate */
.gate { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.sess-list { display: flex; flex-direction: column; gap: 8px; }
.sess { border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; background: var(--surface); cursor: pointer; display: flex; gap: 12px; align-items: center; }
.sess:hover { border-color: var(--line-strong); }
.sess.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.sess .time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; font-size: 15px; }
.sess .time small { display: block; font-weight: 500; color: var(--text-3); font-size: 11.5px; }
.sess .t { flex: 1; min-width: 0; }
.sess .t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess .t small { color: var(--text-3); font-size: 12.5px; }
.sess .bar { height: 4px; background: var(--surface-3); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.sess .bar i { display: block; height: 100%; background: var(--primary); }
.sess.past { opacity: .6; }
.sess.cancelled { opacity: .5; text-decoration: line-through; }
.scan-box { padding: 22px; }
.result { border-radius: var(--r-lg); padding: 18px; display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; border: 1px solid var(--line); }
.result.ok { background: var(--ok-soft); border-color: transparent; }
.result.warn { background: var(--warn-soft); border-color: transparent; }
.result.bad { background: var(--bad-soft); border-color: transparent; }
.result .big { font-size: 20px; font-weight: 700; }
.result .ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); }
.result.ok .ico { color: var(--ok); } .result.warn .ico { color: var(--warn); } .result.bad .ico { color: var(--bad); }
.result .ico svg.i { width: 26px; height: 26px; stroke-width: 2.4; }
.cam { position: relative; border-radius: var(--r); overflow: hidden; background: #000; margin-top: 12px; }
.cam video { width: 100%; display: block; max-height: 320px; object-fit: cover; }

/* ---------- id card / receipt (also print) */
.id-card { width: 340px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #fff; color: #17201E; box-shadow: var(--shadow); }
.id-card .h { background: #0E5E57; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.id-card .b { display: flex; gap: 14px; padding: 16px; align-items: center; }
.id-card .b .qr svg { width: 120px; height: 120px; display: block; }
.id-card .b b { font-size: 18px; display: block; line-height: 1.4; }
.id-card .code { font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: .1em; margin-top: 6px; direction: ltr; }
.receipt { width: 300px; font-size: 13px; color: #000; background: #fff; padding: 14px; border: 1px dashed #999; }
.receipt h3 { text-align: center; } .receipt .r { display: flex; justify-content: space-between; padding: 3px 0; }
#print { display: none; }
@media print {
  html, body { background: #fff !important; }
  body > *:not(#print) { display: none !important; }
  #print { display: block !important; }
  .id-card, .receipt { box-shadow: none; }
  /* browsers drop background colours when printing unless told otherwise: keep the card's green header */
  #print, #print * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  .id-card { border-color: #CBD3D0; break-inside: avoid; }
  @page { margin: 12mm; }
}

/* ---------- schedule */
.cal { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal-head { display: contents; }
.cal-head div { padding: 9px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: center; color: var(--text-2); }
.cal-head div.today { color: var(--primary); }
.cal-col { position: relative; border-inline-start: 1px solid var(--line); }
.cal-hours { position: relative; }
.cal-hours div { position: absolute; inset-inline: 0; font-size: 11px; color: var(--text-3); text-align: center; transform: translateY(-50%); }
.cal-line { position: absolute; inset-inline: 0; border-top: 1px dashed var(--line); }
.ev-block { position: absolute; inset-inline: 3px; border-radius: 7px; padding: 4px 6px; font-size: 11.5px; line-height: 1.3; overflow: hidden; cursor: pointer; border-inline-start: 3px solid var(--primary); background: var(--primary-soft); color: var(--text); }
.ev-block:hover { z-index: 2; box-shadow: var(--shadow-lg); }
.ev-block b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-block.cancelled { background: var(--bad-soft); border-color: var(--bad); text-decoration: line-through; opacity: .8; }
.ev-block.held { background: var(--surface-3); border-color: var(--text-3); }

/* ---------- dashboards */
.dash-tabs { display: flex; gap: 6px; align-items: flex-end; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.dash-tabs .tabs { border-bottom: 0; }
.w .w-x { opacity: .55; } .w:hover .w-x, .w .w-x:focus-visible { opacity: 1; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; grid-auto-flow: row dense; }
.w { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 130px; min-width: 0; position: relative; }
.w.sm { grid-column: span 3; } .w.md { grid-column: span 6; } .w.lg { grid-column: span 8; } .w.xl { grid-column: span 12; }
.w-h { display: flex; align-items: center; gap: 6px; padding: 12px 14px 4px; }
.w-h h3 { flex: 1; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-b { padding: 6px 14px 14px; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.w .tools { display: none; gap: 2px; }
.editing .w .tools { display: flex; }
.editing .w { cursor: grab; outline: 1px dashed var(--line-strong); outline-offset: 3px; }
.w.dragging { opacity: .4; }
.w.drop { outline: 2px solid var(--primary); }
.kpi .v { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .d { font-size: 12.5px; margin-top: 2px; display: flex; gap: 6px; align-items: center; color: var(--text-3); }
.kpi .d b.up { color: var(--ok); } .kpi .d b.down { color: var(--bad); }
.chart { width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .axis-l { stroke: var(--line-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.tip { position: fixed; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12.5px; padding: 6px 9px; border-radius: 7px; z-index: 95; white-space: nowrap; box-shadow: var(--shadow-lg); }
.hbar-row { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; padding: 3px 0; }
.hbar-row .lb { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-2); }
.hbar-row .tr { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbar-row .tr i { display: block; height: 100%; border-radius: 4px; background: var(--c1); }
.hbar-row .vl { font-variant-numeric: tabular-nums; font-weight: 600; }
.builder { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; }
.builder .preview { background: var(--surface-2); border-radius: var(--r-lg); padding: 16px; min-height: 340px; }
.chart-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chart-pick button { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 8px 4px; cursor: pointer; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2); }
.chart-pick button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- roles matrix */
.perm-group { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.perm-group > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); font-weight: 600; }
.perm-group > header span { flex: 1; }
.perm-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); }
.perm-row .t { flex: 1; } .perm-row .t small { display: block; color: var(--text-3); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.role-list .list-item.on { background: var(--primary-soft); }
.opt-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-bottom: 6px; }
.drag-h { cursor: grab; color: var(--text-3); }

/* ---------- public / portal */
.public { max-width: 640px; margin: 0 auto; padding: 24px 16px 60px; }
.public .brand-line { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.big-amount { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .w.sm { grid-column: span 6; } .w.md, .w.lg { grid-column: span 12; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; transform: translateX(110%); transition: transform .2s; visibility: hidden; }
  [dir='ltr'] .side { transform: translateX(-110%); }
  .side.open { transform: none !important; box-shadow: var(--shadow-lg); visibility: visible; }
  .side-scrim { position: fixed; inset: 0; background: rgba(8, 14, 13, .42); z-index: 29; }
  .menu-btn { display: grid; }
  .content { padding: 16px; }
  .top { padding: 10px 14px; gap: 8px; }
  .search-btn .txt, .search-btn .kbd { display: none; }
  .search-btn { flex: 0 0 44px; padding: 0; justify-content: center; }
  .subnav-wrap { grid-template-columns: 1fr; }
  .subnav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; }
  .subnav .grp { display: contents; } .subnav .g { display: none; }
  .subnav a { width: auto; white-space: nowrap; }
  .gate, .g2, .g3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .form.cols { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 120px 1fr; }
  .top .hide-sm { display: none; }
}
@media (max-width: 520px) { .w.sm { grid-column: span 12; } .g4 { grid-template-columns: 1fr; } }

/* ---------------- brand: بالملّي | BELMELLI */
.lockup { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; color: var(--brand); }
.lockup .ar { font-family: var(--brand-font); font-weight: 800; font-size: 64px; line-height: 1.1; letter-spacing: -.5px; }
.lockup .ruler { display: flex; gap: 4px; align-items: flex-start; height: 20px; border-top: 2.5px solid currentColor; padding: 0 2px; direction: ltr; color: var(--text); }
.lockup .ruler i { width: 2px; height: 6px; background: currentColor; border-radius: 0 0 2px 2px; }
.lockup .ruler i.m { height: 10px; } .lockup .ruler i.l { height: 14px; }
.lockup .ruler i.hit { width: 4px; height: 20px; background: var(--brand-accent); }
.lockup .en { font-family: var(--brand-latin); font-weight: 600; font-size: 18px; letter-spacing: .46em; padding-left: .46em; color: var(--text); }
.lockup.on-dark { color: #fff; } .lockup.on-dark .ruler { color: #5FC2B4; } .lockup.on-dark .en { color: #5FC2B4; }
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.auth-brand .tag { color: #A9D3CB; font-size: 15px; }
.auth-art .org { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.auth-art .org .brand-mark { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.14); }
.brand-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: #4D5955; }
.brand-inline b { font-family: var(--brand-font); font-weight: 800; font-size: 13px; color: #0E5E57; }
.brand-inline i { width: 2px; height: 12px; background: #E9962E; display: block; }
.brand-inline span { font-family: var(--brand-latin); font-weight: 600; letter-spacing: .04em; }
.brand-inline.foot { display: flex; justify-content: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #bbb; }
.id-card .f { display: flex; justify-content: center; padding: 6px 12px 8px; border-top: 1px solid #E6E9E5; }

/* ================================================================ v3 additions */
/* gate: session tabs on top, scan + attendance in the middle, session and cash on the side */
.sess-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 14px; }
.sess-tab { flex: none; min-width: 176px; text-align: start; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.sess-tab .tm { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sess-tab b { font-size: 15px; }
.sess-tab small { color: var(--text-3); font-size: 12.5px; }
.sess-tab:hover { border-color: var(--line-strong); }
.sess-tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.sess-tab[aria-selected="true"] .tm, .sess-tab[aria-selected="true"] small { color: inherit; opacity: .85; }
.sess-tab[aria-selected="true"] .badge { background: rgba(255, 255, 255, .2); color: inherit; }
.sess-tab.past:not([aria-selected="true"]) { opacity: .7; }
.sess-tab.cancelled { opacity: .5; text-decoration: line-through; cursor: not-allowed; }
.gate { display: block; }
.gate-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.gate-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.scan-box { padding: 18px; }
.scan-lbl { display: block; font-weight: 700; margin-bottom: 8px; }
.scanbox { display: flex; align-items: center; gap: 10px; border: 2px solid var(--primary); border-radius: 14px; padding: 0 6px; padding-inline-start: 14px; height: 64px; background: var(--surface); color: var(--text-3); }
.scanbox input { border: 0; background: none; outline: none; flex: 1; font-size: 21px; min-width: 0; color: var(--text); }
.scanbox:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 35%, transparent); }
.scanbox .btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-ink); }
.scan-result .result { margin-top: 14px; }
.result { border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); background: var(--surface-2); }
.result.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.result.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.result.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.result .big { font-size: 20px; font-weight: 700; }
.result .ico { width: 56px; height: 56px; border-radius: 14px; }
.result img.photo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; }
.sess-card h2 { font-size: 18px; margin-top: 2px; }
.big-count { margin: 12px 0 6px; font-size: 14px; color: var(--text-3); }
.big-count b { font-size: 30px; color: var(--text); font-variant-numeric: tabular-nums; margin-inline-end: 4px; }
.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); }
.sess-card .note { font-size: 13px; }

/* home */
.home-head h1 { font-size: 26px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.todo, .today-list { list-style: none; margin: 0; padding: 0; }
.todo li, .today-list li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.todo li:last-child, .today-list li:last-child { border-bottom: 0; }
.todo .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); flex: none; }
.todo li.warn .ico { background: var(--warn-soft); color: var(--warn); }
.todo li.info .ico { background: var(--info-soft); color: var(--info); }
.todo .t, .today-list .t { flex: 1; min-width: 0; }
.todo .t b, .today-list .t b { display: block; }
.todo .t small, .today-list .t small { display: block; color: var(--text-3); font-size: 13px; }
.today-list .tm { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; }
.today-list li.live { background: var(--ok-soft); }
.today-list li.past { color: var(--text-3); }

/* search palette */
.modal.palette { top: 12vh; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); }
[dir='rtl'] .modal.palette { transform: translateX(-50%); }
.palette .pin-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.palette input { border: 0; outline: none; background: none; flex: 1; font-size: 17px; height: 40px; color: var(--text); min-width: 0; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette li[role=option] { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.palette li[role=option] .t { flex: 1; min-width: 0; }
.palette li[role=option] .t b { display: block; font-weight: 600; }
.palette li[role=option] .t small { display: block; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette li[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-ink); }
.palette li[aria-selected="true"] small { color: inherit; }
.palette .grp { font-size: 12px; color: var(--text-3); padding: 8px 12px 2px; font-weight: 700; }
.palette .empty { padding: 24px; }
.pal-foot { padding: 8px 16px; border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
@keyframes pal { from { opacity: 0; transform: translate(-50%, -8px); } }
.modal.palette { animation: pal .12s ease-out; }

/* popovers (approvals bell) */
.pop { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(420px, calc(100vw - 16px)); max-height: calc(100vh - 90px); overflow-y: auto; animation: fade .1s; }
.pop-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pop-list { list-style: none; margin: 0; padding: 0; }
.pop-list li { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pop-list li:last-child { border-bottom: 0; }
.pop-list .t { flex: 1; min-width: 0; }
.pop-list .t b { display: block; font-size: 14px; }
.pop-list .t small { display: block; font-size: 12.5px; color: var(--text-2); }
.pop-list .t small.muted { color: var(--text-3); }
.pop-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
.pop .empty { padding: 24px; }

/* misc */
details.more { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details.more summary { padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
details.more[open] summary { border-bottom: 1px solid var(--line); }
details.more .in { padding: 14px; }
.form details.more { grid-column: 1 / -1; }
.form details.more .in { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form details.more .in > .full, .form details.more .in > .form-sec { grid-column: 1 / -1; }
.msg-preview { white-space: pre-wrap; font-family: var(--font); font-size: 13.5px; background: var(--surface-2); border-radius: 10px; padding: 12px; margin: 0; }
.tbl.keys td { padding: 10px 6px; }
.err-sum { grid-column: 1 / -1; }
.err-sum ul { margin: 4px 0 0; padding-inline-start: 18px; }
.err-sum a { color: inherit; text-decoration: underline; }

@media (max-width: 1100px) {
  .gate-cols { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .form details.more .in { grid-template-columns: 1fr; }
  .page-head .actions .btn.lg { height: 46px; }
  .modal.palette { top: 8px; }
}
.end-btn, .report-btn { width: 100%; justify-content: center; }
.times-box { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.times-box .tb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.times-box .tb-k { color: var(--text-3); font-size: 13px; min-width: 52px; }
.times-box .tb-row > span:nth-child(2) { display: inline-flex; gap: 6px; align-items: center; }
.start-btn { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.ended-box { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 10px 12px; }
.ended-box .muted { color: inherit; opacity: .85; }
.ended-box .btn.link { padding: 0; height: auto; margin-top: 4px; color: inherit; text-decoration: underline; }

/* form boxes (e.g. new student: student box, guardian box) */
fieldset.fbox { border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px 16px; margin: 0; min-width: 0; background: var(--surface); }
fieldset.fbox > legend { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--primary); padding: 0 6px; }
fieldset.fbox > .form { margin-top: 4px; }
/* multi-select dropdown */
.ms-wrap { position: relative; }
.ms-btn { display: flex; align-items: center; gap: 8px; text-align: start; cursor: pointer; }
.ms-btn .ms-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-btn .ms-text.muted { color: var(--text-3); }
.ms-panel { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ms-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.ms-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.ms-opt:hover { background: var(--surface-2); }
.ms-opt:has(input:checked) { background: var(--primary-soft); color: var(--primary-ink); }
.ms-opt input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }
.ms-opt b { display: block; font-weight: 600; }
.ms-opt small { display: block; color: var(--text-3); font-size: 12.5px; }
.ms-grp { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 8px 10px 2px; }
.ms-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 6px; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-chips:empty { display: none; }
.fchip small { font-weight: 400; opacity: .8; }

/* ---------- ID card at real size (CR80 85.6 × 54 mm): front and back */
.card-face { width: 85.6mm; height: 54mm; box-sizing: border-box; overflow: hidden; position: relative; display: flex; flex-direction: column; font-family: var(--font) !important; border-radius: 3.2mm; background: #fff; color: #10201D; line-height: 1.3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.card-face * { font-family: inherit; }
.card-face svg.i { stroke-width: 2; }
/* front */
.card-front .cf-head { background: #0F2A27; color: #fff; height: 10.5mm; flex: none; padding: 0 4mm; display: flex; align-items: center; gap: 2mm; border-bottom: .9mm solid #E9962E; }
.cf-org { flex: 1; min-width: 0; font-size: 3.6mm; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-branch { display: inline-flex; align-items: center; gap: .8mm; font-size: 2.3mm; font-weight: 600; background: #1E4B46; color: #fff; padding: .8mm 2.4mm; border-radius: 99px; white-space: nowrap; flex: none; }
.cf-branch svg.i { width: 2.6mm; height: 2.6mm; }
.cf-body { flex: 1; display: flex; align-items: center; gap: 3.5mm; padding: 2mm 4mm 1.2mm; min-height: 0; }
.cf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1.6mm; padding-inline-end: 3mm; border-inline-end: .3mm solid #D5DCD9; align-self: stretch; justify-content: center; }
.cf-kind { display: inline-flex; align-items: center; gap: 1mm; font-size: 2.3mm; font-weight: 600; background: #E3F1EE; color: #0A4540; padding: .6mm 2.2mm; border-radius: 1.6mm; }
.cf-kind svg.i { width: 3mm; height: 3mm; }
.cf-name { font-size: 4.6mm; font-weight: 700; line-height: 1.3; max-height: 12mm; overflow: hidden; color: #0F2A27; }
.cf-grade { font-size: 2.8mm; font-weight: 700; background: #E3F1EE; color: #0A4540; padding: .7mm 3mm; border-radius: 1.6mm; box-shadow: inset -.8mm 0 0 #E9962E; }
.cf-qr { width: 27mm; height: 27mm; flex: none; }
.cf-qr svg { width: 100%; height: 100%; display: block; }
/* footer (both sides): ruler + بالملّي */
.cf-foot { height: 6.5mm; flex: none; display: flex; align-items: center; gap: 2.5mm; padding: 0 4mm; border-top: .25mm solid #E3E8E6; }
.cr-ruler { flex: 1; display: flex; justify-content: space-between; align-items: flex-start; height: 2.6mm; border-top: .35mm solid #0E5E57; direction: ltr; }
.cr-ruler i { width: .25mm; height: .9mm; background: #0E5E57; }
.cr-ruler i.m { height: 1.4mm; } .cr-ruler i.l { height: 1.9mm; }
.cr-ruler i.hit { width: .6mm; height: 2.6mm; background: #E9962E; }
.cf-brand { display: flex; align-items: center; gap: 1.2mm; font-size: 2.1mm; color: #55625F; flex: none; }
.card-face .cf-brand b { font-family: var(--brand-font); font-weight: 800; color: #0E5E57; font-size: 2.8mm; }
.cf-brand i { width: .3mm; height: 2.4mm; background: #E9962E; display: block; }
.card-face .cf-brand .en { font-family: var(--brand-latin); font-weight: 600; }
.cf-foot.dark { background: #0B201E; border-top: 0; margin: 0 -4mm; padding: 0 4mm; }
.cf-foot.dark .cr-ruler { border-top-color: #5FC2B4; } .cf-foot.dark .cr-ruler i { background: #5FC2B4; } .cf-foot.dark .cr-ruler i.hit { background: #E9962E; }
.cf-foot.dark .cf-brand { color: #A9C9C3; } .card-face .cf-foot.dark .cf-brand b { color: #fff; }
.card-face .cf-foot.dark .en { color: #5FC2B4; letter-spacing: .5mm; }
/* back */
.card-back { background: #0F2A27; color: #E6F0EE; padding: 3.2mm 4mm 0; }
.cb-org { font-size: 4mm; font-weight: 700; color: #fff; line-height: 1.2; }
.cb-sub { font-size: 2.3mm; color: #A9C9C3; margin-top: .3mm; }
.cb-rules { margin-top: 1.8mm; display: flex; flex-direction: column; }
.cb-rule { display: flex; align-items: center; gap: 1.8mm; padding: 1.1mm 0; border-bottom: .25mm solid #2B504B; }
.cb-rule .n { width: 4mm; height: 4mm; border-radius: 1mm; background: #E9962E; color: #2A1600; display: grid; place-items: center; font-size: 2.3mm; font-weight: 700; flex: none; }
.cb-rule .t { flex: 1; font-size: 2.45mm; font-weight: 600; color: #fff; }
.cb-rule svg.ri { width: 3.6mm; height: 3.6mm; color: #A9C9C3; flex: none; }
.cb-contact { flex: 1; display: flex; align-items: center; gap: 2mm; font-size: 2.3mm; min-height: 0; }
.cb-contact .c { display: inline-flex; align-items: center; gap: 1mm; min-width: 0; }
.cb-contact .c b { color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-contact .c [dir=ltr] { unicode-bidi: embed; }
.cb-contact svg.i { width: 3mm; height: 3mm; color: #E9962E; flex: none; }
.cb-contact .sep { width: .3mm; height: 4mm; background: #2B504B; flex: none; }
.card-preview { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.card-preview figure { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.card-preview figcaption { font-size: 13px; color: var(--text-3); font-weight: 600; }
.card-preview .card-face { zoom: 1.3; box-shadow: 0 2px 10px rgba(16, 32, 30, .14); border: 1px solid #E3E8E6; }
@media print {
  #print .card-face { border-radius: 0; box-shadow: none; border: 0; break-after: page; page-break-after: always; }
  #print .card-face:last-child { break-after: auto; page-break-after: auto; }
}
@media (max-width: 860px) { .card-preview .card-face { zoom: 1; } }

/* pick lists (make-up request) */
.list-item.pick { width: 100%; text-align: start; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font: inherit; color: inherit; }
.list-item.pick:hover { background: var(--surface-2); }
.list-item.pick.on { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.list-item.pick:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* session notes at the desk */
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.note-list li { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: var(--warn-soft, var(--surface)); }
.note-list li > span { flex: 1; }

/* ================================================================ v4 — the approved Nov 2026 look
   calm page, title and search on the same line, soft cards, icons that carry the colour */
.side { padding: 22px 14px; gap: 18px; }
.branch-btn { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); }
.branch-btn:hover { background: rgba(255, 255, 255, .10); }
.branch-btn .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4CC9A0; flex: none; }
.nav { gap: 4px; }
.nav a, .side-foot > a, .side-foot > button { border-radius: 12px; font-size: 14.5px; padding: 10px 14px; }
.nav a:hover, .side-foot > a:hover, .side-foot > button:hover { background: rgba(255, 255, 255, .06); }
.nav a[aria-current="page"], .side-foot > a[aria-current="page"], [dir='ltr'] .nav a[aria-current="page"], [dir='ltr'] .side-foot > a[aria-current="page"] { background: rgba(255, 255, 255, .10); box-shadow: none; color: #fff; }
.nav a svg.i, .side-foot > a svg.i { opacity: .9; }
.side-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
@media (min-width: 861px) {
  .top { position: static; background: transparent; border-bottom: 0; padding: 26px 36px 0; max-width: 1240px; width: 100%; margin: 0 auto; min-height: 0; gap: 16px; }
  .top .ttl { flex: 1 1 auto; }
  .top .ttl b { font-size: 24px; }
  .top .ttl .crumb { font-size: 13px; margin-bottom: 2px; }
  .search-btn { background: var(--surface); flex: 0 1 360px; margin-inline-start: auto; }
  .content { padding: 22px 36px 48px; max-width: 1240px; }
}
.icon-btn .dot { top: 6px; inset-inline-end: 6px; }
.hub { margin: 0 0 22px; }
.card { border-radius: 18px; }
.card-h { padding: 14px 22px; border-bottom-color: var(--line); }
.card-h h2 { font-size: 17px; }
.card-b { padding: 22px; }
.page-head h1 { font-size: 24px; }
.page-head { margin-bottom: 22px; }
/* stat cards: label with a coloured icon, then a big number */
.tiles { gap: 16px; margin-bottom: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile { border-radius: 18px; padding: 18px 20px; }
.tile .k { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.tile .k .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.tile .v { font-size: 28px; margin-top: 12px; letter-spacing: -.3px; }
.tile .s { font-size: 13px; margin-top: 2px; }
.tile.warn, .tile.bad, .tile.hl { background: var(--surface); border-color: var(--line); }
.tile.warn .ico { background: var(--warn-soft); color: var(--warn); }
.tile.bad .ico { background: var(--bad-soft); color: var(--bad); }
.tile.info .ico { background: var(--info-soft); color: var(--info); }
.tile.solid { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tile.solid .k, .tile.solid .s { color: color-mix(in srgb, var(--on-primary) 80%, transparent); }
.tile.solid .ico { background: rgba(255, 255, 255, .14); color: var(--on-primary); }
/* home */
.home-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
.home-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.todo li, .today-list li { padding: 14px 22px; }
.todo .ico { width: 36px; height: 36px; background: var(--primary-soft); color: var(--primary); }
.todo li.bad .ico { background: var(--bad-soft); color: var(--bad); }
.todo .t b { font-size: 14px; font-weight: 600; }
.todo .t small { font-size: 12.5px; }
.todo .go { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.today-list li { gap: 16px; }
.today-list li.live { background: none; }
.today-list li.past { color: inherit; }
.today-list .tm { min-width: 64px; text-align: center; }
.today-list .tm b { display: block; font-size: 15px; }
.today-list .tm small { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; }
.today-list .t b { font-weight: 600; }
.today-list .side-st { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.bar.big { height: 8px; }
.badge { font-weight: 600; font-size: 12.5px; }
.top .ttl h1.top-h1 { font-size: 24px; }
.top .ttl .top-sub { color: var(--text-3); font-size: 14px; margin-top: 4px; }
@media (min-width: 861px) { .top .ttl .only-sm { display: none; } }
@media (max-width: 860px) { .top .ttl h1.top-h1 { font-size: 18px; } .top .ttl .top-sub { display: none; } }
.home-head.slim { margin-top: -6px; }
.home-head.slim .actions { margin-inline-start: auto; }
.home-grid .card-h a.small { font-weight: 600; }
.badge .dot { display: inline-block; margin-inline-end: 2px; }
@media (max-width: 860px) { .today-list .side-st .small { display: none; } }
.tile.warn .v, .tile.bad .v, .tile.info .v, .tile.hl .v { color: var(--text); }
.todo li .t b, .todo li.warn .t b, .todo li.bad .t b, .todo li.info .t b { color: var(--text); }
.tile.warn, .tile.bad, .tile.ok, .todo li.warn, .todo li.bad, .todo li.ok, .today-list li { color: var(--text); }
/* person card (student page) */
.person-card { padding: 24px; margin-bottom: 18px; }
.person-top { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.person-top .t { flex: 1 1 280px; min-width: 0; }
.person-top h1 { font-size: 24px; }
.person-top .meta { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; color: var(--text-3); }
.big-av { width: 72px; height: 72px; border-radius: 20px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.stat { flex: 1 1 160px; min-width: 0; padding: 16px 18px; border-radius: 14px; background: var(--bg); }
.stat .k { font-size: 13px; color: var(--text-3); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.bad .v { color: var(--bad); } .stat.ok .v { color: var(--ok); }
.split.wide-side { grid-template-columns: minmax(0, 1fr) 380px; }
.rich-list { list-style: none; margin: 0; padding: 0; }
.rich-list li { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.rich-list li:last-child { border-bottom: 0; }
.rich-list .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.rich-list .t { flex: 1; min-width: 0; }
.rich-list .t b { display: block; font-weight: 600; color: var(--text); }
.rich-list .t a { text-decoration: none; }
.rich-list .t small { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
@media (max-width: 1100px) { .split.wide-side { grid-template-columns: 1fr; } }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* gate */
.sess-tab { flex: 1 1 200px; max-width: 340px; }
.result { border-radius: 18px; padding: 20px 22px; align-items: center; }
.result.ok { border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.result.ok .ico { background: var(--ok); color: #fff; width: 52px; height: 52px; }
.result.bad .ico { background: var(--bad); color: #fff; }
.result.warn .ico { background: var(--warn); color: #fff; }
.scan-box { padding: 22px; }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile .k .ico { width: 32px; height: 32px; border-radius: 10px; }
  .tile .v { font-size: 22px; margin-top: 8px; }
  .person-card { padding: 18px; }
  .big-av { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
  .stat { flex-basis: 130px; }
}
.split > *, .home-grid > *, .stack > * { min-width: 0; }
.menu button:disabled { opacity: .5; cursor: not-allowed; }
.side .logo .logo-t { display: flex; flex-direction: column; line-height: 1.15; }
.side .logo .logo-t small { font-family: var(--brand-latin); font-size: 11px; font-weight: 600; letter-spacing: .22em; color: var(--side-muted); }
.stat-h { font-size: 14px; font-weight: 650; color: var(--text-2); margin: 4px 0 -10px; }
/* month close */
.mc { display: flex; flex-direction: column; gap: 2px; }
.mc-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.mc-row.strong { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 16px; }
.mc hr { border: 0; border-top: 1px dashed var(--line); margin: 8px 0; }
/* family */
.fam-note { align-items: flex-start; }
.fam-list { margin: 4px 0; padding-inline-start: 18px; font-size: 13.5px; }
.person-top .meta .sibs { display: inline-flex; align-items: center; gap: 4px; }
.person-top .meta .sibs svg.i { width: 15px; height: 15px; }
.badge.fam { margin-inline-start: 6px; padding: 0 6px; font-size: 11.5px; }
.badge.fam svg.i { width: 12px; height: 12px; vertical-align: -2px; }
/* gate: requests waiting for a manager */
.wait-strip { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); border-radius: 16px; padding: 12px 16px; margin: 0 0 16px; }
.wait-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; color: var(--warn); }
.wait-h b { color: var(--text); }
.wait-list { display: flex; flex-wrap: wrap; gap: 8px; }
.wait-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 240px; flex: 0 1 auto; }
.wait-item .t { flex: 1; min-width: 0; }
.wait-item .t b { display: block; font-size: 14px; }
.wait-item .t small { color: var(--text-3); font-size: 12px; }
.wait-item.done { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.wait-item.rejected { opacity: .75; }

/* guardian message templates */
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-text { font-family: inherit; line-height: 1.7; min-height: 200px; resize: vertical; }
.tpl-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-fields .chip { cursor: pointer; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line, #ddd); background: var(--soft, #f6f6f6); color: inherit; }
.tpl-fields .chip:hover { border-color: var(--accent, #2a6); }
.tpl-preview { white-space: pre-wrap; line-height: 1.75; padding: 14px 16px; border-radius: 14px 14px 4px 14px; background: #dcf8c6; color: #111; font-size: 14px; max-width: 420px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }

/* combo: pick from a list by typing */
.combo { position: relative; }
.combo-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; max-height: 240px; overflow: auto; background: var(--card, #fff); border: 1px solid var(--line, #ddd); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; }
.combo-item { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.combo-item.on, .combo-item:hover { background: var(--soft, #f3f3f3); }
.combo-item.add { color: var(--accent, #1a7f5a); font-weight: 600; border-top: 1px solid var(--line, #eee); }
.combo-item.none { color: var(--muted, #888); cursor: default; }
.input.combo-unknown { border-color: var(--warn, #c80); }

/* teacher account (live ledger) */
.ledger .tiles .tile .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ledger-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 15px; margin: 6px 0 0; }
.ledger-h small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.ledger-sub { display: flex; flex-wrap: wrap; gap: 18px; justify-content: flex-end; padding: 8px 12px; background: var(--soft, #f5f7f6); border-radius: 10px; font-size: 13px; }
.ledger td .sub { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- login v2 */
.auth { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); background: var(--bg); }
.auth-art { position: relative; overflow: hidden; padding: 40px 56px 32px; gap: 28px;
  background: radial-gradient(900px 520px at 85% 0%, #1E8A7C 0%, rgba(30,138,124,0) 60%), radial-gradient(700px 500px at 0% 100%, #0A3A35 0%, rgba(10,58,53,0) 70%), linear-gradient(160deg, #0F5D55 0%, #0B4640 55%, #072B28 100%); }
.auth-art::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 75%); }
.auth-art > * { position: relative; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.auth-logo { display: flex; align-items: center; gap: 14px; }
.auth-logo .mk { width: 58px; height: 58px; border-radius: 16px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.auth-logo b { display: block; font-family: var(--brand-font); font-weight: 800; font-size: 30px; line-height: 1.35; color: #fff; }
.auth-logo small { display: block; font-family: var(--brand-latin); font-size: 10.5px; font-weight: 600; letter-spacing: .32em; color: #7FD0C3; margin-top: 2px; }
.auth-art .org { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 13px; color: #E5F4F1; }
.auth-art .org svg { width: 16px; height: 16px; }
.auth-hero .eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: #F2B661; letter-spacing: .02em; margin-bottom: 14px; }
.auth-hero h1 { font-family: var(--brand-font); font-size: clamp(34px, 3.6vw, 52px); line-height: 1.25; font-weight: 800; color: #fff; max-width: 560px; margin: 0; }
.auth-hero h1 em { font-style: normal; color: #F2B661; }
.auth-hero p { color: #B6DCD4; max-width: 520px; margin-top: 16px; font-size: 16px; line-height: 1.8; }
.auth-stage { display: grid; gap: 12px; max-width: 460px; }
.auth-card { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 14px 40px rgba(0,0,0,.18); color: #fff; animation: authIn .7s cubic-bezier(.2,.8,.2,1) both, authFloat 7s ease-in-out infinite; }
.auth-card .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(95,194,180,.18); color: #7FD0C3; }
.auth-card .ic svg { width: 19px; height: 19px; }
.auth-card > div { flex: 1; min-width: 0; }
.auth-card b { display: block; font-size: 14.5px; font-weight: 650; }
.auth-card small { display: block; font-size: 12.5px; color: #A9D3CB; margin-top: 2px; }
.auth-card .tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.1); color: #CFE9E4; white-space: nowrap; }
.auth-card.c1 { margin-inline-end: 64px; animation-delay: .1s, 0s; }
.auth-card.c2 { margin-inline-start: 36px; margin-inline-end: 28px; animation-delay: .25s, 1.2s; }
.auth-card.c2 .ic { background: rgba(242,182,97,.18); color: #F2B661; }
.auth-card.c3 { margin-inline-start: 72px; animation-delay: .4s, 2.4s; }
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes authFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }
.auth-foot { display: grid; gap: 10px; color: #7FB5AB; }
.auth-ruler { display: flex; justify-content: space-between; align-items: flex-start; height: 18px; border-top: 2px solid rgba(255,255,255,.28); direction: ltr; }
.auth-ruler i { width: 1.5px; height: 5px; background: rgba(255,255,255,.28); }
.auth-ruler i.m { height: 8px; } .auth-ruler i.l { height: 12px; background: rgba(255,255,255,.45); }
.auth-ruler i.hit { width: 3px; height: 18px; background: #E9962E; border-radius: 0 0 2px 2px; box-shadow: 0 0 12px rgba(233,150,46,.7); }

.auth-form { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 40px 32px 24px; }
.auth-form .box { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 18px 50px rgba(15,42,39,.08); }
.auth-head { margin-bottom: 4px; }
.auth-head h2 { font-family: var(--brand-font); font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.org-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.org-chip svg { width: 14px; height: 14px; }
.auth-form .btn.lg { height: 50px; font-size: 16px; border-radius: 12px; }
.auth-form .input { height: 48px; border-radius: 12px; font-size: 16px; }
.demo-accts { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.demo-accts summary { cursor: pointer; padding: 0 4px 6px; list-style: none; }
.demo-accts summary::-webkit-details-marker { display: none; }
.auth-mobile-brand { display: none; }
.auth-legal { opacity: .8; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .auth-form { justify-content: flex-start; padding-top: 64px; background: radial-gradient(500px 260px at 50% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%); }
  .auth-mobile-brand { display: grid; justify-items: center; gap: 6px; text-align: center; }
  .auth-mobile-brand .mk svg { border-radius: 12px; box-shadow: 0 10px 24px rgba(14,94,87,.25); }
  .auth-mobile-brand b { font-family: var(--brand-font); font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.35; }
  .auth-mobile-brand small { color: var(--muted); }
  .auth-form .box { padding: 22px; box-shadow: none; }
}

/* sidebar logo: the Latin name sits under the Arabic one without touching it */
.side .logo .logo-t { gap: 3px; line-height: 1; }
.side .logo .logo-t b { font-size: 20px; line-height: 1.4; }
.side .logo .logo-t small { font-size: 9.5px; letter-spacing: .3em; line-height: 1; opacity: .85; }
@media (max-width: 480px) { .demo-accts button { font-size: 12px; } .demo-accts .mono { white-space: nowrap; } }

/* packages */
.pk-subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.pk-row { display: grid; grid-template-columns: auto 1fr 110px; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.pk-items { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-items .chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--soft, #f3f5f4); }

/* ---------------------------------------------------------------- login v3: the orbit (approved design «ب ٣») */
.auth { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { display: flex; flex-direction: column; gap: 0; padding: 44px 60px 36px; background: #072E2A; overflow: hidden; position: relative; }
.auth-art::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 1; mask-image: none; -webkit-mask-image: none;
  background: radial-gradient(480px 480px at 80% 8%, rgba(21,137,123,0.65), transparent 70%), radial-gradient(440px 440px at 12% 95%, rgba(15,106,96,0.75), transparent 70%), radial-gradient(240px 240px at 30% 28%, rgba(233,150,46,0.18), transparent 70%); }
.auth-logo { display: flex; align-items: center; gap: 16px; }
.auth-logo .mk { width: 60px; height: 60px; border-radius: 17px; background: rgba(255,255,255,0.12); border: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.auth-logo b { font-family: var(--brand-font); font-weight: 800; font-size: 28px; line-height: 1.5; color: #fff; display: block; }
.auth-logo small { display: block; font-family: var(--brand-latin); font-weight: 600; font-size: 9.5px; line-height: 1; letter-spacing: .28em; color: #8FD3C7; margin-top: 9px; text-align: right; }
.auth-hero { margin-top: 30px; max-width: 640px; }
.auth-hero h1 { font-family: var(--font); font-weight: 700; font-size: clamp(30px, 3.1vw, 44px); line-height: 1.45; color: #fff; margin: 0; }
.auth-hero h1 em { font-style: normal; color: #F2B661; }
.auth-hero p { color: #B2DCD4; font-size: 17px; line-height: 1.8; margin-top: 14px; max-width: 520px; }
.auth-orbit { position: relative; width: 100%; max-width: 680px; aspect-ratio: 680 / 520; margin: auto auto 0; }
.auth-orbit .orbit-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-orbit .core { position: absolute; width: 20.6%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 29%; display: grid; place-items: center;
  background: linear-gradient(160deg, #1E978A, #0A4842); border: 1px solid rgba(255,255,255,0.28); box-shadow: 0 0 0 12px rgba(255,255,255,0.05), 0 0 0 26px rgba(255,255,255,0.025), 0 34px 70px rgba(0,0,0,0.5); }
.auth-orbit .core svg { width: 69%; height: 69%; }
.auth-orbit .node { position: absolute; width: 140px; transform: translate(-50%, -31px); display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.auth-orbit .node b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: #fff; }
.auth-orbit .node small { display: block; font-size: 12px; line-height: 1.4; color: #9CCFC6; margin-top: -6px; }
.app-ic { width: 62px; height: 62px; border-radius: 19px; display: flex; align-items: center; justify-content: center; flex: none; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -2px 6px rgba(0,0,0,0.18), 0 14px 28px rgba(0,0,0,0.35); }
.app-ic svg { width: 28px; height: 28px; }
.app-ic.g1 { background: linear-gradient(160deg, #2BB39F, #0E6F64); } .app-ic.g2 { background: linear-gradient(160deg, #5B8DEF, #2F55B8); }
.app-ic.g3 { background: linear-gradient(160deg, #F5BE62, #D98A1F); } .app-ic.g4 { background: linear-gradient(160deg, #9C7CF0, #6644C4); }
.app-ic.g5 { background: linear-gradient(160deg, #3FC7D9, #1A8BA3); } .app-ic.g6 { background: linear-gradient(160deg, #EF7F6B, #C24C3A); }
@media (prefers-reduced-motion: reduce) { .auth-orbit animateMotion { display: none; } }
@media (max-height: 640px) { .auth-hero p { display: none; } }
/* the form */
.auth-form .box { width: min(420px, 100%); background: transparent; border: 0; box-shadow: none; padding: 0; }
.auth-head h2 { font-family: var(--font); font-weight: 700; font-size: 34px; line-height: 1.4; margin: 0 0 6px; }
.auth-head p { font-size: 16px; }
.auth-form .form { gap: 20px; }
.auth-form .input { height: 56px; border-radius: 16px; font-size: 17px; background: var(--surface); }
.pin-wrap { position: relative; }
.pin-wrap .input { padding-left: 76px; }
.pin-show { position: absolute; left: 8px; top: 8px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font: 600 14px var(--font); cursor: pointer; }
.pin-show:hover { background: var(--soft, rgba(0,0,0,0.04)); }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.auth-row .check { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.auth-row .check input { width: 18px; height: 18px; accent-color: var(--brand); }
.auth-row a { font-weight: 600; text-decoration: none; }
.auth-go { height: 58px; border-radius: 16px; font-size: 17px; gap: 10px; box-shadow: 0 14px 30px rgba(14,94,87,0.28); }
.auth-go svg { width: 20px; height: 20px; }
.auth-form .demo-accts { width: min(420px, 100%); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-mobile-brand .mk svg { width: 56px; height: 56px; } }
/* login v3: the whole page fits the screen — the orbit shrinks with the space left under the headline */
@media (min-width: 901px) {
  .auth { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .auth-art { height: 100%; min-height: 0; padding: clamp(20px, 4vh, 44px) clamp(28px, 4vw, 60px) clamp(12px, 2vh, 28px); }
  .auth-form { height: 100%; min-height: 0; overflow-y: auto; justify-content: safe center; }
  .auth-logo .mk { width: clamp(44px, 6.5vh, 60px); height: clamp(44px, 6.5vh, 60px); }
  .auth-logo .mk svg { width: 94%; height: 94%; }
  .auth-hero { margin-top: clamp(10px, 3vh, 30px); }
  .auth-hero h1 { font-size: clamp(24px, min(3.1vw, 5vh), 44px); }
  .auth-orbit-wrap { flex: 1 1 0; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; padding: 0 0 2%; }
  .auth-orbit { margin: 0; flex: none; width: min(100%, 680px, calc(100cqh * 680 / 520 * 0.98)); container-type: inline-size; }
  .auth-orbit .node { width: 22cqw; gap: 1.4cqw; transform: translate(-50%, -4.6cqw); }
  .app-ic { width: clamp(38px, 9.1cqw, 62px); height: clamp(38px, 9.1cqw, 62px); border-radius: clamp(12px, 2.8cqw, 19px); }
  .app-ic svg { width: clamp(18px, 4.1cqw, 28px); height: clamp(18px, 4.1cqw, 28px); }
  .auth-orbit .node b { font-size: clamp(11.5px, 2.15cqw, 14.5px); }
  .auth-orbit .node small { font-size: clamp(10px, 1.8cqw, 12px); margin-top: -0.8cqw; }
}
@media (min-width: 901px) and (max-height: 700px) { .auth-hero p { display: none; } }
/* exam statistics: distribution bars */
.dist { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.dist-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 36px; align-items: center; gap: 10px; font-size: 13.5px; }
.dist-row .db { height: 12px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.dist-row .db i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.dist-row .db i.ok { background: var(--ok); } .dist-row .db i.warn { background: var(--warn); } .dist-row .db i.bad { background: var(--bad); } .dist-row .db i.pri { background: var(--primary); }
.next-session { border-color: var(--primary); }
/* month close printed (or saved as PDF) */
#print .mc-print { padding: 10mm; color: #111; background: #fff; font-family: var(--font); direction: rtl; }
#print .mc-print-h { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #0E5E57; padding-bottom: 8px; margin-bottom: 14px; }
#print .mc-print-h h1 { margin: 0; font-size: 20px; }
#print .mc-print .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#print .mc-print .split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
#print .mc-print .split > .stack:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#print .mc-print .split > .stack:first-child > .card:last-child { grid-column: 1 / -1; }
#print .mc-print table { width: 100%; font-size: 11px; }
#print .mc-print .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; margin-bottom: 10px; }
#print .mc-print .note { break-inside: avoid; }
/* every printed page: the system's mark and name on top, and a small foot */
#print .print-doc { width: fit-content; max-width: 100%; margin: 0 auto; color: #111; background: #fff; direction: rtl; font-family: var(--font); }
#print .print-brand { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 2px 10px; margin-bottom: 10px; border-bottom: 2px solid #0E5E57; }
#print .print-brand .pb-l { display: flex; align-items: center; gap: 10px; }
#print .print-brand .pb-l svg { width: 40px; height: 40px; flex: none; }
#print .print-brand b { display: block; font-family: var(--brand-font); font-weight: 800; font-size: 20px; line-height: 1.5; color: #0E5E57; }
#print .print-brand small { display: block; font-family: var(--brand-latin); font-weight: 600; font-size: 8px; letter-spacing: .26em; color: #4D5955; margin-top: 3px; }
#print .print-brand .pb-org { font-weight: 700; font-size: 14px; color: #111; text-align: left; }
#print .print-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 6px; border-top: 1px solid #ddd; font-size: 10px; color: #4D5955; }
#print .print-foot svg { width: 16px; height: 16px; flex: none; }
#print .print-foot .pf-d { margin-inline-start: auto; }
#print .print-doc .mc-print { padding: 0; }
#print .print-doc:has(.mc-print) { width: auto; padding: 8mm 10mm; }
#print .print-doc:has(.receipt) .pb-org { display: none; }
#print .print-brand small { white-space: nowrap; }
/* the sidebar lockup: the Arabic word and the Latin line no longer touch */
.side .logo .logo-t { gap: 0; }
.side .logo .logo-t b { line-height: 1.55; }
.side .logo .logo-t small { margin-top: 5px; }
