/* Uranus Glass — Command Center adapter (management-reports dashboard).
   Loaded after the page's own <style> and /uranus-glass.css. Maps Command's own classes (app, side, nav, top, card,
   stat, btn, badge, tabs, seg, modal …) onto the shared --ug-* recipe. Presentation only.
   Theme: <html data-theme> is set before paint from localStorage "uranus_theme" (dark by default, like the kit). */

/* ---------- Font: the kit's "Uranus Sans" (Lato for Latin + Noor for Arabic), bundled in /uranus/fonts ---------- */
@font-face { font-family: "Uranus Sans"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("uranus/fonts/Lato-Regular.woff") format("woff"); unicode-range: U+0000-024F, U+0259, U+02B0-02FF, U+0300-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Uranus Sans"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("uranus/fonts/Lato-Bold.woff") format("woff"); unicode-range: U+0000-024F, U+0259, U+02B0-02FF, U+0300-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Uranus Sans"; font-style: normal; font-weight: 800 900; font-display: swap; src: url("uranus/fonts/Lato-Black.woff") format("woff"); unicode-range: U+0000-024F, U+0259, U+02B0-02FF, U+0300-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Uranus Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("uranus/fonts/Noor-Light.woff") format("woff"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Uranus Sans"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("uranus/fonts/Noor-Regular.woff") format("woff"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Uranus Sans"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("uranus/fonts/Noor-Bold.woff") format("woff"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF; }

/* ---------- Tokens: Command's own variables re-pointed at the suite (dark default) ---------- */
html[data-theme], html[data-theme][lang] {
  --font: "Uranus Sans", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --radius: 18px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --u-text: #F1ECF6; --u-text-2: #DCD2E6;
  --bg: transparent; --surface: rgb(255 255 255 / .05); --surface-2: rgb(255 255 255 / .04);
  --line: rgb(255 255 255 / .12); --line-2: rgb(255 255 255 / .08);
  --ink: #F1ECF6; --ink-2: #DCD2E6; --ink-3: #C3B6D3;
  --good: #6EE7A0; --good-bg: rgb(74 222 128 / .14); --warn: #FDBA74; --warn-bg: rgb(253 186 116 / .14);
  --bad: #FCA5A5; --bad-bg: rgb(248 113 113 / .15); --info: #A5CCFD; --info-bg: rgb(96 165 250 / .15);
  --shadow: var(--ug-shadow);
  --solid: #241430;
  --chart-ink: #DCD2E6; --chart-grid: rgba(255, 255, 255, .08); --chart-target: #F1ECF6; --chart-edge: rgba(0, 0, 0, 0);
}
html[data-theme="light"] {
  color-scheme: light;
  --u-text: #1E1726; --u-text-2: #352B40;
  --bg: transparent; --surface: rgb(255 255 255 / .72); --surface-2: rgb(59 26 80 / .035);
  --line: rgb(59 26 80 / .14); --line-2: rgb(59 26 80 / .08);
  --ink: #1E1726; --ink-2: #352B40; --ink-3: #574A5F;
  --good: #0E7A50; --good-bg: #E3F4EC; --warn: #8F5200; --warn-bg: #FFF1D6; --bad: #B42A25; --bad-bg: #FCE9E8; --info: #1D5FAF; --info-bg: #E6EFFB;
  --shadow: var(--ug-shadow);
  --solid: #FFFFFF;
  --chart-ink: #352B40; --chart-grid: rgba(59, 26, 80, .08); --chart-target: #52514e; --chart-edge: #fff;
}

/* ---------- Page ---------- */
body { font-family: var(--font); color: var(--ink); font-weight: 500; }
body.ug-page { isolation: isolate; }
.app { background: transparent; }
a { color: var(--ug-gold-text); }
:where(h1, h2, h3, h4) { font-weight: 700; }

/* ---------- Side navigation: glass rail, gold active pill ---------- */
.side { background: var(--ug-bar) !important; color: var(--ink-2); border-inline-end: 1px solid var(--ug-line); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.brandbox { border-bottom-color: var(--ug-line); }
.brandbox .wm { color: var(--u-text); font-family: var(--font); font-weight: 800; }
.brandbox .wm small { color: var(--ug-gold-text); font-weight: 700; }
.navsec { color: var(--ink-3); font-weight: 700; }
.nav { color: var(--ink-2); font-weight: 700; border-radius: 12px; transition: background .2s, color .2s, box-shadow .2s; }
.nav:hover { background: rgb(255 255 255 / .06); color: var(--u-text); }
[data-theme="light"] .nav:hover { background: rgb(59 26 80 / .05); }
.nav.active, [dir="rtl"] .nav.active { color: var(--ug-gold-text) !important; background: var(--ug-pill-on) !important; box-shadow: var(--ug-pill-on-shadow) !important; }
.nav .count { font-weight: 700; background: #C2352F; }
.side .foot { color: var(--ink-3); font-weight: 500; }

/* ---------- Top bar: translucent, blurred; pills as glass ---------- */
.top { background: var(--ug-bar) !important; border-bottom: 1px solid var(--ug-line) !important; -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.top h1 { font-weight: 700; color: var(--u-text); }
.pill { background: var(--ug-soft); border-color: var(--ug-line-2); color: var(--ink-2); font-weight: 700; text-decoration: none; min-height: 34px; transition: background .2s, border-color .2s, color .2s; }
.pill:hover { border-color: var(--ug-hover); color: var(--u-text); }
a.pill { color: var(--ink-2); }
.pill select { color: var(--ink); font-weight: 700; }
.pill select option, select.inp option { background: #241830; color: #F1ECF6; }
[data-theme="light"] .pill select option, [data-theme="light"] select.inp option { background: #fff; color: #1E1726; }
.ug-theme-btn { cursor: pointer; }
.banner { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 14px; font-weight: 600; }

/* ---------- Cards and stat tiles: frosted glass ---------- */
.card { background: var(--ug-glass); border: 1px solid var(--ug-line); border-radius: 18px; box-shadow: var(--ug-shadow); -webkit-backdrop-filter: var(--ug-blur); backdrop-filter: var(--ug-blur); }
.card > .hd { border-bottom-color: var(--ug-line); }
.card > .hd h3 { font-size: 15.5px; font-weight: 700; color: var(--u-text); }
.card > .hd .sub { color: var(--ink-3); }
.stat .lbl { color: var(--ink-2); font-weight: 700; }
.stat .val { font-family: var(--font); font-weight: 800; }
.stat .val small { color: var(--ink-3); }
.stat .ft { color: var(--ink-3); }
.stat .bar { background: var(--line-2); }
.stat .bar i { background: var(--ug-gold-btn); }
.card.stat[data-go]:hover, .sc:hover { border-color: var(--ug-hover); }
td.num, th.num, .ring b, .mini b { font-family: var(--font); }
.ring b { background: var(--solid); font-weight: 800; }
.mini div { background: var(--ug-soft); border: 1px solid var(--line-2); border-radius: 10px; }
.mini span { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.sc .nm { font-weight: 700; }

/* ---------- Buttons: gold primary, glass secondary ---------- */
.btn { border-radius: 12px; font-weight: 700; background: var(--ug-soft); border-color: var(--ug-line-2); color: var(--ink); min-height: 38px; }
.btn:hover { border-color: var(--ug-hover); }
.btn.sm { border-radius: 10px; min-height: 30px; }
.btn.primary, .btn.accent, .btn.ai { background: var(--ug-gold-btn) !important; border: 0 !important; color: var(--ug-on-gold) !important; box-shadow: 0 8px 22px rgb(252 172 50 / .25); }
.btn.primary:hover, .btn.accent:hover, .btn.ai:hover { filter: brightness(1.05); }
.btn.good { background: #0F7A52; border-color: #0F7A52; color: #fff; }
.btn.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--ug-soft); }

/* ---------- Badges ---------- */
.badge { font-weight: 700; }

/* ---------- Tables: faint header, hover rows ---------- */
table { color: var(--ink-2); }
th { background: var(--ug-th); color: var(--ink-2); font-weight: 700; font-size: 12.5px; border-bottom-color: var(--ug-line); }
td { border-bottom-color: var(--ug-line); }
td b, td strong { color: var(--ink); }
tr.click:hover td { background: var(--ug-row-hover); }
.tbl-wrap { border-radius: 0 0 18px 18px; }

/* ---------- Fields like the sign-in card ---------- */
.field label { font-weight: 700; color: var(--ink-2); }
.inp, select.inp, textarea.inp { min-height: 44px; border-radius: 12px; background-color: var(--ug-field); border-color: var(--ug-field-line); color: var(--ink); font-weight: 500; }
textarea.inp { min-height: 90px; }
.inp:focus, select.inp:focus, textarea.inp:focus { border-color: rgb(252 172 50 / .7); box-shadow: var(--ug-focus); }
.inp::placeholder { color: var(--ink-3); opacity: 1; }
.muted { color: var(--ink-3); }

/* ---------- Tabs and segmented filters: liquid-glass capsule ---------- */
.tabs, .seg { display: inline-flex; gap: 4px; padding: 5px; width: max-content; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; border-radius: 999px;
  background: var(--ug-capsule); border: 1px solid var(--ug-line-2); box-shadow: var(--ug-capsule-shadow); -webkit-backdrop-filter: var(--ug-blur-strong); backdrop-filter: var(--ug-blur-strong); }
.tabs { margin: 12px; }
.tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
.tab, .seg button { flex: none; border: 0 !important; margin: 0; padding: 7px 14px; border-radius: 999px; color: var(--ug-pill-text); font-weight: 700; font-size: 13px; background: transparent; box-shadow: none; transition: background .2s, color .2s, box-shadow .2s; }
.tab:hover, .seg button:hover { color: var(--u-text); background: rgb(255 255 255 / .06); }
[data-theme="light"] .tab:hover, [data-theme="light"] .seg button:hover { background: rgb(59 26 80 / .05); }
.tab.active, .seg button.active { color: var(--ug-gold-text) !important; background: var(--ug-pill-on) !important; box-shadow: var(--ug-pill-on-shadow) !important; }
/* Inside a glass card the capsule sits on more layers: a lighter gold keeps AA in dark */
html[data-theme="dark"] .tab.active, html[data-theme="dark"] .seg button.active { color: #FFD48A !important; }

/* ---------- Grids, lists, AI and chat blocks ---------- */
.kpi-row { border-bottom-color: var(--ug-line); }
.kpi-row .lab { font-weight: 700; }
.kpi-row .lab small { color: var(--ink-3); }
.cgrid .h { color: var(--ink-2); font-weight: 700; }
.cell { border-color: transparent; font-weight: 700; }
.cell[style*="#FDECEB"], .cell[style*="#F6B8B3"] { color: #3A1220 !important; }
.uname { font-weight: 700; }
.alert { border-bottom-color: var(--ug-line); }
.alert .tx span { color: var(--ink-3); }
.aibox { background: var(--ug-gold-soft); border: 1px solid var(--ug-gold-line); border-radius: 14px; }
.msgs { scrollbar-width: thin; }
.msg.user { background: var(--ug-pill-on); box-shadow: var(--ug-pill-on-shadow); color: var(--u-text); }
.msg.bot { background: var(--ug-soft); border-color: var(--ug-line); }
.msg .tool { color: var(--ink-3); }
.composer { border-top-color: var(--ug-line); }
.sug { background: var(--ug-soft); border-color: var(--ug-line-2); color: var(--ink-2); font-weight: 700; }
.sug:hover { border-color: var(--ug-hover); color: var(--u-text); }
.drop { border-color: var(--ug-line-2); background: var(--ug-soft); border-radius: 16px; color: var(--ink-2); }
.drop:hover, .drop.over { border-color: var(--ug-gold-line); background: var(--ug-gold-soft); }
.kv b { color: var(--ink-2); font-weight: 700; }
.comment { background: var(--ug-soft); border-color: var(--ug-line); border-radius: 12px; }
.comment .who { font-weight: 700; }
.comment .when { color: var(--ink-3); }
.legend { color: var(--ink-2); font-weight: 600; }
.empty { color: var(--ink-2); }
.kcol { background: var(--ug-soft); border-color: var(--ug-line); border-radius: 16px; }
.kcol h4 { font-weight: 700; }
.kcard { background: var(--ug-glass); border-color: var(--ug-line); border-radius: 12px; box-shadow: var(--ug-shadow); }
.kcard:hover { border-color: var(--ug-hover); }
.kcard .m { color: var(--ink-3); }
.md td, .md th { border-color: var(--ug-line); }
.typing, .timeline i { background: var(--ug-gold-text); }

/* Hard-coded light tints in the views, re-tinted for glass */
[style*="background:#FFFBF2"] { background: var(--ug-gold-soft) !important; }
[style*="border-color:#F5DDAE"] { border-color: var(--ug-gold-line) !important; }
[style*="background:#F4FBFD"], [style*="background:#F0FAFC"] { background: var(--info-bg) !important; }
[style*="border-color:#CDEFF4"], [style*="border-color:#C9DDF6"] { border-color: color-mix(in srgb, var(--info) 35%, transparent) !important; }
[style*="border-color:#F2C2BF"] { border-color: color-mix(in srgb, var(--bad) 45%, transparent) !important; }
[style*="border-color:#BFE8D6"] { border-color: color-mix(in srgb, var(--good) 45%, transparent) !important; }

/* ---------- Dialogs: glass with the gold gate corners; toast ---------- */
.modal-bg { background: var(--ug-scrim); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
.modal { color: var(--ink); border: 1px solid var(--ug-line-2); border-radius: 22px; box-shadow: var(--ug-shadow-pop);
  background:
    linear-gradient(135deg, rgb(252 172 50 / .55) 0 13px, rgb(252 172 50 / .9) 13px 14.5px, transparent 14.5px) left top / 40px 40px no-repeat,
    linear-gradient(315deg, rgb(252 172 50 / .55) 0 13px, rgb(252 172 50 / .9) 13px 14.5px, transparent 14.5px) right bottom / 40px 40px no-repeat,
    var(--ug-glass-solid);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.modal .hd, .modal .ft { border-color: var(--ug-line); }
.modal .hd h3 { font-size: 18px; font-weight: 700; color: var(--u-text); }
.modal .ft { background: var(--ug-soft); flex-wrap: wrap; }
.toast { background: var(--ug-glass-solid); color: var(--u-text); border: 1px solid var(--ug-line-2); border-radius: 14px; box-shadow: var(--ug-shadow-pop); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .side { background: var(--ug-glass-solid) !important; box-shadow: var(--ug-shadow-pop); }
  .top { gap: 8px; }
  .top .pill { font-size: 12.5px; padding: 4px 9px; }
  .card { border-radius: 16px; }
  .msg { max-width: 92%; }
}

/* ---------- Account menu + Uranus loader (account patch 2026-11-11) ----------
   One account button per screen: the shared <uranus-account> in the top bar. The cockpit's own user chip (.um) is hidden;
   its Gemini status / test / key setup entries are in the shared menu (shell-mount.js). Spinners use the Uranus loader. */
.um { display: none !important; }
.typing { width: 16px !important; height: 16px !important; border-radius: 50% !important; background: radial-gradient(circle, rgb(122 44 150 / .18) 0 55%, transparent 56%) !important;
  border: 2px solid var(--uac-track, rgb(122 44 150 / .55)); border-top-color: #FCAC32; border-inline-end-color: rgb(252 172 50 / .55); animation: uac-spin .8s linear infinite !important; vertical-align: middle; }
#root > div[style]:only-child::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; box-sizing: border-box;
  border: 5px solid var(--uac-track, rgb(122 44 150 / .55)); border-top-color: #FCAC32; border-inline-end-color: rgb(252 172 50 / .55); animation: uac-spin .8s linear infinite; }

/* ---------- Rail «الإدارة» section (display rule 8, display-rules:2026-11-11) ----------
   The gear opens the Admin pages inside the rail (core.js), remembered open/closed, current page highlighted. */
.ck .rail { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.ck .rail::-webkit-scrollbar { display: none; }
.ck .rail-adm .rail-adm-list { display: flex; flex-direction: column; gap: 4px; padding: 6px 0 2px; margin-top: 4px; border-top: 1px solid var(--ug-line); }
.ck .rail-adm-i { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%; min-height: 48px; padding: 6px 4px; border: 0; border-radius: 12px; background: transparent; color: var(--u-text-2); font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.ck .rail-adm-i .ic { width: 18px; height: 18px; }
.ck .rail-adm-i:hover { background: var(--ug-soft); color: var(--u-text); }
.ck .rail-adm-i.active { color: var(--ug-gold-text); background: var(--ug-pill-on); box-shadow: var(--ug-pill-on-shadow); }
html[data-theme="dark"] .ck .rail-adm-i.active { color: #FFD48A; }
.ck .rail-adm.open > .rail-btn:not(.active) { color: var(--u-text); }
@media (min-width: 1440px) {
  .ck .rail-adm-i { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 38px; padding: 8px 12px; padding-inline-start: 22px; font-size: 13.5px; text-align: start; }
}
/* ---------- end rail section ---------- */

/* ---------- Display rules (shared/uranus-glass/DISPLAY-RULES.md; docs/audit/display-rules-CHANGES.md) ----------
   Marker: display-rules:2026-11-11 (adapter part). */
html[data-theme] :is(.rail-btn .rl, .rail-btn .rc, .btabs .rc, .seg .n, .tab .count, .cgrid .h, .q-k, li > small.muted, .btabs button > span) { font-size: 11.5px; }
html[data-theme] :is(.rail-btn .rc, .btabs .rc, .seg .n, .tab .count) { font-variant-numeric: tabular-nums; }
html[data-theme] :is(.subtabs > .tab, .tabs > .tab, .seg > button) { white-space: nowrap; }
html[data-theme] .subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
/* semantic colours are for meaning only: the Approve button is the gold primary, the matrix cells keep their status as a coloured edge */
html[data-theme] .dbar .btn.good { background: var(--ug-gold-btn) !important; color: var(--ug-on-gold) !important; border-color: transparent !important; }
html[data-theme] :is(.q-main > small.muted, .q-main > .q-u, .cgrid .uname, tbody th) { unicode-bidi: plaintext; }
html[data-theme] :is(.q-main > small.muted, .q-main > .q-u, .cgrid .uname, tbody th):dir(ltr) { text-align: left; }
html[data-theme] :is(.q-main > small.muted, .q-main > .q-u, .cgrid .uname, tbody th):dir(rtl) { text-align: right; }
/* ---------- end display rules ---------- */
/* ==== sidebar-panel:2026-11-11 BEGIN: floating glass side panel (owner's option 1). Canonical: docs/layout-standard/sidebar-panel.css ==== */
/* Markup: management-reports/core.js shell() (rail-brand · rail-nav · rail-adm · rail-foot). This file loads before cockpit.css, hence html[data-theme] .app.ck. */
/* ---------- TOKENS (copy verbatim) ---------- */
:root, [data-theme="dark"] {
  --usb-w: 248px;
  --usb-w-mini: 72px;
  --usb-inset: 12px;
  --usb-gap: 16px;
  --usb-radius: 22px;
  --usb-top: 60px;                       /* height of the shared top bar; apps override */
  --usb-bg: linear-gradient(160deg, rgb(255 255 255 / .08), rgb(255 255 255 / .03));
  --usb-bg-solid: linear-gradient(160deg, rgb(62 26 82 / .97), rgb(30 12 42 / .98)); /* overlay (tablet) */
  --usb-line: rgb(255 255 255 / .14);
  --usb-sep: rgb(255 255 255 / .10);
  --usb-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 18px 40px rgb(5 2 10 / .45);
  --usb-blur: blur(18px) saturate(1.4);
  --usb-text: #DCD2E6;                   /* item label */
  --usb-text-hi: #F1ECF6;                /* hover / brand */
  --usb-muted: #C3B6D3;                  /* group labels, sub-items, chevrons */
  --usb-hover: rgb(255 255 255 / .06);
  --usb-on-text: #FFD285;
  --usb-on-bg: linear-gradient(180deg, rgb(255 255 255 / .14), rgb(255 255 255 / .04));
  --usb-on-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 0 0 1px rgb(252 172 50 / .4), 0 6px 18px rgb(252 172 50 / .12);
  --usb-count-bg: #FCAC32;
  --usb-count-text: #2A1336;
  --usb-thumb: rgb(255 255 255 / .16);
}
[data-theme="light"] {
  --usb-bg: linear-gradient(160deg, rgb(255 255 255 / .88), rgb(255 255 255 / .64));
  --usb-bg-solid: linear-gradient(160deg, rgb(255 255 255 / .98), rgb(248 242 251 / .98));
  --usb-line: rgb(59 26 80 / .14);
  --usb-sep: rgb(59 26 80 / .10);
  --usb-shadow: inset 0 1px 0 #fff, 0 14px 34px rgb(59 26 80 / .12);
  --usb-text: #352B40;
  --usb-text-hi: #1E1726;
  --usb-muted: #574A5F;
  --usb-hover: rgb(59 26 80 / .05);
  --usb-on-text: #7A4E00;
  --usb-on-bg: linear-gradient(180deg, rgb(255 255 255 / .95), rgb(252 172 50 / .14));
  --usb-on-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgb(196 125 10 / .45), 0 6px 16px rgb(196 125 10 / .14);
  --usb-count-bg: #FCAC32;
  --usb-count-text: #2A1336;
  --usb-thumb: rgb(59 26 80 / .18);
}

/* ---------- COMMON (copy verbatim): the Uranus mark in the header, dark and light variants ---------- */
.usb-mk { width: 30px !important; height: 30px !important; max-width: none !important; padding: 0 !important; border-radius: 9px; object-fit: contain; flex: none; }
.usb-mk--l { display: none !important; }
[data-theme="light"] .usb-mk--d { display: none !important; }
[data-theme="light"] .usb-mk--l { display: block !important; }
.usb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 700; letter-spacing: 0; color: var(--usb-text-hi); }
html[data-theme] .app.ck { --usb-top: 0px; --ck-rail: var(--usb-w); grid-template-columns: calc(var(--usb-inset) + var(--ck-rail) + var(--usb-gap)) minmax(0, 1fr); }
html.has-shell[data-theme] .app.ck { --usb-top: var(--u-shell-h, 60px); }
html[data-theme] .app.ck.rail-mini { --ck-rail: var(--usb-w-mini); }
/* panel */
html[data-theme] .app.ck .rail { position: sticky; top: calc(var(--usb-top) + var(--usb-inset)); align-self: start; width: var(--ck-rail); height: calc(100dvh - var(--usb-top) - 2 * var(--usb-inset));
  margin: var(--usb-inset) 0; margin-inline-start: var(--usb-inset); padding: 12px 10px; gap: 2px; border: 1px solid var(--usb-line); border-radius: var(--usb-radius);
  background: var(--usb-bg); box-shadow: var(--usb-shadow); -webkit-backdrop-filter: var(--usb-blur); backdrop-filter: var(--usb-blur); overflow: hidden; transition: width .18s ease; }
/* header: system mark + name (shown with the shared bar too) */
html[data-theme] .app.ck .rail-brand { display: flex; justify-content: flex-start; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 6px; padding: 4px 8px 12px; border-bottom: 1px solid var(--usb-sep); }
/* list (scrolls inside the panel) */
html[data-theme] .app.ck .rail-nav { flex: 1 1 auto; min-height: 0; gap: 2px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--usb-thumb) transparent; }
html[data-theme] .app.ck .rail-btn, html[data-theme] .app.ck .rail-adm-i { flex-direction: row; justify-content: flex-start; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 12px;
  color: var(--usb-text); font-size: 13.5px; font-weight: 700; line-height: 1.3; text-align: start; white-space: nowrap; }
html[data-theme] .app.ck .rail-btn .ic { width: 18px; height: 18px; flex: none; }
html[data-theme] .app.ck .rail-btn .rl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; font-size: 13.5px; }
html[data-theme] .app.ck :is(.rail-btn, .rail-adm-i):hover { background: var(--usb-hover); color: var(--usb-text-hi); }
html[data-theme] .app.ck .rail-btn.active { color: var(--usb-on-text); background: var(--usb-on-bg); box-shadow: var(--usb-on-shadow); }
html[data-theme] .app.ck .rail-btn .rc { position: static; min-width: 20px; margin-inline-start: auto; padding: 0 7px; border-radius: 999px; background: var(--usb-count-bg); color: var(--usb-count-text); font-size: 11.5px; font-weight: 700; line-height: 18px; }
/* «الإدارة» (rule 8): last section; its pages are indented sub-items, the current one gold */
html[data-theme] .app.ck .rail-admin { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--usb-sep); flex: none; }
html[data-theme] .app.ck .rail-adm .rail-adm-list { gap: 1px; margin: 2px 0 0; padding: 0; border: 0; }
html[data-theme] .app.ck .rail-adm-i { min-height: 32px; padding: 6px 12px; padding-inline-start: 42px; border-radius: 10px; background: none; box-shadow: none; color: var(--usb-muted); font-size: 12.5px; font-weight: 600; }
html[data-theme] .app.ck .rail-adm-i .ic { display: none; }
html[data-theme] .app.ck .rail-adm-i.active { color: var(--usb-on-text); background: none; box-shadow: none; font-weight: 700; }
html[data-theme] .app.ck .rail-adm-i .rl { overflow: hidden; text-overflow: ellipsis; }
/* footer: collapse control */
html[data-theme] .app.ck .rail-foot { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; margin-top: 8px; padding: 8px 12px; border: 0; border-radius: 12px;
  background: var(--usb-hover); color: var(--usb-muted); font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
html[data-theme] .app.ck .rail-foot:hover { color: var(--usb-text-hi); }
html[data-theme] .app.ck .rail-foot:focus-visible { outline: 2px solid var(--usb-count-bg); outline-offset: 1px; }
html[data-theme] .app.ck .rail-foot .ic { width: 18px; height: 18px; flex: none; }
html[data-theme] .app.ck .rail-foot .rl { overflow: hidden; text-overflow: ellipsis; }
[dir="rtl"] .app.ck .rail-foot-ic { transform: scaleX(-1); }
/* collapsed (user choice > 1100px; automatic 761-1100px): 72px, icons only (title tooltips), same active pill */
html[data-theme] .app.ck.rail-mini .rail :is(.usb-name, .rl, .rail-adm-list) { display: none; }
html[data-theme] .app.ck.rail-mini .rail :is(.rail-brand, .rail-btn, .rail-foot) { justify-content: center; padding-inline: 0; position: relative; }
html[data-theme] .app.ck.rail-mini .rail-btn .rc { position: absolute; top: 2px; inset-inline-end: 4px; min-width: 16px; padding: 0 4px; line-height: 15px; }
@media (761px <= width <= 1100px) {
  html[data-theme] .app.ck, html[data-theme] .app.ck.rail-mini { --ck-rail: var(--usb-w-mini); }
  html[data-theme] .app.ck:not(.rail-open) .rail :is(.usb-name, .rl, .rail-adm-list) { display: none; }
  html[data-theme] .app.ck:not(.rail-open) .rail :is(.rail-brand, .rail-btn, .rail-foot) { justify-content: center; padding-inline: 0; position: relative; }
  html[data-theme] .app.ck:not(.rail-open) .rail-btn .rc { position: absolute; top: 2px; inset-inline-end: 4px; min-width: 16px; padding: 0 4px; line-height: 15px; }
  /* overlay above the content; the grid column keeps the 72px panel's width */
  html[data-theme] .app.ck.rail-open .rail { position: fixed; z-index: 60; top: calc(var(--usb-top) + var(--usb-inset)); bottom: var(--usb-inset); inset-inline-start: var(--usb-inset); height: auto; margin: 0; width: var(--usb-w); background: var(--usb-bg-solid); box-shadow: 0 24px 60px rgb(5 2 10 / .55); }
  html[data-theme] .app.ck .rail-scrim { position: fixed; inset: 0; z-index: 55; background: var(--ug-scrim, rgb(14 6 21 / .45)); }
}
@media (min-width: 1101px) { html[data-theme] .app.ck .rail-scrim { display: none; } }
/* phone: no panel; bottom tabs + More sheet (unchanged) */
@media (max-width: 760px) { html[data-theme] .app.ck { grid-template-columns: minmax(0, 1fr); } html[data-theme] .app.ck .rail, html[data-theme] .app.ck .rail-scrim { display: none; } }
/* the panel leaves the grid flow when it opens as an overlay: keep the page in the content column */
@media (min-width: 761px) { html[data-theme] .app.ck > .main { grid-column: 2; grid-row: 1; } }
@media (761px <= width <= 1100px) { html[data-theme] .app.ck.rail-open .rail { height: calc(100dvh - var(--usb-top) - 2 * var(--usb-inset)); } }
/* ==== sidebar-panel:2026-11-11 END ==== */

/* ---------- Row / card titles (display rules §1, 2026-11-11) ---------- */
/* Command: queue / follow-up cards and the country x unit matrix row labels.
   Owner reference: Studio task titles (span.tt). Title: Uranus Sans 700, 14px, #F1ECF6 (light #1E1726), normal
   line-height. Secondary line: 400, 12.5px, muted. Headings stay as they are. */
.kcard .t, .cgrid .uname { font-family: "Uranus Sans", "Noor", "Lato", system-ui, sans-serif !important; font-weight: 700 !important; font-size: 14px !important; line-height: normal !important; color: #F1ECF6 !important; letter-spacing: normal; }
.kcard .m { font-family: "Uranus Sans", "Noor", "Lato", system-ui, sans-serif; font-weight: 400 !important; font-size: 12.5px !important; color: #C3B6D3 !important; }
[data-theme="light"] .kcard .t, [data-theme="light"] .cgrid .uname { color: #1E1726 !important; }
[data-theme="light"] .kcard .m { color: #574A5F !important; }
/* nav-drawer 2026-11-11: the panel's brand is a link to the dashboard (no link colour / underline) */
a.rail-brand, a.rail-brand:hover { color: inherit; text-decoration: none; }
/* centre-sweep 2026-11-11 (rule 11): the unit record and the template-field editor open as a centred glass dialog, not a side drawer.
   Same markup/content/colours (.drawer keeps its glass background); phones get the full screen. */
@media (min-width: 761px) {
  .drawer { inset: 0 !important; margin: auto; width: min(720px, calc(100vw - 48px)) !important; height: min(780px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px);
    border: 1px solid var(--ug-line-2); border-radius: 22px; overflow: hidden; }
  .drawer.tf-drawer { width: min(560px, calc(100vw - 48px)) !important; height: min(720px, calc(100dvh - 48px)); }
  .drawer .dr-ft { border-radius: 0 0 22px 22px; }
}
@media (max-width: 760px) { .drawer { inset: 0 !important; width: 100% !important; height: 100dvh; border-radius: 0; border: 0; } }

/* ---------- Phones (DISPLAY-RULES.md rule 14), phone-sweep:2026-11-11 ----------
   The bottom tab bar steps aside while a text field is focused, so it never covers the field above the keyboard;
   full-height layouts use dvh. */
@media (max-width: 760px) { html:has(:is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="button"], [type="submit"]), textarea, [contenteditable="true"]):focus) .btabs { display: none; } }
/* rule 4 (full-width 2026-11-12, replaces the centre-sweep 1440 cap): every work view (queue, units, follow-up, reports…) uses the
   full width beside the side panel like the overview (cockpit.css: .page up to 1920, then centred); only the report-submission
   form stays 760 and centred; the AI assistant keeps its full layout. */
@media (min-width: 1101px) {
  .app.ck[data-view="submit"] .page { max-width: 808px; }
}
/* centre-sweep 2026-11-11 (rule 13): queue lines, priority titles, KPI captions and admin-hub links wrap instead of being cut. */
:is(.q-row .q-main > small, .prow .pt > b, .kp .kp-c, .uah-link .uah-l) { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; -webkit-line-clamp: none !important; max-height: none !important; }
