/* Fun學人員管理網站（people/）：沿用 style.css 的顏色、表格、登入卡片，這裡只放頁面版面 */
body.people { overflow: auto; height: auto; min-height: 100%; }
.p-top .title { font-size: 18px; font-weight: 900; }
.p-links { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.p-links a { color: #dbe7f3; text-decoration: none; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,.08); }
.p-links a:hover { background: rgba(255,255,255,.18); color: #fff; }
.p-user { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.p-user button { font-size: 13px; padding: 4px 10px; }
.p-main { flex: 1; width: min(1240px, 100%); margin: 0 auto; padding: 18px 16px 24px; display: flex; flex-direction: column; }
.p-panel { background: var(--panel); border-radius: 16px; box-shadow: 0 6px 24px rgba(15,23,32,.08); overflow: hidden; }
.p-panel .a-tabs { padding: 10px 18px 0; }
.p-panel .a-body { max-height: none; }
.p-h { margin: 0 0 12px; font-size: 19px; }
.p-acting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: #fff8e1; border-bottom: 1px solid #f5d27a; font-size: 14px; }
.p-acting code { background: #fff; border-radius: 4px; padding: 0 5px; font-weight: 700; }
.p-acting .p-back { font-size: 13px; padding: 4px 10px; }
.p-login { margin: 12px auto; }
.p-reghint { margin: 0; background: #eef7ff; border: 1px solid #b9dcf7; border-radius: 10px; padding: 8px 11px; font-size: 13px; line-height: 1.6; }
.p-forgot { justify-self: center; font-size: 13px; }
.p-ok { margin: 10px 0 0; background: #eefaf3; color: #1d6b4a; border-radius: 9px; padding: 8px 11px; font-size: 13.5px; font-weight: 600; }
.p-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.a-course { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.a-course + .a-course { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.a-course > b { font-size: 11px; color: #fff; background: #64748b; border-radius: 5px; padding: 0 6px; margin-right: 8px; letter-spacing: .3px; }
@media (max-width: 760px) {
  .p-login { grid-template-columns: 1fr; }
  .p-login .login-hero { padding: 20px; }
  .p-login .login-hero img { width: 110px; height: 110px; }
}
.a-sub { font-size: 11.5px; color: var(--muted); margin: 0 6px 0 2px; }
.p-homebar { border-radius: 12px; margin-bottom: 12px; background: #eef4fb; border: 1px solid #cfe0f3; }
.p-migrate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: #fff3d6; border: 2px solid #f3b800; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.p-migrate > span { flex: 1; min-width: 240px; }

/* 權限設定（2026-10-29）：學生名單的「已開放」摘要、權限設定分頁的分類表格 */
.pm-hint { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.pm-sum { max-width: 360px; }
.pm-chip { display: inline-block; font-size: 12px; line-height: 1.6; padding: 0 8px; margin: 2px 4px 2px 0; border-radius: 10px; background: #e8f0fe; color: #1e3a8a; white-space: nowrap; }
.pm-chip.sw { background: #fff4e5; color: #8a4b00; }
.pm-chip.over { background: #fdecec; color: #c62828; font-weight: 700; }
.pm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.pm-tabs button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.pm-tabs button.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.pm-grid th, .pm-grid td { text-align: center; vertical-align: middle; }
.pm-grid th { font-size: 13px; white-space: nowrap; }
.pm-grid th.pm-g { background: #eef2f7; font-size: 12px; color: #475569; }
.pm-grid .pm-who { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #fff; z-index: 1; }
.pm-grid .pm-who small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.pm-all td { background: #f6f9fc; }
.pm-all button { font-size: 11.5px; padding: 1px 7px; margin: 1px; }
.pm-cell { min-width: 92px; }
.pm-cell label { display: block; cursor: pointer; margin: 0; }
.pm-cell input { width: 18px; height: 18px; cursor: pointer; }
.pm-cell.on { background: #f1fbf5; }
.pm-off td { opacity: .55; }
.pm-list td:nth-child(-n+4) { white-space: nowrap; }
.pm-list .pm-ck { width: 28px; text-align: center; }
.pm-list .pm-ck input { width: 17px; height: 17px; cursor: pointer; }

/* 老師練習狀態（people.js adminLearn） */
.lr-table th, .lr-table td { text-align: center; vertical-align: middle; }
.lr-table th small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.lr-table th.lr-g { background: #eef2f7; font-size: 12.5px; }
.lr-table .lr-who { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #fff; z-index: 1; }
.lr-table .lr-who small { display: block; font-size: 11.5px; color: var(--muted); }
.lr-cell { min-width: 70px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; }
.lr-cell b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lr-bar { display: block; height: 8px; border-radius: 999px; background: #e3e7f0; overflow: hidden; }
.lr-bar i { display: block; height: 100%; background: #4338ca; border-radius: 999px; }
.lr-cell.done .lr-bar i { background: #46a758; }
.lr-cell.done b { color: #1a7f37; }
.lr-total .lr-cell { min-width: 100px; }
.lr-total .lr-bar { height: 10px; }

/* 2026-10-31：學生表格上方選單固定、表格自己捲動（表頭固定）；搜尋；編輯學生視窗 */
.a-fix { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.a-fix .a-table thead { position: sticky; top: 0; z-index: 3; }
.a-fix .a-table thead th { background: #fff; box-shadow: inset 0 -2px 0 var(--line); }
.a-fix .pm-grid thead th.pm-g { background: #eef2f7; }
.a-fix .pm-all td { background: #f6f9fc; box-shadow: inset 0 -1px 0 var(--line); }
.a-fix .pm-grid thead .pm-who { z-index: 4; }
.a-search { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font: inherit; font-size: 14px; min-width: 200px; flex: 0 1 260px; }
dialog.a-editdlg { width: min(860px, 96vw); max-height: 92vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--ink); }
dialog.a-editdlg::backdrop { background: rgba(15,23,32,.55); }
dialog.a-editdlg form { display: flex; flex-direction: column; max-height: 92vh; }
.ed-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ed-head h3 { margin: 0; font-size: 18px; }
.ed-body { padding: 12px 18px; overflow-y: auto; flex: 1; min-height: 0; }
.ed-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 12px; margin-bottom: 6px; }
.ed-info label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700; color: #475569; }
.ed-info input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 15px; }
.ed-meta { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.ed-sec { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 6px 12px 10px; }
.ed-sec legend { font-weight: 800; padding: 0 6px; }
.ed-g { font-size: 12px; font-weight: 700; color: #475569; margin: 6px 0 4px; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.ed-perm { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 13.5px; }
.ed-perm.on { background: #f1fbf5; border-color: #9fd8b4; }
.ed-perm.over { background: #fdecec; border-color: #f2a3a3; }
.ed-perm > span { flex: 1; }
.ed-perm input[type="checkbox"] { width: 17px; height: 17px; }
.ed-perm input[type="date"] { font: inherit; font-size: 12.5px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 6px; }
.ed-perm input[type="date"]:disabled { opacity: .35; }
.ed-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 18px; border-top: 1px solid var(--line); }
.ed-err { flex: 1; color: var(--fail); font-size: 13px; font-weight: 700; }

/* 2026-10-31 管理者首頁：邀請碼、全部學生、修改老師、上線設定名單 */
.p-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: #eef4fb; border: 1px solid #cfe0f3; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }
.p-inv-note { font-size: 12.5px; color: var(--muted); flex-basis: 100%; }
.p-inv-code { font-size: 17px; font-weight: 800; background: #fff; border: 1px dashed #4338ca; color: #312e81; border-radius: 8px; padding: 2px 10px; letter-spacing: .5px; }
.p-mig-list { flex-basis: 100%; display: flex; flex-wrap: wrap; max-height: 140px; overflow: auto; }
.p-mig-list .pm-chip { background: #fff; border: 1px solid #f3b800; color: #5b4300; font-size: 13px; }
.p-mig-list small { font-size: 11.5px; color: #8a6d00; }
.p-tnote { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
dialog.p-tdlg { width: min(560px, 96vw); }
.p-wide { grid-column: 1 / -1; }
.p-kids td { vertical-align: middle; }
