/* Mobile presentation is deliberately scoped; desktop tables and data are unchanged. */
html body dialog.attendanceLeaveDialog { width:min(560px,calc(100vw - 24px)) !important; max-height:calc(100dvh - 32px); padding:0 !important; overflow:auto; border:2px solid #e05252 !important; border-radius:16px !important; }
html body .attendanceLeaveDialog header { display:flex; align-items:center; gap:12px; padding:20px; background:#fff1f2; color:#991b1b; }
html body .attendanceLeaveDialog h2 { margin:0; font-size:22px; line-height:1.25; flex:1; color:inherit; }
html body .attendanceLeaveDialog header button { min-width:44px; min-height:44px; background:transparent; border:0; font-size:28px; color:inherit; }
html body .attendanceLeaveDialog .unsavedWarningIcon { display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border:3px solid currentColor; border-radius:50%; font-size:24px; font-weight:800; }
html body .attendanceLeaveDialog .unsavedWarningBody { padding:20px; font-size:16px; line-height:1.5; background:var(--surface,#fff); color:var(--text,#172033); }
html body .attendanceLeaveDialog #attendanceLeaveResult { font-weight:600; overflow-wrap:anywhere; }
html body .attendanceLeaveDialog footer { display:flex; flex-wrap:wrap; gap:10px; padding:16px 20px; }
html body .attendanceLeaveDialog footer button { min-height:44px; flex:1 1 150px; white-space:normal; }
html body .attendanceLeaveDialog #attendanceLeaveKeep { flex-basis:100%; color:#991b1b; }
@layer attendance-polish {
 @media(max-width:920px), (orientation:landscape) and (max-height:600px) and (max-width:1100px) {
  html body #workspace:is([data-view="config"],[data-view="revenue"],[data-view="absences"]) { min-width:0 !important; }
  html body #workspace[data-view="config"] #configView { padding:8px !important; gap:10px !important; }
  html body #workspace[data-view="config"] .configPanel { padding:10px !important; margin:0 !important; border-radius:10px !important; box-shadow:none !important; min-height:0 !important; }
  html body #workspace[data-view="config"] :is(.configHead,.tuitionDeadlinePanel,.tuitionDeadlineEditor,.tuitionDeadlineList,.networkAccessPanel,.accountAdminPanel) { padding:10px !important; gap:10px !important; margin:0 !important; box-shadow:none !important; min-width:0 !important; min-height:0 !important; }
  html body #workspace[data-view="config"] :is(.tuitionDeadlineHeader,.entityToolbar,.networkAccessHeader,.accountAdminHeader) { padding:0 !important; margin:0 0 10px !important; gap:8px !important; }
  html body #workspace[data-view="config"] :is(h2,h3) { font-size:18px !important; line-height:1.35 !important; margin:0 0 6px !important; }
  html body #workspace[data-view="config"] :is(input,select,button) { min-width:0 !important; min-height:44px !important; box-sizing:border-box !important; font-size:16px !important; }
  html body #workspace[data-view="config"] :is(input:not([type="checkbox"]),select) { width:100% !important; max-width:100% !important; }
  html body #workspace[data-view="config"] input[type="checkbox"] { width:24px !important; min-height:24px !important; height:24px !important; flex:0 0 24px !important; }
  html body #workspace[data-view="config"] :is(.globalConfig,.tuitionDeadlineForm,.studyPeriodForm) { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; padding:0 !important; }
  html body #workspace[data-view="config"] .globalConfig > label:nth-child(2),
  html body #workspace[data-view="config"] .studyPeriodForm > :is(label:first-child,.studyPeriodGrace,.tuitionDeadlineButtons) { grid-column:1 / -1 !important; }
  html body #workspace[data-view="config"] :is(.globalConfig,.studyPeriodForm) label { margin:0 !important; gap:5px !important; }
  html body #workspace[data-view="config"] :is(.configFixedTab,.tabConfigTitle span,.unifiedConfigToolbar > div > span) { display:none !important; }
  html body #workspace[data-view="config"] :is(.configFileActions,.tuitionDeadlineButtons,.configActions,.configPager) { display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; align-items:center !important; gap:8px !important; padding:8px 0 !important; }
  html body #workspace[data-view="config"] :is(.configFileActions,.tuitionDeadlineButtons) > button { flex:1 1 120px !important; width:auto !important; }
  html body #workspace[data-view="config"] .configActions > button { width:44px !important; min-width:44px !important; margin:0 !important; }
  html body #workspace[data-view="config"] .configPager select { width:72px !important; }
  html body #workspace[data-view="config"] :is(.accountTable,.tuitionDeadlineTable,.unifiedClassTable) tr { padding:10px !important; margin:0 0 8px !important; min-height:0 !important; }
  html body #workspace[data-view="config"] :is(.accountTable,.tuitionDeadlineTable,.unifiedClassTable) td { display:grid !important; grid-template-columns:92px minmax(0,1fr) !important; width:100% !important; max-width:100% !important; min-width:0 !important; padding:5px 0 !important; gap:8px !important; height:auto !important; overflow-wrap:break-word !important; }
  html body #workspace[data-view="config"] .studyPeriodTable td:nth-child(1)::before { content:"Tháng học" !important; }
  html body #workspace[data-view="config"] .studyPeriodTable td:nth-child(2)::before { content:"Từ ngày" !important; }
  html body #workspace[data-view="config"] .studyPeriodTable td:nth-child(3)::before { content:"Đến ngày" !important; }
  html body #workspace[data-view="config"] .studyPeriodTable td:nth-child(4)::before { content:"Trạng thái" !important; }
  html body #workspace[data-view="config"] .studyPeriodTable td:nth-child(5)::before { content:"Thứ tự" !important; }
  html body #workspace[data-view="config"] .studyPeriodTable td:nth-child(6)::before { content:"Thao tác" !important; }
  html body #workspace[data-view="config"] :is(.accountTable,.tuitionDeadlineTable,.unifiedClassTable) tr:has(> td[colspan]) { display:block !important; height:auto !important; min-height:0 !important; }
  html body #workspace[data-view="config"] :is(.accountTable,.tuitionDeadlineTable,.unifiedClassTable) td[colspan] { display:block !important; width:100% !important; min-height:0 !important; height:auto !important; padding:12px !important; white-space:normal !important; word-break:normal !important; line-height:1.5 !important; font-size:16px !important; }
  html body #workspace[data-view="config"] :is(.accountTable,.tuitionDeadlineTable,.unifiedClassTable) td[colspan]::before { content:none !important; display:none !important; }
  html body #workspace[data-view="config"] .tuitionDeadlineTable td > small { grid-column:2 !important; margin:0 !important; }
  html body #workspace[data-view="config"] :is(.deadlineDatePill,.deadlineMonthBadge,.deadlineStatus) { padding:3px 0 !important; background:transparent !important; border:0 !important; border-radius:0 !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) :is(.panel,.revenuePanel) { padding:8px !important; box-shadow:none !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) :is(.revenueBoardHeading,.reportTitleRow,#studentFlowReport > header) { padding:8px 0 !important; margin:0 !important; gap:8px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) :is(h3,h4) { font-size:16px !important; line-height:1.35 !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentReportDetails > summary small { display:none !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentPanel > header { padding:8px !important; gap:8px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentPanel > header strong { font-size:16px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentPanel > header small { font-size:12px !important; line-height:1.4 !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentKpis { gap:6px !important; padding:6px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentKpis article { padding:8px !important; min-height:0 !important; gap:4px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentKpis strong { font-size:24px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .systemStudentKpis em { display:none !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) :is(.studentFlowQuickFilters,.studentFlowFilters) { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:8px !important; padding:0 !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowQuickFilters > button { grid-column:2; justify-self:end; min-height:44px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowQuickFilters label { min-width:0 !important; width:100% !important; margin:0 !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowQuickFilters input { min-width:0 !important; width:100% !important; min-height:44px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowPager { display:flex !important; align-items:center !important; flex-wrap:nowrap !important; gap:5px !important; padding:8px 0 !important; margin:0 !important; font-size:12px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowPager label { display:flex !important; align-items:center; gap:3px; font-size:0 !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowPager select { width:58px !important; min-width:0 !important; height:44px !important; font-size:14px !important; padding:4px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowPager button { padding:6px !important; min-width:44px !important; min-height:44px !important; font-size:13px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowPager > span { flex:1; min-width:0; }
  html body #workspace[data-view="revenue"] :is(.revenueMobileZoomContent,.revenueMovementZoomContent) { zoom:1 !important; width:100% !important; min-width:0 !important; }
  html body #workspace[data-view="revenue"] :is(.revenueMobileZoomBar,.revenueMobileZoomHint) { display:none !important; }
  html body #workspace[data-view="revenue"] :is(.revenueMobileTableViewport,.revenueMovementTableViewport,.revenueMobileGroupBody,.revenueBoardTableWrap) { width:100% !important; max-width:100% !important; overflow-x:auto !important; }
  html body #workspace[data-view="revenue"] :is(.revenueMobileGroupToggle,.revenueMobileGrandTotal > strong) { width:100% !important; min-height:48px !important; padding:10px !important; font-size:14px !important; gap:8px !important; }
  html body #workspace[data-view="revenue"] .revenueMobileTable { width:max-content !important; min-width:760px !important; table-layout:auto !important; font-size:14px !important; }
  html body #workspace[data-view="revenue"] .revenueMobileSummary228 { display:grid !important; grid-template-columns:minmax(0,1fr); gap:4px; padding:10px !important; border-bottom:1px solid #dbe4ed; }
  html body #workspace[data-view="revenue"] .revenueMobileSummary228 > span { display:flex; justify-content:space-between; gap:8px; font-size:14px; }
  html body #workspace[data-view="revenue"] .revenueMobileSummary228 strong { white-space:nowrap; }
  html body #workspace[data-view="revenue"] .revenueMobileTable :is(th,td) { width:auto !important; padding:8px !important; white-space:nowrap !important; word-break:normal !important; overflow-wrap:normal !important; }
  html body #workspace[data-view="revenue"] .revenueMovementBoard .revenueBoardGrid { width:100% !important; display:grid !important; grid-template-columns:minmax(0,1fr) !important; padding:0 !important; gap:10px !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard { width:100% !important; min-width:0 !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard header { padding:10px !important; display:flex !important; flex-direction:column; gap:4px !important; font-size:14px !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard header strong { font-size:16px !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard .revenueBoardTable { min-width:560px !important; width:max-content !important; table-layout:auto !important; font-size:14px !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard .revenueBoardTable :is(th,td) { padding:8px !important; min-width:60px !important; white-space:normal !important; word-break:normal !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard .revenueBoardTable th { white-space:nowrap !important; }
  html body #workspace[data-view="revenue"] .revenueMovementCard .revenueBoardTable td:first-child { white-space:nowrap !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowTable { min-width:700px !important; width:max-content !important; table-layout:auto !important; font-size:14px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowTable :is(th,td) { width:auto !important; min-width:100px; padding:8px !important; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowTable td:nth-child(2) { min-width:160px; }
  html body #workspace:is([data-view="revenue"],[data-view="absences"]) .studentFlowTable td[colspan] { min-width:280px !important; }
 }
}
