﻿/* Soroti School of Business - public site, admin console and student portal */
:root {
  --ink: #171a20;
  --ink-soft: #3d444f;
  --muted: #6a7280;
  --line: #e0e3e9;
  --bg: #f7f8fa;
  --card: #ffffff;
  --brand: #8f1d18;
  --brand-2: #b3261e;
  --accent: #0f7a3d;
  --accent-2: #049546;
  --navy: #16305a;
  --gold: #d98d0b;
  --ok: #0f7a3d;
  --warn: #a86200;
  --bad: #b3261e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 26, 32, .06), 0 8px 24px rgba(23, 26, 32, .07);
  --shadow-lg: 0 4px 12px rgba(23, 26, 32, .10), 0 20px 48px rgba(23, 26, 32, .12);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.95rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }

/* ---------- public header ---------- */
.topbar {
  background: var(--ink);
  color: #cfd3da;
  font-size: .82rem;
}
.topbar .wrap { display: flex; gap: 1.25rem; justify-content: space-between; padding: .45rem 0; flex-wrap: wrap; }
.topbar a { color: #fff; }

.masthead {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.masthead.scrolled { box-shadow: 0 2px 16px rgba(23, 26, 32, .12); }
.masthead .wrap { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand:hover { text-decoration: none; }
.crest {
  width: 46px; height: 46px; border-radius: 8px; flex: none;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-2) 55%, var(--accent) 130%);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 1rem; letter-spacing: .04em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28);
  transition: transform .45s var(--ease-out);
}
.brand:hover .crest { transform: rotate(-4deg) scale(1.05); }
.brand-name { font-weight: 700; font-size: 1.12rem; line-height: 1.15; }
.brand-motto { font-size: .72rem; color: var(--muted); }

