/* Admin dashboard. Structure and finish follow the Naqrah dashboards:
   dark icon rail, white sub menu, bordered white cards, one colour per number. */
:root {
  --d-font: "Inter", "IBM Plex Sans Arabic", "Geeza Pro", "Segoe UI", sans-serif;
  --d-ink: #0b1533;
  --d-ink-2: #475069;
  --d-muted: #7b849a;
  --d-faint: #a6adbd;
  --d-line: #e3e7ee;
  --d-bg: #f5f6f9;
  --d-soft: #f0f2f6;
  --d-navy: #0b1738;
  --d-blue: #1d4fd8;
  --d-blue-soft: #e9effd;
  --d-teal: #0f8a7b;
  --d-purple: #7c3aed;
  --d-amber: #b45309;
  --d-amber-fill: #dd7f0a;
  --d-gold: #f5b83d;
  --d-red: #dc2626;
  --d-ease: cubic-bezier(.32, .72, 0, 1);
}
html { font-size: 16px; }
body { font-family: var(--d-font); font-size: 14.5px; line-height: 1.6; color: var(--d-ink); background: var(--d-bg); }
.num { font-family: "Inter", var(--d-font); }
.c-teal { --c: var(--d-teal); }
.c-blue { --c: var(--d-blue); }
.c-purple { --c: var(--d-purple); }
.c-amber { --c: var(--d-amber); }

.app { display: grid; grid-template-columns: auto minmax(0, 1fr); min-height: 100dvh; }

