/* ==========================================================
   Student Dashboard: Poppins for titles, Urbanist for text
   Brand colours (--primary, --accent) are injected per install.
   ========================================================== */
:root {
  --ink: #0F1A2E;
  --ink-2: #1B2A45;
  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --text: #172036;
  --muted: #677189;
  --line: #E3E7F0;
  --ok: #12B886;
  --warn: #FF9F1C;
  --err: #E5383B;
  --wa: #25D366;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 26, 46, .05), 0 8px 24px -12px rgba(15, 26, 46, .14);
  --f-title: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-text: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 15px; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-title); line-height: 1.2; margin: 0; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; margin: 1.4rem 0 .6rem; }
p { margin: .4rem 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; font-weight: 600; }
.big { font-size: 1.15rem; }
.note { margin-top: 1rem; padding: .75rem 1rem; background: var(--bg); border-radius: var(--r-sm); color: var(--muted); font-size: .9rem; }
.pre { white-space: pre-wrap; }
.narrow { max-width: 520px; }
.ico { flex: none; }
[hidden] { display: none !important; }
.field select { width: 100%; }

/* ---------- Brand ---------- */
.brand-logo { display: block; max-height: 42px; max-width: 190px; object-fit: contain; }
.brand-logo.brand--lg { max-height: 56px; max-width: 240px; }
.brand-mono { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--f-title); font-weight: 700; font-size: 1.12rem; color: #fff; }
.brand-mono__sq {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 1.2rem;
  box-shadow: 0 6px 18px -6px var(--accent);
}
.brand--lg .brand-mono__sq { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 15px; }
.brand--lg { font-size: 1.4rem; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.2rem;
  padding: 1.4rem 1rem 1rem; color: #CFC8E8;
  background:
    radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--primary) 45%, transparent), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    var(--ink);
  z-index: 40;
}
.sidebar__brand { padding: .2rem .5rem .6rem; display: block; }
.sidebar__brand:hover { text-decoration: none; }
.sidebar__nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; overflow-y: auto; }
.navlink {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; border-radius: 12px;
  color: #CFC8E8; font-weight: 600; transition: background .15s, color .15s;
}
.navlink:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.navlink.is-active { background: #fff; color: var(--ink); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5); }
.navlink.is-active .ico { color: var(--primary); }
.sidebar__sep { margin: 1rem .85rem .3rem; font-size: .78rem; color: #8F86B3; font-weight: 600; }
.sidebar__me { display: flex; align-items: center; gap: .7rem; padding: .7rem; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.sidebar__me-txt { flex: 1; min-width: 0; line-height: 1.2; }
.sidebar__me-txt a { color: #fff; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__me-txt small { color: #8F86B3; }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2.2rem); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .topbar__menu { display: none; }
.topsearch {
  position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 .9rem; color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.topsearch:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-l); }
.topsearch input { flex: 1; border: 0; outline: 0; background: none; padding: .65rem 0; min-width: 0; color: var(--text); }
.topsearch kbd { font-family: var(--f-text); font-size: .75rem; border: 1px solid var(--line); border-radius: 6px; padding: 0 .4rem; color: var(--muted); }
.topbar__add { margin-left: auto; }
.content { padding: clamp(1rem, 3vw, 2.2rem); flex: 1; width: 100%; max-width: 1360px; }
.foot { padding: 1rem clamp(1rem, 3vw, 2.2rem) 1.5rem; color: var(--muted); font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.1rem; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px var(--primary); }
.btn--primary:hover { background: var(--primary-d); }
.btn--soft { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn--soft:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-2); }
.btn--white { background: #fff; color: var(--c, var(--ink)); }
.btn--glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn--glass:hover { background: rgba(255, 255, 255, .26); }
.btn--wa { background: var(--wa); color: #06361B; }
.btn--wa:hover { background: #1EBE5A; }
.btn--danger-ghost { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn--danger-ghost:hover { background: color-mix(in srgb, var(--err) 8%, transparent); }
.btn--lg { padding: .85rem 1.4rem; font-size: 1rem; border-radius: 14px; }
.btn--sm { padding: .4rem .8rem; font-size: .85rem; border-radius: 10px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btnrow { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text); flex: none;
}
.iconbtn:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.iconbtn--ghost { background: transparent; border-color: transparent; color: #CFC8E8; }
.iconbtn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); border-color: transparent; }
.iconbtn--danger:hover { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
.iconbtn--glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .28); }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Avatars, tags, chips ---------- */
.avatar {
  --c: var(--primary);
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px;
  font-family: var(--f-title); font-weight: 700; font-size: .95rem;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff);
}
.avatar--sm { width: 36px; height: 36px; border-radius: 11px; font-size: .8rem; }
.avatar--xl { width: 104px; height: 104px; border-radius: 30px; font-size: 2.2rem; color: #fff; background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 55%, var(--accent))); border: 5px solid var(--surface); box-shadow: var(--shadow); }
.sidebar .avatar { color: #fff; background: color-mix(in srgb, var(--c) 70%, transparent); }
.tag {
  --c: var(--primary);
  display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: color-mix(in srgb, var(--c) 82%, #000);
  background: color-mix(in srgb, var(--c) 13%, #fff); border: 0; white-space: nowrap; cursor: default;
}
a.tag:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 22%, #fff); }
.tag--solid { background: var(--ink); color: #fff; cursor: pointer; }
.chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  --c: var(--primary);
  display: inline-block; padding: .1rem .5rem; border-radius: 7px; font-size: .74rem; font-weight: 700;
  color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 14%, #fff);
}

/* ---------- Toasts & alerts ---------- */
.toast {
  display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; margin-bottom: 1.2rem; border-radius: var(--r-md);
  background: var(--surface); border-left: 5px solid var(--ok); box-shadow: var(--shadow); font-weight: 600;
  animation: toastIn .35s ease-out;
}
.toast--success .ico { color: var(--ok); }
.toast--error { border-left-color: var(--err); }
.toast--error .ico { color: var(--err); }
.toast span { flex: 1; }
.toast__x { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } }
.alert { padding: .8rem 1rem; border-radius: var(--r-md); margin: 0 0 1rem; font-weight: 600; }
.alert--error { background: #FDECEC; color: #9B1C1F; }
.alert--info { background: var(--primary-l); color: var(--primary-d); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 1.4rem; }
.panel > h3 { margin-bottom: 1rem; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head .muted { max-width: 62ch; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.2rem 0 1rem; flex-wrap: wrap; }
.section-head__act { display: flex; gap: .6rem; flex-wrap: wrap; }
.two-col > *, .profile-grid > *, .stats > * { min-width: 0; }
.two-col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.4rem; margin-top: 1rem; }
.two-col--wide-left { grid-template-columns: 1.4fr 1fr; align-items: start; }
.stack > .panel:last-child { margin-bottom: 0; }
.empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); }
.empty .ico { color: var(--primary); opacity: .7; }
.empty h3 { margin: .8rem 0 .3rem; }
.empty p { margin: 0 auto 1.2rem; max-width: 46ch; }
.crumb { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .9rem; color: rgba(255, 255, 255, .85); margin-bottom: .8rem; }
.crumb--dark { color: var(--muted); }
.crumb:hover { text-decoration: none; color: inherit; opacity: 1; }

/* ---------- Dashboard hero + big search ---------- */
.hero {
  position: relative; padding: clamp(1.6rem, 4vw, 2.8rem); border-radius: 28px; color: #fff; overflow: visible;
  background:
    radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--accent) 85%, transparent), transparent 65%),
    radial-gradient(50% 90% at 0% 100%, color-mix(in srgb, #FF9F1C 55%, transparent), transparent 70%),
    linear-gradient(120deg, var(--primary-d), var(--primary));
  box-shadow: 0 24px 50px -28px var(--primary);
  isolation: isolate; z-index: 5;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; }
.hero__hi { font-weight: 700; opacity: .85; margin: 0 0 .2rem; }
.hero__sub { opacity: .9; max-width: 56ch; margin-bottom: 1.4rem; }
.hero--compact { margin-bottom: 1.6rem; }
.bigsearch {
  position: relative; display: flex; align-items: center; gap: .8rem; max-width: 760px;
  background: #fff; border-radius: 20px; padding: .5rem .5rem .5rem 1.2rem; color: var(--muted);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45);
}
.bigsearch input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: clamp(1rem, .9rem + .6vw, 1.3rem); font-weight: 600; padding: .7rem 0; color: var(--text); background: none; }
.bigsearch input::placeholder { color: #A7A2BD; font-weight: 500; }
.bigsearch .btn { padding: .85rem 1.5rem; border-radius: 14px; font-size: 1rem; }

/* Suggestions dropdown */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 18px; padding: .4rem;
  box-shadow: 0 24px 60px -20px rgba(15, 26, 46, .45); border: 1px solid var(--line); z-index: 60; max-height: 70vh; overflow-y: auto; color: var(--text);
}
.suggest__item { display: flex; align-items: center; gap: .8rem; padding: .6rem .7rem; border-radius: 12px; color: var(--text); }
.suggest__item:hover, .suggest__item.is-active { background: var(--primary-l); text-decoration: none; }
.suggest__txt { flex: 1; min-width: 0; line-height: 1.25; }
.suggest__txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest__txt small { color: var(--muted); }
.suggest__empty, .suggest__all { padding: .7rem; color: var(--muted); font-size: .92rem; display: block; }
.suggest__all { border-top: 1px solid var(--line); margin-top: .3rem; font-weight: 700; color: var(--primary); }
.suggest__exact { font-size: .7rem; font-weight: 800; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, #fff); padding: .1rem .45rem; border-radius: 6px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.4rem; }
.stat { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat > .ico { width: 46px; height: 46px; padding: 11px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); }
.stat b { display: block; font-family: var(--f-title); font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.stat span { color: var(--muted); font-size: .88rem; font-weight: 600; }

/* Intake cards: the oversized intake code is the signature */
.intake-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.intake-card {
  --c: var(--primary);
  position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 1.3rem 1.3rem 1.1rem; overflow: hidden;
  background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.intake-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 40%, var(--accent))); }
.intake-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 22px 40px -22px var(--c); }
.intake-card__code { font-family: var(--f-title); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; color: var(--c); margin-top: .3rem; }
.intake-card__name { font-weight: 700; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.intake-card__count { color: var(--muted); font-weight: 600; }
.intake-card__count b { color: var(--text); font-family: var(--f-title); }
.intake-card__bars { display: grid; gap: .4rem; margin: .8rem 0 .9rem; }
.mbar { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.mbar em { font-style: normal; grid-column: 1; grid-row: 1; }
.mbar i { grid-column: 2; grid-row: 1; height: 8px; border-radius: 99px; background: var(--bg); position: relative; overflow: hidden; }
.mbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--bc); }
.mbar small { text-align: right; font-size: .78rem; }
.intake-card__foot { display: flex; align-items: center; justify-content: space-between; padding-top: .8rem; border-top: 1px dashed var(--line); font-weight: 700; font-size: .9rem; color: var(--c); }

/* Horizontal bars + people list */
.hbars { display: grid; gap: 1rem; }
.hbar__top { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; margin-bottom: .35rem; }
.hbar__top b { font-family: var(--f-title); }
.hbar__track { height: 12px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.hbar__track i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--bc), color-mix(in srgb, var(--bc) 60%, #fff)); border-radius: inherit; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.people a, .people__row { display: flex; align-items: center; gap: .8rem; padding: .55rem .6rem; border-radius: 14px; color: var(--text); }
.people a:hover { background: var(--bg); text-decoration: none; }
.people__txt { flex: 1; min-width: 0; line-height: 1.25; }
.people__txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people__txt small { color: var(--muted); }
.people--rows li + li { border-top: 1px solid var(--line); }
.people__row form { display: contents; }

/* ---------- Intakes list ---------- */
.intake-list { display: grid; gap: .8rem; }
.intake-row {
  --c: var(--primary);
  display: flex; align-items: center; gap: 1.2rem; padding: .9rem 1rem; background: var(--surface);
  border-radius: var(--r-lg); border: 1px solid var(--line); border-left: 6px solid var(--c); box-shadow: var(--shadow);
}
.intake-row__main { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; color: var(--text); }
.intake-row__main:hover { text-decoration: none; }
.intake-row__main:hover b { color: var(--c); }
.intake-row__code { font-family: var(--f-title); font-weight: 800; font-size: 1.5rem; color: var(--c); min-width: 96px; letter-spacing: -.02em; }
.intake-row__txt { min-width: 0; line-height: 1.3; }
.intake-row__txt b { display: block; }
.intake-row__txt small, .intake-row__num small { color: var(--muted); font-size: .82rem; }
.intake-row__num { text-align: right; line-height: 1.2; min-width: 110px; }
.intake-row__num b { display: block; font-family: var(--f-title); font-size: 1.02rem; }
.intake-row__act { display: flex; gap: .4rem; }

/* ---------- Single intake ---------- */
.intake-hero {
  --c: var(--primary);
  display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: 28px; color: #fff;
  background:
    radial-gradient(70% 140% at 100% 0%, color-mix(in srgb, var(--c) 30%, #fff 20%), transparent 60%),
    linear-gradient(125deg, color-mix(in srgb, var(--c) 78%, #000), var(--c));
  box-shadow: 0 24px 50px -28px var(--c); margin-bottom: 1.4rem;
}
.intake-hero h1 { color: #fff; font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); font-weight: 600; }
.intake-hero p { display: flex; align-items: center; gap: .4rem; opacity: .9; }
.intake-hero__code { font-family: var(--f-title); font-weight: 800; font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: .95; letter-spacing: -.04em; }
.intake-hero__nums { display: flex; gap: 2rem; align-self: end; text-align: right; }
.intake-hero__nums b { display: block; font-family: var(--f-title); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.intake-hero__nums span { opacity: .85; font-weight: 600; }
.intake-hero__act { grid-column: 1 / -1; display: flex; gap: .6rem; flex-wrap: wrap; }
.intake-hero__act .btn--white { color: var(--c); }

.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.filters__search { flex: 1 1 280px; display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 0 .9rem; color: var(--muted); }
.filters__search:focus-within { border-color: var(--primary); }
.filters__search input { flex: 1; border: 0; outline: 0; padding: .7rem 0; background: none; min-width: 0; color: var(--text); }
.filters__chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.fchip {
  --c: var(--ink);
  padding: .45rem .85rem; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line);
}
.fchip small { color: var(--muted); font-weight: 700; }
.fchip:hover { text-decoration: none; border-color: var(--c); }
.fchip.is-on { background: var(--c); border-color: var(--c); color: #fff; }
.fchip.is-on small { color: rgba(255, 255, 255, .8); }
.filters__sel { display: flex; gap: .5rem; }
select {
  appearance: none; -webkit-appearance: none; padding: .62rem 2.2rem .62rem .9rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236E6987' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right .85rem center;
  font-weight: 600; cursor: pointer; max-width: 100%;
}
.resultline { color: var(--muted); font-weight: 600; margin: .6rem 0 1rem; }

.tablewrap { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .82rem; font-weight: 700; color: var(--muted); padding: .9rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: #F9FAFD; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary) 4%, #fff); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.who { display: flex; align-items: center; gap: .7rem; color: var(--text); min-width: 220px; }
.who:hover { text-decoration: none; }
.who b { display: block; line-height: 1.25; }
.who small { color: var(--muted); font-size: .82rem; }
.rowgo { color: var(--muted); width: 32px; }
.table td[data-label="Student ID"], .table td[data-label="Phone"], .table td[data-label="NIC"] { white-space: nowrap; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.2rem; font-weight: 600; color: var(--muted); }
.pager__btn { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .9rem; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); color: var(--text); font-weight: 700; }
.pager__btn:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.pager__btn.is-off { opacity: .4; pointer-events: none; }

/* ---------- Student profile ---------- */
.profile { --c: var(--primary); background: var(--surface); border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.4rem; }
.profile__band {
  height: 120px;
  background:
    radial-gradient(40% 160% at 85% 0%, color-mix(in srgb, var(--accent) 75%, transparent), transparent 70%),
    radial-gradient(30% 140% at 30% 100%, color-mix(in srgb, #FF9F1C 50%, transparent), transparent 70%),
    linear-gradient(110deg, color-mix(in srgb, var(--c) 75%, #000), var(--c));
}
.profile__body { display: flex; align-items: flex-end; gap: 1.3rem; padding: 0 1.6rem 1.4rem; flex-wrap: wrap; }
.profile__body .avatar--xl { margin-top: -52px; }
.profile__id { flex: 1; min-width: 240px; }
.profile__id h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin-bottom: .5rem; }
.profile__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.profile__act { display: flex; gap: .5rem; flex-wrap: wrap; }
.profile-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.4rem; align-items: start; }
.facts { margin: 0; display: grid; }
.fact { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.fact:last-child { border-bottom: 0; }
.fact dt { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-weight: 600; }
.fact dt .ico { color: var(--primary); }
.fact dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; word-break: break-word; }
.copybtn { border: 0; background: var(--bg); color: var(--muted); border-radius: 8px; width: 30px; height: 30px; display: inline-grid; place-items: center; cursor: pointer; }
.copybtn:hover { color: var(--primary); }
.copybtn.is-done { color: var(--ok); }
.courses { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.course { --c: var(--primary); display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .65rem .8rem; border-radius: 14px; border: 1.5px dashed var(--line); color: var(--muted); }
.course__code { font-family: var(--f-title); font-weight: 700; font-size: .9rem; }
.course__name { font-weight: 600; }
.course__state { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700; }
.course.is-on { border-style: solid; border-color: color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 8%, #fff); color: var(--text); }
.course.is-on .course__code, .course.is-on .course__state { color: color-mix(in srgb, var(--c) 85%, #000); }
.paytotal { font-family: var(--f-title); font-size: 1.4rem; color: var(--ok); }
.paysteps { list-style: none; margin: 0; padding: 0; position: relative; }
.paystep { position: relative; display: grid; grid-template-columns: 30px 1fr auto; gap: .9rem; align-items: center; padding: .55rem 0; color: var(--muted); font-weight: 600; }
.paystep:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.paystep.is-paid:not(:last-child)::after { background: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.paystep__dot { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; background: var(--surface); position: relative; z-index: 1; }
.paystep.is-paid { color: var(--text); }
.paystep.is-paid .paystep__dot { background: var(--ok); border: 0; color: #fff; }
.paystep.is-paid .paystep__amt { font-family: var(--f-title); font-weight: 700; }
.dangerzone { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.4rem; flex-wrap: wrap; font-size: .9rem; }

/* ---------- Search results ---------- */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.result {
  --c: var(--primary);
  display: flex; gap: .9rem; padding: 1rem 1.1rem; background: var(--surface); border-radius: var(--r-lg); border: 1.5px solid var(--line); color: var(--text); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.result:hover { text-decoration: none; border-color: var(--c); transform: translateY(-2px); }
.result.is-exact { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 12%, transparent), var(--shadow); }
.result__main { flex: 1; min-width: 0; display: grid; gap: .35rem; }
.result__main > b { font-size: 1.05rem; line-height: 1.25; }
.result__meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; color: var(--muted); font-size: .9rem; font-weight: 600; }
.result__meta span { display: inline-flex; align-items: center; gap: .3rem; }
.result__side { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.result__side small { color: var(--muted); }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tip { --c: var(--primary); padding: 1.2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: .3rem; }
.tip .ico { color: var(--c); margin-bottom: .3rem; }
.tip b { font-family: var(--f-title); }
.tip span { color: var(--muted); font-size: .92rem; }

/* ---------- Forms ---------- */
.form { display: block; }
.form--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; align-items: start; }
.form--grid > h3 { margin-bottom: 0; }
.form--grid-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { display: grid; gap: .4rem; margin-bottom: 1rem; min-width: 0; }
.form--grid .field { margin-bottom: 0; }
.field__label { font-weight: 700; font-size: .9rem; }
.field__label em { font-style: normal; font-weight: 500; color: var(--muted); }
.field__control {
  display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 .85rem; color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.field__control:focus-within, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-l); outline: 0; }
.field__control input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .72rem 0; background: none; color: var(--text); font-weight: 600; }
.field__control--total { background: var(--bg); }
.field__control--total input { font-family: var(--f-title); color: var(--ok); }
textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .85rem; resize: vertical; font-weight: 600; background: var(--surface); }
.field__hint { color: var(--muted); font-size: .82rem; }
.field__err { color: var(--err); font-weight: 700; font-size: .84rem; }
.has-err .field__control, .has-err select { border-color: var(--err); }
.field__eye { border: 0; background: none; color: var(--muted); cursor: pointer; padding: .3rem; display: grid; }
.field__eye:hover { color: var(--primary); }
.form__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .4rem; }
.form__actions--sticky { position: sticky; bottom: 0; padding: 1rem 0; background: linear-gradient(transparent, var(--bg) 35%); z-index: 5; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; cursor: pointer; }
.seg { display: inline-flex; background: var(--bg); padding: 4px; border-radius: 12px; gap: 4px; flex-wrap: wrap; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .5rem .9rem; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--primary-l); }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.swatch { position: relative; cursor: pointer; }
.swatch input[type=radio] { position: absolute; opacity: 0; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 11px; background: var(--c); transition: transform .12s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); transform: scale(.92); }
.swatch input:focus-visible + span { outline: 3px solid var(--primary-l); outline-offset: 3px; }
.swatch--custom input { width: 34px; height: 34px; border: 0; padding: 0; border-radius: 11px; background: none; cursor: pointer; }
input[type=color] { -webkit-appearance: none; appearance: none; border: 0; padding: 0; background: none; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 10px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 10px; }
.coursepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.coursepick__item { --c: var(--primary); position: relative; display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.coursepick__item input { width: 20px; height: 20px; accent-color: var(--c); flex: none; }
.coursepick__item span { display: grid; line-height: 1.25; }
.coursepick__item b { font-family: var(--f-title); color: var(--c); }
.coursepick__item small { color: var(--muted); font-weight: 600; }
.coursepick__item:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }

/* ---------- Import ---------- */
.newintake { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.newintake[hidden] { display: none; }
.drop {
  display: grid; justify-items: center; gap: .4rem; text-align: center; padding: 2.4rem 1rem; margin: 1.4rem 0 1rem; border-radius: var(--r-lg); cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--primary) 35%, var(--line)); background: color-mix(in srgb, var(--primary) 4%, #fff); color: var(--muted); position: relative; transition: background .15s, border-color .15s;
}
.drop .ico { color: var(--primary); }
.drop b { color: var(--text); font-size: 1.05rem; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.is-over, .drop.has-file { background: var(--primary-l); border-color: var(--primary); }
.howto { color: var(--muted); font-size: .92rem; margin-bottom: .6rem; }
.howto summary { cursor: pointer; font-weight: 700; color: var(--text); }
.minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.mini { --c: var(--primary); padding: 1rem; border-radius: 16px; background: color-mix(in srgb, var(--c) 10%, #fff); }
.mini b { display: block; font-family: var(--f-title); font-size: 1.7rem; color: color-mix(in srgb, var(--c) 85%, #000); line-height: 1.1; }
.mini span { font-weight: 600; font-size: .88rem; color: var(--muted); }
.mapping { display: flex; flex-wrap: wrap; gap: .45rem; }
.map { padding: .35rem .7rem; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: .85rem; }
.map b { margin-right: .3rem; }
.map.is-on { background: color-mix(in srgb, var(--ok) 11%, #fff); color: var(--text); }
.map.is-on b { color: color-mix(in srgb, var(--c, var(--ok)) 85%, #000); }
.problems { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .92rem; }

/* ---------- Settings ---------- */
.tabs { display: flex; gap: .3rem; margin-bottom: 1.4rem; border-bottom: 1.5px solid var(--line); overflow-x: auto; }
.tabs a { padding: .7rem 1.1rem; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.is-on { color: var(--primary); border-color: var(--primary); }
.colorpick { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.colorpick__item { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem .7rem .7rem; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; }
.colorpick__item input { width: 48px; height: 48px; }
.colorpick__item span { display: grid; line-height: 1.25; }
.colorpick__item small { color: var(--muted); font-weight: 600; }
.colorpick__demo { display: flex; gap: .8rem; align-items: center; margin-left: auto; }
.hero-swatch { width: 120px; height: 46px; border-radius: 14px; background: linear-gradient(120deg, var(--primary-d), var(--primary), var(--accent)); }
.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.logos__item { display: grid; gap: .45rem; align-content: start; justify-items: start; }
.logos__item small { line-height: 1.35; }
.logos__prev { width: 100%; height: 110px; border-radius: 16px; border: 1.5px dashed var(--line); display: grid; place-items: center; padding: 1rem; background: #fff; }
.logos__prev img { max-height: 70px; max-width: 100%; object-fit: contain; }
.logos__prev--dark { background: var(--ink); border-color: var(--ink); }
.logos__prev--fav img { width: 56px; height: 56px; }
.imgwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-top: 1rem; }
.imgwall__item { display: grid; gap: .4rem; cursor: pointer; }
.imgwall__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; }
.imgwall__add { position: relative; display: grid; place-items: center; align-content: center; gap: .3rem; aspect-ratio: 4/3; border-radius: 14px; border: 2px dashed var(--line); color: var(--muted); font-weight: 700; cursor: pointer; }
.imgwall__add:hover { border-color: var(--primary); color: var(--primary); }
.imgwall__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.courselist { display: grid; gap: .6rem; }
.courserow { display: grid; grid-template-columns: 42px 110px 1fr 70px 100px auto 40px; gap: .6rem; align-items: center; }
.courserow input:not([type=color]) { border: 1.5px solid var(--line); border-radius: 10px; padding: .55rem .7rem; font-weight: 600; min-width: 0; background: var(--surface); }
.courserow input[type=color] { width: 42px; height: 40px; }
.courserow__code { font-family: var(--f-title); text-transform: uppercase; }
.courserow__n { font-size: .85rem; }
.courserow--new { padding-top: .8rem; border-top: 1.5px dashed var(--line); margin-top: .4rem; }

/* ==========================================================
   Sign-in screen
   ========================================================== */
.login-body { background: var(--ink); }
.login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; min-height: 100dvh; }
.login__show { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.login__wall { position: absolute; inset: -40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; transform: rotate(-8deg) scale(1.12); }
.wallcol { overflow: hidden; }
.wallcol__track { display: flex; flex-direction: column; gap: 16px; animation: wallUp 48s linear infinite; }
.wallcol--1 .wallcol__track { animation-direction: reverse; animation-duration: 56s; }
.wallcol--2 .wallcol__track { animation-duration: 42s; }
@keyframes wallUp { to { transform: translateY(-50%); } }
.walltile {
  --c: var(--primary);
  aspect-ratio: 4 / 5; border-radius: 26px; padding: 1.4rem; display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem;
  background:
    radial-gradient(80% 60% at 100% 0%, color-mix(in srgb, #fff 28%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 70%, #000));
  color: #fff;
}
.walltile .ico { margin-bottom: auto; opacity: .9; }
.walltile strong { font-family: var(--f-title); font-weight: 800; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); line-height: 1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.walltile span { font-weight: 600; opacity: .85; }
.walltile--img { background-size: cover; background-position: center; }
.login__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 26, 46, .55) 0%, rgba(15, 26, 46, .35) 35%, rgba(15, 26, 46, .92) 78%),
    linear-gradient(90deg, rgba(15, 26, 46, .4), transparent 60%);
}
.login__story { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.6rem, 4vw, 3.2rem); }
.login__headline { color: #fff; font-size: clamp(2rem, 1.2rem + 2.8vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; max-width: 14ch; text-wrap: balance; }
.login__lede { color: rgba(255, 255, 255, .82); font-size: 1.1rem; max-width: 46ch; margin-top: 1rem; }
.login__meta { display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: center; color: rgba(255, 255, 255, .8); font-weight: 600; }
.login__meta span { display: inline-flex; align-items: center; gap: .45rem; }
.login__clock b { font-family: var(--f-title); color: #fff; font-size: 1.05rem; }
.login__clock em { font-style: normal; opacity: .75; }
.login__panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem clamp(1.2rem, 4vw, 3rem); background: var(--bg); }
.login__card { width: 100%; max-width: 420px; }
.login__card h2 { font-size: clamp(1.7rem, 1.3rem + 1vw, 2.2rem); font-weight: 700; margin-bottom: .3rem; }
.login__card > .muted { margin-bottom: 1.6rem; }
.login__card .field__control { background: #fff; border-radius: 14px; }
.login__card .field__control input { padding: .9rem 0; }
.login__brand-sm { display: none; margin-bottom: 1.6rem; }
.login__brand-sm .brand-mono { color: var(--ink); }
.login__help { margin-top: 2rem; padding-top: 1.4rem; border-top: 1.5px dashed var(--line); color: var(--muted); font-weight: 600; }
.login__help-btns { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
.login__foot { position: absolute; bottom: 1rem; color: var(--muted); font-size: .85rem; }

/* ---------- Installer ---------- */
.install-body { background: var(--bg); }
.install { max-width: 760px; margin: 0 auto; padding: 3rem 1.2rem; }
.install h1 { margin-bottom: 1.4rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; font-weight: 600; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--err); }
.install__next { line-height: 1.9; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .courserow { grid-template-columns: 42px 90px 1fr 60px auto 40px; }
  .courserow__n { display: none; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 300px); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0, 0, 0, .3); padding-top: calc(1.4rem + env(safe-area-inset-top)); }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 26, 46, .45); z-index: 35; }
  .topbar .topbar__menu { display: inline-grid; }
  .topbar { padding-top: calc(.85rem + env(safe-area-inset-top)); }
  .two-col, .two-col--wide-left { grid-template-columns: minmax(0,1fr); }
  .login { grid-template-columns: 1fr; }
  .login__show { min-height: 340px; }
  .login__story { justify-content: flex-end; }
  .login__story .login__brand { position: absolute; top: clamp(1.6rem, 4vw, 3.2rem); }
  .login__headline { max-width: 18ch; }
  .login__foot { position: static; margin-top: 2rem; }
  .logos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  html, body { font-size: 14px; }
  .topbar { gap: .6rem; }
  .topbar__add span, .topsearch kbd { display: none; }
  .topbar__add { padding: .62rem; }
  .stats { gap: .7rem; }
  .stat { padding: .9rem; flex-direction: column; align-items: flex-start; gap: .6rem; }
  .stat b { font-size: 1.15rem; }
  .hero { border-radius: 22px; }
  .bigsearch { padding: .35rem .35rem .35rem .9rem; border-radius: 16px; }
  .bigsearch > .ico { display: none; }
  .bigsearch .btn { padding: .75rem 1rem; }
  .intake-row { flex-wrap: wrap; gap: .6rem 1rem; }
  .intake-row__main { flex-basis: 100%; }
  .intake-row__num { text-align: left; min-width: 0; }
  .intake-row__act { margin-left: auto; }
  .intake-hero { grid-template-columns: 1fr; }
  .intake-hero__nums { text-align: left; }
  .intake-hero__act .btn { flex: 1; }
  .filters__sel { width: 100%; }
  .filters__sel select { flex: 1; min-width: 0; }
  /* table → cards */
  .tablewrap { background: none; border: 0; box-shadow: none; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .9rem 1rem; margin-bottom: .7rem; box-shadow: var(--shadow); position: relative; }
  .table td { border: 0; padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: .85rem; text-align: left; }
  .table td[data-label="Student"] { padding-bottom: .6rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line); text-align: left; padding-right: 2rem; }
  .table td[data-label="Student"]::before, .table td.rowgo { display: none; }
  .table td.num { text-align: right; }
  .who { min-width: 0; }
  .form--grid, .form--grid-4, .newintake { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .fact { grid-template-columns: 1fr; gap: .2rem; }
  .profile__body { padding: 0 1.1rem 1.2rem; }
  .profile__act { width: 100%; }
  .profile__act .btn { flex: 1; }
  .result-grid, .tips, .minis { grid-template-columns: 1fr; }
  .minis { grid-template-columns: 1fr 1fr; }
  .logos { grid-template-columns: 1fr; }
  .courserow { grid-template-columns: 40px 1fr 40px; }
  .courserow input[name=name] { grid-column: 1 / -1; grid-row: 2; }
  .courserow__sort { display: none; }
  .courserow .btn { grid-column: 1 / -1; }
  .courserow .iconbtn { grid-column: 3; grid-row: 1; }
  .courserow > span:empty { display: none; }
  .checks { grid-template-columns: 1fr; }
  .login__show { min-height: 300px; }
  .login__lede, .login__meta span:first-child { display: none; }
  .panel { padding: 1.1rem; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .topbar, .foot, .profile__act, .dangerzone, .crumb, .copybtn { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .panel, .profile { box-shadow: none; }
  .profile-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   Version 2
   ========================================================== */
.d-block { display: block; }
.form--grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checks-row { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.field__warn { display: inline-flex; align-items: center; gap: .3rem; color: #B7791F; font-weight: 700; font-size: .82rem; }
.field__warn[hidden] { display: none; }
.donelist { list-style: none; padding: 0; display: grid; gap: .5rem; }
.donelist li { display: flex; gap: .5rem; align-items: center; font-weight: 600; }
.donelist .ico { color: var(--ok); }
.panel__head h3 { display: flex; align-items: center; gap: .5rem; }
.panel__head h3 .ico { color: var(--primary); }
a.stat:hover { text-decoration: none; border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
a.stat { color: var(--text); }

/* ---------- Sign-in (v2) ---------- */
.login-body { background: var(--bg); }
.auth { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth__show { position: relative; overflow: hidden; color: #fff; background: radial-gradient(80% 60% at 20% 10%, color-mix(in srgb, var(--primary) 70%, transparent), transparent), radial-gradient(70% 60% at 90% 90%, color-mix(in srgb, var(--accent) 45%, transparent), transparent), var(--ink); }
.auth__slides { position: absolute; inset: 0; }
.auth__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 9s ease-out; }
.auth__slide.is-on { opacity: 1; transform: scale(1.0); }
.auth__veil { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(10, 18, 36, .70) 0%, rgba(10, 18, 36, .15) 32%, rgba(10, 18, 36, .35) 55%, rgba(10, 18, 36, .94) 100%),
  linear-gradient(100deg, color-mix(in srgb, var(--primary) 45%, transparent) 0%, transparent 55%); }
.auth__show--plain .auth__veil { background: linear-gradient(180deg, transparent, rgba(10, 18, 36, .5)); }
.auth__story { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.6rem, 3.5vw, 3rem); }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth__top .brand-logo { max-height: 54px; max-width: 230px; }
.auth__clock { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .18); font-weight: 600; font-size: .9rem; }
.auth__clock b { font-family: var(--f-title); }
.auth__clock em { font-style: normal; opacity: .75; }
.auth__copy { max-width: 620px; }
.auth__eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--accent); margin-bottom: .8rem; }
.auth__headline { color: #fff; font-size: clamp(2rem, 1.1rem + 2.8vw, 3.4rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.auth__lede { color: rgba(255, 255, 255, .86); font-size: 1.08rem; max-width: 48ch; margin-top: 1rem; }
.auth__badges { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.auth__badges li { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .8rem; border-radius: 999px; font-weight: 700; font-size: .84rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.auth__badges .ico { color: var(--accent); }
.auth__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.auth__dots { display: flex; gap: .4rem; }
.auth__dots i { width: 28px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.auth__dots i.is-on::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: dotfill 6s linear forwards; transform-origin: left; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.auth__addr { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255, 255, 255, .82); font-weight: 600; font-size: .9rem; }
.auth__panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem clamp(1.2rem, 4vw, 3.2rem) 4rem;
  background: radial-gradient(60% 40% at 100% 0%, color-mix(in srgb, var(--primary) 9%, transparent), transparent), radial-gradient(50% 35% at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent), var(--bg); }
.auth__card { width: 100%; max-width: 410px; background: #fff; border-radius: 26px; padding: 2.2rem 2rem; border: 1px solid var(--line); box-shadow: 0 30px 60px -32px rgba(15, 26, 46, .35); }
.auth__brand-sm { display: none; margin-bottom: 1.2rem; }
.auth__brand-sm .brand-logo { max-height: 40px; }
.auth__brand-sm .brand-mono { color: var(--ink); }
.auth__pill { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 999px; background: var(--primary-l); color: var(--primary-d); font-weight: 700; font-size: .78rem; margin-bottom: .9rem; }
.auth__card h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: .25rem; }
.auth__card > .muted { margin-bottom: 1.4rem; }
.auth__card .field__control { border-radius: 13px; background: #FAFBFD; }
.auth__card .field__control:focus-within { background: #fff; }
.auth__card .field__control input { padding: .85rem 0; }
.auth__row { display: flex; justify-content: space-between; align-items: center; margin: -.2rem 0 1.1rem; }
.auth__submit { gap: .6rem; background: linear-gradient(110deg, var(--primary-d), var(--primary)); }
.auth__submit .ico { transition: transform .2s; }
.auth__submit:hover .ico { transform: translateX(3px); }
.auth__submit.is-busy { pointer-events: none; opacity: .85; }
.auth__help { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); display: grid; gap: .7rem; color: var(--muted); font-weight: 600; font-size: .9rem; }
.auth__help-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; }
.hbtn { --c: var(--primary); display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .4rem; border-radius: 14px; font-weight: 700; font-size: .82rem; color: color-mix(in srgb, var(--c) 80%, #000); background: color-mix(in srgb, var(--c) 9%, #fff); border: 1px solid color-mix(in srgb, var(--c) 20%, transparent); transition: transform .15s, background .15s; }
.hbtn:hover { text-decoration: none; transform: translateY(-2px); background: color-mix(in srgb, var(--c) 15%, #fff); }
.hbtn .ico { color: var(--c); }
.auth__foot { position: absolute; bottom: 1.2rem; display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .82rem; margin: 0; }
.auth__card .alert { display: flex; gap: .5rem; align-items: flex-start; }

/* ---------- Floating contact widget ---------- */
.cw { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: .8rem; }
.cw__fab { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 50%, var(--accent))); box-shadow: 0 14px 30px -10px var(--primary); transition: transform .2s; position: relative; }
.cw__fab::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); animation: cwpulse 2.6s ease-out infinite; }
@keyframes cwpulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.cw__fab:hover { transform: scale(1.06); }
.cw__fab-close { display: none; }
.cw.is-open .cw__fab-open { display: none; }
.cw.is-open .cw__fab-close { display: block; }
.cw.is-open .cw__fab::before { display: none; }
.cw__panel { width: min(300px, calc(100vw - 36px)); background: #fff; border-radius: 22px; padding: .5rem; box-shadow: 0 30px 60px -20px rgba(15, 26, 46, .45); border: 1px solid var(--line); animation: cwIn .22s ease-out; transform-origin: bottom right; }
@keyframes cwIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.cw__head { padding: .9rem 1rem .8rem; margin: -.5rem -.5rem .4rem; border-radius: 22px 22px 0 0; color: #fff; background: linear-gradient(120deg, var(--ink), var(--primary)); display: grid; }
.cw__head b { font-family: var(--f-title); font-size: 1rem; }
.cw__head span { font-size: .82rem; opacity: .8; }
.cw__item { --c: var(--primary); display: flex; align-items: center; gap: .8rem; padding: .65rem .7rem; border-radius: 14px; color: var(--text); }
.cw__item:hover { background: color-mix(in srgb, var(--c) 8%, #fff); text-decoration: none; }
.cw__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c); flex: none; }
.cw__txt { display: grid; line-height: 1.25; min-width: 0; }
.cw__txt b { font-size: .94rem; }
.cw__txt small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Student profile (v2) ---------- */
.sp { --c: var(--primary); background: var(--surface); border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.2rem; }
.sp__cover { position: relative; height: 128px; overflow: hidden;
  background:
    radial-gradient(35% 140% at 88% 10%, color-mix(in srgb, var(--accent) 80%, transparent), transparent 70%),
    radial-gradient(30% 120% at 45% 120%, color-mix(in srgb, #fff 25%, transparent), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 14px),
    linear-gradient(110deg, color-mix(in srgb, var(--c) 60%, #000), var(--c)); }
.sp__cover-code { position: absolute; right: 1.4rem; bottom: -.9rem; font-family: var(--f-title); font-weight: 800; font-size: 5.4rem; line-height: 1; letter-spacing: -.04em; color: rgba(255, 255, 255, .14); }
.sp__main { display: flex; align-items: flex-end; gap: 1.2rem; padding: 0 1.5rem; flex-wrap: wrap; }
.sp__main .avatar--xl { margin-top: -50px; }
.sp__id { flex: 1; min-width: 240px; padding-top: .8rem; }
.sp__id h1 { font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.9rem); margin-bottom: .55rem; }
.sp__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: .5rem; padding: 1.2rem 1.5rem 1.4rem; }
.act { --c: var(--primary); display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .4rem; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line)); background: color-mix(in srgb, var(--c) 7%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); font-weight: 700; font-size: .84rem; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.act .ico { color: var(--c); }
.act:hover { text-decoration: none; transform: translateY(-2px); background: color-mix(in srgb, var(--c) 13%, #fff); box-shadow: 0 10px 22px -14px var(--c); }
.act.is-busy { opacity: .6; pointer-events: none; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.kpi { --c: var(--primary); position: relative; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.kpi__ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); flex: none; }
.kpi b { display: block; font-family: var(--f-title); font-size: 1.18rem; line-height: 1.2; }
.kpi span { color: var(--muted); font-size: .84rem; font-weight: 600; }
.kpi__bar { position: absolute; left: 1.1rem; right: 1.1rem; bottom: .55rem; height: 4px; border-radius: 4px; background: var(--bg); }
.kpi__bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c); }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.sp-grid .stack > .panel { margin-bottom: 1.2rem; }
.sp-grid .fact { grid-template-columns: 130px 1fr; padding: .75rem 0; }
.sp-grid .fact dt { font-size: .9rem; }
.paycards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.paycard { position: relative; display: grid; gap: .2rem; padding: 1rem; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--muted); }
.paycard__n { position: absolute; top: .7rem; right: .8rem; font-family: var(--f-title); font-weight: 800; font-size: 1.6rem; line-height: 1; opacity: .15; }
.paycard__label { font-weight: 700; font-size: .84rem; }
.paycard__amt { font-family: var(--f-title); font-size: 1.05rem; color: var(--text); }
.paycard__state { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 700; }
.paycard.is-paid { border: 1.5px solid color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 7%, #fff); }
.paycard.is-paid .paycard__state { color: #0B7A57; }
.paycard.is-paid .paycard__n { color: var(--ok); opacity: .35; }
.course { grid-template-columns: 64px 1fr 22px; }
.seg--full { display: flex; width: 100%; margin-bottom: .7rem; }
.seg--full label { flex: 1; }
.seg--full span { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.seg input:disabled + span { opacity: .4; cursor: not-allowed; }
.qm select, .qm textarea, .qm__subject { width: 100%; margin-bottom: .6rem; }
.qm__subject { border: 1.5px solid var(--line); border-radius: 12px; padding: .65rem .85rem; font-weight: 600; }
.qm__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .4rem; }
.qm.is-flash { box-shadow: 0 0 0 4px var(--primary-l), var(--shadow); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.timeline__item { --c: #FF9F1C; display: grid; grid-template-columns: 32px 1fr; gap: .7rem; position: relative; padding-bottom: .8rem; }
.timeline__item--email { --c: #E8590C; }
.timeline__item:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px; background: var(--line); }
.timeline__dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); }
.timeline__top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.timeline__top b { font-size: .92rem; }
.timeline__body p { margin: .2rem 0; font-size: .9rem; color: var(--text); }
.timeline__body small { font-size: .78rem; }

/* PDF sheet (rendered off-screen, captured by html2pdf) */

/* ---------- Intake bulk select ---------- */
.table .cbx { width: 40px; padding-right: 0; }
.table .cbx input, [data-check-all] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.bulkbar { position: sticky; top: 72px; z-index: 12; display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; margin-bottom: .7rem; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .5); animation: toastIn .2s ease-out; }
.bulkbar[hidden] { display: none; }
.bulkbar b { margin-right: auto; }

/* ---------- Messages ---------- */
.setup-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chipstat { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; font-weight: 700; font-size: .84rem; color: #9B1C1F; background: #FDECEC; }
.chipstat.is-ok { color: #0B7A57; background: color-mix(in srgb, var(--ok) 12%, #fff); }
.chipstat:hover { text-decoration: none; }
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.compose__side { position: sticky; top: 84px; display: grid; gap: .8rem; }
.compose__hint { font-size: .84rem; margin: 0; }
.stepttl { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.stepttl span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: .85rem; }
.rcount { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .8rem 1rem; border-radius: 14px; background: var(--bg); font-weight: 600; color: var(--muted); }
.rcount.is-ready { background: var(--primary-l); color: var(--primary-d); }
.rcount b { font-family: var(--f-title); }
.picked { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: 14px; background: var(--primary-l); color: var(--primary-d); }
.picked .muted { flex: 1; min-width: 160px; font-size: .88rem; }
.chcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.chcard { --c: var(--primary); cursor: pointer; }
.chcard input { position: absolute; opacity: 0; }
.chcard > span { display: grid; gap: .2rem; padding: 1rem; border-radius: 16px; border: 1.5px solid var(--line); height: 100%; transition: border-color .15s, background .15s; }
.chcard .ico { color: var(--c); margin-bottom: .2rem; }
.chcard small { color: var(--muted); font-weight: 600; }
.chcard input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent); }
.chcard input:focus-visible + span { outline: 3px solid var(--primary-l); }
.phs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: -.4rem 0 .6rem; }
.ph { border: 1px dashed color-mix(in srgb, var(--primary) 40%, var(--line)); background: var(--primary-l); color: var(--primary-d); border-radius: 8px; padding: .2rem .55rem; font-size: .8rem; font-weight: 700; cursor: pointer; }
.ph:hover { background: var(--primary); color: #fff; }
.compose__meta { margin-bottom: .6rem; }
.phone { border-radius: 34px; padding: 10px; background: #0F1A2E; box-shadow: 0 30px 50px -28px rgba(15, 26, 46, .7); }
.phone__bar { text-align: center; color: #fff; font-weight: 700; font-size: .85rem; padding: .7rem 0 .6rem; }
.phone__screen { background: #EEF1F7; border-radius: 24px; min-height: 300px; max-height: 460px; overflow-y: auto; padding: 1rem .8rem; }
.bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: .7rem .85rem; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; box-shadow: 0 2px 6px rgba(15, 26, 46, .06); }
.bubble__subj { display: block; font-weight: 800; margin-bottom: .3rem; color: var(--primary-d); }
.batch .progress { margin: .4rem 0 1rem; }
.progress { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg); }
.progress i { display: block; height: 100%; width: var(--w); transition: width .4s ease; }
.progress i:first-child { background: linear-gradient(90deg, #12B886, #38D9A9); }
.progress i:nth-child(2) { background: #E5383B; }
.progress--sm { height: 6px; }
.batch__note { margin-top: .8rem; font-weight: 600; }
.table--plain tbody tr { cursor: default; }
.msgcell { max-width: 380px; color: var(--muted); font-size: .9rem; }
.batchlist { display: grid; gap: .6rem; }
.batchrow { display: grid; grid-template-columns: 42px minmax(0, 1fr) 220px 20px; gap: .9rem; align-items: center; padding: .8rem 1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.batchrow:hover { text-decoration: none; border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.batchrow__ic { --c: var(--primary); width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); }
.batchrow__txt { display: grid; min-width: 0; line-height: 1.3; }
.batchrow__txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batchrow__txt small, .batchrow__bar small { color: var(--muted); font-size: .8rem; }
.batchrow__bar { display: grid; gap: .3rem; }
.tpls { display: grid; gap: .7rem; }
.tpl { padding: .9rem 1rem; border-radius: 16px; border: 1px solid var(--line); }
.tpl__top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.tpl p { color: var(--muted); font-size: .9rem; white-space: pre-line; }
.tpl__act { display: flex; gap: .4rem; align-items: center; }
.credits { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--ok) 9%, #fff); color: #0B7A57; font-weight: 600; }
.credits[hidden] { display: none; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-grid { grid-template-columns: minmax(0, 1fr); }
  .compose { grid-template-columns: minmax(0, 1fr); }
  .compose__side { position: static; }
  .phone__screen { min-height: 160px; }
}
@media (max-width: 1024px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__show { min-height: 360px; }
  .auth__lede, .auth__addr { display: none; }
  .auth__panel { padding-bottom: 3.5rem; }
  .auth__card { margin-top: -70px; position: relative; z-index: 2; }
}
@media (max-width: 760px) {
  .auth__show { min-height: 330px; }
  .auth__headline { font-size: 1.8rem; }
  .auth__badges li:nth-child(n+3) { display: none; }
  .auth__card { padding: 1.6rem 1.3rem; border-radius: 22px; }
  .auth__clock em { display: none; }
  .sp__main { padding: 0 1rem; }
  .sp__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1rem; }
  .sp__cover-code { font-size: 3.6rem; }
  .paycards, .chcards, .form--grid-3 { grid-template-columns: minmax(0, 1fr); }
  .kpis { gap: .6rem; }
  .kpi { padding: .8rem; }
  .kpi__ic { width: 36px; height: 36px; }
  .batchrow { grid-template-columns: 38px minmax(0, 1fr) 16px; }
  .batchrow__bar { grid-column: 2 / 3; }
  .table .cbx { display: block; position: absolute; top: .9rem; right: .9rem; width: auto; padding: 0; border: 0; }
  .table td.cbx::before { display: none; }
  .bulkbar { top: 64px; }
}
@media print {
  .sp__actions, .qm, .kpis, .cw, .bulkbar { display: none !important; }
}
.toast--float { position: fixed; top: 18px; right: 18px; z-index: 100; max-width: min(420px, calc(100vw - 36px)); }
.table tbody tr.is-picked { background: var(--primary-l); }
@media print {
  body.print-pdf .sidebar, body.print-pdf .topbar, body.print-pdf .foot, body.print-pdf .content > *:not(.pdfwrap) { display: none !important; }
  body.print-pdf .content { padding: 0; }
  body.print-pdf .pdfwrap { position: static; width: auto; }
  body.print-pdf .pdf { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 760px) { .login-body .cw { display: none; } }

/* ==========================================================
   Version 2.1: campus photos in the dashboard, system update
   ========================================================== */
.media { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -1; }
.media__slide { position: absolute; inset: 0; background-size: cover; background-position: center 30%; opacity: 0; transform: scale(1.05); transition: opacity 1.4s ease, transform 10s ease-out; }
.media__slide.is-on { opacity: 1; transform: scale(1); }
.media::after { content: ""; position: absolute; inset: 0; }

/* Search banner: photo on the right fading into the brand blue, with the light rays from the Facebook banner */
.hero--photo { background: var(--primary-d); min-height: 330px; display: flex; flex-direction: column; justify-content: center; }
.hero--photo .media::after {
  background:
    repeating-conic-gradient(from 0deg at 12% 55%, rgba(255, 255, 255, .055) 0deg 5deg, transparent 5deg 13deg),
    radial-gradient(45% 70% at 100% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
    linear-gradient(95deg, var(--primary-d) 0%, color-mix(in srgb, var(--primary) 94%, transparent) 36%, color-mix(in srgb, var(--primary) 55%, transparent) 62%, rgba(10, 18, 36, .15) 100%);
}
.hero--photo h1, .hero--photo .hero__sub, .hero--photo .hero__hi { text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero--compact.hero--photo { min-height: 260px; }
.hero__badges { list-style: none; padding: 0; margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.hero__badges li { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .7rem; border-radius: 999px; font-weight: 700; font-size: .8rem; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero__badges .ico { color: var(--accent); }

/* Intake banner: photo tinted with the intake colour */
.intake-hero--photo { position: relative; isolation: isolate; background: var(--c); }
.intake-hero--photo .media::after {
  background:
    radial-gradient(40% 90% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    linear-gradient(100deg, color-mix(in srgb, var(--c) 70%, #000) 0%, color-mix(in srgb, var(--c) 88%, transparent) 45%, color-mix(in srgb, var(--c) 45%, transparent) 100%);
}

/* Student cover */
.sp__cover--photo { isolation: isolate; height: 150px; }
.sp__cover--photo .media { z-index: 0; border-radius: 0; }
.sp__cover--photo .media::after { background: linear-gradient(100deg, color-mix(in srgb, var(--c) 82%, #000) 0%, color-mix(in srgb, var(--c) 70%, transparent) 55%, color-mix(in srgb, var(--accent) 35%, transparent) 100%); }
.sp__cover--photo .sp__cover-code { z-index: 1; color: rgba(255, 255, 255, .22); }

/* System update */
.tabs .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--err); margin-left: .3rem; vertical-align: middle; }
.sys__ver { display: flex; align-items: center; gap: 1rem 2.4rem; flex-wrap: wrap; }
.sys__ver form { margin-left: auto; }
.sys__vbox { display: grid; gap: .15rem; justify-items: start; }
.sys__vlabel { color: var(--muted); font-weight: 600; font-size: .82rem; }
.sys__vbox b { font-family: var(--f-title); font-size: 1.35rem; }
.sys__vbox b.sys__small { font-size: .95rem; font-family: var(--f-text); }
.backups { list-style: none; margin: 0; padding: 0; display: grid; }
.backups li { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.backups li:last-child { border-bottom: 0; }
.backups__txt { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.backups__txt b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backups__txt small { color: var(--muted); font-size: .78rem; }
.backups form { display: flex; gap: .3rem; }
.backups .iconbtn { width: 34px; height: 34px; }
.syschecks { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-weight: 600; }
.syschecks li { display: flex; align-items: center; gap: .5rem; }
.syschecks .ok .ico { color: var(--ok); }
.syschecks .bad { color: var(--err); }

@media (max-width: 760px) {
  .hero--photo { min-height: 300px; }
  .hero--photo .media__slide { background-position: 70% 30%; }
  .hero--photo .media::after {
    background:
      radial-gradient(60% 50% at 100% 0%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%),
      linear-gradient(180deg, color-mix(in srgb, var(--primary) 55%, transparent) 0%, color-mix(in srgb, var(--primary-d) 92%, transparent) 55%, var(--primary-d) 100%);
  }
  .hero__badges li:nth-child(n+3) { display: none; }
  .sys__ver form { margin-left: 0; width: 100%; }
}
.diag { display: grid; gap: .6rem; margin-top: .8rem; }
.diag__row { display: grid; grid-template-columns: 200px 140px 1fr; gap: .8rem; align-items: start; padding: .7rem .9rem; border-radius: 12px; background: #FDECEC; }
.diag__row.is-ok { background: color-mix(in srgb, var(--ok) 10%, #fff); }
.diag__row b { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.diag__row span { color: var(--muted); font-weight: 600; font-size: .86rem; }
.diag__row code { font-size: .78rem; word-break: break-all; white-space: pre-wrap; }
@media (max-width: 760px) { .diag__row { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- Student header v2.2: everything sits on the cover photo ---------- */
.sp__cover, .sp__cover--photo { height: auto; min-height: 220px; display: flex; align-items: flex-end; padding: 1.6rem 1.6rem 1.4rem; isolation: isolate; }
.sp__cover-code { top: .2rem; bottom: auto; right: 1.4rem; font-size: 5.6rem; color: rgba(255, 255, 255, .13); z-index: 1; }
.sp__cover--photo .media::after { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 35%, transparent) 0%, color-mix(in srgb, var(--c) 70%, #000) 72%, color-mix(in srgb, var(--c) 55%, #000) 100%), linear-gradient(90deg, rgba(10, 18, 36, .35), transparent 60%); }
.sp__head { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 1.2rem; width: 100%; flex-wrap: wrap; color: #fff; }
.sp__avatar { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; flex: none; font-family: var(--f-title); font-weight: 700; font-size: 2.1rem; color: #fff; background: linear-gradient(140deg, var(--c), var(--accent)); border: 4px solid rgba(255, 255, 255, .9); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .55); }
.sp__id { flex: 1; min-width: 240px; padding-top: 0; }
.sp__id h1 { color: #fff; font-size: clamp(1.4rem, 1.05rem + 1.3vw, 2.1rem); margin-bottom: .6rem; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.gtag { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; white-space: nowrap; }
.gtag:hover { background: rgba(255, 255, 255, .26); text-decoration: none; color: #fff; }
.gtag--solid { background: #fff; color: var(--ink); border-color: #fff; }
.gtag--solid:hover { background: #fff; color: var(--primary); }
.gtag.is-done { background: var(--ok); color: #fff; }
.sp__paid { margin-left: auto; display: grid; gap: .25rem; min-width: 200px; padding: .9rem 1.1rem; border-radius: 18px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sp__paid span { font-size: .8rem; font-weight: 700; opacity: .85; }
.sp__paid b { font-family: var(--f-title); font-size: 1.55rem; line-height: 1.1; }
.sp__paid small { font-size: .78rem; font-weight: 600; opacity: .85; }
.sp__paid-bar { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: .2rem; }
.sp__paid-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38D9A9, #12B886); }
.sp__bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap; padding: 1rem 1.6rem; }
.sp__acts { display: flex; flex-wrap: wrap; gap: .5rem; }
.pact { --c: var(--primary); display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 999px; font-weight: 700; font-size: .88rem; cursor: pointer; color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 8%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 24%, var(--line)); transition: background .15s, transform .15s, box-shadow .15s; }
.pact .ico { color: var(--c); }
.pact:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 14%, #fff); transform: translateY(-1px); box-shadow: 0 8px 18px -12px var(--c); }
.pact.is-busy { opacity: .6; pointer-events: none; }
.credits.is-bad { background: #FDECEC; color: #9B1C1F; }
@media (max-width: 760px) {
  .sp__cover, .sp__cover--photo { padding: 1.2rem; min-height: 0; padding-top: 4.5rem; }
  .sp__cover-code { font-size: 3.6rem; }
  .sp__head { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .sp__avatar { width: 76px; height: 76px; font-size: 1.7rem; border-radius: 22px; }
  .sp__id { min-width: 0; width: 100%; }
  .sp__paid { margin-left: 0; width: 100%; }
  .sp__bar { padding: 1rem; }
  .sp__acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .pact { justify-content: center; }
  .pact:last-child:nth-child(odd) { grid-column: span 2; }
  .sp__bar > .btn { width: 100%; }
}

/* ---------- PDF student record (A4 = 794 × 1123 px). Plain colours only: html2canvas can't read color-mix ---------- */
.pdfwrap { position: fixed; left: -10000px; top: 0; width: 794px; }
.pdf { position: relative; width: 794px; height: 1123px; overflow: hidden; background: #fff; color: #172036; font-family: var(--f-text); font-size: 13px; display: flex; flex-direction: column; }
.pdf__mark { position: absolute; left: 50%; top: 560px; width: 420px; height: 560px; margin-left: -210px; background-size: contain; background-repeat: no-repeat; background-position: center; opacity: .035; }
.pdf__cover { position: relative; height: 250px; color: #fff; overflow: hidden; background: var(--p-d); }
.pdf__photo { position: absolute; inset: 0; background-size: cover; background-position: center 35%; }
.pdf__shade { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 18, 36, .94) 0%, rgba(10, 18, 36, .78) 40%, rgba(10, 18, 36, .35) 100%); }
.pdf__glow { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(10, 18, 36, .55) 100%); }
.pdf__top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; padding: 28px 40px 0; }
.pdf__brand img { height: 50px; width: auto; display: block; }
.pdf__brand b { font-family: var(--f-title); font-size: 24px; }
.pdf__doc { text-align: right; display: grid; gap: 4px; }
.pdf__doc span { display: inline-block; justify-self: end; padding: 6px 14px; border-radius: 999px; background: var(--acc); color: #0F1A2E; font-family: var(--f-title); font-weight: 700; font-size: 11px; letter-spacing: .12em; }
.pdf__doc small { font-size: 11px; color: #D6DCEA; font-weight: 600; }
.pdf__who { position: absolute; left: 40px; right: 40px; bottom: 26px; display: flex; align-items: center; gap: 18px; }
.pdf__avatar { width: 78px; height: 78px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-family: var(--f-title); font-weight: 700; font-size: 26px; color: #fff; background: linear-gradient(140deg, var(--c), var(--acc)); border: 3px solid #fff; flex: none; }
.pdf__who h1 { color: #fff; font-size: 27px; line-height: 1.15; margin: 0 0 8px; }
.pdf__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf__chip { padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.pdf__chip--id { background: #fff; color: #0F1A2E; border-color: #fff; }
.pdf__ribbon { display: flex; height: 7px; }
.pdf__ribbon i { flex: 1; }
.pdf__tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 40px 0; }
.pdf__tile { display: grid; gap: 4px; padding: 13px 14px; border-radius: 14px; border-left: 4px solid; }
.pdf__tile span { font-size: 11px; font-weight: 700; }
.pdf__tile b { font-family: var(--f-title); font-size: 16px; color: #172036; }
.pdf__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; margin: 16px 40px 0; }
.pdf__box { position: relative; background: #fff; border: 1px solid #E3E7F0; border-radius: 16px; padding: 16px 18px; }
.pdf__box--wide { margin: 16px 40px 0; }
.pdf__box h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; color: #172036; font-weight: 700; }
.pdf__box h2 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pdf__box table { width: 100%; border-collapse: collapse; }
.pdf__box th { text-align: left; color: #677189; font-weight: 600; width: 30%; padding: 7px 0; vertical-align: top; border-bottom: 1px dashed #EDF0F6; }
.pdf__box td { padding: 7px 0; font-weight: 700; word-break: break-all; border-bottom: 1px dashed #EDF0F6; }
.pdf__box tr:last-child th, .pdf__box tr:last-child td { border-bottom: 0; }
.pdf__courses { display: grid; gap: 8px; }
.pdf__course { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px dashed #DDE2EC; color: #98A1B5; }
.pdf__course b { font-family: var(--f-title); font-size: 11px; text-align: center; padding: 4px 0; border-radius: 7px; background: #EEF1F6; color: #8A93A8; }
.pdf__course span { font-size: 12px; font-weight: 600; }
.pdf__course em { font-style: normal; font-size: 10.5px; font-weight: 800; }
.pdf__course.on { border-style: solid; color: #172036; }
.pdf__course.on b { color: #fff; }
.pdf__steps { display: flex; align-items: center; gap: 10px; }
.pdf__step { flex: 1; display: grid; justify-items: start; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px dashed #DDE2EC; color: #98A1B5; }
.pdf__step small { font-size: 11px; font-weight: 700; }
.pdf__step b { font-family: var(--f-title); font-size: 15px; }
.pdf__dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: #EEF1F6; color: #98A1B5; }
.pdf__step.on { background: #EAFAF3; border: 1px solid #9FE3C8; color: #0B7A57; }
.pdf__step.on .pdf__dot { background: #12B886; color: #fff; }
.pdf__line { width: 18px; height: 3px; border-radius: 3px; background: #E3E7F0; flex: none; }
.pdf__line.on { background: #12B886; }
.pdf__total { flex: 1.1; display: grid; gap: 3px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, #0F1A2E, var(--p)); color: #fff; }
.pdf__total small { font-size: 11px; font-weight: 700; color: #C9D3EA; }
.pdf__total b { font-family: var(--f-title); font-size: 18px; }
.pdf__progress { height: 8px; border-radius: 8px; background: #EEF1F6; margin-top: 14px; overflow: hidden; }
.pdf__progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38D9A9, #12B886); }
.pdf__note { margin: 8px 0 0; font-size: 11.5px; font-weight: 600; color: #677189; }
.pdf__sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: auto 40px 22px; }
.pdf__sign div { display: grid; gap: 6px; }
.pdf__sign span { border-bottom: 1.5px dashed #B8C0D0; height: 38px; }
.pdf__sign small { color: #677189; font-size: 11px; font-weight: 600; }
.pdf__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 40px; color: #fff; background: linear-gradient(100deg, #0F1A2E, var(--p)); }
.pdf__foot div { display: grid; gap: 2px; }
.pdf__foot b { font-family: var(--f-title); font-size: 13px; }
.pdf__foot span { font-size: 11px; color: #D6DCEA; }
.pdf__foot small { font-size: 10.5px; color: #C9D3EA; text-align: right; }
