/* 班级大屏工作台 · 教师端样式（移动端优先） */
:root {
  --bg: #eef2f8;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #dc2626;
  --ok: #16a34a;
  --border: #e5e7eb;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.mt { margin-top: 16px; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  background: var(--card); border-radius: 16px; padding: 32px 26px; width: 100%; max-width: 380px;
  box-shadow: 0 8px 30px rgba(0,0,0,.10); text-align: center;
}
.login-card .logo { font-size: 44px; }
.login-card h1 { font-size: 21px; margin: 8px 0 2px; }
.login-card .sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
.login-card input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 16px; margin-bottom: 12px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  background: var(--primary); color: #fff; padding: 12px 16px;
}
.brand { font-weight: 700; font-size: 16px; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; }

/* 主体 */
#main { max-width: 760px; margin: 0 auto; padding: 14px 12px 90px; }
.card {
  background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.card h3 { font-size: 16px; margin-bottom: 12px; }
.card input, .card select, .card textarea {
  width: 100%; padding: 11px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; margin-bottom: 10px; background: #fff; font-family: inherit;
}
.card textarea { resize: vertical; }
label.fl { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
label.inline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
label.inline select { width: auto; margin-bottom: 0; }

.row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.row > input, .row > select { margin-bottom: 0; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; margin-bottom: 0; }
.col { flex: 1; }

/* 按钮 */
.btn {
  border: 0; border-radius: 10px; padding: 11px 18px; font-size: 15px; cursor: pointer;
  background: #e8eefc; color: var(--primary); font-weight: 600; font-family: inherit;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.big { width: 100%; padding: 13px; font-size: 17px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: rgba(255,255,255,.16); color: #fff; }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 状态 */
.status-card { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.dot.off { background: #9ca3af; }

/* 列表 */
.list { display: flex; flex-direction: column; gap: 8px; }
.list .item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
}
.item .grow { flex: 1; min-width: 0; }
.item .meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.item .content { word-break: break-all; line-height: 1.5; }
.item .title { font-weight: 700; margin-bottom: 2px; }
.empty { color: var(--muted); text-align: center; padding: 14px 0; font-size: 13px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: #fff; border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: 0; background: none; padding: 8px 0 7px; font-size: 20px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px; color: #9ca3af; font-family: inherit;
}
.tab span { font-size: 11px; }
.tab.active { color: var(--primary); }

/* Toast */
.toast {
  position: fixed; top: 18%; left: 50%; transform: translateX(-50%); z-index: 99;
  background: rgba(17,24,39,.92); color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 15px; max-width: 86vw; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.toast.err { background: rgba(185,28,28,.94); }

@media (min-width: 640px) {
  .tabbar { max-width: 760px; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 0 0; border: 1px solid var(--border); border-bottom: 0; }
}
