/* ============================================================
   班级课程表 —— 响应式样式（手机 / 平板 / 电脑）
   ============================================================ */
:root {
  --ph: 58px;                 /* 每节课高度（桌面网格） */
  --time-w: 54px;
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #1f2733;
  --text-2: #64748b;
  --line: #e2e8f0;
  --accent: #3b82f6;
  --accent-soft: #dbeafe;
  --danger: #ef4444;
  --ok: #10b981;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .06);
  --radius: 12px;
}
[data-theme="dark"] {
  --bg: #0f1522;
  --card: #182235;
  --text: #e6ebf4;
  --text-2: #93a1b8;
  --line: #27334a;
  --accent: #60a5fa;
  --accent-soft: #1e3a5f;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

/* ---------- 自绘 SVG 图标 ---------- */
.icon-sprite { display: none; }
.icon { width: 1em; height: 1em; vertical-align: -0.12em; }
.logo-ic { width: 26px; height: 26px; color: var(--accent); display: block; }
.card-title .icon { color: var(--accent); margin-right: 6px; width: 17px; height: 17px; vertical-align: -2px; }
.title-ic { display: flex; align-items: center; gap: 8px; }
.title-ic .icon { color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; }
.ghost .icon { vertical-align: -2px; }
.btn .icon { vertical-align: -2px; }
.mini-btn .icon { width: 12px; height: 12px; vertical-align: -1px; }
.detail-row { display: flex; align-items: center; gap: 8px; }
.detail-row .icon { color: var(--accent); width: 15px; height: 15px; flex: 0 0 auto; }
.banner-ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.day-empty .icon { vertical-align: -2px; margin-right: 4px; }
.dc-note .icon { vertical-align: -2px; margin-right: 3px; }
.tc-now .icon, .tc-next .icon { vertical-align: -2px; margin-right: 3px; }
.off-banner .icon { vertical-align: -3px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .25s, color .25s;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.hidden { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { font-size: 26px; }
.brand-text h1 { font-size: 18px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.semester { font-size: 12px; color: var(--text-2); white-space: nowrap; }

.week-nav { display: flex; align-items: center; gap: 6px; margin: 0 auto; }
.nav-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 20px; line-height: 1;
}
.nav-btn:hover { background: var(--accent-soft); }
.week-info { text-align: center; min-width: 118px; }
#weekSelect {
  font-size: 15px; font-weight: 600; border: none; background: transparent;
  text-align: center; cursor: pointer; padding: 2px 4px;
}
.week-range { font-size: 12px; color: var(--text-2); }

.top-actions { display: flex; gap: 6px; }
.ghost {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font-size: 13px;
}
.ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.admin-btn { color: var(--accent); border-color: var(--accent); }
.today-btn { color: var(--ok); border-color: var(--ok); }

/* ---------- 放假横幅 ---------- */
.off-banner {
  margin: 12px auto 0; max-width: 1200px; padding: 10px 14px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px dashed var(--accent); border-radius: var(--radius);
  text-align: center; font-size: 14px; font-weight: 600;
}

/* ---------- 布局 ---------- */
.layout {
  max-width: 1280px; margin: 0 auto; padding: 14px 16px 30px;
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }

/* ---------- 周视图网格 ---------- */
.grid-wrap {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px; overflow-x: auto;
}
.grid {
  display: grid; min-width: 820px;
  grid-template-columns: var(--time-w) repeat(7, minmax(0, 1fr));
}
.g-head {
  text-align: center; font-size: 14px; font-weight: 600;
  padding: 8px 2px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.g-head .ddate { display: block; font-size: 11px; font-weight: 400; color: var(--text-2); }
.g-head.today, .day-head.today { color: var(--accent); }
.g-head.today .ddate { color: var(--accent); font-weight: 600; }
.time-head { color: var(--text-2); font-weight: 400; font-size: 12px; }
.day-col {
  position: relative; border-left: 1px solid var(--line);
  min-height: 0;
}
.day-col.today { background: var(--accent-soft); opacity: 1; }
.day-col.today { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.time-col { position: relative; border-left: 1px solid var(--line); }
.time-col .tick {
  position: absolute; left: 6px; right: 6px;
  font-size: 10px; color: var(--text-2); text-align: center;
  transform: translateY(-50%);
}
.time-col .tick b { display: block; font-size: 11px; color: var(--text); }

/* 课程块 */
.course-block {
  position: absolute; border-radius: 8px; padding: 4px 6px;
  border-left: 4px solid var(--cb);
  background: color-mix(in srgb, var(--cb) 14%, var(--card));
  color: var(--text); overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  transition: transform .12s, box-shadow .12s;
}
.course-block:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.15); z-index: 5; }
.course-block .cb-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.course-block .cb-meta { font-size: 11px; color: var(--text-2); line-height: 1.45; margin-top: 2px; }
.course-block .cb-note { font-size: 11px; color: var(--accent); }
.course-block.now { outline: 2px solid var(--danger); outline-offset: -2px; }
/* 调课 / 实验课 标记 */
.cb-tag {
  display: inline-block; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 4px; margin-right: 4px; vertical-align: 1px;
  color: #fff;
}
.tag-move { background: #f59e0b; }
.tag-add { background: #10b981; }
.tag-lab { background: #8b5cf6; }
.tag-del { background: #ef4444; }
.course-block.adjust-moved { border-left-style: dashed; }
.course-block.adjust-add { border-left-style: dashed; }
.course-block.is-lab .cb-name { text-decoration: underline dotted; }
.adjust-card .adjust-item { font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line); line-height: 1.6; }
.adjust-card .adjust-item:last-child { border-bottom: none; }
.adjust-admin-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.adjust-admin-item .aai-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.adjust-admin-item .aai-detail { color: var(--text-2); flex: 1; min-width: 180px; }
.adjust-admin-item .aai-note { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.adjust-admin-item .aai-ops { white-space: nowrap; }

/* ---------- 实验课窗口 ---------- */
.lab-btn { color: var(--accent); border-color: var(--accent); }
.lab-window { max-width: 880px; }
.lab-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lab-head h2 { flex: 1; font-size: 17px; }
.lab-nav { display: flex; align-items: center; gap: 8px; }
.lab-week-label { font-size: 15px; font-weight: 700; min-width: 64px; text-align: center; }
.lab-occ-head { font-size: 13px; color: var(--text-2); margin: 4px 0 8px; display: flex; align-items: center; gap: 6px; }
.lab-occ-grid { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; margin-bottom: 14px; }
.occ-row { display: grid; grid-template-columns: 52px repeat(7, minmax(64px, 1fr)); border-bottom: 1px solid var(--line); min-width: 540px; }
.occ-row:last-child { border-bottom: none; }
.occ-head { background: var(--bg); font-size: 12px; font-weight: 600; text-align: center; }
.occ-head .occ-day { padding: 6px 2px; }
.occ-day small { display: block; font-weight: 400; color: var(--text-2); }
.occ-time { padding: 6px 4px; text-align: center; font-size: 12px; color: var(--text-2); border-right: 1px solid var(--line); }
.occ-time small { display: block; }
.occ-cell { min-height: 28px; padding: 3px 5px; font-size: 11px; border-left: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.occ-cell.occupied { background: var(--accent-soft); color: var(--text); }
.occ-cell.occ-lab { background: rgba(139, 92, 246, .16); }
.lab-list-head { font-size: 14px; font-weight: 700; margin: 4px 0 8px; display: flex; align-items: center; gap: 8px; }
.lab-week-count { font-size: 12px; color: var(--text-2); font-weight: 400; }
.lab-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.lab-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.lab-item-meta { color: var(--text-2); }
.lab-item-note { color: var(--accent); font-size: 12px; }
.lab-item-ops { margin-left: auto; white-space: nowrap; }
.lab-empty { color: var(--text-2); font-size: 13px; padding: 10px 0; }
.lab-all { margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.lab-all summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.lab-all-summary { margin-top: 8px; max-height: 260px; overflow-y: auto; }
.lab-sum-row { display: flex; gap: 10px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.lab-sum-week { flex: 0 0 56px; color: var(--text-2); }
.lab-sum-row.has .lab-sum-week { color: var(--accent); font-weight: 600; }
.lab-sum-info { color: var(--text-2); }
.lab-sum-row.has .lab-sum-info { color: var(--text); }
@media (max-width: 767px) {
  .lab-window { max-width: none; }
  .lab-occ-grid { margin-bottom: 10px; }
}
.now-line {
  position: absolute; left: 0; right: 0; z-index: 6;
  border-top: 2px dashed var(--danger); pointer-events: none;
}
.now-line::before {
  content: ""; position: absolute; top: -4px; left: -2px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
}

/* ---------- 手机日视图 ---------- */
.day-view { display: none; }
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; }
.day-tab {
  flex: 1 0 auto; min-width: 46px; text-align: center;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  border-radius: 10px; padding: 7px 8px; font-size: 13px;
}
.day-tab .dt-date { display: block; font-size: 10px; }
.day-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.day-tab.today-tag { box-shadow: 0 0 0 2px var(--ok) inset; }
.day-list { display: flex; flex-direction: column; gap: 10px; }
.day-empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 30px; text-align: center; color: var(--text-2); font-size: 14px;
}
.day-card {
  display: flex; gap: 12px; align-items: stretch;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.day-card .dc-bar { width: 5px; background: var(--cb); flex: 0 0 5px; }
.day-card .dc-time { flex: 0 0 78px; text-align: center; padding: 12px 4px; border-right: 1px solid var(--line); }
.day-card .dc-time b { display: block; font-size: 14px; }
.day-card .dc-time span { font-size: 11px; color: var(--text-2); }
.day-card .dc-body { padding: 10px 12px; flex: 1; }
.day-card .dc-name { font-size: 15px; font-weight: 700; }
.day-card .dc-meta { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.day-card .dc-note { font-size: 12px; color: var(--accent); margin-top: 2px; }
.day-card.now-card { border-color: var(--danger); }

/* ---------- 侧栏卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.today-card .tc-date { font-size: 13px; color: var(--text-2); }
.today-card .tc-big { font-size: 20px; font-weight: 800; margin: 8px 0 2px; }
.today-card .tc-next { font-size: 13px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.today-card .tc-next b { color: var(--accent); }
.today-card .tc-now { font-size: 13px; color: var(--danger); font-weight: 600; margin-top: 8px; }
.notice-item {
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.notice-item:last-child { border-bottom: none; }
.notice-item .ni-title { font-weight: 700; margin-bottom: 4px; }
.notice-item .ni-content { color: var(--text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.notice-item .ni-time { font-size: 11px; color: var(--text-2); margin-top: 4px; opacity: .8; }
.notice-item .ni-ops { margin-top: 6px; }
.notice-item .ni-ops button { margin-right: 8px; font-size: 12px; }
.notice-empty { color: var(--text-2); font-size: 13px; padding: 6px 0; }
.stats-list .stat-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.stats-list .stat-row:last-child { border-bottom: none; }
.stats-list .stat-row b { color: var(--accent); }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center; font-size: 12px; color: var(--text-2);
  padding: 16px 12px 24px; line-height: 2;
}
.footer a { color: var(--text-2); text-decoration: none; margin: 0 8px; }
.footer a:hover { color: var(--accent); }
/* 公安备案标识（官方图标 + 备案号） */
.footer .police-link { display: inline-flex; align-items: center; gap: 5px; margin: 0 8px; vertical-align: middle; }
.footer .police-link img { height: 20px; width: auto; display: block; }
.footer .police-link span { font-size: 12px; line-height: 1; }

/* ---------- 弹层 / 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; backdrop-filter: blur(3px);
}
.modal-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
}
.modal-card.small { max-width: 380px; }
.modal-card h2 { font-size: 18px; margin-bottom: 16px; }
.modal-card label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.modal-card label input, .modal-card label select, .modal-card label textarea {
  display: block; width: 100%; margin-top: 5px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid label { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.form-grid label input, .form-grid label select {
  display: block; width: 100%; margin-top: 5px;
}
.period-pair { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.period-pair input { width: 100%; }
.period-pair span { color: var(--text-2); }
.color-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.color-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer;
}
.color-dot.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--card) inset; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.captcha-row { display: flex; gap: 8px; align-items: center; margin-top: 5px; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-box { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; line-height: 0; background: #eef2f7; cursor: pointer; }
.captcha-box svg { display: block; }
.btn {
  border: none; border-radius: 8px; padding: 9px 18px; font-size: 14px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border: 1px solid var(--line); background: var(--card); color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 6px; }
.form-hint { display: block; font-size: 12px; color: var(--text-2); margin-top: 4px; }
.form-hint.warn { color: #f59e0b; }
.form-hint.ok { color: var(--ok); }

/* ---------- 管理后台 ---------- */
.admin-panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 1080px; height: 92vh; display: flex; flex-direction: column;
  overflow: hidden;
}
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.admin-head h2 { font-size: 17px; }
.admin-head-actions { display: flex; gap: 8px; }
.admin-tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  border: none; background: transparent; color: var(--text-2);
  padding: 9px 16px; font-size: 14px; border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.admin-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.tab-page { display: none; }
.tab-page.active { display: block; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type="search"] { flex: 1; min-width: 200px; }
.toolbar-hint { color: var(--text-2); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.course-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.course-table th, .course-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.course-table th { background: var(--bg); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.course-table tr:last-child td { border-bottom: none; }
.course-table tr:hover td { background: var(--accent-soft); }
.course-table .ct-name { font-weight: 700; }
.course-table .ct-color { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.course-table .ops button {
  border: none; background: transparent; color: var(--accent);
  font-size: 13px; margin-right: 8px; padding: 2px 4px;
}
.course-table .ops .del { color: var(--danger); }
.empty-tip { padding: 26px; text-align: center; color: var(--text-2); font-size: 14px; }
.mini-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--accent);
  border-radius: 6px; padding: 2px 8px; font-size: 13px;
}
.periods-editor { margin-top: 6px; }
.periods-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.periods-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.period-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: var(--bg);
}
.period-row .pno { width: 46px; flex: 0 0 auto; color: var(--text-2); }
.period-row input { flex: 1 1 0; min-width: 0; width: auto; padding: 6px 8px; text-align: center; }
.period-row .p-del { flex: 0 0 auto; border: none; background: transparent; color: var(--danger); font-size: 14px; padding: 2px 4px; }
.admin-notice-list .notice-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.hint { color: var(--text-2); font-size: 13px; margin: 6px 0 12px; line-height: 1.6; }
.hint code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
#tab-data h3 { font-size: 15px; margin: 8px 0 4px; }
#tab-data hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
#tab-data textarea, #tab-data input[type="file"] { width: 100%; }
#tab-data textarea { margin-top: 8px; font-family: Consolas, monospace; font-size: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #1f2937; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; z-index: 300; box-shadow: var(--shadow);
  animation: toast-in .25s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 打印 ---------- */
.print-title { display: none; }
@media print {
  body { background: #fff; }
  .topbar, .sidebar, .day-view, .footer, .overlay, .toast, .off-banner, .print-hide { display: none !important; }
  .layout { display: block; padding: 0; }
  .grid-wrap { border: none; box-shadow: none; padding: 0; overflow: visible; }
  .grid { min-width: 0; grid-template-columns: 44px repeat(7, 1fr); }
  .print-title { display: block; text-align: center; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
  .print-title small { display: block; font-size: 12px; color: #666; font-weight: 400; margin-top: 2px; }
  .course-block { break-inside: avoid; }
  [data-theme="dark"] { --bg: #fff; --card: #fff; --text: #111; --text-2: #555; --line: #ddd; }
}

/* ============ 响应式断点 ============ */

/* 平板 / 小屏笔记本 */
@media (max-width: 1100px) {
  :root { --ph: 46px; --time-w: 44px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar .card { flex: 1 1 280px; }
}

/* 手机 */
@media (max-width: 767px) {
  :root { --ph: 44px; }
  .topbar { padding: 8px 10px; gap: 6px; }
  .brand-text h1 { font-size: 16px; max-width: 34vw; }
  .logo { font-size: 22px; }
  .week-nav { order: 3; width: 100%; justify-content: center; margin-top: 2px; }
  .top-actions { margin-left: auto; }
  .top-actions .ghost { padding: 7px 9px; font-size: 12px; }
  #btnPrint, #btnTheme { display: none; }
  .layout { padding: 10px 10px 20px; display: block; }
  .grid-wrap { display: none; }
  .day-view { display: block; }
  .sidebar { display: flex; flex-direction: column; margin-top: 14px; }
  .sidebar .card { flex: none; }
  .admin-panel { height: 96vh; }
  .admin-head { padding: 12px 14px; }
  .admin-body { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .modal-card { padding: 16px; }
  .footer { font-size: 11px; }
  /* 手机端公安备案标识：缩小图标与文字 */
  .footer .police-link img { height: 14px; }
  .footer .police-link span { font-size: 10px; }
  .footer .police-link { gap: 4px; margin: 0 6px; }
  /* 手机端验证码：输入框独占一行，图片 + 换一张 在下一行 */
  .captcha-row { flex-wrap: wrap; }
  .captcha-row input { flex: 1 1 100%; }
  .captcha-row .mini-btn { padding: 8px 12px; font-size: 13px; }
  .captcha-box svg { width: 180px; height: 56px; }
  /* 手机端节次时刻表：单列铺满 */
  .periods-list { grid-template-columns: 1fr; }
}

/* 打印时强制显示网格 */
@media print {
  .grid-wrap { display: block !important; }
  .day-view { display: none !important; }
}
