:root {
  --navy: #011e41;
  --navy-deep: #0f0f0f;
  --navy-soft: #e65300;
  --gold: #ff671d;
  --gold-deep: #ac441e;
  --cream: #fff4ed;
  --paper: #ffffff;
  --ink: #202020;
  --muted: #666666;
  --line: #dedede;
  --soft: #f2f2f2;
  --success: #2b7050;
  --danger: #a43e45;
  --info: #011e41;
  --shadow: 0 18px 48px rgba(15, 15, 15, .14);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--soft);
}
button, input { font: inherit; }
button, summary { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(255,103,29,.42);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(430px, .9fr);
  background: var(--paper);
}
.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(44px, 6vw, 90px);
  color: white;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.13), transparent 24%),
    linear-gradient(145deg, rgba(3,31,61,.98), rgba(6,43,84,.95)),
    repeating-linear-gradient(30deg, transparent 0 32px, rgba(255,255,255,.025) 32px 33px);
}
.brand-panel::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -160px;
  width: 500px;
  height: 500px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255,255,255,.026), 0 0 0 104px rgba(255,255,255,.018);
}
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.brand-seal {
  display: grid;
  place-items: center;
  align-content: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  box-shadow: inset 0 0 0 4px rgba(242,169,0,.14);
}
.brand-seal span, .brand-seal small { display: block; }
.brand-seal span { font-size: 1.08rem; font-weight: 800; letter-spacing: .05em; }
.brand-seal small { margin-top: 2px; font-size: .56rem; letter-spacing: .1em; }
.university-name, .school-name { margin: 0; }
.university-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.36rem; }
.school-name { margin-top: 5px; color: rgba(255,255,255,.7); font-size: .82rem; letter-spacing: .02em; }
.brand-message { position: relative; z-index: 1; max-width: 700px; margin: 70px 0; }
.eyebrow {
  margin: 0 0 8px;
  color: inherit;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.brand-message h1 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  font-weight: 500;
  line-height: .96;
}
.brand-copy { max-width: 640px; margin: 30px 0 0; color: rgba(255,255,255,.78); font-size: 1.08rem; line-height: 1.75; }
.notice-card {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.18);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.notice-card strong, .notice-card span { display: block; }
.notice-card span { margin-top: 5px; color: rgba(255,255,255,.72); font-size: .88rem; line-height: 1.5; }

