/* Blue, white & black theme (design B) — the last stylesheet, so it wins.
   White surfaces, a solid college-blue header band, a white sidebar with a
   black marker on the current page, black accent rules, sans-serif type. Layout is unchanged; this
   only restyles through tokens and a few component rules. */

:root {
  --maroon: #0b3d91; --maroon-2: #082f70; --maroon-3: #05204d;
  --gold-h: #111111; --gold-soft: #e8eefb; --gold-ink: #111827;
  --accent: var(--maroon); --accent-2: var(--maroon-2); --accent-soft: #e9f0fd; --accent-ink: var(--maroon-2);
  --ink: #0b0b0f; --ink-2: #2a2f3a; --slate: #5b6475;
  --paper: #f4f7fc; --paper-2: #eaf0f8; --card: #ffffff; --line: #dfe5f0; --line-dark: #c7d1e3;
  --gold: var(--gold-h); --gold-light: #7fa7ec;
  --success: #2f6b3a; --success-bg: #e7f0e2; --danger: #a12b2b; --danger-bg: #f8e4e1; --warn: #8a5a12; --warn-bg: #f7ecd4;
  --sidebar-bg: #ffffff; --sidebar-fg: var(--ink); --series-1: var(--maroon);
  --shadow: 0 1px 0 rgba(11, 61, 145, .04), 0 1px 3px rgba(10, 20, 40, .06);
  --shadow-lg: 0 18px 40px -18px rgba(5, 20, 50, .35);
  --brand-text: var(--maroon);
  /* a chosen item or an unread one: plain grey, never a colour */
  --pick: #f2f4f7; --pick-line: #c9ced6;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --kolam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.28' stroke-width='1.2'%3E%3Cpath d='M28 6c12 0 22 10 22 22S40 50 28 50 6 40 6 28 16 6 28 6z'/%3E%3Cpath d='M28 16l12 12-12 12-12-12z'/%3E%3Cpath d='M0 28c6 0 10-4 10-10M56 28c-6 0-10-4-10-10M0 28c6 0 10 4 10 10M56 28c-6 0-10 4-10 10'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.45'%3E%3Ccircle cx='28' cy='28' r='1.8'/%3E%3Ccircle cx='0' cy='0' r='1.8'/%3E%3Ccircle cx='56' cy='0' r='1.8'/%3E%3Ccircle cx='0' cy='56' r='1.8'/%3E%3Ccircle cx='56' cy='56' r='1.8'/%3E%3Ccircle cx='28' cy='0' r='1.2'/%3E%3Ccircle cx='28' cy='56' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
  --flourish: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M2 6h46M72 6h46' stroke='%23111111' stroke-width='1.2'/%3E%3Cpath d='M60 1l5 5-5 5-5-5z' fill='%23111111'/%3E%3Ccircle cx='50' cy='6' r='1.6' fill='%23111111'/%3E%3Ccircle cx='70' cy='6' r='1.6' fill='%23111111'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #8ab4ff; --accent-2: #a9c8ff; --accent-soft: #14223f; --accent-ink: #c9dbff;
    --ink: #eef2f8; --ink-2: #cdd5e3; --slate: #93a0b8;
    --paper: #0a0d14; --paper-2: #121827; --card: #0f1420; --line: #1f2a3d; --line-dark: #2b3a54;
    --gold: #7fa7ec; --gold-light: #a9c8ff; --gold-soft: #16233f; --gold-ink: #a9c8ff;
    --success: #8fd19a; --success-bg: #18301c; --danger: #f29a92; --danger-bg: #3b1816; --warn: #e9c77c; --warn-bg: #352812;
    --sidebar-bg: #0c111c; --sidebar-fg: #eef2f8; --series-1: #8ab4ff; --shadow: none; --gold-h: #8ab4ff; --brand-text: #9cc0ff;
    --pick: #1b1f27; --pick-line: #3a404c;
  }
}
:root[data-theme="dark"] {
  --accent: #8ab4ff; --accent-2: #a9c8ff; --accent-soft: #14223f; --accent-ink: #c9dbff;
  --ink: #eef2f8; --ink-2: #cdd5e3; --slate: #93a0b8;
  --paper: #0a0d14; --paper-2: #121827; --card: #0f1420; --line: #1f2a3d; --line-dark: #2b3a54;
  --gold: #7fa7ec; --gold-light: #a9c8ff; --gold-soft: #16233f; --gold-ink: #a9c8ff;
  --success: #8fd19a; --success-bg: #18301c; --danger: #f29a92; --danger-bg: #3b1816; --warn: #e9c77c; --warn-bg: #352812;
  --sidebar-bg: #0c111c; --sidebar-fg: #eef2f8; --series-1: #8ab4ff; --shadow: none; --gold-h: #8ab4ff; --brand-text: #9cc0ff;
    --pick: #1b1f27; --pick-line: #3a404c;
}