/* ---------- Rail ---------- */
.side { position: sticky; top: 0; height: 100dvh; display: flex; z-index: 40; }
.rail { width: 80px; background: var(--d-navy); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 14px; overflow-y: auto; scrollbar-width: none; }
.rail__logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; margin-bottom: 14px; flex: none; }
.rail__logo img { width: 38px; height: 38px; }
.rail__btn { width: 72px; display: grid; justify-items: center; gap: 5px; padding: 6px 0; border-radius: 12px; font-size: 11.5px; font-weight: 500; color: #c3cbe0; line-height: 1.4; transition: color .25s var(--d-ease); }
.rail__btn > span { position: relative; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; transition: background-color .25s var(--d-ease), color .25s var(--d-ease); }
.rail__btn:hover { color: #fff; }
.rail__btn:hover > span { background: rgba(255, 255, 255, .08); }
.rail__btn.is-active { color: #fff; font-weight: 600; }
.rail__btn.is-active > span { background: var(--d-blue); color: #fff; }
.rail__btn b { position: absolute; top: -6px; inset-inline-end: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--d-gold); color: var(--d-navy); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--d-navy); }
.rail__btn b[hidden] { display: none; }
.rail__out { margin-top: auto; }

/* ---------- Sub menu ---------- */
.sub { width: 216px; background: #fff; border-inline-end: 1px solid var(--d-line); padding: 0 10px 16px; overflow-y: auto; }
.app.sub-closed .sub { display: none; }
.sub h2 { height: 56px; display: flex; align-items: center; padding-inline: 10px; font-size: 15.5px; font-weight: 700; margin-bottom: 12px; }
.sub nav { display: grid; gap: 4px; }
.sub h3 { font-size: 12.5px; font-weight: 500; color: var(--d-muted); padding: 16px 10px 6px; }
.sub a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: var(--d-ink); transition: background-color .2s var(--d-ease); }
.sub a i { font-size: 18px; color: var(--d-ink-2); }
.sub a span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub a b { font-size: 13px; font-weight: 500; color: var(--d-ink-2); }
.sub a:hover { background: var(--d-soft); }
.sub a.is-active { background: var(--d-blue); color: #fff; font-weight: 600; }
.sub a.is-active i, .sub a.is-active b { color: #fff; }
.scrim { display: none; }

/* ---------- Top bar ---------- */
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 8px; padding-inline: 24px; background: #fff; border-bottom: 1px solid var(--d-line); }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 20px; color: var(--d-ink-2); flex: none; transition: background-color .2s var(--d-ease), color .2s var(--d-ease); }
.icon-btn:hover { background: var(--d-soft); color: var(--d-ink); }
.icon-btn.is-spin i { animation: spin .7s var(--d-ease); }
@keyframes spin { to { transform: rotate(360deg); } }
.search { margin-inline-start: auto; width: min(380px, 46vw); height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 12px 0 7px; padding-inline: 12px 7px; border-radius: 9px; background: #f8f9fb; border: 1px solid var(--d-line); color: var(--d-muted); font-size: 14px; text-align: start; transition: border-color .2s var(--d-ease), background-color .2s var(--d-ease); }
.search:hover { border-color: #c9d0dd; background: #fff; }
.search i { font-size: 17px; }
.search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 500 11px/1 "Inter", sans-serif; direction: ltr; color: var(--d-ink-2); background: #fff; border: 1px solid var(--d-line); border-radius: 5px; padding: 4px 5px; }
.bell { position: relative; }
.bell .icon-btn b { position: absolute; top: 0; inset-inline-start: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--d-red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; box-shadow: 0 0 0 2px #fff; }
.bell .icon-btn b[hidden] { display: none; }
.bell__pop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 360px; background: #fff; border: 1px solid var(--d-line); border-radius: 14px; box-shadow: 0 24px 48px -20px rgba(11, 21, 51, .28); padding: 4px 18px 6px; z-index: 40; animation: pop .25s var(--d-ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.bell__head { display: flex; justify-content: space-between; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--d-line); }
.bell__head strong { font-size: 15px; font-weight: 700; }
.bell__head button { color: var(--d-blue); font-weight: 500; font-size: 13px; }
.bell__head button:hover { text-decoration: underline; }
.user { position: relative; margin-inline-start: 4px; }
.user > button { display: flex; align-items: center; gap: 6px; padding: 3px; border-radius: 10px; transition: background-color .2s var(--d-ease); }
.user > button:hover { background: var(--d-soft); }
.user img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; object-position: 50% 18%; }
.user > button i { font-size: 13px; color: var(--d-ink-2); }
.menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 220px; background: #fff; border: 1px solid var(--d-line); border-radius: 12px; box-shadow: 0 24px 48px -20px rgba(11, 21, 51, .28); padding: 6px; z-index: 40; animation: pop .25s var(--d-ease); }
.menu__who { display: grid; padding: 8px 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--d-line); line-height: 1.5; }
.menu__who strong { font-size: 14.5px; font-weight: 700; }
.menu__who span { font-size: 13px; color: var(--d-ink-2); }
.menu a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.menu a i { font-size: 17px; color: var(--d-ink-2); }
.menu a:hover { background: var(--d-soft); }

/* ---------- Content ---------- */
.content { padding: 30px 32px 56px; display: grid; gap: 20px; max-width: 1480px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head h1 { font-size: 26px; font-weight: 700; line-height: 1.4; color: var(--d-blue); }
.page-head p { color: var(--d-ink-2); font-size: 14px; }
.page-head__actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 9px; font-weight: 600; font-size: 14px; white-space: nowrap; background: #fff; border: 1px solid #cfd5e0; color: var(--d-ink); transition: background-color .2s var(--d-ease), border-color .2s var(--d-ease), transform .15s var(--d-ease); }
.btn i { font-size: 16px; }
.btn:hover { background: var(--d-soft); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--d-blue); border-color: var(--d-blue); color: #fff; }
.btn--primary:hover { background: #1942ba; border-color: #1942ba; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stat { background: #fff; border: 1px solid var(--d-line); border-radius: 14px; padding: 22px 24px 22px; min-height: 184px; display: flex; flex-direction: column; }
.stat h2 { font-size: 14.5px; font-weight: 500; color: var(--d-ink); }
.stat strong { font-size: 40px; font-weight: 700; line-height: 1.25; color: var(--c, var(--d-ink)); letter-spacing: -.01em; align-self: flex-start; }
.stat p { font-size: 13.5px; color: var(--d-ink-2); }
.stat--dark { background: var(--d-navy); border-color: var(--d-navy); }
.stat--dark h2, .stat--dark strong { color: #fff; }
.stat--dark p { color: #b4bdd6; }
.viz { margin-top: auto; height: 36px; display: flex; align-items: center; width: 100%; }
.viz--track { position: relative; }
.viz--track::before { content: ""; width: 100%; height: 1px; background: rgba(255, 255, 255, .45); }
.viz--track i { position: absolute; inset-inline-start: calc(var(--p) * 1%); width: 5px; height: 22px; border-radius: 3px; background: #fff; }
.viz--bar, .viz--split { gap: 3px; }
.viz--bar::before { content: none; }
.viz--bar { position: relative; }
.viz--bar i, .viz--split i { height: 10px; border-radius: 6px; }
.viz--bar { background: linear-gradient(var(--d-soft), var(--d-soft)) center / 100% 10px no-repeat; border-radius: 6px; }
.viz--bar i { width: calc(var(--w) * 1%); background: var(--c); }
.viz--split i:first-child { width: calc(var(--w) * 1%); background: var(--c); }
.viz--split i:last-child { flex: 1; background: color-mix(in srgb, var(--c) 30%, #fff); }
.viz--strips, .viz--ticks { gap: 3px; align-items: stretch; }
.viz--strips i { flex: 1; border-radius: 2px; background: #e4e7ee; }
.viz--strips i.is-on { background: var(--c); }
.viz--ticks { align-items: flex-end; }
.viz--ticks i { flex: 1; height: 8px; border-radius: 2px; background: #e4e7ee; }
.viz--ticks i.is-on { height: 30px; background: var(--c); }
.viz--spark { overflow: visible; direction: ltr; }
.viz--spark polyline { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* Cards */
.row { display: grid; gap: 20px; }
.row--wide { grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
.col { display: grid; gap: 20px; grid-template-rows: auto 1fr; min-width: 0; }
.card { background: #fff; border: 1px solid var(--d-line); border-radius: 14px; padding: 22px 24px 8px; min-width: 0; display: flex; flex-direction: column; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card__head h2 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.card__head a { color: var(--d-blue); font-size: 13.5px; font-weight: 500; white-space: nowrap; padding-top: 2px; }
.card__head a:hover { text-decoration: underline; }
.card__sub { color: var(--d-ink-2); font-size: 13.5px; }
.card__head .more { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; color: var(--d-ink-2); padding: 0; margin: -3px -6px 0 0; margin-inline: 0 -6px; transition: background-color .2s var(--d-ease), color .2s var(--d-ease); }
.card__head .more:hover { background: var(--d-soft); color: var(--d-ink); text-decoration: none; }
.card__foot { margin: auto -24px 0; padding: 12px 24px 6px; border-top: 1px solid var(--d-line); font-size: 13px; color: var(--d-muted); }
.card.is-flash { animation: flash 1.4s var(--d-ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px rgba(29, 79, 216, .28); border-color: var(--d-blue); } }
.sum { display: flex; align-items: baseline; gap: 10px; margin-block: 4px 14px; }
.sum strong { font-size: 34px; font-weight: 700; line-height: 1.3; color: var(--c); }
.sum span { font-size: 15px; font-weight: 500; }
.late { margin-inline-start: auto; align-self: center; font-style: normal; background: var(--d-amber-fill); color: #1c1203; font-weight: 700; font-size: 13.5px; padding: 5px 12px; border-radius: 9px; }
.late[hidden] { display: none; }
.pick {
  appearance: none; height: 36px; border: 1px solid #cfd5e0; border-radius: 9px; background-color: #fff;
  padding: 0 12px 0 32px; font-size: 14px; font-weight: 500; color: var(--d-ink); cursor: pointer; flex: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475069' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 11px center; background-size: 12px;
}
.pick:hover { background-color: var(--d-soft); }

/* Tasks */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--d-line); margin-inline: -24px; padding-inline: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: flex; align-items: center; gap: 8px; padding: 9px 2px 11px; font-size: 14px; font-weight: 500; color: var(--d-ink-2); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s var(--d-ease); }
.tabs button b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--d-soft); color: var(--d-ink-2); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.tabs button:hover { color: var(--d-ink); }
.tabs button[aria-selected="true"] { color: var(--d-ink); font-weight: 600; border-color: var(--d-blue); }
.tabs button[aria-selected="true"] b { background: var(--d-blue); color: #fff; }
.tasks { margin-inline: -24px; }
.tasks li { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--d-line); transition: opacity .35s var(--d-ease), transform .35s var(--d-ease), background-color .2s var(--d-ease); }
.tasks li:last-child { border-bottom: 0; }
.tasks li[data-id] { cursor: pointer; }
.tasks li:hover { background: #fafbfc; }
.tasks li:focus-visible { outline-offset: -2px; }
.tasks li.is-done { opacity: 0; transform: translateX(-24px); }
.age { width: 46px; height: 46px; border-radius: 10px; flex: none; display: grid; place-content: center; text-align: center; background: var(--d-soft); color: var(--d-ink-2); line-height: 1.15; }
.age b { font-size: 17px; font-weight: 700; }
.age small { font-size: 11px; font-weight: 500; }
.age.is-today b { font-family: var(--d-font); font-size: 12.5px; font-weight: 600; }
.age.is-late { background: var(--d-amber-fill); color: #1c1203; }
.tasks li > div { flex: 1; min-width: 0; display: grid; }
.tasks li > div b { font-size: 14.5px; font-weight: 600; }
.tasks li > div span { font-size: 13.5px; color: var(--d-blue); }
.tasks li > button { color: var(--d-blue); font-size: 14px; font-weight: 500; white-space: nowrap; padding: 6px 10px; border-radius: 8px; transition: background-color .2s var(--d-ease); }
.tasks li > button:hover { background: var(--d-blue-soft); }
.tasks__empty { flex-direction: column; text-align: center; padding-block: 44px !important; gap: 2px !important; }
.tasks__empty b { font-size: 15px; }
.tasks__empty span { color: var(--d-ink-2); font-size: 13.5px; }

/* Events */
.events { margin-inline: -24px; border-top: 1px solid var(--d-line); flex: 1; }
.events li { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--d-line); }
.events li:last-child { border-bottom: 0; }
.events li > div { flex: 1; min-width: 0; display: grid; }
.events li > div b { font-size: 14.5px; font-weight: 600; }
.events li > div > span { font-size: 13.5px; color: var(--d-ink-2); }
.events img, .events li > i { width: 62px; height: 46px; border-radius: 9px; object-fit: cover; flex: none; }
.events li > i { display: grid; place-items: center; font-size: 20px; background: #f1ecfd; color: var(--d-purple); }
.date-chip { width: 46px; height: 46px; flex: none; border-radius: 10px; display: grid; place-content: center; text-align: center; background: #f1ecfd; color: var(--d-purple); line-height: 1.15; }
.date-chip b { font-size: 17px; font-weight: 700; justify-self: center; }
.date-chip span { font-size: 10.5px; font-weight: 500; }

/* Timetable */
.tt-wrap { overflow-x: auto; margin: 12px -6px 0; padding: 4px 6px 6px; }
.tt { display: grid; grid-template-columns: 132px repeat(7, minmax(84px, 1fr)); gap: 6px; min-width: 760px; align-items: center; }
.tt__corner { font-size: 12.5px; color: var(--d-muted); }
.tt__head { display: grid; text-align: center; padding: 4px 0 8px; line-height: 1.4; }
.tt__head b { font-size: 13px; font-weight: 500; color: var(--d-ink-2); }
.tt__head small { font-size: 12px; color: var(--d-muted); }
.tt__head.is-now b { color: var(--d-blue); font-weight: 700; }
.tt__head.is-now small { color: var(--d-blue); }
.tt__row { display: grid; line-height: 1.45; }
.tt__row b { font-size: 14.5px; font-weight: 600; }
.tt__row small { font-size: 12.5px; color: var(--d-ink-2); }
.tt__cell { height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 13.5px; font-weight: 500; background: var(--bg); color: var(--fg); white-space: nowrap; transition: filter .2s var(--d-ease), transform .15s var(--d-ease); }
.tt__cell:hover { filter: brightness(.95); }
.tt__cell:active { transform: scale(.97); }
.tt__cell.is-past { opacity: .5; }
.tt__cell.is-past:hover { opacity: .85; }
.tt__cell.is-now { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--d-blue); font-weight: 600; }
.s-blue { --bg: #e7eefe; --fg: #1b46c2; }
.s-teal { --bg: #dff3ef; --fg: #0b7265; }
.s-purple { --bg: #efe8fd; --fg: #6529d3; }
.s-amber { --bg: #fdefd8; --fg: #9a4a07; }
.s-green { --bg: #e3f4e4; --fg: #1d7a34; }
.s-slate { --bg: #e9edf3; --fg: #3d4960; }
.s-rose { --bg: #fde8ec; --fg: #b4233f; }
.tt-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px -24px 0; padding: 14px 24px 8px; border-top: 1px solid var(--d-line); font-size: 13px; color: var(--d-ink-2); }
.tt-legend li { display: flex; align-items: center; gap: 7px; }
.tt-legend i { width: 13px; height: 13px; border-radius: 4px; background: var(--fg); }

/* Analytics */
.section-title { font-size: 20px; font-weight: 700; margin-top: 18px; }
.row--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sum--tight { margin-block: 2px 0; }
.sum--tight strong { color: var(--c); }
.avg { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--d-ink-2); margin-top: 2px; }
.avg i { width: 22px; border-top: 2px dashed var(--d-ink); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #eceef3; flex: none; }
.seg button { height: 30px; padding: 0 13px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--d-ink-2); white-space: nowrap; transition: background-color .2s var(--d-ease), color .2s var(--d-ease); }
.seg button:hover { color: var(--d-ink); }
.seg button[aria-selected="true"] { background: #fff; color: var(--d-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(11, 21, 51, .12); }
.bars { position: relative; display: flex; align-items: stretch; height: 300px; margin: 26px 0 16px; padding-bottom: 30px; border-bottom: 0; }
.bars::after { content: ""; position: absolute; inset: auto 0 30px; border-top: 1px solid var(--d-line); }
.bars__avg { position: absolute; inset-inline: 0; bottom: calc(30px + (100% - 30px) * var(--y) / 100); border-top: 1.5px dashed var(--d-ink); z-index: 0; pointer-events: none; }
.bars__col { position: relative; z-index: 1; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.bars__col > span { position: absolute; top: 100%; margin-top: 8px; font-size: 13px; color: var(--d-ink-2); white-space: nowrap; }
.bars__bar { position: relative; width: min(104px, 58%); height: calc(var(--h) * 1%); border-radius: 8px 8px 0 0; background: var(--c); transform-origin: bottom; animation: grow .8s var(--d-ease) both; animation-delay: calc(var(--i) * 55ms); transition: filter .2s var(--d-ease); }
.bars__bar b { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3; padding: 0 6px; border-radius: 6px; background: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--d-ink); }
.bars__col:hover .bars__bar { filter: brightness(.9); }
@keyframes grow { from { transform: scaleY(0); } }

.blocks { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; margin: 18px 0 16px; }
.blocks i { aspect-ratio: 1; border-radius: 6px; background: var(--d-teal); }
.blocks i.is-wait { background: var(--d-amber-fill); }
.key { display: flex; gap: 22px; margin: auto -24px 0; padding: 13px 24px 6px; border-top: 1px solid var(--d-line); font-size: 13.5px; color: var(--d-ink-2); }
.key li { display: flex; align-items: center; gap: 7px; }
.key i { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.key b { color: var(--d-ink); font-weight: 600; }

.rank { display: grid; gap: 14px; margin: 18px 0 16px; }
.rank li { display: flex; align-items: center; gap: 12px; }
.rank li > i { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--d-line); display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 600; color: var(--d-blue); flex: none; }
.rank li > div { flex: 1; min-width: 0; display: grid; gap: 6px; }
.rank b { font-size: 14.5px; font-weight: 600; justify-self: start; }
.rank li > div span { height: 7px; border-radius: 7px; background: var(--d-blue); width: calc(var(--w) * 1%); }
.rank em { font-style: normal; font-size: 15px; font-weight: 700; align-self: flex-start; }

/* Feed */
.card > .feed { margin: 14px -24px 0; border-top: 1px solid var(--d-line); flex: 1; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 13px 24px; border-bottom: 1px solid var(--d-line); }
.feed li:last-child { border-bottom: 0; }
.feed li > i { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 600; background: #efe8fd; color: var(--d-purple); }
.feed li > i.is-system { background: #dff3ef; color: var(--d-teal); font-size: 17px; }
.feed li > div { flex: 1; min-width: 0; display: grid; }
.feed b { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.feed .is-new b::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--d-blue); }
.feed li > div > span { font-size: 13.5px; color: var(--d-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed time { font-size: 12.5px; color: var(--d-muted); white-space: nowrap; align-self: flex-start; padding-top: 2px; }
.bell__pop .feed li { padding-inline: 0; }

/* Timetable details */
#ttCard { position: relative; }
.tt-pop { position: absolute; z-index: 6; min-width: 208px; background: var(--d-navy); color: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 36px -16px rgba(11, 21, 51, .6); animation: pop .2s var(--d-ease); display: grid; pointer-events: none; }
.tt-pop[hidden] { display: none; }
.tt-pop b { font-size: 14.5px; font-weight: 700; }
.tt-pop > span { font-size: 12.5px; color: #b4bdd6; }
.tt-pop ul { display: grid; gap: 5px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; }
.tt-pop li { display: flex; align-items: center; gap: 8px; }
.tt-pop li i { font-size: 15px; color: var(--d-gold); }

/* ---------- Side panel ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; background: rgba(11, 21, 51, 0); transition: background-color .3s var(--d-ease); }
.sheet[hidden] { display: none; }
.sheet.is-open { background: rgba(11, 21, 51, .32); }
.sheet__panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(460px, 100%); background: #fff; display: flex; flex-direction: column; box-shadow: 0 0 60px rgba(11, 21, 51, .25); transform: translateX(-102%); transition: transform .32s var(--d-ease); }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__panel > header { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding-inline: 24px 14px; border-bottom: 1px solid var(--d-line); }
.sheet__panel > header h2 { font-size: 16px; font-weight: 700; }
.sheet__body { flex: 1; overflow-y: auto; padding: 22px 24px; display: grid; gap: 16px; align-content: start; }
.sheet__body h3 { font-size: 13.5px; font-weight: 600; color: var(--d-ink-2); margin-bottom: -8px; }
.sheet__body .lead { color: var(--d-ink-2); }
.sheet__panel > footer { flex: none; display: flex; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--d-line); background: #fafbfc; }
.sheet__panel > footer:empty { display: none; }
.sheet .btn { height: 40px; padding-inline: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.who { display: flex; align-items: center; gap: 12px; }
.who > i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 16px; background: #efe8fd; color: var(--d-purple); flex: none; }
.who > div { flex: 1; min-width: 0; display: grid; }
.who b { font-size: 15px; font-weight: 600; }
.who span, .who time { font-size: 13px; color: var(--d-ink-2); }
.bubble { background: var(--d-soft); border-radius: 4px 14px 14px 14px; padding: 13px 16px; font-size: 14.5px; line-height: 1.85; }
.chips { display: grid; gap: 8px; }
.chips button { text-align: start; padding: 10px 13px; border: 1px solid #cfd5e0; border-radius: 10px; font-size: 13.5px; line-height: 1.7; color: var(--d-ink); transition: border-color .2s var(--d-ease), background-color .2s var(--d-ease); }
.chips button:hover { border-color: var(--d-blue); background: var(--d-blue-soft); }
.field { display: grid; gap: 7px; font-size: 13.5px; font-weight: 600; }
.field input, .field textarea { width: 100%; border: 1px solid #cfd5e0; border-radius: 9px; padding: 9px 12px; font: 400 14.5px/1.7 var(--d-font); color: var(--d-ink); background: #fff; resize: vertical; transition: border-color .2s var(--d-ease), box-shadow .2s var(--d-ease); }
.field input { height: 42px; }
.field input::placeholder, .field textarea::placeholder { color: var(--d-faint); }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--d-blue); box-shadow: 0 0 0 3px rgba(29, 79, 216, .15); }
.field small { justify-self: end; font-weight: 400; font-size: 12.5px; color: var(--d-muted); direction: ltr; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { color: var(--d-red); font-size: 13.5px; font-weight: 500; }
.field-error[hidden] { display: none; }
.seg--wide { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg--wide button { height: auto; padding: 8px 6px; display: grid; gap: 1px; justify-items: center; line-height: 1.4; }
.seg--wide small { font-size: 12px; font-weight: 400; color: var(--d-muted); }
.preview { display: flex; gap: 12px; align-items: flex-start; background: var(--d-soft); border-radius: 14px; padding: 14px; }
.preview img { background: #fff; border-radius: 9px; padding: 2px; flex: none; }
.preview div { display: grid; min-width: 0; background: #fff; border: 1px solid var(--d-line); border-radius: 10px; padding: 10px 14px; flex: 1; }
.preview b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.preview span { font-size: 13.5px; color: var(--d-ink-2); overflow-wrap: anywhere; }
.facts { border: 1px solid var(--d-line); border-radius: 12px; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; }
.facts > div + div { border-top: 1px solid var(--d-line); }
.facts dt { color: var(--d-ink-2); font-size: 13.5px; }
.facts dd { font-weight: 600; font-size: 14.5px; text-align: end; }
.note { display: flex; gap: 9px; align-items: flex-start; background: #dff3ef; color: #0b6055; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; font-weight: 500; }
.note i { font-size: 17px; margin-top: 3px; }
.options { display: grid; gap: 8px; }
.options label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #cfd5e0; border-radius: 10px; cursor: pointer; transition: border-color .2s var(--d-ease), background-color .2s var(--d-ease); }
.options label:has(input:checked) { border-color: var(--d-blue); background: var(--d-blue-soft); }
.options input { accent-color: var(--d-blue); width: 17px; height: 17px; margin: 0; }
.options span { display: grid; line-height: 1.5; }
.options b { font-size: 14.5px; font-weight: 600; }
.options small { font-size: 13px; color: var(--d-ink-2); }
.timeline { display: grid; }
.timeline li { position: relative; display: flex; gap: 16px; padding: 0 0 20px; padding-inline-start: 22px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--d-purple); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 4px; top: 20px; bottom: 0; width: 1px; background: var(--d-line); }
.timeline time { width: 74px; flex: none; font-size: 13.5px; color: var(--d-ink-2); }
.timeline span { font-size: 14.5px; font-weight: 600; }

/* ---------- Command palette ---------- */
.cmd { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 14vh 16px 16px; background: rgba(11, 21, 51, .32); animation: fadeIn .2s var(--d-ease); }
.cmd[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.cmd__panel { width: min(580px, 100%); background: #fff; border-radius: 14px; border: 1px solid var(--d-line); box-shadow: 0 30px 70px -24px rgba(11, 21, 51, .45); overflow: hidden; animation: pop .3s var(--d-ease); }
.cmd__input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--d-line); }
.cmd__input i { font-size: 19px; color: var(--d-muted); }
.cmd__input input { flex: 1; border: 0; outline: 0; background: none; font-size: 15.5px; min-width: 0; }
.cmd__input input::placeholder { color: var(--d-faint); }
.cmd__list { max-height: min(46vh, 360px); overflow-y: auto; padding: 6px; }
.cmd__list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14.5px; font-weight: 500; }
.cmd__list li i { font-size: 18px; color: var(--d-ink-2); }
.cmd__list li small { margin-inline-start: auto; font-size: 12.5px; color: var(--d-muted); }
.cmd__list li[aria-selected="true"] { background: var(--d-blue); color: #fff; }
.cmd__list li[aria-selected="true"] i, .cmd__list li[aria-selected="true"] small { color: #fff; }
.cmd__empty { padding: 26px 20px; text-align: center; color: var(--d-ink-2); }
.cmd__panel footer { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--d-line); background: #f8f9fb; color: var(--d-muted); font-size: 12.5px; }
.cmd__panel footer span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .row--wide { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .row--half { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; transform: translateX(105%); transition: transform .45s var(--d-ease); box-shadow: 0 0 60px rgba(11, 21, 51, .3); }
  .app.menu-open .side { transform: none; }
  .app.sub-closed .sub { display: block; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(11, 21, 51, .4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .35s var(--d-ease); }
  .app.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { padding-inline: 12px; }
  .search { width: auto; flex: 1; margin-inline-start: 0; }
  .search kbd { display: none; }
  .content { padding: 20px 14px 36px; gap: 14px; }
  .page-head h1 { font-size: 22px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn { flex: 1; justify-content: center; }
  .stats, .row { gap: 14px; }
  .stat { padding: 16px 16px 14px; min-height: 156px; }
  .stat strong { font-size: 30px; }
  .stat h2 { font-size: 13.5px; }
  .stat p { font-size: 12.5px; }
  .card { padding: 18px 16px 6px; }
  .tabs, .tasks, .events, .card > .feed, .key, .card__foot { margin-inline: -16px; }
  .key, .card__foot { padding-inline: 16px; }
  .col { gap: 14px; }
  .bars { height: 230px; }
  .bars__col > span { font-size: 11.5px; white-space: normal; text-align: center; line-height: 1.25; }
  .bars__bar b { font-size: 12px; }
  .section-title { font-size: 18px; margin-top: 10px; }
  .card__head { flex-wrap: wrap; }
  .sheet__body { padding: 18px 16px; }
  .sheet__panel > footer { padding-inline: 16px; }
  .tabs { padding-inline: 16px; gap: 16px; }
  .tasks li, .events li, .feed li { padding-inline: 16px; }
  .tasks li { flex-wrap: wrap; }
  .tasks li > button { margin-inline-start: 54px; padding-inline: 6px; }
  .tt-legend { margin-inline: -16px; padding-inline: 16px; }
  .bell__pop { position: fixed; top: 62px; inset-inline: 10px; width: auto; }
}
