/* HKGET v1.26.0: styles scoped to the new overview. Existing calendar unchanged. */
body.is-tuition-overview { background: #f7f4ee; color: #292620; }
body.is-tuition-overview .app-shell { width: min(100%, 1760px); background: #fffdf8; }
body.is-tuition-overview .bottom-nav { width: min(100%, 1760px); }
body.is-tuition-overview #main { padding: 22px 24px 108px; }
body.is-tuition-overview .app-header { background: #fffdf8; }
.ov-header-button { white-space: nowrap; flex-shrink: 0; border: 1px solid #d6ba7d; border-radius: 8px; background: #fff1c8; color: #593706; padding: 8px 12px; margin-left: auto; margin-right: 12px; font-weight: 700; font-size: 14px; }
.ov-page { --ov-ink: #292620; --ov-muted: #71695c; --ov-border: #e2d9c8; --ov-accent: #a75216; color: var(--ov-ink); }
.ov-page .button-primary { background: #a24c16; border-color: #a24c16; color: #fff; }
.ov-page .button-secondary { background: #fff; border-color: #daceb6; color: #534026; }
.ov-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.ov-heading h1 { margin: 4px 0 4px; font-size: 29px; line-height: 1.25; color: #2e251b; }
.ov-heading p { margin: 0; color: var(--ov-muted); font-size: 15px; }
.ov-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: #995111; }
.ov-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ov-stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1.35fr; border: 1px solid var(--ov-border); background: #fff; border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.ov-stats > * { padding: 13px 20px; border: 0; border-right: 1px solid var(--ov-border); text-align: left; background: transparent; min-width: 0; color: #2e251b; }
.ov-stats > :last-child { border-right: 0; }
.ov-stats > button:hover { background: #fff5dc; }
.ov-stats span { display: block; color: var(--ov-muted); font-size: 13px; }
.ov-stats strong { display: block; font-size: 26px; line-height: 1.4; }
.ov-stats small { font-size: 12px; font-weight: 500; color: var(--ov-muted); margin-left: 5px; }
.ov-stats > button:first-of-type strong { color: #a12d20; }
.ov-controls { border: 1px solid var(--ov-border); border-radius: 12px; background: #fff; padding: 16px 18px 12px; }
.ov-filter-line { display: grid; grid-template-columns: 170px 120px minmax(180px, 1fr) 180px; gap: 14px; align-items: end; }
.ov-filter-line label { font-size: 12px; color: var(--ov-muted); font-weight: 700; display: grid; gap: 5px; }
.ov-filter-line input, .ov-filter-line select { width: 100%; min-width: 0; border: 1px solid #d6cdbc; border-radius: 7px; color: #332d23; background: #fffefa; padding: 8px 9px; min-height: 40px; font-size: 14px; }
.ov-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 15px 0 12px; }
.ov-tab { padding: 8px 14px; border: 1px solid #e0d7c6; background: #faf8f2; border-radius: 7px; color: #685940; font-size: 13px; font-weight: 700; }
.ov-tab.is-active { background: #a65017; border-color: #a65017; color: #fff; }
.ov-range-line { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.ov-range-line > span { font-weight: 700; }
.ov-range-line label { display: flex; align-items: center; gap: 6px; color: var(--ov-muted); }
.ov-range-line input { accent-color: #a65017; width: 17px; height: 17px; }
.ov-text-button { border: 0; padding: 4px 0; background: none; color: #98511c; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ov-legend { display: flex; gap: 10px 19px; flex-wrap: wrap; padding: 14px 2px 12px; font-size: 12px; color: #625644; }
.ov-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ov-legend i { display: inline-block; width: 19px; height: 16px; border: 1px solid #c8b690; border-radius: 3px; }
.ov-table-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--ov-muted); }
.ov-table-tools small { font-size: 12px; }
.ov-table-tools > div { display: flex; gap: 5px; }
.ov-table-tools button { background: #fff; border: 1px solid #d7c7ad; border-radius: 5px; padding: 3px 9px; font-size: 12px; color: #7b4a1c; min-height: 30px; }
.ov-scroll { max-height: 65vh; min-height: 210px; overflow: auto; isolation: isolate; overscroll-behavior: contain; border: 1px solid #d3c4a9; border-radius: 10px; background: #f8f6f0; scrollbar-color: #bca888 #f2ece0; scrollbar-width: auto; }
.ov-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; color: #332d23; }
.ov-table th, .ov-table td { border-right: 1px solid #e6dfd2; border-bottom: 1px solid #e6dfd2; text-align: center; padding: 5px; vertical-align: middle; box-sizing: border-box; }
.ov-month-head th { position: sticky; top: 0; height: 34px; z-index: 5; background: #f0e2c7; color: #654619; font-size: 13px; font-weight: 800; border-right: 2px solid #ccb38a; }
.ov-date-head th { position: sticky; top: 34px; height: 54px; z-index: 5; background: #faf0d9; min-width: 114px; width: 114px; max-width: 114px; }
.ov-date-head button { border: 0; padding: 3px 5px; background: transparent; width: 100%; color: #604016; line-height: 1.35; }
.ov-date-head button:hover { background: #efd4a1; border-radius: 4px; }
.ov-date-head strong { display: block; font-size: 14px; }
.ov-date-head small { display: block; font-weight: 500; font-size: 11px; }
.ov-table .ov-time-col { min-width: 96px; width: 96px; max-width: 96px; left: 0; }
.ov-table .ov-student-col { min-width: 182px; width: 182px; max-width: 182px; left: 96px; text-align: left; padding: 12px; }
.ov-table .ov-summary-col { min-width: 170px; width: 170px; max-width: 170px; left: 278px; text-align: left; padding: 10px 12px; box-shadow: 3px 0 5px -3px #9c8356; }
.ov-table .ov-time-col, .ov-table .ov-student-col, .ov-table .ov-summary-col { position: sticky; z-index: 3; background: #fffdfa; white-space: normal; overflow-wrap: anywhere; }
.ov-table thead .ov-time-col, .ov-table thead .ov-student-col, .ov-table thead .ov-summary-col { z-index: 8; top: 0; background: #efe0c2; }
.ov-table tbody .ov-time-col { font-size: 12px; font-weight: 600; }
.ov-table small { display: block; font-size: 11px; font-weight: 400; color: #76694f; line-height: 1.5; }
.ov-student-name { color: #372b1c; border: 0; padding: 0; background: transparent; font-size: 15px; font-weight: 800; text-align: left; text-decoration: none; }
.ov-student-name:hover { text-decoration: underline; }
.ov-course-name { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; }
.ov-paid-date { font-size: 17px; line-height: 1.5; display: block; color: #715014; }
.ov-date-cell { width: 114px; min-width: 114px; max-width: 114px; background: #fcfaf6; }
.ov-lesson { display: block; width: 100%; min-height: 65px; border: 1px solid #d5c098; border-radius: 6px; padding: 7px 3px; line-height: 1.4; margin: 2px 0; font-size: 12px; white-space: normal; color: #5b4517; }
.ov-lesson:hover { filter: brightness(.97); outline: 1px solid #846633; }
.ov-cell-state { display: block; font-weight: 700; }
.ov-lesson small { font-size: 10px; }
.ov-paid, .ov-settled { background: #fff0bd; color: #614714; border-color: #e2c16c; }
.ov-last { box-shadow: inset 0 0 0 2px #c35e17; border-color: #c35e17 !important; }
.ov-last-label { display: block; color: #a4480c; font-size: 10px; line-height: 1.4; margin-top: 3px; }
.ov-partial { background: repeating-linear-gradient(135deg,#fff9d9 0,#fff9d9 7px,#fceeb4 7px,#fceeb4 10px); color: #73581a; border-color: #d8b747; }
.ov-overdue, .ov-danger { background: #fce7e2; color: #a02519; border-color: #df9d8d; }
.ov-pending { background: #fff; color: #846031; border-color: #ccb78a; }
.ov-draft, .ov-unbilled { background: #fffefa; border: 1px dashed #b8a37d; color: #8a7250; }
.ov-refund, .ov-review, .ov-warn { background: #ffedd7; color: #8c5014; border-color: #dbb27b; }
.ov-cancelled { background: #f0eeea; color: #817d76; border-color: #d0ccc3; }
.ov-no-class { display: block; padding: 16px 0; color: #bab3a6; }
.ov-table .ov-today { background-color: #fff3df; border-left: 2px solid #c57c22; }
.ov-table .ov-selected-day { border-left: 2px solid #914015; }
.ov-badge { display: inline-block; border: 1px solid transparent; border-radius: 5px; font-size: 11px; padding: 2px 5px; font-weight: 600; margin: 3px 0; line-height: 1.5; }
.ov-mobile-summary { display: none; }
.ov-notes { padding: 12px 2px; font-size: 12px; color: var(--ov-muted); }
.ov-notes p { margin: 5px 0; }
.ov-day-panel { background: #fff; border: 1px solid #d2bb8b; border-left: 4px solid #b75d1d; border-radius: 9px; padding: 14px 18px; margin-bottom: 12px; }
.ov-day-panel header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.ov-day-panel h2 { font-size: 17px; margin: 0; }
.ov-day-panel p { font-size: 12px; margin: 5px 0 10px; color: #796b58; }
.ov-agenda-row { display: flex; align-items: center; width: 100%; gap: 18px; padding: 10px 3px; background: #fff; border: 0; border-top: 1px solid #ede4d6; text-align: left; font-size: 13px; }
.ov-agenda-row > :nth-child(2) { flex: 1; }
.ov-agenda-row small { display: block; font-size: 11px; color: #7a6c54; }
.ov-agenda-row > strong { font-size: 13px; color: #7e4f1e; }
.ov-day-panel summary { color: #98723e; font-size: 12px; padding: 8px 0; cursor: pointer; }
.ov-bill-card, .ov-session-detail { border: 1px solid #ded3bf; border-radius: 8px; padding: 12px; margin: 10px 0; }
.ov-bill-card h3, .ov-session-detail h3 { font-size: 15px; margin: 0 0 8px; }
.ov-bill-card p, .ov-session-detail p { font-size: 13px; margin: 6px 0; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ov-period-table { width: 100%; min-width: 840px; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 13px; }
.ov-period-table th, .ov-period-table td { text-align: left; border-bottom: 1px solid #e6dece; border-right: 1px solid #e6dece; padding: 13px; }
.ov-period-table thead th { position: sticky; top: 0; background: #efe0c2; }
.ov-period-table small { display: block; color: #786b58; font-weight: 400; font-size: 11px; }
.ov-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ov-page :focus-visible, .ov-header-button:focus-visible { outline: 3px solid #98530c; outline-offset: 2px; }
@media (max-width: 900px) {
  body.is-tuition-overview #main { padding: 16px 12px 98px; }
  .ov-heading { flex-wrap: wrap; }
  .ov-filter-line { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ov-heading h1 { font-size: 25px; }
  .ov-stats > * { padding: 10px 12px; }
  .ov-stats strong { font-size: 22px; }
  .ov-table .ov-time-col { display: none; }
  .ov-table .ov-student-col { left: 0; }
  .ov-table .ov-summary-col { left: 182px; }
}
@media (max-width: 600px) {
  .ov-header-button { padding: 7px 8px; font-size: 12px; margin-right: 4px; }
  .ov-heading { gap: 12px; margin-bottom: 14px; }
  .ov-heading h1 { font-size: 24px; }
  .ov-heading p { font-size: 12px; }
  .ov-eyebrow { font-size: 9px; }
  .ov-top-actions { width: 100%; }
  .ov-top-actions .button { flex: 1; padding: 9px 8px; font-size: 12px; min-height: 38px; }
  .ov-stats { grid-template-columns: 1fr 1fr; }
  .ov-stats > * { border-bottom: 1px solid var(--ov-border); padding: 10px 12px; }
  .ov-stats > :nth-child(2) { border-right: 0; }
  .ov-stats > :nth-child(n+3) { border-bottom: 0; }
  .ov-stats span, .ov-stats small { font-size: 11px; }
  .ov-stats strong { font-size: 23px; }
  .ov-controls { padding: 12px; }
  .ov-tabs { gap: 4px; }
  .ov-tab { font-size: 11px; padding: 7px 9px; }
  .ov-range-line { gap: 7px 16px; font-size: 11px; }
  .ov-legend { gap: 8px 10px; font-size: 10px; }
  .ov-table-tools { flex-wrap: wrap; gap: 4px; }
  .ov-table-tools small { font-size: 11px; }
  .ov-table .ov-summary-col { display: none; }
  .ov-table .ov-student-col { min-width: 152px; width: 152px; max-width: 152px; padding: 9px 10px; left: 0; }
  .ov-student-name { font-size: 14px; }
  .ov-mobile-summary { display: block; margin-top: 4px; }
  .ov-mobile-summary .ov-paid-date { font-size: 13px; }
  .ov-mobile-summary .ov-paid-date::before { content: '最後已付 '; font-size: 10px; font-weight: 400; }
  .ov-mobile-summary .ov-badge { font-size: 9px; }
  .ov-date-cell, .ov-date-head th { min-width: 102px; width: 102px; max-width: 102px; }
  .ov-lesson { min-height: 73px; font-size: 11px; }
  .ov-scroll { max-height: 70vh; border-radius: 7px; }
  .ov-day-panel { padding: 12px; }
  .ov-day-panel h2 { font-size: 14px; }
  .ov-agenda-row { gap: 8px; font-size: 12px; }
  .ov-notes { font-size: 11px; }
}
@media print {
  body.is-tuition-overview .ov-scroll { max-height: none; overflow: visible; }
  body.is-tuition-overview .ov-table { font-size: 9px; }
  body.is-tuition-overview .ov-table th, body.is-tuition-overview .ov-table td { position: static; }
  body.is-tuition-overview .ov-controls, body.is-tuition-overview .ov-top-actions, body.is-tuition-overview .ov-table-tools { display: none; }
  body.is-tuition-overview .ov-lesson { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* Focus mode gives the roster most of the viewport without hiding the current month headers. */
body.is-tuition-overview.ov-focus-mode .ov-stats,
body.is-tuition-overview.ov-focus-mode .ov-controls,
body.is-tuition-overview.ov-focus-mode .ov-notes { display: none; }
body.is-tuition-overview.ov-focus-mode .ov-scroll { max-height: calc(100vh - 325px); }
body.is-tuition-overview.ov-focus-mode .ov-heading { margin-bottom: 4px; }
@media (max-width:600px) {
 .ov-top-actions .button { min-width: calc(50% - 6px); }
 .ov-lesson { font-size: 13px; }
 .ov-lesson small { font-size: 11px; }
 body.is-tuition-overview.ov-focus-mode .ov-scroll { max-height: 65vh; }
}
