:root { --c:#2f6f73; --c2:#e8f2f2; --line:#cfd8dc; --red:#c0392b; --warn:#b26a00; --ok:#2e7d32; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif; font-size: 15px; color: #222; background: #f6f8f8; }
.top { background: var(--c); color: #fff; display: flex; align-items: center; gap: 16px; padding: 8px 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 18px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav button { background: transparent; color: #dfeeee; border: 0; padding: 8px 10px; border-radius: 6px; font-size: 15px; cursor: pointer; }
nav button.on { background: #fff; color: var(--c); font-weight: 700; }
.who { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.who button { font-size: 12px; padding: 3px 8px; }
main { padding: 12px 14px 40px; max-width: 1500px; margin: 0 auto; }
.subtabs { display: flex; gap: 6px; margin-bottom: 8px; }
.subtabs button { padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; }
.subtabs button.on { background: var(--c2); border-color: var(--c); color: var(--c); font-weight: 700; }
.subtabs button:disabled { color: #999; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.bar label { white-space: nowrap; }
select, input, textarea, button { font: inherit; }
select, input[type=text], input:not([type]), input[type=date], input[type=number], textarea { border: 1px solid #b0bec5; border-radius: 5px; padding: 4px 6px; background: #fff; }
button { border: 1px solid #b0bec5; background: #fff; border-radius: 6px; padding: 5px 12px; cursor: pointer; }
button:hover { background: #f0f4f4; }
button.primary { background: var(--c); color: #fff; border-color: var(--c); }
button.danger { color: var(--red); border-color: #e3a49c; }
button.small { padding: 2px 8px; font-size: 13px; }
.chk { display: inline-flex; align-items: center; gap: 4px; }
.hint { color: #546e7a; font-size: 13px; margin: 4px 0 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.chip { padding: 3px 10px; border-radius: 12px; background: #eceff1; font-size: 13px; }
.chip.ok { background: #e8f5e9; color: var(--ok); } .chip.warn { background: #fff3e0; color: var(--warn); } .chip.bad { background: #fdecea; color: var(--red); }
table.list { border-collapse: collapse; width: 100%; background: #fff; }
table.list th, table.list td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; vertical-align: top; font-size: 14px; }
table.list th { background: var(--c2); position: sticky; top: 0; }
table.list.wide td { font-size: 13px; }
.scroll { overflow: auto; max-height: 75vh; }
.st-none { color: #999; } .st-sub { color: var(--warn); font-weight: 700; } .st-rev { color: var(--ok); font-weight: 700; } .st-ret { color: var(--red); font-weight: 700; }
.flag { color: var(--red); font-weight: 700; } .muted { color: #90a4ae; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.box summary { cursor: pointer; font-weight: 700; color: var(--c); }
.rules { background: #fffdf3; border: 1px solid #ecdca4; border-radius: 8px; padding: 10px 14px; margin: 8px 0; line-height: 1.7; }
.rules h3 { margin: 0 0 6px; font-size: 16px; }
.rules .cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; }
.rules ol { margin: 4px 0 0 18px; padding: 0; }
.rules.small { font-size: 13px; line-height: 1.6; }
@media (max-width: 800px) { .rules .cols { grid-template-columns: 1fr; } }
.lock { display: none; }
.lockcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; max-width: 420px; margin: 40px auto; padding: 22px; text-align: center; }
.lockcard input { width: 220px; margin: 10px 0; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; z-index: 20; overflow: auto; padding: 30px 10px; }
.mbox { background: #fff; border-radius: 10px; padding: 16px 18px; max-width: 560px; width: 100%; }
.mbox h3 { margin: 0 0 10px; }
.mbox .row { margin: 8px 0; }
.mbox .row label { display: block; font-size: 13px; color: #546e7a; }
.mbox .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #263238; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 30; white-space: pre-line; max-width: 90vw; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; }
.pgrid label { display: block; font-size: 13px; color: #546e7a; }
.pgrid .full { grid-column: 1 / -1; }
.pgrid textarea { width: 100%; min-height: 54px; }
.pgrid input, .pgrid select { width: 100%; }
.remind { background: #eef7f7; border-left: 4px solid var(--c); padding: 6px 10px; font-size: 13px; margin: 6px 0; white-space: pre-line; }
.pick { position: relative; }
.pick .opts { position: absolute; z-index: 9; background: #fff; border: 1px solid var(--line); max-height: 240px; overflow: auto; width: 100%; }
.pick .opts div { padding: 4px 8px; cursor: pointer; } .pick .opts div:hover { background: var(--c2); }

/* ── 考核表（跟 Excel 一樣的版面） ── */
.sheet { background: #fff; width: 1000px; max-width: 100%; margin: 0 auto 20px; padding: 14px 16px; font-family: "標楷體", "DFKai-SB", "BiauKai", "Microsoft JhengHei", serif; color: #000; }
.sheet .h1 { text-align: center; font-weight: 700; font-size: 18px; line-height: 1.5; position: relative; }
.sheet .h1 .rev { position: absolute; right: 0; bottom: 0; font-size: 11px; font-weight: 400; }
.sheet .h2 { display: flex; gap: 40px; font-size: 14px; margin: 6px 0 4px; border-bottom: 1px solid #000; padding-bottom: 3px; }
table.f { border-collapse: collapse; width: 100%; table-layout: fixed; }
table.f th, table.f td { border: 1px solid #000; padding: 2px 4px; font-size: 13px; vertical-align: middle; }
table.f th { background: #d9e2f3; text-align: center; }
table.f .cat { text-align: center; font-weight: 700; width: 52px; }
table.f .item { font-weight: 700; text-align: center; }
table.f .lv1 { font-weight: 700; }
table.f .note { color: #7f7f7f; font-size: 12px; white-space: pre-line; }
table.f .num { text-align: center; font-weight: 700; font-size: 15px; }
table.f .inp { background: #fff2cc; text-align: center; color: #0000ff; font-weight: 700; font-size: 15px; }
table.f .inp select[data-k="edu"] { font-size: 12px; max-width: 100%; }
table.f .inp select { font-size: 15px; color: #0000ff; font-weight: 700; background: #fff2cc; border: 0; }
table.f .rs textarea { width: 100%; min-height: 40px; border: 1px solid #ddd; font-size: 12px; font-family: inherit; }
table.f .rs { font-size: 12px; white-space: pre-line; }
table.f .basis { font-size: 12px; }
table.f .sub { background: #e2efda; font-weight: 700; text-align: center; }
table.f .tot { background: #fce4d6; font-weight: 700; text-align: center; font-size: 15px; }
table.f .err { outline: 2px solid var(--red); }
.sheet .expl { font-size: 12px; white-space: pre-line; border: 1px solid #000; border-top: 0; padding: 4px 6px; line-height: 1.6; }
.sheet .fillnote { font-size: 12px; color: #555; margin-top: 4px; }
.stampRow { display: flex; gap: 60px; flex-wrap: wrap; align-items: flex-start; }
.stLb { font-size: 13px; margin-bottom: 4px; }
.stamp { display: inline-block; border: 2px solid var(--red); color: var(--red); padding: 4px 12px; text-align: center; line-height: 1.45; border-radius: 3px; font-family: "DFKai-SB", "BiauKai", "標楷體", serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.stamp .s1 { font-size: 11px; } .stamp .s2 { font-size: 12px; border-bottom: 1px solid var(--red); padding-bottom: 2px; }
.stamp .s3 { font-size: 19px; font-weight: 700; letter-spacing: 4px; } .stamp .s4 { font-size: 11px; border-top: 1px solid var(--red); padding-top: 2px; }
.formbar { position: sticky; top: 52px; background: #f6f8f8; padding: 6px 0; z-index: 4; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.formbar .live { font-weight: 700; color: var(--c); }
.banner { padding: 8px 12px; border-radius: 6px; margin: 6px 0; }
.banner.ret { background: #fdecea; color: var(--red); } .banner.rev { background: #e8f5e9; color: var(--ok); } .banner.sub { background: #fff3e0; color: var(--warn); }

.printonly { display: none; }
@media print {
  @page { size: A4; margin: 8mm; }
  body { background: #fff; }
  .noprint, .top, .bar, .hint, .chips, .formbar, .lock, .lockcard, button { display: none !important; }
  body.printing main { display: none; }
  body.printing .printonly { display: block; }
  .sheet { width: auto; padding: 0; margin: 0; page-break-after: always; }
  .sheet:last-child { page-break-after: auto; }
  table.f th, table.f td { font-size: 11px; }
  table.f .inp, table.f .inp select { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.list th { position: static; }
  .scroll { max-height: none; overflow: visible; }
}