.site-nav { margin-left: auto; display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.site-nav a {
  padding: .45rem .6rem; border-radius: 6px; color: var(--ink); font-size: .92rem;
  position: relative; transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: .6rem; right: .6rem; bottom: .18rem;
  height: 2px; background: var(--brand); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease-out);
}
.site-nav a:hover { background: var(--bg); text-decoration: none; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { background: #fdf0ef; color: var(--brand); font-weight: 600; }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a.btn::after { display: none; }

.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.05rem; border-radius: 8px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font: inherit; font-size: .94rem; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.3;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
}
.btn:hover { background: var(--brand-2); text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(143, 29, 24, .28); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn.ghost:hover { background: #fdf0ef; box-shadow: 0 6px 18px rgba(23, 26, 32, .12); }
.btn.gold { background: var(--gold); color: #2b2200; }
.btn.gold:hover { background: #b8911f; box-shadow: 0 6px 18px rgba(217, 141, 11, .32); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-2); box-shadow: 0 6px 18px rgba(15, 122, 61, .30); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: .35rem .65rem; font-size: .84rem; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, #7a1713 0%, var(--brand) 40%, #2a5c86 100%);
  color: #fff; padding: 3.5rem 0 3rem;
}
/* Slow drifting colour wash behind the hero copy. */
.hero::before {
  content: ""; position: absolute; inset: -40% -10%; z-index: -1;
  background:
    radial-gradient(45% 45% at 18% 25%, rgba(4, 149, 70, .40), transparent 65%),
    radial-gradient(40% 40% at 78% 30%, rgba(255, 178, 54, .28), transparent 62%),
    radial-gradient(50% 50% at 50% 90%, rgba(23, 26, 32, .45), transparent 70%);
  animation: heroDrift 26s var(--ease) infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 75%);
  animation: gridPan 40s linear infinite;
}
@keyframes heroDrift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}
@keyframes gridPan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 46px 46px, 46px 46px; }
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lede { font-size: 1.06rem; color: #f0dfe0; max-width: 60ch; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .74rem;
  color: #ffd97a; font-weight: 700; margin-bottom: .6rem;
}
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-stats > div {
  padding-left: 1rem; border-left: 2px solid rgba(255, 255, 255, .28);
  animation: riseIn .7s var(--ease-out) both;
}
.hero-stats > div:nth-child(2) { animation-delay: .1s; }
.hero-stats > div:nth-child(3) { animation-delay: .2s; }
.hero-stats > div:nth-child(4) { animation-delay: .3s; }
.hero-stats b { display: block; font-size: 1.75rem; }
.hero-stats span { font-size: .82rem; color: #e4cdcf; }

.section { padding: 3rem 0; }
.section.tight { padding: 2rem 0; }
.section-head { max-width: 62ch; margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.section-head.center { margin-inline: auto; text-align: center; }
.alt { background: #f2f4f7; }
.alt-2 { background: #fdf3ef; }

/* Section eyebrow rule, matching the reference site's banded heading style. */
.eyebrow-rule {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .5rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow-rule::before { content: ""; width: 26px; height: 3px; background: var(--accent); border-radius: 2px; }

/* ---------- cards and grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem; box-shadow: var(--shadow);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card.flat { box-shadow: none; }
.card h3 { margin-bottom: .35rem; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Service tile band: icon, label, arrow, lifts on hover. */
.tile {
  position: relative; display: flex; flex-direction: column; gap: .45rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; overflow: hidden; color: inherit;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.tile:hover { text-decoration: none; transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tile:hover::before { transform: scaleX(1); }
.tile .tile-icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: #fdf0ef; color: var(--brand); font-size: 1.3rem;
  transition: background .3s var(--ease), color .3s var(--ease), transform .4s var(--ease-out);
}
.tile:hover .tile-icon { background: var(--brand); color: #fff; transform: scale(1.06) rotate(-5deg); }
.tile h3 { margin: 0; font-size: 1.02rem; }
.tile p { margin: 0; font-size: .86rem; color: var(--muted); }
.tile .tile-go { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--brand); }

.stat { text-align: center; }
.stat b { display: block; font-size: 1.9rem; color: var(--brand); }
.stat span { font-size: .82rem; color: var(--muted); }

.tag {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px;
  background: #eaf1f8; color: var(--brand); font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.tag.gold { background: #fdf3d8; color: #7a5c05; }
.tag.ok { background: #e2f4ea; color: var(--ok); }
.tag.bad { background: #fbe6e4; color: var(--bad); }
.tag.warn { background: #fdf0dd; color: var(--warn); }
.tag.grey { background: #eef0f4; color: var(--ink-soft); }

/* ---------- forms ---------- */
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .25rem; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: .94rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #b9d3ec; border-color: var(--brand-2); }
textarea { min-height: 110px; resize: vertical; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; }
legend { font-size: .84rem; font-weight: 700; padding: 0 .35rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3f6fb; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- notices ---------- */
.notice { padding: .7rem .85rem; border-radius: 8px; font-size: .89rem; border: 1px solid; margin-bottom: 1rem; }
.notice.ok { background: #e6f5ec; border-color: #b7e0c8; color: #10583a; }
.notice.bad { background: #fdeceb; border-color: #f3c4c0; color: #8d1e17; }
.notice.info { background: #eaf1f8; border-color: #c6d9ec; color: #1b4a72; }

.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }

/* ---------- footer ---------- */
.footer { background: #0e2a48; color: #c6d7e8; margin-top: 3rem; padding: 2.5rem 0 1.5rem; font-size: .88rem; }
.footer h4 { color: #fff; font-size: .95rem; }
.footer a { color: #cfe0ef; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 1.75rem; padding-top: 1rem; font-size: .8rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- console (admin + portal) ---------- */
.console { background: #eef1f6; min-height: 100vh; }
.console-head { background: var(--brand); color: #fff; }
.console-head .wrap { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.console-head a { color: #dfeaf6; font-size: .92rem; padding: .35rem .55rem; border-radius: 6px; }
.console-head a:hover, .console-head a[aria-current="page"] { background: rgba(255, 255, 255, .13); color: #fff; text-decoration: none; }
.console-nav { display: flex; gap: .15rem; margin-left: auto; flex-wrap: wrap; align-items: center; }

.shell { display: grid; grid-template-columns: 230px 1fr; gap: 1.25rem; padding: 1.25rem 0 3rem; align-items: start; }
.sidebar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; position: sticky; top: 1rem; }
.sidebar a { display: block; padding: .45rem .6rem; border-radius: 6px; color: var(--ink); font-size: .9rem; }
.sidebar a:hover { background: var(--bg); text-decoration: none; }
.sidebar a[aria-current="page"] { background: #eaf1f8; color: var(--brand); font-weight: 600; }
.sidebar .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: .7rem .6rem .25rem; font-weight: 700; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1.1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.panel-head h2, .panel-head h3 { margin: 0; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background: linear-gradient(130deg, #0e2f52, #17466f 60%, #1d6490); }
.auth-card { width: min(430px, 100%); background: #fff; border-radius: 14px; padding: 1.6rem; box-shadow: 0 18px 50px rgba(6, 20, 36, .35); }

.modal-back { position: fixed; inset: 0; background: rgba(10, 20, 34, .5); display: grid; place-items: center; padding: 1rem; z-index: 60; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 20px 60px rgba(6, 20, 36, .4); }
.modal h3 { margin-top: 0; }

.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 80; display: grid; gap: .5rem; max-width: 340px; }
.toast div { background: #12203a; color: #fff; padding: .65rem .9rem; border-radius: 8px; font-size: .88rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.toast div.bad { background: var(--bad); }
.toast div.ok { background: var(--ok); }

.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; margin-top: .75rem; font-size: .86rem; }

.receipt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; max-width: 620px; margin-inline: auto; }
.receipt-head { text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1rem; }
.receipt-total { font-size: 1.4rem; font-weight: 700; }

.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--ink-soft); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .site-nav { display: none; width: 100%; margin-left: 0; }
  .site-nav.open { display: flex; flex-direction: column; align-items: stretch; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .masthead .wrap { flex-wrap: wrap; }
}

@media print {
  .topbar, .masthead, .footer, .no-print, .sidebar, .console-head, .btn { display: none !important; }
  body, .console { background: #fff; }
  .receipt { border: 0; padding: 0; }
}

.role-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.role-layer {
  background: rgba(11, 22, 45, 0.02);
  border: 1px solid rgba(11, 22, 45, 0.08);
  border-radius: 0.75rem;
  padding: 1rem 1rem 0.5rem;
}
.role-layer h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.role-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.role-card {
  background: #fff;
  border: 1px solid rgba(11, 22, 45, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 1px 4px rgba(11, 22, 45, 0.05);
}
.role-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.role-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.role-card code {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ---------- motion ----------
   One shared motion system. Elements opt in with a data-reveal attribute and
   .reveal() in app.js adds .in when they scroll into view, so animations stay
   declarative in the markup and are skipped automatically under
   prefers-reduced-motion. */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal="left"] { transform: translateX(-22px); }
[data-reveal="right"] { transform: translateX(22px); }
[data-reveal="zoom"] { transform: scale(.95); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .07s; }
[data-reveal-delay="2"] { transition-delay: .14s; }
[data-reveal-delay="3"] { transition-delay: .21s; }
[data-reveal-delay="4"] { transition-delay: .28s; }
[data-reveal-delay="5"] { transition-delay: .35s; }

.hero .eyebrow, .hero h1, .hero p.lede, .hero .row { animation: riseIn .8s var(--ease-out) both; }
.hero h1 { animation-delay: .08s; }
.hero p.lede { animation-delay: .16s; }
.hero .row { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Count-up numbers get a brief emphasis while they tick. */
.counting { animation: popIn .5s var(--ease-out); }

/* Back to top */
.to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 1.1rem; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease-out), background .2s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--brand-2); transform: translateY(-3px); }

/* ---------- toggle switch (maintenance page) ---------- */
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 1rem 0;
}
.switch-row p { margin: .15rem 0 0; }
.switch { position: relative; display: inline-block; width: 54px; height: 30px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; background: #c9ced6; border-radius: 30px;
  transition: background .28s var(--ease);
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  transition: transform .28s var(--ease-out);
}
.switch input:checked + .track { background: var(--bad); }
.switch input:checked + .track .knob { transform: translateX(24px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.danger-panel { border-left: 4px solid var(--bad); }
.lead { color: var(--ink-soft); }

/* ---------- maintenance page ---------- */
.maint-page { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); }
.maint-head { background: #fff; border-bottom: 1px solid var(--line); }
.maint-bar { display: flex; align-items: center; padding: .8rem 0; }
.maint-body { flex: 1 1 auto; display: grid; place-items: center; padding: 2.5rem 1.25rem; }
.maint-card {
  width: min(620px, 100%); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 2.5rem 2rem; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn .6s var(--ease-out) both;
}
.maint-spinner { display: flex; gap: .4rem; justify-content: center; margin-bottom: 1.5rem; }
.maint-spinner i {
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand); display: block;
  animation: bounce 1.1s var(--ease) infinite;
}
.maint-spinner i:nth-child(2) { animation-delay: .15s; background: var(--gold); }
.maint-spinner i:nth-child(3) { animation-delay: .3s; background: var(--accent); }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .55; }
  30% { transform: translateY(-9px); opacity: 1; }
}
.maint-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .74rem;
  font-weight: 700; color: var(--brand); margin-bottom: .5rem;
}
.maint-msg { color: var(--ink-soft); }
.maint-facts { display: flex; gap: 2rem; justify-content: center; margin: 1.25rem 0; }
.maint-facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.maint-facts dd { margin: .2rem 0 0; font-weight: 600; }
.maint-help { font-size: .88rem; color: var(--muted); max-width: 46ch; margin-inline: auto; }
.maint-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.maint-contact { font-size: .84rem; color: var(--muted); margin: 1.25rem 0 0; }
.maint-foot { background: #fff; border-top: 1px solid var(--line); }

/* ---------- student portal tabs ---------- */
.portal-tabs {
  display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line); padding-bottom: .5rem;
}
.ptab {
  appearance: none; border: 1px solid transparent; background: transparent; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink-soft);
  padding: .5rem .85rem; border-radius: 8px;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease-out);
}
.ptab:hover { background: #fff; transform: translateY(-1px); }
.ptab.on { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(143, 29, 24, .25); }

.notice-item { padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.notice-item:last-child { border-bottom: none; }
.notice-item strong { display: block; margin-bottom: .15rem; }
.notice-item p { margin: 0 0 .2rem; }

@media print {
  .console-head, .sidebar, .portal-tabs, .no-print, .to-top, .maint-actions { display: none !important; }
  .wrap { width: 100%; }
  .panel { border: none; box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}


/* ---------- maintenance and campus module pages ---------- */
.maint-page a { color: var(--brand); }
.module-hero {
  background: linear-gradient(120deg, #7a1713, var(--brand) 45%, #2a5c86);
  color: #fff; padding: 2.5rem 0 2.25rem;
}
.module-hero h1 { color: #fff; }
.module-hero p { color: #f0dfe0; max-width: 62ch; margin-bottom: 0; }
.filter-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-row input, .filter-row select { max-width: 260px; }
.pill-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pill {
  appearance: none; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: .35rem .8rem; border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.pill:hover { border-color: var(--brand); }
.pill.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cal-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 1rem; align-items: start;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.cal-date {
  background: var(--brand); color: #fff; border-radius: 8px; padding: .4rem; text-align: center;
}
.cal-date b { display: block; font-size: 1.25rem; line-height: 1.1; }
.cal-date span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.opp {
  display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.15rem; color: inherit;
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease);
}
.opp:hover { text-decoration: none; transform: translateX(4px); box-shadow: var(--shadow-lg); }
.opp.expired { border-left-color: var(--muted); opacity: .72; }
.opp h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.opp-meta { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.grad-table td:first-child { font-variant-numeric: tabular-nums; width: 3.5rem; }
