/* Rashad Platform theme kit v2 (2026-10-23). One file for every service: hub, Django, Flask, FastAPI/Jinja, Moodle.
   Built on v1 (the Rashad Quality look); every v1 class name still works, so v1 pages need no rename.
   COPY this file into the service's own static folder (do not link it from the hub at run time) and set ONLY the accent:
       <style>:root{--accent:#7C3AED;--accent-dark:#C4B5FD}</style>   (--accent-dark: a pastel of the accent, for dark mode)
   Everything else (shades, tints, neutrals, sign-in gradient) is derived from --accent.
   RTL: logical properties only (inline-start/end), so <html dir="rtl"> is all a page needs.
   Sections: 1 tokens  2 base and type  3 shell  4 page head and breadcrumbs  5 buttons  6 cards and tiles  7 forms and the
   password eye  8 tables  9 tabs, chips, steps  10 messages  11 pills, badges, status  12 pagination  13 empty states
   14 icons  15 platform menu and drop-downs  16 sign-in  17 footer  18 phone  19 dark  20 motion and print */

/* 1. Tokens ---------------------------------------------------------------------------------------------- */
:root {
  /* THE ONLY PER-SERVICE VALUE (plus the optional --accent-dark for dark mode) */
  --accent: #15803d;
  /* shades derived from the accent */
  --accent-2: color-mix(in srgb, var(--accent) 82%, #fff);          /* lighter: focus rings, bars, hover borders */
  --accent-strong: color-mix(in srgb, var(--accent) 78%, #000);     /* darker: hover on primary buttons, links */
  --accent-soft: color-mix(in srgb, var(--accent) 14%, #fff);       /* tinted backgrounds: current item, banner */
  --accent-line: color-mix(in srgb, var(--accent) 35%, #fff);
  /* neutrals, lightly tinted by the accent so each service keeps its own feel */
  --bg: color-mix(in srgb, var(--accent) 4%, #f6f8f7);
  --surface: #ffffff;
  --soft: color-mix(in srgb, var(--accent) 7%, #f3f5f4);
  --line: color-mix(in srgb, var(--accent) 12%, #d9e0dc);
  --ink: #14201b; --muted: #56665e; --on-accent: #ffffff;
  /* status colours: fixed across the platform */
  --green: #047857; --green-soft: #d1fae5; --amber: #b45309; --amber-soft: #fef3c7;
  --red: #b42318; --red-soft: #fef3f2; --blue: #1d4ed8; --blue-soft: #e0ebff;
  /* type: the same in every service, English and Arabic */
  --display: "Readex Pro", "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --body: "Segoe UI", "Noto Kufi Arabic", Tahoma, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 15px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 24px; --fs-2xl: 30px;
  --lh: 1.55;
  /* shape and space */
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px; --pill: 999px;
  --gap: 16px; --side-w: 250px; --top-h: 60px; --content-max: 1320px;
  --shade: rgba(5, 20, 15, .45); --shadow: 0 12px 30px -12px rgba(10, 30, 20, .35); --shadow-sm: 0 2px 8px -4px rgba(10, 30, 20, .25);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  color-scheme: light;
}
/* Arabic: same fonts, a little more line height and a slightly larger base (Arabic glyphs read smaller) */
:root:lang(ar) { --lh: 1.75; --fs-base: 15.5px }
[lang="ar"] { line-height: 1.75 }   /* also for an Arabic block inside an English page */

/* 2. Base and type ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box }
html, body { margin: 0 }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100% }
body { background: var(--bg); color: var(--ink); font: var(--fs-base)/var(--lh) var(--body) }
a { color: var(--accent) } a:hover { color: var(--accent-strong) }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.3; text-wrap: balance; font-weight: 600 }
h1 { font-size: var(--fs-xl); margin: 0 } h2 { font-size: var(--fs-lg); margin: 0 0 10px } h3 { font-size: var(--fs-md); margin: 14px 0 6px }
p { margin: 0 0 10px }
img, svg, video { max-width: 100% }
.muted { color: var(--muted) } .small { font-size: var(--fs-sm) } .xsmall { font-size: var(--fs-xs) }
.mono { font-family: var(--mono) } .num { font-variant-numeric: tabular-nums }
.ltr { direction: ltr; unicode-bidi: isolate } .rtl { direction: rtl; unicode-bidi: isolate }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 60; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-xs) }
.skip:focus { top: 8px }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0 }
code, kbd { font-family: var(--mono); font-size: .92em; background: var(--soft); padding: 1px 5px; border-radius: 5px }

/* 3. Shell: side menu + top bar + content ----------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh }
.side { background: var(--surface); border-inline-end: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin: 0 6px 16px }
.brand img { width: 46px; height: 46px; flex: none }
.brand b { display: block; font: 600 var(--fs-md)/1.2 var(--display); color: var(--accent) }
.brand small { color: var(--muted); font-size: var(--fs-xs) }
.side h4 { margin: 14px 10px 4px; font: 600 11px/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
:lang(ar) .side h4 { letter-spacing: 0; font-size: 12px }
.side a.item, .side .item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14px }
.side a.item:hover { background: var(--soft); color: var(--ink) }
.side a.item.on, .side a.item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600 }
.side a.item .ico { color: var(--muted) } .side a.item.on .ico, .side a.item[aria-current="page"] .ico { color: var(--accent) }
.side a.item .badge { margin-inline-start: auto }
.side details.group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 14px }
.side details.group > summary::-webkit-details-marker { display: none }
.side details.group > summary::after { content: ""; margin-inline-start: auto; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s }
.side details.group[open] > summary::after { transform: rotate(-135deg) }
.side details.group > a.item { padding-inline-start: 34px }
.side .platform-home { margin-top: auto }
.side .foot { margin-top: 12px; padding: 10px; font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: center }
.side .foot img { width: 34px; background: #fff; border-radius: 6px; flex: none }
.main { min-width: 0; display: flex; flex-direction: column }
.top { display: flex; align-items: center; gap: 12px; min-height: var(--top-h); padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; flex-wrap: wrap }
.top .title { flex: 1 1 auto; min-width: 0 }
.top .title h1 { font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.top .tools, .top .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.top .who { display: inline-flex; flex-direction: column; line-height: 1.2; font-size: var(--fs-xs); color: var(--muted); max-width: 220px }
.top .who b { color: var(--ink); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.content { padding: 22px 24px 40px; max-width: var(--content-max); width: 100%; flex: 1 0 auto }
.content.wide { max-width: none }
.menu-toggle { display: inline-flex; flex: none }

/* 4. Page head: breadcrumbs + title + actions (the same on every page of every service) -------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px }
.page-head .heading { min-width: 0 }
.page-head h1 { font-size: var(--fs-xl) }
.page-head .lead { color: var(--muted); margin: 4px 0 0; max-width: 75ch }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted) }
.crumbs li { display: inline-flex; align-items: center; gap: 4px }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); margin-inline-end: 6px; opacity: .6 }
[dir="rtl"] .crumbs li + li::before { transform: rotate(-135deg) }
.crumbs a { color: var(--muted); text-decoration: none } .crumbs a:hover { color: var(--accent); text-decoration: underline }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600 }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px }
.section-title h2 { margin: 0 }

/* 5. Buttons ---------------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px/1.2 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s }
.btn:hover { border-color: var(--accent-2); color: var(--ink) }
.btn:focus-visible { outline: none; box-shadow: var(--focus) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent) }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent) }
.btn.secondary { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong) }
.btn.ghost { background: transparent } .btn.ghost:hover { background: var(--soft) }
.btn.link { background: none; border-color: transparent; color: var(--accent); padding-inline: 4px; min-height: 0 }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)) }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff }
.btn.small { min-height: 30px; padding: 5px 10px; font-size: 12.5px; border-radius: var(--radius-xs) }
.btn.large { min-height: 46px; padding: 11px 20px; font-size: var(--fs-md) }
.btn.block { width: 100% }
.btn.icon { padding: 0; width: 38px } .btn.icon.small { width: 30px }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none }
.btn .ico { width: 18px; height: 18px } .btn.small .ico { width: 16px; height: 16px }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }

/* 6. Cards, tiles, layout grids --------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: var(--gap) }
.card > :last-child { margin-bottom: 0 }
.card.flush { padding: 0; overflow-x: auto }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 12px }
.card-head h2, .card-head h3 { margin: 0; font-size: var(--fs-md) }
.card.flush > .card-head { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line) }
.card-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin: 14px -18px -18px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--soft); border-radius: 0 0 var(--radius) var(--radius) }
a.card { display: block; color: inherit; text-decoration: none } a.card:hover { border-color: var(--accent-2) }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--gap); align-items: start }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--gap) }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-bottom: var(--gap) }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; display: block }
.tile span { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: 600 }
.tile b { font: 700 26px/1.2 var(--display); font-variant-numeric: tabular-nums }
.tile small { display: block; color: var(--muted); font-size: var(--fs-xs) }
a.tile:hover { border-color: var(--accent-2) }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px }
.toolbar input, .toolbar select { width: auto; flex: 1 1 160px }
.toolbar .spacer { flex: 1 }
.banner { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: var(--gap) }
.banner.warn { background: var(--amber-soft); color: var(--amber) }
dl.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 0 }
dl.kv dt { color: var(--muted); font-size: var(--fs-sm) } dl.kv dd { margin: 0 }

/* 7. Forms and the password eye --------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px }
.form label, .field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px }
.field .help, .form .help, .helptext { color: var(--muted); font-weight: 400; font-size: var(--fs-xs) }
.req::after, label.required > span:first-child::after { content: " *"; color: var(--red) }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px }
.span2 { grid-column: 1 / -1 }
label.check, .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500 }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 }
legend { font-weight: 600; padding: 0 6px }
input, select, textarea { font: inherit; font-weight: 400; min-height: 40px; padding: 8px 11px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; min-width: 0; max-width: 100% }
textarea { min-height: 90px; resize: vertical }
select { padding-inline-end: 30px }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)) }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus) }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); flex: none }
input[type=file] { padding: 6px; min-height: 0 }
input[disabled], select[disabled], textarea[disabled] { background: var(--soft); color: var(--muted); cursor: not-allowed }
input[aria-invalid="true"], .has-error input, .has-error select, .has-error textarea { border-color: var(--red) }
.errorlist, .field-error { color: var(--red); font-size: 12.5px; font-weight: 500; margin: 2px 0 0; padding: 0; list-style: none }
.input-group { display: flex; align-items: stretch }
.input-group > input { flex: 1; border-start-end-radius: 0; border-end-end-radius: 0 }
.input-group > .btn { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1.5px }
.search { position: relative } .search > .ico { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none }
.search > input { padding-inline-start: 36px }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px }
/* password eye (rashad-pw-eye.js wraps every input[type=password]; the same markup as the hub's _pw_toggle.html) */
.pw-wrap { position: relative; display: block; width: 100% }
.pw-wrap > input { width: 100%; padding-inline-end: 44px }
.pw-wrap > input::-ms-reveal, .pw-wrap > input::-ms-clear { display: none }
.pw-eye { position: absolute; inset-inline-end: 3px; top: 50%; transform: translateY(-50%); width: 36px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer }
.pw-eye:hover { color: var(--accent); background: var(--soft) }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none }
.pw-eye .pw-off, .pw-eye[aria-pressed="true"] .pw-on { display: none }
.pw-eye[aria-pressed="true"] .pw-off { display: block }

/* 8. Tables ----------------------------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--gap) }
.card.flush > .table-wrap, .card > .table-wrap:only-child { border: 0; margin: 0; border-radius: 0 }
table.data { width: 100%; border-collapse: collapse; font-size: 14px }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top }
table.data thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--soft); white-space: nowrap; position: sticky; top: 0 }
:lang(ar) table.data thead th { letter-spacing: 0; font-size: 12.5px }
table.data tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent) }
table.data tbody tr:last-child td { border-bottom: 0 }
table.data td.num, table.data th.num { text-align: end; font-variant-numeric: tabular-nums }
table.data td.c, table.data th.c { text-align: center }
table.data td.actions { text-align: end; white-space: nowrap }
table.data.compact th, table.data.compact td { padding: 6px 10px }
table.data.striped tbody tr:nth-child(even) { background: var(--soft) }
table.data tfoot td { font-weight: 700; background: var(--soft) }
table.data th a.sort { color: inherit; text-decoration: none } table.data th a.sort[aria-sort]::after { content: " \2195"; opacity: .6 }

/* 9. Tabs, chips, steps ----------------------------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; scrollbar-width: thin }
.tabs > a, .tabs > button, .tabs [role="tab"] { appearance: none; background: none; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px; padding: 9px 14px; font: 600 14px/1.2 var(--body); color: var(--muted); text-decoration: none; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px 8px 0 0 }
.tabs > a:hover, .tabs > button:hover { color: var(--ink); background: var(--soft) }
.tabs > .on, .tabs > [aria-current="page"], .tabs [aria-selected="true"] { color: var(--accent-strong); border-bottom-color: var(--accent) }
.tabs .badge, .tabs .pill { margin-inline-start: 2px }
.tabs.sub { border-bottom: 0; gap: 6px } .tabs.sub > a, .tabs.sub > button { border: 1px solid var(--line); border-radius: var(--pill); padding: 6px 12px; margin: 0; font-size: 13px }
.tabs.sub > .on, .tabs.sub > [aria-current="page"], .tabs.sub [aria-selected="true"] { background: var(--accent-soft); border-color: transparent }
[role="tabpanel"][hidden] { display: none }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px }
.chips > a, .chips > button, .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--ink); font: 500 13px/1.3 var(--body); text-decoration: none; cursor: pointer }
.chips > .on, .chips > [aria-pressed="true"], .chips > [aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent) }
.steps { display: flex; gap: 0; counter-reset: step; margin: 0 0 18px; padding: 0; list-style: none; overflow-x: auto }
.steps > li { flex: 1 1 0; min-width: 110px; position: relative; padding-top: 34px; text-align: center; font-size: var(--fs-sm); color: var(--muted) }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 12px; z-index: 1 }
[dir="rtl"] .steps > li::before { transform: translateX(50%) }
.steps > li + li::after { content: ""; position: absolute; top: 12px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--line) }
.steps > li.done::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); content: "\2713" }
.steps > li.done + li::after, .steps > li.done::after, .steps > li.on::after { background: var(--accent) }
.steps > li.on { color: var(--ink); font-weight: 600 } .steps > li.on::before { border-color: var(--accent); color: var(--accent) }
.steps a { color: inherit; text-decoration: none }

/* 10. Messages (alerts) ----------------------------------------------------------------------------------- */
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--green-soft); color: var(--green); border: 1px solid color-mix(in srgb, currentColor 20%, transparent) }
.msg.error { background: var(--red-soft); color: var(--red) } .msg.warning { background: var(--amber-soft); color: var(--amber) } .msg.info { background: var(--blue-soft); color: var(--blue) }
.msg > .ico { flex: none; margin-top: 2px }
.msg > .text { flex: 1; min-width: 0 } .msg b { font-weight: 700 }
.msg .close { margin-inline-start: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0 2px; font-size: 18px; line-height: 1 }
.msg .close:hover { opacity: 1 }
.messages { margin-bottom: 14px }
.toast-area { position: fixed; inset-block-end: 16px; inset-inline-end: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; max-width: min(92vw, 380px) }
.toast-area .msg { box-shadow: var(--shadow); margin: 0 }

/* 11. Pills, badges, status --------------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--pill); font-size: var(--fs-xs); font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; line-height: 1.6 }
.pill.green { background: var(--green-soft); color: var(--green) } .pill.amber { background: var(--amber-soft); color: var(--amber) }
.pill.red { background: var(--red-soft); color: var(--red) } .pill.blue { background: var(--blue-soft); color: var(--blue) }
.pill.accent { background: var(--accent-soft); color: var(--accent-strong) }
.pill.outline { background: transparent; border: 1px solid currentColor }
.pill > .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: 11.5px; line-height: 20px; text-align: center; font-weight: 700 }
.badge.accent { background: var(--accent); color: var(--on-accent) } .badge.muted { background: var(--soft); color: var(--muted) }
.bar { height: 8px; border-radius: var(--pill); background: var(--soft); overflow: hidden; min-width: 80px }
.bar > i { display: block; height: 100%; background: var(--accent-2) }
.bar.green > i { background: #16a34a } .bar.amber > i { background: #f59e0b } .bar.red > i { background: #dc2626 }
.rag { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--line); vertical-align: middle }
.rag.green { background: #16a34a } .rag.amber { background: #f59e0b } .rag.red { background: #dc2626 }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: inline-grid; place-items: center; font: 700 13px var(--display); flex: none; overflow: hidden }
.avatar img { width: 100%; height: 100%; object-fit: cover }

/* 12. Pagination ------------------------------------------------------------------------------------------ */
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px }
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none }
.pager .pages a, .pager .pages span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--radius-xs); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13.5px; font-variant-numeric: tabular-nums }
.pager .pages a:hover { border-color: var(--accent-2) }
.pager .pages .cur, .pager .pages [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700 }
.pager .pages .gap { border: 0; background: none; min-width: 16px }
.pager .pages .prev svg, .pager .pages .next svg { width: 16px; height: 16px }
[dir="rtl"] .pager .pages .prev svg, [dir="rtl"] .pager .pages .next svg { transform: scaleX(-1) }
.pager .count { color: var(--muted); font-size: var(--fs-sm) }
.pager select { width: auto; min-height: 34px; padding-block: 4px }

