:root {
  color-scheme: light;
  --font: 'Vazirmatn', Tahoma, Arial, sans-serif;
  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-soft: #f8f9fd;
  --surface-hover: #f1f3fb;
  --text: #202944;
  --muted: #7b849b;
  --muted-2: #a0a8ba;
  --border: #e8ebf3;
  --primary: #5665dd;
  --primary-dark: #3948bd;
  --primary-soft: #eef0ff;
  --purple: #8068dc;
  --cyan: #3aa6c9;
  --coral: #ed7888;
  --green: #28a879;
  --green-soft: #eaf8f2;
  --amber: #d99a36;
  --amber-soft: #fff6e8;
  --red: #df6675;
  --red-soft: #fff0f2;
  --sidebar: #19234a;
  --sidebar-2: #242f5b;
  --sidebar-text: #dce2ff;
  --shadow-sm: 0 3px 14px rgba(32, 45, 93, .045);
  --shadow-md: 0 14px 40px rgba(32, 45, 93, .10);
  --radius: 18px;
  --radius-sm: 12px;
  --transition: .22s ease;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11182b;
  --surface: #1a2339;
  --surface-soft: #202b43;
  --surface-hover: #27334e;
  --text: #edf1ff;
  --muted: #a2acc3;
  --muted-2: #77839d;
  --border: #2b3853;
  --primary: #8992ff;
  --primary-dark: #aeb4ff;
  --primary-soft: #2b3157;
  --purple: #a38ce9;
  --cyan: #63c0dc;
  --coral: #ff91a0;
  --green: #61cba0;
  --green-soft: #1e3e39;
  --amber: #e8b45e;
  --amber-soft: #443824;
  --red: #ff8795;
  --red-soft: #482a37;
  --sidebar: #10172c;
  --sidebar-2: #171f39;
  --sidebar-text: #e0e5ff;
  --shadow-sm: 0 3px 14px rgba(0,0,0,.12);
  --shadow-md: 0 14px 40px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font-family: var(--font); font-size: 14px; line-height: 1.7; transition: background var(--transition), color var(--transition); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(86,101,221,.25); outline-offset: 2px; }
