/* 新培行政系統：喺學習平台嘅 style.css 上面加 */
.trial-tag { font-size: .7rem; font-weight: 700; color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; padding: 1px 8px; margin-left: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { display: flex; flex-direction: column; padding: 14px 16px; margin: 0; color: var(--ink); text-decoration: none; }
.stat-card b { font-size: 1.8rem; line-height: 1.1; }
.stat-card span { color: var(--muted); font-size: .9rem; }
.stat-card.warn b { color: var(--red); }
a.stat-card:hover { border-color: var(--brand); }

/* 課堂卡 */
.ls-list { display: grid; gap: 8px; }
.ls-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 0; color: var(--ink); text-decoration: none; border-left: 5px solid var(--c); }
.ls-card:hover { border-color: var(--brand); border-left-color: var(--c); }
.ls-card.cancelled { opacity: .55; }
.ls-time { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.ls-time b { font-size: 1.1rem; }
.ls-time small { color: var(--muted); }
.ls-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ls-stats { font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.ls-roll { font-size: .85rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--brand); color: var(--on-brand); white-space: nowrap; }
.ls-roll.todo { background: var(--red-soft); color: var(--red); }
.ls-roll.ok { background: #ECFDF3; color: #027A48; }

/* 時間表 */
.tt-bar { align-items: center; }
.tt-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tt-range { margin-left: 6px; white-space: nowrap; }
.tt-week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.tt-col { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.tt-col.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.tt-day { font-weight: 700; text-align: center; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.tt-day small { color: var(--muted); font-weight: 400; }
.tt-ev { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; border-left: 4px solid var(--c); background: var(--brand-soft); color: var(--ink); text-decoration: none; font-size: .78rem; line-height: 1.35; }
.tt-ev b { font-size: .85rem; word-break: break-all; }
.tt-ev small { color: var(--muted); }
.tt-ev:hover { outline: 2px solid var(--brand); }
.tt-ev.cancelled { opacity: .5; text-decoration: line-through; }
.tt-days { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.tt-days .chip { display: flex; flex-direction: column; align-items: center; min-width: 48px; }

/* 表格 */
.c-table tr[data-href], tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--brand-soft); }
tr.cancelled td { opacity: .5; text-decoration: line-through; }
.c-head { border-left: 6px solid var(--c); }
.c-head h1, .rc-head h1 { margin: 0 0 4px; font-size: 1.35rem; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 10px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; }

/* 點名 */
.rc-head { border-left: 6px solid var(--c); }
.rc-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.rc-sum b { font-size: 1.2rem; }
.rc-list { padding: 4px 14px; }
.rc-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.rc-row:last-child { border-bottom: 0; }
.rc-row.gone { opacity: .55; grid-template-columns: 1fr; }
.rc-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-move { color: var(--brand); }
.rc-note { color: var(--gold); }
.tag-trial { color: #7A5AF8; }
.rc-att { display: flex; gap: 4px; }
.att-b { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; min-width: 48px; }
.att-b:hover { border-color: var(--brand); }
.att-b.ok.on { background: #12B76A; border-color: #12B76A; color: #fff; }
.att-b.warn.on { background: #F79009; border-color: #F79009; color: #fff; }
.att-b.bad.on { background: var(--red); border-color: var(--red); color: #fff; }
.att-b.leave.on { background: #2E90FA; border-color: #2E90FA; color: #fff; }
.rc-notes { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; white-space: nowrap; }
.att-tag { font-weight: 700; font-size: .85rem; }
.att-tag.ok { color: #12B76A; } .att-tag.warn { color: #F79009; } .att-tag.bad { color: var(--red); } .att-tag.leave { color: #2E90FA; }
.badge-info { background: #EFF8FF; color: #175CD3; }

/* 請假調堂 */
.lv-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.lv-row:last-child { border-bottom: 0; }
.lv-main { flex: 1; min-width: 0; line-height: 1.6; }
.lv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lv-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip .cnt { margin-left: 2px; font-weight: 700; }

/* 揀人／揀堂 */
.sp-row { padding: 6px 4px; }
.pk-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; margin-bottom: 6px; }
.pk-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.parent-box { border: 1.5px dashed var(--line); border-radius: 12px; padding: 8px 14px; margin: 10px 0; }
.parent-box legend { font-weight: 700; padding: 0 6px; }
.set-branch { padding: 8px 0; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 760px) {
  .rc-row { grid-template-columns: 1fr; }
  .rc-att { width: 100%; }
  .att-b { flex: 1; padding: 10px 4px; }
  .tt-nav { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: 100px 1fr; }
  .lv-row { flex-direction: column; }
  .lv-side { align-items: flex-start; }
}
.filters > .chips { flex: 1 1 100%; }
.filters .chip, .tt-days .chip { white-space: nowrap; flex: none; }
.filters .search { flex: 1 1 220px; }
.card.filters { display: flex; flex-wrap: wrap; align-items: center; }

/* 補堂規則 */
.lv-wait { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.lv-wait.mid { color: #B54708; font-weight: 700; }
.lv-wait.old { color: var(--red); font-weight: 700; }
.btn-wa { background: #25D366; border-color: #25D366; color: #fff; text-decoration: none; }
.btn-wa:hover { background: #1DA851; border-color: #1DA851; color: #fff; }
.wa-preview { white-space: pre-wrap; font: inherit; font-size: .92rem; background: #E7FFDB; color: #111B21; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.ad-tier { font-weight: 700; font-size: .85rem; margin: 12px 0 6px; padding-left: 8px; border-left: 4px solid var(--brand); }
.ad-tier:first-child { margin-top: 4px; }
.ad-tier.t3, .ad-tier.t4 { border-left-color: #2E90FA; }
.ad-tier.t5 { border-left-color: #F79009; }
.ad-tier.t9 { border-left-color: var(--red); color: var(--red); }
.pk-row.out { border-style: dashed; opacity: .8; }
.mk-table td { vertical-align: top; }
.mk-hint { font-size: .8rem; color: var(--muted); }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }
.check-grid .check { margin: 0; }

/* 學費 */
.bill-tabs { margin: -6px 0 14px; flex-wrap: wrap; }
.bill-tabs .chip { text-decoration: none; }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav b { min-width: 96px; text-align: center; }
.mn-box { display: flex; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ok-text { color: #027A48; }
.warn-text { color: #B54708; }
.inv-total { text-align: right; }
.inv-total small { display: block; color: var(--muted); }
.inv-total b { font-size: 1.8rem; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.ls-chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 3px 6px; border-radius: 8px; border: 1px dashed var(--line); font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: line-through; }
.ls-chip small { font-weight: 400; font-size: .7rem; }
.ls-chip.on { border-style: solid; border-color: var(--brand); color: var(--ink); text-decoration: none; background: var(--brand-soft); }
.ls-chip.cx { opacity: .55; }
.disc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.disc-row.sugg { background: #EFF8FF; margin: 0 -12px; padding: 10px 12px; border-radius: 10px; border-bottom: 0; margin-bottom: 6px; }
.disc-row .actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.inv-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; max-width: 320px; margin: 14px 0 0 auto; }
.inv-sum dt { color: var(--muted); }
.inv-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
tr.voided td { opacity: .5; text-decoration: line-through; }
tr.voided td.actions, tr.voided td:nth-child(5) { text-decoration: none; }
.ls-pick { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.ls-pick .check { margin: 0; }
.pm { flex-wrap: wrap; }
.pm .chip { cursor: pointer; }
.pm .chip input { position: absolute; opacity: 0; pointer-events: none; }
.pm .chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.receipt { position: relative; max-width: 620px; margin: 0 auto; background: #fff; color: #111; border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px; }
.receipt header { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #C94B09; padding-bottom: 12px; margin-bottom: 14px; }
.receipt header img { width: 56px; height: 56px; object-fit: contain; }
.receipt h1 { margin: 0; font-size: 1.5rem; color: #111; }
.receipt header p { margin: 2px 0 0; color: #555; letter-spacing: .05em; }
.rc-meta { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 0 0 14px; }
.rc-meta dt { color: #666; }
.rc-meta dd { margin: 0; }
.rc-items { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.rc-items th, .rc-items td { border-bottom: 1px solid #ddd; padding: 7px 4px; text-align: left; }
.rc-items .num { text-align: right; }
.rc-items .rc-strong td { font-weight: 700; border-bottom: 2px solid #111; }
.rc-pay { border-top: 1px dashed #bbb; padding-top: 12px; }
.receipt footer { margin-top: 18px; color: #777; font-size: .85rem; text-align: center; }
.rc-void { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 4rem; font-weight: 900; color: rgba(217, 45, 32, .25); border: 6px solid rgba(217, 45, 32, .25); padding: 0 20px; border-radius: 12px; pointer-events: none; }
@media print {
  .sidebar, .topbar, .tabbar, .no-print, #toast { display: none !important; }
  body, .main, .content { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .receipt { border: 0; max-width: none; padding: 0; }
}
@media (max-width: 760px) {
  .inv-total b { font-size: 1.4rem; }
  .disc-row { flex-direction: column; align-items: flex-start; }
  .receipt { padding: 18px; }
}

/* 門口簽到 */
.ck-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.ck-panel { min-height: 330px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 26px; border: 2px solid var(--line); background: var(--surface); transition: background .2s; }
.ck-panel.idle { color: var(--muted); }
.ck-panel.idle b { font-size: 2rem; color: var(--ink); }
.ck-big { opacity: .5; }
.ck-panel.ok { background: #ECFDF3; border-color: #12B76A; color: #054F31; }
.ck-panel.info { background: #EFF8FF; border-color: #2E90FA; color: #194185; }
.ck-panel.warn { background: #FFFAEB; border-color: #F79009; color: #7A2E0E; }
.ck-panel.bad { background: #FEF3F2; border-color: #F04438; color: #7A271A; }
.ck-name { font-size: 2.6rem; font-weight: 800; line-height: 1.15; }
.ck-msg { font-size: 1.6rem; font-weight: 700; }
.ck-lesson { font-size: 1.05rem; opacity: .9; }
.ck-tag { font-weight: 700; padding: 4px 12px; border-radius: 99px; background: rgba(0, 0, 0, .08); }
.ck-unpaid { margin-top: 6px; font-weight: 800; font-size: 1.15rem; padding: 8px 16px; border-radius: 12px; background: #F79009; color: #fff; }
.ck-input { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; color: var(--muted); }
.ck-input input { flex: 1; font-family: ui-monospace, monospace; }
.ck-ls { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.ck-ls span small { display: block; }
.ck-ls.now { background: var(--brand-soft); border-radius: 10px; }
.ck-ls.done { opacity: .55; }
.ck-count { font-weight: 800; font-variant-numeric: tabular-nums; }
.ck-count.full { color: #027A48; }
.ck-rc { padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.ck-key { font-size: .9rem; padding: 6px 10px; border-radius: 8px; background: var(--brand-soft); word-break: break-all; }
.rc-scan { color: #027A48; }
@media (max-width: 900px) { .ck-layout { grid-template-columns: 1fr; } .ck-name { font-size: 2rem; } }

/* 同步 LinkClass */
.sync-steps { padding-left: 20px; line-height: 1.9; }
.bm-link { cursor: grab; }
.sync-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; }
.sync-stats span b { margin-right: 3px; }
.sync-run { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.sync-run:last-child { border-bottom: 0; }
.sync-run.bad b { color: var(--red); }
.tf-steps { padding-left: 20px; line-height: 1.8; }
.tf-qr { margin: 8px 0; }
.tf-qr svg { width: 180px; height: 180px; background: #fff; border-radius: 10px; }

/* 時間表（LinkClass 版面） */
.tt2-head { margin-bottom: 6px; }
.tt2-branches { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 0 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.tt2-branches button { border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.tt2-branches button.on { background: var(--brand-soft); color: var(--brand); }
.tt2-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin: 0; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); position: relative; z-index: 1; }
.tt2-range { position: relative; font-size: 1.15rem; font-weight: 700; padding: 4px 8px; cursor: pointer; white-space: nowrap; }
.tt2-range span::after { content: " ⌄"; color: var(--muted); font-weight: 400; }
.tt2-pick { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tt2-today { font-style: normal; font-size: .8rem; background: var(--brand); color: var(--on-brand); padding: 2px 8px; border-radius: 99px; margin-left: 4px; vertical-align: middle; }
.tt2-spacer { flex: 1; }
.tt2-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.tt2-filters select { width: auto; min-width: 90px; padding: 6px 10px; border-radius: 8px; }
.tt2-filters select.on { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.tt2-search { flex: 1 1 200px; max-width: 320px; }
.tt2-none { margin: 4px 0 10px; }
.tt2-week { display: grid; grid-template-columns: repeat(7, minmax(168px, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; background: var(--surface); }
.tt2-col { border-left: 1px solid var(--line-soft); padding: 0 6px 10px; min-height: 360px; display: flex; flex-direction: column; gap: 6px; }
.tt2-col:first-child { border-left: 0; }
.tt2-dh { position: sticky; top: 0; text-align: center; font-weight: 600; font-size: .9rem; padding: 8px 0; border-bottom: 1px solid var(--line-soft); margin: 0 -6px 4px; background: var(--surface); z-index: 1; }
.tt2-pill { background: #2E5BFF; color: #fff; padding: 2px 10px; border-radius: 99px; }
.tt2-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border-left: 4px solid var(--c); text-decoration: none; font-size: .82rem; line-height: 1.35;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--ink); }
.tt2-card:hover { outline: 2px solid var(--c); }
.tt2-card .tt2-title { font-size: .95rem; color: color-mix(in srgb, var(--c) 70%, var(--ink)); word-break: break-word; }
.tt2-card span { display: flex; align-items: flex-start; gap: 4px; color: color-mix(in srgb, var(--c) 45%, var(--ink)); }
.tt2-card span svg { flex: none; margin-top: 2px; }
.tt2-card small { color: var(--muted); }
.tt2-tag { align-self: flex-start; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.tt2-card.cancelled, .tt2-ev.cancelled, .tt2-mi.cancelled { opacity: .5; text-decoration: line-through; }
.tt2-gridwrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tt2-grid { display: grid; position: relative; min-width: max-content; }
.tt2-gh { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft); padding: 6px 4px; text-align: center; font-size: .78rem; font-weight: 600; }
.tt2-gday { font-size: .88rem; border-bottom: 1px solid var(--line-soft); }
.tt2-groom { top: 33px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt2-grid.single .tt2-groom { top: 0; }
.tt2-corner { left: 0; z-index: 4; border-left: 0; }
.tt2-axis { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line-soft); }
.tt2-axis span { position: absolute; right: 6px; font-size: .72rem; color: var(--muted); transform: translateY(-50%); }
.tt2-axis span:first-child { transform: none; }
.tt2-gcol { position: relative; border-left: 1px solid var(--line-soft);
  background-image: repeating-linear-gradient(to bottom, var(--line-soft) 0, var(--line-soft) 1px, transparent 1px, transparent 60px); }
.tt2-gcol.today { background-color: color-mix(in srgb, var(--brand) 4%, transparent); }
.tt2-ev { position: absolute; overflow: hidden; display: flex; flex-direction: column; padding: 4px 6px; border-radius: 8px; border-left: 3px solid var(--c); font-size: .72rem; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); text-decoration: none; z-index: 1; }
.tt2-ev:hover { z-index: 5; outline: 2px solid var(--c); overflow: visible; min-height: max-content; }
.tt2-ev b { font-size: .76rem; color: color-mix(in srgb, var(--c) 70%, var(--ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt2-ev small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.tt2-unpaid { color: var(--red) !important; font-weight: 700; }
.tt2-month { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.tt2-mrow, .tt2-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tt2-mhead div { padding: 8px; font-weight: 600; font-size: .85rem; border-bottom: 1px solid var(--line); }
.tt2-mc { min-height: 118px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt2-mc:nth-child(7n) { border-right: 0; }
.tt2-mc.other { background: var(--bg, rgba(0,0,0,.03)); opacity: .6; }
.tt2-md { align-self: flex-start; border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: var(--ink); }
.tt2-mc.today .tt2-md { background: #2E5BFF; color: #fff; }
.tt2-mi { display: block; font-size: .72rem; padding: 2px 6px; border-radius: 6px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface));
  color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt2-more { font-size: .75rem; text-align: left; padding-left: 6px; }
@media (max-width: 760px) {
  .tt2-spacer { display: none; }
  .tt2-range { font-size: 1rem; }
  .tt2-mc { min-height: 70px; }
  .tt2-mi b { display: none; }
}
.main.wide { max-width: none; }
.tt2-filters select { width: auto; min-width: 88px; height: auto; padding: 6px 28px 6px 10px; font-size: .9rem; }
.tt2-search input { padding-top: 7px; padding-bottom: 7px; }
.st-tabs { margin-top: 12px; }
.st-week { font-size: .95rem; margin: 14px 0 6px; color: var(--muted); }

/* 課程（LinkClass 版面） */
.c-links { margin: -6px 0 10px; }
.c-more { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.w-num { width: 80px; }
.cs-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cs-filters select { width: auto; }
.bulk-list { max-height: 260px; overflow: auto; }
.pre { white-space: pre-wrap; }
.rc-row { grid-template-columns: 1fr auto auto auto auto; }
.rc-order { color: var(--muted); }
.rc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.rc-filters select { width: auto; }
.menu-list { display: flex; flex-direction: column; }

/* 學費（加強） */
.inv-x-acts { display: contents; }
.inv-remark { background: var(--surface-2, #f6f3ee); border-radius: 8px; padding: 6px 10px; }
.claim-card { border-left: 4px solid var(--gold, #c9a227); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.timeline li:last-child { border-bottom: 0; }
.invoice-print { max-width: 760px; }
.ip-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ip-remark { border: 1px dashed #bbb; border-radius: 8px; padding: 8px 10px; }
.ip-terms { margin-top: 14px; font-size: .8rem; color: #444; }
.ip-terms p { margin: 4px 0 0; }
.ip-foot { margin-top: 14px; font-size: .78rem; color: #555; text-align: center; border-top: 1px solid #ddd; padding-top: 10px; }
.rc-items small { color: #555; }
/* 家長付款頁 */
.pay-page { background: var(--bg, #f6f3ee); }
.pay-wrap { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
.pay-card h1 { margin: 0; font-size: 1.3rem; }
.pay-card h2 { font-size: 1.05rem; margin: 14px 0 6px; }
.pay-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.pay-table td { padding: 7px 0; border-bottom: 1px solid var(--line-soft, #eee); vertical-align: top; }
.pay-table .num { text-align: right; white-space: nowrap; padding-left: 10px; }
.pay-table .tot td { font-weight: 700; }
.pay-table .disc td { color: var(--ok, #2e7d32); }
.pay-remark { background: #fff8e6; border-radius: 8px; padding: 8px 10px; }
.pay-ok { background: #e8f5e9; border-radius: 8px; padding: 8px 10px; }
.pay-form { display: grid; gap: 10px; }
.pay-form .err { color: #b00020; margin: 0; }
.pay-foot { text-align: center; padding: 8px 0 24px; }
@media (max-width: 760px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .ip-top { grid-template-columns: 1fr; }
}

/* 報告分析 */
.rp-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rp-filters select { width: auto; }
.rp-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.rp-tile { display: flex; flex-direction: column; gap: 2px; }
.rp-tile > span { color: var(--muted); font-size: .85rem; }
.rp-tile b { font-size: 1.6rem; }
.rp-chart { position: relative; --series-1: #2a78d6; --series-2: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rp-chart, :root:not([data-theme="light"]) .rp-legend { --series-1: #3987e5; --series-2: #d95926; } }
:root[data-theme="dark"] .rp-chart, :root[data-theme="dark"] .rp-legend { --series-1: #3987e5; --series-2: #d95926; }
.rp-legend { display: flex; gap: 14px; font-size: .85rem; color: var(--muted); --series-1: #2a78d6; --series-2: #eb6834; }
.rp-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.rp-legend .s1 { background: var(--series-1); } .rp-legend .s2 { background: var(--series-2); }
.rp-svg { width: 100%; height: auto; display: block; }
.rp-svg .grid { stroke: var(--line-soft); stroke-width: 1; }
.rp-svg .ax { fill: var(--muted); font-size: 11px; }
.rp-svg .s1 { fill: var(--series-1); } .rp-svg .s2 { fill: var(--series-2); }
.rp-svg .hit { fill: transparent; }
.rp-svg .rp-bar.on .hit { fill: var(--line-soft); }
.rp-tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .85rem; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.rp-break tr.clickable { cursor: pointer; }
.rp-exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rp-exp { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; text-decoration: none; color: inherit; }
.rp-exp:hover { border-color: var(--brand); }
.rp-exp div { display: flex; flex-direction: column; gap: 2px; }
.rp-svg .s3, .rp-legend .s3 { fill: var(--muted); background: var(--muted); opacity: .55; }
.rp-warn { background: var(--gold-soft); color: var(--gold); border-radius: 8px; padding: 8px 12px; }

/* 潛在客戶、網上報名 */
.pick-row { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: inherit; cursor: pointer; font: inherit; }
.pick-row:hover { background: var(--surface-2); }
.pick-row small { display: block; margin-top: 2px; }
.crm-form-link { margin-top: 8px; }
.enrol-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
fieldset.field { border: 0; padding: 0; margin: 0 0 10px; }
fieldset.field legend { font-size: .9rem; color: var(--muted); margin-bottom: 4px; padding: 0; }
/* 問卷 */
.sv-qedit { margin-bottom: 10px; }
.sv-rate { display: flex; gap: 8px; }
.sv-rate label { cursor: pointer; }
.sv-rate input { position: absolute; opacity: 0; }
.sv-rate span { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; font-weight: 700; }
.sv-rate input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.sv-rate input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.sv-q .check { display: flex; margin: 4px 0; }
.sv-opts { display: grid; gap: 6px; }
.sv-opt { display: grid; grid-template-columns: minmax(80px, 180px) 1fr 40px; gap: 10px; align-items: center; }
.sv-opt b { text-align: right; }
.sv-bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.sv-bar i { display: block; height: 100%; background: #2a78d6; border-radius: 5px; }
.sv-texts { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.me-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* 訊息 */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 4px; flex-wrap: wrap; }
.seg-btn { border: 0; background: var(--surface); color: var(--ink); padding: 8px 14px; font: inherit; cursor: pointer; border-right: 1px solid var(--line); }
.seg-btn:last-child { border-right: 0; }
.seg-btn.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.msg-toggle { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.msg-fields { margin: -4px 0 10px; }
.msg-courses { max-height: 240px; overflow: auto; }
.msg-prog { display: grid; gap: 4px; max-width: 360px; margin: 8px 0; }
.msg-next { border-left: 4px solid #25D366; }
.msg-next .btn-lg { font-size: 1.05rem; padding: 12px 20px; }
.msg-sample { margin: 6px 0; }
.msg-filters { margin: 10px 0; }
.msg-filters summary { cursor: pointer; padding: 6px 0; }

/* 學費單列表更多篩選 */
.iv-more { margin-top: 8px; flex: 1 1 100%; }
.iv-more summary { cursor: pointer; padding: 4px 0; }
.iv-range { display: flex; gap: 6px; align-items: center; }
.iv-range input { min-width: 0; flex: 1; }
.iv-more { min-width: 0; max-width: 100%; }
.iv-more .field { min-width: 0; }
.iv-range input { width: 100%; min-width: 0; }
@media (max-width: 900px) { .iv-more .grid2 { grid-template-columns: 1fr; } }

/* 今日待辦 */
.todo-card h2 { margin-bottom: 8px; }
.todo-list { display: grid; gap: 8px; }
.todo-item { display: grid; grid-template-columns: 44px 1fr 16px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.todo-item:hover { border-color: var(--brand); text-decoration: none; }
.todo-item span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-n { font-size: 1.3rem; text-align: center; border-radius: 10px; padding: 4px 0; background: var(--surface-2); }
.todo-item.warn .todo-n { background: var(--gold-soft); color: var(--gold); }
.todo-go { color: var(--muted); font-size: 1.3rem; }
/* 全站搜尋 */
.side-search { display: flex; align-items: center; gap: 8px; margin: 4px 12px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; }
.side-search span { flex: 1; text-align: left; }
.side-search kbd { font-size: .75rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.icon-btn { border: 0; background: none; color: inherit; padding: 6px; cursor: pointer; display: inline-flex; }
.gs-modal .search { margin-bottom: 8px; }
.gs-res { max-height: 60vh; overflow: auto; }
.gs-h { font-size: .85rem; color: var(--muted); margin: 10px 0 4px; }
/* 手機更多 */
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; font-size: .9rem; text-align: center; }

/* 公開頁（家長專頁、付款、收據、問卷、報名）頂部品牌 */
.pub-head { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px 4px; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.pub-head img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
/* 家長專頁 */
.fam-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.fam-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.fam-row:last-child { border-bottom: 0; }
.fam-date { text-align: center; line-height: 1.2; }
.fam-date b { display: block; font-size: 1.05rem; }
.fam-row .tag { display: inline-block; font-size: .78rem; border-radius: 6px; padding: 1px 6px; background: var(--surface-2); margin-top: 2px; }
.fam-row .tag.warn { background: var(--gold-soft); color: var(--gold); }
.fam-row .tag.ok { background: #e8f5e9; color: #2e7d32; }
.fam-stat { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 0; }
.fam-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.fam-sheet > div { background: var(--surface); color: var(--ink); width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 18px 16px 24px; max-height: 85vh; overflow: auto; }
.fam-opt { display: block; width: 100%; text-align: left; padding: 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.fam-opt:hover { border-color: var(--brand); }
/* 電子收據 */
.rc-pub table { width: 100%; border-collapse: collapse; }
.rc-pub td { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.rc-pub .num { text-align: right; white-space: nowrap; }
.rc-big { font-size: 1.6rem; font-weight: 800; }

/* 點名頁：手機大掣、全部出席掣黐喺底 */
@media (max-width: 760px) {
  .rc-att .att-b { min-height: 44px; flex: 1; font-size: 1rem; }
  .rc-att { gap: 6px; }
  .rc-allbtn { position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 20; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  .rc-list { margin-bottom: 70px; }
}
/* 列印名單 */
.print-sheet { background: #fff; color: #111; padding: 18px; border-radius: 10px; }
.print-sheet h1 { font-size: 1.3rem; margin: 0 0 4px; color: #111; }
.ps-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .95rem; }
.ps-table th, .ps-table td { border: 1px solid #999; padding: 6px 8px; text-align: left; }
.ps-table td.box { width: 44px; }
@media print { .print-sheet { padding: 0; } }
/* 學生頁總覽 */
.stu-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.stu-tiles > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.stu-tiles b { font-size: 1.15rem; }
@media (max-width: 760px) {
  .rc-row { grid-template-columns: 1fr auto; }
  .rc-row .rc-who, .rc-row .rc-att { grid-column: 1 / -1; }
}
