:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#283346;background:#f7f8fb;font-size:14px;--accent:#e85a6b;--muted:#8791a2;--line:#e9edf3}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-color:var(--accent)}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 15px;color:inherit}button:hover{background:#fdf0f2}button:disabled{opacity:.45;cursor:default}a{color:var(--accent);text-decoration:none}input,select,textarea{border:1px solid #dfe4ec;border-radius:9px;background:#fff;padding:11px 12px;color:inherit;max-width:100%}textarea{resize:vertical;width:100%;line-height:1.7}label{display:grid;gap:7px;font-size:13px;color:#697589}h1,h2,h3,p{margin-top:0}h1{font-size:27px;letter-spacing:-1px;margin-bottom:8px}h2{font-size:19px}h3{font-size:15px}small,.muted{color:var(--muted)}.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.primary:hover{background:#d8495a}.danger{color:#c63847}.shell{display:grid;grid-template-columns:225px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--line);padding:35px 22px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:8px}.brand{display:flex;gap:11px;align-items:center;font-weight:750;font-size:20px;margin-bottom:35px}.logo{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:var(--accent);color:#fff;font-weight:600}.navitem{display:flex;align-items:center;gap:14px;border:0;background:transparent;padding:14px 17px;text-align:left;border-radius:11px;color:#737e90}.navitem.active{background:#fff0f2;color:var(--accent);font-weight:650}.navicon{font-size:20px;width:24px;text-align:center}.sidefoot{margin-top:auto;border-top:1px solid var(--line);padding-top:18px;display:grid;gap:12px}.main{padding:38px 42px;min-width:0;max-width:1700px;width:100%;margin:0 auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:25px}.eyebrow{color:var(--accent);font-size:11px;letter-spacing:2px;margin-bottom:12px;font-weight:700}.avatar{background:#fae7eb;color:var(--accent);padding:10px 13px;border-radius:50%;font-weight:700}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.between{justify-content:space-between}.card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:22px;margin-bottom:20px}.notice{background:#fff4ee;border:1px solid #f9e6d8;padding:13px 17px;border-radius:11px;color:#a9754e;margin-bottom:22px;line-height:1.7;white-space:pre-wrap}.toolbar{display:flex;justify-content:space-between;gap:15px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.filters{display:flex;gap:10px;flex-wrap:wrap}.filters input{width:240px}.badge{display:inline-block;border-radius:6px;padding:4px 8px;background:#eef2f8;font-size:11px;color:#778297}.weekbox{background:#fff;border-radius:12px;border:1px solid var(--line);padding:6px}.weekbox button{border:0;padding:6px 12px}.weekbox select{border:0;font-weight:650}.schedulewrap{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:auto;margin-bottom:20px}.schedule{width:100%;table-layout:fixed;border-collapse:collapse;min-width:690px}.schedule th{padding:15px 3px;border-bottom:1px solid var(--line);font-size:12px;font-weight:500;color:#7b8598;height:63px}.schedule th:first-child{width:45px}.schedule td{border:1px solid #f0f2f6;height:59px;padding:3px;vertical-align:top}.schedule td:first-child{border-left:0;text-align:center;font-size:11px;color:#94a0b1;padding-top:17px}.schedule th strong{display:block;font-size:14px;color:#39475e;margin-top:5px}.course{border:0;width:100%;padding:8px 6px;border-radius:7px;font-size:11px;text-align:left;line-height:1.55;min-height:46px}.course b{display:block;font-weight:650}.course span{display:block;opacity:.85}.c0{background:#ebedff;color:#656ac2}.c1{background:#fce9ee;color:#c65d7d}.c2{background:#e2f5f1;color:#3f9b89}.c3{background:#fff1de;color:#b8893f}.c4{background:#e6f1ff;color:#527eb8}.course:hover{filter:brightness(.97)}.legend{display:flex;gap:17px;color:#96a0af;font-size:12px;margin-top:12px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.stat{background:#fff;border:1px solid var(--line);border-radius:15px;padding:21px}.stat strong{display:block;font-size:29px;letter-spacing:-1px;margin:12px 0 3px}.stat small{font-size:11px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.tool{display:block;padding:23px;background:#fff;border:1px solid var(--line);border-radius:15px;color:inherit}.tool .navicon{display:block;width:43px;background:#fff0f2;border-radius:12px;padding:9px;color:var(--accent);margin-bottom:18px}.tool p{font-size:12px;color:#8791a2;line-height:1.8}.tablewrap{overflow:auto}.datatable{border-collapse:collapse;width:100%;white-space:nowrap;font-size:12px}.datatable th,.datatable td{padding:13px;text-align:left;border-bottom:1px solid var(--line)}.datatable th{background:#f8f9fc;color:#8a95a5;font-weight:500}.datatable td button{padding:5px 9px;font-size:12px}.empty{text-align:center;color:#909aaa;padding:50px 15px;line-height:1.8}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.full{grid-column:1/-1}.formactions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.loginintro{padding:12vh 8vw;background:#fff0f2;display:flex;flex-direction:column;justify-content:center}.loginintro h1{font-size:45px;line-height:1.45;margin:25px 0}.loginintro p{color:#a16e79;line-height:2}.loginpanel{display:grid;place-items:center;padding:30px}.loginpanel form{width:100%;max-width:350px;display:grid;gap:22px}.loginpanel .brand{margin:0}.error{color:#c1394c;white-space:pre-wrap;line-height:1.6;font-size:13px}.info{background:#f3f6fb;padding:13px;border-radius:9px;line-height:1.8;color:#6d7a8d;font-size:12px}.loading{padding:25vh 20px;text-align:center;color:#8290a4}dialog{border:1px solid var(--line);border-radius:19px;max-width:640px;width:calc(100% - 32px);padding:25px;color:inherit;max-height:90vh}dialog::backdrop{background:#202b4055;backdrop-filter:blur(3px)}#toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#293347;color:#fff;padding:13px 23px;border-radius:10px;display:none;z-index:100;max-width:90%;white-space:pre-wrap}.mobilelist{display:none}.daycard{background:white;border:1px solid var(--line);border-radius:12px;padding:17px;margin:13px 0}.daycard h3{margin-bottom:13px}.daycard .course{margin:4px 0;padding:13px}.viewtoggle{display:none}.compact{max-width:840px}.mobilebrand{display:none}.tip{font-size:12px;line-height:1.8;color:#98a1ae}.profile{display:flex;align-items:center;gap:18px}.profile .avatar{font-size:25px;padding:20px}.status{color:#589c87}.service-disabled{opacity:.75}.pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:16px}.code{font:12px/1.8 ui-monospace,monospace;min-height:240px}
@media(min-width:1500px){.main{padding:42px 60px}.schedule td{height:65px}}
@media(max-width:1050px){.sidebar{padding:26px 13px}.shell{grid-template-columns:185px minmax(0,1fr)}.main{padding:28px 23px}.stats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.shell{display:block}.sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;height:auto;flex-direction:row;padding:7px 6px calc(7px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--line);z-index:10;justify-content:space-around;gap:0}.sidebar .brand,.sidefoot{display:none}.navitem{flex-direction:column;gap:2px;padding:6px 7px;min-width:55px;font-size:10px;border-radius:8px}.navicon{font-size:20px}.main{padding:23px 16px 100px}.topbar{margin-bottom:22px}h1{font-size:24px}.eyebrow{font-size:9px}.mobilebrand{display:block;font-size:12px;color:#a1a8b4;margin-bottom:13px}.topbar>.row .badge{display:none}.filters{width:100%}.filters input{width:100%}.filters select{flex:1;min-width:90px}.toolbar{gap:12px}.weekbox{width:100%;display:flex;justify-content:space-between}.notice{font-size:12px;margin-bottom:16px}.schedulewrap{border-radius:11px}.schedule{min-width:600px}.grid{grid-template-columns:1fr 1fr;gap:10px}.tool{padding:16px}.stats{gap:10px}.stat{padding:15px}.stat strong{font-size:25px}.card{padding:17px}.viewtoggle{display:block}.listmode .schedulewrap{display:none}.listmode .mobilelist{display:block}.formgrid{grid-template-columns:1fr}.full{grid-column:auto}.login{display:block}.loginintro{display:none}.loginpanel{min-height:100vh}.datatable td,.datatable th{padding:11px}.adminnav{overflow-x:auto;justify-content:flex-start}.adminnav .navitem{flex:0 0 66px}.legend{gap:9px;font-size:10px}}
@media print{.sidebar,.toolbar,.notice,.topbar>.row,button{display:none!important}.shell{display:block}.main{padding:0}.schedule{min-width:0}.schedulewrap{overflow:visible}.course{display:block!important;print-color-adjust:exact}.mobilelist{display:none!important}}
.schedule.three-days{min-width:300px}.schedule td[rowspan]:not([rowspan="1"]) .course{min-height:100px}.schedule td[rowspan="4"] .course{min-height:215px}
/* 设备偏好选择的列表布局在手机与电脑上保持一致。 */
[hidden]{display:none!important}
.listmode .schedulewrap{display:none}
.listmode .mobilelist{display:block}
#custom-account-fields{margin:0}
.filters #region{min-width:145px}
@media(max-width:700px){.filters #region{min-width:130px}.filters #room{min-width:150px}}
@media print{.listmode .schedulewrap{display:block}.listmode .mobilelist{display:none}}
#jw-config-form{margin-top:35px;margin-bottom:25px}
.editor-row{display:flex;gap:12px;align-items:end;padding:15px 0;border-bottom:1px solid var(--line)}
.editor-row label{flex:1;min-width:0}.editor-row .grow{flex:2}.editor-row button{flex-shrink:0;margin-bottom:1px}
.checkbox-label{display:flex;align-items:center;gap:10px}.checkbox-label input{width:18px;height:18px;accent-color:var(--accent)}
#scheduler-panel{margin-top:25px}.dimension-controls{display:flex;gap:6px;flex-wrap:wrap}.dimension-controls button.active{background:#fff0f2;color:var(--accent);border-color:#f5c7cf}
.group-heading{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;border-bottom:1px solid var(--line);margin-bottom:13px}
.group-heading h3{margin:0}.group-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.group-list .course{height:100%;min-height:80px}
@media(max-width:700px){.editor-row{flex-wrap:wrap}.editor-row label{flex:1 1 135px}.editor-row .grow{flex:1 1 100%}.term-row button{margin-left:auto}.group-list{grid-template-columns:1fr}}
/* 四种查询统一使用日期—节次网格，课程信息完整展示。 */
.target-picker{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:18px;flex-wrap:wrap}
.target-picker label{font-weight:650;color:#465269}.target-picker select{min-width:230px;max-width:100%;flex:1}.schedule-caption{font-size:14px;color:#7b8799}
.schedule .course{text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.6;padding:9px 7px}
.schedule .course b{margin-bottom:4px}.schedule .course span{white-space:normal;overflow-wrap:anywhere;opacity:1}
.schedule .course .course-teacher,.schedule .course .course-class{font-size:11px}
.borrow-reason,.schedule .course .borrow-reason{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.schedule .course .borrow-reason{font-weight:600}
@media(max-width:700px){.target-picker{gap:9px;padding:13px}.target-picker select{min-width:160px;width:100%}.schedule .course{padding:8px 5px}}
/* 访客只看课表和登录入口；登录用户可以报修，无前端侧栏。 */
.public-shell{display:block}
.public-shell .main{max-width:1600px;padding:32px 30px 36px}
@media(max-width:700px){.public-shell .main{padding:22px 14px 28px}}
.repair-columns{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:22px;align-items:start}
.repair-description{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.receipt-list-title{margin-top:25px}.receipt-code{margin-top:15px}
.saved-receipts{display:grid;gap:8px;max-height:300px;overflow:auto}.saved-receipts button{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;text-align:left}
.saved-receipts span{color:var(--accent);font-size:12px}#public-feature{white-space:nowrap}
@media(max-width:850px){.repair-columns{grid-template-columns:1fr}}
.schedule.today-day{min-width:0;width:100%}
.schedule-refresh{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#course-updated-at{font-size:12px;line-height:1.8}
.schedule-update-message{margin-bottom:16px}
.schedule-update-message button{margin-left:12px}
.today-label{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:14px;color:#465269}
.public-actions{justify-content:flex-end;flex-wrap:wrap}
.public-actions button{white-space:nowrap}
.user-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#6d7a8d}
@media(max-width:700px){.public-shell .topbar{flex-wrap:wrap;gap:14px}.public-actions{gap:8px}.user-name{max-width:100px}}

.schedule .course.course-compact{text-align:center;display:flex;align-items:center;justify-content:center;font-size:19px;line-height:1.3;padding:9px 4px}.schedule .course.course-compact b{margin:0}.schedule .course + .course{margin-top:4px}

/* Black 1px grid; the wrapper supplies the outer border without a doubled edge. */
.schedulewrap { border: 1px solid #000000; }
.schedule { border-style: hidden; }
.schedule th, .schedule td { border: 1px solid #000000; }
.schedule td:first-child { border-left: 1px solid #000000; }

/* Shared footer follows page content and scrolls with the document. */
body {
  --site-footer-height: calc(44px + env(safe-area-inset-bottom, 0px));
}
#app, .shell, .login {
  min-height: calc(100vh - var(--site-footer-height));
  min-height: calc(100dvh - var(--site-footer-height));
}
.site-footer {
  min-height: var(--site-footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 12px calc(11px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.site-footer a { color: #697589; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--accent); text-decoration: underline; }
@media (max-width: 700px) {
  .loginpanel {
    min-height: calc(100vh - var(--site-footer-height));
    min-height: calc(100dvh - var(--site-footer-height));
  }
  /* Only the admin shell has a fixed bottom navigation bar. */
  #app:has(.sidebar) + .site-footer {
    margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* Checkbox picker for the time view; ordinary room selectors stay single-select. */
.room-multiselect { position: relative; width: 220px; max-width: 100%; }
.room-multiselect summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; padding: 11px 12px;
  border: 1px solid #dfe4ec; border-radius: 9px; background: #fff;
}
.room-multiselect summary::-webkit-details-marker { display: none; }
.room-multiselect summary > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-multiselect summary small { white-space: nowrap; }
.room-multiselect[open] summary { border-color: var(--accent); }
.room-multiselect-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 9;
  width: 320px; max-width: calc(100vw - 40px); padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 8px 24px #28334620;
}
.room-multiselect-actions { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.room-multiselect-actions button { padding: 7px 12px; font-size: 12px; }
.room-multiselect-panel p { font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
.room-multiselect-options {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px;
  max-height: 240px; max-height: min(240px, 40vh); overflow-y: auto;
  margin: 0; padding: 6px 0 0; border: 0;
}
.room-multiselect-options legend { padding: 0; font-size: 12px; color: #697589; }
.room-multiselect-options label {
  display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 5px;
  border-radius: 6px; cursor: pointer; color: #39475e; overflow-wrap: anywhere;
}
.room-multiselect-options label:hover { background: #fff0f2; }
.filters .room-multiselect input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
@media (max-width: 700px) {
  .room-multiselect { width: 100%; }
  .room-multiselect-panel { width: 100%; max-width: 100%; }
}
