/* 教师移动端（PWA） */
body { background: var(--bg); overscroll-behavior-y: contain; }
.t-page { min-height: 100vh; display: flex; flex-direction: column; }

/* 头部 */
.t-head {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #1d4ed8, #2563eb 55%, #3b82f6);
  color: #fff; padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 24px -12px rgba(29, 78, 216, .7);
}
.t-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.t-school { font-size: 12px; letter-spacing: 1.5px; opacity: .78; font-weight: 600; }
.t-class { font-size: 22px; font-weight: 800; letter-spacing: .5px; margin-top: 2px; }
.t-head-right { text-align: right; }
.t-date { font-size: 12.5px; opacity: .85; font-weight: 600; }
.t-icon-btn { margin-top: 4px; width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.14); color: #fff; display: inline-grid; place-items: center; cursor: pointer; }

.t-classes { display: flex; gap: 7px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.t-classes::-webkit-scrollbar { display: none; }
.t-class-chip {
  flex: none; height: 30px; padding: 0 13px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.t-class-chip.on { background: #fff; color: var(--brand); border-color: #fff; }

/* 主体 */
.t-body { flex: 1; padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
.t-view { display: flex; flex-direction: column; gap: 12px; }
.t-tip { background: #fff7e6; color: #8a5a00; border: 1px solid #ffe0ad; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; }
.t-hint-row { display: flex; align-items: center; gap: 10px; }
.t-hint { font-size: 12.5px; color: var(--ink-3); flex: 1; }
.t-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.t-card + .t-card { margin-top: 0; }
.t-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.t-card-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.t-card-head .t-card-title { margin-bottom: 0; }
.t-row { display: flex; align-items: center; gap: 10px; }
.t-kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.t-kv:last-child { border-bottom: none; }
.t-kv span { color: var(--ink-3); }
.t-version { text-align: center; color: var(--ink-3); font-size: 12px; margin: 8px 0 0; }

/* 多班选择 */
.t-multi { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.t-multi .chip { font-size: 13px; }

/* 自习卡 */
.t-periods { display: flex; flex-direction: column; gap: 12px; }
.t-period {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.t-period::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--p, var(--brand)); }
.t-period-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.t-period-name { font-size: 16.5px; font-weight: 800; }
.t-period-time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.t-period .textarea {
  min-height: 84px; margin-top: 10px; font-size: 15px; line-height: 1.62;
  background: var(--card-2); border-color: var(--line);
}
.t-period-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.t-period-foot .input { height: 38px; min-height: 38px; font-size: 14px; max-width: 140px; }
.t-teacher-wrap { flex: 1; display: flex; align-items: center; gap: 6px; }
.t-teacher-wrap .help { white-space: nowrap; }
.t-saved { font-size: 12px; color: var(--ok); font-weight: 700; }
.t-counter { text-align: right; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.t-counter.over { color: var(--danger); font-weight: 700; }

/* 通知列表 */
.t-notice { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 9px; background: var(--card-2); }
.t-notice.pinned { border-color: #ffd8a8; background: #fffaf0; }
.t-notice-text { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.t-notice-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }

/* 课表 */
.t-day-tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.t-day-tab { flex: none; width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.t-day-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.t-course-row { display: grid; grid-template-columns: 1fr 1fr 1.1fr 1.1fr 30px; gap: 5px; margin-bottom: 6px; align-items: center; }
.t-course-row .input { min-height: 36px; height: 36px; padding: 4px 8px; font-size: 13px; }
.t-course-row .del { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-3); cursor: pointer; }
.t-course-row .del:hover { color: var(--danger); border-color: #f2c2c2; }
.t-course-empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 18px 0; }
.t-period-time-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.t-period-time-row .name { font-size: 13.5px; font-weight: 700; }
.t-period-time-row .input { min-height: 36px; height: 36px; padding: 4px 8px; font-size: 13px; }

/* 今日课程 */
.t-course-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.t-course-item:last-child { border-bottom: none; }
.t-course-item .time { font-size: 12.5px; color: var(--ink-3); width: 96px; font-variant-numeric: tabular-nums; }
.t-course-item.now { background: var(--brand-soft); border-radius: 8px; padding-left: 8px; font-weight: 800; color: var(--brand); }

/* 底部导航 */
.t-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.t-tab {
  height: 58px; border: none; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--ink-3); cursor: pointer;
}
.t-tab.on { color: var(--brand); }
.t-tab.on svg { transform: translateY(-1px); }

@media (min-width: 760px) {
  .t-page { max-width: 720px; margin: 0 auto; }
  .t-body { padding-bottom: 90px; }
}
