/* ===== 教学工作台 · 手机端样式 ===== */
:root {
  --bg: #F5EFE4;
  --bg-card: #FBF7EE;
  --sidebar-bg: #EFE8DB;
  --text: #2A2622;
  --text-light: #4A433C;
  --text-muted: #6B6158;
  --border: #D8CFBE;
  --accent: #537D96;
  --accent-hover: #3F6179;
  --accent-light: rgba(83,125,150,0.10);
  --green: #4A6B4A;
  --danger: #8B2C1F;
  --ink-blue: #1B365D;
  --ochre: #9D5F4D;
  --radius: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
/* 强制 hidden 生效（防止被 display:flex 等覆盖） */
[hidden] { display: none !important; }
/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg-card); border-bottom: 0.5px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.topbar .title { font-size: 17px; font-weight: 600; color: var(--text); }
.topbar .me { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.topbar .me button { border: none; background: none; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 2px 4px; }
/* 主内容 */
main { padding: 12px 12px 24px; max-width: 640px; margin: 0 auto; }
/* 卡牌 */
.card {
  background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px;
}
.card h3 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
/* 按钮 */
.btn {
  border: 0.5px solid var(--border); border-radius: var(--radius); background: transparent;
  padding: 6px 12px; font-size: 14px; color: var(--accent); cursor: pointer; font-weight: 500;
}
.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-primary:active { background: var(--accent-hover); }
.btn-block { display: block; width: 100%; text-align: center; padding: 10px; }
/* 输入框 */
.input, textarea.input {
  width: 100%; border: 0.5px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; font-size: 15px; background: var(--bg-card); color: var(--text);
  font-family: inherit;
}
.input:focus, textarea.input:focus { outline: none; border-color: var(--accent); }
/* 底部 tab */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--bg-card); border-top: 0.5px solid var(--border);
  display: flex; height: 58px; padding-bottom: 4px;
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--text-muted); cursor: pointer; background: none; border: none;
}
.tabbar .tab.active { color: var(--accent); }
.tabbar .tab svg { width: 22px; height: 22px; }
/* 待办项 */
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid rgba(0,0,0,0.05); }
.todo-item:last-child { border-bottom: none; }
.todo-item .chk { width: 20px; height: 20px; border: 1.5px solid var(--border); border-radius: 50%; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.todo-item .chk.done { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 12px; }
.todo-item .txt { flex: 1; font-size: 14.5px; }
.todo-item .txt.done { text-decoration: line-through; color: var(--text-muted); }
.todo-item .del { color: var(--danger); background: none; border: none; font-size: 16px; cursor: pointer; padding: 4px; }
/* 空态 */
.empty { text-align: center; color: var(--text-muted); padding: 44px 0; font-size: 13.5px; }
/* 证书 */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 8px; }
.cert-item { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cert-item img { width: 100%; height: 74px; object-fit: cover; display: block; background: var(--bg-soft,#eee); }
.cert-item .nm { font-size: 12px; padding: 6px 8px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 课表网格 */
.tt-grid { display: grid; grid-template-columns: 44px repeat(5,1fr); gap: 3px; font-size: 12px; }
.tt-grid .cell { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 4px; padding: 5px 2px; text-align: center; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.tt-grid .head { background: var(--accent-light); font-weight: 600; color: var(--accent-hover); }
/* 登录页 */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.login .logo { font-size: 44px; margin-bottom: 8px; }
.login h1 { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.login .sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.login .form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; }
/* 提示 */
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(30,30,30,0.9); color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 13.5px; z-index: 999; opacity: 0; transition: opacity .15s; pointer-events: none; }
.toast.show { opacity: 1; }
/* 加载态 */
.loading { text-align: center; color: var(--text-muted); padding: 30px 0; font-size: 13.5px; }


/* ===== 导航页（宫格） ===== */
.tb-left { display: flex; align-items: center; gap: 2px; }
#btn-back {
  border: none; background: none; color: var(--accent); font-size: 19px;
  cursor: pointer; padding: 0 8px 0 0; line-height: 1;
}
.nav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius);
  padding: 20px 4px 16px; color: var(--accent); cursor: pointer; font-family: inherit;
  -webkit-appearance: none;
}
.nav-item:active { background: var(--accent-light); }
.nav-item .n { font-size: 13px; color: var(--text); }
