/* Rashad Platform theme kit v1 (2026-10-21). Extracted from Rashad Quality (C:\RashadQuality\static\rq\quality.css).
   COPY this file into the service's own static folder; do not link it from the account centre at run time.
   A service sets its accent in a small :root block AFTER this file (see README.md). Everything else is derived. */

/* 1. Tokens ---------------------------------------------------------------------------------------------- */
:root {
  /* the service accent: override these three (light) and the two in the dark block below */
  --accent: #15803d; --accent-2: #16a34a;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, #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) 8%, #f3f5f4); --line: color-mix(in srgb, var(--accent) 12%, #d9e0dc);
  --ink: #12201a; --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;
  --shade: rgba(5, 20, 15, .45); --shadow: 0 12px 30px -12px rgba(10, 30, 20, .35);
  --radius: 14px; --radius-sm: 10px; --side-w: 250px;
  --display: "Readex Pro", "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --body: "Segoe UI", "Noto Kufi Arabic", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --accent: var(--accent-dark, #6ee7a0); --accent-2: var(--accent-2-dark, #4ade80);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #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: var(--accent-2-dark, #4ade80);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #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 }

/* 2. Base ------------------------------------------------------------------------------------------------ */
* { box-sizing: border-box }
html, body { margin: 0 }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body) }
a { color: var(--accent) }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; text-wrap: balance }
h1 { font-size: 24px; margin: 0 } h2 { font-size: 18px; margin: 0 0 10px } h3 { font-size: 15.5px; margin: 14px 0 6px }
.muted { color: var(--muted) } .small { font-size: 13px } .mono { font-family: Consolas, monospace } .ltr { direction: ltr; unicode-bidi: isolate }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px }
.skip:focus { top: 8px }
img { max-width: 100% }

/* 3. Shell: side menu + top bar -------------------------------------------------------------------------- */
.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 }
.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 16px/1.2 var(--display); color: var(--accent) }
.brand small { color: var(--muted); font-size: 12px }
.side h4 { margin: 14px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.side a.item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14px }
.side a.item:hover { background: var(--soft) }
.side a.item.on, .side a.item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600 }
.side a.item .badge { margin-inline-start: auto }
.side .foot { margin-top: 18px; 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; padding: 12px 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 .tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.content { padding: 22px 24px 40px; max-width: 1320px; width: 100% }
.menu-toggle { display: inline-flex; flex: none; font-size: 15px; line-height: 1 }

/* the "Rashad Platform" switcher and any other drop-down */
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: 20 }
details.drop .panel a, details.drop .panel button.link { display: flex; gap: 8px; 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 img { width: 26px; height: 26px; flex: none }

/* 4. Components ------------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 6px; 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 }
.btn:hover { border-color: var(--accent-2) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent) }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)) }
.btn.small { padding: 5px 10px; font-size: 12.5px } .btn.ghost { background: transparent } .btn.block { width: 100%; justify-content: center }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px }
.card.flush { padding: 0; overflow-x: auto }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit }
.tile span { display: block; color: var(--muted); font-size: 13px; font-weight: 600 } .tile b { font: 700 26px var(--display); font-variant-numeric: tabular-nums }
a.tile:hover { border-color: var(--accent-2) }
.form { display: flex; flex-direction: column; gap: 12px }
.form label, .field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13.5px }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px }
.span2 { grid-column: 1 / -1 }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500 }
input, select, textarea { font: inherit; font-weight: 400; 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% }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent) }
.errorlist, .field-error { color: var(--red); font-size: 12.5px; font-weight: 500; margin: 2px 0 0; padding: 0; list-style: none }
table.data { width: 100%; border-collapse: collapse; font-size: 14px }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top }
table.data th { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--soft) }
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 }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap }
.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) }
.badge { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; text-align: center; font-weight: 700 }
.msg { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--green-soft); color: var(--green) }
.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) }
.banner { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px }
.banner.warn { background: var(--amber-soft); color: var(--amber) }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px }
.toolbar input, .toolbar select { width: auto; flex: 1 1 160px }
.empty { color: var(--muted); padding: 16px; text-align: center }
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px }
.bar { height: 8px; border-radius: 999px; 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 }

/* 5. 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; padding: 40px max(24px, 6vw); background: var(--surface) }
.auth-form .logo { width: 84px; height: 84px }

/* 6. Phone, collapsed side menu, motion, print ------------------------------------------------------------ */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr) }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; transform: translateX(-105%); transition: transform .2s; z-index: 30; visibility: hidden }
  html[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: 25; 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: 10px 12px } h1 { font-size: 20px } .top .who { display: none } }
@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%) }
}
@media (prefers-reduced-motion: reduce) { .shell, .side { transition: none !important } }
@media print {
  .side, .top, .no-print { 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 }
}
