/* A gradebook: one identity column + equal subject columns, with an independent
   horizontal scroller. On phones only the active subject remains beside names. */
.se-page { --se-accent:#216ac5; --se-line:#e7ebf1; --se-muted:#657084; color:#253047; min-width:0; font:14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
.se-page *, .se-dialog * { box-sizing:border-box; }
.se-page [hidden] { display:none!important; }
.se-page .se-button,.se-dialog .se-button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; border:1px solid #dfe4ed; border-radius:8px; background:#fff; color:#334057; font:inherit; font-size:14px; line-height:1.4; cursor:pointer; white-space:nowrap; transition:background-color .15s,border-color .15s; }
.se-page .se-button:hover:not(:disabled),.se-dialog .se-button:hover:not(:disabled) { border-color:#bccadd; background:#f6f8fc; }
.se-page .se-button.se-primary,.se-dialog .se-primary { background:var(--se-accent,#216ac5); border-color:var(--se-accent,#216ac5); color:#fff; }
.se-page .se-button.se-primary:hover:not(:disabled) { background:#1959ab; }
.se-page .se-button:disabled { color:#68758a; background:#f1f4f8; border-color:#e5eaf1; cursor:not-allowed; }
.se-page .se-button.se-primary:disabled { background:#e7eef8; color:#536e96; border-color:#e7eef8; }
.se-page :is(button,input,select,summary):focus-visible,.se-dialog button:focus-visible { outline:2px solid #5994da; outline-offset:2px; }
.se-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.se-muted { color:var(--se-muted); font-size:13px; }
.se-workspace-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 0 16px; border-bottom:1px solid var(--se-line); }
.se-field { display:flex; flex-direction:column; min-width:0; gap:6px; }
.se-field>span { color:var(--se-muted); font-size:13px; }
.se-page input:not([type="checkbox"]):not([type="file"]),.se-page select { min-width:0; min-height:40px; width:100%; padding:8px 12px; border:1px solid #d9e1ec; border-radius:8px; background:#fff; color:#253047; font:inherit; font-size:14px; line-height:1.5; box-shadow:none; }
.se-page input::placeholder { color:#737e90; opacity:1; }
.se-page select { appearance:none; padding-right:34px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23657086' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; }
.se-page input:disabled,.se-page select:disabled { background-color:#f6f8fb; color:#738096; }
.se-page input[type="checkbox"] { width:18px; height:18px; flex-shrink:0; margin:0; accent-color:var(--se-accent); }
.se-workspace-header .se-field-exam { width:min(480px,calc(100% - 80px)); }
.se-workspace-header .se-field-exam>span,.se-scope-fields .se-field>span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.se-page .se-field-exam select { font-size:20px; font-weight:600; border-color:transparent; padding-left:0; background-color:transparent; min-height:44px; }
.se-page .se-field-exam select:hover { border-bottom-color:#ccd6e4; }
.se-menu { position:relative; flex-shrink:0; }
.se-menu summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:8px 10px; color:#536179; border-radius:8px; font-size:14px; }
.se-menu summary::-webkit-details-marker { display:none; }
.se-menu summary:hover,.se-menu[open] summary { background:#edf1f6; }
.se-menu-items { position:absolute; z-index:12; right:0; top:calc(100% + 4px); width:148px; padding:6px; border:1px solid var(--se-line); border-radius:10px; background:#fff; box-shadow:0 8px 25px #172a421a; }
.se-page .se-menu-items .se-button { width:100%; justify-content:flex-start; min-height:44px; border:0; }
.se-scopebar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0; }
.se-scope-fields { display:flex; gap:8px; min-width:0; }
.se-scope-fields .se-field { width:144px; }
.se-scope-fields .se-field-class { width:128px; }
.se-status { padding:10px 14px; margin:12px 0; border-radius:8px; background:#edf7f0; color:#276e3b; line-height:1.5; overflow-wrap:anywhere; }
.se-status.se-error { background:#fff0ef; color:#ae3732; }
.se-sheet { border:1px solid var(--se-line); border-radius:12px; background:#fff; min-width:0; }
.se-sheet-tools { padding:12px 16px; }
.se-roster-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.se-search { width:240px; max-width:70%; }
.se-page .se-search input { padding-left:12px; background:#f6f8fb; border-color:transparent; }
.se-subject-tabs,.se-mobile-max { display:none; }
.se-gradebook-scroll { overflow:auto; border-radius:0; max-width:100%; }
.se-gradebook { border-collapse:separate; border-spacing:0; table-layout:fixed; width:100%; min-width:calc(160px + var(--se-subject-count,2)*112px); font-variant-numeric:tabular-nums; }
.se-gradebook th,.se-gradebook td { padding:6px 18px; border:0; border-bottom:1px solid #edf0f4; background:#fff; height:54px; vertical-align:middle; }
.se-gradebook thead th { color:#5f6d82; font-weight:500; font-size:13px; height:60px; text-align:right; }
.se-gradebook th small { display:block; font-size:12px; color:#727c8b; font-weight:400; margin-top:2px; }
.se-gradebook .se-name-column { width:180px; position:sticky; left:0; z-index:1; text-align:left; border-right:1px solid #edf0f4; background:#fff; }
.se-gradebook tbody .se-name-column { font-size:14px; font-weight:500; }
.se-gradebook .se-score-column { text-align:right; }
.se-gradebook tbody tr:last-child>* { border-bottom:0; }
.se-gradebook tbody tr:focus-within>.se-name-column { color:#1458a7; }
.se-page .se-gradebook .se-score-input { width:100%; max-width:128px; min-height:38px; text-align:center; border:1px solid transparent; font-size:16px; font-weight:500; font-variant-numeric:tabular-nums; padding:6px 10px; border-radius:6px; background:#f8fafc; appearance:textfield; }
.se-page .se-score-input::-webkit-inner-spin-button,.se-page .se-score-input::-webkit-outer-spin-button { appearance:none; margin:0; }
.se-page .se-gradebook .se-score-input:hover:not(:disabled) { border-color:#ccd8e8; background:#fff; }
.se-page .se-gradebook .se-score-input:focus { outline:2px solid #6699dc; outline-offset:0; border-color:transparent; background:#fff; }
.se-page .se-gradebook .se-score-input.se-changed { background:#edf4ff; border-color:#b7d1f2; color:#1557aa; }
.se-page .se-gradebook .se-score-input:disabled { background:transparent; color:#69758a; }
.se-savebar { position:sticky; bottom:0; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; padding:10px 16px; padding-bottom:max(10px,env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--se-line); border-radius:0 0 12px 12px; }
.se-savebar .se-button { min-width:120px; }
.se-empty { padding:24px 16px; color:var(--se-muted); text-align:center; line-height:1.6; }
.se-choice-list { padding:8px 0 16px; }
.se-choice-list h3 { font-size:14px; font-weight:500; color:#667389; margin:0 0 12px; }
.se-choice-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; }
.se-choice-grid .se-button { justify-content:flex-start; padding:14px 16px; }
.se-exam-list { border:1px solid var(--se-line); border-radius:12px; overflow:hidden; background:#fff; }
.se-page .se-exam-option { border:0; border-bottom:1px solid var(--se-line); background:#fff; width:100%; padding:18px 20px; display:flex; justify-content:space-between; align-items:center; gap:16px; text-align:left; font:inherit; cursor:pointer; }
.se-page .se-exam-option:last-child { border-bottom:0; }
.se-page .se-exam-option:hover { background:#f7f9fc; }
.se-exam-option strong { font-size:16px; font-weight:550; color:#253047; }
.se-exam-option small { display:block; margin-top:5px; color:#69768b; font-size:13px; }
.se-option-action { flex-shrink:0; color:#52647e; font-size:13px; }
.se-option-action>span { font-size:21px; vertical-align:-1px; margin-left:8px; }
.se-manager-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.se-exam-entry { border-bottom:1px solid var(--se-line); }
.se-exam-entry:last-child { border-bottom:0; }
.se-exam-entry-main { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; }
.se-exam-entry-main h3 { font-size:16px; font-weight:550; margin:0; }
.se-exam-entry-main p { font-size:13px; color:#657187; margin:5px 0 0; }
.se-exam-entry-main small { display:block; font-size:12px; color:#657187; margin-top:4px; }
.se-inline-editor { background:#f7f9fc; padding:18px 0; border-top:1px solid var(--se-line); }
.se-inline-editor>.se-actions { padding:16px 20px 0; }
.se-panel { border:1px solid var(--se-line); border-radius:12px; background:#fff; min-width:0; }
.se-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; }
.se-heading h3 { margin:0; font-size:17px; font-weight:600; }
.se-exam-fields { display:grid; grid-template-columns:2fr 1fr 1fr; gap:16px; padding:0 20px; }
.se-section-title { font-size:14px; margin:24px 20px 12px; }
.se-exam-grades { padding:0 20px; }
.se-exam-grade { border-top:1px solid var(--se-line); padding:8px 0; }
.se-check { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; }
.se-check strong { font-weight:550; }
.se-exam-subjects { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; padding-left:28px; }
.se-exam-subject { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 0; }
.se-exam-subject .se-check { min-width:0; }
.se-max { display:flex; align-items:center; gap:8px; color:var(--se-muted); font-size:12px; flex-shrink:0; }
.se-page .se-max input { width:84px; }
.se-note { margin:0; padding:0 20px 16px; color:var(--se-muted); font-size:13px; line-height:1.5; }
.se-editor>.se-actions,.se-import>.se-actions { padding:16px 20px; border-top:1px solid var(--se-line); }
.se-import { margin-bottom:16px; }
.se-import-errors { padding:0 20px 0 40px; color:#ae3732; line-height:1.7; overflow-wrap:anywhere; }
.se-preview-list { max-height:360px; overflow:auto; padding:0 20px; }
.se-preview-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 64px; gap:10px; padding:12px 0; border-bottom:1px solid var(--se-line); overflow-wrap:anywhere; }
.se-preview-row>:last-child { text-align:right; }
.se-preview-head { color:var(--se-muted); font-size:13px; position:sticky; top:0; background:#fff; }
.se-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; }
.se-dialog { margin:auto; padding:24px; border:0; border-radius:16px; width:380px; max-width:calc(100vw - 32px); box-shadow:0 20px 60px #15243d33; }
.se-dialog::backdrop { background:#17263d55; }
.se-dialog h3 { font-size:17px; margin:0 0 20px; }
.ss-tabs:has([data-ss="tab-exam-settings"]) { overflow:auto; padding-bottom:4px; }
.ss-tabs:has([data-ss="tab-exam-settings"]) .ss-button { flex-shrink:0; }
@media(max-width:700px) {
  .se-workspace-header { padding-bottom:10px; gap:8px; }
  .se-page .se-field-exam select { font-size:18px; }
  .se-page .se-button { min-height:44px; padding:8px 12px; }
  .se-page input:not([type="checkbox"]):not([type="file"]),.se-page select { min-height:44px; font-size:16px; }
  .se-scopebar { gap:8px; padding:12px 0; }
  .se-scope-fields { flex:1; }
  .se-scope-fields .se-field { width:50%; }
  .se-scope-fields .se-field-class { width:50%; }
  .se-file-actions .se-button { font-size:13px; padding:8px 10px; }
  .se-sheet-tools { padding:10px 12px; }
  .se-subject-tabs { display:flex; gap:3px; padding:3px; margin:0 0 10px; border-radius:8px; background:#f0f3f7; overflow:auto; }
  .se-page .se-subject-tabs .se-button { flex:1 0 auto; border:0; border-radius:6px; min-height:44px; background:transparent; font-size:14px; padding:7px 12px; }
  .se-page .se-subject-tabs [aria-pressed="true"] { background:#fff; color:#263c5b; font-weight:600; }
  .se-roster-tools { gap:8px; }
  .se-search { max-width:none; width:62%; }
  .se-mobile-max { display:inline; }
  .se-desktop-count { display:none; }
  .se-page .se-search input { min-height:44px; }
  .se-gradebook { table-layout:fixed; min-width:0; }
  .se-gradebook thead { display:none; }
  .se-gradebook th,.se-gradebook td { padding:6px 12px; height:56px; }
  .se-gradebook .se-name-column { width:auto; position:static; border-right:0; }
  .se-gradebook .se-score-column { display:none; }
  .se-gradebook .se-current-subject { display:table-cell; width:118px; }
  .se-page .se-gradebook .se-score-input { max-width:96px; min-height:44px; font-size:16px; padding:8px 10px; border-color:#e1e7f0; background:#fafbfd; }
  .se-gradebook tbody .se-name-column { font-size:15px; }
  .se-savebar { min-height:66px; padding-left:12px; padding-right:12px; }
  .se-savebar .se-button { min-width:112px; }
  .se-exam-option strong { font-size:15px; }
  .se-page .se-exam-option { padding:16px; }
  .se-option-action { font-size:12px; }
  .se-option-action>span { margin-left:4px; }
  .se-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .se-choice-grid .se-button { min-height:50px; }
  .se-exam-entry-main { padding:16px; flex-wrap:wrap; gap:10px; }
  .se-exam-entry-main>.se-actions { margin-left:auto; }
  .se-exam-fields { grid-template-columns:1fr 1fr; padding:0 16px; gap:12px; }
  .se-exam-fields>.se-field:first-child { grid-column:1/-1; }
  .se-exam-grades { padding:0 16px; }
  .se-exam-subjects { grid-template-columns:1fr; padding-left:0; }
  .se-section-title { margin-left:16px; }
  .se-note,.se-preview-list { padding-left:16px; padding-right:16px; }
}
@media(prefers-reduced-motion:reduce) { .se-page .se-button { transition:none; } }

.se-own-class-label { color:#354762; font-size:14px; font-weight:550; }
.se-scope-fields.se-own-class { flex:1; max-width:280px; }
.se-scope-fields.se-own-class .se-field { width:100%; }