/* ---------- type ---------- */
h1, h2, h3, h4, .display, .stat-card .stat-value, .ring .ring-inner b, .id-role-name, .notice h4, .dept-group-title h4, .hero h1 {
  font-family: var(--serif); letter-spacing: -0.005em;
}
.topbar h1 { font-size: 28px; font-weight: 600; }
.card h3 { font-size: 16.5px; font-weight: 600; }
.stat-card .stat-value { font-weight: 600; }

/* ---------- crest ---------- */
.crest {
  background: radial-gradient(circle at 50% 35%, #1a5cc8, var(--maroon-3)) !important; color: #ffffff !important;
  border-radius: 50% !important; box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px var(--gold-h); font-family: var(--serif) !important; font-weight: 700 !important;
}
.crest.has-logo { box-shadow: none; background: transparent !important; }

/* ---------- sidebar: cream ledger with gold accents ---------- */
.sidebar { background: var(--sidebar-bg); border-right: 1px solid var(--line); }
.sidebar .brand { border-bottom: 1px solid var(--line); position: relative; }
.sidebar .brand::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -4px; height: 8px; background: var(--flourish) center / 110px 10px no-repeat; }
.sidebar .brand-name b { font-family: var(--serif); font-size: 17px; color: var(--brand-text); }
.sidebar .brand-name span { color: var(--gold-ink); letter-spacing: .14em; }
.nav-item { color: var(--ink-2); border-radius: 0 8px 8px 0; border-left: 3px solid transparent; }
.nav-item .ico { color: var(--gold-ink); opacity: .85; }
.nav-item:hover { background: var(--paper-2); color: var(--ink); }
.nav-item.active { background: linear-gradient(90deg, var(--accent-soft), transparent); color: var(--brand-text); border-left-color: var(--gold-h); font-weight: 600; }
.nav-item.active .ico { color: var(--brand-text); opacity: 1; }
.nav-group { color: var(--gold-ink); font-family: var(--serif); font-size: 11px; letter-spacing: .14em; display: flex; align-items: center; gap: 8px; }
.nav-group::before { content: '◆'; font-size: 7px; color: var(--gold-h); }
.nav-group::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- maroon header band with kolam pattern ---------- */
.main > .appbar {
  margin: -22px -36px 26px; padding: 14px 36px; position: relative;
  background: var(--kolam) 0 0 / 56px 56px, linear-gradient(120deg, #1452b8, var(--maroon) 45%, var(--maroon-3));
  border-bottom: 3px solid var(--gold-h);
}
.main > .appbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 3px; background: repeating-linear-gradient(90deg, var(--gold-h) 0 10px, transparent 10px 16px); opacity: .55; }
.appbar .jump input { background: rgba(255, 250, 240, .96); border-color: transparent; }
.appbar .bell-btn, .appbar .profile-btn { background: rgba(255, 250, 240, .12); border: 1px solid rgba(255, 255, 255, .45); color: #ffffff; box-shadow: none; }
.appbar .bell-btn:hover, .appbar .profile-btn:hover { background: rgba(255, 250, 240, .2); }
.appbar .profile-role, .appbar .caret { color: #cfdcf7; }
.appbar .avatar { background: #ffffff; color: var(--maroon-3); font-family: var(--serif); }
.appbar .bell-count { background: #ffffff; color: var(--maroon-3); }

/* ---------- greeting with flourish ---------- */
.home-top h1 { font-size: 32px; color: var(--brand-text); }
.home-top h1::after { content: ''; display: block; width: 120px; height: 12px; margin-top: 8px; background: var(--flourish) left center / 120px 12px no-repeat; }
:root[data-theme="dark"] .home-top h1 { color: var(--ink); }

/* ---------- cards: paper with a gold rule ---------- */
.card, .stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.stat-card { position: relative; overflow: hidden; }
.stat-card::after { content: '◆'; position: absolute; right: 14px; top: 10px; font-size: 9px; color: var(--gold-light); opacity: .7; }
.stat-card .stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-ink); font-weight: 600; }
.stat-card .stat-value { color: var(--brand-text); font-size: 30px; }
:root[data-theme="dark"] .stat-card .stat-value { color: var(--ink); }
.home-card { }
.home-card-head h3 { color: var(--brand-text); }
:root[data-theme="dark"] .home-card-head h3 { color: var(--ink); }

/* ---------- tables ---------- */
th { background: var(--paper-2); color: var(--gold-ink); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; border-bottom: 1px solid var(--line-dark); }
td { border-bottom-color: var(--line); }
tbody tr:hover td, table tr:hover td { background: color-mix(in srgb, var(--gold-soft) 45%, transparent); }

/* ---------- controls ---------- */
.btn { background: var(--card); border: 1px solid var(--line-dark); color: var(--ink); border-radius: 8px; }
.btn:hover { background: var(--paper-2); border-color: var(--gold-h); }
.btn.primary { background: linear-gradient(180deg, #1452b8, var(--maroon-2)); border-color: var(--maroon-2); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover { background: var(--maroon-3); border-color: var(--maroon-3); }
.btn.danger { color: var(--danger); }
.submit-btn { background: linear-gradient(180deg, #1452b8, var(--maroon-2)) !important; color: #ffffff !important; }
.badge.ok { border: 1px solid color-mix(in srgb, var(--success) 25%, transparent); }
.badge.warn { border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.badge.danger { border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.pill { background: var(--gold-soft); color: var(--gold-ink); }
.toggle.on { background: var(--maroon); }
.progress span { background: linear-gradient(90deg, var(--gold-h), var(--maroon)); }
.field input:focus, .field select:focus, .field textarea:focus, .modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus, .filter-bar input:focus, .filter-bar select:focus, .jump input:focus {
  border-color: var(--gold-h) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-h) 22%, transparent);
}

/* ---------- home pieces ---------- */
.task { background: var(--paper); border: 1px solid var(--line); }
.task:hover { border-color: var(--gold-h); background: var(--card); }
.task-count { font-family: var(--serif); color: var(--brand-text); font-size: 18px; }
:root[data-theme="dark"] .task-count { color: var(--ink); }
.quick-btn { background: var(--paper); border-color: var(--line); }
.quick-btn .ico { color: var(--brand-text); }
.quick-btn:hover { border-color: var(--gold-h); background: var(--gold-soft); }
.date-chip { background: var(--maroon); color: #ffffff; }
.date-chip span { color: #cfdcf7; }
.tl-time { color: var(--brand-text); font-family: var(--serif); }
.timeline li button { border-radius: 10px; }
.all-clear { color: var(--gold-ink); }

/* ---------- modals & toasts ---------- */
.modal { background: var(--card); }
.modal h3 { color: var(--brand-text); }
:root[data-theme="dark"] .modal h3 { color: var(--ink); }
.modal-overlay { background: rgba(5, 12, 30, .5); }
.toast { background: var(--maroon-3); color: #ffffff; }

/* ---------- landing & sign-in ---------- */
.landing-header { background: var(--kolam) 0 0 / 56px 56px, linear-gradient(120deg, #1452b8, var(--maroon) 45%, var(--maroon-3)); border-bottom: 3px solid var(--gold-h); }
.landing-header .brand-name b { color: #ffffff; font-family: var(--serif); }
.landing-header .brand-name span { color: #cfdcf7; }
.landing-header .header-link, .landing-header .lang-header { color: #ffffff; border-color: rgba(255, 255, 255, .5); background: transparent; }
.landing-header .header-link:hover { background: rgba(255, 250, 240, .12); }
.apply-cta { background: #ffffff !important; color: var(--maroon-3) !important; }
.hero h1 { color: var(--brand-text); font-weight: 600; }
.hero h1::after { content: ''; display: block; width: 120px; height: 12px; margin-top: 14px; background: var(--flourish) left center / 120px 12px no-repeat; }
.eyebrow { color: var(--gold-ink) !important; letter-spacing: .16em; }
.id-stripe { background: linear-gradient(90deg, var(--maroon), var(--gold-h)) !important; }
.id-btn:hover { background: var(--maroon) !important; color: #ffffff !important; }
.login-box { background: var(--card); }
.login-box h2 { color: var(--brand-text); }
.login-role-tag { background: var(--gold-soft) !important; color: var(--gold-ink) !important; }
.site-banner { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- ID card & certificates feel ---------- */
.id-head { background: var(--kolam) 0 0 / 56px 56px, linear-gradient(120deg, #1452b8, var(--maroon-3)); border-bottom: 2px solid var(--gold-h); }
.id-head .crest { width: 34px; height: 34px; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--gold-h); }
.cal-item.event { background: var(--gold-soft); color: var(--gold-ink); }
.notice { border-left-color: var(--gold-h); }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .main > .appbar { margin: -16px -16px 18px; padding: 12px 16px; }
  .sidebar { background: var(--kolam) 0 0 / 56px 56px, linear-gradient(120deg, #1452b8, var(--maroon-3)); border-bottom: 2px solid var(--gold-h); }
  .sidebar .brand-name b { color: #ffffff; }
  .sidebar .brand-name span { color: #cfdcf7; }
  .sidebar .brand::after { display: none; }
  .menu-toggle span { background: #ffffff; }
  .sidebar.open { background: var(--sidebar-bg); }
  .sidebar.open .brand-name b { color: var(--brand-text); }
  .sidebar.open .menu-toggle span { background: var(--ink); }
}
@media print { .main > .appbar { display: none !important; } }

.landing-header .header-actions { flex-wrap: nowrap; }
.landing-header .lang-header { flex: 0 0 auto; width: auto; padding: 8px 10px; }
.landing-header .lang-header option { color: #0b0b0f; }
@media (max-width: 860px) { .landing-header .header-actions { flex-wrap: wrap; } }

/* Design B: one clean black rule under the blue header band. */
.main > .appbar::after { display: none; }

/* Phones: the menu bar and the header band read as one blue band. */
@media (max-width: 860px) {
  .sidebar:not(.open) { border-bottom: none; }
  .main > .appbar { margin-top: -16px; padding-top: 4px; background-position: 0 -40px, 0 0; }
}

/* ---------- plain design B: no pattern, no ornaments, no serif ---------- */
:root { --serif: 'Inter', system-ui, sans-serif; --kolam: none; --flourish: none; }
.main > .appbar, .landing-header, .id-head { background: #0b3d91; }
.sidebar .brand::after, .home-top h1::after, .hero h1::after { display: none; }
.nav-group::before, .stat-card::after { content: none; }
.nav-group { font-family: inherit; letter-spacing: .1em; font-size: 10.5px; }
.crest { background: #0b3d91 !important; color: #fff !important; box-shadow: none; font-family: inherit !important; border-radius: 10px !important; }
.btn.primary, .submit-btn { background: #0b3d91 !important; box-shadow: none; }
.btn.primary:hover { background: #082f70 !important; }
.home-top h1 { font-size: 28px; font-weight: 700; }
.topbar h1, .card h3, .stat-card .stat-value, .hero h1 { font-weight: 700; letter-spacing: -0.015em; }
.tl-time, .task-count { font-family: inherit; }
@media (max-width: 860px) { .sidebar:not(.open) { background: #0b3d91; } }
:root[data-theme="dark"] .main > .appbar, :root[data-theme="dark"] .landing-header { background: #0b3d91; }
.appbar .jump input { background: #fff; }
.appbar .bell-btn, .appbar .profile-btn { background: rgba(255, 255, 255, .1); }
.landing-header .crest { background: #fff !important; color: #0b3d91 !important; }
@media (max-width: 860px) { .sidebar:not(.open) .crest { background: #fff !important; color: #0b3d91 !important; } }

/* My account is opened from the profile menu in the top-right banner, not the sidebar. */
.sidebar .nav-item[data-panel$="-account"] { display: none !important; }
.profile-menu .account-link { font-weight: 600; }

/* "My profile" opens from the name menu too. */
.sidebar .nav-item[data-panel="stu-profile"] { display: none !important; }
/* Language picker in the banner, left of the bell. */
.appbar .lang-bar { height: 40px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .45); cursor: pointer; }
.appbar .lang-bar:hover { background: rgba(255, 255, 255, .2); }
.appbar .lang-bar option { color: #0b0b0f; background: #fff; }
@media (max-width: 860px) { .appbar .lang-bar { height: 36px; padding: 0 8px; } }

/* ---------- text-style buttons look like buttons ---------- */
.link-btn, button.link, .home-card-head .link, .login-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line-dark); background: #fff; color: var(--brand-text);
  font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3;
}
.link-btn:hover, button.link:hover, .home-card-head .link:hover, .login-back:hover { background: var(--accent-soft); border-color: var(--brand-text); color: var(--brand-text); }
.link-btn { margin-top: 14px; }
.login-back { margin-bottom: 18px; }
/* Name-menu items: full-width buttons; Log out stands apart. */
.profile-menu .logout-link, .profile-menu .account-link {
  display: block; width: 100%; text-align: left; margin: 6px 0 0; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600;
}
.profile-menu .logout-link:hover, .profile-menu .account-link:hover { background: var(--accent-soft); border-color: var(--brand-text); color: var(--brand-text); }
.profile-menu .logout-link:not(.account-link) { margin-top: 10px; border-color: #0b0b0f; background: #0b0b0f; color: #fff; text-align: center; }
.profile-menu .logout-link:not(.account-link):hover { background: #2a2f3a; color: #fff; }

/* ---------- round notification bell ---------- */
.appbar .bell-btn { width: 40px; height: 40px; min-width: 40px; flex: 0 0 40px; padding: 0; border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; }
.appbar .bell-btn .bell-count { top: -3px; right: -3px; }
@media (max-width: 860px) { .appbar .bell-btn { width: 36px; height: 36px; min-width: 36px; flex-basis: 36px; } }

/* New students: until joining formalities are submitted only that page (and fees) is open. */
.view.onboarding-locked .sidebar .nav-item[data-panel]:not([data-panel="stu-joining"]):not([data-panel="stu-fees"]),
.view.onboarding-locked .sidebar .nav-group,
.view.onboarding-locked .profile-menu .profile-link { display: none !important; }

/* Back at the top of each page, above the title: Google's Material "arrow back" icon button —
   round, no border, a soft circle on hover / press (in the text's own colour, so it works in dark mode too). */
.panel .back-btn, .icon-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  margin: 0 0 8px -8px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s; -webkit-tap-highlight-color: transparent; }
.panel .back-btn:hover, .icon-back:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.panel .back-btn:active, .icon-back:active { background: color-mix(in srgb, currentColor 14%, transparent); }
.panel .back-btn:focus-visible, .icon-back:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.panel .back-btn svg, .icon-back svg { display: block; }
.back-btn[hidden] { display: none !important; }

/* Pages that do not apply to this user (e.g. class-teacher pages for other teachers) */
.sidebar .nav-item[hidden] { display: none !important; }

/* Timetable: period number with its times, and interval / lunch rows */
.tt-grid .tt-period { text-align: center; }
.tt-grid .tt-period b { display: block; font-size: 12px; }
.tt-grid .tt-period span { display: block; font-size: 10.5px; color: var(--slate); margin-top: 2px; white-space: nowrap; }
.tt-grid .tt-break { text-align: center; background: #eef3fc; color: var(--brand-text); font-size: 11.5px; padding: 6px; letter-spacing: .02em; }

/* "My classes": the two selection boxes and the option tiles */
.mc-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mc-box { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.mc-box:hover { border-color: var(--pick-line); }
.mc-box.active { border-color: var(--pick-line); background: var(--pick); }
.mc-box-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text); }
.mc-box b { font-size: 18px; }
.mc-box-sub { font-size: 12.5px; color: var(--slate); }
.mc-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.mc-option { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-dark); background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.mc-option:hover { border-color: var(--brand-text); background: #f5f8fe; }
.mc-option b { color: var(--brand-text); font-size: 14px; }
.mc-option span { font-size: 12px; color: var(--slate); }

/* The class a page was opened for (from "My classes") */
.ctx-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #eef3fc; border: 1px solid #c9d8f3; color: var(--ink); font-size: 13.5px; }
.ctx-bar b { color: var(--brand-text); }
.ctx-fixed { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 8px; background: #eef3fc; border: 1px solid #c9d8f3; font-size: 13.5px; }
.ctx-fixed b { color: var(--brand-text); }

/* ---------- cleaner chrome ---------- */
/* No black rule or dashed strip under the blue header band. */
.main > .appbar { border-bottom: 0; }
.main > .appbar::after { content: none; }
/* The current page in the menu: a soft blue fill, no black marker. */
.nav-item, .nav-item.active { border-left-color: transparent; }
.nav-item.active { background: var(--accent-soft); color: var(--brand-text); font-weight: 600; }
/* Menu section headings: bold and easy to scan. */
.nav-group { font-weight: 700; color: var(--ink); font-size: 11px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-group { color: var(--ink-2); } }
:root[data-theme="dark"] .nav-group { color: var(--ink-2); }
.af-nav .icon-back { margin: 0; }
/* The back arrow on the heading's line; the page's description lines up under the heading text. */
.topbar .has-back { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; }
.topbar .has-back > .back-btn { grid-column: 1; grid-row: 1; margin: 0 0 0 -8px; }
.topbar .has-back > :not(.back-btn) { grid-column: 2; }
.topbar .has-back > h1 { margin-bottom: 0; }
.topbar .has-back > h1 + * { margin-top: 4px; }

/* ---------- Receipt design (js/receiptdesign.js) ---------- */
.rd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .rd-wrap { grid-template-columns: minmax(0, 1fr); } }
.rd-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rd-form .card { margin: 0; }
.rd-sticky { position: sticky; top: 12px; }
.rd-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.rd-logo { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line, #dce4ef); }
@media (max-width: 560px) { .rd-logo { grid-template-columns: 64px minmax(0, 1fr); } }
.rd-logo .field { margin: 0; }
.rd-thumb { width: 64px; height: 52px; border: 1px solid var(--line, #dce4ef); border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.rd-thumb.sm { width: 80px; height: 34px; display: inline-grid; }
.rd-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rd-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rd-checks label { display: flex; gap: 6px; align-items: center; font-weight: 500; }
.rd-checks input { width: auto; }
.rd-seg { display: flex; gap: 6px; }
.rd-fields { width: 100%; }
.rd-fields td { padding: 4px 6px; border: 0; vertical-align: middle; }
.rd-fields td:first-child { width: 28px; } .rd-fields input[type=checkbox] { width: auto; }
.rd-move { white-space: nowrap; width: 1%; } .rd-move .btn { padding: 4px 9px; }
.rd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* the sketch: always paper-white, like the printed receipt */
#rdPreview { background: #eef2f8; padding: 10px; border-radius: 10px; }
.rdp { background: #fff; color: #132238; font: 10px/1.35 Helvetica, Arial, sans-serif; padding: 14px 16px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.rdp.bordered { outline: 1px solid var(--acc); outline-offset: -6px; }
.rdp-head { padding: 6px; margin: -6px -6px 0; border-radius: 3px; }
.rdp-head.band { background: color-mix(in srgb, var(--acc) 12%, #fff); }
.rdp-tc, .rdp-top .rdp-side { display: flex; gap: 6px; justify-content: center; }
.rdp-top { display: flex; gap: 8px; align-items: flex-start; }
.rdp-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; color: #5a6680; }
.rdp-lines b { font-size: 14px; }
.rdp-logo { display: inline-grid; place-items: center; border: 1px dashed #b9c4d6; color: #8a96aa; font-size: 8px; background: #fff; }
.rdp-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rdp-logo.s { width: 28px; height: 28px; } .rdp-logo.m { width: 40px; height: 40px; } .rdp-logo.l { width: 56px; height: 56px; }
.rdp-logo:has(img) { border: 0; }
.rdp-title { border-bottom: 1.5px solid var(--acc); color: var(--acc); padding: 8px 0 4px; font-size: 12px; position: relative; }
.rdp-title small { position: absolute; right: 0; bottom: 4px; color: #5a6680; font-size: 8px; }
.rdp-rows { width: 100%; margin: 6px 0; border-bottom: 1px solid var(--acc); }
.rdp-rows td { border: 0; padding: 2px 0; color: #132238; background: none; }
.rdp-rows td:first-child { color: #5a6680; width: 34%; }
.rdp-rows td.amt { font-weight: bold; font-size: 12px; }
.rdp-foot { display: flex; gap: 8px; align-items: flex-start; padding-top: 6px; }
.rdp-foot .rdp-side { display: flex; gap: 6px; }
.rdp-note { flex: 1; color: #5a6680; font-size: 8px; }
.rdp-sig { width: 90px; text-align: center; color: #5a6680; font-size: 8px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 34px; border-bottom: 0; }
.rdp-sig img { max-height: 24px; object-fit: contain; }
.rdp-sig span { border-top: 1px solid #132238; padding-top: 2px; }
.rdp-cut { text-align: center; color: #8a96aa; font-size: 9px; border-top: 1px dashed #b9c4d6; margin: 8px 0; padding-top: 2px; }

/* ---------- Admission sign-up (js/apply.js): campus photo behind, account box left, the college right ---------- */
.su-page { --su-photo: none; position: relative; isolation: isolate; padding: 32px 20px;
  background: linear-gradient(120deg, rgba(10, 30, 70, .88), rgba(20, 60, 140, .72)), var(--su-photo) center / cover no-repeat, linear-gradient(135deg, #0b2a6b, #1f5fd1); }
.su-wrap { width: 100%; max-width: 1080px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: center; }
.su-page .su-box { border-top: 0 !important; max-width: none; margin: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .28); }
.su-info { color: #fff; min-width: 0; order: -1; }
.su-college { display: flex; gap: 16px; align-items: center; }
.su-college img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; flex: none; }
.su-college h1 { font-size: 32px; line-height: 1.15; margin: 0; color: #fff; text-wrap: balance; }
.su-aff { margin: 6px 0 0; color: rgba(255, 255, 255, .8); font-size: 14px; }
.su-addr { margin: 14px 0 0; color: rgba(255, 255, 255, .9); font-size: 15px; white-space: pre-line; }
.su-contact { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.su-info h3 { margin: 26px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.su-steps { list-style: none; counter-reset: su; margin: 0; padding: 0; display: grid; gap: 12px; }
.su-steps li { counter-increment: su; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; }
.su-steps li::before { content: counter(su); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.su-steps b { font-size: 15px; } .su-steps span { font-size: 13.5px; color: rgba(255, 255, 255, .8); }
.su-courses { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.su-courses li { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
@media (max-width: 900px) {
  .su-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .su-info { order: -1; }
  .su-college h1 { font-size: 24px; } .su-college img { width: 56px; height: 56px; }
  .su-info h3, .su-steps, .su-courses { display: none; }
}
.campus-preview { width: 100%; max-width: 360px; aspect-ratio: 16 / 9; border: 1px dashed var(--line-dark, #cbd5e1); border-radius: 12px; display: grid; place-items: center; overflow: hidden; margin-bottom: 12px; background: var(--paper-2, #f5f7fa); text-align: center; padding: 6px; }
.campus-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
/* College settings: the logo and the campus photo one under the other, beside the details */
.cs-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; align-self: start; }
.cs-side > .card { margin: 0; }
/* "Someone else is signed in on this browser" — above a sign-in page opened by its link (index.html otherSession) */
.other-session { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px max(16px, env(safe-area-inset-left, 0px)); background: #fff8e1; border-bottom: 1px solid #f2d68c; color: #5c4400; font-size: 14px; }
.other-session-btns { display: flex; gap: 8px; }
.su-page .pw-wrap input { margin: 0; width: 100%; }
.su-page .pw-wrap #sl-show { margin: 0; min-height: 0; border: 0; background: transparent; }
/* The back arrow and the label beside it ("ADMISSIONS 2026–27", "APPLICANT"…) on one centred line */
.login-box > .login-back, .login-box > .login-back + .login-role-tag { vertical-align: middle; margin-top: 0; margin-bottom: 14px; }
.login-box > .login-back.icon-back { margin-left: -8px; margin-right: 6px; }
