:root {
  --navy: #172844;
  --blue: #204fa8;
  --blue-deep: #173d89;
  --blue-soft: #eef4ff;
  --sky: #e6f4ff;
  --text: #28374d;
  --muted: #8591a3;
  --line: #edf0f5;
  --surface: #fff;
  --canvas: #f7f9fc;
  --yellow: #f5bb48;
  --green: #42a982;
  --purple: #9272d5;
  --peach: #f09573;
  --radius: 18px;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background: var(--canvas);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 85px; }
body { margin: 0; min-width: 320px; background: var(--canvas); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, strong, .brand { font-family: "Manrope", sans-serif; }
.app-shell { min-height: 100vh; }
.sidebar { width: 252px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 27px 18px 17px; background: #fff; border-right: 1px solid #edf0f5; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--navy); font-size: 17px; letter-spacing: .13em; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; color: white; background: var(--blue); font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: 0; box-shadow: 0 5px 12px #204fa82b; }
.brand small { display: block; margin-top: 3px; color: #8b97a8; font: 700 8px "DM Sans", sans-serif; letter-spacing: .19em; }
.side-label { margin: 52px 0 12px 12px; color: #a1aaba; font-size: 9px; font-weight: 700; letter-spacing: .17em; }
.side-nav { display: grid; gap: 6px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 13px; padding: 12px 13px; color: #778399; border-radius: 10px; font-weight: 600; transition: .2s ease; }
.side-nav a:hover, .side-nav a.active { color: var(--blue); background: var(--blue-soft); }
.side-nav a.active:before { content: ""; position: absolute; left: -18px; width: 3px; height: 23px; border-radius: 0 4px 4px 0; background: var(--blue); }
.nav-icon { width: 18px; text-align: center; font-size: 19px; line-height: 1; }
.nav-count { margin-left: auto; display: grid; place-items: center; width: 20px; height: 20px; color: white; background: var(--blue); border-radius: 50%; font-size: 10px; }
.side-footer { margin-top: auto; }
.help-card { position: relative; margin-bottom: 22px; padding: 17px 15px 15px; overflow: hidden; border-radius: 13px; background: #f4f7ff; }
.help-card:after { content: ""; position: absolute; width: 90px; height: 90px; right: -40px; bottom: -52px; border: 1px solid #dfe8ff; border-radius: 50%; box-shadow: 0 0 0 10px #f4f7ff, 0 0 0 11px #dfe8ff; }
.help-spark { display: block; margin-bottom: 9px; color: var(--blue); font-size: 17px; }
.help-card strong { display: block; font-size: 12px; }
.help-card p { margin: 6px 0 0; color: #7d8ba1; font-size: 11px; line-height: 1.6; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 0 4px 12px; border-bottom: 1px solid var(--line); }
.avatar { flex: 0 0 auto; display: inline-grid; place-items: center; color: var(--blue); background: #dceaff; border-radius: 50%; font-family: "Manrope", sans-serif; font-weight: 800; }
.avatar-photo { overflow: hidden; }
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar-small { width: 34px; height: 34px; font-size: 12px; }
.user-mini-copy { min-width: 0; display: grid; gap: 3px; }
.user-mini-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-mini-copy small { color: var(--muted); font-size: 10px; }
.logout-form { margin-top: 8px; }
.logout-button { width: 100%; display: flex; justify-content: space-between; padding: 8px 4px; color: #7d8ba1; background: none; border: 0; cursor: pointer; font-size: 11px; }
.logout-button:hover { color: #c05252; }
.main-content { margin-left: 252px; min-height: 100vh; padding: 0 42px 25px; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9edf3; }
.breadcrumb { color: #8792a3; font-size: 11px; }
.breadcrumb span { padding: 0 8px; color: #c4cbd5; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.role-pill { padding: 7px 11px; color: #496381; background: #f0f3f8; border-radius: 18px; font-size: 10px; font-weight: 600; }
.mobile-brand { display: none; }
.flash { max-width: 920px; margin: 17px auto 0; padding: 12px 15px; border: 1px solid #d8ece0; border-radius: 10px; color: #237249; background: #f0fbf4; font-size: 12px; line-height: 1.6; }
.flash.error { border-color: #f3d9d4; color: #a63e35; background: #fff3f1; }
.welcome-row { min-height: 214px; position: relative; display: flex; align-items: center; justify-content: space-between; margin: 28px 0 32px; padding: 34px 40px; overflow: hidden; border-radius: 18px; background: linear-gradient(110deg, #eff4ff 0%, #f5f7ff 55%, #fdf2e9 100%); }
.welcome-row:after { content: ""; position: absolute; right: 0; top: 0; width: 37%; height: 100%; background: linear-gradient(90deg, transparent, #edf2ff78); }
.eyebrow { margin: 0 0 9px; color: #6480b2; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.welcome-row h1 { margin: 0; color: var(--navy); font-size: clamp(24px, 3vw, 33px); letter-spacing: -.04em; }
.wave { color: #efb747; font-size: 23px; vertical-align: 4px; }
.muted { color: var(--muted); line-height: 1.65; }
.welcome-row .muted { max-width: 390px; margin: 10px 0 0; font-size: 12px; }
.welcome-art { position: absolute; width: 300px; height: 100%; right: 38px; top: 0; z-index: 1; }
.art-sun { position: absolute; top: 38px; right: 66px; width: 115px; height: 115px; border-radius: 50%; background: #ffdd9b; opacity: .8; }
.art-book { position: absolute; top: 43px; right: 102px; z-index: 2; color: #fff; font-size: 92px; line-height: 1; transform: rotate(-12deg); text-shadow: 4px 9px 0 #4471b5; }
.art-star { position: absolute; top: 21px; right: 231px; z-index: 3; color: #7292d2; font-size: 29px; }
.art-label { position: absolute; right: 3px; bottom: 31px; color: #7181a4; font: 800 9px/1.65 "Manrope", sans-serif; letter-spacing: .17em; transform: rotate(-7deg); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 19px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 20px; letter-spacing: -.035em; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading .muted { margin: 7px 0 0; font-size: 11px; }
.count-pill { padding: 7px 11px; color: #6480b2; background: #edf3ff; border-radius: 20px; font-size: 10px; font-weight: 700; }
.student-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.student-card { display: block; padding: 18px; border: 1px solid #edf0f5; border-radius: 15px; background: white; transition: transform .18s ease, box-shadow .18s ease; }
.student-card:hover { transform: translateY(-3px); box-shadow: 0 13px 30px #1e34500c; }
.student-card-top { display: flex; justify-content: space-between; align-items: center; }
.avatar-child { width: 45px; height: 45px; font-size: 15px; background: #fff1d7; color: #a8731c; }
.student-card:nth-child(3n+2) .avatar-child { background: #e8e2ff; color: #7259b3; }
.student-card:nth-child(3n) .avatar-child { background: #dff3ea; color: #388963; }
.card-arrow { color: #9eabc0; font-size: 16px; }
.student-card h3 { margin: 14px 0 3px; color: var(--navy); font-size: 15px; }
.student-subtitle { margin: 0; color: #8290a4; font-size: 10px; }
.student-meta { display: flex; justify-content: space-between; gap: 5px; margin: 16px 0 13px; padding-bottom: 12px; border-bottom: 1px solid #f0f2f6; color: #8b96a7; font-size: 9px; }
.card-progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: #8490a2; font-size: 9px; }
.card-progress-label strong { color: var(--blue); }
.progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #edf1f7; }
.progress-track span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg,#4676c9,#7a9ce2); transition: width .3s ease; }
.student-card-bottom { display: flex; justify-content: space-between; gap: 7px; margin-top: 13px; color: #9aa5b4; font-size: 9px; }
.student-card-bottom strong { color: #5e6c81; font-size: 9px; text-align: right; }
.updates-section { margin: 42px 0 10px; }
.section-heading.compact { margin-bottom: 13px; }
.section-heading.compact h2 { font-size: 17px; }
.update-list, .activity-list { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.update-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.update-item:last-child, .activity-row:last-child { border-bottom: 0; }
.update-item:hover, .activity-row:hover { background: #fafbfe; }
.update-dot { width: 8px; height: 8px; border-radius: 50%; background: #5a85d5; box-shadow: 0 0 0 4px #eff4ff; }
.update-item>span:nth-child(2) { flex: 1; display: grid; gap: 4px; }
.update-item strong, .activity-row strong { color: #34445a; font-size: 11px; }
.update-item small, .activity-row small { color: var(--muted); font-size: 10px; }
.update-item time { color: #9aa5b4; font-size: 9px; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 22px 0 38px; }
.metric-card { position: relative; min-height: 132px; display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border: 1px solid #edf0f5; border-radius: 14px; background: white; }
.metric-icon { width: 29px; height: 29px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 9px; font-size: 15px; }
.metric-icon.blue { color: #3866b0; background: #e8f0ff; }
.metric-icon.yellow { color: #a5771d; background: #fff3d8; }
.metric-icon.green { color: #32835f; background: #e4f6ed; }
.metric-icon.purple { color: #7256ac; background: #f0eaff; }
.metric-icon.peach { color: #b25d40; background: #ffebe3; }
.metric-label { color: #7f8ba0; font-size: 10px; }
.metric-card>strong { margin-top: 3px; color: var(--navy); font-size: 23px; letter-spacing: -.04em; }
.metric-card>small { margin-top: 3px; color: #a0a9b6; font-size: 9px; }
.metric-card .progress-track { width: 100%; margin-top: 12px; }
.admin-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; margin: 18px 0 40px; }
.tool-card { padding: 20px; border: 1px solid #edf0f5; border-radius: 15px; background: #fff; }
.tool-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tool-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #426db6; background: #eaf1ff; font-size: 18px; }
.tool-icon.peach { color: #ad6047; background: #ffebe3; }
.tool-icon.yellow { color: #95701e; background: #fff3d8; }
.tool-icon.green { color: #32835f; background: #e4f6ed; }
.tool-heading h3 { margin: 0; color: var(--navy); font-size: 13px; }
.tool-heading p { margin: 4px 0 0; color: #909bad; font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
label { display: grid; gap: 6px; color: #54627a; font-size: 10px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 39px; padding: 9px 11px; color: #34445a; border: 1px solid #e3e8f0; border-radius: 8px; outline: none; background: #fff; font-size: 11px; font-weight: 400; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: #89a5db; box-shadow: 0 0 0 3px #edf3ff; }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button { margin-right: 7px; padding: 4px 7px; border: 0; border-radius: 5px; color: #4167a8; background: #eef3ff; font-size: 9px; }
textarea { resize: vertical; line-height: 1.5; }
label small { color: #98a2b1; font-size: 9px; font-weight: 400; }
.full-span { grid-column: 1/-1; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 700; transition: .18s ease; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 5px 11px #204fa81a; }
.button-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.button-secondary { color: #4167a8; border-color: #dce5f6; background: #f6f8fd; }
.button-secondary:hover { background: #edf3ff; }
.form-hint { margin: 10px 0 0; color: #98a2b1; font-size: 9px; line-height: 1.6; }
.divider { height: 1px; margin: 18px 0; background: var(--line); }
.directory-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -17px 0 24px; }
.directory-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; color: #536b90; border: 1px solid #e1e9f6; border-radius: 20px; background: #fff; font-size: 10px; font-weight: 600; }
.directory-nav a:hover { color: var(--blue); background: var(--blue-soft); }
.directory-nav span { display: inline-grid; min-width: 18px; height: 18px; place-items: center; padding: 0 4px; color: #4269ad; border-radius: 10px; background: #edf3ff; font-size: 8px; }
.directory-section { margin: 27px 0 35px; scroll-margin-top: 85px; }
.directory-table-wrap { overflow-x: auto; border: 1px solid #e9edf4; border-radius: 12px; background: #fff; }
.directory-table { width: 100%; min-width: 750px; border-collapse: collapse; text-align: left; }
.directory-table th { padding: 11px 13px; color: #8490a2; background: #f7f9fc; font-size: 9px; font-weight: 700; }
.directory-table td { padding: 12px 13px; color: #647289; border-top: 1px solid #f0f2f6; font-size: 10px; vertical-align: middle; }
.directory-table td strong { display: block; color: #34445a; font-size: 10px; }
.directory-table td small { display: block; margin-top: 4px; color: #96a1b0; font-size: 9px; }
.directory-status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.directory-status.is-active { color: #32815f; background: #e7f6ee; }
.directory-status.is-inactive { color: #a15a4f; background: #fff0ed; }
.directory-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.table-link, .table-button { padding: 0; color: #456eaf; border: 0; background: transparent; cursor: pointer; font-size: 9px; font-weight: 600; }
.table-button:hover, .table-link:hover { color: #1c4389; text-decoration: underline; }
.table-button.danger { color: #ae6054; }
.account-manager { position: relative; }
.account-manager summary { width: fit-content; padding: 7px 10px; color: #4269ad; border: 1px solid #e1e9f6; border-radius: 7px; background: #f7f9fd; cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; }
.account-manager summary::-webkit-details-marker { display: none; }
.account-manager summary:after { content: "⌄"; margin-left: 7px; color: #8194b4; }
.account-menu { width: min(320px, 70vw); display: grid; gap: 11px; margin-top: 9px; padding: 12px; border: 1px solid #e7ecf4; border-radius: 10px; background: #fff; box-shadow: 0 8px 25px #23395713; white-space: normal; }
.directory-edit-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.directory-edit-form label { font-size: 9px; }
.directory-edit-form input, .directory-edit-form select { min-height: 34px; padding: 7px 8px; font-size: 9px; }
.directory-edit-form .button { grid-column: 1/-1; }
.account-menu>form:not(.directory-edit-form) { margin-top: -3px; }
.empty-state { padding: 37px 20px; border: 1px dashed #dce3ee; border-radius: 14px; background: #fff; text-align: center; }
.empty-state h3 { margin: 8px 0; color: var(--navy); font-size: 14px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; }
.empty-icon { color: #84a1d6; font-size: 26px; }
.compact-empty { padding: 25px 15px; }
.activity-row { display: flex; align-items: center; gap: 14px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.activity-row>span:nth-child(2) { flex: 1; display: grid; gap: 4px; }
.activity-date { width: 48px; color: #6b83ab; font-size: 10px; font-weight: 700; }
.footer { padding: 25px 0 5px; color: #8b96a6; font-size: 9px; }
.footer>span { padding: 0 4px; color: #c4cbd5; }
.footer .footer-dot { color: #eab649; font-size: 7px; }

/* Student workspace */
.student-hero { margin: 23px 0 18px; padding: 20px 24px 23px; border: 1px solid #e9eef8; border-radius: 17px; background: linear-gradient(110deg,#f1f5ff,#fbfcff 68%,#fff5ea); }
.back-link { display: inline-block; margin-bottom: 18px; color: #71819b; font-size: 10px; }
.back-link:hover { color: var(--blue); }
.student-hero-main { display: flex; align-items: center; gap: 17px; }
.avatar-hero { width: 68px; height: 68px; color: #8d6320; background: #ffe8b7; font-size: 22px; }
.student-identity { flex: 1; }
.student-identity .eyebrow { margin-bottom: 5px; }
.student-identity h1 { margin: 0; color: var(--navy); font-size: 24px; letter-spacing: -.04em; }
.identity-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: #77859b; font-size: 10px; }
.identity-meta span:not(:last-child):after { content: "·"; padding-left: 8px; color: #bbc3d0; }
.teacher-chip { min-width: 170px; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #e9edf4; border-radius: 11px; background: #fff; }
.teacher-chip-icon { width: 31px; height: 31px; display: grid; place-items: center; color: #3a6bb8; border-radius: 9px; background: #eaf1ff; }
.teacher-chip span:last-child { display: grid; gap: 4px; }
.teacher-chip small { color: #9aa5b4; font-size: 8px; letter-spacing: .1em; }
.teacher-chip strong { color: #46566d; font-size: 10px; }
.student-metrics { grid-template-columns: repeat(6,minmax(0,1fr)); margin: 0 0 26px; }
.student-metrics .metric-card { min-height: 126px; padding: 13px; }
.student-metrics .metric-icon { margin-bottom: 9px; }
.student-metrics .metric-card>strong { font-size: 20px; }
.student-metrics .metric-label { font-size: 9px; }
.student-metrics .metric-card>small { font-size: 8px; }
.content-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 5px; margin: 0 -3px 25px; padding: 7px 3px; overflow-x: auto; background: #f7f9fcf2; backdrop-filter: blur(8px); }
.content-tabs a { flex: 0 0 auto; padding: 9px 11px; color: #8490a1; border-radius: 8px; font-size: 10px; font-weight: 600; }
.content-tabs a:hover, .content-tabs a.active { color: #315da8; background: #eaf1ff; }
.teacher-menu { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 0 0 22px; padding: 10px; border: 1px solid #e8edf5; border-radius: 13px; background: #f7f9fdf2; backdrop-filter: blur(8px); }
.teacher-menu button { min-height: 42px; padding: 8px 10px; color: #526782; border: 1px solid #e4eaf3; border-radius: 9px; background: #fff; cursor: pointer; font-size: 11px; font-weight: 600; }
.teacher-menu button:hover, .teacher-menu button[aria-pressed="true"] { color: #315da8; border-color: #d4e2fa; background: #eaf1ff; }
.teacher-panel-hidden { display: none !important; }
[data-teacher-panel] { scroll-margin-top: 160px; }
.content-section { margin: 0 0 43px; scroll-margin-top: 75px; }
.timeline { position: relative; margin: 4px 0 0 8px; padding-left: 24px; border-left: 1px solid #dce5f4; }
.timeline-item { position: relative; padding: 0 0 19px; }
.timeline-marker { position: absolute; top: 3px; left: -30px; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: #6490d4; box-shadow: 0 0 0 2px #cbd9ef; }
.timeline-date { margin-bottom: 7px; color: #8390a3; font-size: 9px; font-weight: 600; }
.timeline-card { padding: 16px 18px; border: 1px solid #e9edf4; border-radius: 13px; background: white; }
.timeline-card-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.session-tag { color: #6c86b3; font-size: 8px; font-weight: 700; letter-spacing: .11em; }
.timeline-card h3 { margin: 5px 0 0; color: var(--navy); font-size: 14px; }
.timeline-card>p { margin: 12px 0; color: #69778c; font-size: 11px; line-height: 1.75; }
.timeline-by { color: #a0aaba; font-size: 9px; }
.score-pill { padding: 7px 9px; color: #2e7e5d; border-radius: 9px; background: #e8f7ef; font: 700 13px "Manrope",sans-serif; white-space: nowrap; }
.score-pill small { color: #6d9a83; font: 9px "DM Sans",sans-serif; }
.media-strip { display: flex; gap: 9px; margin-top: 13px; overflow-x: auto; }
.media-thumb { flex: 0 0 auto; width: 95px; height: 72px; overflow: hidden; border-radius: 8px; background: #f0f4fa; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb { display: grid; place-content: center; gap: 4px; color: #5374ad; text-align: center; }
.file-thumb span { font-size: 15px; font-weight: 700; }
.file-thumb small { max-width: 87px; overflow: hidden; color: #8490a0; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.status-badge { display: inline-block; padding: 5px 7px; border-radius: 20px; font-size: 8px; font-weight: 600; white-space: nowrap; }
.status-mastered, .status-present { color: #32815f; background: #e7f6ee; }
.status-developing { color: #946a1d; background: #fff3d7; }
.status-learning { color: #3764ab; background: #eaf1ff; }
.status-not_started { color: #8490a1; background: #eff1f5; }
.status-excused { color: #8360ac; background: #f1eafb; }
.status-absent { color: #aa5a55; background: #ffedeb; }
.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.project-card { overflow: visible; border: 1px solid #e9edf4; border-radius: 13px; background: white; }
.project-cover { height: 145px; position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg,#e5efff,#f4eaff 65%,#fff1d9); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-art { color: #7790bf; font-size: 40px; }
.project-date { position: absolute; left: 10px; bottom: 10px; padding: 5px 7px; color: #51627d; border-radius: 5px; background: #ffffffeb; font-size: 8px; }
.project-copy { padding: 13px; }
.project-copy h3 { margin: 0; color: var(--navy); font-size: 12px; }
.project-copy p { margin: 7px 0; color: #7f8b9b; font-size: 10px; line-height: 1.6; }
.project-skill { color: #6481b2; font-size: 9px; }
.file-link { display: inline-block; margin-top: 8px; color: #426db6; font-size: 9px; font-weight: 600; }
.notes-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.note-card { padding: 16px; border: 1px solid #e9edf4; border-radius: 12px; background: white; }
.note-top { display: flex; justify-content: space-between; color: #9aa5b4; font-size: 9px; }
.note-spark { color: #e8b44e; font-size: 16px; }
.note-teacher { margin: -6px 0 13px; color: #8490a1; font-size: 9px; }
.note-detail { margin-top: 10px; }
.note-detail strong { color: #42526a; font-size: 9px; }
.note-detail p { margin: 4px 0 0; color: #758297; font-size: 10px; line-height: 1.65; }
.attendance-layout { display: grid; grid-template-columns: 170px 1fr; gap: 15px; }
.attendance-summary { display: flex; flex-direction: column; align-items: flex-start; padding: 15px; border: 1px solid #e7ecf4; border-radius: 12px; background: white; }
.attendance-summary .metric-icon { margin-bottom: 8px; }
.attendance-summary>strong { color: var(--navy); font-size: 24px; }
.attendance-summary>span:not(.metric-icon) { color: #78869a; font-size: 10px; }
.attendance-summary>small { margin-top: 8px; color: #a2adbb; font-size: 9px; }
.attendance-list { overflow: visible; padding: 3px 13px; border: 1px solid #e7ecf4; border-radius: 12px; background: white; }
.attendance-row { display: flex; align-items: center; gap: 12px; min-height: 38px; border-bottom: 1px solid #f0f2f6; }
.attendance-row:last-child { border-bottom: 0; }
.attendance-date { width: 73px; color: #5c6e87; font-size: 9px; }
.attendance-row small { color: #9aa5b4; font-size: 9px; }
.timeline-card-actions { display: flex; align-items: center; gap: 8px; }
.record-manager { position: relative; }
.record-manager>summary { width: fit-content; padding: 7px 10px; color: #5575aa; border: 1px solid #e1e9f6; border-radius: 7px; background: #f7f9fd; cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; white-space: nowrap; }
.record-manager>summary::-webkit-details-marker { display: none; }
.record-manager>summary:after { content: "⌄"; margin-left: 6px; color: #8a9ab3; }
.record-manager[open]>summary { color: #315da8; border-color: #cfddf3; background: #edf3ff; }
.record-manager-panel { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: clamp(280px,42vw,430px); max-height: min(72vh,650px); overflow: auto; padding: 13px; border: 1px solid #e4eaf3; border-radius: 11px; background: #fff; box-shadow: 0 12px 32px #243a5a24; }
.record-edit-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.record-edit-form label { font-size: 9px; }
.record-edit-form input, .record-edit-form select, .record-edit-form textarea { min-height: 36px; font-size: 10px; }
.record-manager-panel>form+form { margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0f5; }
.table-button.danger { color: #b35350; }
.table-button.danger:hover { color: #8e302e; }
.report-manage-list { display: grid; gap: 9px; margin-bottom: 14px; }
.report-manage-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #e9edf4; border-radius: 10px; background: #fff; }
.report-manage-card>div { display: grid; gap: 5px; }
.report-manage-card strong { color: #4a5b74; font-size: 10px; }
.report-manage-card a { color: #416cb6; font-size: 9px; font-weight: 600; }
.report-manage-card>.record-manager { flex: 0 0 auto; }
.inline-report-form { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr auto; align-items: end; gap: 9px; padding: 15px; border: 1px solid #e9edf4; border-radius: 12px; background: white; }
.inline-report-form label { font-size: 9px; }
.edit-forms { padding: 18px; border: 1px solid #e7ecf4; border-radius: 15px; background: white; }
.edit-form { padding: 16px; border: 1px solid #edf0f5; border-radius: 11px; background: #fcfdff; }
.edit-form>.button { margin-top: 14px; }
.attendance-form { display: grid; grid-template-columns: .8fr .9fr 1.5fr auto; align-items: end; gap: 10px; }

/* Login */
.login-page { min-height: 100vh; background: #fff; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-visual { position: relative; min-height: 100vh; padding: 39px 8%; overflow: hidden; color: white; background: linear-gradient(145deg,#173e8c 0%,#2356ac 52%,#396cbe 100%); }
.login-visual:before, .login-visual:after { content: ""; position: absolute; border: 1px solid #ffffff18; border-radius: 50%; }
.login-visual:before { width: 490px; height: 490px; right: -240px; top: -225px; }
.login-visual:after { width: 600px; height: 600px; right: -300px; top: -280px; }
.light-brand { position: relative; z-index: 1; color: white; }
.light-brand .brand-mark { color: var(--blue); background: #fff; }
.light-brand small { color: #b9caed; }
.login-message { position: relative; z-index: 2; margin-top: 17vh; }
.login-message .eyebrow { color: #b9c9ee; }
.login-message h1 { margin: 16px 0 15px; font-size: clamp(38px,5vw,63px); line-height: 1.1; letter-spacing: -.055em; }
.login-message h1 em { color: #f8cb71; font-style: normal; }
.login-message>p:last-child { max-width: 380px; color: #d0dcf3; font-size: 13px; line-height: 1.8; }
.login-art { position: absolute; right: 8%; bottom: 10%; width: 310px; height: 200px; }
.orbit { position: absolute; display: block; border: 1px solid #ffffff2c; border-radius: 50%; transform: rotate(-22deg); }
.orbit-one { width: 290px; height: 105px; top: 36px; left: 0; }
.orbit-two { width: 230px; height: 155px; top: 10px; left: 35px; transform: rotate(38deg); }
.orbit-dot { position: absolute; top: 8px; right: 56px; width: 13px; height: 13px; border-radius: 50%; background: #f8cb71; box-shadow: 0 0 0 7px #f8cb7122; }
.orbit-figure { position: absolute; top: 42px; left: 120px; color: #ffda8d; font-size: 58px; text-shadow: 0 10px 22px #102f6c; }
.orbit-caption { position: absolute; right: 11px; bottom: 5px; color: #b7c8e9; font: 700 9px/1.65 "Manrope",sans-serif; letter-spacing: .16em; text-align: right; }
.login-visual-footer { position: absolute; bottom: 32px; color: #b7c8e9; font-size: 10px; }
.login-visual-footer span { padding: 0 5px; color: #f5ca72; }
.login-panel { display: grid; place-items: center; padding: 38px; }
.login-form-wrap { width: min(390px,100%); }
.login-greeting { color: #7d8ba0; font-size: 11px; }
.login-greeting span { color: #e5b34e; }
.login-form-wrap h2 { margin: 12px 0 5px; color: var(--navy); font-size: 28px; letter-spacing: -.045em; }
.login-form-wrap>.muted { margin: 0 0 27px; font-size: 11px; }
.login-form { display: grid; gap: 16px; }
.login-form label { gap: 8px; color: #506079; font-size: 10px; }
.login-form input { min-height: 45px; }
.login-submit { min-height: 44px; margin-top: 5px; font-size: 11px; }
.login-security { display: flex; gap: 9px; margin-top: 25px; color: #909bad; font-size: 9px; line-height: 1.7; }
.login-security span { color: #5378b9; }
.login-brand-note { margin-top: 43px; color: #adb6c3; font-size: 9px; }
.login-brand-note span { padding-left: 4px; color: #e7b64f; }

/* Printable progress report */
.report-body { background: #eef1f6; }
.report-actions { max-width: 850px; display: flex; justify-content: space-between; margin: 22px auto 12px; }
.report-page { max-width: 850px; min-height: 1100px; margin: 0 auto 30px; padding: 47px 57px; background: white; box-shadow: 0 5px 30px #23395713; }
.report-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid #e8edf4; }
.report-brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font: 800 16px "Manrope",sans-serif; letter-spacing: .13em; }
.report-brand small { display: block; margin-top: 4px; color: #8b97a8; font: 700 7px "DM Sans",sans-serif; letter-spacing: .12em; }
.report-kicker { color: #6c83ab; font-size: 8px; font-weight: 700; letter-spacing: .15em; }
.report-page>h1 { margin: 31px 0 7px; color: var(--navy); font-size: 26px; letter-spacing: -.04em; }
.report-intro { margin: 0; color: #8290a3; font-size: 11px; }
.report-profile { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr; gap: 12px; margin: 24px 0 15px; padding: 15px; border: 1px solid #e9edf4; border-radius: 10px; background: #fbfcfe; }
.report-profile div { display: grid; gap: 6px; }
.report-profile small { color: #99a4b2; font-size: 7px; font-weight: 700; letter-spacing: .12em; }
.report-profile strong { color: #43536b; font-size: 9px; }
.report-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 23px; }
.report-stats div { display: grid; gap: 4px; padding: 12px; border-radius: 8px; background: #f0f5ff; }
.report-stats strong { color: #315caa; font-size: 17px; }
.report-stats span { color: #8290a3; font-size: 8px; }
.report-section { margin-top: 20px; break-inside: avoid; }
.report-section h2 { margin: 0 0 10px; padding-bottom: 7px; color: #34455d; border-bottom: 1px solid #edf0f5; font-size: 12px; }
.report-section>p { color: #8994a4; font-size: 9px; }
.report-list { display: grid; gap: 9px; margin: 0; padding-left: 17px; color: #5d6b80; }
.report-list li { padding-left: 3px; font-size: 9px; }
.report-list li::marker { color: #7394ce; }
.report-list a { color: #416cb6; text-decoration: underline; }
.report-list strong { color: #46556c; font-size: 9px; }
.report-list p { margin: 4px 0 0; color: #758297; font-size: 8px; line-height: 1.6; }
.report-table { border: 1px solid #edf0f5; border-radius: 7px; overflow: hidden; }
.report-table-head, .report-table-row { display: grid; grid-template-columns: 1.8fr 1fr .5fr .8fr; gap: 8px; padding: 8px; font-size: 8px; }
.report-table-head { color: #7183a0; background: #f4f7fc; font-weight: 700; }
.report-table-row { color: #66748a; border-top: 1px solid #edf0f5; }
.report-table-row small { display: block; margin-top: 4px; color: #9aa5b4; }
.report-note { margin: 8px 0; padding: 10px; border: 1px solid #edf0f5; border-radius: 7px; }
.report-note>small { color: #98a3b2; font-size: 8px; }
.report-note p { margin: 5px 0 0; color: #69778b; font-size: 8px; line-height: 1.6; }
.report-highlight { margin-top: 11px; padding: 12px; border-radius: 8px; background: #f2f6ff; }
.report-highlight strong { color: #476ba9; font-size: 9px; }
.report-highlight p { margin: 5px 0 0; color: #64748a; font-size: 8px; line-height: 1.7; }
.report-media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.report-media-grid figure { margin: 0; padding: 5px; border: 1px solid #edf0f5; border-radius: 6px; break-inside: avoid; }
.report-media-grid img { width: 100%; height: 100px; display: block; object-fit: cover; border-radius: 4px; }
.report-media-grid figcaption { margin-top: 5px; color: #748198; font-size: 7px; }
.report-footer { display: flex; justify-content: space-between; margin-top: 32px; padding-top: 12px; color: #9ba5b3; border-top: 1px solid #e9edf4; font-size: 8px; }

/* Softer, clearer dashboard groups */
.parent-welcome { min-height: 125px; margin-bottom: 20px; padding: 25px 30px; background: linear-gradient(110deg,#edf4ff,#f8f2ff); }
.parent-child-dashboard { margin-bottom: 36px; scroll-margin-top: 85px; }
.parent-child-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; padding: 15px 18px; border-radius: 14px; background: #eaf2ff; }
.parent-child-heading .avatar { width: 52px; height: 52px; font-size: 17px; }
.parent-child-heading h2 { margin: 0; color: var(--navy); font-size: 18px; }
.parent-child-heading div span { display: block; margin-top: 4px; color: #647895; font-size: 12px; }
.parent-progress-panel, .parent-portfolio { margin-top: 16px; padding: 20px; border: 1px solid #e8edf5; border-radius: 16px; background: #fff; }
.parent-progress-panel { border-top: 5px solid #86a9e3; background: linear-gradient(145deg,#f6f9ff,#fff 55%); }
.parent-portfolio { border-top: 5px solid #e4b96c; background: linear-gradient(145deg,#fffaf0,#fff 55%); }
.parent-section-title { margin-bottom: 17px; }
.parent-section-title h2 { margin: 0; color: var(--navy); font-size: 19px; }
.parent-progress-layout { display: grid; grid-template-columns: 175px 1fr; align-items: center; gap: 25px; }
.progress-ring { width: 158px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#5181d0 0 var(--progress),#e8eef8 var(--progress) 100%); }
.progress-ring>div { width: 122px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: #fff; }
.progress-ring strong { color: #315da9; font: 800 29px "Manrope",sans-serif; }
.progress-ring span { color: #7f8ba0; font-size: 12px; }
.parent-chart-caption { display: flex; align-items: baseline; gap: 7px; margin-bottom: 12px; color: #566982; font-size: 12px; }
.parent-chart-caption strong { color: #315da9; font: 800 16px "Manrope",sans-serif; }
.achievement-chart { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 15px; }
.achievement-row { min-width: 0; padding: 10px 11px; border-radius: 10px; background: #f0f5fd; }
.achievement-row:nth-child(4n+2) { background: #fff5e3; }
.achievement-row:nth-child(4n+3) { background: #edf7f0; }
.achievement-row:nth-child(4n) { background: #f3effa; }
.achievement-row-heading { display: flex; align-items: start; justify-content: space-between; gap: 7px; margin-bottom: 8px; }
.achievement-row-heading strong { color: #40516b; font-size: 12px; line-height: 1.4; }
.achievement-row-heading span { flex: 0 0 auto; color: #687991; font-size: 11px; }
.achievement-track { height: 7px; overflow: hidden; border-radius: 8px; background: #fff; }
.achievement-track span { display: block; height: 100%; border-radius: inherit; background: #6592da; }
.achievement-row:nth-child(4n+2) .achievement-track span { background: #e3b454; }
.achievement-row:nth-child(4n+3) .achievement-track span { background: #66ae83; }
.achievement-row:nth-child(4n) .achievement-track span { background: #9677cb; }
.parent-achievements { margin-top: 18px; }
.parent-achievements h3 { margin: 0 0 9px; color: #52627a; font-size: 13px; }
.achievement-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement-chip { padding: 8px 11px; border-radius: 18px; font-size: 12px; }
.achievement-chip.is-mastered { color: #327250; background: #e6f4eb; }
.achievement-chip.is-developing { color: #8d681c; background: #fff2d6; }
.parent-portfolio-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.parent-project-card { overflow: hidden; border: 1px solid #edf0f5; border-radius: 12px; background: #fff; }
.parent-project-cover { aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg,#e7f0ff,#f3eafd 60%,#fff0d9); }
.parent-project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.parent-project-cover:hover img { transform: scale(1.04); }
.portfolio-placeholder span, .portfolio-file-icon { color: #7591c1; font-size: 34px; }
.parent-project-name { display: grid; gap: 5px; padding: 10px 11px 12px; }
.parent-project-name strong { overflow: hidden; color: #40516b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.parent-project-name time { color: #929eaf; font-size: 10px; }
.portfolio-empty { min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #8da3c6; border-radius: 11px; background: #f7f9fd; font-size: 28px; }
.portfolio-empty span { color: #76869d; font-size: 12px; }
.metric-grid:not(.student-metrics) .metric-card { min-height: 105px; justify-content: center; padding: 18px; border: 0; }
.metric-grid:not(.student-metrics) .metric-card:nth-child(4n+1) { background: #edf4ff; }
.metric-grid:not(.student-metrics) .metric-card:nth-child(4n+2) { background: #fff5df; }
.metric-grid:not(.student-metrics) .metric-card:nth-child(4n+3) { background: #eaf7ef; }
.metric-grid:not(.student-metrics) .metric-card:nth-child(4n) { background: #f2edfc; }
.metric-grid:not(.student-metrics) .metric-icon { margin-bottom: 7px; }
.metric-grid:not(.student-metrics) .metric-label { color: #52627a; font-size: 12px; }
.metric-grid:not(.student-metrics) .metric-card>strong { font-size: 26px; }
.admin-welcome { min-height: 120px; margin-bottom: 20px; padding: 27px 30px; background: linear-gradient(110deg,#eff4ff,#f7f9ff); }
.admin-welcome .welcome-art { display: none; }
.admin-tool label { font-size: 12px; }
.admin-tool input, .admin-tool select { min-height: 43px; font-size: 12px; }
.directory-nav { gap: 10px; margin-top: 0; }
.directory-nav a { min-height: 43px; padding: 9px 16px; font-size: 13px; }
.directory-nav a:nth-child(1) { color: #315b9c; border-color: #d7e5fb; background: #edf4ff; }
.directory-nav a:nth-child(2) { color: #986535; border-color: #f3e1c4; background: #fff5e6; }
.directory-nav a:nth-child(3) { color: #39765b; border-color: #d5ebdf; background: #edf8f1; }
.directory-nav span { font-size: 10px; }
.admin-tool { align-self: start; padding: 0; overflow: hidden; border: 0; }
.admin-tool:nth-child(1) { background: #f1f6ff; }
.admin-tool:nth-child(2) { background: #fff6ea; }
.admin-tool:nth-child(3) { background: #f5f1fc; }
.admin-tool:nth-child(4) { background: #eef8f2; }
.admin-tool .tool-heading { min-height: 76px; margin: 0; padding: 16px; cursor: pointer; list-style: none; }
.admin-tool .tool-heading::-webkit-details-marker { display: none; }
.admin-tool .tool-heading h3 { font-size: 14px; }
.admin-tool .tool-heading>div { flex: 1; }
.tool-toggle { color: #536b90; font-size: 12px; font-weight: 700; }
.tool-toggle:after { content: "＋"; margin-left: 5px; }
.admin-tool[open] .tool-toggle:after { content: "−"; }
.admin-tool>form, .admin-tool>.divider { margin-right: 16px; margin-left: 16px; }
.admin-tool>.form-hint { margin: 10px 16px 16px; }
.admin-tool>form:last-child { margin-bottom: 16px; }
.directory-section { padding: 18px; border: 0; border-top: 5px solid #8aaddf; border-radius: 14px; background: #f2f6ff; }
.directory-section#teacher-directory { border-top-color: #e7b66b; background: #fff8ed; }
.directory-section#parent-directory { border-top-color: #81bd98; background: #f0f8f2; }
.directory-section .section-heading { margin-bottom: 13px; }
.directory-section .section-heading h2 { font-size: 18px; }
.directory-table-wrap { border-color: #e7ebf2; }
.directory-table th { padding: 13px; color: #52627a; background: #e8f0fd; font-size: 11px; }
#teacher-directory .directory-table th { background: #fff0d9; }
#parent-directory .directory-table th { background: #e4f3e9; }
.directory-table td { padding: 14px 13px; color: #52627a; font-size: 12px; }
.directory-table td strong { font-size: 12px; }
.directory-table td small { font-size: 11px; }
.directory-status { font-size: 10px; }
.table-link, .table-button { font-size: 11px; }
.account-manager summary { padding: 9px 12px; font-size: 11px; }
.student-card h3 { font-size: 17px; }
.student-subtitle, .student-meta, .card-progress-label, .student-card-bottom { font-size: 11px; }
.student-card-bottom strong { font-size: 11px; }

@media (max-width: 1150px) {
  .main-content { padding-right: 27px; padding-left: 27px; }
  .student-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .student-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .metric-grid:not(.student-metrics) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inline-report-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inline-report-form .button { grid-column: 1/-1; }
}
@media (max-width: 760px) {
  .sidebar { width: 100%; height: 59px; inset: auto 0 0; flex-direction: row; align-items: center; padding: 5px 14px; border-top: 1px solid #e9edf3; border-right: 0; }
  .sidebar>.brand, .side-label, .side-footer { display: none; }
  .side-nav { width: 100%; display: flex; justify-content: space-around; }
  .side-nav a { flex-direction: column; gap: 2px; padding: 5px 12px; font-size: 8px; }
  .side-nav a.active:before { width: 25px; height: 2px; top: -5px; left: calc(50% - 12px); border-radius: 0 0 4px 4px; }
  .nav-icon { font-size: 17px; }
  .main-content { margin-left: 0; padding: 0 17px 78px; }
  .topbar { height: 60px; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; color: var(--navy); font: 800 12px "Manrope",sans-serif; letter-spacing: .1em; }
  .mobile-brand .brand-mark { width: 29px; height: 29px; border-radius: 9px; font-size: 16px; }
  .breadcrumb { display: none; }
  .role-pill { padding: 6px 8px; font-size: 9px; }
  .welcome-row { min-height: 179px; margin: 17px 0 25px; padding: 25px 21px; }
  .admin-welcome { min-height: 92px; margin: 14px 0 17px; padding: 20px; }
  .admin-welcome h1 { max-width: 100%; font-size: 22px; }
  .welcome-row h1 { max-width: 70%; font-size: 24px; }
  .welcome-row .muted { max-width: 63%; font-size: 10px; }
  .welcome-art { width: 175px; right: 0; opacity: .8; }
  .art-sun { width: 82px; height: 82px; top: 37px; right: 39px; }
  .art-book { top: 42px; right: 62px; font-size: 63px; }
  .art-star { top: 27px; right: 136px; font-size: 21px; }
  .art-label { right: 3px; bottom: 24px; font-size: 7px; }
  .section-heading h2 { font-size: 17px; }
  .student-grid { grid-template-columns: 1fr; gap: 10px; }
  .student-card { padding: 15px; }
  .student-card h3 { margin-top: 10px; }
  .metric-grid:not(.student-metrics) { gap: 9px; margin: 16px 0 29px; }
  .metric-card { min-height: 118px; padding: 12px; }
  .metric-card>strong { font-size: 20px; }
  .admin-tools { grid-template-columns: 1fr; }
  .student-hero { margin-top: 15px; padding: 15px; }
  .back-link { margin-bottom: 13px; }
  .student-hero-main { align-items: flex-start; flex-wrap: wrap; gap: 11px; }
  .avatar-hero { width: 52px; height: 52px; font-size: 17px; }
  .student-identity { min-width: calc(100% - 65px); }
  .student-identity h1 { font-size: 20px; }
  .identity-meta { font-size: 9px; gap: 5px; }
  .identity-meta span:not(:last-child):after { padding-left: 5px; }
  .teacher-chip { width: 100%; min-width: 0; padding: 8px 10px; }
  .student-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 17px; }
  .student-metrics .metric-card { min-height: 111px; padding: 11px; }
  .student-metrics .metric-card>strong { font-size: 18px; }
  .student-metrics .metric-label { font-size: 8px; }
  .student-metrics .metric-card>small { font-size: 8px; }
  .content-tabs { margin-bottom: 20px; }
  .teacher-menu { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 0 0 17px; padding: 7px; }
  .teacher-menu button { min-height: 39px; padding: 7px 5px; font-size: 10px; }
  [data-teacher-panel] { scroll-margin-top: 190px; }
  .content-section { margin-bottom: 32px; }
  .section-heading { align-items: flex-start; }
  .section-heading>.button { padding: 0 10px; font-size: 9px; white-space: nowrap; }
  .timeline { margin-left: 5px; padding-left: 18px; }
  .timeline-marker { left: -24px; }
  .timeline-card { padding: 13px; }
  .timeline-card h3 { font-size: 12px; }
  .timeline-card>p { font-size: 10px; }
  .record-manager-panel { position: absolute; top: calc(100% + 6px); right: 0; bottom: auto; width: min(390px,calc(100vw - 40px)); max-height: 65vh; }
  .record-edit-form { gap: 8px; }
  .report-manage-card { align-items: flex-start; padding: 10px; }
  .attendance-row { flex-wrap: wrap; gap: 7px 10px; padding: 8px 0; }
  .attendance-row .record-manager { margin-left: auto; }
  .attendance-row>small { flex: 1 1 100%; padding-left: 83px; }
  .skill-grid, .project-grid, .notes-grid { grid-template-columns: 1fr; }
  .project-cover { height: 175px; }
  .attendance-layout { grid-template-columns: 1fr; }
  .attendance-summary { display: grid; grid-template-columns: 36px 45px 1fr; align-items: center; gap: 4px; }
  .attendance-summary .metric-icon { grid-row: span 2; margin: 0; }
  .attendance-summary>strong { font-size: 19px; }
  .attendance-summary>span:not(.metric-icon) { align-self: end; }
  .attendance-summary>small { grid-column: 2/-1; margin: -6px 0 0; }
  .inline-report-form { grid-template-columns: 1fr 1fr; }
  .inline-report-form .wide-label { grid-column: 1/-1; }
  .attendance-form { grid-template-columns: 1fr 1fr; }
  .attendance-form .wide-label { grid-column: 1/-1; }
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { min-height: 280px; padding: 23px 25px; }
  .login-message { margin-top: 38px; }
  .login-message h1 { margin: 8px 0; font-size: 36px; }
  .login-message>p:last-child { max-width: 65%; margin: 0; font-size: 10px; }
  .login-art { width: 150px; height: 110px; right: 15px; bottom: 4px; transform: scale(.65); transform-origin: bottom right; }
  .login-visual-footer { bottom: 11px; left: 25px; font-size: 8px; }
  .login-panel { padding: 37px 24px 55px; }
  .login-form-wrap h2 { font-size: 24px; }
  .report-actions { margin: 13px; }
  .report-page { width: 100%; min-height: 0; margin: 0; padding: 26px 19px; }
  .report-page>h1 { font-size: 21px; }
  .report-profile { grid-template-columns: repeat(2,1fr); }
  .report-stats { gap: 6px; }
  .report-stats div { padding: 9px; }
  .report-table-head, .report-table-row { grid-template-columns: 1.5fr 1fr .4fr .7fr; gap: 4px; padding: 6px 4px; font-size: 7px; }
  .directory-section { padding: 12px; margin-top: 20px; }
  .directory-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-bottom: 17px; }
  .directory-nav a { justify-content: center; gap: 5px; padding: 8px 6px; font-size: 11px; }
  .admin-tools { gap: 9px; margin-bottom: 25px; }
  .admin-tool .tool-heading { min-height: 66px; padding: 12px; }
  .admin-tool .tool-heading h3 { font-size: 13px; }
  .admin-tool label { font-size: 12px; }
  .admin-tool input, .admin-tool select { font-size: 12px; }
  .directory-table { min-width: 680px; }
  .directory-table th { font-size: 10px; }
  .directory-table td { font-size: 11px; }
  .directory-table td strong { font-size: 11px; }
  .parent-welcome { min-height: 95px; margin: 14px 0 17px; padding: 20px; }
  .parent-child-heading { padding: 12px; }
  .parent-progress-panel, .parent-portfolio { padding: 14px; }
  .parent-progress-layout { grid-template-columns: 98px minmax(0,1fr); align-items: start; gap: 12px; }
  .progress-ring { width: 98px; }
  .progress-ring>div { width: 76px; }
  .progress-ring strong { font-size: 21px; }
  .progress-ring span { font-size: 10px; }
  .parent-chart-caption { flex-wrap: wrap; gap: 3px 6px; margin-bottom: 8px; font-size: 10px; }
  .parent-chart-caption strong { font-size: 13px; }
  .achievement-chart { grid-template-columns: 1fr; gap: 7px; }
  .achievement-row { padding: 9px; }
  .achievement-row-heading strong { font-size: 11px; }
  .achievement-row-heading span { font-size: 10px; }
  .parent-portfolio-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .parent-project-name { padding: 9px; }
  .parent-project-name strong { font-size: 11px; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  body.report-body { background: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-actions { display: none; }
  .report-page { width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .report-section, .report-profile, .report-stats, .report-note { break-inside: avoid; }
}