/* 13. Empty states ---------------------------------------------------------------------------------------- */
.empty { color: var(--muted); padding: 16px; text-align: center }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 20px; color: var(--muted) }
.empty-state > .ico { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; box-sizing: content-box }
.empty-state h3 { margin: 0; color: var(--ink); font-size: var(--fs-md) }
.empty-state p { margin: 0; max-width: 46ch }
.empty-state .btn { margin-top: 10px }
.skeleton { background: linear-gradient(90deg, var(--soft), var(--line), var(--soft)); background-size: 200% 100%; animation: rq-sk 1.2s infinite; border-radius: 6px; min-height: 12px }
@keyframes rq-sk { to { background-position: -200% 0 } }

/* 14. Icons (rashad-icons.svg sprite: <svg class="ico"><use href="/static/<prefix>/rashad-icons.svg#i-home"/></svg>) */
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.ico.sm { width: 14px; height: 14px } .ico.lg { width: 24px; height: 24px }
[dir="rtl"] .ico.flip { transform: scaleX(-1) }   /* arrows and chevrons that point "forward" */
.manual-link { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); text-decoration: none; border: 1px solid transparent }
.manual-link:hover { color: var(--accent); background: var(--soft); border-color: var(--line) }

/* 15. Platform menu and other drop-downs ------------------------------------------------------------------ */
details.drop { position: relative }
details.drop > summary { list-style: none; cursor: pointer }
details.drop > summary::-webkit-details-marker { display: none }
details.drop > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px }
details.drop .panel { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 270px; max-width: min(92vw, 360px); max-height: 75vh; overflow-y: auto; padding: 8px; box-shadow: var(--shadow); z-index: 40 }
details.drop .panel .head { padding: 6px 8px 8px; font: 600 var(--fs-xs)/1.4 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); margin-bottom: 6px }
:lang(ar) details.drop .panel .head { letter-spacing: 0 }
details.drop .panel a, details.drop .panel button.link { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: start }
details.drop .panel a:hover, details.drop .panel button.link:hover { background: var(--soft) }
details.drop .panel a.here, details.drop .panel a[aria-current] { background: var(--accent-soft) }
details.drop .panel img { width: 28px; height: 28px; flex: none }
details.drop .panel b { display: block; font-weight: 600; font-size: 14px }
details.drop .panel small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.35 }
details.drop .panel hr { margin: 6px 0 }
.platform-menu > summary img { width: 22px; height: 22px }