svg { display: block; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot-title { font-weight: 800; color: var(--text); font-size: 16px; }
.boot-line { width: 82px; height: 3px; border-radius: 20px; background: linear-gradient(90deg,var(--primary),var(--cyan),var(--coral)); animation: boot 1s ease-in-out infinite alternate; }
@keyframes boot { to { width: 130px; opacity: .55; } }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; background: linear-gradient(145deg,#717bf0,#31a6cb); box-shadow: 0 7px 18px rgba(75,104,220,.25); }
.brand-mark-large { width: 58px; height: 58px; font-size: 28px; border-radius: 19px; }

/* Login */
.login-screen { min-height: 100vh; padding: 28px; display: grid; place-items: center; background: radial-gradient(circle at 15% 15%,rgba(111,120,237,.11),transparent 30%), radial-gradient(circle at 88% 85%,rgba(58,166,201,.10),transparent 29%), var(--bg); }
.login-wrap { width: min(1050px,100%); min-height: 600px; display: grid; grid-template-columns: 1fr 1.02fr; border: 1px solid var(--border); border-radius: 30px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-md); }
.login-art { position: relative; overflow: hidden; padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 80% 16%,rgba(120,136,255,.52),transparent 29%), linear-gradient(145deg,#1a2550,#303b78 60%,#315d8a); }
.login-art:before,.login-art:after { content: ''; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; width: 420px; height: 420px; left: -175px; bottom: -180px; }
.login-art:after { width: 310px; height: 310px; left: -120px; bottom: -125px; }
.art-top,.art-bottom,.art-center { position: relative; z-index: 1; }
.art-brand { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 800; }
.art-brand .brand-mark { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.20); }
.art-center { margin-block: 55px; }
.art-center h1 { font-size: clamp(29px,4vw,43px); line-height: 1.45; margin: 0 0 14px; letter-spacing: -.7px; }
.art-center p { max-width: 360px; color: rgba(255,255,255,.73); margin: 0; font-size: 14px; }
.art-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; }
.art-stat strong { display: block; font-size: 23px; }
.art-stat span { display: block; color: rgba(255,255,255,.68); font-size: 11px; }
.art-bottom { color: rgba(255,255,255,.60); font-size: 11px; }
.login-form-side { padding: clamp(28px,5vw,58px); display: flex; flex-direction: column; justify-content: center; }
.login-form-side h2 { font-size: 25px; margin: 0 0 6px; }
.login-form-side .sub { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.role-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin: 18px 0 22px; }
.role-option { position: relative; min-height: 94px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); text-align: right; padding: 13px; color: var(--text); transition: var(--transition); }
.role-option:hover { border-color: var(--primary); transform: translateY(-2px); }
.role-option.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.role-option .role-icon { width: 33px; height: 33px; display: grid; place-items: center; color: var(--primary); background: var(--surface); border-radius: 10px; margin-bottom: 7px; }
.role-option strong { display: block; font-size: 13px; }
.role-option small { display: block; color: var(--muted); font-size: 10px; }
.demo-notice { display: flex; gap: 9px; align-items: flex-start; padding: 12px 13px; color: var(--muted); background: var(--surface-soft); border: 1px dashed var(--border); border-radius: 13px; font-size: 11px; margin: 0 0 19px; }
.demo-notice .icon { color: var(--amber); flex: 0 0 auto; }
.login-action { width: 100%; }
.login-terms { color: var(--muted-2); text-align: center; font-size: 10px; margin: 18px 0 0; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 15px 18px; color: var(--sidebar-text); background: linear-gradient(180deg,var(--sidebar),var(--sidebar-2)); display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 26px; border-bottom: 1px solid rgba(255,255,255,.10); }
.sidebar-brand .brand-name { font-weight: 800; font-size: 14px; color: #fff; }
.sidebar-brand .brand-sub { display: block; font-size: 9px; color: rgba(224,229,255,.58); font-weight: 400; margin-top: 1px; }
.sidebar-label { padding: 19px 12px 8px; color: rgba(220,226,255,.42); font-size: 10px; font-weight: 600; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 9px 12px; border: 0; border-radius: 11px; background: transparent; color: rgba(227,232,255,.73); text-align: right; font-size: 12px; transition: var(--transition); }
.nav-item .icon { color: rgba(227,232,255,.65); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: linear-gradient(100deg,rgba(117,126,255,.27),rgba(67,154,201,.13)); box-shadow: inset -3px 0 0 #8e9bff; }
.nav-item.active .icon { color: #aab4ff; }
.nav-spacer { flex: 1; min-height: 22px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 13px 8px 4px; border-top: 1px solid rgba(255,255,255,.10); }
.avatar { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(145deg,#7c83ef,#3a9fc3); }
.sidebar-user strong { display: block; font-size: 11px; color: #fff; }
.sidebar-user small { color: rgba(224,229,255,.55); font-size: 9px; }
.sidebar-user button { margin-right: auto; }
.sidebar-scrim { display: none; }
.main-area { min-width: 0; padding: 0 clamp(16px,3vw,34px) 36px; }
.topbar { min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title h1 { font-size: 20px; line-height: 1.4; margin: 0; font-weight: 800; }
.topbar-title p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.date-pill { display: flex; align-items: center; gap: 7px; color: var(--muted); padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; font-size: 10px; white-space: nowrap; }
.icon-button { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--muted); background: var(--surface); border-radius: 12px; transition: var(--transition); }
.icon-button:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.notification-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); top: 8px; left: 9px; border: 1px solid var(--surface); }
.mobile-menu { display: none; }
.page-content { padding-top: 23px; animation: pageIn .26s ease both; }
@keyframes pageIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.page-intro h2 { font-size: 17px; margin: 0; }
.page-intro p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.intro-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Common components */
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 8px 14px; font-size: 11px; font-weight: 600; transition: var(--transition); white-space: nowrap; }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none !important; }
.btn-primary { color: #fff; background: linear-gradient(110deg,var(--primary),#6975e9); box-shadow: 0 5px 13px rgba(86,101,221,.18); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 17px rgba(86,101,221,.26); }
.btn-secondary { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--muted-2); }
.btn-soft { color: var(--primary); background: var(--primary-soft); }
.btn-danger { color: var(--red); background: var(--red-soft); }
.btn-small { min-height: 30px; padding: 5px 9px; border-radius: 8px; font-size: 10px; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.icon-sm { width: 15px; height: 15px; }
.surface { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.surface-pad { padding: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h3 { font-size: 13px; margin: 0; }
.section-head p { color: var(--muted); margin: 2px 0 0; font-size: 10px; }
.text-link { border: 0; background: transparent; color: var(--primary); font-size: 10px; font-weight: 700; padding: 4px; }
.text-link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 7px; padding: 3px 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge.success { color: var(--green); background: var(--green-soft); }
.badge.warning { color: var(--amber); background: var(--amber-soft); }
.badge.danger { color: var(--red); background: var(--red-soft); }
.badge.info { color: var(--primary); background: var(--primary-soft); }
.badge.neutral { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1/-1; }
.field label { font-size: 10px; color: var(--muted); font-weight: 700; }
.field input,.field select,.field textarea,.toolbar-search { width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; background: var(--surface-soft); color: var(--text); outline: none; font-size: 11px; transition: var(--transition); }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus,.field select:focus,.field textarea:focus,.toolbar-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(86,101,221,.09); }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 13px; }
.search-wrap { position: relative; flex: 1 1 220px; max-width: 340px; }
.search-wrap .icon { position: absolute; right: 11px; top: 11px; color: var(--muted-2); }
.search-wrap .toolbar-search { padding-right: 36px; }
.toolbar select { min-width: 130px; min-height: 39px; padding: 7px 10px; color: var(--text); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; text-align: right; }
th { padding: 12px 14px; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 10px; white-space: nowrap; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-soft); }
.table-person { display: flex; align-items: center; gap: 9px; }
.table-person .avatar { width: 31px; height: 31px; border-radius: 10px; font-size: 10px; }
.table-person strong { display: block; font-size: 10px; }
.table-person small { display: block; color: var(--muted); font-size: 9px; }
.row-actions { display: flex; gap: 5px; }
.empty-state { text-align: center; color: var(--muted); padding: 34px 15px; }
.empty-state .empty-icon { width: 45px; height: 45px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 15px; background: var(--primary-soft); color: var(--primary); }
.empty-state strong { color: var(--text); display: block; font-size: 12px; }
.empty-state p { margin: 4px 0 0; font-size: 10px; }

/* Dashboard */
.welcome-banner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 25px; color: #fff; border-radius: 20px; background: radial-gradient(circle at 85% 20%,rgba(255,255,255,.20),transparent 25%),linear-gradient(112deg,#404eae,#626dde 56%,#4c91ba); box-shadow: 0 12px 25px rgba(73,91,190,.18); margin-bottom: 17px; }
.welcome-banner:after { content: ''; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; left: -75px; bottom: -150px; box-shadow: 0 0 0 30px rgba(255,255,255,.035),0 0 0 60px rgba(255,255,255,.025); }
.welcome-text { position: relative; z-index: 1; }
.welcome-text .eyebrow { font-size: 10px; color: rgba(255,255,255,.72); }
.welcome-text h2 { font-size: 21px; margin: 3px 0 4px; }
.welcome-text p { font-size: 11px; color: rgba(255,255,255,.77); margin: 0; }
.welcome-meta { position: relative; z-index: 1; text-align: left; font-size: 10px; color: rgba(255,255,255,.78); }
.welcome-meta strong { display: block; color: #fff; font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 17px; }
.stat-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.stat-icon.purple { color: var(--primary); background: var(--primary-soft); }
.stat-icon.cyan { color: var(--cyan); background: rgba(58,166,201,.12); }
.stat-icon.coral { color: var(--coral); background: rgba(237,120,136,.13); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-trend { color: var(--green); font-size: 9px; font-weight: 700; }
.stat-card strong { display: block; font-size: 25px; line-height: 1.35; margin-top: 12px; }
.stat-card .stat-label { color: var(--muted); font-size: 10px; }
.stat-foot { margin-top: 8px; color: var(--muted-2); font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(270px,.9fr); gap: 14px; margin-bottom: 14px; }
.chart-card { min-height: 280px; }
.chart-legend { display: flex; align-items: center; gap: 13px; font-size: 9px; color: var(--muted); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 3px; margin-left: 5px; background: var(--primary); }
.legend-dot.alt { background: var(--cyan); }
.chart-area { height: 174px; display: flex; align-items: flex-end; gap: clamp(12px,3vw,27px); padding: 8px 12px 0; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top,transparent 0,transparent 42px,var(--border) 43px,transparent 44px); }
.chart-col { height: 100%; flex: 1; display: flex; justify-content: flex-end; align-items: center; flex-direction: column; gap: 7px; min-width: 0; }
.chart-bars { height: 145px; width: 100%; display: flex; justify-content: center; align-items: flex-end; gap: 5px; }
.chart-bar { width: min(17px,35%); min-height: 4px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg,#8992f4,#5968df); transition: height .4s ease; }
.chart-bar.alt { background: linear-gradient(180deg,#69c1d9,#3299b9); }
.chart-col span { color: var(--muted); font-size: 9px; }
.chart-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 9px; }
.chart-summary strong { color: var(--green); }
.notice-list { display: grid; gap: 12px; }
.notice-item { display: flex; align-items: flex-start; gap: 10px; }
.notice-dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.notice-dot.important { background: var(--coral); box-shadow: 0 0 0 4px rgba(237,120,136,.13); }
.notice-item strong { display: block; font-size: 10px; }
.notice-item p { color: var(--muted); margin: 3px 0 4px; font-size: 9px; line-height: 1.7; }
.notice-item small { color: var(--muted-2); font-size: 8px; }
.dashboard-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.quick-item { min-height: 85px; border: 1px solid var(--border); background: var(--surface-soft); border-radius: 13px; color: var(--text); display: grid; place-items: center; align-content: center; gap: 7px; transition: var(--transition); font-size: 9px; }
.quick-item:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.quick-item .quick-icon { color: var(--primary); }
.activity-list { display: grid; gap: 10px; }
.activity-item { display: flex; align-items: flex-start; gap: 9px; }
.activity-icon { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.activity-item strong { display: block; font-size: 9px; }
.activity-item small { color: var(--muted); font-size: 8px; }

/* Other page layouts */
.cards-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.teacher-card,.class-card { padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.teacher-head { display: flex; align-items: center; gap: 10px; }
.teacher-head .avatar { width: 43px; height: 43px; border-radius: 14px; }
.teacher-head strong { display: block; font-size: 11px; }
.teacher-head small { color: var(--muted); font-size: 9px; }
.teacher-meta { display: flex; justify-content: space-between; gap: 7px; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; color: var(--muted); font-size: 9px; }
.class-card { position: relative; overflow: hidden; }
.class-top { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.class-tag { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.class-card h3 { margin: 12px 0 2px; font-size: 13px; }
.class-card p { margin: 0; font-size: 9px; color: var(--muted); }
.capacity { margin-top: 15px; }
.capacity-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; margin-bottom: 6px; }
.progress-track { height: 6px; border-radius: 10px; background: var(--surface-hover); overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--primary),var(--cyan)); }
.grade-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.grade-summary strong { font-size: 17px; display: block; }
.grade-summary span { color: var(--muted); font-size: 9px; }
.attendance-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 9px; color: var(--muted); }
.attendance-mark { min-width: 105px; padding: 6px 8px; border: 1px solid var(--border); color: var(--text); border-radius: 8px; background: var(--surface); font-size: 9px; }
.attendance-mark.present { color: var(--green); background: var(--green-soft); border-color: transparent; }
.attendance-mark.absent { color: var(--red); background: var(--red-soft); border-color: transparent; }
.attendance-mark.late { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.report-sheet { max-width: 860px; margin: auto; padding: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: 17px; box-shadow: var(--shadow-sm); }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 17px; border-bottom: 2px solid var(--primary); }
.report-school { display: flex; align-items: center; gap: 11px; }
.report-school h3 { margin: 0; font-size: 15px; }
.report-school p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.report-student-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 16px 0; }
.report-data { padding: 9px 10px; border-radius: 9px; background: var(--surface-soft); }
.report-data small { display: block; color: var(--muted); font-size: 8px; }
.report-data strong { font-size: 10px; }
.notice-card { padding: 17px; display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.notice-card + .notice-card { margin-top: 10px; }
.notice-card-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--primary); background: var(--primary-soft); }
.notice-card h3 { margin: 0 0 4px; font-size: 12px; }
.notice-card p { margin: 0 0 8px; color: var(--muted); font-size: 10px; line-height: 1.9; }
.notice-card small { color: var(--muted-2); font-size: 9px; }

/* Modal and toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 17px; background: rgba(14,22,47,.52); backdrop-filter: blur(5px); animation: fade .15s ease; }
.modal { width: min(560px,100%); max-height: min(90vh,760px); overflow: auto; border: 1px solid var(--border); border-radius: 19px; background: var(--surface); box-shadow: 0 25px 70px rgba(0,0,0,.24); animation: modalIn .2s ease; }
@keyframes fade { from { opacity:0; } to { opacity:1; } }
@keyframes modalIn { from { opacity:0; transform:translateY(9px) scale(.985); } to { opacity:1; transform:none; } }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 19px; background: var(--surface); border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 14px; }
.modal-body { padding: 19px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 17px; margin-top: 16px; border-top: 1px solid var(--border); }
.toast-region { position: fixed; z-index: 100; bottom: 18px; left: 18px; display: grid; gap: 8px; width: min(340px,calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); font-size: 10px; animation: toastIn .22s ease; }
.toast .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
@keyframes toastIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* Responsive */
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 225px minmax(0,1fr); }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: 0; right: 0; width: 270px; transform: translateX(105%); transition: transform .25s ease; box-shadow: var(--shadow-md); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { display: none; position: fixed; inset: 0; z-index: 25; background: rgba(10,16,36,.40); }
  .sidebar-scrim.show { display: block; }
  .mobile-menu { display: grid; }
  .main-area { padding-inline: 18px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .login-screen { padding: 12px; }
  .login-wrap { grid-template-columns: 1fr; min-height: auto; border-radius: 22px; }
  .login-art { padding: 23px 24px; min-height: 240px; }
  .art-center { margin: 27px 0; }
  .art-center h1 { font-size: 26px; }
  .art-stats { margin-top: 18px; gap: 20px; }
  .art-bottom { display: none; }
  .login-form-side { padding: 25px 22px 28px; }
  .role-option { min-height: 83px; }
  .topbar { min-height: 70px; }
  .topbar-title h1 { font-size: 16px; }
  .topbar-title p { display: none; }
  .date-pill { display: none; }
  .main-area { padding-inline: 13px; }
  .page-content { padding-top: 16px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .welcome-banner { padding: 18px; align-items: flex-start; }
  .welcome-text h2 { font-size: 17px; }
  .welcome-meta { display: none; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card strong { font-size: 21px; margin-top: 9px; }
  .stat-icon { width: 33px; height: 33px; }
  .stat-trend { display: none; }
  .surface-pad { padding: 14px; }
  .quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cards-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .report-sheet { padding: 16px; }
  .report-student-grid { grid-template-columns: repeat(2,1fr); }
  .report-head { align-items: flex-start; }
  .report-school h3 { font-size: 12px; }
  .toolbar { align-items: stretch; }
  .toolbar .search-wrap { max-width: none; flex-basis: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body { background: #fff !important; color: #111 !important; }
  .sidebar,.topbar,.page-intro,.no-print,.toast-region { display: none !important; }
  .app-shell { display: block; }
  .main-area { padding: 0 !important; }
  .page-content { padding: 0 !important; }
  .report-sheet { max-width: none; border: 0; box-shadow: none; border-radius: 0; padding: 0; color: #111 !important; }
  .report-data { background: #f5f5f5 !important; }
  .report-sheet table { min-width: 0; }
  .report-sheet th,.report-sheet td { color: #111 !important; }
}
