.transaction-confirm { width: min(480px, calc(100vw - 28px)); text-align: center; }
.confirm-body { padding: 30px; }
.confirm-mark { width: 54px; height: 54px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: #e7f7f4; color: #087d72; font-size: 1.7rem; font-weight: 900; }
.transaction-confirm h2 { margin: 0 0 10px; font-size: 1.75rem; }
.transaction-confirm p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.transaction-confirm .confirm-audit { padding: 10px; border-radius: 9px; background: #f3f7f8; font-size: .86rem; }
.transaction-confirm .dialog-actions { justify-content: center; }
.workstation-standard { margin-top: 18px; padding: 12px; border-radius: 10px; background: #f3f7f8; font-size: .78rem; line-height: 1.45; }
.module-popout { justify-self: end; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: #87a8b8; font-size: .84rem; }
.module-popout:hover { background: #2a4b5e; color: #fff; }
.report-viewer-dialog { width: min(1080px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.report-viewer-shell { min-height: min(720px, calc(100dvh - 40px)); display: grid; grid-template-rows: auto 1fr auto; }
.report-viewer-head { padding: 25px 28px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.report-viewer-head h2 { margin: 0; font-size: 2rem; }
.report-viewer-head > div > p:last-child { margin: 7px 0 0; color: var(--muted); }
.report-viewer-body { padding: 30px; overflow: auto; background: #f7fafb; }
.report-viewer-body > section { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.viewer-findings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.viewer-findings article { border-left: 4px solid var(--teal); background: #f1f9f7; border-radius: 8px; padding: 16px; }
.viewer-certification p { color: var(--muted); line-height: 1.6; }
.report-viewer-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fff; }
.view-report-button { margin-top: 18px; }

@media (min-width: 1600px) {
  .app { grid-template-columns: 280px 1fr; }
  .sidebar { width: 280px; padding: 30px 22px; }
  .app main { grid-column: 2; }
  .topbar { height: 96px; padding: 0 44px; }
  .topbar h2 { font-size: 1.6rem; }
  .view { padding: 36px 44px 52px; }
  .workspace-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .status-strip { margin-bottom: 28px; }
  .status-strip div { padding: 21px 24px; }
  .panel-head { padding: 24px 26px 20px; }
  .map { height: min(72vh,820px); }
  .student-search-panel .student-list { max-height: min(320px,42vh); }
  .generic-page { max-width: 1560px; }
  .generic-head { margin-bottom: 26px; }
  .cards { gap: 20px; }
  .info-card { padding: 24px; }
  .module-worklist, .report-output, .reports-audit { margin-top: 26px; }
  .module-record { padding: 18px 24px; grid-template-columns: 54px minmax(320px,1fr) auto auto; }
  .student-bus-row { padding: 17px 24px; }
}

@media (min-width: 761px) and (max-width: 1366px) {
  .driver-fleet { max-width: none; }
  .driver-fleet .module-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .driver-fleet .module-record { grid-template-columns: 48px minmax(240px,1fr) auto; }
  .driver-fleet .record-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .driver-fleet .assignment-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .driver-fleet .student-bus-row { grid-template-columns: 1fr; align-content: start; border-right: 1px solid var(--line); }
  .driver-fleet .module-header-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 760px) {
  body { min-width: 0; overflow-x: hidden; }
  .sidebar { position: sticky; top: 0; z-index: 800; padding: 9px 10px 8px; }
  .side-brand { padding: 0 2px 8px; }
  .side-brand .brand-mark { width: 36px; height: 36px; font-size: 1rem; }
  .sidebar nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
  .nav-item { flex: 0 0 auto; min-width: 76px; min-height: 48px; padding: 8px 10px; font-size: .78rem; touch-action: manipulation; }
  .nav-item span { display: block; margin-bottom: 2px; }
  .module-popout { display: none !important; }
  .topbar { min-height: 66px; height: auto; padding: 9px 12px; gap: 8px; }
  .topbar h2 { font-size: 1.05rem; }
  .topbar .eyebrow { font-size: .62rem; }
  .top-actions .shortcut, .top-actions .avatar { display: none; }
  .top-actions .demo-guide-button { display: inline-flex; padding: 9px 10px; }
  .view { padding: 10px; }
  .status-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-strip div { padding: 12px; }
  .panel-head, .generic-head, .worklist-head { align-items: flex-start; gap: 10px; }
  .panel-head, .generic-head { flex-direction: column; }
  .map-actions, .module-header-actions { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .map-actions button, .module-header-actions button { min-height: 44px; }
  .map { height: 58vh; min-height: 360px; }
  .student-row { grid-template-columns: 40px minmax(0,1fr); }
  .student-row .route-tag { grid-column: 2; justify-self: start; }
  .generic-head h2 { font-size: 1.45rem; }
  .cards { gap: 10px; }
  .info-card { min-height: auto; padding: 15px; }
  .module-record { grid-template-columns: 42px minmax(0,1fr); padding: 13px 12px; }
  .record-status, .record-actions { grid-column: 2; justify-self: start; }
  .record-actions { width: 100%; }
  .record-actions button { min-height: 42px; flex: 1; }
  .student-bus-row { padding: 13px 14px; }
  .student-bus-row select { min-height: 46px; }
  dialog { max-height: calc(100dvh - 20px); overflow: auto; }
  dialog form, .confirm-body { padding: 20px 16px; }
  .dialog-actions { position: sticky; bottom: 0; padding-top: 10px; background: #fff; flex-wrap: wrap; }
  .dialog-actions button { min-height: 44px; flex: 1 1 120px; }
  .route-builder-layout { grid-template-columns: 1fr; }
  .route-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .activity-row, .audit-entry summary { align-items: flex-start; flex-direction: column; }
  .toast { left: 12px; right: 12px; bottom: 12px; text-align: center; }
  .report-viewer-shell { min-height: calc(100dvh - 24px); }
  .report-viewer-head, .report-viewer-body, .report-viewer-actions { padding: 18px 16px; }
  .viewer-findings { grid-template-columns: 1fr; }
  .report-viewer-actions { flex-wrap: wrap; }
  .report-viewer-actions button { flex: 1 1 130px; min-height: 44px; }
}