/* 16. Sign-in page (split: coloured art panel + form) ------------------------------------------------------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh }
.auth-art { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, #000), var(--accent) 60%, var(--accent-2)); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px }
.auth-art .uni { background: #fff; border-radius: 12px; padding: 6px 10px; height: 64px; width: auto; align-self: flex-start }
.auth-art .hero { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap }
.auth-art .hero img { width: 160px; max-width: 45%; height: auto }
.auth-art h1 { font-size: 34px; color: #fff } .auth-art p { opacity: .92; max-width: 46ch }
.auth-form { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 40px max(24px, 6vw); background: var(--surface) }
.auth-form > * { width: 100%; max-width: 420px; margin-inline: auto }
.auth-form .logo { width: 84px; height: 84px }
.auth-form .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-sm) }
.auth-form .or::before, .auth-form .or::after { content: ""; flex: 1; border-top: 1px solid var(--line) }

/* 17. Footer (inside .main, under .content) -------------------------------------------------------------- */
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); background: var(--surface) }
.site-foot a { color: var(--muted) } .site-foot a:hover { color: var(--accent) }
.site-foot nav { display: flex; gap: 14px; flex-wrap: wrap }

/* 18. Phone and tablet: one set of breakpoints for every service (960 tablet, 560 phone) -------------------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr) }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; max-width: 86vw; transform: translateX(-105%); transition: transform .2s; z-index: 50; visibility: hidden }
  [dir="rtl"] .side { transform: translateX(105%) }
  body.menu-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .35) }
  body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 45; background: var(--shade) }
  .auth { grid-template-columns: minmax(0, 1fr) } .auth-art { display: none }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 560px) {
  .content { padding: 14px 12px 30px } .top { padding: 8px 12px; gap: 8px } .site-foot { padding: 12px }
  h1, .page-head h1 { font-size: 20px } .top .title h1 { font-size: var(--fs-md) }
  .top .who, .top .hide-phone { display: none }
  .page-head { align-items: stretch } .page-head .actions { width: 100% } .page-head .actions .btn { flex: 1 }
  .card { padding: 14px } .card-foot { margin: 12px -14px -14px; padding: 10px 14px }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  dl.kv { grid-template-columns: minmax(0, 1fr) } dl.kv dd { margin-bottom: 6px }
  /* tables: either scroll inside .table-wrap, or stack with <table class="data stack"> + <td data-label="..."> */
  table.data.stack thead { display: none }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100% }
  table.data.stack tr { border-bottom: 1px solid var(--line); padding: 8px 0 }
  table.data.stack td { border: 0; padding: 4px 12px; display: flex; gap: 10px; justify-content: space-between; text-align: end }
  table.data.stack td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; text-align: start }
  .pager { justify-content: center } .pager .count { width: 100%; text-align: center }
  input, select, textarea { font-size: 16px }   /* stops iOS zoom on focus */
  .toast-area { inset-inline: 12px }
}
@media (min-width: 961px) {
  .shell { overflow-x: clip; transition: grid-template-columns .2s ease }
  html.side-closed .shell { grid-template-columns: 0 minmax(0, 1fr) }
  html.side-closed .side { transform: translateX(-100%); visibility: hidden }
  html[dir="rtl"].side-closed .side { transform: translateX(100%) }
}

