/* Phase 8 "New look" (reg_API docs/phase8-ui-theme-plan.md, mock v2 + review). Loaded only when the user turns the new
 * look on (body.ui2); app.css stays underneath. Logical properties only, so Arabic (RTL) and English (LTR) mirror. */

:root {
  --navy-950: #071226; --navy-900: #0B1B33; --navy-800: #10264A; --navy-700: #183564; --navy-600: #244A85;
  --gold-500: #C9A24D; --gold-400: #D9B76A; --gold-100: #F7EFD9; --gold-ink: #6B4E12;
  --surface: #FFFFFF; --canvas: #F4F6FA; --line: #E3E8F0; --line-2: #EEF1F6;
  --ink: #0F172A; --ink-2: #475569; --ink-3: #64748B; --ink-4: #A3AFC0; /* ink-4: disabled / decorative only */
  --green: #15803D; --green-50: #ECFDF3; --amber: #B45309; --amber-50: #FFF7E6; --red: #B91C1C; --red-50: #FEF2F2;
  --blue: #1D4ED8; --blue-50: #EEF4FF; --violet: #6D28D9; --violet-50: #F3EEFF; --gray-50: #F1F4F8;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px;
  --raise: 0 18px 50px rgba(7, 18, 38, .22);
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--gold-500);
}

body.ui2 { background: var(--canvas); color: var(--ink); line-height: 1.5; }
body.ui2 .num, body.ui2 .ltr { font-family: 'Inter', system-ui, sans-serif; }
body.ui2 :focus { outline: none; }
body.ui2 :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
.ui2-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: var(--r-md); }
.ui2-skip:focus { top: 12px; }

/* ---------- shell ---------- */
.ui2-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.ui2-app.ui2-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.ui2-side { --side-foot: .12; background: linear-gradient(180deg, rgba(7, 18, 38, .72) 0%, rgba(7, 18, 38, .66) 62%, rgba(7, 18, 38, var(--side-foot)) 80%, rgba(7, 18, 38, var(--side-foot)) 100%), url('../img/sidebar-bg.webp?v=1') center bottom / cover no-repeat, var(--navy-950); color: #D6DEEA;
  scrollbar-width: thin; scrollbar-color: rgba(201, 162, 77, .45) transparent; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; z-index: 40; }
