:root {
  --az-primary: #5b47fb;
  --az-primary-dark: #4534db;
  --az-blue: #3366ff;
  --az-cyan: #00b8d9;
  --az-green: #22a06b;
  --az-amber: #f59e0b;
  --az-red: #e5484d;
  --az-violet: #7c3aed;
  --az-ink: #1c273c;
  --az-muted: #7987a1;
  --az-line: #e1e6ef;
  --az-bg: #f5f7fb;
  --az-surface: #fff;
  --az-soft: #f8f9fc;
  --az-shadow: 0 3px 12px rgba(28, 39, 60, .06);
  --az-shadow-hover: 0 10px 28px rgba(28, 39, 60, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--az-bg); scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--az-ink);
  background: var(--az-bg);
  font-family: Poppins, Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(91, 71, 251, .2);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }
.page-workspace { width: min(100% - 40px, 1320px); margin: 0 auto; padding: 0 0 44px; }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 max(20px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--az-line);
  background: #fff;
  box-shadow: 0 1px 7px rgba(28, 39, 60, .04);
}
.identity { min-width: 215px; display: flex; align-items: center; gap: 10px; }
.identity img { width: 42px; height: 42px; padding: 3px; border: 1px solid var(--az-line); border-radius: 9px; object-fit: contain; }
.identity div { min-width: 0; }
.identity span, .identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity span { color: var(--az-muted); font-size: .61rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.identity strong { max-width: 160px; color: #253047; font-size: .86rem; font-weight: 700; }
.desktop-context, .sidebar-student-card { display: none; }

.desktop-nav { align-self: stretch; display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.desktop-nav a {
  position: relative;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: #596882;
  font-size: .72rem;
  font-weight: 650;
}
.desktop-nav a::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.desktop-nav a:hover { color: var(--az-primary); }
.desktop-nav a.active { color: var(--az-primary); }
.desktop-nav a.active::after { background: var(--az-primary); }
.icon-button { border: 0; cursor: pointer; }
.top-logout {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 7px;
  color: #c73338;
  background: #fff1f1;
  font-size: .7rem;
  font-weight: 700;
}

.desktop-appbar {
  width: min(100% - 40px, 1320px);
  min-height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.desktop-page-title > span { display: block; color: var(--az-muted); font-size: .63rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.desktop-page-title h1 { margin: 3px 0 0; color: #202b43; font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.desktop-appbar-meta, .desktop-year-chip, .desktop-profile-link { display: flex; align-items: center; }
.desktop-appbar-meta { gap: 11px; }
.desktop-year-chip { min-height: 36px; gap: 7px; padding: 0 11px; border: 1px solid var(--az-line); border-radius: 6px; color: #64738d; background: #fff; font-size: .67rem; font-weight: 650; }
.desktop-profile-link { gap: 9px; padding-left: 12px; border-left: 1px solid var(--az-line); }
.desktop-profile-link > div:first-child { text-align: right; }
.desktop-profile-link strong, .desktop-profile-link span { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-profile-link strong { color: #29344b; font-size: .68rem; }
.desktop-profile-link span { color: var(--az-muted); font-size: .58rem; font-weight: 650; }
.desktop-profile-avatar { width: 38px; height: 38px; overflow: hidden; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; color: var(--az-primary); background: #e9e7ff; font-size: .62rem; font-weight: 800; box-shadow: 0 0 0 1px #dfe3ec; }
.desktop-profile-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }

.hero-panel {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  margin: 0 0 18px;
  padding: 25px 28px;
  border: 1px solid #dedbf9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: linear-gradient(120deg, #5b47fb 0%, #6855fb 55%, #487eea 100%);
  box-shadow: 0 7px 20px rgba(91, 71, 251, .18);
}
.hero-panel::after { content: ""; position: absolute; right: -55px; top: -75px; width: 240px; height: 240px; border: 38px solid rgba(255,255,255,.075); border-radius: 50%; }
.portal-page-tka .hero-panel { background: linear-gradient(120deg, #7a356d, #a44772 58%, #dc7a32); }
.portal-page-nilai .hero-panel { background: linear-gradient(120deg, #40368e, #6550ba 58%, #8a4ccc); }
.portal-page-absensi .hero-panel { background: linear-gradient(120deg, #176b77, #16887d 58%, #20a36e); }
.hero-copy, .hero-action, .hero-side { position: relative; z-index: 1; }
.hero-copy { min-width: 0; display: grid; gap: 3px; }
.hero-panel p { margin: 0; color: rgba(255,255,255,.76); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero-panel h1 { margin: 0; color: #fff; font-size: clamp(1.6rem, 2.7vw, 2.2rem); font-weight: 700; letter-spacing: -.025em; }
.hero-panel h1 b { font: inherit; }
.hero-panel > .hero-copy > span { color: rgba(255,255,255,.8); font-size: .76rem; font-weight: 500; }
.hero-metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.hero-metrics span { min-height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; color: #fff; background: rgba(255,255,255,.1); font-size: .65rem; font-weight: 600; }
.hero-action, .primary-button, .secondary-button { min-height: 43px; border: 0; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; font-size: .72rem; font-weight: 700; cursor: pointer; }
.hero-action { flex: 0 0 auto; color: var(--az-primary-dark); background: #fff; box-shadow: 0 4px 12px rgba(31, 38, 80, .16); }
.primary-button { color: #fff; background: var(--az-primary); }
.secondary-button { color: #43516a; border: 1px solid var(--az-line); background: #fff; }
.full-button { width: 100%; }

.hero-side { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.hero-student-photo { position: relative; width: 84px; height: 106px; overflow: hidden; border: 3px solid rgba(255,255,255,.8); border-radius: 8px; display: grid; place-items: center; color: var(--az-primary); background: #ebe9ff; font-size: 1.2rem; font-weight: 800; box-shadow: 0 7px 18px rgba(31,38,80,.2); }
.hero-student-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hero-photo-download, .hero-student-photo small { position: absolute; right: 5px; bottom: 5px; left: 5px; min-height: 21px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 4px; color: #4e3cce; background: rgba(255,255,255,.93); font-size: .49rem; font-weight: 800; text-transform: uppercase; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; min-width: 0; min-height: 102px; padding: 15px 15px 15px 60px; border: 1px solid var(--az-line); border-radius: 7px; display: grid; align-content: center; background: #fff; box-shadow: var(--az-shadow); }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 7px 0 0 7px; background: var(--az-primary); }
.stat-card > i { position: absolute; left: 14px; top: 50%; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--az-primary); transform: translateY(-50%); }
.stat-card span { color: var(--az-muted); font-size: .63rem; font-weight: 650; text-transform: uppercase; letter-spacing: .035em; }
.stat-card strong { order: -1; margin-bottom: 3px; color: #202b43; font-size: 1.55rem; line-height: 1; }
.tone-blue::before, .tone-blue > i, .accent-blue > span { background: var(--az-blue); }
.tone-green::before, .tone-green > i, .accent-green > span { background: var(--az-green); }
.tone-amber::before, .tone-amber > i, .accent-amber > span { background: var(--az-amber); }
.tone-red::before, .tone-red > i, .accent-red > span { background: var(--az-red); }
.tone-cyan::before, .tone-cyan > i, .accent-cyan > span { background: var(--az-cyan); }
.tone-violet::before, .tone-violet > i, .accent-violet > span { background: var(--az-violet); }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px,.72fr); grid-template-areas: "services services" "exams tka" "exams insights"; gap: 16px; align-items: start; }
.dashboard-services { grid-area: services; }
.dashboard-exams { grid-area: exams; }
.dashboard-tka { grid-area: tka; }
.dashboard-insights { grid-area: insights; }
.dashboard-layout > * { margin: 0; }
.section-block { margin: 0 0 16px; padding: 17px; border: 1px solid var(--az-line); border-radius: 7px; background: #fff; box-shadow: var(--az-shadow); }
.section-head { min-height: 39px; margin-bottom: 13px; padding-bottom: 10px; border-bottom: 1px solid #edf0f5; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-head p { margin: 0 0 1px; color: var(--az-primary); font-size: .58rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.section-head h2 { margin: 0; color: #263149; font-size: .98rem; font-weight: 700; }
.soft-pill, .status-pill, .score-chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 700; }
.soft-pill { min-height: 27px; padding: 0 9px; border-radius: 4px; color: #5b47d5; background: #eeecff; font-size: .63rem; }

.action-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.action-tile { min-width: 0; min-height: 86px; padding: 11px; border: 1px solid #e7eaf1; border-radius: 6px; display: grid; grid-template-columns: 39px minmax(0,1fr); grid-template-rows: auto auto; align-content: center; align-items: center; gap: 1px 9px; color: var(--az-ink); background: var(--az-soft); }
.action-tile > span { grid-row: 1/3; width: 38px; height: 38px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.action-tile strong { align-self: end; font-size: .76rem; line-height: 1.2; }
.action-tile small { align-self: start; overflow: hidden; color: var(--az-muted); font-size: .57rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.mini-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.dashboard-tka, .dashboard-insights { grid-template-columns: 1fr; margin: 0; }
.mini-panel { min-height: 80px; padding: 12px; border: 1px solid var(--az-line); border-radius: 7px; display: flex; align-items: center; gap: 10px; background: #fff; box-shadow: var(--az-shadow); }
.mini-panel > i { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--az-primary); }
.mini-panel div { min-width: 0; }
.mini-panel span, .mini-panel strong, .mini-panel small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-panel span, .mini-panel small { color: var(--az-muted); font-size: .59rem; font-weight: 600; }
.mini-panel strong { color: #28334b; font-size: .95rem; }

.exam-list, .data-list, .compact-list { display: grid; gap: 9px; }
.exam-card { overflow: hidden; border: 1px solid var(--az-line); border-radius: 6px; background: #fff; }
.exam-main { padding: 13px; display: grid; gap: 8px; }
.exam-title-row, .exam-meta, .data-row { display: flex; align-items: center; }
.exam-title-row { justify-content: space-between; gap: 10px; }
.exam-title-row > strong, .data-row-title { min-width: 0; margin: 0; color: #27324a; font-size: .78rem; font-weight: 700; line-height: 1.3; }
.exam-card p, .data-row-sub { margin: 0; color: var(--az-muted); font-size: .65rem; font-weight: 600; }
.exam-meta { flex-wrap: wrap; gap: 8px 13px; }
.exam-meta span { color: #71809a; font-size: .61rem; font-weight: 650; }
.progress-line { width: 100%; height: 5px; overflow: hidden; border-radius: 5px; background: #e8ebf1; }
.progress-line span { display: block; height: 100%; background: linear-gradient(90deg,var(--az-primary),var(--az-cyan)); }
.exam-footer { min-height: 38px; padding: 8px 12px; border-top: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fafbfc; }
.exam-footer small { color: var(--az-muted); font-size: .61rem; font-weight: 600; }
.exam-footer strong { color: var(--az-primary); font-size: .65rem; }
.status-pill { min-height: 25px; padding: 0 7px; border-radius: 4px; font-size: .59rem; }
.status-primary { color: #2854c5; background: #e6edff; }
.status-success { color: #147a4d; background: #dcf6ea; }
.status-warning { color: #996100; background: #fff0ca; }
.status-danger { color: #b42c31; background: #ffe4e5; }
.status-muted { color: #627087; background: #e9edf3; }
.score-chip { min-height: 33px; padding: 0 10px; border-radius: 5px; color: #fff; background: var(--az-primary); font-size: .7rem; }

.data-row { justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #e8ebf1; border-radius: 5px; background: #fafbfc; }
.data-row > div { min-width: 0; }
.data-row .progress-line { margin-top: 7px; }
.empty-state { min-height: 130px; padding: 20px; border: 1px dashed #ccd3df; border-radius: 6px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--az-muted); background: #fafbfc; text-align: center; font-size: .72rem; font-weight: 650; }
.empty-state i { color: #a2aec0; font-size: 1.4rem; }

.alert { margin: 0 0 13px; padding: 11px 12px; border: 1px solid transparent; border-radius: 5px; display: flex; align-items: flex-start; gap: 8px; font-size: .7rem; font-weight: 600; }
.alert-danger { color: #a4252a; border-color: #ffd2d4; background: #fff0f0; }
.alert-success { color: #14754b; border-color: #bee8d5; background: #ebfaf3; }
.alert-warning { color: #8d5c09; border-color: #f8dfac; background: #fff8e8; }

.profile-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.profile-item, .profile-summary-card, .profile-form-card { border: 1px solid var(--az-line); border-radius: 7px; background: #fff; box-shadow: var(--az-shadow); }
.profile-item { min-height: 76px; padding: 12px; }
.profile-item small { display: block; color: var(--az-muted); font-size: .59rem; font-weight: 650; }
.profile-item strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #263149; font-size: .74rem; }
.profile-summary-card, .profile-form-card { padding: 16px; }
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.avatar, .profile-hero-avatar { display: grid; place-items: center; color: #fff; background: var(--az-primary); font-weight: 800; }
.avatar { width: 50px; height: 50px; border-radius: 7px; }
.profile-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.profile-form .field-full, .profile-form .profile-submit { grid-column: 1/-1; }
.field-group { display: grid; gap: 5px; }
.field-group > span:first-child { color: #5e6c84; font-size: .62rem; font-weight: 700; }
.text-control { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid #d8dee8; border-radius: 5px; color: #28334b; background: #fff; outline: none; }
.text-control:focus { border-color: #9185ff; box-shadow: 0 0 0 3px rgba(91,71,251,.11); }
.textarea-control { min-height: 90px; padding-block: 10px; resize: vertical; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-shell > i:first-child { position: absolute; left: 12px; z-index: 1; color: #8995aa; }
.input-shell .text-control { padding-left: 37px; padding-right: 42px; }
.password-toggle { position: absolute; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 4px; color: #7e8aa0; background: transparent; cursor: pointer; }
.form-hint { display: flex; align-items: flex-start; gap: 6px; color: var(--az-muted); font-size: .61rem; font-weight: 600; }
.profile-submit { justify-self: start; }
.section-icon { width: 35px; height: 35px; border-radius: 6px; display: grid; place-items: center; color: var(--az-primary); background: #eeecff; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: linear-gradient(135deg,#f1f2ff,#f7f8fc 48%,#edf7ff); }
.login-card { width: min(100%,410px); }
.login-card-modern { padding: 24px; border: 1px solid var(--az-line); border-radius: 8px; background: #fff; box-shadow: 0 15px 45px rgba(28,39,60,.12); }
.login-brand-row, .login-brand { display: flex; align-items: center; }
.login-brand-row { justify-content: space-between; gap: 10px; }
.login-brand { min-width: 0; gap: 9px; }
.login-brand img { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--az-line); border-radius: 8px; }
.login-brand span, .login-brand strong { display: block; }
.login-brand span { color: var(--az-muted); font-size: .59rem; font-weight: 700; }
.login-brand strong { color: #253047; font-size: .82rem; }
.login-badge { padding: 5px 8px; border-radius: 4px; color: #16734b; background: #e5f7ef; font-size: .57rem; font-weight: 700; }
.login-accent { display: flex; gap: 4px; margin: 17px 0; }
.login-accent span { width: 24px; height: 3px; background: var(--az-primary); }
.login-accent span:nth-child(2) { width: 14px; background: var(--az-cyan); }
.login-accent span:nth-child(3) { width: 8px; background: var(--az-green); }
.login-heading { margin-bottom: 16px; }
.login-eyebrow { color: var(--az-primary); font-size: .6rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.login-heading h1 { margin: 3px 0 0; color: #202b43; font-size: 1.45rem; }
.login-heading p { margin: 5px 0 0; color: var(--az-muted); font-size: .68rem; font-weight: 600; }
.form-stack { display: grid; gap: 11px; }
.login-submit { justify-content: space-between; }
.default-password-note, .login-note { display: flex; align-items: center; gap: 7px; color: var(--az-muted); font-size: .61rem; font-weight: 600; }
.default-password-note { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--az-line); }
.default-password-note strong { margin-left: auto; padding: 3px 7px; color: #8d5c09; background: #fff2cf; }
.login-note { margin-top: 10px; align-items: flex-start; }

.bottom-nav { display: none; }

@media (hover:hover) {
  .stat-card, .action-tile, .mini-panel, .exam-card, .data-row { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
  .stat-card:hover, .action-tile:hover, .mini-panel:hover, .exam-card:hover { border-color: #cfcafc; transform: translateY(-2px); box-shadow: var(--az-shadow-hover); }
}

@media (max-width:1099.98px) {
  .app-shell { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .page-workspace { width: min(100% - 24px,720px); padding-bottom: 16px; }
  .topbar { position: sticky; top: 0; z-index: 50; min-height: 58px; padding: 0 12px; gap: 10px; }
  .identity { min-width: 0; margin-right: auto; }
  .identity img { width: 39px; height: 39px; }
  .identity strong { max-width: 52vw; }
  .desktop-nav, .desktop-context, .sidebar-student-card { display: none; }
  .top-logout { width: 38px; min-width: 38px; height: 38px; min-height: 38px; padding: 0; }
  .top-logout span { display: none; }
  .desktop-appbar { width: min(100% - 24px,720px); min-height: 70px; }
  .desktop-page-title h1 { font-size: 1.18rem; }
  .desktop-year-chip, .desktop-profile-link > div:first-child { display: none; }
  .desktop-profile-link { padding: 0; border: 0; }
  .hero-panel { min-height: 146px; padding: 20px; border-radius: 7px; }
  .hero-panel h1 { font-size: clamp(1.35rem,5vw,1.8rem); }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat-card { min-height: 90px; }
  .dashboard-layout { display: block; }
  .dashboard-layout > * { margin-bottom: 12px; }
  .section-block { padding: 14px; }
  .action-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-tka, .dashboard-insights { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bottom-nav, .bottom-nav.has-tka {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: max(7px,env(safe-area-inset-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 2px;
    padding: 5px;
    border: 1px solid #dfe3eb;
    border-radius: 10px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 8px 28px rgba(28,39,60,.16);
  }
  .bottom-nav.has-tka { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .bottom-nav a { min-width: 0; min-height: 51px; border-radius: 7px; display: grid; place-items: center; align-content: center; gap: 2px; color: #7b879c; font-size: .54rem; font-weight: 650; }
  .bottom-nav a i { font-size: .92rem; }
  .bottom-nav a.active { color: #fff; background: var(--az-primary); box-shadow: 0 4px 10px rgba(91,71,251,.22); }
}

@media (max-width:599.98px) {
  .page-workspace, .desktop-appbar { width: calc(100% - 18px); }
  .desktop-appbar { min-height: 66px; }
  .desktop-profile-avatar { width: 34px; height: 34px; }
  .hero-panel { padding: 17px; gap: 11px; }
  .portal-page-dashboard .hero-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .portal-page-dashboard .hero-side { display: grid; justify-items: center; gap: 6px; }
  .portal-page-dashboard .hero-student-photo { width: 65px; height: 82px; }
  .portal-page-dashboard .hero-action { width: 65px; min-height: 32px; padding: 0 5px; font-size: .55rem; }
  .hero-photo-download { font-size: .42rem; }
  .action-grid { gap: 7px; }
  .action-tile { min-height: 91px; display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: start; gap: 5px; }
  .action-tile > span { grid-row: auto; width: 34px; height: 34px; }
  .action-tile small { white-space: normal; line-height: 1.25; }
  .mini-panel { padding: 10px; }
  .exam-title-row { align-items: flex-start; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-form .field-group, .profile-form .field-full, .profile-form .profile-submit { grid-column: 1; }
  .profile-submit { width: 100%; }
}

@media (max-width:390px) {
  .identity strong { max-width: 48vw; font-size: .78rem; }
  .hero-panel { padding: 15px; }
  .hero-metrics span { font-size: .57rem; }
  .action-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mini-grid, .dashboard-tka, .dashboard-insights { grid-template-columns: 1fr; }
  .exam-title-row { display: grid; justify-items: start; }
  .data-row { align-items: flex-start; }
  .status-pill { font-size: .54rem; }
  .bottom-nav a { font-size: .49rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
