/* ==========================================================================
   Panels — design system (students, teachers, school admins, providers, admin)

   An app-like shell in the spirit of Sanjaghak: dark by default with a soft
   aurora glow, a light theme, a floating glass tab bar on phones and a
   floating rail on desktop, big gradient hero cards, bento grids and
   bottom sheets. The classroom itself keeps app.css.
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-wght.woff2') format('woff2-variations'), url('../fonts/Vazirmatn-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* ───────────── tokens */
body.u {
  /* flat palette shared with the landing page: blue + sun yellow */
  --brand: #3D97F0;
  --brand-2: #1A7FE6;
  --sun: #FFC94A; --navy: #0F2A4D;
  --grad: var(--brand);
  --grad-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --dots: radial-gradient(rgba(255, 255, 255, .1) 1.2px, transparent 1.4px);
  --lav: #9D8CFF; --mint: #6EE0AE; --sky: #66C2FF; --butter: #FFD36B; --rose: #FF7F96; --coral: #FF7A6B;
  --r-xl: 30px; --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 68px;
  --btn-grad: var(--brand-2);
  --rail-w: 256px;
  --w: 1120px;
  --font: 'Vazirmatn', Tahoma, system-ui, sans-serif;

  /* dark (default) */
  --bg: #070B14; --bg-2: #0B1120;
  --card: #101827; --card-2: #172133; --card-3: #1F2B40;
  --glass: rgba(16, 24, 39, .66); --glass-line: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12);
  --text: #EEF4FB; --text-2: #BCC9DB; --muted: #8C9BB3;
  --strong-bg: #1A7FE6; --strong-fg: #FFFFFF;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45); --shadow-sm: 0 6px 18px rgba(0, 0, 0, .32);
  --glow: 3px 3px 0 var(--sun);
  --ok: #6EE0AE; --ok-bg: rgba(110, 224, 174, .14);
  --warn: #FFD36B; --warn-bg: rgba(255, 211, 107, .14);
  --err: #FF7F96; --err-bg: rgba(255, 127, 150, .14);
  --info: #66C2FF; --info-bg: rgba(102, 194, 255, .14);
  --hi: rgba(31, 168, 255, .16);
  color-scheme: dark;
}
[data-theme='light'] body.u {
  --brand: #1A7FE6; --brand-2: #1A7FE6;
  --dots: radial-gradient(#c9d4e6 1.2px, transparent 1.4px);
  --bg: #F7F9FC; --bg-2: #EEF3FA;
  --card: #FFFFFF; --card-2: #F1F5FB; --card-3: #E2EAF5;
  --glass: rgba(255, 255, 255, .74); --glass-line: rgba(255, 255, 255, .9);
  --line: #E4E9F2; --line-2: #D3DCEA;
  --text: #0F1A2E; --text-2: #44526B; --muted: #6B7890;
  --strong-bg: #0F1A2E; --strong-fg: #FFFFFF;
  --shadow: 0 18px 40px rgba(20, 60, 120, .13); --shadow-sm: 0 6px 18px rgba(20, 60, 120, .08);
  --glow: 3px 3px 0 var(--sun);
  --ok: #13A26A; --ok-bg: #DDF6EA; --warn: #B7790B; --warn-bg: #FFF1CC;
  --err: #D33B55; --err-bg: #FFE1E6; --info: #1E86C8; --info-bg: #DDF0FC;
  --hi: rgba(31, 140, 255, .12);
  color-scheme: light;
}

/* ───────────── base */
html:has(body.u) { background: #070B14; }
html[data-theme='light']:has(body.u) { background: #F7F9FC; }
body.u {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.u::before {
  content: ''; position: fixed; inset: -20vh -30vw auto -30vw; height: 72vh; z-index: 0; pointer-events: none;
  background-image: var(--dots); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%);
}

body.u *, body.u *::before, body.u *::after { box-sizing: border-box; }
:where(body.u) a { color: inherit; text-decoration: none; }
body.u a.u-hero, body.u a.u-card.grad { color: #fff; }
:where(body.u) :where(button, input, select, textarea) { font: inherit; color: inherit; }
body.u ::selection { background: rgba(31, 168, 255, .35); }
body.u :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; }
body.u img, body.u video { max-width: 100%; }
body.u h1, body.u h2, body.u h3 { margin: 0; letter-spacing: -.01em; }
body.u p { margin: 0 0 .7em; }
.u-ic { display: block; flex: none; }
.u-num { font-variant-numeric: tabular-nums; }
.u-muted { color: var(--muted); }
.u-small { font-size: .8rem; }
.u-ltr { direction: ltr; unicode-bidi: isolate; }
.u-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.u-pre { white-space: pre-wrap; line-height: 1.95; }
.u-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.u-spacer { flex: 1; }
.u-row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-mt { margin-top: 14px; }
.u-mt-lg { margin-top: 26px; }

/* ═════════════════════════════════════════════════════════ shell */
.u-app { position: relative; z-index: 1; min-height: 100dvh; }
.u-body { min-width: 0; }
.u-main { position: relative; width: 100%; max-width: var(--w); margin: 0 auto; padding: 4px 16px calc(var(--nav-h) + var(--safe-b) + 36px); }
body.u.narrow { --w: 760px; }
body.u.no-nav .u-main { padding-bottom: 40px; }

/* top bar */
.u-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 16px 10px; min-height: 66px;
  transition: background .25s, box-shadow .25s;
}
.u-top.stuck { background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.u-top-in { width: 100%; max-width: var(--w); margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.u-top .ttl { flex: 1; min-width: 0; font-size: 1.15rem; font-weight: 850; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.45; }
.u-top .ttl small { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); }
.u-top .acts { display: flex; gap: 8px; align-items: center; }

/* round icon button */
.u-ib {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; position: relative;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.u-ib:hover { background: var(--card-2); }
.u-ib:active { transform: scale(.9); }
.u-ib.sm { width: 36px; height: 36px; }
.u-ib.solid { background: var(--strong-bg); color: var(--strong-fg); border-color: transparent; }
.u-ib.danger:hover { color: var(--err); background: var(--err-bg); }
.u-ib .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--bg); }
.th-moon, .th-sun { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.th-moon svg, .th-sun svg { display: block; }
.th-sun { display: none; }
[data-theme='light'] .th-sun { display: inline-flex; }
[data-theme='light'] .th-moon { display: none; }

/* mobile: floating glass pill */
.u-nav {
  position: fixed; z-index: 50; inset-inline: 0; bottom: calc(var(--safe-b) + 12px); margin: 0 auto;
  width: min(calc(100% - 24px), 460px); height: var(--nav-h); padding: 7px;
  display: flex; align-items: center; gap: 4px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); box-shadow: var(--shadow);
}
.u-nav a, .u-nav button {
  position: relative; flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; background: none; border-radius: 999px; color: var(--muted); cursor: pointer;
  font-size: .8rem; font-weight: 750; transition: flex-grow .35s var(--ease), background .3s, color .25s;
}
.u-nav .lbl { display: none; white-space: nowrap; }
.u-nav .on { flex-grow: 2; color: var(--strong-fg); background: var(--strong-bg); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.u-nav .on .lbl { display: inline; animation: u-pop .35s var(--ease); }
.u-nav a:active, .u-nav button:active { transform: scale(.94); }
.u-badge { position: absolute; top: 9px; inset-inline-start: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: #FF5C7A; color: #fff; font-size: .64rem; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px var(--card); }
.u-nav .on .u-badge { display: none; }

/* desktop: floating rail */
.u-rail { display: none; }
@media (min-width: 1024px) {
  .u-app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .u-nav { display: none; }
  .u-main { padding-bottom: 48px; padding-inline: 28px; }
  .u-top { padding-inline: 28px; }
  .u-top .ttl { font-size: 1.45rem; }
  .u-rail {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 14px; height: calc(100dvh - 28px); margin: 14px 14px 14px 0;
    padding: 16px 12px; border-radius: 28px;
    background: var(--glass); border: 1px solid var(--glass-line);
    backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--shadow-sm);
    overflow-y: auto; scrollbar-width: none;
  }
}
.u-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 14px; margin-bottom: 4px; border-bottom: 1px dashed var(--line-2); }
.u-brand .mark { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--grad); color: #fff; box-shadow: var(--glow); transform: rotate(-7deg); }
.u-brand b { display: block; font-weight: 850; font-size: 1rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-brand small { display: block; font-size: .72rem; color: var(--muted); }
.u-brand > div { min-width: 0; }
.u-rail-lbl { font-size: .7rem; font-weight: 700; color: var(--muted); padding: 12px 12px 2px; letter-spacing: .02em; }
.u-rail a.it {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px;
  border-radius: 16px; color: var(--text-2); font-weight: 650; font-size: .92rem; transition: background .2s, color .2s;
}
.u-rail a.it:hover { background: var(--card-2); color: var(--text); }
.u-rail a.it.on { background: var(--strong-bg); color: var(--strong-fg); box-shadow: var(--shadow-sm); }
.u-rail a.it .u-badge { position: static; margin-inline-start: auto; box-shadow: none; }
.u-rail .foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.u-plan { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 18px; background: var(--grad-soft); border: 1px solid var(--line); font-size: .8rem; }
.u-plan b { font-weight: 800; }
.u-plan .u-bar { height: 6px; }
.u-me { display: flex; align-items: center; gap: 10px; }
.u-me .who-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 2px; margin: -2px; transition: background .15s; }
.u-me .who-link:hover { background: var(--card-2); }
.u-me .who { flex: 1; min-width: 0; line-height: 1.4; }
.u-me .who b { display: block; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-me .who small { font-size: .72rem; color: var(--muted); }

/* ═════════════════════════════════════════════════════════ components */

/* section title */
.u-sec { display: flex; align-items: center; gap: 10px; margin: 28px 2px 12px; }
.u-sec:first-child { margin-top: 6px; }
.u-sec h2 { flex: 1; font-size: 1.08rem; font-weight: 850; display: flex; align-items: center; gap: 8px; }
.u-sec h2::before { content: ''; flex: none; width: 6px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, var(--brand) 0 55%, var(--sun) 55% 100%); }
.u-sec .cnt { color: var(--muted); font-weight: 600; font-size: .8rem; }
.u-sec .more { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); font-size: .82rem; font-weight: 700; }

/* cards */
.u-card { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.u-card + .u-card { margin-top: 12px; }
.u-card.flat { box-shadow: none; }
.u-card.tight { padding: 14px; }
.u-card.glass { background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--glass-line); }
.u-card.ink { background: color-mix(in srgb, var(--sky) 12%, var(--card)); }
.u-card.grad { color: #fff; border: 0; background-color: #1A7FE6; background-image: radial-gradient(rgba(255, 255, 255, .13) 1.2px, transparent 1.4px); background-size: 18px 18px; box-shadow: var(--glow); }
.u-card.grad small, .u-card.grad .u-muted { color: rgba(255, 255, 255, .9); }
.u-card.tint-lav { background: color-mix(in srgb, var(--lav) 15%, var(--card)); }
.u-card.tint-mint { background: color-mix(in srgb, var(--mint) 13%, var(--card)); }
.u-card.tint-butter { background: color-mix(in srgb, var(--butter) 15%, var(--card)); }
.u-card.tint-sky { background: color-mix(in srgb, var(--sky) 13%, var(--card)); }
.u-card.tint-rose { background: color-mix(in srgb, var(--rose) 13%, var(--card)); }
a.u-card, .u-card.tap { cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
a.u-card:hover { border-color: var(--line-2); }
a.u-card:active, .u-card.tap:active { transform: scale(.98); }
.u-card .k { font-size: .78rem; color: var(--muted); font-weight: 650; }
.u-card .big { font-size: 2.3rem; font-weight: 900; line-height: 1.1; letter-spacing: -.03em; }
.u-card h3 { font-size: 1.02rem; font-weight: 850; margin-bottom: 4px; }
.u-card-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.u-card-hd h3 { flex: 1; margin: 0; }
.u-go { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--strong-bg); color: var(--strong-fg); }
.u-card.grad .u-go, .u-hero .u-go { background: rgba(255, 255, 255, .95); color: #08101C; }

/* bento */
.u-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.u-grid > .u-card + .u-card { margin-top: 0; }
.u-grid .wide { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .u-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .u-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .u-grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .u-cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
  .u-cols.even { grid-template-columns: 1fr 1fr; }
}
.u-cols > * + * { margin-top: 0; }
@media (max-width: 759px) { .u-cols > * + * { margin-top: 12px; } .u-grid.cards { grid-template-columns: 1fr; } }

/* buttons */
.u-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: .94rem; font-weight: 800; white-space: nowrap;
  background: var(--btn-grad); color: #fff; box-shadow: var(--glow);
  transition: transform .18s var(--ease), filter .2s, box-shadow .2s, background .2s;
}
.u-btn:hover { filter: brightness(1.07); }
.u-btn:active { transform: scale(.96); }
.u-btn:disabled, .u-btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.u-btn.block { width: 100%; }
.u-btn.strong { background: var(--strong-bg); color: var(--strong-fg); box-shadow: none; }
.u-btn.soft { background: var(--card-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.u-btn.soft:hover { background: var(--card-3); filter: none; }
.u-btn.ghost { background: transparent; color: var(--text); box-shadow: none; border: 1px solid var(--line-2); }
.u-btn.ghost:hover { background: var(--card-2); filter: none; }
.u-btn.danger { background: var(--err-bg); color: var(--err); box-shadow: none; }
.u-btn.live { background: #E8455F; box-shadow: 3px 3px 0 var(--sun); }
.u-btn.sm { min-height: 38px; padding: 0 15px; font-size: .82rem; }
.u-btn.xs { min-height: 30px; padding: 0 12px; font-size: .74rem; }
.u-btn.copied { background: var(--ok-bg); color: var(--ok); box-shadow: none; }

/* pills */
.u-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text-2); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.u-pill.strong { background: var(--strong-bg); color: var(--strong-fg); border-color: transparent; }
.u-pill.glass { background: rgba(8, 16, 40, .28); border-color: rgba(255, 255, 255, .24); color: #fff; }
.u-pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.u-pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.u-pill.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.u-pill.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.u-pill.brand { background: var(--hi); color: var(--brand); border-color: transparent; }
.u-pill.lav { background: color-mix(in srgb, var(--lav) 18%, transparent); color: var(--lav); border-color: transparent; }
.u-live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 92, 122, .15); color: #FF5C7A; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.u-live i, .u-dot-live { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: u-pulse 1.6s infinite; display: inline-block; }
.u-hero .u-live { background: rgba(255, 255, 255, .2); color: #fff; }

/* horizontal chips */
.u-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.u-chips::-webkit-scrollbar { display: none; }
.u-chips > * { flex: none; }
.u-chips .u-pill { padding: 8px 15px; font-size: .82rem; }
.u-chips .u-pill.on { background: var(--strong-bg); color: var(--strong-fg); border-color: transparent; }
.u-chips .u-pill span { opacity: .7; }

/* segments (in-page tabs) */
.u-seg { display: flex; padding: 5px; gap: 4px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.u-seg::-webkit-scrollbar { display: none; }
.u-seg a, .u-seg button { flex: 1 0 auto; min-height: 40px; padding: 0 14px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; border-radius: 999px; color: var(--text-2); font-size: .84rem; font-weight: 750; cursor: pointer; white-space: nowrap; transition: background .25s, color .25s; }
.u-seg .on { background: var(--strong-bg); color: var(--strong-fg); box-shadow: var(--shadow-sm); }
.u-seg .n { font-size: .7rem; opacity: .65; }

/* rows & lists */
.u-list { display: flex; flex-direction: column; gap: 10px; }
.u-row { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); transition: transform .18s var(--ease), background .2s, border-color .2s; min-width: 0; }
a.u-row:hover { border-color: var(--line-2); }
a.u-row:active, .u-row.tap:active { transform: scale(.985); }
.u-row .tx { flex: 1; min-width: 0; line-height: 1.55; }
.u-row .tx b { display: block; font-weight: 800; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-row .tx small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-row .tx .wrap { white-space: normal; }
.u-row .end { flex: none; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.u-row.hot { border-color: color-mix(in srgb, #FF5C7A 45%, transparent); background: color-mix(in srgb, #FF5C7A 7%, var(--card)); }
.u-row.dim { opacity: .55; }
.u-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.u-group > .u-row { border: 0; border-radius: 0; background: none; }
.u-group > .u-row + .u-row, .u-group > * + .u-row { border-top: 1px solid var(--line); }
.ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--card-2); color: var(--text); font-weight: 900; font-size: 1.1rem; }
.ico.sm { width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; }
.ico.lg { width: 58px; height: 58px; border-radius: 20px; font-size: 1.5rem; }
.ico.grad { background: var(--grad); color: #fff; }
.ico.lav { background: color-mix(in srgb, var(--lav) 22%, transparent); color: var(--lav); }
.ico.mint { background: color-mix(in srgb, var(--mint) 20%, transparent); color: var(--mint); }
.ico.sky { background: color-mix(in srgb, var(--sky) 20%, transparent); color: var(--sky); }
.ico.butter { background: color-mix(in srgb, var(--butter) 24%, transparent); color: #C98C00; }
[data-theme='dark'] .ico.butter { color: var(--butter); }
.ico.rose { background: color-mix(in srgb, var(--rose) 20%, transparent); color: var(--rose); }
.ico.solid { background: var(--c); color: #fff; }
[data-theme='light'] .ico.mint { color: #13A26A; }

/* progress */
.u-bar { height: 8px; border-radius: 999px; background: var(--card-3); overflow: hidden; }
.u-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: right; animation: u-grow .9s var(--ease) both; }
.u-hero .u-bar, .u-card.grad .u-bar { background: rgba(255, 255, 255, .22); }
.u-hero .u-bar > i, .u-card.grad .u-bar > i { background: #fff; }
.u-ring { position: relative; display: grid; place-items: center; flex: none; }
.u-ring svg { transform: rotate(-90deg); display: block; }
.u-ring .track { stroke: var(--card-3); }
.u-ring .val { stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.u-ring .mid { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.15; }
.u-ring .mid b { font-size: 1.1rem; font-weight: 900; }
.u-ring .mid small { display: block; font-size: .64rem; color: var(--muted); font-weight: 600; }

/* stats */
.u-stat { display: flex; flex-direction: column; gap: 2px; }
.u-stat .n { font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.u-stat .n small { font-size: .78rem; font-weight: 600; color: var(--muted); margin-inline-start: 3px; }
.u-stat .l { font-size: .76rem; color: var(--muted); font-weight: 650; }
a.u-stat-card { display: flex; flex-direction: column; gap: 10px; }
a.u-stat-card .ico { margin-bottom: 4px; }

/* hero */
.u-hero {
  position: relative; border-radius: var(--r-xl); padding: 22px 20px; overflow: hidden; color: #fff; isolation: isolate;
  background-color: #1A7FE6; background-image: radial-gradient(rgba(255, 255, 255, .13) 1.2px, transparent 1.4px); background-size: 18px 18px;
  box-shadow: var(--shadow-sm);
}
.u-hero::after { content: ''; position: absolute; width: 170px; height: 170px; top: -95px; inset-inline-start: -70px; border-radius: 50%; border: 26px solid var(--sun); opacity: .95; z-index: -1; }
.u-hero.violet { background-color: #4B47C9; border: 0; }
.u-hero.night { background-color: var(--navy); border: 0; }
.u-hero.live { background-color: #E8455F; box-shadow: var(--shadow-sm); }
.u-hero.live::after { border-color: rgba(255, 255, 255, .25); }
.u-hero small, .u-hero .u-muted { color: rgba(255, 255, 255, .92); }
.u-hero, .u-card.grad { text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.u-hero .u-btn, .u-hero .u-pill, .u-card.grad .u-btn { text-shadow: none; }
.u-hero h1 { font-size: 1.5rem; font-weight: 900; line-height: 1.35; letter-spacing: -.02em; }
.u-hero .huge { font-size: 3.6rem; font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.u-hero .u-btn { background: #fff; color: #08101C; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.u-hero .u-btn.glass { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .3); box-shadow: none; }
.u-hero-top { display: flex; align-items: center; gap: 14px; position: relative; }
.u-hero-top > div { flex: 1; min-width: 0; }
.u-hero-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; position: relative; }
.u-hero .u-ava, .u-hero .ico { box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.u-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; padding: 12px 4px; border-radius: 18px; background: rgba(255, 255, 255, .1); text-align: center; position: relative; }
.u-hero-stats div + div { border-inline-start: 1px solid rgba(255, 255, 255, .14); }
.u-hero-stats b { display: block; font-size: 1.2rem; font-weight: 900; }
.u-hero-stats small { font-size: .68rem; }

/* forms */
.u-form { display: flex; flex-direction: column; gap: 14px; }
.u-form-grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.u-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.u-field > span, .u-label { font-size: .82rem; font-weight: 700; color: var(--text-2); }
.u-field .hint { font-size: .74rem; color: var(--muted); }
.u-input, .u-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .u-field textarea, .u-field select, select.u-input {
  width: 100%; min-height: 50px; padding: 12px 16px; font-size: 16px;
  color: var(--text); background-color: var(--card-2); border: 1.5px solid var(--line); border-radius: var(--r-md);
  outline: none; transition: border-color .2s, background .2s, box-shadow .2s;
}
.u-input:focus, .u-field input:focus, .u-field textarea:focus, .u-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 168, 255, .16); background-color: var(--card); }
.u-field textarea { min-height: 110px; line-height: 1.9; resize: vertical; }
.u-field ::placeholder, .u-input::placeholder { color: var(--muted); }
body.u select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C9BB3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-position: 14px 50%; background-size: 14px 14px; background-repeat: no-repeat; padding-left: 38px; }
.u-error { color: var(--err); font-size: .82rem; font-weight: 650; }
.u-input.sm, .u-field.sm input, .u-field.sm select { min-height: 40px; padding: 7px 12px; font-size: 14px; border-radius: 12px; }
.u-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.u-inline .u-input { flex: 1 1 180px; width: auto; }

/* switch row */
.u-switch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); cursor: pointer; }
.u-switch .tx { flex: 1; min-width: 0; }
.u-switch .tx b { display: block; font-size: .92rem; font-weight: 800; }
.u-switch .tx small { display: block; font-size: .76rem; color: var(--muted); line-height: 1.7; }
.u-switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; flex: none; margin: 0; border-radius: 999px; background: var(--card-3); position: relative; cursor: pointer; transition: background .25s; }
.u-switch input::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: inset-inline-start .25s var(--spring); }
.u-switch input:checked { background: var(--grad); }
.u-switch input:checked::after { inset-inline-start: 23px; }

/* radio pills (role picker etc.) */
.u-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.u-choice label { cursor: pointer; }
.u-choice input { position: absolute; opacity: 0; pointer-events: none; }
.u-choice span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font-size: .86rem; font-weight: 750; color: var(--text-2); transition: all .2s; }
.u-choice input:checked + span { background: var(--strong-bg); color: var(--strong-fg); border-color: transparent; }
.u-choice input:focus-visible + span { outline: 2px solid var(--brand); }

/* file drop */
.u-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; padding: 16px; border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: var(--card-2); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.u-drop:hover, .u-drop.over { border-color: var(--brand); background: var(--hi); }
.u-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.u-drop .ic { width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.u-drop b { font-size: .9rem; }
.u-drop small { color: var(--muted); font-size: .74rem; }
.u-drop .picked { font-weight: 750; color: var(--ok); font-size: .82rem; word-break: break-all; }

/* notes */
.u-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line); font-size: .86rem; line-height: 1.85; }
.u-note .u-ic { margin-top: 3px; }
.u-note.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.u-note.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.u-note.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.u-note.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.u-note + .u-note, .u-note + .u-card, .u-card + .u-note { margin-top: 12px; }

/* empty */
.u-empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.u-empty .art { width: 76px; height: 76px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 26px; background: var(--card-2); color: var(--text-2); transform: rotate(-6deg); }
.u-empty .art.grad { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.u-empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px; }
.u-empty p { font-size: .84rem; max-width: 420px; margin: 0 auto 14px; line-height: 1.9; }

/* avatar */
.u-ava { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--c, var(--grad)); color: #fff; font-weight: 900; }
.u-ava.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(31, 168, 255, .55); }
.u-ava.sm { width: 36px; height: 36px; font-size: .85rem; }
.u-ava.lg { width: 96px; height: 96px; font-size: 2.2rem; box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px rgba(31, 168, 255, .6), var(--glow); }
.u-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-ava.has-img { background: var(--card-2); }
.u-ava.xl { width: 128px; height: 128px; font-size: 2.8rem; box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px rgba(31, 168, 255, .6), var(--glow); }

/* bottom sheet (dialog on desktop) */
.u-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(3, 6, 12, .58); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.u-scrim.on { opacity: 1; pointer-events: auto; }
.u-sheet {
  position: fixed; z-index: 100; inset-inline: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 600px; max-height: 90dvh;
  display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 30px 30px 0 0; box-shadow: 0 -20px 50px rgba(0, 0, 0, .35);
  transform: translateY(105%); transition: transform .42s var(--ease); padding-bottom: var(--safe-b);
}
.u-sheet[hidden] { display: none; }
.u-sheet.on { transform: translateY(0); }
.u-sheet .grab { padding: 10px 0 4px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.u-sheet .grab i { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); }
.u-sheet .hd { display: flex; align-items: center; gap: 12px; padding: 4px 20px 12px; }
.u-sheet .hd h3 { flex: 1; font-size: 1.1rem; font-weight: 850; }
.u-sheet .hd h3 small { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); }
.u-sheet .bd { overflow-y: auto; padding: 4px 20px 22px; overscroll-behavior: contain; }
.u-sheet .ft { display: flex; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
.u-sheet .ft .u-btn { flex: 1; }
.u-sheet.wide { max-width: 760px; }
@media (min-width: 760px) {
  .u-sheet { bottom: auto; top: 50%; border-radius: 30px; border-bottom: 1px solid var(--line-2); transform: translateY(-46%) scale(.96); opacity: 0; transition: transform .35s var(--ease), opacity .25s; max-height: 86dvh; }
  .u-sheet.on { transform: translateY(-50%); opacity: 1; }
  .u-sheet .grab { visibility: hidden; height: 12px; padding: 0; }
}

/* tiles (sheet menus) */
.u-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.u-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 12px 6px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); font-size: .8rem; font-weight: 750; text-align: center; cursor: pointer; transition: transform .18s var(--ease); }
.u-tile:active { transform: scale(.94); }
.u-tile .ico { width: 44px; height: 44px; border-radius: 15px; }

/* toasts */
.u-toasts { position: fixed; z-index: 120; top: calc(var(--safe-t) + 12px); inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.u-toast { max-width: 460px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 20px; background: var(--strong-bg); color: var(--strong-fg); font-size: .88rem; font-weight: 700; box-shadow: var(--shadow); pointer-events: auto; animation: u-toast-in .45s var(--spring) both; }
.u-toast .bul { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; }
.u-toast.err .bul { background: #FF5C7A; }
.u-toast.out { animation: u-toast-out .3s var(--ease) both; }

/* tables */
.u-table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); }
.u-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.u-table th { text-align: right; color: var(--muted); font-weight: 650; font-size: .76rem; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card-2); }
.u-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.u-table tr:last-child td { border-bottom: 0; }
.u-table td.n { font-variant-numeric: tabular-nums; }
.u-table .acts { display: flex; gap: 6px; justify-content: flex-end; }

/* key-value */
.u-kv { list-style: none; margin: 0; padding: 0; }
.u-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--line-2); font-size: .88rem; }
.u-kv li:last-child { border-bottom: 0; }
.u-kv li span:first-child { color: var(--text-2); }
.u-kv li b { font-weight: 800; white-space: nowrap; }

/* copy field */
.u-copy { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 6px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.u-copy input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 6px 12px; font-size: .84rem; direction: ltr; text-align: left; color: var(--text-2); }

/* setup steps */
.u-steps { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.u-step { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); position: relative; }
.u-step .n { width: 34px; height: 34px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: var(--hi); color: var(--brand); }
.u-step.done .n { background: var(--ok-bg); color: var(--ok); }
.u-step.next { border-color: color-mix(in srgb, var(--brand) 55%, transparent); box-shadow: 0 0 0 4px var(--hi); }
.u-step .tx { flex: 1; min-width: 0; }
.u-step b { display: block; font-size: .92rem; }
.u-step small { display: block; font-size: .76rem; color: var(--muted); margin-bottom: 8px; }
.u-step.done b { color: var(--muted); }

/* weekly timetable */
.u-week { display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.u-week.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.u-day { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); min-height: 140px; min-width: 0; }
.u-day.today { border-color: var(--brand); box-shadow: 0 0 0 3px var(--hi); }
.u-day .dh { text-align: center; font-size: .78rem; font-weight: 800; color: var(--text-2); padding: 2px 0 4px; }
.u-day.today .dh { color: var(--brand); }
.u-slot { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 14px; font-size: .8rem; background: color-mix(in srgb, var(--c) 16%, transparent); border-inline-start: 3px solid var(--c); min-width: 0; }
.u-slot b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.u-slot small { color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-day .none { margin: auto; color: var(--muted); font-size: .8rem; }
@media (max-width: 899px) {
  .u-week, .u-week.six { grid-template-columns: 1fr; }
  .u-day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .u-day .dh { width: 70px; text-align: start; padding: 0 4px; }
  .u-day .none { margin: 0; }
  .u-slot { flex: 1 1 140px; }
}

/* day strip (week picker) */
.u-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.u-days button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 8px; border-radius: 18px; cursor: pointer; background: var(--card); border: 1px solid var(--line); color: var(--text-2); min-width: 0; transition: transform .25s var(--ease), background .2s; }
.u-days button b { font-size: .72rem; font-weight: 800; }
.u-days button small { font-size: .62rem; color: var(--muted); }
.u-days .dots { display: flex; gap: 2px; height: 5px; }
.u-days .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.u-days button.today { border-color: var(--brand); }
.u-days button.on { background: var(--grad); border-color: transparent; color: #fff; transform: translateY(-3px); box-shadow: var(--glow); }
.u-days button.on small, .u-days button.on b { color: #fff; }
.u-days button.on .dots i { background: #fff; }

/* timeline (sessions of a day) */
.u-tl { display: flex; flex-direction: column; }
.u-tl-it { display: flex; gap: 14px; padding-bottom: 12px; position: relative; }
.u-tl-it .tm { width: 54px; flex: none; text-align: center; padding-top: 14px; line-height: 1.3; }
.u-tl-it .tm b { display: block; font-size: .95rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.u-tl-it .tm small { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.u-tl-it .bd { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--c, var(--brand)); }
.u-tl-it .bd .tx { flex: 1; min-width: 0; }
.u-tl-it .bd b { display: block; font-size: .95rem; }
.u-tl-it .bd small { display: block; font-size: .76rem; color: var(--muted); }
.u-tl-it.live .bd { background: color-mix(in srgb, #FF5C7A 10%, var(--card)); border-inline-start-color: #FF5C7A; box-shadow: 0 10px 30px -12px #FF5C7A; }
.u-tl-it.done { opacity: .5; }

/* media */
.u-media { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.u-media.compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.u-mcard { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.u-mcard .th { aspect-ratio: 16 / 9; background: #05080F; display: block; position: relative; }
.u-mcard .th img, .u-mcard .th video { width: 100%; height: 100%; object-fit: contain; display: block; }
.u-mcard .th.pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #FF8FA3; font-size: .8rem; }
.u-mcard .th .kind { position: absolute; top: 8px; inset-inline-start: 8px; }
.u-mcard figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.u-mcard figcaption .tx { flex: 1; min-width: 0; line-height: 1.5; }
.u-mcard figcaption b { display: block; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-mcard figcaption small { font-size: .72rem; color: var(--muted); }

/* grades */
.u-score { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.u-score small { font-size: .74rem; font-weight: 600; color: var(--muted); }
.u-score.good { color: var(--ok); } .u-score.mid { color: var(--warn); } .u-score.low { color: var(--err); }

/* attendance grid */
.u-att td.c { text-align: center; font-size: .78rem; font-variant-numeric: tabular-nums; }
.u-att td.c i { display: inline-block; width: 26px; height: 26px; border-radius: 9px; line-height: 26px; font-style: normal; font-weight: 800; }
.u-att td.c.p i { background: var(--ok-bg); color: var(--ok); }
.u-att td.c.a i { background: var(--err-bg); color: var(--err); }
.u-att th.d { font-size: .7rem; text-align: center; }

/* search */
.u-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 46px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.u-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--text); padding: 8px 0; }

.u-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; font-size: .84rem; color: var(--muted); }

/* credentials (print) */
.u-cred { border: 1.5px solid color-mix(in srgb, var(--brand) 55%, transparent); background: var(--card); box-shadow: 4px 4px 0 var(--sun); }
@media print {
  body.u::before, .u-rail, .u-nav, .u-top, .u-main > :not(.u-cred), .u-cred .u-btn { display: none !important; }
  body.u { background: #fff; color: #000; }
  .u-cred { border: 0; box-shadow: none; }
}

/* page head (desktop console pages) */
.u-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 2px 18px; }
.u-head h1 { font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; }
.u-head p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.u-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1023px) { .u-head h1 { display: none; } .u-head { margin-top: 0; } .u-head p { margin-top: 0; } }

/* auth pages */
body.u.auth .u-app { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px 16px; }
body.u.auth .u-main { width: 100%; max-width: none; padding: 0; display: grid; place-items: center; }
.u-auth-split { width: 100%; max-width: 1040px; display: grid; gap: 56px; align-items: center; justify-items: center; }
.u-auth-side { display: none; }
@media (min-width: 1024px) {
  .u-auth-split { grid-template-columns: 440px minmax(0, 1fr); justify-items: stretch; }
  .u-auth-side { display: block; }
}
.u-auth-side .tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text-2); font-size: .82rem; font-weight: 700; }
.u-auth-side h2 { font-size: 2.6rem; line-height: 1.35; font-weight: 900; letter-spacing: -.02em; margin: 18px 0 12px; }
.u-auth-side h2 em { font-style: normal; color: var(--brand); box-shadow: inset 0 -.32em 0 color-mix(in srgb, var(--sun) 70%, transparent); }
.u-auth-side p { color: var(--muted); font-size: 1rem; line-height: 1.9; margin: 0 0 28px; max-width: 460px; }
.u-auth-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 460px; }
.u-auth-side li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.u-auth-side li b { display: block; font-size: .95rem; }
.u-auth-side li small { color: var(--muted); font-size: .82rem; }
.u-auth { width: 100%; max-width: 440px; }
.u-auth .u-card { padding: 30px 26px; border-radius: 32px; }
.u-auth .logo { width: 64px; height: 64px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 22px; background: var(--grad); color: #fff; box-shadow: var(--glow); transform: rotate(-8deg); }
.u-auth h1 { text-align: center; font-size: 1.5rem; font-weight: 900; }
.u-auth .sub { text-align: center; color: var(--muted); font-size: .88rem; margin: 6px 0 22px; }
.u-auth .alt { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 16px; }
.u-auth .alt a { color: var(--brand); font-weight: 800; }
.u-aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.u-aurora i { position: absolute; }
/* flat shapes, as on the landing page */
.u-aurora i:nth-child(1) { width: 220px; height: 220px; top: -80px; right: -70px; border-radius: 50%; background: var(--sun); }
.u-aurora i:nth-child(2) { width: 300px; height: 300px; bottom: -120px; left: -100px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); }
.u-aurora i:nth-child(3) { width: 90px; height: 90px; bottom: 12%; right: 6%; border-radius: 24px; background: color-mix(in srgb, var(--brand) 18%, transparent); transform: rotate(14deg); }

/* misc */
.u-divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.u-details > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .84rem; font-weight: 750; padding: 4px 0; }
.u-details > summary::-webkit-details-marker { display: none; }
.u-details > summary::before { content: '+'; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); font-weight: 900; }
.u-details[open] > summary::before { content: '−'; }
.u-details[open] > summary { margin-bottom: 10px; }
.u-slots { display: flex; flex-direction: column; gap: 8px; }
.u-slot-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.u-slot-row select, .u-slot-row input { width: auto; min-height: 40px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-size: 14px; }
.u-slot-row select { padding-left: 34px; }
.u-slot-row span { color: var(--muted); font-size: .8rem; }
.u-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.u-checks label { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); font-size: .86rem; font-weight: 700; cursor: pointer; }
.u-checks input { width: 16px; height: 16px; accent-color: #1FA8FF; }
.u-checks label:has(input:checked) { border-color: var(--brand); background: var(--hi); }
.u-big-input { font-size: 1.05rem !important; font-weight: 700; }

/* motion */
@keyframes u-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes u-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes u-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes u-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 92, 122, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 92, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 122, 0); } }
@keyframes u-toast-in { from { opacity: 0; transform: translateY(-24px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes u-toast-out { to { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes u-drift { to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes u-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.u-main > * { animation: u-up .5s var(--ease) both; }
.u-main > *:nth-child(2) { animation-delay: .04s; }
.u-main > *:nth-child(3) { animation-delay: .08s; }
.u-main > *:nth-child(4) { animation-delay: .12s; }
.u-main > *:nth-child(n+5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { body.u *, body.u *::before, body.u *::after { animation: none !important; transition: none !important; } }

/* ───────────── admin monitor (charts page) */
body.u .ranges { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
body.u .ranges button { background: none; border: 0; color: var(--muted); font-size: .82rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
body.u .ranges button.active { background: var(--strong-bg); color: var(--strong-fg); }
body.u .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
body.u .dot.ok { background: var(--ok); }
body.u .dot.crit { background: var(--err); }
body.u .alert { background: var(--err-bg); color: var(--err); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 14px; }
body.u .cards:not(.u-grid) { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
body.u .cards .card, body.u .charts .card, body.u .tables .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); min-width: 0; }
body.u .stat .label { color: var(--muted); font-size: .8rem; font-weight: 650; }
body.u .stat .value { font-size: 1.6rem; font-weight: 900; margin: 2px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.u .stat .sub { color: var(--muted); font-size: .74rem; min-height: 18px; }
body.u .stat .bar { height: 6px; background: var(--card-3); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
body.u .stat .bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .4s, background .4s; }
body.u .stat[data-level="warn"] .bar i { background: var(--warn); }
body.u .stat[data-level="crit"] .bar i { background: var(--err); }
body.u .stat[data-level="warn"] .value { color: var(--warn); }
body.u .stat[data-level="crit"] .value { color: var(--err); }
body.u .charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; margin-bottom: 12px; }
body.u .chart h2, body.u .tables h2 { font-size: .82rem; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
body.u .chart .canvas { position: relative; height: 230px; }
body.u .tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
body.u .tables table { width: 100%; border-collapse: collapse; font-size: .84rem; }
body.u .tables th { text-align: right; color: var(--muted); font-weight: 600; font-size: .74rem; padding: 6px 8px; border-bottom: 1px solid var(--line); }
body.u .tables td { padding: 8px; border-bottom: 1px solid var(--line); }
body.u .ltr { text-align: left; }
@media (max-width: 900px) { body.u .charts, body.u .tables { grid-template-columns: 1fr; } body.u .cards:not(.u-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.only-phone { }
@media (min-width: 1024px) { .only-phone { display: none !important; } }
@media (max-width: 1023px) { .only-desk { display: none !important; } }
body.u [hidden] { display: none !important; }

/* avatar picker + crop */
.u-avpick { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.u-avpick-img { position: relative; }
.u-avpick-btn { position: absolute; bottom: 2px; inset-inline-end: 2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--strong-bg); color: var(--strong-fg); border: 3px solid var(--bg); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s; }
.u-avpick-btn:hover { transform: scale(1.08); }
.u-crop-stage { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #000; touch-action: none; cursor: grab; }
.u-crop-stage:active { cursor: grabbing; }
.u-crop-stage canvas { width: 100%; height: 100%; display: block; }
.u-crop-stage::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .5); pointer-events: none; border: 2px solid rgba(255, 255, 255, .8); }
.u-crop-zoom { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); }
.u-crop-zoom input { flex: 1; accent-color: #1FA8FF; }
.u-avgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.u-avcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px; }
.u-avcard + .u-avcard { margin-top: 0; }
.u-avcard .u-ava.xl { width: 96px; height: 96px; font-size: 2.2rem; box-shadow: none; }
.u-avcard .u-avpick-btn { width: 32px; height: 32px; border-width: 2px; }
.u-avcard .nm { margin-top: 6px; font-size: .92rem; }
.u-avcard small { font-size: .74rem; }
.u-avcard.new { border-color: color-mix(in srgb, var(--warn) 60%, transparent); box-shadow: 0 0 0 3px var(--warn-bg); }

/* people picker (live search) */
.u-picker { display: flex; flex-direction: column; gap: 10px; }
.u-picker-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.u-picker-sel button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 0; background: var(--hi); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.u-picker-sel button .x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--card-3); font-size: .7rem; }
.u-picker-list { max-height: min(46vh, 360px); overflow-y: auto; border-radius: var(--r-md, 18px); border: 1px solid var(--line); background: var(--card); }
.u-picker-list .it { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; border-bottom: 1px solid var(--line); }
.u-picker-list .it:last-child { border-bottom: 0; }
.u-picker-list .it:hover { background: var(--card-2); }
.u-picker-list .it .tx { flex: 1; min-width: 0; line-height: 1.5; }
.u-picker-list .it .tx b { display: block; font-size: .88rem; }
.u-picker-list .it .tx small { color: var(--muted); font-size: .74rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-picker-list .it .ck { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; flex: none; }
.u-picker-list .it.on .ck { background: var(--strong-bg); border-color: transparent; color: var(--strong-fg); }
.u-picker-msg { padding: 18px; text-align: center; color: var(--muted); font-size: .85rem; }

/* row checkbox + selection bar */
.u-check { position: relative; flex: none; width: 24px; height: 24px; cursor: pointer; }
.u-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.u-check span { position: absolute; inset: 0; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.u-check input:checked + span { background: var(--strong-bg); border-color: transparent; }
.u-check input:checked + span::after { content: '✓'; color: var(--strong-fg); font-size: .8rem; font-weight: 900; }
.u-check input:focus-visible + span { box-shadow: 0 0 0 3px var(--hi); }
.u-selbar { position: fixed; z-index: 45; inset-inline: 12px; bottom: calc(96px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 620px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 14px; border-radius: 22px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--glass-line); box-shadow: var(--shadow); animation: u-pop .3s var(--ease); }
.u-selbar select { width: auto; flex: 1 1 140px; min-height: 40px; }
@media (min-width: 1024px) { .u-selbar { bottom: 24px; inset-inline-start: calc(var(--rail-w) + 24px); } }

/* course media grouped by session */
.u-session { margin-top: 22px; scroll-margin-top: 90px; }
.u-session-hd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.u-session-hd .num { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--btn-grad); color: #fff; font-weight: 900; font-size: 1.05rem; box-shadow: var(--glow); }
.u-session-hd .tx { flex: 1; min-width: 140px; line-height: 1.5; }
.u-session-hd .tx b { display: block; font-size: 1rem; }
.u-session-hd .tx small { color: var(--muted); font-size: .8rem; }

/* sign-up: service cards and prefix */
.u-svc { display: grid; gap: 10px; }
.u-svc-it { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--card-2); cursor: pointer; transition: border-color .15s, background .15s; }
.u-svc-it input { position: absolute; opacity: 0; pointer-events: none; }
.u-svc-it .tx { flex: 1; line-height: 1.6; text-align: right; }
.u-svc-it .tx b { display: block; font-size: .95rem; }
.u-svc-it .tx small { color: var(--muted); font-size: .76rem; }
.u-svc-it:has(input:checked) { border-color: var(--brand); background: var(--hi); box-shadow: 0 0 0 3px rgba(31, 168, 255, .14); }
.u-prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--card-2); overflow: hidden; }
.u-prefix .host { padding: 0 10px 0 14px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.u-prefix input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding-inline-start: 0 !important; font-weight: 700; }
.u-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 168, 255, .16); }

/* ---------------------------------------------------------------- school v2 */
.u-brand .mark.logo { background: #fff; transform: none; padding: 4px; overflow: hidden; box-shadow: var(--shadow-sm); }
.u-brand .mark.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }
.num-badge { flex: none; min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--hi); color: var(--brand); font-weight: 900; font-size: .9rem; }
.num-badge.off { background: var(--card-2); color: var(--muted); }
.rot-180 { transform: rotate(180deg); }
.u-err { color: var(--err); }
tr.sub td { color: var(--text-2); font-size: .9em; }

.u-weights { display: flex; gap: 6px; }
.u-weights > div { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--line); }
.u-weights b { display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-weights small { color: var(--muted); font-weight: 800; }
@media (max-width: 560px) { .u-weights { flex-wrap: wrap; } .u-weights > div { flex: 1 1 40% !important; } }

/* attendance */
.u-att-sheet .u-row { flex-wrap: wrap; }
.u-att-end { flex-wrap: wrap; justify-content: flex-end; }
.u-att-pick { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); }
.u-att-pick label { cursor: pointer; }
.u-att-pick input { position: absolute; opacity: 0; pointer-events: none; }
.u-att-pick span { display: block; padding: 6px 11px; border-radius: 999px; font-size: .76rem; font-weight: 800; color: var(--muted); transition: all .15s; white-space: nowrap; }
.u-att-pick input:focus-visible + span { outline: 2px solid var(--brand); }
.u-att-pick .present input:checked + span { background: var(--ok); color: #fff; }
.u-att-pick .late input:checked + span { background: var(--warn); color: #fff; }
.u-att-pick .absent input:checked + span { background: var(--err); color: #fff; }
.u-att-pick .excused input:checked + span { background: var(--sky); color: #fff; }
@media (max-width: 640px) { .u-att-end { width: 100%; justify-content: space-between; } .u-att-pick span { padding: 6px 9px; } }
.u-att-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.u-att-dots .d { width: 16px; height: 16px; border-radius: 5px; background: var(--card-3); }
.u-att-dots .d.present { background: var(--ok); }
.u-att-dots .d.late { background: var(--warn); }
.u-att-dots .d.absent { background: var(--err); }
.u-att-dots .d.excused { background: var(--sky); }
.u-sticky-save { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 26px); z-index: 30; margin-top: 14px; }
@media (min-width: 1024px) { .u-sticky-save { bottom: 16px; } }
body.no-nav .u-sticky-save { bottom: calc(var(--safe-b) + 12px); }
.u-sticky-save .u-btn { box-shadow: var(--shadow); }

/* quizzes */
.u-q { margin-bottom: 12px; }
.u-q-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-q-img { display: block; max-width: 100%; max-height: 360px; margin-top: 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.u-q-opts { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; counter-reset: o; }
.u-q-opts li { counter-increment: o; padding: 9px 14px; border-radius: 12px; background: var(--card-2); border: 1.5px solid transparent; font-size: .92rem; display: flex; gap: 8px; align-items: center; }
.u-q-opts li::before { content: counter(o, persian) ')'; color: var(--muted); font-weight: 800; }
.u-q-opts li.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 800; }
.u-q-opts li.mine { border-color: var(--brand); }
.u-q-opts li.bad { border-color: var(--err); background: var(--err-bg); color: var(--err); }
.u-q-pick { display: grid; gap: 8px; margin-top: 12px; }
.u-q-pick label { cursor: pointer; }
.u-q-pick input { position: absolute; opacity: 0; pointer-events: none; }
.u-q-pick span { display: block; padding: 13px 16px; border-radius: 14px; background: var(--card-2); border: 1.5px solid var(--line); font-weight: 650; transition: all .15s; }
.u-q-pick input:checked + span { border-color: var(--brand); background: var(--hi); color: var(--brand); font-weight: 850; }
.u-q-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.u-answer { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--card-2); }
.u-timer { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--hi); color: var(--brand); font-weight: 900; font-variant-numeric: tabular-nums; }
.u-timer.low { background: var(--err-bg); color: var(--err); animation: u-pulse 1s infinite; }
@keyframes u-pulse { 50% { opacity: .6; } }
.u-opt { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.u-opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
form[data-qform][data-type=text] .only-choice, form[data-qform][data-type=choice] .only-text { display: none; }

/* settings + school page */
.u-logo-pick { display: flex; gap: 16px; align-items: flex-start; }
.u-logo-prev { width: 84px; height: 84px; flex: none; display: grid; place-items: center; border-radius: 22px; background: #fff; color: var(--brand); border: 1px solid var(--line); overflow: hidden; }
.u-logo-prev img { width: 100%; height: 100%; object-fit: contain; }
.u-spage { width: min(860px, calc(100vw - 32px)); max-width: 860px; margin: 0 auto; padding: 24px 0 60px; position: relative; z-index: 1; }
.u-spage-hd { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px 0 6px; }
.u-spage-hd h1 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 900; }
.u-spage-logo { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 30px; background: #fff; color: var(--brand); box-shadow: var(--glow); overflow: hidden; }
.u-spage-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.u-spage-h { font-size: 1.1rem; font-weight: 900; margin: 0 0 10px; }
.u-spage p { line-height: 2; margin: 0 0 10px; color: var(--text-2); }

/* jalali date picker */
.u-jcal { position: absolute; z-index: 130; width: 286px; padding: 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); direction: rtl; font-family: var(--font); animation: u-pop .18s var(--ease); }
.u-jcal .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 900; }
.u-jcal .hd button { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--card-2); color: var(--text); cursor: pointer; font: inherit; font-size: 1.1rem; }
.u-jcal .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.u-jcal .grid .w { font-size: .72rem; color: var(--muted); font-weight: 800; padding: 4px 0; }
.u-jcal .grid button { height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700; }
.u-jcal .grid button:hover { background: var(--card-2); }
.u-jcal .grid button.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.u-jcal .grid button.on { background: var(--grad); color: #fff; }
.u-jcal .grid button.fri { color: var(--err); }
.u-jcal .ft { display: flex; justify-content: space-between; margin-top: 8px; }
.u-jcal .ft button { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 800; cursor: pointer; padding: 4px 6px; }
.u-fs-gate { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.u-fs-gate[hidden] { display: none; }

/* calendar */
.u-cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; font-size: .8rem; color: var(--muted); }
.u-cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.u-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.u-cal .w { text-align: center; font-size: .78rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.u-cal .c { min-height: 96px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; color: inherit; overflow: hidden; }
.u-cal .c.empty { background: none; border: 0; }
.u-cal .c.past { opacity: .62; }
.u-cal .c.fri .n { color: var(--err); }
.u-cal .c.today { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.u-cal .c.today .n { background: var(--grad); color: #fff; }
.u-cal .n { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .82rem; }
.u-cal .dots { display: none; gap: 3px; }
.u-cal .items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.u-cal .it { font-size: .68rem; line-height: 1.5; padding: 1px 5px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--card-2); }
.u-cal .it.class { background: color-mix(in srgb, var(--sky) 18%, transparent); }
.u-cal .it.extra { background: color-mix(in srgb, var(--mint) 18%, transparent); }
.u-cal .it.quiz { background: color-mix(in srgb, var(--rose) 18%, transparent); }
.u-cal .it.due { background: color-mix(in srgb, var(--lav) 20%, transparent); }
.u-cal .it.canceled, .u-cal .it.done { text-decoration: line-through; opacity: .6; }
.u-cal .more { font-size: .66rem; color: var(--muted); font-weight: 800; }
.d { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.d.class { background: var(--sky); } .d.extra { background: var(--mint); } .d.quiz { background: var(--rose); } .d.due { background: var(--lav); } .d.canceled { background: var(--muted); }
.u-cal-day { margin-bottom: 14px; scroll-margin-top: 80px; }
.u-cal-day .hd { display: flex; gap: 8px; align-items: baseline; margin: 0 4px 6px; }
.u-cal-day .hd small { color: var(--muted); }
@media (max-width: 700px) {
  .u-cal { gap: 4px; }
  .u-cal .c { min-height: 54px; padding: 5px 3px; align-items: center; border-radius: 12px; }
  .u-cal .n { align-self: center; }
  .u-cal .items { display: none; }
  .u-cal .dots { display: flex; }
}
.u-checkin { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.u-checkin .tx { flex: 1; min-width: 200px; }
.u-checkin .tx small { display: block; color: var(--muted); }
.u-checkin.on { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.u-checkin .code { font-size: 2.6rem; font-weight: 900; letter-spacing: .3em; padding: 4px 16px; border-radius: 16px; background: var(--grad); color: #fff; line-height: 1.3; }

/* ═════════════════════════════════════════════════════════
   Landing skin: the panel speaks the landing page's language —
   white cards with thin borders, soft shadows, flat blue + sun yellow,
   pale pastel icons, navy heroes with a dot grid. No glass, no glow.
   ═════════════════════════════════════════════════════════ */
body.u {
  --r-xl: 22px; --r-lg: 18px; --r-md: 14px; --r-sm: 10px;
  --ink: #0F1A2E;
  --i-mint: #12936A; --i-sky: #1A6FD6; --i-lav: #5A4FD6; --i-butter: #B7791F; --i-rose: #D33B55;
  --p-mint: #E3F7EF; --p-sky: #E4F1FF; --p-lav: #ECEBFF; --p-butter: #FFF4D9; --p-rose: #FFE4EA;
  --hero-bg: #0F2A4D;
  /* dark: deep navy, same accents */
  --bg: #0A1322; --bg-2: #0E1A2E; --card: #111E33; --card-2: #172742; --card-3: #20345A;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --text: #EEF3FA; --text-2: #B9C6DA; --muted: #8796AE;
  --brand: #4AA3F5; --strong-bg: #2B8AEE; --strong-fg: #fff;
  --i-mint: #6EE0AE; --i-sky: #7CC0FF; --i-lav: #ADA4FF; --i-butter: #FFD36B; --i-rose: #FF8FA3;
  --p-mint: rgba(110, 224, 174, .13); --p-sky: rgba(124, 192, 255, .13); --p-lav: rgba(173, 164, 255, .14); --p-butter: rgba(255, 211, 107, .13); --p-rose: rgba(255, 143, 163, .13);
  --hero-bg: #163A6B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -14px rgba(0, 0, 0, .6); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 20px -12px rgba(0, 0, 0, .5);
  --glow: var(--shadow-sm);
}
[data-theme='light'] body.u {
  --bg: #F7F9FC; --bg-2: #EEF3FA; --card: #FFFFFF; --card-2: #F3F6FB; --card-3: #E4EAF3;
  --line: #E4E9F2; --line-2: #D3DCEA;
  --text: #0F1A2E; --text-2: #44526B; --muted: #6B7890;
  --brand: #1A7FE6; --strong-bg: #1A7FE6; --strong-fg: #fff;
  --i-mint: #12936A; --i-sky: #1A6FD6; --i-lav: #5A4FD6; --i-butter: #B7791F; --i-rose: #D33B55;
  --p-mint: #E3F7EF; --p-sky: #E4F1FF; --p-lav: #ECEBFF; --p-butter: #FFF4D9; --p-rose: #FFE4EA;
  --hero-bg: #0F2A4D;
  --shadow: 0 1px 2px rgba(15, 26, 46, .04), 0 12px 32px -12px rgba(15, 26, 46, .14);
  --shadow-sm: 0 1px 2px rgba(15, 26, 46, .04), 0 6px 18px -10px rgba(15, 26, 46, .14);
  --glow: var(--shadow-sm);
}
html:has(body.u) { background: #0A1322; }

/* shell */
.u-rail { background: var(--card) !important; border: 1px solid var(--line) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-radius: 20px !important; box-shadow: var(--shadow-sm) !important; }
.u-brand { border-bottom-style: solid; border-bottom-color: var(--line); }
.u-brand .mark { transform: none; border-radius: 12px; background: var(--brand); box-shadow: 3px 3px 0 var(--sun); }
.u-rail a.it { border-radius: 12px; font-weight: 650; }
.u-rail a.it:hover { background: var(--card-2); }
.u-rail a.it.on { background: var(--p-sky); color: var(--i-sky); box-shadow: none; font-weight: 800; }
.u-rail a.it.on::before { content: ''; position: absolute; inset-inline-start: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--brand); }
.u-rail .foot { border-top-style: solid; border-top-color: var(--line); }
.u-plan { background: var(--p-sky); border-color: transparent; border-radius: 14px; }
.u-ib { background: var(--card); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 12px; }
.u-ib:hover { background: var(--card-2); }
.u-ib.solid { background: var(--brand); color: #fff; }
.u-nav { background: var(--card); border: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 20px; box-shadow: var(--shadow); }
.u-nav a, .u-nav button { border-radius: 14px; }
.u-nav .on { background: var(--brand); color: #fff; box-shadow: none; }
.u-top.stuck { background: color-mix(in srgb, var(--bg) 88%, transparent); }

/* cards and rows */
.u-card { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.u-card.glass { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: var(--line); }
.u-card.ink { background: var(--card); border-top: 4px solid var(--brand); }
.u-card.tint-lav, .u-card.tint-mint, .u-card.tint-butter, .u-card.tint-sky, .u-card.tint-rose { background: var(--card); border-top-width: 4px; }
.u-card.tint-lav { border-top-color: var(--i-lav); }
.u-card.tint-mint { border-top-color: var(--i-mint); }
.u-card.tint-butter { border-top-color: var(--sun); }
.u-card.tint-sky { border-top-color: var(--i-sky); }
.u-card.tint-rose { border-top-color: var(--i-rose); }
a.u-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.u-row { border-radius: var(--r-md); }
.u-group { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.u-group > .u-row:hover { background: var(--card-2); }

/* icons: pale square, strong colour (as on the landing) */
.ico { border-radius: 12px; }
.ico.lav { background: var(--p-lav); color: var(--i-lav); }
.ico.mint, [data-theme='light'] .ico.mint { background: var(--p-mint); color: var(--i-mint); }
.ico.sky { background: var(--p-sky); color: var(--i-sky); }
.ico.butter, [data-theme='dark'] .ico.butter { background: var(--p-butter); color: var(--i-butter); }
.ico.rose { background: var(--p-rose); color: var(--i-rose); }
.ico.grad { background: var(--brand); color: #fff; }
/* coloured badges and letter avatars: pale tint + dark letter, readable on any colour */
.ico.solid { background: color-mix(in srgb, var(--c) 16%, var(--card)); color: color-mix(in srgb, var(--c) 72%, var(--ink)); }
[data-theme='dark'] .ico.solid, body.u:not([data-theme]) .ico.solid { color: color-mix(in srgb, var(--c) 65%, #fff); background: color-mix(in srgb, var(--c) 26%, var(--card)); }
.u-ava { background: color-mix(in srgb, var(--c, var(--brand)) 16%, var(--card)); color: color-mix(in srgb, var(--c, var(--brand)) 72%, var(--ink)); }
[data-theme='dark'] .u-ava { background: color-mix(in srgb, var(--c, var(--brand)) 28%, var(--card)); color: color-mix(in srgb, var(--c, var(--brand)) 60%, #fff); }
.u-ava.has-img { background: var(--card-2); }
.u-ava.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
.u-ava.lg, .u-ava.xl { box-shadow: 0 0 0 4px var(--card), 0 0 0 7px var(--sun); }

/* hero: navy with a dot grid; the yellow ring sits in the far corner, never under text */
.u-hero, .u-hero.violet, .u-hero.night {
  background-color: var(--hero-bg); border: 0; border-radius: var(--r-xl); box-shadow: var(--shadow);
  background-image: radial-gradient(rgba(255, 255, 255, .1) 1.2px, transparent 1.4px); background-size: 18px 18px;
}
.u-hero::after { width: 150px; height: 150px; top: auto; bottom: -95px; inset-inline-start: auto; inset-inline-end: -55px; border: 22px solid var(--sun); opacity: 1; }
.u-hero.live { background-color: #D93A55; }
.u-hero.live::after { border-color: rgba(255, 255, 255, .22); }
.u-hero, .u-card.grad { text-shadow: none; }
.u-hero-stats { background: rgba(255, 255, 255, .08); border-radius: 14px; }
.u-hero .u-btn:not(.soft):not(.ghost):not(.live):not(.danger) { background: #fff; color: var(--ink); }
.u-hero .u-btn.soft, .u-hero .u-btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); }
.u-card.grad { background-color: var(--brand); box-shadow: var(--shadow-sm); }

/* buttons: flat, rounded rectangles like the landing */
.u-btn { border-radius: 12px; box-shadow: none; background: var(--brand); min-height: 46px; }
.u-btn:hover { filter: none; background: color-mix(in srgb, var(--brand) 88%, #000); }
.u-btn.sm { border-radius: 10px; min-height: 36px; }
.u-btn.strong { background: var(--ink); color: #fff; }
[data-theme='dark'] .u-btn.strong { background: #fff; color: var(--ink); }
.u-btn.soft:hover, .u-btn.ghost:hover { background: var(--card-2); }
.u-btn.danger:hover { background: var(--err-bg); filter: brightness(.97); }
.u-btn.live { background: #D93A55; box-shadow: none; }
.u-btn.live:hover { background: #C22F49; }

/* chips, segments, choices */
.u-pill.strong, .u-chips .u-pill.on { background: var(--brand); color: #fff; }
.u-seg { border-radius: 14px; padding: 4px; }
.u-seg a, .u-seg button { border-radius: 10px; }
.u-seg .on { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); font-weight: 800; }
.u-choice input:checked + span, .u-check input:checked + span, .u-picker-list .it.on .ck { background: var(--brand); color: #fff; }
.u-switch input:checked { background: var(--brand); }
.u-days button { border-radius: 14px; }
.u-days button.on, .u-jcal .grid button.on, .u-cal .c.today .n { background: var(--brand); color: #fff; box-shadow: none; }
.u-bar > i { background: var(--brand); }
.u-toast { background: var(--ink); color: #fff; border-radius: 14px; }
[data-theme='dark'] .u-toast { background: #fff; color: var(--ink); }
.u-toast .bul { background: var(--sun); color: var(--ink); }
.u-empty .art { border-radius: 18px; transform: none; background: var(--p-sky); color: var(--i-sky); }
.u-empty .art.grad { background: var(--brand); color: #fff; box-shadow: 3px 3px 0 var(--sun); }
.u-drop .ic { border-radius: 14px; background: var(--brand); box-shadow: none; }
.u-session-hd .num, .u-checkin .code { background: var(--brand); box-shadow: 3px 3px 0 var(--sun); }
.u-auth .logo { transform: none; border-radius: 16px; background: var(--brand); box-shadow: 3px 3px 0 var(--sun); }
.u-sheet { border-radius: 22px 22px 0 0; }
.u-weights > div { background: var(--p-sky); border-color: transparent; }
.u-hero::after { width: 120px; height: 120px; bottom: -78px; inset-inline-end: -48px; border-width: 18px; }
.u-hero .u-pill.glass { background: color-mix(in srgb, var(--hero-bg) 70%, #fff 12%); border-color: rgba(255, 255, 255, .22); backdrop-filter: none; }

/* more sun yellow — always on navy/white, or with dark text on it */
.u-hero h1 { position: relative; display: block; width: fit-content; max-width: 100%; z-index: 0; }
.u-hero h1::after { content: ''; position: absolute; inset-inline: -2% -2%; bottom: -.16em; height: .3em; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 40 2, 80 2, 110 6 S 170 10, 198 4' fill='none' stroke='%23ffc94a' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.u-hero .huge, .u-hero-stats b { color: var(--sun); }
.u-hero .u-btn:not(.soft):not(.ghost):not(.live):not(.danger) { box-shadow: 3px 3px 0 var(--sun); }
.u-btn:not(.soft):not(.ghost):not(.danger):not(.sm):not(.strong) { box-shadow: 3px 3px 0 var(--sun); }
.u-btn:not(.soft):not(.ghost):not(.danger):not(.sm):not(.strong):active { box-shadow: 1px 1px 0 var(--sun); }
.u-rail a.it.on::before { background: var(--sun); }
.u-rail a.it.on svg { color: var(--i-sky); }
.u-nav .on { box-shadow: inset 0 -3px 0 var(--sun); }
.u-seg .on { box-shadow: var(--shadow-sm), inset 0 -3px 0 var(--sun); }
.u-sec h2::before { background: var(--sun); width: 8px; height: 8px; border-radius: 3px; box-shadow: 3px 3px 0 var(--brand); }
.u-days button.on { box-shadow: 0 4px 0 var(--sun); }
.u-cal .c.today .n, .u-jcal .grid button.on { background: var(--sun); color: var(--ink); }
.u-empty .art { background: var(--p-butter); color: var(--i-butter); }
.u-pill.brand { background: var(--sun); color: var(--ink); }
.u-toast .bul { background: var(--sun); color: var(--ink); }
.u-brand { border-bottom: 2px solid var(--sun); }
.u-card.tint-sky { border-top-color: var(--sun); }
