:root {
  color-scheme: light;
  --ink: #20283d;
  --ink-soft: #39435a;
  --muted: #82899c;
  --line: #e8eaf0;
  --paper: #fff;
  --canvas: #f5f7fb;
  --purple: #7262e8;
  --purple-dark: #5c4bd0;
  --purple-soft: #f0edff;
  --mint: #e8f7f1;
  --mint-ink: #28856a;
  --amber: #fff4df;
  --amber-ink: #a97317;
  --rose: #fff0ee;
  --rose-ink: #c75d53;
  --shadow: 0 10px 35px rgb(32 40 61 / 5%);
  font-family: "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgb(114 98 232 / 32%); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: inherit; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 0.9fr); align-items: center; padding: 7vh 10vw; position: relative; overflow: hidden; background: #fff; }
.login-decoration { min-height: 560px; height: 72vh; max-height: 760px; margin-right: 7vw; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 30px; background: linear-gradient(145deg, #eeeaff 0%, #f7f3ff 46%, #e9f7f4 100%); }
.login-decoration::before, .login-decoration::after { content: ""; position: absolute; border-radius: 50%; background: rgb(255 255 255 / 32%); }
.login-decoration::before { width: 440px; height: 440px; left: -185px; top: -170px; }
.login-decoration::after { width: 330px; height: 330px; right: -132px; bottom: -100px; }
.decoration-orbit { position: absolute; border: 1px solid rgb(114 98 232 / 18%); border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { width: 460px; height: 230px; }
.orbit-two { width: 580px; height: 290px; }
.decoration-card { position: relative; width: 132px; height: 132px; display: grid; place-items: center; border-radius: 36px; background: #fff; box-shadow: 0 28px 65px rgb(66 53 156 / 17%); color: var(--purple); font: 800 39px "Segoe UI", sans-serif; letter-spacing: -4px; transform: rotate(-8deg); }
.login-card { width: min(100%, 430px); justify-self: center; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 19px "Segoe UI", sans-serif; letter-spacing: -0.8px; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; color: #fff; background: var(--purple); font: 800 12px "Segoe UI", sans-serif; letter-spacing: -1px; box-shadow: 0 6px 13px rgb(114 98 232 / 22%); }
.brand-light { font-weight: 500; color: var(--purple); }
.brand-login { margin-bottom: 68px; }
.eyebrow, .nav-caption { font-size: 10px; font-weight: 700; letter-spacing: 1.3px; color: #9a91dd; }
.login-card h1 { margin: 11px 0 8px; font: 800 30px "Segoe UI", sans-serif; letter-spacing: -1.3px; }
.muted { color: var(--muted); }
.login-copy { margin: 0 0 31px; font-size: 14px; }
.form-stack { display: flex; flex-direction: column; }
.form-stack label, .field label { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin: 14px 0 7px; }
.form-stack input, .field input, .field select, .field textarea, .filter-control input, .filter-control select, .toolbar-search input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.form-stack input:focus, .field input:focus, .field select:focus, .field textarea:focus, .filter-control input:focus, .filter-control select:focus, .toolbar-search input:focus { border-color: #a59bf1; box-shadow: 0 0 0 3px rgb(114 98 232 / 10%); outline: 0; }
.form-stack input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #b5bac7; }
.form-error { margin: 12px 0 0; color: #b74238; font-size: 12px; line-height: 1.5; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; padding: 0 15px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .62; transform: none; }
.button-primary { color: #fff; background: var(--purple); box-shadow: 0 5px 12px rgb(114 98 232 / 18%); }
.button-primary:hover { background: var(--purple-dark); }
.button-quiet { color: var(--ink-soft); background: #f2f3f7; }
.button-outline { border: 1px solid var(--line); color: var(--ink-soft); background: #fff; }
.button-danger { color: #b04c43; background: var(--rose); }
.button-full { width: 100%; min-height: 48px; margin-top: 24px; font-size: 13px; }
.login-security { margin: 23px 0 0; text-align: center; color: #969cad; font-size: 11px; }
.login-security span { margin-right: 5px; color: #40a98b; font-size: 9px; }
.login-footnote { position: absolute; right: 10vw; bottom: 22px; color: #9ba1b0; font-size: 11px; }
.login-footnote span { margin: 0 5px; color: #c1bbf3; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 248px; padding: 23px 15px 15px; overflow-y: auto; background: #fff; border-right: 1px solid #eef0f4; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 25px; }
.school-switch { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border: 1px solid #eeeef3; border-radius: 11px; background: #fbfbfd; }
.school-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--purple-dark); background: var(--purple-soft); font: 800 13px "Segoe UI", sans-serif; }
.school-copy, .profile-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.school-copy strong, .profile-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.school-copy small, .profile-copy small { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.switch-chevron { color: #a0a5b4; font-size: 16px; }
.nav-caption { margin: 29px 9px 11px; color: #a2a7b5; font-size: 9px; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { position: relative; min-height: 41px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 9px; padding: 0 11px; color: #747c90; background: transparent; text-align: left; font-size: 12px; font-weight: 600; transition: background .15s, color .15s; }
.nav-item:hover { color: var(--purple-dark); background: #f7f6ff; }
.nav-item.active { color: var(--purple-dark); background: var(--purple-soft); }
.nav-item.active::before { position: absolute; top: 10px; bottom: 10px; left: -15px; width: 3px; border-radius: 0 3px 3px 0; background: var(--purple); content: ""; }
.nav-icon { width: 19px; text-align: center; font-size: 17px; font-weight: 500; }
.sidebar-bottom { margin-top: auto; }
.help-card { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px 9px; border-radius: 11px; background: #f8f7ff; color: #7769d8; }
.help-bubble { width: 25px; height: 25px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #a79bec; font-size: 12px; font-weight: 700; }
.help-card div { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.help-card strong { font-size: 10px; }
.help-card small { color: #9690bd; font-size: 9px; }
.help-card > span:last-child { font-size: 14px; }
.sidebar-profile { display: flex; align-items: center; gap: 9px; border-top: 1px solid #f0f1f5; padding: 14px 3px 1px; }
.avatar { width: 32px; height: 32px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #5848c4; background: #eeebff; font-size: 12px; font-weight: 700; }
.logout-button { color: #81889b; font-size: 17px; }
.main-area { min-height: 100vh; display: flex; flex-direction: column; margin-left: 248px; }
.topbar { position: sticky; z-index: 10; top: 0; min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid #eceef3; background: rgb(255 255 255 / 94%); backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #9a9faf; font-size: 11px; }
.breadcrumb strong { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 17px; }
.topbar-date { color: #777f92; font-size: 11px; }
.topbar-divider { height: 19px; width: 1px; background: var(--line); }
.online-indicator { display: flex; align-items: center; gap: 6px; color: #718176; font-size: 10px; }
.online-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #52bc91; box-shadow: 0 0 0 3px #e4f6ef; }
.page-content { width: min(100%, 1440px); flex: 1; margin: 0 auto; padding: 32px 34px 22px; }
.page-footer { display: flex; justify-content: space-between; padding: 15px 34px 17px; color: #a0a5b2; font-size: 10px; }
.page-footer a { color: #8a81d6; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }
.menu-toggle, .sidebar-close { display: none; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.page-heading h1 { margin: 4px 0 5px; font: 800 24px "Segoe UI", sans-serif; letter-spacing: -.8px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.greeting { margin-bottom: 24px; }
.greeting .eyebrow { margin-bottom: 8px; }
.greeting h1 { margin: 0 0 7px; font: 800 26px "Segoe UI", sans-serif; letter-spacing: -1px; }
.greeting p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 142px; margin: 22px 0 24px; padding: 24px 29px; overflow: hidden; position: relative; border-radius: 17px; background: linear-gradient(110deg, #7668e5, #8879ec 62%, #a294f2); color: #fff; }
.dashboard-hero::after { position: absolute; right: 12%; top: -105px; width: 260px; height: 260px; border: 1px solid rgb(255 255 255 / 17%); border-radius: 50%; box-shadow: 0 0 0 36px rgb(255 255 255 / 6%), 0 0 0 75px rgb(255 255 255 / 5%); content: ""; }
.dashboard-hero h2 { margin: 7px 0 6px; font: 700 19px "Segoe UI", sans-serif; }
.dashboard-hero p { max-width: 480px; margin: 0; color: rgb(255 255 255 / 78%); font-size: 11px; line-height: 1.6; }
.hero-label { color: rgb(255 255 255 / 75%); font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.hero-date { position: relative; z-index: 1; width: 77px; height: 77px; display: grid; place-content: center; border: 1px solid rgb(255 255 255 / 29%); border-radius: 15px; background: rgb(255 255 255 / 14%); text-align: center; }
.hero-date strong { font: 800 24px "Segoe UI", sans-serif; }
.hero-date span { margin-top: 1px; font-size: 9px; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 23px; }
.stat-card { min-height: 104px; padding: 16px; border: 1px solid #eeeff4; border-radius: 13px; background: #fff; box-shadow: 0 3px 12px rgb(32 40 61 / 2%); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.stat-label { color: #81889a; font-size: 10px; font-weight: 600; }
.stat-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #7262df; background: #f0edff; font-size: 14px; }
.stat-card:nth-child(2) .stat-icon { color: #29876c; background: #e9f7f1; }
.stat-card:nth-child(3) .stat-icon { color: #bd8232; background: #fff4e1; }
.stat-card:nth-child(4) .stat-icon { color: #d06c66; background: #fff0ee; }
.stat-value { margin-top: 9px; font: 800 22px "Segoe UI", sans-serif; letter-spacing: -.6px; }
.stat-note { margin-top: 2px; color: #a1a6b3; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .9fr); gap: 14px; }
.card { min-width: 0; border: 1px solid #eceef3; border-radius: 13px; background: #fff; box-shadow: 0 3px 14px rgb(32 40 61 / 2%); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 17px; border-bottom: 1px solid #f0f1f5; }
.card-header h2 { margin: 0; font: 700 13px "Segoe UI", sans-serif; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.card-body { padding: 16px 17px; }
.text-button { border: 0; padding: 4px 0; color: var(--purple); background: transparent; font-size: 10px; font-weight: 700; }
.quick-links { display: grid; gap: 8px; }
.quick-link { display: flex; align-items: center; gap: 10px; min-height: 50px; border: 1px solid #f0f1f5; border-radius: 10px; padding: 8px 10px; background: #fff; text-align: left; transition: border .15s, background .15s; }
.quick-link:hover { border-color: #d9d4fb; background: #faf9ff; }
.quick-icon { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--purple); background: var(--purple-soft); }
.quick-link:nth-child(2) .quick-icon { color: var(--mint-ink); background: var(--mint); }
.quick-link:nth-child(3) .quick-icon { color: var(--amber-ink); background: var(--amber); }
.quick-link strong { flex: 1; font-size: 10px; }
.quick-link > span:last-child { color: #a6aabb; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f2f6; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #988be8; box-shadow: 0 0 0 3px #f0edff; }
.activity-item strong { display: block; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.activity-item small { display: block; margin-top: 3px; color: #a0a5b3; font-size: 9px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 13px; }
.toolbar-search { width: min(100%, 300px); position: relative; }
.toolbar-search input { min-height: 39px; padding-left: 35px; font-size: 11px; }
.search-icon { position: absolute; top: 11px; left: 12px; color: #9ba1b0; font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-control select, .filter-control input { width: auto; min-width: 130px; min-height: 38px; font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 11px 13px; border-bottom: 1px solid #eff0f4; color: #9399a8; background: #fcfcfd; font-size: 9px; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #f2f3f6; color: #596176; font-size: 10px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfbff; }
.table-primary { color: var(--ink); font-size: 10px; font-weight: 700; }
.table-secondary { display: block; margin-top: 3px; color: #a0a5b2; font-size: 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 5px 9px; background: #f1f1f5; color: #6e7483; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge-success { color: var(--mint-ink); background: var(--mint); }
.badge-warning { color: var(--amber-ink); background: var(--amber); }
.badge-danger { color: var(--rose-ink); background: var(--rose); }
.badge-purple { color: var(--purple-dark); background: var(--purple-soft); }
.table-actions { display: flex; gap: 6px; }
.small-button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: #fff; font-size: 9px; font-weight: 700; }
.small-button:hover { border-color: #d5d0fa; color: var(--purple-dark); }
.empty-state { padding: 41px 18px; color: #9298a7; text-align: center; }
.empty-state-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 13px; color: var(--purple); background: var(--purple-soft); font-size: 18px; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 12px; }
.empty-state p { margin: 0; font-size: 10px; line-height: 1.6; }
.notice { margin-bottom: 15px; border: 1px solid #ebe8fb; border-radius: 10px; padding: 11px 13px; color: #6f669e; background: #f7f6ff; font-size: 10px; line-height: 1.6; }
.notice strong { color: #5748b9; }
.notice-warning { border-color: #f2e5c9; color: #8d713f; background: #fffaf0; }
.form-card { margin-bottom: 15px; }
.setup-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.setup-forms .form-card { align-self: start; }
.form-card .card-body { padding: 14px 17px 17px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 13px; }
.field { min-width: 0; display: flex; flex-direction: column; }
.field label { margin: 2px 0 6px; font-size: 10px; }
.field input, .field select, .field textarea { min-height: 38px; padding: 0 10px; font-size: 10px; }
.field textarea { min-height: 75px; padding: 10px; resize: vertical; }
.field-wide { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.field-help { margin-top: 5px; color: #9ca1af; font-size: 9px; line-height: 1.5; }
.field fieldset, fieldset.field { min-width: 0; border: 1px solid #e8eaf0; border-radius: 9px; padding: 11px; }
.field legend, fieldset.field legend { padding: 0 5px; color: var(--ink-soft); font-size: 10px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkbox-option { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #eff0f4; border-radius: 8px; padding: 8px; color: var(--ink-soft); background: #fff; font-size: 10px; }
.checkbox-option input { width: 14px; min-height: 14px; flex: 0 0 auto; margin: 0; accent-color: var(--purple); }
.checkbox-option small { display: block; margin-top: 3px; color: #969cad; font-size: 9px; }
.table-panel { overflow: hidden; }
.table-summary { color: #9399a8; font-size: 10px; }
.attendance-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 15px; padding: 14px; border: 1px solid #eceef3; border-radius: 12px; background: #fff; }
.attendance-controls .field { width: 190px; }
.attendance-controls .field-wide { flex: 1; min-width: 220px; }
.attendance-controls .field-wide input { width: 100%; }
.attendance-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border-bottom: 1px solid #f0f1f5; }
.attendance-row:last-child { border-bottom: 0; }
.attendance-student { display: flex; align-items: center; gap: 10px; }
.student-avatar { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #6b60bf; background: #f0edff; font-size: 9px; font-weight: 700; }
.attendance-student strong { display: block; color: var(--ink-soft); font-size: 10px; }
.attendance-student small { display: block; margin-top: 3px; color: #a0a5b2; font-size: 9px; }
.attendance-state { width: 145px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; color: var(--ink-soft); background: #fff; font-size: 10px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 13px 15px; border-top: 1px solid #eff0f4; }
.panel-footer p { margin: 0; color: #9399a8; font-size: 9px; }
.report-card { max-width: 770px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.report-grid .card { margin-bottom: 0; }
.pie-student { margin-bottom: 9px; }
.pie-student .card-header { align-items: center; }
.pie-student .card-body { border-top: 1px solid #eff0f4; }
.report-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.skeleton { height: 87px; border-radius: 13px; background: linear-gradient(90deg, #f0f1f6 20%, #f7f7fa 40%, #f0f1f6 60%); background-size: 220% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }
.toast-region { position: fixed; z-index: 60; right: 22px; bottom: 22px; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e6eaf0; border-radius: 11px; padding: 12px 14px; background: #fff; box-shadow: 0 13px 32px rgb(32 40 61 / 14%); color: var(--ink-soft); font-size: 11px; line-height: 1.5; animation: toast-in .2s ease-out; }
.toast-success::before, .toast-error::before { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: #35a67f; content: ""; }
.toast-error::before { background: #cc6358; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.confirm-dialog { width: min(420px, calc(100vw - 32px)); border: 1px solid #eaebf1; border-radius: 14px; padding: 21px; box-shadow: 0 25px 80px rgb(32 40 61 / 25%); }
.confirm-dialog::backdrop { background: rgb(32 40 61 / 38%); backdrop-filter: blur(2px); }
.confirm-dialog h2 { margin: 0 0 8px; font: 700 17px "Segoe UI", sans-serif; }
.confirm-dialog p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sidebar-backdrop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.audit-values { max-width: 420px; overflow-wrap: anywhere; white-space: pre-wrap; color: #62697a; font: 10px/1.6 "Segoe UI", sans-serif; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] > summary { border-bottom: 1px solid #f0f1f5; }

@media (min-width: 1500px) {
  .page-content { padding-top: 38px; }
}
@media (max-width: 1120px) {
  .sidebar { width: 220px; }
  .main-area { margin-left: 220px; }
  .topbar { padding: 0 24px; }
  .page-content { padding: 27px 24px 20px; }
  .page-footer { padding-right: 24px; padding-left: 24px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .login-screen { min-height: 100svh; display: flex; justify-content: center; padding: 30px 22px 60px; }
  .login-decoration { display: none; }
  .login-card { width: min(100%, 420px); }
  .brand-login { margin-bottom: 54px; }
  .login-footnote { right: 0; left: 0; text-align: center; font-size: 9px; }
  .sidebar { width: min(280px, 84vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 18px 0 40px rgb(32 40 61 / 10%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.visible { position: fixed; z-index: 19; inset: 0; display: block; background: rgb(31 37 56 / 34%); }
  .sidebar-close, .menu-toggle { display: inline-grid; }
  .main-area { margin-left: 0; }
  .topbar { min-height: 58px; justify-content: flex-start; gap: 10px; padding: 0 15px; }
  .menu-toggle { flex: 0 0 auto; color: #6e7588; font-size: 16px; }
  .breadcrumb { gap: 7px; }
  .topbar-right { margin-left: auto; }
  .topbar-date, .topbar-divider { display: none; }
  .online-indicator { font-size: 9px; }
  .page-content { padding: 23px 15px 17px; }
  .page-footer { padding: 12px 15px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 17px; }
  .page-heading h1 { font-size: 22px; }
  .greeting h1 { font-size: 23px; }
  .dashboard-hero { min-height: 128px; padding: 20px; }
  .dashboard-hero h2 { font-size: 17px; }
  .hero-date { width: 62px; height: 62px; flex: 0 0 auto; }
  .hero-date strong { font-size: 20px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 96px; padding: 12px; }
  .stat-value { font-size: 20px; }
  .form-grid, .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr; }
  .setup-forms { grid-template-columns: 1fr; gap: 0; }
  .attendance-controls { align-items: stretch; }
  .attendance-controls .field { flex: 1 1 140px; width: auto; }
  .attendance-controls .field-wide { flex-basis: 100%; min-width: 100%; }
  .table-wrap { margin: 0 -1px; }
}
@media (max-width: 480px) {
  .topbar { gap: 7px; padding: 0 10px; }
  .breadcrumb { gap: 5px; font-size: 9px; }
  .breadcrumb strong { font-size: 9px; }
  .online-indicator { font-size: 0; }
  .online-indicator i { width: 8px; height: 8px; }
  .page-content { padding: 19px 11px 14px; }
  .page-footer { padding-right: 11px; padding-left: 11px; font-size: 9px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-label { max-width: 90px; line-height: 1.4; }
  .dashboard-hero { align-items: flex-start; padding: 17px 15px; }
  .dashboard-hero p { font-size: 10px; }
  .hero-date { width: 51px; height: 55px; }
  .hero-date strong { font-size: 18px; }
  .form-grid, .report-filters { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: span 1; }
  .attendance-row { gap: 7px; padding: 11px 9px; }
  .attendance-student { gap: 7px; }
  .attendance-student strong { max-width: 175px; font-size: 9px; }
  .attendance-state { width: 117px; min-height: 33px; padding: 0 5px; font-size: 9px; }
  .panel-footer { padding: 11px 9px; }
  .table-panel .card-header { align-items: flex-start; }
  .toast-region { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
