:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255,255,255,.84);
  --surface-solid: #fff;
  --surface-muted: #f2f2f7;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --line: rgba(29,29,31,.10);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff3b30;
  --purple: #af52de;
  --shadow: 0 14px 44px rgba(0,0,0,.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: -apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Helvetica Neue",Arial,sans-serif; -webkit-font-smoothing: antialiased; }
button,input,select,textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 8px; color: var(--secondary); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.login-screen { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: clamp(16px,2.2vw,30px); overflow: hidden; position: relative; background: #eef2f8; }
.login-screen::before,.login-screen::after { content:""; position: fixed; border-radius: 999px; filter: blur(2px); opacity: .7; pointer-events: none; }
.login-screen::before { width: 560px; height: 560px; left: -250px; top: -280px; background: radial-gradient(circle at 70% 70%,#9fcbff,transparent 68%); }
.login-screen::after { width: 660px; height: 660px; right: -320px; bottom: -360px; background: radial-gradient(circle at 30% 30%,#d8c8ff,transparent 68%); }
.login-layout { width: min(100%,1380px); min-height: min(820px,calc(100svh - 48px)); display: grid; grid-template-columns: minmax(0,1.13fr) minmax(430px,.87fr); border: 1px solid rgba(255,255,255,.82); border-radius: 38px; background: rgba(255,255,255,.88); box-shadow: 0 32px 100px rgba(38,56,88,.16); overflow: hidden; position: relative; z-index: 1; }
.login-story { min-height: 690px; display: flex; flex-direction: column; padding: clamp(38px,4.2vw,66px); color: #fff; background: radial-gradient(circle at 83% 14%,rgba(90,157,255,.45),transparent 26%),radial-gradient(circle at 12% 88%,rgba(135,76,255,.28),transparent 32%),linear-gradient(145deg,#0e1118 0%,#141b29 54%,#121629 100%); overflow: hidden; position: relative; isolation: isolate; }
.login-story::after { content:""; width: 360px; height: 360px; position: absolute; z-index: -1; right: -140px; bottom: -150px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025),0 0 0 90px rgba(255,255,255,.018); }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-brand .brand-mark { flex: 0 0 auto; }
.login-brand div:last-child { display: grid; gap: 2px; }
.login-brand strong { font-size: 16px; letter-spacing: -.02em; }
.login-brand span { color: rgba(255,255,255,.5); font-size: 11px; }
.story-copy { margin-top: clamp(62px,9vh,108px); max-width: 700px; }
.story-copy .eyebrow { color: #71afff; }
.story-copy h1 { margin: 0; font-size: clamp(43px,4.35vw,69px); line-height: 1.08; letter-spacing: -.06em; font-weight: 720; }
.story-copy > p:last-child { max-width: 610px; margin: 22px 0 0; color: rgba(255,255,255,.61); font-size: 16px; line-height: 1.8; }
.login-rule-grid { max-width: 610px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 38px; }
.login-rule { min-height: 104px; display: grid; align-content: center; gap: 8px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.065); backdrop-filter: blur(18px); }
.login-rule strong { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.login-rule strong small { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.login-rule span { color: rgba(255,255,255,.5); font-size: 12px; }
.login-workflow { max-width: 610px; margin-top: 14px; padding: 18px 20px 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 21px; background: rgba(255,255,255,.055); }
.workflow-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: rgba(255,255,255,.5); font-size: 11px; }
.workflow-head strong { color: rgba(255,255,255,.72); font-weight: 600; }
.workflow-head i { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: #52d273; box-shadow: 0 0 0 4px rgba(82,210,115,.12); }
.workflow-steps { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 18px; }
.workflow-steps div { display: grid; gap: 6px; position: relative; }
.workflow-steps div:not(:last-child)::after { content:""; position: absolute; left: 35px; right: 10px; top: 11px; height: 1px; background: linear-gradient(90deg,rgba(113,175,255,.6),rgba(255,255,255,.09)); }
.workflow-steps b { width: 24px; height: 24px; display: grid; place-items: center; z-index: 1; border-radius: 50%; color: #d9eaff; background: #2b568c; font-size: 9px; }
.workflow-steps span { color: rgba(255,255,255,.76); font-size: 12px; }
.login-role-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 30px; color: rgba(255,255,255,.42); font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: clamp(36px,5vw,78px); background: linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,249,252,.9)); }
.login-card { width: min(100%,430px); position: relative; }
.login-panel-brand { display: none; align-items: center; gap: 10px; margin-bottom: 32px; font-size: 16px; font-weight: 700; }
.login-panel-brand .brand-mark { width: 42px; height: 42px; margin: 0; border-radius: 13px; font-size: 17px; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 25px; border-radius: 17px; color: #fff; background: linear-gradient(145deg,#32a3ff,#0064d2 62%,#0053b6); box-shadow: 0 10px 24px rgba(0,113,227,.28); font-size: 24px; font-weight: 700; }
.brand-mark.small { width: 38px; height: 38px; margin: 0; border-radius: 12px; font-size: 16px; box-shadow: 0 7px 18px rgba(0,113,227,.22); }
.login-card h2 { margin: 0; font-size: clamp(38px,4vw,49px); line-height: 1.08; letter-spacing: -.05em; }
.login-lead { margin: 13px 0 34px; color: var(--secondary); font-size: 16px; }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field > span { color: var(--secondary); font-size: 13px; font-weight: 600; padding-left: 2px; }
input,select,textarea { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 13px; outline: none; padding: 11px 13px; color: var(--text); background: rgba(255,255,255,.92); transition: border-color .2s,box-shadow .2s,background .2s; }
textarea { min-height: 92px; resize: vertical; }
input:focus,select:focus,textarea:focus { border-color: rgba(0,113,227,.55); box-shadow: 0 0 0 4px rgba(0,113,227,.11); background: #fff; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 9px 16px; background: var(--surface-muted); cursor: pointer; font-weight: 650; transition: transform .18s,background .18s,box-shadow .18s,opacity .18s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 7px 16px rgba(0,113,227,.2); }
.button-primary:hover { background: var(--blue-hover); }
.button-large { min-height: 52px; margin-top: 5px; border-radius: 15px; font-size: 16px; }
.button-ghost { color: var(--blue); background: rgba(0,113,227,.09); }
.button-danger { color: var(--red); background: rgba(255,59,48,.09); }
.button-success { color: #16863a; background: rgba(52,199,89,.12); }
.button-small { min-height: 34px; padding: 6px 11px; border-radius: 10px; font-size: 13px; }
.login-assurance { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; margin-top: 25px; padding: 12px 13px; border-radius: 15px; background: rgba(52,199,89,.08); }
.login-assurance > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #17883c; background: rgba(52,199,89,.14); font-size: 12px; font-weight: 800; }
.login-assurance p { margin: 0; color: var(--secondary); font-size: 11px; line-height: 1.45; }
.login-assurance strong { display: block; margin-bottom: 1px; color: #258744; font-size: 12px; }
.login-help { margin: 18px 0 0; text-align: center; color: var(--tertiary); font-size: 11px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.sidebar { height: 100vh; position: sticky; top: 0; padding: 26px 18px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(248,248,250,.82); backdrop-filter: blur(28px); }
.brand-row { display: flex; align-items: center; gap: 11px; padding: 0 10px 26px; font-size: 17px; letter-spacing: -.02em; }
.nav-list { display: grid; gap: 5px; }
.nav-button { width: 100%; min-height: 45px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 13px; padding: 10px 13px; color: var(--secondary); background: transparent; cursor: pointer; text-align: left; font-size: 14px; font-weight: 600; }
.nav-button:hover { background: rgba(118,118,128,.08); }
.nav-button.active { color: var(--text); background: rgba(118,118,128,.12); }
.nav-icon { width: 22px; display: inline-grid; place-items: center; font-size: 17px; filter: saturate(.8); }
.profile-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 17px; background: rgba(255,255,255,.74); box-shadow: 0 7px 22px rgba(0,0,0,.045); }
.avatar { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#5757d9,#9d57d9); font-weight: 700; }
.profile-copy { min-width: 0; display: grid; flex: 1; }
.profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.profile-copy span { color: var(--secondary); font-size: 12px; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: rgba(118,118,128,.09); cursor: pointer; }
.icon-button:hover { background: rgba(118,118,128,.16); }
.workspace { min-width: 0; }
.topbar { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px clamp(24px,4vw,56px) 12px; }
.topbar h2 { margin: 0; font-size: clamp(25px,3vw,34px); letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.notification-button { position: relative; background: var(--surface-solid); box-shadow: 0 6px 18px rgba(0,0,0,.055); }
.badge { min-width: 17px; height: 17px; position: absolute; right: -2px; top: -3px; display: grid; place-items: center; border: 2px solid var(--bg); border-radius: 9px; color: #fff; background: var(--red); padding: 0 3px; font-size: 9px; font-weight: 700; }
.small-avatar { display: none; border: 0; }
.content { padding: 18px clamp(24px,4vw,56px) 64px; }

.hero { min-height: 230px; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(230px,.65fr); gap: 22px; padding: clamp(27px,4vw,44px); border-radius: var(--radius-xl); color: #fff; background: radial-gradient(circle at 92% 10%,rgba(255,255,255,.28),transparent 25%),linear-gradient(140deg,#087ff1,#0065d1 55%,#004eaa); box-shadow: 0 19px 42px rgba(0,102,211,.18); overflow: hidden; position: relative; }
.hero h3 { margin: 0 0 12px; max-width: 620px; font-size: clamp(28px,4vw,47px); line-height: 1.07; letter-spacing: -.045em; }
.hero p { margin: 0; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.7; }
.hero-meta { align-self: end; display: grid; justify-items: end; text-align: right; }
.hero-number { font-size: clamp(62px,9vw,100px); line-height: .8; font-weight: 720; letter-spacing: -.08em; }
.hero-number small { font-size: 18px; letter-spacing: 0; }
.hero .progress-track { margin-top: 20px; background: rgba(255,255,255,.22); }
.hero .progress-bar { background: #fff; }
.progress-track { width: 100%; height: 8px; border-radius: 999px; background: rgba(118,118,128,.14); overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--blue); transition: width .45s ease; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-head h3 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.section-head p { margin: 5px 0 0; color: var(--secondary); font-size: 13px; }
.section-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card { border: 1px solid rgba(255,255,255,.72); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 9px 28px rgba(0,0,0,.055); backdrop-filter: blur(22px); }
.card-pad { padding: 22px; }
.metric-card { min-height: 126px; padding: 20px; display: grid; align-content: space-between; }
.metric-label { color: var(--secondary); font-size: 13px; font-weight: 600; }
.metric-value { margin-top: 14px; font-size: 34px; line-height: 1; letter-spacing: -.045em; font-weight: 700; }
.metric-sub { margin-top: 7px; color: var(--tertiary); font-size: 12px; }
.status-pill { width: fit-content; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 650; }
.status-pill::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-submitted { color: #9a6500; background: rgba(255,159,10,.13); }
.status-approved { color: #16863a; background: rgba(52,199,89,.13); }
.status-rejected { color: #c62c25; background: rgba(255,59,48,.12); }
.status-missing { color: var(--secondary); background: rgba(118,118,128,.10); }

.upload-card { padding: clamp(20px,3vw,30px); }
.upload-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 21px; }
.upload-heading h3 { margin: 0; font-size: 21px; }
.step-control { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-muted); }
.step-button { min-width: 42px; min-height: 34px; border: 0; border-radius: 9px; color: var(--secondary); background: transparent; cursor: pointer; font-weight: 650; }
.step-button.active { color: #fff; background: var(--blue); box-shadow: 0 5px 11px rgba(0,113,227,.2); }
.photo-picker-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.photo-picker { aspect-ratio: 3/4; min-height: 170px; display: grid; place-items: center; border: 1.5px dashed rgba(118,118,128,.3); border-radius: 18px; background: var(--surface-muted); overflow: hidden; position: relative; cursor: pointer; transition: border-color .2s,transform .2s; }
.photo-picker:hover { border-color: var(--blue); transform: translateY(-2px); }
.photo-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-picker img { width: 100%; height: 100%; object-fit: cover; }
.picker-copy { display: grid; justify-items: center; gap: 8px; padding: 14px; color: var(--secondary); text-align: center; font-size: 12px; }
.picker-plus { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: rgba(0,113,227,.11); font-size: 23px; font-weight: 300; }
.upload-footer { margin-top: 18px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 13px; }
.upload-tip { color: var(--secondary); font-size: 12px; line-height: 1.6; }

.record-list { display: grid; gap: 11px; }
.record-row { display: grid; grid-template-columns: minmax(160px,1.2fr) repeat(3,minmax(100px,.72fr)) minmax(90px,.55fr) auto; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-solid); }
.student-cell { min-width: 0; display: flex; align-items: center; gap: 11px; }
.student-open { width: 100%; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; border-radius: 12px; }
.student-open:hover .student-copy strong { color: var(--blue); }
.student-open:focus-visible { outline: 3px solid rgba(0,113,227,.2); outline-offset: 4px; }
.student-cell .avatar { width: 36px; height: 36px; font-size: 13px; }
.student-copy { min-width: 0; display: grid; }
.student-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.student-copy span { color: var(--secondary); font-size: 12px; }
.slot { display: grid; gap: 4px; }
.slot small { color: var(--tertiary); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; background: var(--surface-solid); }
th,td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 13px; }
th { color: var(--secondary); background: #fafafa; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.empty { min-height: 210px; display: grid; place-items: center; padding: 36px; color: var(--secondary); text-align: center; }
.empty-icon { display: block; margin-bottom: 10px; font-size: 36px; filter: grayscale(.2); }

.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.filter-bar select,.filter-bar input { width: auto; min-width: 160px; min-height: 40px; padding: 7px 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.form-grid .full { grid-column: 1/-1; }
.check-row { display: flex; align-items: center; gap: 9px; color: var(--secondary); font-size: 14px; }
.check-row input { width: 18px; min-height: 18px; }
.notice-list { display: grid; gap: 9px; }
.notice { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 15px; border-radius: 16px; background: var(--surface-muted); }
.notice.unread { background: rgba(0,113,227,.08); }
.notice-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #fff; }
.notice strong { display: block; font-size: 14px; }
.notice p { margin: 4px 0; color: var(--secondary); font-size: 13px; line-height: 1.5; }
.notice time { color: var(--tertiary); font-size: 11px; }
.photo-viewer { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.photo-viewer a { aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: var(--surface-muted); }
.photo-viewer img { width: 100%; height: 100%; object-fit: cover; }
.student-detail-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; }
.student-detail-head .avatar { width: 46px; height: 46px; }
.student-detail-head strong { display: block; font-size: 16px; }
.student-detail-head p { margin: 4px 0 0; color: var(--secondary); font-size: 12px; }
.student-progress { display: grid; justify-items: end; }
.student-progress strong { color: var(--blue); font-size: 21px; }
.student-progress span { color: var(--tertiary); font-size: 10px; }
.student-detail-head + .progress-track { margin: 14px 0 20px; }
.student-detail-actions { display: flex; justify-content: flex-end; margin: -5px 0 16px; }
.student-submission-list { display: grid; gap: 13px; }
.student-submission-card { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.student-submission-card.missing { background: var(--surface-muted); }
.student-submission-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.student-submission-head h4 { margin: 2px 0 0; font-size: 16px; }
.student-empty-slot { min-height: 78px; display: grid; place-items: center; border: 1px dashed rgba(118,118,128,.22); border-radius: 14px; color: var(--tertiary); font-size: 12px; }
.review-copy { margin: 10px 0 0; color: var(--secondary); font-size: 12px; line-height: 1.55; }
.student-history-row { grid-template-columns: minmax(0,1fr) auto auto !important; }

.modal { width: min(92vw,620px); max-height: 88vh; border: 0; border-radius: 26px; padding: 0; color: var(--text); background: rgba(255,255,255,.96); box-shadow: 0 32px 90px rgba(0,0,0,.22); overflow: auto; backdrop-filter: blur(25px); }
.modal::backdrop { background: rgba(15,20,30,.35); backdrop-filter: blur(8px); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 13px; background: rgba(255,255,255,.91); backdrop-filter: blur(20px); }
.modal-head h3 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.modal-body { padding: 10px 22px 24px; }
.modal-feedback { margin: 0 0 14px; padding: 11px 13px; border-radius: 12px; color: #126a32; background: rgba(52,199,89,.12); font-size: 13px; line-height: 1.5; }
.modal-feedback.error { color: var(--red); background: rgba(255,59,48,.1); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.close-button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--secondary); background: var(--surface-muted); cursor: pointer; font-size: 18px; }
.toast-region { position: fixed; z-index: 1000; right: 20px; top: 18px; display: grid; gap: 8px; }
.toast { max-width: min(360px,calc(100vw - 32px)); padding: 12px 16px; border-radius: 13px; color: #fff; background: rgba(29,29,31,.91); box-shadow: var(--shadow); backdrop-filter: blur(20px); font-size: 13px; animation: toast-in .28s ease both; }
.toast.error { background: rgba(190,37,31,.94); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.mobile-nav { display: none; }

@media (max-width: 1100px) {
  .login-layout { grid-template-columns: minmax(0,1fr) minmax(390px,.83fr); }
  .login-story { padding: 42px; }
  .story-copy h1 { font-size: 48px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .record-row { grid-template-columns: minmax(170px,1.2fr) repeat(3,minmax(90px,.7fr)) auto; }
  .record-row > :nth-child(5) { display: none; }
}

@media (max-width: 900px) {
  .login-screen { display: block; overflow: auto; }
  .login-layout { min-height: auto; grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 38px; }
  .story-copy { margin-top: 54px; }
  .story-copy h1 { max-width: 650px; }
  .login-rule-grid,.login-workflow { max-width: 680px; }
  .login-panel { min-height: 540px; }
}

@media (max-width: 780px) {
  .login-screen { display: block; padding: 0; overflow: visible; background: #fff; }
  .login-screen::before,.login-screen::after { display: none; }
  .login-layout { min-height: 100svh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  .login-story { min-height: auto; padding: 27px 22px 30px; border-radius: 0 0 29px 29px; }
  .login-brand span { display: none; }
  .story-copy { margin-top: 36px; }
  .story-copy h1 { font-size: clamp(34px,10vw,43px); line-height: 1.12; }
  .story-copy > p:last-child { margin-top: 15px; font-size: 13px; line-height: 1.65; }
  .login-rule-grid { gap: 7px; margin-top: 24px; }
  .login-rule { min-height: 77px; gap: 5px; padding: 11px 12px; border-radius: 15px; }
  .login-rule strong { font-size: 23px; }
  .login-rule strong small { font-size: 11px; }
  .login-rule span { font-size: 10px; }
  .login-workflow,.login-role-row { display: none; }
  .login-panel { place-items: start center; padding: 38px 22px 46px; }
  .login-panel-brand { display: flex; }
  .login-card h2 { font-size: 38px; }
  .login-lead { margin-bottom: 27px; }
  .app-shell { display: block; padding-bottom: calc(72px + var(--safe-bottom)); }
  .sidebar { display: none; }
  .topbar { min-height: 86px; padding: 20px 18px 8px; }
  .topbar h2 { font-size: 27px; }
  .content { padding: 14px 16px 35px; }
  .small-avatar { display: grid; }
  .hero { min-height: 260px; grid-template-columns: 1fr; padding: 27px 24px; }
  .hero-meta { justify-items: start; text-align: left; align-self: end; }
  .hero-number { font-size: 58px; }
  .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .metric-card { min-height: 112px; padding: 17px; }
  .metric-value { font-size: 29px; }
  .photo-picker-grid { gap: 8px; }
  .photo-picker { min-height: 135px; border-radius: 14px; }
  .picker-copy { padding: 7px; font-size: 10px; }
  .upload-footer { grid-template-columns: 1fr; }
  .upload-footer .button { width: 100%; }
  .record-row { grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 10px 7px; padding: 14px; }
  .record-row > .student-cell { grid-column: 1 / -1; }
  .record-row > .slot { display: grid; min-width: 0; }
  .record-row > .slot .button,.record-row > .slot .status-pill { width: 100%; min-width: 0; justify-content: center; padding-inline: 5px; font-size: 10px; }
  .record-row > :nth-child(5) { display: block; grid-column: 4; grid-row: 2; align-self: center; white-space: nowrap; font-size: 13px; }
  .record-row > .row-actions { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .photo-viewer { gap: 7px; }
  .student-detail-head { grid-template-columns: auto minmax(0,1fr); }
  .student-progress { grid-column: 1 / -1; width: 100%; display: flex; justify-content: space-between; }
  .student-submission-card { padding: 13px; }
  .student-detail-actions .button { width: 100%; }
  .student-history-row { grid-template-columns: minmax(0,1fr) auto !important; }
  .student-history-row > :nth-child(2) { display: inline-flex !important; grid-column: 2; grid-row: 1; }
  .student-history-row > :nth-child(3) { display: inline-flex !important; grid-column: 1 / -1; width: 100%; justify-content: center; }
  .mobile-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(66px + var(--safe-bottom)); display: flex; justify-content: space-around; padding: 6px 8px var(--safe-bottom); border-top: 1px solid var(--line); background: rgba(250,250,252,.88); backdrop-filter: blur(26px) saturate(1.5); }
  .mobile-nav .nav-button { width: auto; min-width: 60px; min-height: 54px; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 9px; border-radius: 12px; font-size: 10px; }
  .mobile-nav .nav-icon { height: 22px; font-size: 19px; }
  .modal { width: calc(100vw - 22px); max-height: 90vh; border-radius: 24px; }
  .modal-actions .button { flex: 1 1 auto; justify-content: center; }
  .toast-region { right: 16px; left: 16px; top: 12px; }
  .toast { max-width: 100%; }
}

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