:root {
  color-scheme: light;
  --ink: #26352d;
  --muted: #87918b;
  --green: #62836c;
  --green-dark: #496c55;
  --green-soft: #eaf1e9;
  --line: #e9ede8;
  --surface: #fff;
  --canvas: #f6f8f5;
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; width: 246px; flex-direction: column; padding: 30px 18px 20px; background: #fff; border-right: 1px solid #edf0ec; }
.brand { display: flex; align-items: center; gap: 12px; padding: 1px 9px 38px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #fff; background: #66856d; font-size: 20px; font-weight: 700; box-shadow: 0 5px 14px #66856d33; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 16px; letter-spacing: .4px; }
.brand-copy small { color: #9ba49e; font-size: 9px; letter-spacing: 1.15px; }
.nav-caption { padding: 0 12px 12px; color: #a1aaa4; font-size: 11px; letter-spacing: 1px; }
.main-nav { display: grid; gap: 6px; }
.nav-link { display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 0 13px; border-radius: 10px; color: #68756d; font-size: 13px; transition: background .18s, color .18s; }
.nav-link:hover { background: #f5f7f4; color: var(--green-dark); }
.nav-link.active { color: #4c6d54; background: #edf3ec; font-weight: 600; }
.nav-icon { display: grid; width: 20px; place-items: center; color: #86958a; font-size: 17px; }
.nav-link.active .nav-icon { color: var(--green); }
.nav-arrow { margin-left: auto; color: #91a593; font-size: 20px; }
.sidebar-note { margin-top: auto; padding: 16px 15px 15px; border: 1px solid #edf0eb; border-radius: 12px; background: #fafbf9; }
.note-icon { display: grid; width: 28px; height: 28px; margin-bottom: 11px; place-items: center; border-radius: 9px; color: #69876d; background: #eaf1e9; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note p { margin: 7px 0 0; color: #89928c; font-size: 11px; line-height: 1.7; }
.sidebar-footer { padding: 18px 4px 1px; color: #adb5af; font-size: 10px; text-align: center; }
.main-content { min-height: 100vh; margin-left: 246px; }
.topbar { display: flex; height: 66px; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid #edf0ec; background: #fff; }
.breadcrumb { color: #909a93; font-size: 12px; }
.breadcrumb span { padding: 0 8px; color: #c0c7c1; }
.topbar-label { display: flex; align-items: center; gap: 8px; color: #919a94; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #83a187; box-shadow: 0 0 0 3px #83a1871c; }
.page-content { width: min(1080px, 100%); margin: 0 auto; padding: 43px 48px 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }
.eyebrow { margin: 0 0 7px; color: #8da290; font-size: 9px; font-weight: 700; letter-spacing: 1.65px; }
h1 { margin: 0; font-size: 25px; font-weight: 600; letter-spacing: -.45px; }
.page-description { margin: 9px 0 0; color: #8a958d; font-size: 12px; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .16s, transform .16s, border-color .16s; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 3px 8px #62836c26; }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: #69766d; border-color: #e5eae4; background: #fff; }
.button-secondary:hover { border-color: #bdcbbd; background: #fafbf9; }
.button-plus { font-size: 16px; font-weight: 400; }

.overview-card { display: flex; min-height: 91px; align-items: center; gap: 28px; padding: 17px 22px; border: 1px solid #e9ede7; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #2f4c3510; }
.overview-copy { display: flex; min-width: 170px; align-items: center; gap: 12px; }
.overview-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; color: #66866c; background: #edf3eb; font-size: 19px; }
.overview-copy div { display: grid; gap: 5px; }
.overview-label { color: #929c95; font-size: 10px; }
.overview-copy strong { font-size: 14px; font-weight: 600; }
.date-control { display: grid; gap: 5px; color: #929c95; font-size: 10px; }
.date-control input { width: 147px; padding: 5px 7px; border: 1px solid #e6ebe5; border-radius: 6px; outline: none; color: #49584d; background: #fff; font-size: 11px; }
.date-control input:focus, .entry-form input:focus { border-color: #8da891; box-shadow: 0 0 0 3px #7192761a; }
.overview-divider { width: 1px; height: 37px; margin-left: auto; background: #edf0ec; }
.overview-stat { display: grid; min-width: 67px; gap: 4px; }
.overview-stat strong { font-size: 18px; font-weight: 600; }
.overview-stat span { color: #929c95; font-size: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 15px; }
.section-heading h2, .list-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.section-subtitle, .list-heading p { display: block; margin-top: 5px; color: #929c95; font-size: 10px; }
.summary-pill { padding: 6px 10px; border-radius: 20px; color: #66816a; background: #edf3eb; font-size: 10px; }
.student-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.student-card { padding: 17px 18px 14px; border: 1px solid #e9ede7; border-radius: 11px; background: #fff; box-shadow: 0 2px 8px #26352d08; }
.student-card-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #f0f2ef; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 11px; color: #617b65; background: #edf3eb; font-size: 14px; font-weight: 600; }
.student-card-heading h3 { overflow: hidden; margin: 0; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.student-card-heading p { margin: 4px 0 0; color: #a0a9a2; font-size: 10px; }
.saved-tag { margin-left: auto; padding: 4px 7px; border-radius: 5px; color: #64816a; background: #eff5ee; font-size: 9px; white-space: nowrap; }
.content-checklist { display: grid; gap: 0; padding: 6px 0; }
.content-option { display: flex; min-height: 34px; align-items: center; gap: 9px; cursor: pointer; color: #66736a; font-size: 11px; }
.content-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--green); cursor: pointer; }
.category-control { min-width: 0; margin: 0; padding: 12px 0 3px; border: 0; color: #929c95; font-size: 10px; }
.category-control legend { padding: 0; }
.category-options { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 7px; }
.category-option { display: inline-flex; min-height: 29px; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid #e6ebe5; border-radius: 7px; cursor: pointer; color: #66736a; background: #fff; font-size: 10px; }
.category-option:has(input:checked) { border-color: #c9d8c9; color: #4f7055; background: #eff5ee; }
.category-option input { width: 13px; height: 13px; margin: 0; accent-color: var(--green); }
.category-empty { margin: 9px 0; color: #a0a9a2; font-size: 10px; }
.content-category-label { display: inline-block; margin-right: 7px; padding: 2px 5px; border-radius: 4px; color: #829184; background: #f1f4f0; font-size: 8px; vertical-align: 1px; }
.content-empty { margin: 4px 0 12px; padding: 11px; border-radius: 7px; color: #969f98; background: #f7f9f6; font-size: 10px; line-height: 1.6; }
.content-empty a { color: #64816a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.student-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid #f0f2ef; }
.selected-count { color: #9aa39c; font-size: 10px; }
.save-record { min-height: 32px; padding: 0 11px; font-size: 10px; }
.empty-state { padding: 53px 20px; border: 1px dashed #dce5db; border-radius: 12px; background: #fbfcfa; text-align: center; }
.empty-icon { display: grid; width: 45px; height: 45px; margin: 0 auto 14px; place-items: center; border-radius: 14px; color: #709075; background: #edf3eb; font-size: 19px; }
.empty-state h3 { margin: 0; font-size: 14px; font-weight: 600; }
.empty-state p { margin: 8px 0 18px; color: #929c95; font-size: 11px; }
.empty-actions { display: flex; justify-content: center; gap: 9px; }

.report-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.report-stat { display: flex; min-height: 83px; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid #e9ede7; border-radius: 11px; background: #fff; box-shadow: 0 2px 9px #26352d08; }
.report-stat-icon { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border-radius: 11px; color: #66816a; background: #edf3eb; font-size: 16px; }
.report-stat div { display: grid; gap: 4px; }
.report-stat strong { font-size: 18px; font-weight: 600; }
.report-stat div span { color: #929c95; font-size: 10px; }
.report-panel { padding: 20px; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.report-table th, .report-table td { padding: 13px 12px; border-bottom: 1px solid #f0f2ef; font-size: 11px; }
.report-table thead th { color: #939d96; font-size: 10px; font-weight: 500; }
.report-table tbody th { font-weight: 500; }
.report-table tbody td { color: #657269; }
.report-name { display: flex; align-items: center; gap: 9px; }
.report-name .avatar { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; font-size: 12px; }
.report-no-data { color: #a4ada6; }
.report-table-wrap .list-empty { padding: 34px 10px 22px; }
.report-detail-toggle { padding-right: 9px; padding-left: 9px; color: #5c7a61; background: #f0f5ef; }
.report-detail-toggle:hover { color: #496c55; background: #e8f0e7; }
.report-detail-row > td { padding: 0 12px 14px; background: #fafbf9; }
.report-detail { padding: 15px; border: 1px solid #e9ede7; border-radius: 8px; background: #fff; }
.report-detail > strong { color: #4f5f53; font-size: 11px; font-weight: 600; }
.report-detail-period { margin: 6px 0 0; color: #929c95; font-size: 9px; line-height: 1.6; }
.report-detail-table { width: 100%; margin-top: 8px; border-collapse: collapse; text-align: left; }
.report-detail-table th, .report-detail-table td { padding: 9px 8px; border-bottom: 1px solid #f0f2ef; font-size: 10px; vertical-align: top; }
.report-detail-table thead th { color: #939d96; font-weight: 500; }
.report-detail-table tbody th { min-width: 135px; color: #59665d; font-weight: 500; }
.report-content-name { display: grid; gap: 4px; }
.report-content-name small { width: fit-content; padding: 2px 5px; border-radius: 4px; color: #819083; background: #f1f4f0; font-size: 8px; font-weight: 400; }
.report-date-list { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.report-date-count { padding: 3px 6px; border-radius: 4px; color: #58745d; background: #eff5ee; white-space: nowrap; }
.report-date-chip { padding: 3px 6px; border-radius: 4px; color: #66736a; background: #f5f7f4; white-space: nowrap; }

.management-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(330px, 1.2fr); align-items: start; gap: 17px; }
.panel { border: 1px solid #e9ede7; border-radius: 11px; background: #fff; box-shadow: 0 2px 9px #26352d08; }
.form-panel { padding: 20px; }
.panel-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 19px; border-bottom: 1px solid #eff1ee; }
.heading-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; font-size: 17px; }
.people-icon { color: #66816a; background: #edf3eb; }
.book-icon { color: #8c795c; background: #f6f1e8; }
.panel-heading h2 { margin: 0; font-size: 13px; font-weight: 600; }
.panel-heading p { margin: 5px 0 0; color: #939d96; font-size: 10px; line-height: 1.5; }
.entry-form { display: grid; gap: 9px; padding-top: 18px; }
.entry-form label { color: #59665d; font-size: 11px; font-weight: 600; }
.entry-form input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #e5eae4; border-radius: 7px; outline: none; color: #36443a; background: #fff; font-size: 11px; transition: border-color .16s, box-shadow .16s; }
.entry-form input::placeholder { color: #b2bab4; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; }
.form-tip { display: flex; gap: 7px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #eff1ee; color: #9ba49d; font-size: 9px; line-height: 1.6; }
.form-tip span { color: #8ca18d; }
.list-panel { min-height: 277px; padding: 20px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #eff1ee; }
.list-heading p { margin-bottom: 0; }
.count-badge { padding: 5px 9px; border-radius: 20px; color: #68806a; background: #eff4ee; font-size: 10px; }
.managed-list { display: grid; }
.managed-item { display: flex; min-height: 56px; align-items: center; gap: 10px; border-bottom: 1px solid #f0f2ef; }
.managed-item:last-child { border-bottom: 0; }
.item-index { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 8px; color: #758579; background: #f1f4f0; font-size: 10px; }
.managed-item-copy { display: grid; min-width: 0; gap: 4px; }
.item-name { overflow: hidden; color: #435147; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.item-category { width: fit-content; padding: 2px 6px; border-radius: 5px; color: #718675; background: #f1f5f0; font-size: 9px; }
.item-actions { display: flex; gap: 3px; margin-left: auto; }
.text-action { padding: 6px 7px; border: 0; border-radius: 5px; cursor: pointer; color: #8b968e; background: transparent; font-size: 10px; }
.text-action:hover { color: #4c6d54; background: #f1f5f0; }
.text-action:disabled { cursor: default; color: #c5ccc6; background: transparent; }
.sort-action { min-width: 23px; padding-right: 4px; padding-left: 4px; font-size: 14px; }
.text-action.delete:hover { color: #b56c67; background: #fbf1ef; }
.list-empty { display: grid; justify-items: center; padding: 37px 10px 25px; color: #9ba59d; text-align: center; }
.list-empty > span { margin-bottom: 8px; color: #91a693; font-size: 21px; }
.list-empty p { margin: 0 0 5px; color: #68756d; font-size: 11px; }
.list-empty small { font-size: 9px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: calc(100vw - 32px); padding: 11px 16px; border: 1px solid #dce9dc; border-radius: 8px; color: #46634a; background: #fff; box-shadow: 0 8px 24px #2333281c; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { color: #9b514c; border-color: #f0d9d7; }

@media (max-width: 1000px) {
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; }
  .topbar { padding: 0 30px; }
  .page-content { padding-right: 30px; padding-left: 30px; }
  .overview-card { gap: 17px; padding-right: 16px; padding-left: 16px; }
  .overview-copy { min-width: 145px; }
  .management-layout { grid-template-columns: minmax(220px, .85fr) minmax(280px, 1.15fr); }
}
@media (max-width: 720px) {
  .sidebar { position: sticky; top: 0; inset: 0 0 auto; width: 100%; height: auto; padding: 10px 14px 0; border-right: 0; border-bottom: 1px solid #edf0ec; }
  .brand { padding: 0 2px 10px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; font-size: 17px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 8px; }
  .nav-caption, .sidebar-note, .sidebar-footer { display: none; }
  .main-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .nav-link { min-height: 42px; justify-content: center; gap: 4px; padding: 0 3px; border-radius: 8px 8px 0 0; font-size: 10px; }
  .nav-icon { width: auto; font-size: 15px; }
  .nav-arrow { display: none; }
  .main-content { min-height: auto; margin-left: 0; }
  .topbar { height: 47px; padding: 0 18px; }
  .topbar-label { font-size: 9px; }
  .page-content { padding: 28px 18px 42px; }
  .page-heading { margin-bottom: 21px; }
  h1 { font-size: 22px; }
  .overview-card { min-height: 0; flex-wrap: wrap; gap: 15px; padding: 14px; }
  .overview-copy { min-width: calc(50% - 8px); }
  .date-control { flex: 1; }
  .date-control input { width: 100%; min-width: 130px; }
  .overview-divider { display: none; }
  .overview-stat { min-width: calc(50% - 8px); padding-top: 8px; border-top: 1px solid #edf0ec; }
  .overview-stat:last-child { min-width: calc(50% - 8px); }
  .student-grid { grid-template-columns: 1fr; gap: 10px; }
  .section-heading { margin-top: 25px; }
  .management-layout { grid-template-columns: 1fr; gap: 12px; }
  .form-panel, .list-panel { padding: 17px; }
  .report-overview { gap: 8px; }
  .report-stat { min-height: 73px; gap: 8px; padding: 10px; }
  .report-stat-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
  .report-stat strong { font-size: 16px; }
  .report-panel { padding: 15px; }
}
@media (max-width: 380px) {
  .page-content { padding-right: 13px; padding-left: 13px; }
  .topbar { padding: 0 13px; }
  .nav-link { font-size: 10px; }
  .page-heading .button { min-height: 35px; padding: 0 10px; font-size: 10px; }
  .summary-pill { padding: 5px 7px; font-size: 9px; }
}
