/* Presentation-only responsive layer. Business calculations stay in app.js/server.py. */
:root { --bg: #f4f7fa; --line: #d4e0ea; --line-soft: #c6d5e2; }
html { scroll-padding-top: 24px; }
body { line-height: 1.5; }
::selection { background: #d6eaff; color: #10233f; }
input, textarea { caret-color: var(--brand); }
button, a, summary, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px;
}
button:disabled { cursor: default; }
input::placeholder, textarea::placeholder { color: #536b84; opacity: 1; }
table, .kpi strong, .mobile-owner-profit strong, .mobile-owner-summary-grid, .mobile-owner-month-grid { font-variant-numeric: tabular-nums; }
.view, .view > *, .form-grid > *, label { min-width: 0; }
.view { gap: 20px; }
.section-title h2 { font-size: 20px; }
.topbar h1 { font-size: 24px; }
.form-grid { padding: 20px; gap: 16px; box-shadow: none; }
label > span { font-size: 14px; }
input, select { min-height: 46px; }
.table-wrap { box-shadow: none; }
th { background: #f2f6fa; color: #435c75; font-size: 13px; }
td, th { padding: 14px 12px; }
tbody tr:hover { background: #f7faff; }
.finance-stage-number, .finance-workflow-head > div > span { display: none; }
.finance-stage { border: 0; padding: 12px 0; }
.finance-stage-head { gap: 0; }
.finance-workflow-head h2 { font-size: 22px; }
.finance-stage-head h2 { font-size: 20px; }
.lesson-entry, .dashboard-more { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.lesson-entry > summary, .dashboard-more > summary { padding: 16px 0; cursor: pointer; font-weight: 700; color: var(--brand); }
.lesson-entry > summary span, .dashboard-more > summary span { margin-left: 14px; font-size: 13px; color: var(--muted); font-weight: 400; }
.lesson-entry #lessonForm { border: 0; padding: 8px 0 20px; margin: 0; box-shadow: none; }
#lessonForm .lesson-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; grid-column: span 2; }
#lessonForm .lesson-notes { grid-column: 1 / -1; }
.lesson-notes summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.lesson-notes label { margin-top: 8px; }
.lesson-void-btn { background: white; color: var(--bad); border-color: #e4b5b2; font-weight: 500; min-height: 36px; }
.lesson-void-btn:hover { background: #fff1ef; color: #8a1f17; }
.lesson-empty { text-align: center; padding: 32px 16px; color: var(--muted); }
#lessonFilterSummary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#lessonFilterSummary .kpi { min-height: auto; box-shadow: none; background: #f0f6fc; padding: 14px 20px; }
#lessonFilterSummary .kpi strong { font-size: 24px; margin-top: 4px; }
#lessonView .with-controls { align-items: start; flex-wrap: wrap; }
#lessonView .filter-row:not(.history-filter-row) { display: grid; grid-template-columns: 140px minmax(240px, 1fr) 120px 120px; gap: 8px; width: 100%; min-width: 0; }
#lessonView .filter-row:not(.history-filter-row) > .searchable-student-select { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#lessonView .filter-row select { min-width: 0; width: 100%; }
#lessonView .history-title { flex-direction: column; align-items: stretch; }
#lessonView .history-filter-row { display: flex; flex-wrap: wrap; flex: none; gap: 10px; width: 100%; align-items: start; }
#lessonView .history-filter-row > input { flex: 1 1 240px; width: 240px; max-width: 400px; }
#lessonView .history-filter-row > select { flex: 0 1 180px; width: 180px; max-width: 100%; }
#lessonView .history-filter-row > .searchable-student-select { flex: 1 1 320px; width: 320px; max-width: 420px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lesson-reference { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.lesson-reference > summary { padding: 16px 0; cursor: pointer; color: var(--muted); font-weight: 600; }
.lesson-reference > div { margin: 0 0 16px; }
.top-actions .icon-btn { white-space: nowrap; flex-shrink: 0; }
.lesson-table { min-width: 880px; }
.lesson-table td[data-label="日期"], .lesson-table td[data-label="时间"] { white-space: nowrap; }
.lesson-table td[data-label="学生"] { font-weight: 600; }
.lesson-table td[data-label="金额"] { color: var(--brand); }
.mobile-owner-dashboard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.mobile-owner-help { display: none; }
.mobile-owner-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.mobile-owner-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-owner-heading h2 { margin: 0; font-size: 20px; }
.mobile-owner-chip { font-size: 12px; font-weight: 500; color: var(--muted); background: #eef4f9; padding: 4px 8px; border-radius: 6px; }
.mobile-owner-profit { margin: 20px 0; }
.mobile-owner-profit > span { display: none; }
.mobile-owner-profit strong { display: block; font-size: 44px; line-height: 1.25; color: var(--brand); overflow-wrap: anywhere; }
.mobile-owner-profit small { display: block; margin-top: 10px; color: var(--muted); }
.mobile-owner-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.mobile-owner-summary-grid article { min-width: 0; }
.mobile-owner-summary-grid span, .mobile-owner-month-grid span { color: var(--muted); font-size: 13px; }
.mobile-owner-summary-grid strong { display: block; margin-top: 6px; font-size: 20px; overflow-wrap: anywhere; }
.mobile-owner-tasks { display: grid; margin-top: 12px; }
.mobile-owner-tasks button { display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 10px; text-align: left; color: var(--ink); background: white; border: 0; border-radius: 0; border-top: 1px solid var(--line); padding: 14px 0; min-height: 72px; }
.mobile-owner-tasks button:hover { background: #f4f8fc; }
.mobile-owner-tasks button > span:first-child { display: none; }
.mobile-owner-tasks button > span:nth-child(2) { display: grid; gap: 4px; }
.mobile-owner-tasks small { color: var(--muted); font-weight: 400; font-size: 12px; }
.mobile-owner-dashboard > .mobile-owner-card:nth-of-type(3) { grid-column: 1 / -1; }
.mobile-owner-month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.mobile-owner-month-grid article { min-width: 0; }
.mobile-owner-month-grid strong { display: block; font-size: 26px; margin: 6px 0; overflow-wrap: anywhere; }
.mobile-owner-month-grid small { color: var(--muted); font-size: 12px; }
.mobile-owner-detail { margin-top: 20px; border-top: 1px solid var(--line); }
.mobile-owner-detail summary { padding: 14px 0; cursor: pointer; color: var(--brand); }
.mobile-owner-detail summary b { display: none; }
.mobile-owner-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.mobile-owner-detail dl div { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.mobile-owner-detail dt { color: var(--muted); }
.mobile-owner-detail dd { margin: 0; font-weight: 600; }
.mobile-owner-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.mobile-owner-quick button { background: #f6f9fc; border: 1px solid var(--line); color: var(--brand); min-height: 46px; }
.mobile-owner-quick button span { display: none; }
.mobile-owner-quick button:hover { background: var(--brand-soft); }
.mobile-owner-chart { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 12px; height: 140px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.mobile-owner-chart div { height: 100%; display: grid; grid-template-rows: 110px 24px; justify-items: center; align-items: end; }
.mobile-owner-chart i { display: block; width: 60%; min-height: 8px; background: var(--brand); border-radius: 3px 3px 0 0; }
.mobile-owner-chart span { color: var(--muted); font-size: 12px; }
.mobile-owner-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; }
.mobile-tab-mark svg { width: 22px; height: 22px; display: block; }
.dashboard-more { display: block; }
#dashboardView > .finance-workflow-head { display: none; }
.mobile-owner-profit strong.bad { color: var(--bad); }
.dashboard-more #monthDetailKpiGrid .kpi:nth-child(n+5):nth-child(-n+11) strong { color: var(--ink); }
.desktop-sidebar-brand, .desktop-sidebar-role, .desktop-page-description { display: none; }
.dashboard-income .table-wrap { margin-top: 16px; border: 0; }
.dashboard-income table { min-width: 0; width: 100%; font-size: 14px; }
.dashboard-income td, .dashboard-income th { padding: 12px 8px; }
.dashboard-income td:last-child { color: var(--muted); }
.mobile-owner-tasks button { grid-template-columns: minmax(0, 1fr) auto; }
.mobile-owner-tasks .task-total { font-size: 24px; color: var(--brand); white-space: nowrap; }
.mobile-owner-tasks .task-total.bad { color: var(--bad); }
.mobile-owner-tasks .task-total.warn { color: var(--warn); }
.mobile-owner-month-grid strong.bad { color: var(--bad); }
.dashboard-trend { grid-column: 1 / -1; }
@media (min-width: 1001px) {
  body.is-owner .shell { max-width: 1720px; display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: 28px; row-gap: 24px; padding: 28px 24px 48px; }
  body.is-owner .topbar { grid-column: 2; grid-row: 1; margin: 0; min-height: 72px; padding: 0; border: 0; }
  body.is-owner .topbar .app-brand-mark, body.is-owner .topbar .app-brand-name, body.is-owner .topbar .eyebrow { display: none; }
  body.is-owner .topbar h1 { font-size: 32px; margin: 0; }
  body.is-owner .desktop-page-description { display: block; color: var(--muted); margin: 8px 0 0; font-size: 15px; }
  body.is-owner .tabs { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; position: sticky; top: 28px; align-self: start; padding: 0 18px 0 0; gap: 6px; background: transparent; border: 0; border-right: 1px solid var(--line); min-height: calc(100vh - 56px); }
  body.is-owner .desktop-sidebar-brand { display: block; margin-bottom: 26px; }
  .desktop-sidebar-brand > div { display: flex; align-items: center; gap: 10px; }
  .desktop-sidebar-brand strong { font-size: 27px; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
  .desktop-sidebar-brand img { width: 32px; height: 32px; object-fit: contain; }
  .desktop-sidebar-brand p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
  body.is-owner .desktop-sidebar-role { display: block; margin: auto 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
  body.is-owner .tabs button { justify-content: flex-start; min-height: 48px; padding: 12px 16px; border: 0; background: transparent; color: var(--muted); gap: 12px; }
  body.is-owner .tabs button:hover { background: #e8f0f8; color: var(--brand); }
  body.is-owner .tabs button.active { background: #e1effc; color: var(--brand); }
  body.is-owner .tabs .mobile-tab-mark { display: block; }
  body.is-owner .tabs .mobile-tab-label, body.is-owner .tabs .mobile-more-tab { display: none; }
  body.is-owner .view { grid-column: 2; grid-row: 2; }
  body.is-owner .mobile-owner-dashboard { gap: 20px; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
  .mobile-owner-hero { padding: 22px; }
  .mobile-owner-profit { margin: 18px 0; }
  .mobile-owner-profit strong { font-size: 56px; }
  .mobile-owner-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-owner-summary-grid article:nth-child(4) { display: none; }
  .mobile-owner-summary-grid strong { font-size: 23px; }
  .mobile-owner-summary-grid article + article { border-left: 1px solid var(--line); padding-left: 16px; }
  .mobile-owner-dashboard > .mobile-owner-card:nth-of-type(3) { display: contents; }
  .mobile-owner-dashboard > .mobile-owner-card:nth-of-type(3) > .mobile-owner-heading { grid-column: 1 / -1; padding-top: 4px; }
  .mobile-owner-month-grid { grid-column: 1 / -1; margin: -8px 0 0; gap: 16px; }
  .mobile-owner-month-grid article { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
  .mobile-owner-month-grid strong { font-size: 29px; line-height: 1.25; }
  .mobile-owner-detail { grid-column: 1 / -1; margin: -8px 0 0; border: 0; }
  .mobile-owner-detail summary { padding: 4px 0; font-size: 13px; }
  .dashboard-income { grid-column: 1; }
  .dashboard-quick { grid-column: 2; }
  .dashboard-quick .mobile-owner-quick { grid-template-columns: 1fr; gap: 8px; }
  .dashboard-quick .mobile-owner-quick button { justify-content: flex-start; padding: 12px 14px; }
  .dashboard-trend { grid-column: 1 / -1; }
  body.is-teacher .shell { max-width: 1060px; }
  body.is-teacher #lessonForm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #lessonForm .lesson-student-field { grid-column: 1 / -1; }
  body.is-teacher .lesson-teacher-field { display: none; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .shell { max-width: 100%; padding: 20px; }
  #lessonView .filter-row:not(.history-filter-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-owner-dashboard { grid-template-columns: 1fr; }
  .mobile-owner-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body.is-owner, body.is-teacher { background: var(--bg); }
  body.is-owner .view, body.is-teacher .view { gap: 16px; }
  body.is-owner #dashboardView > .dashboard-more { display: block; }
  .dashboard-more > summary span, .lesson-entry > summary span { display: block; margin: 4px 0 0; }
  .dashboard-more { padding: 0 14px; }
  .mobile-owner-dashboard, body.is-owner .mobile-owner-dashboard { grid-template-columns: 1fr; gap: 16px; }
  .mobile-owner-card { padding: 18px; border-radius: 12px; background: white; }
  .mobile-owner-heading h2 { font-size: 18px; }
  .mobile-owner-heading { flex-wrap: wrap; }
  .mobile-owner-profit strong { font-size: 36px; }
  .mobile-owner-summary-grid, .mobile-owner-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .mobile-owner-summary-grid article, .mobile-owner-month-grid article { padding: 0; border: 0; background: none; border-radius: 0; }
  .mobile-owner-summary-grid strong { font-size: 19px; }
  .mobile-owner-month-grid strong { font-size: 24px; }
  .mobile-owner-month-grid .accent { background: none; }
  .mobile-owner-tasks button { grid-template-columns: minmax(0, 1fr) 12px; }
  .mobile-owner-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-owner-quick button { display: flex; min-height: 46px; padding: 10px; }
  .mobile-owner-quick button span { display: none; }
  .mobile-owner-quick button strong { font-size: 14px; }
  .mobile-owner-detail dl { grid-template-columns: 1fr; }
  .lesson-entry { padding: 0 16px; }
  body.is-owner .lesson-entry #lessonForm, body.is-teacher .lesson-entry #lessonForm { padding: 8px 0 20px; box-shadow: none; border-radius: 0; }
  body.is-owner #lessonForm .lesson-field-row, body.is-teacher #lessonForm .lesson-field-row { grid-template-columns: 1fr; gap: 14px; }
  body.is-owner #lessonForm input, body.is-teacher #lessonForm input { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; }
  body.is-owner #lessonForm input[type="date"]::-webkit-date-and-time-value, body.is-teacher #lessonForm input[type="date"]::-webkit-date-and-time-value { text-align: left; }
  body.is-teacher .topbar h1 { font-size: 24px; }
  body.is-teacher .topbar h1::after { content: none; }
  #lessonForm input, #lessonForm select { font-size: 16px; }
  #lessonView .filter-row:not(.history-filter-row), body.is-owner #lessonView .filter-row:not(.history-filter-row) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  #lessonView .filter-row:not(.history-filter-row) > .searchable-student-select, body.is-owner #lessonView .filter-row:not(.history-filter-row) > .searchable-student-select { grid-column: 1 / -1; grid-template-columns: 1fr; min-width: 0; }
  body.is-owner #lessonView .history-filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #lessonView .history-filter-row > input, #lessonView .history-filter-row > .searchable-student-select { grid-column: 1 / -1; width: 100%; max-width: none; }
  #lessonView .history-filter-row > .searchable-student-select { grid-template-columns: 1fr; }
  #lessonView .history-filter-row > select { width: 100%; max-width: none; }
  .dashboard-income { display: none; }
  .mobile-owner-tasks button { grid-template-columns: minmax(0, 1fr) auto; }
  #lessonView .filter-row select { min-width: 0; width: 100%; }
  #lessonFilterSummary .kpi { padding: 12px; }
  #lessonFilterSummary .kpi strong { font-size: 22px; }
  body.is-owner #lessonFilterSummary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.is-teacher #lessonFilterSummary { grid-template-columns: 1fr; }
  #lessonView > .table-wrap { border: 0; background: transparent; overflow: visible; }
  body.is-owner .lesson-table, body.is-teacher .lesson-table { min-width: 0; }
  body.is-owner .lesson-table tr, body.is-teacher .lesson-table tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; gap: 8px 12px; border-radius: 12px; }
  body.is-owner .lesson-table td, body.is-teacher .lesson-table td { grid-column: auto; grid-row: auto; align-self: start; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  body.is-owner .lesson-table td[data-label="学生"], body.is-teacher .lesson-table td[data-label="学生"] { grid-column: 1 / -1; grid-row: 1; font-size: 18px; }
  body.is-owner .lesson-table td[data-label="日期"], body.is-teacher .lesson-table td[data-label="日期"] { grid-column: 1; grid-row: 2; font-size: 13px; font-weight: 400; color: var(--muted); }
  body.is-owner .lesson-table td[data-label="时间"], body.is-teacher .lesson-table td[data-label="时间"] { grid-column: 2; grid-row: 2; font-size: 13px; color: var(--muted); text-align: right; }
  body.is-owner .lesson-table td[data-label="老师"], body.is-teacher .lesson-table td[data-label="老师"] { grid-column: 1; grid-row: 3; font-size: 13px; color: var(--muted); }
  body.is-owner .lesson-table td[data-label="类型"], body.is-teacher .lesson-table td[data-label="类型"] { grid-column: 2; grid-row: 3; font-size: 13px; color: var(--muted); text-align: right; }
  body.is-owner .lesson-table td[data-label="课时"], body.is-teacher .lesson-table td[data-label="课时"] { grid-column: 1; grid-row: 4; font-size: 17px; text-align: left; }
  body.is-owner .lesson-table td[data-label="金额"] { grid-column: 2; grid-row: 4; text-align: right; font-size: 17px; color: var(--brand); }
  body.is-owner .lesson-table td[data-label="状态"], body.is-teacher .lesson-table td[data-label="状态"] { grid-column: 1; grid-row: 5; font-size: 13px; color: var(--muted); }
  body.is-owner .lesson-table td[data-label="处理"], body.is-teacher .lesson-table td[data-label="处理"] { grid-column: 2; grid-row: 5; border: 0; padding: 0; text-align: right; }
  body.is-owner .lesson-table .lesson-void-btn, body.is-teacher .lesson-table .lesson-void-btn { background: white; color: var(--bad); border: 1px solid #e4b5b2; min-height: 44px; }
  body.is-owner .lesson-table .lesson-empty, body.is-teacher .lesson-table .lesson-empty { grid-column: 1 / -1; padding: 16px 0; }
  body.is-owner .tabs .mobile-tab-mark { display: flex; justify-content: center; }
}
.student-filter-panel > #studentSearch { grid-column: 1 / -1; }
.student-filter-details { grid-column: 1 / -1; min-width: 0; }
.student-filter-details summary { cursor: pointer; padding: 10px 0; color: var(--brand); }
.student-filter-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding-top: 8px; }
.student-filter-options select { min-width: 0; width: 100%; }
.salary-total-row > * { border-top: 2px solid var(--line); background: var(--brand-soft); font-weight: 700; }
.finance-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.finance-overview > .finance-result { grid-column: 1 / -1; }
.finance-result, .finance-cash, .finance-todo, .finance-workspace, #financeCashRecords { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.finance-result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin: 20px 0; }
.finance-result-grid span, .finance-obligation small { display: block; color: var(--muted); }
.finance-result-grid strong { display: block; font-size: 30px; }
.finance-obligation { display: grid; grid-template-columns: minmax(0,2fr) minmax(100px,1fr) minmax(100px,1fr) auto; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.finance-obligation > * { min-width: 0; overflow-wrap: anywhere; }
.finance-pending-head, .finance-pending-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.finance-pending-head h3 { margin: 0 0 8px; }
.finance-pending-head p, .finance-pending-note { color: var(--muted); font-size: 14px; }
.finance-pending-total { margin: 20px 0; }
.finance-pending-total strong { display: block; font-size: 30px; font-variant-numeric: tabular-nums; }
.finance-pending-total > span { background: var(--brand-soft); padding: 6px 10px; border-radius: 12px; font-size: 13px; }
.finance-obligation-head { display: grid; grid-template-columns: minmax(0,2fr) minmax(100px,1fr) minmax(100px,1fr) auto; gap: 16px; padding: 12px 0; background: var(--bg); color: var(--muted); font-size: 14px; }
.finance-obligation-head > :last-child { width: 112px; }
.finance-result-grid strong.bad { color: var(--bad); }
.finance-preview-aligned .finance-workflow-head { display: block; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 24px; }
.finance-preview-aligned .finance-workflow-head > div { display: none; }
.finance-preview-aligned .finance-step-nav { justify-content: flex-start; border: 0; border-radius: 0; gap: 8px; background: transparent; }
@media(min-width:701px) { .finance-preview-aligned .finance-step-nav { display: flex; width: auto; } .finance-preview-aligned .finance-step-nav a { flex: 0 0 auto; } }
.finance-preview-aligned .finance-step-nav a { border: 0; border-radius: 8px; background: transparent; padding: 12px 16px; font-weight: 400; }
.finance-preview-aligned #finance-summary > .finance-stage-head { display: none; }
.finance-preview-aligned .finance-stage { padding: 0; }
.finance-preview-aligned .finance-overview { gap: 24px 20px; }
.finance-preview-aligned .finance-result { position: relative; }
.finance-preview-aligned .finance-result h3 { margin: 0 0 24px; padding-right: 48px; font-size: 22px; }
.finance-result-tag { position: absolute; right: 24px; top: 28px; padding: 4px 10px; background: var(--brand-soft); color: var(--brand); border-radius: 12px; font-size: 13px; }
.finance-preview-aligned .finance-result-grid { gap: 0; margin: 24px 0 18px; }
.finance-preview-aligned .finance-result-grid > div { padding: 0 24px; border-left: 1px solid var(--line); }
.finance-preview-aligned .finance-result-grid > div:first-child { padding-left: 0; border-left: 0; }
.finance-preview-aligned .finance-result-grid strong { font-size: 34px; margin-top: 8px; }
.finance-equation-note { background: var(--brand-soft); border-radius: 8px; padding: 14px; font-size: 13px; margin: 0; }
.finance-breakdown { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; font-size: 14px; }
.finance-breakdown summary { color: var(--brand); cursor: pointer; }
.finance-preview-aligned .finance-todo { grid-column: 1 / -1; border: 0; border-radius: 0; background: transparent; padding: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; }
.finance-preview-aligned .finance-todo h3, .finance-preview-aligned .finance-todo p { margin: 0; }
.finance-preview-aligned .finance-todo button { grid-column: 2; grid-row: 1 / 3; }
.finance-preview-aligned .finance-todo strong { font-size: 24px; }
.finance-check { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.finance-preview-aligned .finance-cash h3, .finance-check h3 { margin: 0 0 10px; font-size: 18px; }
.finance-cash-list { margin: 20px 0 16px; }
.finance-cash-list > div, .finance-check-row { display: flex; justify-content: space-between; gap: 16px; margin: 14px 0; font-size: 14px; }
.finance-cash-list dt, .finance-check-row > span { color: var(--muted); }
.finance-cash-list dd { margin: 0; font-weight: 700; }
.finance-check-row button { border: 0; background: transparent; color: var(--ink); padding: 0; font-size: 14px; min-height: 28px; }
.finance-footnote { color: var(--muted); font-size: 13px; margin-bottom: 0; }
@media(max-width:700px) {
  .finance-preview-aligned .finance-result-grid > div { border-left: 0; padding: 12px 0; border-top: 1px solid var(--line); }
  .finance-preview-aligned .finance-result-grid > div:first-child { border-top: 0; }
  .finance-preview-aligned .finance-result-grid strong { font-size: 25px; margin: 0; }
  .finance-preview-aligned .finance-todo { grid-template-columns: minmax(0,1fr); }
  .finance-preview-aligned .finance-todo button { grid-column: 1; grid-row: auto; justify-self: start; }
  .finance-check { padding: 16px; }
  .finance-check-row button { min-height: 44px; }
}
.finance-record-holder { grid-column: 1 / -1; }
.finance-record-holder:empty { display: none; }
.finance-subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.finance-subtabs .active, #closeView .finance-step-nav .active { background: var(--ink); color: white; }
.finance-budget { background: var(--bg); padding: 18px; margin: 24px 0; border-radius: 12px; }
.finance-budget details, .finance-older, #financeUnmatched details, .finance-more { margin-top: 14px; }
.finance-inline-form .wide, .finance-error { grid-column: 1 / -1; }
.finance-error { color: var(--bad); margin: 0; }
.finance-inline-form input, .finance-inline-form select { font-size: 16px; }
@media(max-width:700px) {
  .finance-overview { grid-template-columns: minmax(0,1fr); }
  .finance-result, .finance-cash, .finance-todo, .finance-workspace, #financeCashRecords { padding: 16px; }
  .finance-result-grid { grid-template-columns: 1fr; gap: 12px; }
  .finance-result-grid > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .finance-result-grid strong { font-size: 25px; }
  .finance-obligation { grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
  .finance-obligation-head { display: none; }
  .finance-pending-head { align-items: flex-start; flex-direction: column; }
  .finance-pending-head button { min-height: 44px; }
  .finance-inline-form { grid-template-columns: minmax(0,1fr); }
  .finance-inline-form .wide { grid-column: auto; }
}
@media (min-width: 701px) {
  .student-filter-details summary { display: none; }
}
@media (max-width: 700px) {
  .student-filter-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-filter-options > :last-child { grid-column: 1 / -1; }
  body.is-owner .mobile-more-menu { position: static; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; box-shadow: none; border-radius: 12px; scroll-margin-top: 12px; }
  body.is-owner .mobile-more-menu button { justify-content: center; text-align: center; background: var(--brand-soft); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
