:root {
  --ink: #1e2d2a; --muted: #6b7c77; --line: #dce6df; --paper: #fbfcfa;
  --surface: #ffffff; --wash: #f0f6f1; --brand: #246c59; --brand-dark: #174b3d;
  --accent: #efb14e; --danger: #c94d4d; --danger-wash: #fff2f1; --success: #21805c;
  --shadow: 0 14px 38px rgba(26, 62, 49, .10); --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
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 rgba(239,177,78,.55); outline-offset: 2px; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, #dcefe2, transparent 43%), var(--paper); }
.login-card { width: min(100%, 425px); padding: 42px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--brand); color: white; font-size: 24px; margin-bottom: 22px; }
.login-card h1 { margin: 0; font-size: 27px; letter-spacing: -.8px; }
.login-card p { color: var(--muted); margin: 10px 0 26px; line-height: 1.65; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { padding: 24px 14px; display: flex; flex-direction: column; background: #174b3d; color: #e7f0ea; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 11px 24px; font-weight: 750; letter-spacing: -.3px; font-size: 17px; }
.side-brand b { display: grid; place-items: center; border-radius: 9px; background: #e5b356; color: #19483c; width: 28px; height: 28px; }
.nav { display: grid; gap: 4px; }
.nav button { border: 0; width: 100%; padding: 10px 12px; color: #dce9e1; background: transparent; border-radius: 10px; text-align: left; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.nav button:hover { background: rgba(255,255,255,.09); }.nav button.active { color: #173f35; background: #f2c56e; }
.nav-divider { height: 1px; margin: 12px 10px 8px; background: rgba(255,255,255,.16); }
.sidebar-footer { margin-top: auto; padding: 16px 11px 0; border-top: 1px solid rgba(255,255,255,.13); color: #b9d0c1; font-size: 12px; line-height: 1.6; }
.main { min-width: 0; padding: 30px clamp(20px, 4vw, 56px) 50px; }
.topbar { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.6px; }.topbar .sub { color: var(--muted); margin-top: 4px; }
.top-actions { display: flex; align-items: center; gap: 10px; }.user-chip { color: var(--muted); font-size: 13px; }
.class-switcher { display: inline-flex; align-items: center; gap: 5px; max-width: 240px; overflow: hidden; margin-top: 4px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.class-switcher:hover { color: var(--brand); }.class-switcher span { color: var(--brand); font-size: 12px; }.icon-btn { position: relative; display: grid; place-items: center; width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand); background: white; font-size: 19px; }.icon-btn:hover { background: var(--wash); }.notification-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: var(--danger); }.user-menu-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 8px 4px 5px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: white; font-size: 12px; }.user-menu-btn:hover { background: var(--wash); }.user-menu-btn span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; background: var(--brand); font-weight: 750; }.user-menu-btn em { max-width: 96px; overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }.page-head h2 { margin: 0; font-size: 22px; letter-spacing: -.5px; }.page-head p { color: var(--muted); margin: 7px 0 0; }
.btn { min-height: 36px; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line); background: white; color: var(--ink); font-weight: 650; }
.btn:hover { background: #f6f9f7; }.btn-primary { color: white; background: var(--brand); border-color: var(--brand); }.btn-primary:hover { background: var(--brand-dark); }.btn-warn { color: #8b5713; border-color: #eccf99; background: #fff9ed; }.btn-danger { color: var(--danger); border-color: #f0c8c8; background: #fffafa; }.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }.btn-sm { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.grid { display: grid; gap: 16px; }.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: 0 3px 10px rgba(27,65,50,.025); }.card-title { margin: 0 0 15px; font-size: 15px; font-weight: 750; display: flex; align-items: center; justify-content: space-between; gap: 8px; }.card-title small { color: var(--muted); font-weight: 500; }
.stat { padding: 19px; min-height: 116px; }.stat .label { color: var(--muted); font-size: 13px; }.stat strong { display: block; margin-top: 13px; font-size: 27px; letter-spacing: -.8px; }.stat .hint { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }.stat.tone-green { border-top: 3px solid var(--brand); }.stat.tone-amber { border-top: 3px solid var(--accent); }.stat.tone-red { border-top: 3px solid var(--danger); }
.item-list { display: grid; gap: 0; }.item { padding: 12px 0; border-bottom: 1px solid #edf1ee; display: flex; align-items: flex-start; gap: 11px; }.item:last-child { border-bottom: 0; }.item-main { min-width: 0; flex: 1; }.item-title { font-weight: 650; line-height: 1.45; }.item-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }.todo-check { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; }.priority-dot { margin-top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #8aa39a; }.priority-dot.high { background: var(--danger); }.priority-dot.medium { background: var(--accent); }
.course { padding: 11px 0 11px 14px; border-left: 3px solid #bdd7c5; }.course + .course { border-top: 1px solid #edf1ee; }.course-time { color: var(--brand); font-weight: 700; font-size: 12px; }.course-subject { font-weight: 700; margin-top: 3px; }.course-note { color: var(--muted); margin-top: 5px; font-size: 12px; }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }.quick-links button { padding: 13px 10px; color: var(--brand-dark); background: var(--wash); border: 1px solid #dbece0; border-radius: 10px; font-weight: 700; }
.summary-link, .management-grid button { border: 1px solid var(--line); border-radius: var(--radius); text-align: left; background: white; color: var(--ink); }.summary-link { display: grid; gap: 6px; padding: 17px; }.summary-link:hover, .management-grid button:hover { border-color: #a9ccba; background: #f8fcf9; }.summary-link span { color: var(--muted); font-size: 12px; font-weight: 700; }.summary-link strong { font-size: 23px; color: var(--brand-dark); }.summary-link small, .management-grid small { color: var(--muted); line-height: 1.45; }.management-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }.management-grid button { display: grid; gap: 5px; min-height: 112px; padding: 15px; }.management-grid button > span { color: var(--brand); font-size: 20px; }.management-grid strong { font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }.filters input, .filters select { min-height: 36px; min-width: 130px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }.filters input { flex: 1; max-width: 330px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: white; }.table { border-collapse: collapse; width: 100%; min-width: 680px; }.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #edf1ee; white-space: nowrap; }.table th { color: #52645e; background: #f6f9f7; font-size: 12px; font-weight: 750; }.table tr:last-child td { border-bottom: 0; }.table tr:hover td { background: #fbfdfb; }.table .actions { text-align: right; }.table .actions button { margin-left: 4px; }
.student-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; }.student-card { border: 1px solid var(--line); padding: 16px; border-radius: 13px; background: white; }.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #dbede0; color: var(--brand-dark); font-weight: 800; }.student-card-top { display: flex; align-items: center; gap: 11px; }.student-card h3 { margin: 0; font-size: 16px; }.student-card p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }.chip { padding: 3px 7px; border-radius: 999px; background: #edf5ef; color: #2a6652; font-size: 11px; font-weight: 650; }.chip.red { color: #ad4141; background: #fff0ef; }.chip.amber { color: #996316; background: #fff6df; }
.tabs { display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 17px; }.tabs button { padding: 9px 12px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: none; white-space: nowrap; font-weight: 650; }.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }.section-spacer { height: 15px; }
.choice-list { display: grid; gap: 9px; }.choice-row { width: 100%; display: grid; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left; background: white; }.choice-row:hover, .choice-row.active { border-color: #9fc6af; background: var(--wash); }.choice-row strong { font-size: 14px; }.choice-row small { color: var(--muted); line-height: 1.45; }.choice-row.danger strong { color: var(--danger); }.quick-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }.quick-action-grid button { display: grid; gap: 4px; min-height: 110px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); text-align: left; }.quick-action-grid button:hover { border-color: #9fc6af; background: var(--wash); }.quick-action-grid span { color: var(--brand); font-size: 20px; }.quick-action-grid strong { font-size: 14px; }.quick-action-grid small { color: var(--muted); line-height: 1.4; }.full-width { grid-column: 1 / -1; }
.timeline { position: relative; padding-left: 20px; }.timeline::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: 7px; border-left: 1px solid #ccdcd2; }.event { position: relative; padding: 0 0 16px 12px; }.event::before { content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--success); }.event.negative::before { background: var(--danger); }.event-date { color: var(--muted); font-size: 12px; }.event-title { margin-top: 4px; font-weight: 650; }.event-content { color: #4e6059; margin-top: 4px; line-height: 1.5; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }.notice { padding: 11px 13px; border-radius: 9px; border: 1px solid #d4e8d9; background: #f3faf5; color: #38624c; line-height: 1.55; }.notice.warn { color: #7d5718; border-color: #f0dfb8; background: #fffbf1; }.notice.danger { color: #9d4141; border-color: #efd2d0; background: #fff7f7; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(18,38,31,.45); }.modal { width: min(100%, 720px); max-height: min(90vh, 860px); overflow: auto; background: var(--paper); padding: 23px; border-radius: 17px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }.modal.wide { width: min(100%, 1060px); }.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 17px; }.modal-head h2 { margin: 0; font-size: 20px; }.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }.form-grid .full { grid-column: 1 / -1; }.field { display: grid; gap: 6px; }.field label { color: #52645e; font-size: 12px; font-weight: 700; }.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: 8px; padding: 8px 10px; color: var(--ink); }.field textarea { min-height: 80px; resize: vertical; }.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }.editor { min-height: 160px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; line-height: 1.6; }.editor:empty::before { content: attr(data-placeholder); color: #9aa7a1; }.field-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.score-input { min-width: 72px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }.score-input:invalid { border-color: var(--danger); background: #fff6f5; }.chart-bars { display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 12px; min-height: 180px; padding-top: 10px; }.bar-wrap { display: grid; gap: 6px; text-align: center; height: 165px; grid-template-rows: 1fr auto; }.bar { align-self: end; border-radius: 7px 7px 2px 2px; min-height: 4px; background: linear-gradient(#57a77d, var(--brand)); }.bar-label { color: var(--muted); font-size: 11px; }.up { color: var(--success); font-weight: 700; }.down { color: var(--danger); font-weight: 700; }.muted { color: var(--muted); }.amount-income { color: var(--success); font-weight: 700; }.amount-expense { color: var(--danger); font-weight: 700; }
.score-viz { display: block; width: 100%; max-height: 230px; margin: 4px auto 12px; }.radar-wrap { text-align: center; }.attachment-preview { width: 100%; height: 116px; object-fit: cover; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; }.file-icon { display: grid; place-items: center; width: 100%; height: 82px; margin-bottom: 10px; color: var(--brand); background: var(--wash); border-radius: 9px; font-size: 35px; }
.seat-grid { display: grid; gap: 7px; background: #f6f2e9; padding: 18px; border: 1px solid #e5dfd1; border-radius: 12px; }.seat { min-height: 49px; border: 1px dashed #b7b19f; border-radius: 7px; background: white; padding: 6px; font-size: 12px; text-align: center; color: var(--ink); }.seat[draggable="true"] { cursor: grab; }.seat.empty { color: #9b998f; background: rgba(255,255,255,.5); }.blackboard { text-align: center; padding: 9px; color: white; background: #4f6559; border-radius: 6px; margin-bottom: 14px; font-size: 12px; letter-spacing: 5px; }.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }.group { border: 1px solid #d8e6dc; background: #f7fbf8; border-radius: 10px; padding: 12px; }.group h4 { margin: 0 0 8px; color: var(--brand); }.group-member { padding: 5px 0; border-bottom: 1px solid #e7f0e9; }.group-member:last-child { border-bottom: 0; }
.mobile-nav { display: none; }
#toast-region { position: fixed; z-index: 40; right: 22px; bottom: 22px; display: grid; gap: 8px; }.toast { max-width: 350px; padding: 12px 15px; border-radius: 10px; color: white; background: #264d40; box-shadow: var(--shadow); }.toast.error { background: #a34242; }
@media (max-width: 900px) { .shell { grid-template-columns: 1fr; }.sidebar { display: none; }.main { padding: 20px 16px 80px; }.mobile-nav { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }.mobile-nav button { border: 0; background: none; color: var(--muted); font-size: 11px; }.mobile-nav button.active { color: var(--brand); font-weight: 750; }.dashboard-grid { grid-template-columns: 1fr; }.grid-4 { grid-template-columns: repeat(2,1fr); }.management-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; } }
@media (max-width: 560px) { .topbar { align-items: flex-start; }.top-actions { gap: 6px; }.user-menu-btn em { display: none; }.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }.page-head { flex-direction: column; }.quick-links, .management-grid, .quick-action-grid { grid-template-columns: 1fr; }.login-card { padding: 29px 24px; }.modal { padding: 18px; }.filters input { max-width: none; } }