.ui2-side.ui2-side-busy { --side-foot: .68; }   /* the menu reaches the foot: the picture stays veiled there too */
.ui2-side::-webkit-scrollbar { width: 6px; } .ui2-side::-webkit-scrollbar-thumb { background: rgba(201, 162, 77, .45); border-radius: 99px; } .ui2-side::-webkit-scrollbar-track { background: transparent; }
.ui2-side :focus-visible { box-shadow: 0 0 0 3px var(--navy-900), 0 0 0 6px var(--gold-400); }
.ui2-brand { padding: 22px 16px 10px; text-align: center; }
.ui2-brand-link { display: block; text-decoration: none; color: inherit; border-radius: var(--r-md); }   /* logo = home (2026-11-19) */
.ui2-brand-link:hover img { transform: scale(1.03); }
.ui2-brand img { transition: transform .18s ease; height: 128px; margin: 0 auto; }   /* twice the first size (2026-11-19) */
/* the two name lines of the exambooking header (English over Arabic) */
.ui2-brand-t1 { text-align: center; color: #fff; font-weight: 600; font-size: 15px; line-height: 1.35; margin-top: 10px; font-family: 'Inter', sans-serif; white-space: nowrap; }
.ui2-brand-t2 { text-align: center; color: #C6D2E4; font-weight: 700; font-size: 15.5px; line-height: 1.45; font-family: 'Almarai', sans-serif; white-space: nowrap; }
.ui2-swoosh { display: block; margin: 6px auto 0; width: 170px; height: 12px; }
/* the app name under the swoosh (2026-11-19, refined after review): gold text only (the swoosh is the one line motif),
   room below so it does not touch the gold current-page item; English in spaced small capitals */
.ui2-app-name { text-align: center; margin: 7px 0 14px; color: var(--gold-400); font-family: 'Almarai', sans-serif; font-weight: 700;
                font-size: 14px; line-height: 1.5; white-space: nowrap; }
html[lang="en"] .ui2-app-name { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.ui2-menu { list-style: none; margin: 0; padding: 8px 14px; display: flex; flex-direction: column; gap: 3px; }
.ui2-mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-md); color: #D6DEEA; font-size: 14.5px; text-decoration: none; background: none; border: 0; text-align: start; }
.ui2-mi:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ui2-mi-ic { width: 20px; text-align: center; font-size: 15px; }
.ui2-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.ui2-chev { font-size: 11px; opacity: .6; transition: transform .15s; }
.ui2-mi[aria-expanded="true"] .ui2-chev { transform: rotate(180deg); }
.ui2-mi[aria-current="page"], .ui2-mi.ui2-in { background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); color: var(--navy-950); font-weight: 700; }
.ui2-cnt { background: rgba(255, 255, 255, .14); color: #fff; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; line-height: 1.6; }
.ui2-mi.ui2-in .ui2-cnt { background: rgba(7, 18, 38, .15); color: var(--navy-950); }
.ui2-sub { list-style: none; margin: 4px 0 6px; padding: 0; padding-inline-start: 34px; display: flex; flex-direction: column; gap: 2px; }
.ui2-sub[hidden] { display: none; }
.ui2-si { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: var(--r-sm); color: #C3CEDD; font-size: 13.5px; text-decoration: none; }
.ui2-si:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ui2-si[aria-current="page"] { color: #fff; font-weight: 700; background: rgba(201, 162, 77, .18); box-shadow: inset 3px 0 0 var(--gold-500); }
html[dir="rtl"] .ui2-si[aria-current="page"] { box-shadow: inset -3px 0 0 var(--gold-500); }
.ui2-side-foot { position: relative; height: 120px; margin-top: auto; flex-shrink: 0; }
.ui2-side-foot svg { display: none; }   /* the sidebar picture has its own plane (2026-11-19) */
html[dir="rtl"] .ui2-side-foot svg { transform: scaleX(-1); }
.ui2-env { position: absolute; bottom: 14px; inset-inline-start: 16px; background: rgba(217, 119, 6, .2); color: #FCD38A; font-size: 11.5px; padding: 3px 10px; border-radius: 99px; }
.ui2-collapsed .ui2-brand-t1, .ui2-collapsed .ui2-brand-t2, .ui2-collapsed .ui2-app-name, .ui2-collapsed .ui2-swoosh, .ui2-collapsed .ui2-lbl, .ui2-collapsed .ui2-end, .ui2-collapsed .ui2-sub, .ui2-collapsed .ui2-env { display: none; }
.ui2-collapsed .ui2-brand img { height: 42px; }
.ui2-collapsed .ui2-side-foot svg { display: none; }
.d-idle { color: var(--ink-2); }
.d-idle .d-ic { background: var(--green-50); color: var(--green); }
.ui2-collapsed .ui2-mi { justify-content: center; padding: 0; }
.ui2-scrim { display: none; }

.ui2-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.ui2-top { position: sticky; top: 0; z-index: 30; background: rgba(244, 246, 250, .92); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 12px; padding: 12px 28px; }
.ui2-title { font-size: 19px; margin: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ui2-grow { flex: 1; }
.ui2-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink-2); position: relative; text-decoration: none; }
.ui2-icon:hover { color: var(--navy-700); border-color: #C9D3E1; }
/* language button next to the bell (2026-11-19): globe + the language you switch to (EN / عربي) */
.ui2-lang-f { margin: 0; display: contents; }
.ui2-lang { width: auto; min-width: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; color: var(--navy-800); font-weight: 700; font-size: 13px; cursor: pointer; }
.ui2-lang i { color: var(--gold-500); font-size: 14px; }
.ui2-lang span[aria-hidden] { line-height: 1; }
.ui2-lang:lang(en) span { font-family: 'Inter', sans-serif; letter-spacing: .06em; }
.ui2-lang:lang(ar) span { font-family: 'Almarai', sans-serif; font-size: 13.5px; }
.ui2-lang:hover { border-color: var(--gold-500); background: #FFFCF5; color: var(--navy-900); }
@media (max-width: 480px) { .ui2-lang { width: 40px; padding: 0; justify-content: center; } .ui2-lang span[aria-hidden] { display: none; } }   /* phone: globe only */
.ui2-dot { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; border: 2px solid var(--canvas); }
.ui2-search { flex: 1 1 auto; min-width: 0; max-width: 540px; margin-inline-start: auto; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 12px; height: 44px; color: var(--ink-3); }
.ui2-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 77, .2); }
.ui2-search input { border: 0; outline: 0; flex: 1; min-width: 0; background: none; color: var(--ink); align-self: stretch; height: auto; padding: 0; line-height: 1.7; }   /* full box height: Arabic descenders are not clipped (2026-11-19) */
.ui2-search input::placeholder { line-height: 1.7; }
.ui2-search input:focus-visible { box-shadow: none; }
.ui2-kbd { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--ink-2); border: 1px solid var(--line); background: var(--canvas); border-radius: 6px; padding: 2px 6px; direction: ltr; white-space: nowrap; }
.ui2-search-btn { display: none; }
.ui2-user { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 2px; border-radius: var(--r-md); }
.ui2-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: 'Inter', sans-serif; font-size: 14px; flex-shrink: 0; }
.ui2-who { display: flex; flex-direction: column; text-align: start; line-height: 1.3; }
.ui2-who-n { font-weight: 700; font-size: 14px; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui2-who-r { font-size: 12px; color: var(--ink-2); }
.ui2-who-c { font-size: 11px; color: var(--ink-3); }
body.ui2 .dropdown-panel { border-radius: var(--r-md); border-color: var(--line); box-shadow: var(--raise); padding: 6px; }
body.ui2 .dropdown-item { border-radius: var(--r-sm); min-height: 40px; display: flex; align-items: center; gap: 10px; }

.ui2-content { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 8px 28px 40px; }
.ui2-content:focus { outline: none; }
.ui2-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 28px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line); }

/* ---------- shared classes used by every page (same names as app.css) ---------- */
body.ui2 .card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: none; }
body.ui2 .btn { min-height: 40px; padding: 0 16px; border-radius: var(--r-md); font-weight: 700; border: 1px solid transparent; transition: background-color .15s, border-color .15s; }
body.ui2 .btn-primary { background: var(--navy-800); color: #fff; }
body.ui2 .btn-primary:hover:not(:disabled) { background: var(--navy-700); }
body.ui2 .btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
body.ui2 .btn-secondary:hover:not(:disabled) { background: #F7F9FC; border-color: #C9D3E1; }
body.ui2 .btn-danger { background: var(--red); color: #fff; }
body.ui2 .btn-danger:hover:not(:disabled) { background: #991B1B; }
body.ui2 .btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
body.ui2 .input { border-color: var(--line); border-radius: var(--r-md); min-height: 42px; padding: .5rem .8rem; color: var(--ink); }
body.ui2 .input:focus { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 77, .2); }
body.ui2 .input:disabled, body.ui2 .input[readonly] { background: var(--gray-50); color: var(--ink-2); }
body.ui2 .label { color: var(--ink-2); font-weight: 700; font-size: 13px; }
body.ui2 input[type="checkbox"], body.ui2 input[type="radio"] { accent-color: var(--navy-800); width: 18px; height: 18px; }
body.ui2 .badge { padding: .15rem .6rem; font-weight: 700; font-size: 12px; }
body.ui2 .data-table th { background: transparent; color: var(--ink-2); font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 700; border-bottom: 1px solid var(--line); }
body.ui2 .data-table td { border-bottom-color: var(--line-2); }
body.ui2 .data-table tbody tr:hover { background: #FAFBFD; }
body.ui2 .tab-btn { min-height: 42px; color: var(--ink-2); font-weight: 700; background: none; border-inline: 0; border-top: 0; }
body.ui2 .tab-btn:hover { color: var(--navy-800); }
body.ui2 .border-primary { border-color: var(--gold-500) !important; }
body.ui2 .spinner { border-color: var(--line); border-top-color: var(--gold-500); }
body.ui2 .modal-backdrop { background: rgba(7, 18, 38, .5); backdrop-filter: blur(2px); }
body.ui2 .modal-box { border-radius: var(--r-lg); box-shadow: var(--raise); }
body.ui2 .toast-area { top: 16px; bottom: auto; }
body.ui2 .toast { background: #fff; color: var(--ink); border: 1px solid var(--line); border-inline-start: 4px solid var(--green); border-radius: var(--r-md); box-shadow: var(--raise); font-weight: 700; }
body.ui2 .toast-err { border-inline-start-color: var(--red); }

/* ---------- dashboard (dashboard_v2.php) ---------- */
.d-wrap { display: flex; flex-direction: column; gap: 20px; }
.d-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 116px; color: #fff; background: var(--navy-900); }
.d-hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* banner picture (2026-11-19): plane on the end side; mirrored in Arabic so it stays opposite the greeting */
.d-hero-bg { position: absolute; inset: 0; background: url('../img/dashboard-hero.webp?v=1') right center / cover no-repeat, var(--navy-900); }
html[dir="rtl"] .d-hero-bg { transform: scaleX(-1); }
.d-hero-t { position: relative; padding: 18px 32px; max-width: 660px; }
.d-hero p .d-sum { display: block; margin-top: 2px; color: #C6D2E4; font-size: 13.5px; }
.d-hero h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; }
.d-hero h1 b { color: var(--gold-400); font-family: 'Inter', sans-serif; letter-spacing: .02em; }
.d-hero h1 b.d-app { font-family: inherit; letter-spacing: 0; }   /* the app name (2026-11-19): the page font, Arabic or English */
.d-hero p { margin: 8px 0 0; color: #E2E9F3; font-size: 14.5px; }
.d-hero .d-date { margin-top: 8px; font-size: 12.5px; color: #C6D2E4; }
.d-lead-row { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; }
.d-lead { border-radius: var(--r-lg); background: linear-gradient(160deg, var(--navy-800), var(--navy-950)); color: #fff; padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.d-lead:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(7, 18, 38, .28); }
.d-lead .k { color: #C6D2E4; font-weight: 700; }
.d-lead .v { font-size: 56px; font-weight: 800; line-height: 1; color: var(--gold-400); font-family: 'Inter', sans-serif; }
.d-lead .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.d-lead .mchip { background: rgba(255, 255, 255, .1); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
.d-lead .go { margin-top: auto; color: var(--gold-400); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
html[dir="rtl"] .d-lead .go i { transform: scaleX(-1); }
.d-lead::after { content: ""; position: absolute; inset-inline-end: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 2px solid rgba(201, 162, 77, .25); }
.d-card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 4px; flex-wrap: wrap; }
.d-card-h h2 { margin: 0; font-size: 16px; font-weight: 800; }
.d-list { list-style: none; margin: 0; padding: 4px 12px 12px; }
.d-li { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px solid var(--line-2); }
.d-li:last-child { border-bottom: 0; }
.d-ic { width: 42px; height: 42px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; background: var(--gray-50); color: var(--ink-2); }
.d-ic.blue { background: var(--blue-50); color: var(--blue); } .d-ic.green { background: var(--green-50); color: var(--green); }
.d-ic.amber { background: var(--amber-50); color: var(--amber); } .d-ic.violet { background: var(--violet-50); color: var(--violet); }
.d-li .t { font-weight: 700; } .d-li .s { font-size: 12.5px; color: var(--ink-2); }
.d-li .c { margin-inline-start: auto; font-size: 22px; font-weight: 800; font-family: 'Inter', sans-serif; min-width: 36px; text-align: center; }
.d-li .none { margin-inline-start: auto; color: var(--ink-2); font-size: 13px; }
.d-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.d-stat { padding: 16px 20px; display: flex; gap: 12px; align-items: center; }
.d-stat + .d-stat { border-inline-start: 1px solid var(--line-2); }
.d-stat .v { font-size: 22px; font-weight: 800; font-family: 'Inter', sans-serif; line-height: 1.1; }
.d-stat .l { color: var(--ink-2); font-size: 13px; }
.d-qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 20px 20px; }
.d-qbtn { border: 1px solid var(--line); background: #fff; border-radius: var(--r-md); padding: 16px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--navy-800); font-weight: 700; font-size: 13.5px; text-align: center; min-height: 96px; text-decoration: none; transition: border-color .15s, background .15s; }
.d-qbtn i { font-size: 22px; }
.d-qbtn:hover { border-color: var(--gold-500); background: #FFFCF5; }
.d-qbtn.primary { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.d-qbtn.primary i { color: var(--gold-400); }
.d-qbtn.primary:hover { background: var(--navy-700); }
.d-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px; }
.d-donut-wrap { display: flex; align-items: center; gap: 24px; padding: 8px 20px 20px; flex-wrap: wrap; }
.d-donut { position: relative; width: 156px; height: 156px; flex-shrink: 0; }
.d-donut svg { width: 156px; height: 156px; }
.d-donut .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.d-donut .c b { display: block; font-size: 24px; font-family: 'Inter', sans-serif; }
.d-donut .c span { font-size: 12px; color: var(--ink-2); }
.d-legend { flex: 1; min-width: 200px; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.d-lg { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 52px; gap: 10px; align-items: center; font-size: 13.5px; }
.d-lg i { width: 12px; height: 12px; border-radius: 3px; display: block; }
.d-lg .n { font-weight: 800; font-family: 'Inter', sans-serif; }
.d-lg .p { color: var(--ink-2); text-align: end; font-family: 'Inter', sans-serif; font-size: 12.5px; }
.d-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.d-tbl th { font-size: 12.5px; color: var(--ink-2); font-weight: 700; text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.d-tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.d-tbl tbody tr:last-child td { border-bottom: 0; }
/* Latest requests: fixed columns so the table fits its card (2026-11-19); the student column takes the rest, long names
   end with an ellipsis (full name on hover), a long course wraps to a second line */
.d-tbl-fix { table-layout: fixed; }
.d-tbl-fix .w-mv { width: 128px; } .d-tbl-fix .w-crs { width: 27%; } .d-tbl-fix .w-dt { width: 96px; } .d-tbl-fix .w-st { width: 124px; }
.d-tbl-fix th, .d-tbl-fix td { padding-inline: 10px; }
.d-tbl-fix .d-who { max-width: 100%; }
.d-tbl-fix .d-who .nm, .d-tbl-fix .d-who .en { overflow: hidden; text-overflow: ellipsis; }
.d-tbl-fix .d-tag.d-crs { display: inline-block; white-space: normal; line-height: 1.45; max-width: 100%; }
.d-tbl-fix td.end { text-align: end; }
.d-who { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.d-who:hover .nm { text-decoration: underline; }
.d-ph { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; font-family: 'Inter', sans-serif; }
.d-who .nm { font-weight: 700; white-space: nowrap; }
.d-who .en { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.green { background: var(--green-50); color: var(--green); } .chip.amber { background: var(--amber-50); color: var(--amber); }
.chip.gray { background: var(--gray-50); color: var(--ink-2); }
.d-mv { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.d-mv i { color: var(--ink-3); }
.d-tag.d-crs { font-family: inherit; direction: inherit; }
.d-stat .l .d-note { color: var(--ink-3); font-size: 12px; cursor: help; }
.d-tag { display: inline-flex; font-size: 12.5px; color: var(--ink-2); background: var(--gray-50); border-radius: var(--r-sm); padding: 2px 8px; font-family: 'Inter', sans-serif; direction: ltr; white-space: nowrap; }
.d-note { font-size: 12.5px; color: var(--ink-2); margin: 0; }
.d-empty { padding: 24px 20px; color: var(--ink-2); }

/* ---------- page building blocks (u-*), used by the pages in the new look ---------- */
.chip.blue { background: var(--blue-50); color: var(--blue); } .chip.red { background: var(--red-50); color: var(--red); }
.chip.violet { background: var(--violet-50); color: var(--violet); }
.u-page-h { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.u-crumb { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.u-crumb a { color: inherit; text-decoration: none; } .u-crumb a:hover { text-decoration: underline; }
.u-page-h h1 { margin: 2px 0 0; font-size: 26px; font-weight: 800; line-height: 1.25; }
.u-page-h p { margin: 2px 0 0; color: var(--ink-2); }
.u-page-h .act { margin-inline-start: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.u-filters { padding: 14px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.u-search { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-md); height: 48px; padding: 0 14px; background: #fff; color: var(--ink-3); }
.u-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 15px; color: var(--ink); background: none; }
.u-search input:focus-visible { box-shadow: none; }
.u-search:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 77, .2); }
.u-select { display: flex; align-items: center; gap: 6px; height: 48px; border: 1px solid var(--line); border-radius: var(--r-md); padding-inline: 12px 6px; background: #fff; min-width: 0; }
.u-select:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 77, .2); }
.u-select label { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.u-select select { border: 0; background: transparent; font-weight: 700; color: var(--ink); height: 100%; max-width: 230px; min-width: 0; }
.u-select select:focus-visible { box-shadow: none; }
.u-res-h { display: flex; align-items: center; gap: 8px; padding: 14px 20px 6px; flex-wrap: wrap; }
.u-res-h h2 { margin: 0; font-size: 15px; font-weight: 800; }
.u-res-h .act { margin-inline-start: auto; }
.u-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.u-tbl th { font-size: 12.5px; color: var(--ink-2); font-weight: 700; text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.u-tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.u-tbl tbody tr:last-child td { border-bottom: 0; }
.u-tbl tr.u-click { cursor: pointer; }
.u-tbl tr.u-click:hover td { background: #FAFBFD; }
.u-tbl tr.u-click:focus-visible { box-shadow: inset 0 0 0 3px var(--gold-500); border-radius: 0; }
.u-tbl .u-go { color: var(--ink-3); text-align: end; width: 1%; }
html[dir="rtl"] .u-tbl .u-go i { transform: scaleX(-1); }
.u-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.u-who a { color: inherit; text-decoration: none; }
.u-who .nm { font-weight: 700; display: block; }
.u-who a.nm:hover { text-decoration: underline; }
.u-who .sub { font-size: 12px; color: var(--ink-2); display: block; }
.u-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; font-family: 'Inter', sans-serif; }
.u-tag { display: inline-flex; font-size: 12.5px; color: var(--ink-2); background: var(--gray-50); border-radius: var(--r-sm); padding: 2px 8px; font-family: 'Inter', sans-serif; direction: ltr; white-space: nowrap; }
.u-kv { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); background: var(--gray-50); border-radius: var(--r-sm); padding: 3px 9px; white-space: nowrap; }
.u-kv b { color: var(--ink); font-family: 'Inter', sans-serif; }
.u-skel { display: inline-block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EEF1F6, #F8FAFC, #EEF1F6); background-size: 200% 100%; animation: u-shimmer 1.2s linear infinite; }
@keyframes u-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.u-empty { padding: 36px 16px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.u-empty i { font-size: 22px; color: var(--ink-3); width: 52px; height: 52px; border-radius: 50%; background: var(--gray-50); display: grid; place-items: center; }
.u-pager { padding: 12px 16px; border-top: 1px solid var(--line); }
/* profile header (student file) */
.u-prof { display: flex; gap: 20px; align-items: center; padding: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.u-photo { width: 96px; height: 116px; border-radius: 14px; background: var(--gray-50); color: var(--ink-4); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-size: 34px; }
.u-photo img { width: 100%; height: 100%; object-fit: cover; }
.u-prof-main { flex: 1; min-width: 240px; }
.u-prof h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.3; }
.u-prof .en { color: var(--ink-2); font-size: 14px; }
.u-prof .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.u-prof .act { display: flex; gap: 8px; flex-wrap: wrap; }
/* pill tabs */
.u-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 16px; }
.u-tab { min-height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 0; background: none; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.u-tab:hover { color: var(--navy-800); background: var(--gray-50); }
.u-tab[aria-selected="true"] { background: var(--navy-800); color: #fff; }
/* section cards with label-over-value pairs */
/* student page sections (2026-11-18): each section has a tone (navy, gold, green, violet, blue, amber; set by the page),
   a header washed in that tone with a filled icon, the fields as soft tiles, empty fields dashed, and a filled-fields meter */
.u-sec { --sec-c: var(--navy-700); --sec-bg: #EAF0F8; margin-bottom: 16px; overflow: hidden; transition: box-shadow .18s ease; }
.u-sec:hover { box-shadow: 0 10px 28px -18px rgba(7, 18, 38, .35); }
.u-sec.t-gold { --sec-c: #A27A22; --sec-bg: var(--gold-100); }
.u-sec.t-green { --sec-c: var(--green); --sec-bg: var(--green-50); }
.u-sec.t-violet { --sec-c: var(--violet); --sec-bg: var(--violet-50); }
.u-sec.t-blue { --sec-c: var(--blue); --sec-bg: var(--blue-50); }
.u-sec.t-amber { --sec-c: var(--amber); --sec-bg: var(--amber-50); }
.u-sec-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap;
           background: linear-gradient(to right, var(--sec-bg), rgba(255, 255, 255, 0) 70%); }
html[dir="rtl"] .u-sec-h { background: linear-gradient(to left, var(--sec-bg), rgba(255, 255, 255, 0) 70%); }
.u-sec-h h2 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--navy-900); }
.u-sec-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--sec-c); color: #fff; display: grid; place-items: center; flex-shrink: 0; font-size: 15px;
            box-shadow: 0 6px 14px -8px var(--sec-c); }
.u-sec-meter { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.u-sec-meter .bar { width: 56px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.u-sec-meter .bar i { display: block; height: 100%; border-radius: 99px; background: var(--sec-c); }
.u-sec-meter b { font-family: 'Inter', sans-serif; color: var(--ink-2); direction: ltr; unicode-bidi: isolate; }
.u-sec-meter.full b { color: var(--green); }
.u-sec-b { padding: 16px 18px 18px; }
.u-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0; }
.u-dl > div { background: #FAFBFD; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; min-width: 0; transition: border-color .15s, background .15s; }
.u-dl > div:hover { background: #fff; border-color: #D5DEEA; }
.u-dl > div.is-empty { background: transparent; border-style: dashed; border-color: var(--line); }
.u-dl > div.is-empty dt { color: var(--ink-3); }
.u-dl dt { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; font-weight: 700; }
.u-dl dd { margin: 0; font-weight: 700; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.u-dl dd .u-none { color: var(--ink-4); font-weight: 400; }
.u-sec-b > p, .u-sec-b > .u-note { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }
/* the profile card: a navy to gold strip on top and a ring round the photo */
.u-prof { position: relative; overflow: hidden; }
.u-prof::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(to right, var(--navy-800), var(--navy-600) 55%, var(--gold-500)); }
html[dir="rtl"] .u-prof::before { background: linear-gradient(to left, var(--navy-800), var(--navy-600) 55%, var(--gold-500)); }
.u-photo { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold-100); }
.u-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
/* page heading icon, filter grid, pill tabs on pages that use .tab-btn (movements) */
.u-page-h h1 { display: flex; align-items: center; gap: 10px; }
.u-h-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--gold-100); color: var(--gold-ink); font-size: 17px; flex-shrink: 0; }
.u-fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* the search box spans 2 (md:col-span-2) */
body.ui2 .u-fgrid .input { min-height: 48px; }
.u-tabs .tab-btn { border: 0 !important; margin: 0 !important; border-radius: var(--r-sm); padding: 0 14px; min-height: 38px; display: inline-flex; align-items: center; gap: 8px; }
.u-tabs .tab-btn[aria-selected="true"] { background: var(--navy-800); color: #fff !important; }
.u-tabs .tab-btn .badge { background: var(--gray-50) !important; color: var(--ink-2) !important; }
.u-tabs .tab-btn[aria-selected="true"] .badge { background: rgba(255, 255, 255, .18) !important; color: #fff !important; }
.u-sub2 { font-size: 12px; color: var(--ink-2); }
.u-who .sub b { color: var(--ink); font-weight: 700; }
/* page dialogs: headings, choices as chips, notes and errors as boxes */
body.ui2 .modal-box h2, body.ui2 .modal-box h3 { font-size: 18px; font-weight: 800; }
body.ui2 .modal-box fieldset { border: 0 !important; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.ui2 .modal-box fieldset legend { width: 100%; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; padding: 0 !important; }
body.ui2 .modal-box fieldset > label { display: inline-flex !important; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px !important; cursor: pointer; background: #fff; min-height: 40px; }
body.ui2 .modal-box fieldset > label:hover { border-color: #C9D3E1; }
body.ui2 .modal-box fieldset > label:has(input:checked) { border-color: var(--navy-700); background: var(--blue-50); color: var(--navy-800); font-weight: 700; }
body.ui2 .modal-box p.text-amber-700 { background: var(--amber-50); border: 1px solid #F8DDA8; border-radius: var(--r-md); padding: 10px 12px; color: #7C3A0A !important; }
body.ui2 .modal-box p.text-red-600:not(.hidden) { background: var(--red-50); border: 1px solid #F6CACA; border-radius: var(--r-md); padding: 10px 12px; color: var(--red) !important; }
@media (max-width: 760px) { .u-fgrid { grid-template-columns: minmax(0, 1fr); } }
/* report pages: filter card, output choices as chips, count bar, drill-down dialogs */
.u-h1 { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; margin: 0; }
.u-filters-card { padding: 16px; margin-bottom: 16px; }
body.ui2 .u-filters-card .text-gray-600 { color: var(--ink-2); font-weight: 700; font-size: 12.5px; }
.u-choice { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.u-choice > label { display: inline-flex !important; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; cursor: pointer; background: #fff; min-height: 40px; }
.u-choice > label:hover { border-color: #C9D3E1; }
.u-choice > label:has(input:checked) { border-color: var(--navy-700); background: var(--blue-50); color: var(--navy-800); font-weight: 700; }
.u-count { display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-weight: 700; border-bottom: 1px solid var(--line-2); }
.u-count b { font-size: 18px; }
body.ui2 .modal-box [data-tabs] { border: 0 !important; background: var(--gray-50); border-radius: var(--r-md); padding: 4px; gap: 4px; }
body.ui2 .modal-box [data-tabs] > button { border: 0 !important; margin: 0 !important; border-radius: var(--r-sm); min-height: 36px; padding: 0 14px; font-weight: 700; color: var(--ink-2); }
body.ui2 .modal-box [data-tabs] > button.border-primary { background: var(--navy-800); color: #fff !important; }
body.ui2 .modal-box [data-out] .grid > div.border { border-color: var(--line) !important; border-radius: var(--r-md) !important; padding: 10px 12px !important; background: #fff; }
body.ui2 .modal-box .bg-gray-50 { background: var(--gray-50) !important; border-radius: var(--r-md) !important; }
body.ui2 .data-table tfoot td { font-weight: 800; border-top: 1px solid var(--line); }
/* setup / admin / profile */
.u-h1.mb-6 { margin-bottom: 24px; }
body.ui2 #permGroups details { border-color: var(--line) !important; border-radius: var(--r-md) !important; background: #fff; }
body.ui2 #permGroups summary { background: var(--gray-50) !important; border-radius: var(--r-md) !important; min-height: 48px; }
body.ui2 #permGroups details[open] > summary { border-end-start-radius: 0 !important; border-end-end-radius: 0 !important; }
body.ui2 #roleList > *, body.ui2 #mainList > * { border-radius: var(--r-sm); }
body.ui2 pre { border-color: var(--line) !important; border-radius: var(--r-md) !important; }
/* segmented control (profile: look) — works in both looks */
.u-seg { display: inline-flex; background: #F1F4F8; border-radius: 12px; padding: 4px; gap: 4px; }
.u-seg button { border: 0; background: none; min-height: 36px; padding: 0 14px; border-radius: 8px; font-weight: 700; color: #475569; cursor: pointer; }
.u-seg button[aria-pressed="true"] { background: #10264A; color: #fff; }
/* edit dialog: wider, grouped fields */
body.ui2 #editModal .modal-box { max-width: 860px; }
.u-fgroup { grid-column: 1 / -1; font-size: 13px; font-weight: 800; color: var(--navy-700); border-bottom: 1px solid var(--line-2); padding-bottom: 6px; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.u-fgroup:first-child { margin-top: 0; }

/* ---------- sign-in page (index.php, new look) ---------- */
/* ---- sign-in page (2026-11-19 revamp): the dusk scene full-screen, the sidebar's brand block, one white card ---- */
.si-body { margin: 0; min-height: 100vh; font-family: 'Almarai', 'Inter', system-ui, sans-serif; background: var(--navy-950); color: var(--ink); }
html[lang="en"] .si-body { font-family: 'Inter', 'Almarai', system-ui, sans-serif; }
.si-bg { position: fixed; inset: 0; z-index: 0;
         background: linear-gradient(to right, rgba(7, 18, 38, .92) 0%, rgba(7, 18, 38, .72) 38%, rgba(7, 18, 38, .2) 72%, rgba(7, 18, 38, .35) 100%),
                     url('../img/signin-bg.webp?v=4') center / cover no-repeat, var(--navy-950); }
html[dir="rtl"] .si-bg { transform: scaleX(-1); }   /* the plane stays on the side away from the card */
.si-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; padding: 40px 24px 72px; box-sizing: border-box; }
.si-col { width: 100%; max-width: 460px; margin-inline-start: clamp(0px, 9vw, 150px); }
/* brand block: as in the sidebar */
.si-brand { position: relative; text-align: center; color: #fff; }
.si-brand::before { content: ""; position: absolute; z-index: -1; left: 50%; top: clamp(64px, 8.5vh, 88px); width: 300px; height: 300px; transform: translate(-50%, -50%);
                     background: radial-gradient(circle, rgba(201, 162, 77, .22), rgba(201, 162, 77, 0) 62%); pointer-events: none; }   /* soft gold glow behind the logo */
.si-logo { height: clamp(128px, 17vh, 176px); margin: 0 auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .4)); }   /* bigger, scales with the screen (review 2026-11-19) */
.si-org-en { margin-top: 8px; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: .01em; text-align: center; }
.si-org-ar { margin-top: 4px; font-family: 'Almarai', sans-serif; font-weight: 700; font-size: 19px; color: #C6D2E4; text-align: center; }
.si-swoosh { display: block; width: 220px; height: 15px; margin: 10px auto 0; }
.si-app { margin-top: 10px; color: var(--gold-400); font-family: 'Almarai', sans-serif; font-weight: 700; font-size: 18px; }
html[lang="en"] .si-app { font-family: 'Inter', sans-serif; font-size: 13.5px; letter-spacing: .2em; text-transform: uppercase; }
/* the card */
/* light frosted card with navy text, a thin gold edge and the gold button (user pick 2026-11-19): part of the dusk scene like the glass pills, the gold button is the brightest thing on it */
.si-card { position: relative; margin-top: 30px; background: rgba(244, 246, 250, .92); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
           border: 1px solid rgba(201, 162, 77, .45); border-radius: 20px; padding: 32px 32px 22px;
           box-shadow: 0 24px 60px rgba(3, 10, 24, .5), inset 0 1px 0 rgba(255, 255, 255, .7); overflow: hidden; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .si-card { background: var(--canvas); } }
.si-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold-500) 25%, var(--gold-400) 75%, transparent); }
.si-card h1 { margin: 0; font-size: 24px; font-weight: 800; color: var(--navy-900); }
.si-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; text-wrap: balance; }
.si-alert { margin-top: 18px; border-radius: var(--r-md); padding: 10px 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.55; }
.si-alert i { margin-top: 3px; }
.si-err { background: var(--red-50); border: 1px solid #F6CACA; color: var(--red); }
.si-ok { background: var(--green-50); border: 1px solid #BBE7CB; color: var(--green); }
.si-warn { background: var(--amber-50); border: 1px solid #F8DDA8; color: #7C3A0A; }
.si-ms { margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; border-radius: var(--r-md);
         background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: var(--navy-950); border: 1px solid rgba(247, 239, 217, .35);
         box-shadow: 0 6px 18px rgba(201, 162, 77, .28); font-weight: 700; font-size: 15px; text-decoration: none; transition: filter .15s, box-shadow .15s; }
.si-ms:hover { background: linear-gradient(180deg, #E3C47E, #D1AC58); }
.si-ms:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--navy-700); }
.si-ms-ic { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.si-lock { margin: 20px 0 0; padding-top: 14px; border-top: 1px dashed #D5DCE7; font-size: 12px; color: var(--ink-2); text-align: center; }
/* language: the top bar's globe button, on the dark scene */
.si-lang { position: fixed; z-index: 2; top: 20px; inset-inline-end: 24px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
           border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none;
           font-weight: 700; font-size: 13px; backdrop-filter: blur(6px); transition: border-color .15s, background-color .15s; }
.si-lang i { color: var(--gold-400); }
.si-lang:lang(en) span { font-family: 'Inter', sans-serif; letter-spacing: .06em; }
.si-lang:hover { border-color: var(--gold-500); background: rgba(201, 162, 77, .14); }
.si-lang:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--navy-900), 0 0 0 6px var(--gold-400); }
.si-foot { position: fixed; z-index: 1; bottom: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); box-sizing: border-box;
           padding: 7px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .1); backdrop-filter: blur(8px);
           font-size: 12.5px; font-weight: 400; color: #E8EEF6; text-align: center; }   /* a glass pill like the language button (2026-11-19) */
@media (max-width: 860px) {
  .si-bg { background: linear-gradient(to bottom, rgba(7, 18, 38, .85), rgba(7, 18, 38, .6)), url('../img/signin-bg.webp?v=4') 74% center / cover no-repeat, var(--navy-950); }
  .si-wrap { align-items: flex-start; padding: 72px 16px 64px; }
  .si-col { margin: 0 auto; }
  .si-logo { height: 112px; }
  .si-brand::before { top: 56px; width: 240px; height: 240px; }
  .si-card { padding: 24px 20px 18px; }
  .si-foot { position: relative; left: auto; bottom: auto; transform: none; display: block; margin: 0 auto 20px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .d-row { grid-template-columns: minmax(0, 1fr); }
  .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-stat:nth-child(3) { border-inline-start: 0; }
  .d-stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 1024px) {
  .ui2-app, .ui2-app.ui2-collapsed { grid-template-columns: minmax(0, 1fr); }
  .ui2-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; transform: translateX(-105%); transition: transform .2s ease; }
  html[dir="rtl"] .ui2-side { transform: translateX(105%); }
  .ui2-drawer .ui2-side, html[dir="rtl"] .ui2-drawer .ui2-side { transform: none; }   /* the RTL closed rule is more specific: open it too (2026-11-19) */
  .ui2-drawer .ui2-scrim { display: block; position: fixed; inset: 0; background: rgba(7, 18, 38, .45); z-index: 35; }
  .ui2-collapsed .ui2-brand-t1, .ui2-collapsed .ui2-brand-t2, .ui2-collapsed .ui2-app-name, .ui2-collapsed .ui2-swoosh, .ui2-collapsed .ui2-lbl, .ui2-collapsed .ui2-end, .ui2-collapsed .ui2-env { display: revert; }
  .d-lead-row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 761px) { .ui2-title { flex-shrink: 0; } }
@media (max-width: 760px) {
  .ui2-top { padding: 10px 14px; gap: 8px; }
  .ui2-search { display: none; }
  .ui2-search-btn { display: grid; margin-inline-start: auto; }
  .ui2-who, .ui2-who-c { display: none; }
  .ui2-content { padding: 6px 14px 32px; }
  .d-wrap { gap: 14px; }
  .d-hero-t { padding: 18px 20px; } .d-hero h2 { font-size: 22px; }
  .d-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-lead .v { font-size: 46px; }
}
@media (max-width: 640px) {
  .d-tbl thead { display: none; }
  .d-tbl-fix { table-layout: auto; } .d-tbl-fix colgroup { display: none; }   /* phone: stacked rows, no fixed columns */
  .d-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 6px; border-bottom: 1px solid var(--line-2); }
  .d-tbl tbody tr:last-child { border-bottom: 0; }
  .d-tbl td { border: 0; padding: 0; }
  .d-tbl td.first { grid-column: 1; grid-row: 1; }
  .d-tbl td.end { grid-column: 2; grid-row: 1; justify-self: end; }
}
@media (max-width: 760px) {
  .u-page-h h1 { font-size: 22px; }
  .u-select { flex: 1 1 100%; }
  .u-select select { max-width: none; flex: 1; }
  .u-prof { padding: 16px; gap: 14px; }
  .u-photo { width: 72px; height: 88px; font-size: 26px; }
}
@media (max-width: 640px) {
  .u-tbl.u-stack thead { display: none; }
  .u-tbl.u-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 6px; border-bottom: 1px solid var(--line-2); }
  .u-tbl.u-stack tbody tr:last-child { border-bottom: 0; }
  .u-tbl.u-stack td { border: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
  .u-tbl.u-stack td[data-k]::before { content: attr(data-k); color: var(--ink-2); font-size: 12px; }
  .u-tbl.u-stack td.u-first { grid-column: 1; grid-row: 1; }
  .u-tbl.u-stack td.u-go { grid-column: 2; grid-row: 1; justify-self: end; width: auto; }
}
@media (prefers-reduced-motion: reduce) { body.ui2 *, body.ui2 *::before { animation: none !important; transition: none !important; } }
@media print {
  /* pages that print in place (student forms) hide every body child except <main>; in the new look <main> sits inside
     the layout, so the layout itself must stay visible (its sidebar, top bar and footer are hidden below) */
  body.ui2 > .ui2-app { display: block !important; }
  .ui2-main { display: block !important; min-height: 0 !important; }
  .ui2-app { display: block; }
  .ui2-side, .ui2-top, .ui2-foot, .ui2-scrim, .ui2-skip { display: none !important; }
  .ui2-content { padding: 0 !important; max-width: none !important; }
  body.ui2 { background: #fff; }
}
/* sign-in messages in the card's own colours (Payroll, 2026-11-19): a soft tint, a 3px edge on the leading side and
   navy text, instead of the plain green / red / amber boxes that clashed with the frosted card and the gold button */
.si-alert { border-radius: 10px; border: 1px solid transparent; border-inline-start-width: 3px; padding: 10px 14px; align-items: center; font-weight: 600; }
.si-alert i { margin-top: 0; font-size: 15px; }
.si-ok { background: rgba(16, 38, 74, .05); border-color: rgba(201, 162, 77, .40); border-inline-start-color: var(--gold-500); color: var(--navy-900); }
.si-ok i { color: var(--gold-ink); }
.si-err { background: rgba(185, 28, 28, .05); border-color: rgba(185, 28, 28, .22); border-inline-start-color: var(--red); color: #7F1D1D; }
.si-err i { color: var(--red); }
.si-warn { background: rgba(180, 83, 9, .06); border-color: rgba(180, 83, 9, .25); border-inline-start-color: var(--amber); color: #7C3A0A; }
.si-warn i { color: var(--amber); }

/* Dashboard, clearer (owner's request 2026-11-19): the lead card as labelled rows, one tile per waiting item */
.d-lead > * { position: relative; z-index: 1; }
.d-lead-dl { margin: 2px 0 0; display: flex; flex-direction: column; }
.d-lead-dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .09); font-size: 13px; }
.d-lead-dl > div:last-child { border-bottom: 0; }
.d-lead-dl dt { color: #AFC0D8; font-weight: 400; }
.d-lead-dl dd { margin: 0; font-weight: 700; color: #fff; display: inline-flex; align-items: center; gap: 7px; text-align: end; }
.d-lead-dl .net dd { color: var(--gold-400); font-size: 16px; font-family: 'Inter', sans-serif; }
.d-lead-dl .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #94A3B8; flex-shrink: 0; }
.d-lead-dl .dot.green { background: #4ADE80; } .d-lead-dl .dot.amber { background: #FBBF24; }
.d-wcard { display: flex; flex-direction: column; }
.d-wcard .d-card-h .chip { margin-inline-start: auto; }
.d-wt { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; padding: 14px 20px 20px; }
.d-wtile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.d-wtile.ok { background: linear-gradient(180deg, #F8FBF9, #fff); }
.d-wtile.due { border-color: rgba(180, 83, 9, .35); border-inline-start: 4px solid var(--amber); }
a.d-wtile:hover { transform: translateY(-2px); box-shadow: var(--raise); }
.d-wtile-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.d-wtile .c { font-size: 30px; font-weight: 800; font-family: 'Inter', sans-serif; color: var(--amber); line-height: 1; }
.d-wtile .t { font-weight: 700; font-size: 15px; line-height: 1.5; }
.d-wtile .s { font-size: 12.5px; color: var(--ink-2); }
.d-wtile .s.ok { margin-top: auto; background: var(--green-50); color: var(--green); font-weight: 700; border-radius: var(--r-sm); padding: 7px 10px; display: flex; align-items: center; gap: 7px; }
.d-wtile .go { margin-top: auto; background: var(--amber-50); color: var(--amber); font-weight: 700; font-size: 13px; border-radius: var(--r-sm); padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
html[dir="rtl"] .d-wtile .go i { transform: scaleX(-1); }
.d-wnone { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; color: var(--ink-2); font-weight: 700; }