.login-panel { display: grid; place-items: center; min-height: 100vh; padding: 44px; background: linear-gradient(180deg, #fff, #f6f8fa); }
.login-card { width: min(100%, 450px); }
.demo-tag, .sample-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--navy);
  background: #fff3cd;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.login-card h2 { margin: 14px 0 0; color: var(--navy-deep); font-family: Georgia, "Times New Roman", serif; font-size: 2.7rem; font-weight: 500; }
.muted { margin: 9px 0 30px; color: var(--muted); }
.mobile-brand { display: none; }
.mobile-brand > span:last-child strong, .mobile-brand > span:last-child small { display: block; }
.mobile-brand small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
label { display: block; margin: 18px 0 7px; color: #3d4855; font-size: .86rem; font-weight: 780; }
.label-row { display: flex; align-items: end; justify-content: space-between; }
.label-row label { margin-bottom: 7px; }
input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #cbd4dd;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input:focus { border-color: var(--navy-soft); box-shadow: 0 0 0 4px rgba(14,71,127,.12); }
.text-button { padding: 0; border: 0; color: var(--navy-soft); background: transparent; font-size: .84rem; font-weight: 820; }
.text-button:hover { text-decoration: underline; }
.primary-button, .secondary-button, .outline-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 820;
  transition: transform .15s, background .15s, border-color .15s;
}
.primary-button { width: 100%; margin-top: 22px; border: 1px solid var(--navy); color: white; background: var(--navy); }
.primary-button:hover { background: var(--navy-deep); transform: translateY(-1px); }
.secondary-button { width: 100%; margin-top: 10px; border: 1px solid #cbd4dd; color: var(--navy); background: white; }
.secondary-button:hover, .outline-button:hover { border-color: var(--navy); background: #f9fbfd; }
.form-error { min-height: 20px; margin-top: 10px; color: var(--danger); font-size: .85rem; }
.demo-credentials { display: grid; gap: 8px; margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.demo-credentials div { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.demo-credentials span { color: var(--muted); font-size: .8rem; }
.demo-credentials code { overflow-wrap: anywhere; color: var(--navy-deep); font-weight: 820; }
.security-note { margin: 18px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.55; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  color: white;
  background: var(--navy-deep);
  z-index: 10;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.seal, .mini-seal {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-weight: 800;
  font-size: .78rem;
}
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand span { margin-top: 2px; color: rgba(255,255,255,.56); font-size: .72rem; }
.sidebar nav { display: grid; gap: 6px; margin-top: 28px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: rgba(255,255,255,.7);
  background: transparent;
  text-align: left;
  font-weight: 760;
}
.nav-item span { width: 20px; color: rgba(255,255,255,.52); text-align: center; }
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: white; background: rgba(242,169,0,.17); box-shadow: inset 3px 0 var(--gold); }
.nav-item.active span { color: var(--gold); }
.sidebar-footer { display: grid; gap: 10px; margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-document { color: var(--gold); font-size: .78rem; font-weight: 780; text-decoration: none; }
.sidebar-document:hover { text-decoration: underline; }
.signout-button { min-height: 42px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: white; background: rgba(255,255,255,.06); font-weight: 760; }
.signout-button:hover { background: rgba(255,255,255,.1); }
.sidebar-footer small { color: rgba(255,255,255,.42); font-size: .66rem; line-height: 1.4; }

.portal-main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
}
.icon-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: white; }
.topbar-title { min-width: 0; }
.topbar-title .eyebrow { margin-bottom: 3px; color: var(--muted); font-size: .64rem; }
.topbar-title strong { display: block; color: var(--navy-deep); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 500; }
.student-chip { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar, .large-avatar { display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--navy-soft), var(--navy)); font-weight: 820; }
.avatar { width: 40px; height: 40px; font-size: .78rem; }
.student-chip strong, .student-chip span { display: block; }
.student-chip strong { color: var(--navy-deep); font-size: .82rem; }
.student-chip span { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.content-wrap { max-width: 1450px; margin: 0 auto; padding: 30px; }
.demo-banner { margin-bottom: 18px; padding: 11px 14px; border: 1px solid #eed795; border-radius: 8px; color: #634d14; background: #fff8df; font-size: .78rem; line-height: 1.5; }
.portal-section { display: none; }
.portal-section.active { display: block; animation: section-in .18s ease-out; }
@keyframes section-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.welcome-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 36px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(130deg, var(--navy-deep), var(--navy-soft));
  box-shadow: var(--shadow);
}
.welcome-banner::after { content: ""; position: absolute; right: -65px; top: -90px; width: 250px; height: 250px; border: 42px solid rgba(255,255,255,.04); border-radius: 50%; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner h2, .section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.welcome-banner p:not(.eyebrow) { max-width: 780px; margin: 10px 0 0; color: rgba(255,255,255,.76); line-height: 1.55; }
.term-badge { min-width: 200px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; background: rgba(255,255,255,.08); }
.term-badge span, .term-badge strong { display: block; }
.term-badge span { color: rgba(255,255,255,.62); font-size: .72rem; }
.term-badge strong { margin-top: 5px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 8px 24px rgba(27,45,66,.05); }
.stat-card { padding: 20px; }
.stat-card span, .stat-card small, .stat-card strong { display: block; }
.stat-card span { color: var(--muted); font-size: .76rem; font-weight: 720; }
.stat-card strong { margin-top: 8px; color: var(--navy-deep); font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.stat-card small { margin-top: 6px; color: var(--muted); }
.status-good { color: var(--success) !important; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 20px; }
.panel { padding: 24px; }
.panel-heading, .section-heading, .table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h3, .details-card h3, .grading-panel h3 { margin: 0; color: var(--navy-deep); font-size: 1.14rem; }
.panel-heading .eyebrow { color: var(--muted); }
.course-progress-list { display: grid; gap: 14px; margin-top: 20px; }
.course-progress-list > div { display: flex; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.course-code { display: grid; place-items: center; flex: 0 0 74px; min-height: 40px; border-radius: 7px; color: var(--navy); background: #edf3f8; font-size: .76rem; font-weight: 850; }
.course-progress-list strong, .course-progress-list small { display: block; }
.course-progress-list strong { color: #283746; font-size: .88rem; }
.course-progress-list small { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.progress-ring-row { display: flex; align-items: center; gap: 18px; margin: 22px 0; }
.progress-ring { display: grid; place-items: center; align-content: center; width: 92px; height: 92px; flex: 0 0 auto; border: 8px solid #e1e9f0; border-top-color: var(--gold); border-right-color: var(--gold); border-radius: 50%; color: var(--navy); }
.progress-ring span, .progress-ring small { display: block; }
.progress-ring span { font-family: Georgia, serif; font-size: 1.6rem; line-height: 1; }
.progress-ring small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.progress-ring-row > div:last-child strong { color: var(--navy-deep); }
.progress-ring-row p { margin: 6px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.full-width { width: 100%; }
.notice-panel { margin-top: 20px; }
.notice-list { display: grid; gap: 18px; margin-top: 22px; }
.compact-notices { grid-template-columns: repeat(3, minmax(0,1fr)); }
.notice-list > div { display: flex; gap: 12px; }
.notice-dot { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 6px; border-radius: 50%; background: var(--gold); }
.notice-list strong { display: block; color: var(--navy-deep); font-size: .88rem; }
.notice-list p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }

.section-heading { align-items: flex-end; margin-bottom: 22px; }
.section-heading .eyebrow { color: var(--muted); }
.section-subtitle { margin: 7px 0 0; color: var(--muted); font-size: .83rem; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cbd4dd; color: var(--navy); background: white; text-decoration: none; }
.primary-button.compact { width: auto; margin: 0; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; }
.table-panel { overflow: hidden; padding: 0; }
.table-toolbar { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 0 10px; color: var(--success); background: #e8f3ed; font-size: .7rem; font-weight: 820; white-space: nowrap; }
.pill-progress { color: #6d4d00; background: #fff1c3; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #fafbfc; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
td { color: #33404d; font-size: .84rem; line-height: 1.4; }
td:first-child, td:nth-last-child(-n+3) { white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfd; }
.table-footnote { padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); background: #fbfcfd; font-size: .76rem; }
.grade-ip, .grade { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; font-weight: 850; }
.grade-ip, .grade-ip { color: #745300; }

.record-summary { display: grid; gap: 1px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.record-summary-wide { grid-template-columns: repeat(4, minmax(0,1fr)); }
.record-summary div { min-width: 0; padding: 16px 18px; background: white; }
.record-summary span, .record-summary strong { display: block; }
.record-summary span { color: var(--muted); font-size: .7rem; }
.record-summary strong { margin-top: 5px; color: var(--navy-deep); font-size: .83rem; overflow-wrap: anywhere; }
.transcript-overview { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; padding: 0; margin-bottom: 18px; overflow: hidden; }
.transcript-overview > div { padding: 20px; border-right: 1px solid var(--line); }
.transcript-overview > div:last-child { border-right: 0; }
.transcript-overview span, .transcript-overview strong, .transcript-overview small { display: block; }
.transcript-overview span { color: var(--muted); font-size: .72rem; }
.transcript-overview strong { margin-top: 6px; color: var(--navy-deep); font-family: Georgia, serif; font-size: 1.5rem; font-weight: 500; }
.transcript-overview small { margin-top: 5px; color: var(--muted); font-size: .7rem; }
.transcript-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 2px 12px; }
.transcript-controls span { color: var(--muted); font-size: .74rem; }
.transcript-terms { display: grid; gap: 12px; }
.term-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 5px 18px rgba(27,45,66,.04); }
.term-card summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; list-style: none; }
.term-card summary::-webkit-details-marker { display: none; }
.term-card summary::after { content: "+"; width: 28px; flex: 0 0 28px; color: var(--navy); font-size: 1.5rem; font-weight: 400; text-align: center; }
.term-card[open] summary::after { content: "−"; }
.term-card[open] summary { border-bottom: 1px solid var(--line); background: #fbfcfd; }
.term-title { min-width: 0; }
.term-title span, .term-title strong, .term-title small { display: block; }
.term-title span { color: var(--navy-soft); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.term-title strong { margin-top: 4px; color: var(--navy-deep); font-size: .95rem; }
.term-title small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.term-metrics { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.term-metrics > span:not(.pill) { min-width: 64px; text-align: right; }
.term-metrics small, .term-metrics strong { display: block; }
.term-metrics small { color: var(--muted); font-size: .63rem; }
.term-metrics strong { margin-top: 3px; color: var(--navy-deep); font-size: .84rem; }
.term-summary { display: flex; flex-wrap: wrap; gap: 9px 22px; padding: 13px 20px; border-top: 1px solid var(--line); color: var(--muted); background: #f8fafc; font-size: .72rem; }
.term-summary strong { color: #3f4e5d; }
.grading-panel { display: grid; grid-template-columns: 180px 1fr; gap: 30px; margin-top: 18px; }
.grading-panel .eyebrow { color: var(--muted); }
.grade-scale { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; }
.grade-scale span { padding: 9px 10px; border-radius: 7px; color: var(--muted); background: var(--soft); font-size: .72rem; }
.grade-scale strong { color: var(--navy-deep); }
.disclaimer { color: var(--muted); font-size: .72rem; line-height: 1.55; }

.finance-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.finance-hero > div { padding: 28px; border-radius: 12px; color: white; background: var(--navy); }
.finance-hero span, .finance-hero strong, .finance-hero small { display: block; }
.finance-hero strong { margin: 8px 0; font-family: Georgia, serif; font-size: 2.3rem; font-weight: 500; }
.finance-hero p, .finance-hero small { margin: 0; color: rgba(255,255,255,.72); }
.aid-summary { background: linear-gradient(135deg, #80611f, #b57e00) !important; }
.empty-state { padding: 50px 28px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; color: var(--navy); background: #edf3f8; font-size: 1.4rem; font-weight: 850; }
.empty-state h3 { margin: 0; color: var(--navy-deep); }
.empty-state p { max-width: 680px; margin: 10px auto 0; color: var(--muted); line-height: 1.6; }

.profile-grid { display: grid; grid-template-columns: minmax(280px,.72fr) 1.28fr; gap: 20px; }
.profile-card { text-align: center; }
.large-avatar { width: 92px; height: 92px; margin: 4px auto 18px; font-size: 1.35rem; }
.profile-card h3 { margin: 0; color: var(--navy-deep); font-family: Georgia, serif; font-size: 1.6rem; font-weight: 500; }
.profile-card > p { color: var(--muted); }
.profile-meta { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--line); text-align: left; font-size: .82rem; }
.profile-meta span { color: var(--muted); }
.details-card dl { margin: 20px 0 0; }
.details-card dl div { display: grid; grid-template-columns: 180px 1fr; gap: 30px; padding: 18px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: .8rem; }
dd { margin: 0; color: #33404d; font-size: .88rem; line-height: 1.5; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: 380px; padding: 14px 16px; border-radius: 8px; color: white; background: var(--navy-deep); box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .login-shell { grid-template-columns: 1fr 1fr; }
  .brand-panel { padding: 48px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .record-summary-wide { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .compact-notices { grid-template-columns: 1fr; }
  .grade-scale { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 850px) {
  .login-shell { display: block; background: linear-gradient(180deg, var(--navy-deep) 0 190px, var(--soft) 190px); padding: 36px 18px; }
  .brand-panel { display: none; }
  .login-panel { min-height: calc(100vh - 72px); align-items: start; padding: 0; background: transparent; }
  .login-card { margin: 58px auto 20px; padding: 28px; border-radius: 14px; background: white; box-shadow: var(--shadow); }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: var(--navy-deep); }
  .mini-seal { width: 42px; height: 42px; border-color: var(--navy); color: var(--gold); background: var(--navy); font-size: .68rem; }
  .portal-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); width: 280px; transition: transform .2s; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  .icon-button { display: inline-grid; place-items: center; }
  .content-wrap { padding: 22px 18px; }
  .welcome-banner { align-items: flex-start; flex-direction: column; padding: 28px; }
  .term-badge { width: 100%; }
  .finance-hero, .profile-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 18px; }
  .transcript-overview { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .transcript-overview > div:nth-child(2) { border-right: 0; }
  .transcript-overview > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grading-panel { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-card { padding: 24px 20px; }
  .login-card h2 { font-size: 2rem; }
  .student-chip > div:last-child { display: none; }
  .stat-grid, .record-summary-wide, .transcript-overview { grid-template-columns: 1fr; }
  .transcript-overview > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .transcript-overview > div:last-child { border-bottom: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > button, .section-heading > a, .section-heading .button-row { width: 100%; }
  .button-row > * { flex: 1 1 100%; }
  .welcome-banner h2, .section-heading h2 { font-size: 2rem; }
  .details-card dl div { grid-template-columns: 1fr; gap: 8px; }
  .demo-credentials div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .transcript-controls { align-items: flex-start; flex-direction: column; }
  .term-card summary { align-items: flex-start; }
  .term-metrics { display: none; }
  .grade-scale { grid-template-columns: repeat(3, minmax(0,1fr)); }
  th, td { padding: 12px 14px; }
}

@media print {
  .sidebar, .topbar, .demo-banner, .section-heading button, .section-heading a, .transcript-controls, .toast { display: none !important; }
  .portal-shell { display: block; }
  .content-wrap { max-width: none; padding: 0; }
  .portal-section { display: none !important; }
  .portal-section.active { display: block !important; }
  .panel, .record-summary, .term-card { box-shadow: none; break-inside: avoid; }
  .term-card summary::after { display: none; }
  .term-card:not([open]) > :not(summary) { display: block !important; }
  .term-card summary { border-bottom: 1px solid var(--line); }
  .term-metrics { display: flex; }
  body { background: white; font-size: 10pt; }
  .content-wrap { padding: 0; }
  .section-heading { margin-bottom: 12px; }
  .transcript-terms { gap: 8px; }
  .term-card { page-break-inside: avoid; }
  th, td { padding: 7px 9px; font-size: 8pt; }
  .term-summary { padding: 8px 10px; font-size: 7.5pt; }
}


/* Pacific brand treatment: official primary orange/black with Pacific Navy support. */
.brand-panel {
  background:
    linear-gradient(115deg, rgba(255,103,29,.20), transparent 46%),
    radial-gradient(circle at 16% 15%, rgba(255,255,255,.08), transparent 22%),
    linear-gradient(145deg, #0f0f0f 0%, #151515 64%, #011e41 100%);
  border-top: 8px solid var(--gold);
}
.brand-panel::before {
  content: "DDS";
  position: absolute;
  right: -2vw;
  top: 42%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.035);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10rem, 28vw, 28rem);
  line-height: 1;
  letter-spacing: -.08em;
  pointer-events: none;
}
.brand-seal {
  width: 92px;
  height: 92px;
  border: 3px solid var(--gold);
  box-shadow: inset 0 0 0 5px rgba(255,103,29,.13);
}
.brand-seal span { font-size: .92rem; letter-spacing: .12em; }
.brand-seal small { max-width: 70px; font-size: .46rem; line-height: 1.25; text-align: center; }
.university-name { font-weight: 700; letter-spacing: .01em; }
.school-name { color: rgba(255,255,255,.78); }
.login-panel { border-top: 8px solid var(--gold); }
.demo-tag, .sample-label { color: #0f0f0f; background: #ffe3d5; }
.login-card h2 { color: #0f0f0f; }
input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255,103,29,.15); }
.text-button { color: var(--navy-soft); }
.primary-button { border-color: var(--gold); color: #0f0f0f; background: var(--gold); }
.primary-button:hover { border-color: var(--gold-deep); color: white; background: var(--gold-deep); }
.secondary-button { border-color: #0f0f0f; color: #0f0f0f; }
.secondary-button:hover, .outline-button:hover { border-color: var(--gold); color: #0f0f0f; background: #fff4ed; }
.demo-credentials { border-left: 4px solid var(--gold); background: #fffaf7; }
.demo-credentials code { color: #0f0f0f; }
.sidebar { border-top: 8px solid var(--gold); background: #0f0f0f; }
.seal, .mini-seal { border-color: var(--gold); color: var(--gold); background: rgba(255,103,29,.06); }
.nav-item.active { color: #0f0f0f; background: var(--gold); box-shadow: none; }
.nav-item.active span { color: #0f0f0f; }
.sidebar-document { color: var(--gold); }
.topbar { border-top: 4px solid var(--gold); }
.topbar-title strong, .student-chip strong, .stat-card strong,
.panel-heading h3, .details-card h3, .grading-panel h3,
.progress-ring-row > div:last-child strong, .notice-list strong,
.record-summary strong, .transcript-overview strong, .term-title strong,
.term-metrics strong, .profile-card h3, .empty-state h3 { color: #0f0f0f; }
.avatar, .large-avatar { background: linear-gradient(145deg, var(--gold), var(--gold-deep)); }
.welcome-banner {
  background: linear-gradient(125deg, #0f0f0f 0%, #1c1c1c 62%, #011e41 100%);
  box-shadow: inset 6px 0 var(--gold);
}
.stat-card { border-top: 3px solid var(--gold); }
.course-code { color: #0f0f0f; background: #ffe7db; }
.progress-ring { border-top-color: var(--gold); border-right-color: var(--gold); color: #0f0f0f; }
.notice-dot { background: var(--gold); }
.outline-button { color: #0f0f0f; }
.term-title span { color: var(--navy-soft); }
.finance-hero > div { background: #0f0f0f; }
.aid-summary { background: linear-gradient(135deg, var(--gold-deep), var(--gold)) !important; color: #0f0f0f !important; }
.empty-icon { color: #0f0f0f; background: #ffe7db; }
.toast { background: #0f0f0f; border-left: 4px solid var(--gold); }
.demo-banner { border-color: #ffc3a5; color: #5a260c; background: #fff1e9; }
@media (max-width: 900px) {
  .login-shell { background: linear-gradient(180deg, #0f0f0f 0 190px, var(--soft) 190px); }
  .mini-seal { color: var(--gold); background: #0f0f0f; }
}

/* Student account detail layout */
.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.finance-stat { padding: 20px; }
.finance-stat span, .finance-stat strong, .finance-stat small { display: block; }
.finance-stat span { color: var(--muted); font-size: .74rem; font-weight: 720; }
.finance-stat strong { margin-top: 7px; color: var(--navy-deep); font-family: Georgia, serif; font-size: 1.5rem; font-weight: 500; }
.finance-stat small { margin-top: 5px; color: var(--muted); font-size: .72rem; }
.finance-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.finance-table td:last-child, .finance-table th:last-child { text-align: right; white-space: nowrap; }
.finance-table td:nth-child(2), .finance-table th:nth-child(2) { white-space: nowrap; }
.finance-table td strong, .finance-table td small { display: block; }
.finance-table td small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.finance-table .zero-credit td { background: #fbfcfd; }
.finance-total-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-top: 1px solid var(--line); background: #f8fafc; }
.finance-total-row span { color: var(--muted); font-size: .78rem; font-weight: 760; }
.finance-total-row strong { color: var(--navy-deep); font-size: .96rem; }
.finance-note { display: flex; align-items: center; gap: 18px; margin-top: 20px; }
.finance-note .empty-icon { flex: 0 0 auto; margin: 0; }
.finance-note h3 { margin: 0; color: var(--navy-deep); }
.finance-note p { margin: 6px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }

@media (max-width: 1120px) {
  .finance-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .finance-summary-grid { grid-template-columns: 1fr; }
  .finance-note { align-items: flex-start; }
}
