/* 半年自評模組專用樣式；品牌色沿用 styles.css 的 body[data-team] 變數 */

/* ── 四頁分頁 ── */
.rv-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; position: sticky; top: 66px; z-index: 30; background: rgba(246,248,251,.96); padding: 10px 0; backdrop-filter: blur(6px); }
.rv-tab { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 800; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.rv-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rv-tab .dot { width: 10px; height: 10px; border-radius: 50%; background: #D0D5DC; }
.rv-tab .dot.ok { background: var(--ok); }
.rv-tab.active .dot { outline: 2px solid rgba(255,255,255,.6); }
.rv-page { display: none; }
.rv-page.active { display: block; }
.rv-page-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.rv-page-head .no { background: var(--ink); color: #fff; font-weight: 900; border-radius: 8px; padding: 2px 10px; font-size: 15px; }
.rv-page-head h2 { font-size: 24px; font-weight: 900; color: var(--brand); }
.rv-page-head .sub { font-size: 14px; color: var(--ink-soft); }

/* ── 3-1 矩陣 ── */
.matrix-wrap { position: relative; overflow-x: auto; padding: 6px 2px 4px; }
.matrix { border-collapse: collapse; table-layout: fixed; }
.matrix td { padding: 0; }
.matrix .cell { width: 56px; height: 56px; border: 1px solid #CBD2DC; background: #fff; cursor: pointer; position: relative; transition: background .12s; }
.matrix .cell:hover { background: var(--brand-soft); }
.matrix .cell.ro { cursor: default; }
.matrix .cell.ro:hover { background: #fff; }
.matrix .cell.band-1 { background: #FAFBFD; }
.matrix .ygroup { width: 30px; writing-mode: vertical-rl; text-orientation: upright; font-weight: 900; font-size: 14px; color: #fff; background: var(--brand); border-radius: 8px; letter-spacing: 2px; text-align: center; }
.matrix .ygroup-cell { padding: 0 6px 0 0; }
.matrix .ylabel { width: 128px; min-width: 128px; white-space: nowrap; font-size: 12.5px; color: var(--ink-soft); text-align: right; padding-right: 8px; line-height: 1.3; }
.matrix .ylabel b { color: var(--ink); font-size: 12px; }
.matrix .xlabel { text-align: center; font-size: 12.5px; color: var(--ink-soft); padding-top: 6px; line-height: 1.3; }
.matrix .xlabel b { color: var(--ink); display: block; }
.matrix .xgroup { text-align: center; padding-top: 8px; }
.matrix .xgroup span { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 900; padding: 5px 12px; border-radius: 8px; font-size: 14px; }
.matrix .xgroup small { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; font-weight: 600; }
.mk { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none; }
.mk.me { background: #1971C2; }
.mk.boss { background: #111; }
.mk.peer { background: #868E96; }
.mk + .mk { transform: translate(-10%, -10%); }
.mk + .mk + .mk { transform: translate(-90%, -90%); }
.matrix-arrows { position: absolute; left: 0; top: 0; pointer-events: none; }
.matrix-arrows text { font-size: 12px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.axis-title { font-weight: 900; font-size: 15px; color: var(--brand); text-align: center; margin-top: 10px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-soft); margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 5px; }

.collab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.collab-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.collab-row label { flex: 1; font-weight: 700; }
.collab-row input { width: 86px; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 16px; text-align: right; }
.collab-row input:disabled { background: #F5F5F5; }
.collab-sum { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--brand-soft); font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.collab-sum.ok { background: #EBFBEE; color: var(--ok); }
.collab-sum.bad { background: #FFF3BF; color: #7A5A00; }
.collab-sum b { font-size: 22px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.prompt-box summary { cursor: pointer; font-weight: 800; color: var(--brand); }
.prompt-box h4 { font-size: 15px; margin: 12px 0 4px; color: var(--ink); }
.prompt-box ol { margin-left: 22px; font-size: 14.5px; color: var(--ink-soft); }
.prompt-box ol li { margin: 3px 0; }

.boss-box { background: #FBF3E4; border: 1px dashed #D9B87A; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.boss-box .tag { font-size: 12px; font-weight: 900; color: #8A6A2E; letter-spacing: 1px; display: block; margin-bottom: 4px; }
.boss-box.empty { color: var(--ink-soft); }
.boss-box.edit { background: #FFFBEF; border-style: solid; border-color: #E2C98F; margin-top: 8px; }
.boss-box.edit textarea { width: 100%; min-height: 76px; border: 1.5px solid #E2C98F; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14.5px; background: #fff; resize: vertical; }
.boss-box.edit textarea:focus { outline: 2px solid #F3E4BC; border-color: #B8923F; }
.mgr-chips .chip.sel { background: #111; border-color: #111; color: #fff; }
.admin-bar { text-align: center; font-size: 14px; padding: 9px 12px; background: #111; color: #fff; font-weight: 700; }
.admin-bar a { color: #F3D27A; text-decoration: none; margin-left: 6px; }
.admin-bar.demo { background: #8A6A2E; }
.admin-bar.demo a { color: #fff; text-decoration: underline; }
.ro-note a, .state-box a { color: var(--brand); font-weight: 800; }
#adminActions .note { font-weight: 700; }

/* ── 3-2 ── */
.q-list .q { display: grid; grid-template-columns: 36px 1fr; gap: 12px; margin-bottom: 18px; align-items: start; }
.q-list .q .no { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.q-list .q label { font-weight: 800; font-size: 15.5px; display: block; margin-bottom: 6px; }
.q-list .q label small { font-weight: 600; color: var(--ink-soft); }
.grade-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-chips .chip.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.grade-chips .chip.sel.g1 { background: #C92A2A; border-color: #C92A2A; }
.grade-chips .chip.sel.g5 { background: #E67700; border-color: #E67700; }

.peer-table { width: 100%; border-collapse: collapse; }
.peer-table th { text-align: left; font-size: 13px; color: var(--ink-soft); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.peer-table td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.peer-table .pname { font-weight: 900; font-size: 16px; white-space: nowrap; }
.peer-table .prole { font-size: 12.5px; color: var(--ink-soft); }
.peer-table .chip { padding: 7px 12px; font-size: 14px; }
.peer-note { margin-top: 8px; }
.peer-note textarea { width: 100%; min-height: 64px; border: 1.5px solid #E6B8B8; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14.5px; background: #FFF9F9; }
.peer-note .hint { font-size: 12.5px; color: var(--warn); font-weight: 700; margin-bottom: 4px; }
.formula-note { background: var(--brand-soft); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--ink); margin-bottom: 14px; }
.formula-note small { display: block; color: var(--ink-soft); margin-top: 4px; }

/* ── 3-3 6×6 ── */
.six-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.six-col h3 { font-size: 17px; font-weight: 900; color: var(--brand); margin: 0 0 4px; }
.six-col .colhint { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.six-row { display: grid; grid-template-columns: 30px 1fr 1fr; gap: 8px; margin-bottom: 8px; align-items: stretch; }
.six-row .n { font-weight: 900; color: var(--ink-soft); padding-top: 10px; text-align: center; }
.six-row textarea { width: 100%; min-height: 72px; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14.5px; resize: vertical; }
.six-row textarea:disabled { background: #F5F5F5; color: var(--ink-soft); }
.six-row.example { background: var(--hover); border-radius: 10px; padding: 8px; font-size: 13px; color: var(--ink-soft); }
.six-row.example .n { color: var(--accent); padding-top: 0; }
.six-row.example div { white-space: pre-wrap; line-height: 1.5; }
.six-head { display: grid; grid-template-columns: 30px 1fr 1fr; gap: 8px; font-size: 13px; font-weight: 800; color: var(--ink-soft); margin-bottom: 6px; }
.books { font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.books b { color: var(--brand); }

/* ── 3-4 溫度計 ── */
.temp-list { display: grid; gap: 10px; }
.temp-card { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; transition: all .12s; text-align: left; font: inherit; }
.temp-card:hover { border-color: var(--brand); }
.temp-card.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.temp-card:disabled { cursor: default; }
.temp-card .bar { width: 10px; height: 100%; min-height: 44px; border-radius: 6px; }
.temp-card .nm { font-weight: 900; font-size: 17px; }
.temp-card .ds { font-size: 14px; color: var(--ink-soft); }
.temp-card .ef { font-weight: 800; white-space: nowrap; font-size: 14.5px; }
.temp-card .pick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }
.temp-card.sel .pick { background: var(--brand); border-color: var(--brand); }
.meaning-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.meaning-chips .chip.sel { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── 送出條／狀態 ── */
.submit-bar .missing { font-size: 13px; color: var(--warn); }
.miss-list { background: #FFF4E5; border: 1px solid #F5D7A8; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: 14.5px; color: #8A5A00; }
.miss-list ul { margin: 6px 0 0 20px; }
.ro-note { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 14px; }

@media (max-width: 899px) {
  .rv-tabs { top: 66px; }
  .rv-tab { padding: 7px 11px; font-size: 13.5px; }
  .two-col, .six-grid, .collab-grid { grid-template-columns: 1fr; }
  .matrix .cell { width: 40px; height: 40px; }
  .matrix .ylabel { width: 104px; min-width: 104px; font-size: 11px; padding-right: 5px; }
  .matrix-arrows text { font-size: 10.5px; }
  .matrix .xlabel { font-size: 11px; }
  .mk { width: 26px; height: 26px; font-size: 10.5px; }
  .temp-card { grid-template-columns: 10px 1fr; }
  .temp-card .ef { white-space: normal; font-size: 13px; }
  .temp-card .pick { display: none; }
  .peer-table .chip { padding: 6px 9px; font-size: 12.5px; }
}
