@font-face {
  font-family: "Workspace Sans";
  src: url("../assets/fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Workspace Sans";
  src: url("../assets/fonts/instrument-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Workspace Sans";
  src: url("../assets/fonts/instrument-sans-600.woff2") format("woff2");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

/* St. James proportions and hierarchy; document print styles remain untouched. */
@media screen {
  body {
    --ws-navy: #082b75;
    --ws-sidebar: #061f55;
    --ws-on-sidebar: #fff;
    --ws-blue: #0b63b6;
    --ws-gold: #d2a61d;
    --ws-ink: #16293d;
    --ws-muted: #57697a;
    --ws-line: #dce4eb;
    --ws-canvas: #f5f8fa;
    --ws-action: var(--ws-navy);
    --sidebar-width: 264px;
    --topbar-height: 76px;
    --ink: var(--ws-ink);
    --muted: var(--ws-muted);
    --line: var(--ws-line);
    --surface-2: var(--ws-canvas);
    --surface-3: #edf2f6;
    --green: #126f49;
    --red: #a62f40;
    --green-soft: #e8f5ef;
    --red-soft: #fdecee;
    --radius: 6px;
    background: var(--ws-canvas);
    color: var(--ws-ink);
    font-family: "Workspace Sans", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
  }
  body[data-workspace-template="school"] {
    --ws-sidebar: var(--school-primary, #082b75);
    --ws-on-sidebar: var(--school-on-brand, #fff);
    --ws-action: var(--school-brand-ink, #082b75);
    --ws-gold: var(--gold, #d2a61d);
  }
  body .erp-shell { background: var(--ws-canvas); }
  body .erp-shell .erp-sidebar { background: var(--ws-sidebar); color: var(--ws-on-sidebar); border-right: 1px solid #ffffff1a; scrollbar-width: thin; scrollbar-color: #ffffff40 transparent; }
  .erp-sidebar .sidebar-brand { min-height: 106px; padding: 18px; border-bottom: 1px solid color-mix(in srgb, var(--ws-on-sidebar) 16%, transparent); }
  .erp-sidebar .workspace-brand-lockup { width: 100%; gap: 12px; }
  .erp-sidebar .workspace-brand-lockup img { width: 204px; max-height: 70px; }
  .erp-sidebar .workspace-brand-lockup img.workspace-logo-mark { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 0; }
  .erp-sidebar .workspace-brand-lockup img.workspace-logo-wordmark { width: 204px; max-height: 70px; }
  .erp-sidebar .workspace-brand-monogram { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 6px; color: inherit; border-color: currentColor; background: transparent; font-size: 16px; }
  .erp-sidebar .workspace-brand-copy strong { color: inherit; font-size: 14px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
  .erp-sidebar .workspace-brand-copy small { color: inherit; max-width: none; font-size: 11px; line-height: 1.4; white-space: normal; }
  .erp-sidebar .workspace-label { padding: 18px 20px 14px; gap: 4px; color: #c4d1e8; }
  .erp-sidebar .workspace-label span { font-size: 10px; }
  .erp-sidebar .workspace-label strong { color: #fff; font-size: 13px; }
  .erp-sidebar .erp-nav { padding: 8px 12px 24px; gap: 3px; }
  body[data-workspace-template="school"] .erp-sidebar .erp-nav { padding-top: 22px; }
  body .erp-shell .erp-sidebar .erp-nav button { min-height: 42px; padding: 10px 12px; gap: 12px; border: 0; border-left: 3px solid transparent; border-radius: 4px; background: transparent; color: var(--ws-on-sidebar); font-size: 13px; line-height: 1.4; font-weight: 600; box-shadow: none; }
  body .erp-shell .erp-sidebar .erp-nav button:hover,
  body .erp-shell .erp-sidebar .erp-nav button.active { background: color-mix(in srgb, var(--ws-on-sidebar) 11%, transparent); color: var(--ws-on-sidebar); }
  body .erp-shell .erp-sidebar .erp-nav button.active { border-left-color: var(--ws-gold); }
  .erp-sidebar .erp-nav svg { width: 18px; height: 18px; color: inherit; stroke-width: 1.8; }
  .erp-sidebar .sidebar-foot { padding: 18px; gap: 14px; border-top-color: color-mix(in srgb, var(--ws-on-sidebar) 16%, transparent); }
  .erp-sidebar .system-state strong { font-size: 12px; }
  .erp-sidebar .system-state small { color: #c4d1e8; font-size: 11px; }
  .erp-sidebar .website-link,
  body .erp-shell .erp-sidebar .platform-credit,
  body .erp-shell .erp-sidebar .platform-credit strong { color: var(--ws-on-sidebar); font-size: 12px; }
  .erp-sidebar .platform-credit span { font-size: 9px; }
  body[data-workspace-template="school"] .workspace-label,
  body[data-workspace-template="school"] .system-state { display: none; }

  body .erp-shell .erp-topbar { position: sticky; top: 0; height: auto; min-height: var(--topbar-height); padding: 12px 28px; gap: 20px; border-bottom: 1px solid var(--ws-line); background: #fff; color: var(--ws-ink); backdrop-filter: none; }
  body .erp-topbar .topbar-start { min-width: 0; flex: 1; }
  body .erp-topbar .topbar-heading { min-width: 0; }
  body .erp-topbar .page-kicker { color: var(--ws-blue); opacity: 1; font-size: 10px; font-weight: 700; line-height: 1.4; }
  body .erp-shell .erp-topbar h1 { margin-top: 2px; color: var(--ws-action); font-size: 21px; font-weight: 700; line-height: 1.3; }
  body .erp-topbar .topbar-title-line { min-width: 0; }
  body .erp-topbar .school-header-context { color: var(--ws-muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
  body .erp-topbar .topbar-actions { gap: 9px; flex-shrink: 0; }
  body .erp-topbar .erp-search { width: 210px; }
  body .erp-topbar .erp-search input { height: 40px; border-color: var(--ws-line); background: var(--ws-canvas); color: var(--ws-ink); font-size: 13px; }
  body .erp-topbar .erp-search input::placeholder { color: var(--ws-muted); opacity: 1; }
  body .erp-shell .icon-button,
  .erp-modal .icon-button { width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--ws-line); border-radius: 6px; color: var(--ws-action); background: #fff; }
  body .erp-shell .icon-button:hover,
  .erp-modal .icon-button:hover { background: #edf2f6; border-color: #a7bacb; }
  body .erp-shell .erp-sidebar .sidebar-close { color: var(--ws-on-sidebar); border-color: currentColor; background: transparent; }
  body .erp-topbar .notification-button span { background: #b33244; }
  body .erp-topbar .user-menu-button { min-width: 170px; padding: 0; gap: 10px; color: var(--ws-ink); }
  body .erp-topbar .user-avatar { width: 40px; height: 40px; flex: 0 0 40px; border: 0; background-color: var(--ws-action); color: #fff; font-size: 12px; font-weight: 700; }
  body .erp-topbar .user-meta strong { font-size: 12px; font-weight: 600; }
  body .erp-topbar .user-meta small { color: var(--ws-muted); font-size: 11px; }
  body .erp-topbar .user-menu { width: 250px; max-width: calc(100vw - 24px); border-radius: 6px; box-shadow: 0 18px 45px #082b7524; }
  body .erp-topbar .user-menu > div { padding: 14px 16px; }
  body .erp-topbar .user-menu button { min-height: 44px; padding: 11px 16px; font-size: 13px; font-weight: 600; }
  body .erp-topbar .user-menu button:hover { background: var(--ws-canvas); }
  body .erp-topbar .user-menu .profile-menu-action { color: var(--ws-ink); }
  body .erp-topbar .user-menu span { color: var(--ws-muted); font-size: 12px; }

  .erp-main { padding: 26px 28px 36px; background: var(--ws-canvas); }
  .erp-main .view-stack { gap: 22px; animation: none; }
  .erp-main .view-intro h2,
  .erp-main .section-head h2 { font-size: 24px; line-height: 1.25; color: var(--ws-action); font-weight: 700; }
  .erp-main .view-intro p,
  .erp-main .section-head p { font-size: 13px; line-height: 1.6; }
  .erp-main .dashboard-grid { gap: 26px; }
  .erp-main .dashboard-grid > .erp-card,
  .erp-main > .view-stack > .erp-card,
  .erp-main .school-command-grid > .erp-card { border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; }
  .erp-main .card-head { min-height: 44px; padding: 0 0 12px; margin: 0 0 14px; gap: 12px; border-bottom: 1px solid var(--ws-line); }
  .erp-main .card-head h3 { color: var(--ws-action); font-size: 16px; font-weight: 700; line-height: 1.4; }
  .erp-main .card-head span { color: var(--ws-muted); font-size: 12px; }
  .erp-main .metric-grid { gap: 14px; border: 0; background: transparent; }
  .erp-main .metric-card { min-height: 138px; padding: 18px; gap: 10px; border: 1px solid var(--ws-line); border-radius: 6px; background: #fff; box-shadow: 0 8px 24px #082b750b; }
  .erp-main .metric-card strong { color: var(--ws-action); font-size: 26px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .erp-main .metric-card > span { color: var(--ws-muted); font-size: 12px; font-weight: 500; }
  .erp-main .metric-icon { width: 36px; height: 36px; border-radius: 5px; }
  .erp-main .metric-icon.green { color: #126f49; background: #e8f5ef; }
  .erp-main .metric-icon.gold { color: #806000; background: #fff7d6; }
  .erp-main .metric-icon.sky { color: #126e9b; background: #e7f5fc; }
  .erp-main .metric-icon.red { color: #a62f40; background: #fdecee; }
  .erp-main .workflow-list,
  .erp-main .activity-list { gap: 0; }
  .erp-main .workflow-item,
  .erp-main .activity-item { min-height: 66px; padding: 12px 0; gap: 12px; }
  .erp-main .record-copy { gap: 4px; }
  .erp-main .record-copy strong { font-size: 13px; font-weight: 600; }
  .erp-main .record-copy span { font-size: 12px; }
  .erp-main .record-icon { width: 36px; height: 36px; color: var(--ws-blue); background: #e7f5fc; border-radius: 5px; }
  .erp-main .module-banner,
  .erp-main .p6-command { padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--ws-line); border-radius: 0; background: transparent; }
  .erp-main .module-banner::after { content: none; }
  .erp-main .p6-command h2 { color: var(--ws-action); font-size: 24px; font-weight: 700; }
  .erp-main .p6-command p { color: var(--ws-muted); font-size: 13px; }
  .erp-main .p6-command > div:first-child > span { color: var(--ws-blue); font-size: 10px; }

  body .erp-shell .erp-button,
  .erp-modal .erp-button { min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; line-height: 1.5; font-weight: 600; text-decoration: none; }
  body .erp-shell .erp-button.primary,
  .erp-modal .erp-button.primary { color: #fff; border-color: var(--ws-action); background: var(--ws-action); box-shadow: none; }
  body .erp-shell .erp-button.primary:hover,
  .erp-modal .erp-button.primary:hover { background: var(--ws-blue); border-color: var(--ws-blue); }
  body .erp-shell .erp-button.secondary,
  .erp-modal .erp-button.secondary { color: var(--ws-action); background: #fff; border-color: var(--ws-line); }
  body .erp-shell .erp-button.secondary:hover,
  .erp-modal .erp-button.secondary:hover { border-color: #a7bacb; background: #f8fafc; }
  body .erp-shell .erp-button.danger,
  .erp-modal .erp-button.danger { color: #982e39; background: #fdecee; }
  body .erp-shell .erp-button svg,
  .erp-modal .erp-button svg { flex: 0 0 17px; width: 17px; height: 17px; }
  body .erp-shell :is(button, a, input, select, textarea, [tabindex]):focus-visible,
  .erp-modal :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--ws-blue); outline-offset: 3px; }
  body .erp-shell .erp-sidebar :is(button, a):focus-visible { outline-color: var(--ws-on-sidebar); }
  body .erp-shell button:disabled,
  .erp-modal button:disabled { cursor: not-allowed; }
  .erp-main .tabs { gap: 4px; }
  .erp-main .tab-button { min-height: 42px; padding: 10px 13px; font-size: 12px; font-weight: 600; color: var(--ws-muted); }
  .erp-main .tab-button.active { color: var(--ws-action); border-bottom: 2px solid var(--ws-action); }
  .erp-main .table-card { border: 1px solid var(--ws-line); border-radius: 6px; background: #fff; box-shadow: none; }
  .erp-main .toolbar { min-height: 62px; gap: 14px; padding: 12px 18px; border-color: var(--ws-line); background: #fff; }
  .erp-main .toolbar strong { color: var(--ws-action); font-size: 15px; font-weight: 600; }
  .erp-main .toolbar span { color: var(--ws-muted); font-size: 12px; }
  .erp-main .table-scroll { overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #a7bacb #edf2f6; }
  .erp-main .erp-table th { padding: 11px 16px; color: var(--ws-muted); background: var(--ws-canvas); font-size: 11px; font-weight: 600; text-transform: uppercase; }
  .erp-main .erp-table td { height: 54px; padding: 12px 16px; border-color: var(--ws-line); color: var(--ws-ink); font-size: 13px; line-height: 1.45; }
  .erp-main .erp-table tbody tr:hover { background: #f8fafc; }
  .erp-main .cell-title { gap: 3px; }
  .erp-main .cell-title strong { color: var(--ws-ink); font-size: 13px; font-weight: 600; }
  .erp-main .cell-title span { font-size: 11px; color: var(--ws-muted); }
  .erp-main .table-action { min-height: 32px; padding: 6px 9px; border: 1px solid var(--ws-line); border-radius: 5px; background: #fff; color: var(--ws-action); font-size: 12px; font-weight: 600; }
  .erp-main .table-action:hover { border-color: #a7bacb; background: #f5f8fa; }
  .erp-main .table-action.approve { color: #126f49; border-color: #b7d9c9; }
  .erp-main .table-action.reject { color: #982e39; border-color: #e5b9be; }
  body .erp-shell .status { min-height: 24px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
  body .erp-shell .status:is(.in_progress, .submitted, .in_review, .ready, .reviewed, .finance_review) { color: #195b89; background: #e8f1f8; }
  body .erp-shell .money { color: var(--ws-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
  .erp-main .empty-state { min-height: 180px; padding: 28px 18px; }
  .erp-main .empty-state h3 { color: var(--ws-action); font-size: 16px; }
  .erp-main .empty-state p { font-size: 13px; }

  .erp-modal-scrim { background: #061f5580; backdrop-filter: blur(2px); }
  .erp-modal { border: 1px solid var(--ws-line); border-radius: 8px; box-shadow: 0 24px 80px #061f5533; }
  .erp-modal > header { position: sticky; top: 0; z-index: 3; padding: 18px 22px; background: #fff; border-bottom-color: var(--ws-line); }
  .erp-modal > header span { color: var(--ws-blue); font-size: 10px; font-weight: 600; }
  .erp-modal h2 { color: var(--ws-action); font-size: 21px; line-height: 1.3; font-weight: 700; }
  .erp-modal .modal-fields { gap: 18px 20px; padding: 22px; }
  .erp-modal .modal-field { min-width: 0; gap: 6px; }
  .erp-modal .modal-field > span { color: var(--ws-ink); font-size: 12px; font-weight: 600; }
  .erp-modal .modal-field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) { min-height: 42px; max-width: 100%; padding: 10px 12px; border: 1px solid #bdcbd7; border-radius: 6px; background: #fff; color: var(--ws-ink); font-size: 14px; line-height: 1.5; }
  .erp-modal .modal-field textarea { min-height: 100px; }
  .erp-modal .modal-field input[readonly] { background: #edf2f6; }
  .erp-modal .modal-field :is(input, textarea)::placeholder { color: var(--ws-muted); opacity: 1; }
  .erp-modal .modal-field :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--ws-action); }
  .erp-modal .modal-field small { font-size: 12px; color: var(--ws-muted); }
  .erp-modal footer { padding: 16px 22px; border-top-color: var(--ws-line); background: var(--ws-canvas); }
  .erp-modal .modal-status { padding: 8px 22px 16px; color: #982e39; background: var(--ws-canvas); font-size: 13px; }
  .erp-modal .modal-status:empty { min-height: 0; padding: 0; }

  .erp-main .school-native-workspace { --school-ink: var(--ws-ink); --school-green: #126f49; --school-blue: #0b63b6; --school-gold: #d2a61d; --school-line: var(--ws-line); }
  .erp-main .school-module-tabs { gap: 4px 14px; padding-bottom: 0; }
  .erp-main .school-module-tabs > button { min-height: 42px; padding: 10px 6px; font-size: 12px; color: var(--ws-muted); }
  .erp-main .school-module-tabs > button:hover { color: var(--ws-action); background: #edf2f6; }
  .erp-main .school-module-tabs > button[aria-current="page"] { color: var(--ws-action); border-bottom: 2px solid var(--ws-action); }
  .erp-main .school-today-launcher { border: 0; background: transparent; }
  .erp-main .school-today-launcher > header { min-height: 0; padding: 0 0 14px; border: 0; }
  .erp-main .school-today-launcher > header span { color: var(--ws-blue); font-size: 10px; }
  .erp-main .school-today-launcher > header strong { color: var(--ws-action); font-size: 20px; font-weight: 700; }
  .erp-main .school-today-launcher > div { gap: 12px; }
  .erp-main .school-task-launch { min-height: 86px; padding: 14px; gap: 10px; border: 1px solid var(--ws-line); border-radius: 6px; background: #fff; }
  .erp-main .school-task-launch:not(:has(small)) { min-height: 56px; align-items: center; }
  .erp-main .school-task-launch:last-child { border-right: 1px solid var(--ws-line); }
  .erp-main .school-task-launch:hover { border-color: #9cb9d2; background: #f8fafc; }
  .erp-main .school-task-launch strong { color: var(--ws-action); font-size: 12px; line-height: 1.4; white-space: normal; }
  .erp-main .school-task-launch small { color: var(--ws-muted); font-size: 11px; line-height: 1.4; }
  .erp-main .school-task-launch.gold > svg:first-child { color: #806000; }
  .erp-main .school-pulse-grid { gap: 14px; }
  .erp-main .school-pulse-grid article { min-height: 144px; padding: 16px 18px; gap: 6px; border: 1px solid var(--ws-line); border-radius: 6px; background: #fff; box-shadow: 0 8px 24px #082b750b; }
  .erp-main .school-pulse-grid article > svg { position: static; width: 34px; height: 34px; margin-bottom: 3px; padding: 8px; border-radius: 5px; background: #fff7d6; color: #806000; }
  .erp-main .school-pulse-grid article.green > svg { color: #126f49; background: #e8f5ef; }
  .erp-main .school-pulse-grid article.sky > svg { color: #126e9b; background: #e7f5fc; }
  .erp-main .school-pulse-grid article.gold > svg { color: #806000; background: #fff7d6; }
  .erp-main .school-pulse-grid span { color: var(--ws-muted); font-size: 11px; font-weight: 600; text-transform: none; }
  .erp-main .school-pulse-grid strong { color: var(--ws-action); font-size: 25px; font-weight: 700; line-height: 1.2; }
  .erp-main .school-pulse-grid small { color: var(--ws-muted); font-size: 11px; line-height: 1.4; }
  .erp-main .school-command-grid { gap: 24px; }
  .erp-main .p6-mini-chart { padding: 4px 0; }
  .erp-main .p6-mini-chart > div > span,
  .erp-main .p6-mini-chart > div > strong { color: var(--ws-muted); font-size: 12px; }
  .erp-main .p6-mini-chart > div > strong { color: var(--ws-ink); font-weight: 600; }
  .erp-main .p6-mini-chart i { background: #e5edf3; }
  .erp-main .p6-mini-chart i b { background: var(--ws-blue); }
  .erp-main .school-fee-chart { padding: 4px 0 12px; }
  .erp-main .school-fee-summary > strong { font-size: 17px; }
  .erp-main .school-fee-track { height: 28px; margin-block: 24px 18px; }
  .erp-main .school-agenda,
  .erp-main .school-approval-list { padding: 0; }
  .erp-main .school-agenda li,
  .erp-main .school-approval-list li { min-height: 58px; gap: 12px; }
  .erp-main .school-agenda time { font-size: 11px; color: var(--ws-blue); }
  .erp-main .school-agenda li > div { flex: 1; }
  .erp-main .school-agenda span,
  .erp-main .school-approval-list small,
  .erp-main .school-approval-list time { color: var(--ws-muted); font-size: 11px; }
  .erp-main .school-class-grid { gap: 14px; }
  .erp-main .school-class-item { padding: 18px; gap: 14px; border: 1px solid var(--ws-line); border-top: 3px solid var(--ws-action); border-radius: 6px; }
  .erp-main .school-class-item:nth-child(3n+2) { border-top-color: var(--ws-blue); }
  .erp-main .school-class-item:nth-child(3n) { border-top-color: var(--ws-gold); }
  .erp-main .school-class-item h3 { color: var(--ws-action); font-size: 17px; }
  .erp-main .school-class-item p,
  .erp-main .school-class-total span,
  .erp-main .school-native-workspace td small { color: var(--ws-muted); font-size: 12px; }
  .erp-main .school-class-total strong { color: var(--ws-action); font-size: 28px; }
  .erp-main .school-teaching-analytics { gap: 24px; padding: 18px 0; border-color: var(--ws-line); }
  .erp-main .school-teaching-analytics h3 { color: var(--ws-action); font-size: 16px; margin-bottom: 16px; }
  .erp-modal :is(.school-register-grid, .school-mark-grid) th { background: var(--ws-canvas); color: var(--ws-muted); }
  .erp-modal :is(.school-register-grid, .school-mark-grid) :is(th, td) { border-color: var(--ws-line); }
  .erp-modal :is(.school-register-grid, .school-mark-grid) small { color: var(--ws-muted); }
  .erp-modal :is(.school-register-grid, .school-mark-grid) :is(input, select) { border-color: #bdcbd7; color: var(--ws-ink); }

  @media (max-width: 1280px) {
    body .erp-topbar .user-meta { display: none; }
    body .erp-topbar .user-menu-button { min-width: 58px; }
    body .erp-shell .erp-topbar { padding-inline: 22px; }
    .erp-main { padding: 22px; }
    .erp-main .school-today-launcher > div,
    .erp-main .school-pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 900px) {
    .erp-sidebar { width: min(284px, calc(100vw - 40px)); }
    .erp-sidebar .workspace-brand-lockup { width: calc(100% - 44px); }
    .erp-sidebar .sidebar-brand { min-height: 96px; padding: 16px; }
    .erp-sidebar .workspace-brand-monogram { width: 40px; height: 40px; flex-basis: 40px; }
    body .erp-shell .erp-sidebar .sidebar-close { width: 32px; height: 36px; }
    body .erp-shell .erp-sidebar .erp-nav button { min-height: 44px; }
    .erp-main .dashboard-grid,
    .erp-main .school-command-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 680px) {
    body .erp-shell .erp-topbar { min-height: 76px; padding: 10px 12px; gap: 8px; }
    body .erp-topbar .topbar-start { gap: 8px; }
    body .erp-shell .erp-topbar h1 { max-width: 100%; font-size: 17px; }
    body .erp-topbar .topbar-actions { gap: 5px; }
    body .erp-topbar .user-menu-button { min-width: 34px; }
    body .erp-topbar .user-avatar { width: 34px; height: 34px; flex-basis: 34px; }
    body .erp-shell .erp-topbar .icon-button { width: 32px; height: 38px; }
    body .erp-topbar .school-header-context { font-size: 10px; line-height: 1.35; }
    .erp-main { padding: 20px 16px 30px; }
    .erp-main .view-stack { gap: 20px; }
    .erp-main .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .erp-main .metric-card { min-height: 132px; padding: 14px; }
    .erp-main .metric-card strong { font-size: 22px; }
    .erp-main .card-head { flex-wrap: wrap; gap: 5px 12px; }
    .erp-main .toolbar { padding: 14px; }
    .erp-main .erp-table :is(th, td) { padding-inline: 14px; }
    .erp-main .table-action { min-height: 40px; }
    .erp-main .school-module-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
    .erp-main .school-module-tabs > button { min-height: 44px; flex: 0 0 auto; white-space: nowrap; }
    .erp-main .school-today-launcher > header strong { font-size: 19px; }
    .erp-main .school-today-launcher > div { gap: 10px; }
    .erp-main .school-task-launch { min-height: 108px; padding: 12px; grid-template-columns: 20px minmax(0, 1fr); align-items: start; }
    .erp-main .school-task-launch > svg:last-child { display: none; }
    .erp-main .school-pulse-grid { gap: 10px; }
    .erp-main .school-pulse-grid article { min-height: 152px; padding: 14px; }
    .erp-main .school-pulse-grid strong { font-size: 22px; }
    .erp-main .school-class-item { padding: 16px; }
    .erp-main .school-agenda time { flex-basis: 64px; }
    .erp-main .activity-item { grid-template-columns: 36px minmax(0, 1fr); }
    .erp-main .activity-item > .status { grid-column: 2; justify-self: start; }
    .erp-modal { max-height: calc(100dvh - 24px); }
    .erp-modal > header { padding: 16px 18px; gap: 12px; }
    .erp-modal h2 { font-size: 19px; }
    .erp-modal .modal-fields { padding: 18px; }
    .erp-modal footer { padding: 16px 18px; }
    .erp-modal .modal-status { padding-inline: 18px; }
    .erp-modal .modal-field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea) { font-size: 16px; }
  }
  @media (max-width: 360px) {
    .erp-main { padding-inline: 12px; }
    .erp-main .school-today-launcher > div { grid-template-columns: 1fr; }
    .erp-main .school-task-launch { min-height: 74px; grid-template-columns: 20px minmax(0, 1fr); align-items: center; }
    .erp-main .school-pulse-grid strong { font-size: 20px; }
    body .erp-topbar .topbar-actions { gap: 3px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .erp-sidebar,
    .erp-sidebar .erp-nav button,
    .erp-modal { transition: none; animation: none; }
  }
}