/* 19. Dark mode (follows the device, or <html data-theme="dark">; the gallery shows light only) ------------- */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --accent: var(--accent-dark, #6ee7a0);
  --accent-2: color-mix(in srgb, var(--accent) 80%, #fff); --accent-strong: color-mix(in srgb, var(--accent) 85%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #10161a); --accent-line: color-mix(in srgb, var(--accent) 35%, #10161a);
  --bg: color-mix(in srgb, var(--accent) 4%, #0d1311); --surface: color-mix(in srgb, var(--accent) 5%, #141b18);
  --soft: color-mix(in srgb, var(--accent) 8%, #1a2320); --line: color-mix(in srgb, var(--accent) 12%, #2a3531);
  --ink: #e8efeb; --muted: #a0b0a8; --on-accent: #0b1210;
  --green: #6ee7b7; --green-soft: #0f3d2c; --amber: #fbbf24; --amber-soft: #3a2a0c;
  --red: #fda29b; --red-soft: #3a1512; --blue: #93c5fd; --blue-soft: #10264a;
  --shade: rgba(0, 0, 0, .55); --shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); color-scheme: dark } }
:root[data-theme="dark"] {
  --accent: var(--accent-dark, #6ee7a0);
  --accent-2: color-mix(in srgb, var(--accent) 80%, #fff); --accent-strong: color-mix(in srgb, var(--accent) 85%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #10161a); --accent-line: color-mix(in srgb, var(--accent) 35%, #10161a);
  --bg: color-mix(in srgb, var(--accent) 4%, #0d1311); --surface: color-mix(in srgb, var(--accent) 5%, #141b18);
  --soft: color-mix(in srgb, var(--accent) 8%, #1a2320); --line: color-mix(in srgb, var(--accent) 12%, #2a3531);
  --ink: #e8efeb; --muted: #a0b0a8; --on-accent: #0b1210;
  --green: #6ee7b7; --green-soft: #0f3d2c; --amber: #fbbf24; --amber-soft: #3a2a0c;
  --red: #fda29b; --red-soft: #3a1512; --blue: #93c5fd; --blue-soft: #10264a;
  --shade: rgba(0, 0, 0, .55); --shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); color-scheme: dark }
:root[data-theme="dark"] .side .foot img, :root[data-theme="dark"] .auth-art .uni { background: #fff }

/* 20. Motion and print ------------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important } }
@media print {
  .side, .top, .site-foot, .no-print, .pager, .tabs, .toast-area { display: none !important }
  .shell { display: block } .content { max-width: none; padding: 0 }
  .card { border: 0; padding: 0; break-inside: auto } body { background: #fff; color: #000; font-size: 12px }
  .pagebreak { break-before: page } a { color: inherit; text-decoration: none }
}
