/* Matrix interface system. Presentation only; print documents retain their own styles. */
@media screen {
  :root {
    --navy:#11284d; --red:#cd0734; --ink:#172b4d; --muted:#596b82;
    --line:#dfe6ef; --bg:#f3f6fa; --green:#176b53;
    --ui-radius:12px; --ui-control:8px; --ui-shadow:0 2px 5px rgb(18 40 75 / 3%);
  }
  html {scroll-padding-top:24px;}
  body {font-family:'Segoe UI',system-ui,Arial,sans-serif;font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;}
  a {color:#245ca2;text-underline-offset:3px;}
  a:hover {color:#153e77;}
  h1 {font-size:32px;line-height:1.2;letter-spacing:-.9px;font-weight:700;text-wrap:balance;}
  h2 {font-size:18px;line-height:1.4;letter-spacing:-.25px;font-weight:650;}
  h3 {font-size:16px;line-height:1.5;}
  p {line-height:1.65;}
  small {line-height:1.5;}
  .subtitle {font-size:14px;line-height:1.65;max-width:76ch;}
  .eyebrow {font-size:11px;letter-spacing:1.3px;color:#61718a;font-weight:700;}
  .ui-icon {width:20px;height:20px;flex:0 0 20px;display:inline-block;vertical-align:middle;}
  .skip-link {position:fixed;top:12px;left:16px;transform:translateY(-180%);z-index:100;background:#fff;border:2px solid #245ca2;border-radius:8px;padding:10px 18px;}
  .skip-link:focus {transform:none;}
  :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {outline:3px solid #2f6bc2;outline-offset:3px;}
  button,.button {min-height:44px;padding:10px 16px;border-radius:var(--ui-control);font-size:14px;line-height:1.4;font-weight:600;box-shadow:0 1px 2px rgb(18 40 75 / 3%);transition:background-color .15s,border-color .15s,box-shadow .15s;}
  button:hover,.button:hover {background:#f4f7fb;border-color:#9cacc2;color:var(--ink);box-shadow:0 2px 5px rgb(18 40 75 / 6%);}
  button:active,.button:active {box-shadow:none;}
  button.primary,.button.primary {background:var(--red);color:#fff;border-color:var(--red);box-shadow:0 2px 3px rgb(156 12 43 / 12%);}
  button.primary:hover,.button.primary:hover {background:#ae062c;border-color:#ae062c;color:#fff;}
  .danger {background:#fff7f8;color:#a51d36;border-color:#efc5cd;}
  .danger:hover {background:#fff0f2;color:#8d152c;}
  button:disabled,.button[aria-disabled=true] {opacity:.55;cursor:not-allowed;box-shadow:none;}
  .sidebar {width:252px;padding:24px 14px 18px;background:#11284d;scrollbar-width:thin;scrollbar-color:#57708d transparent;}
  .sidebar .brand {padding:0 10px;margin-bottom:26px;}
  .sidebar .brand-logo-frame {padding:10px 13px;border-radius:9px;box-shadow:0 2px 12px rgb(0 0 0 / 6%);}
  .sidebar .brand-logo {width:176px;}
  .brand small {font-size:9px;letter-spacing:2px;}
  .workspace-label,.nav-section {font-size:10px;letter-spacing:1.4px;color:#a1b4d1;padding:0 13px;}
  .workspace-label {margin-bottom:10px;}
  .nav-section {margin:22px 0 10px;padding-top:18px;border-top:1px solid #ffffff17;}
  .nav-link {color:#d2dded;padding:10px 12px;gap:12px;font-size:13px;line-height:1.45;min-height:42px;margin-bottom:3px;border:1px solid transparent;border-radius:8px;}
  .nav-link .ui-icon {opacity:.8;width:19px;height:19px;flex-basis:19px;}
  .nav-link:hover {background:#ffffff0d;border-color:#ffffff12;color:#fff;}
  .nav-link.selected {background:#294164;border-color:#ffffff09;color:#fff;box-shadow:inset 3px 0 #ef3c5c;}
  .nav-link.selected .ui-icon {opacity:1;}
  .nav-link .pill {margin-left:auto;font-size:11px;background:#e5edff;color:#183e7d;}
  .sidebar-foot {padding:22px 12px 0;font-size:11px;color:#d0dced;}
  .sidebar-foot small {font-size:10px;color:#a5b7d0;}
  .shell {margin-left:252px;min-width:0;}
  .topbar {height:76px;padding:0 32px;gap:18px;}
  .context {font-size:13px;line-height:1.5;}
  .context span {margin:0 10px;}
  .user-menu {gap:12px;font-size:13px;}
  .user-menu small {font-size:11px;}
  .user-menu .button,.user-menu button {font-size:12px;min-height:38px;padding:8px 12px;}
  .user-menu .text-link {display:inline-flex;align-items:center;min-height:38px;font-size:12px;font-weight:600;padding:7px 11px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#fff;}
  .user-menu .text-link:hover {background:#f4f7fb;text-decoration:none;}
  .avatar {width:38px;height:38px;background:#edf2fc;color:#264d85;border:1px solid #dfe7f6;}
  .phase-strip {min-height:42px;padding:9px 32px;font-size:11px;gap:12px;background:#fbfcfe;}
  .phase-strip>.muted {font-size:11px;}
  .main {max-width:1740px;padding:30px 32px 48px;}
  .page-heading {gap:24px;margin-bottom:24px;align-items:flex-start;}
  .page-heading>div:first-child {min-width:0;flex:1 1 320px;}
  .page-heading h1 {margin:6px 0 10px;}
  .page-heading>.button-row {flex:0 1 auto;justify-content:flex-end;max-width:55%;}
  .page-heading>.button-row .button {white-space:nowrap;}
  .back {font-size:13px;margin-bottom:12px;padding:3px 0;font-weight:600;}
  .pill {font-size:11px;font-weight:600;letter-spacing:.15px;border-radius:6px;padding:4px 9px;line-height:1.5;}
  .blue {background:#edf2fc;color:#27518b;}
  .green {background:#e9f5ee;color:#176b53;}
  .amber {background:#fff4dc;color:#805900;}
  .neutral {background:#edf1f6;color:#52647b;}
  .count {font-size:12px;border-radius:6px;padding:3px 8px;}
  .panel {border-radius:var(--ui-radius);border:1px solid var(--line);box-shadow:var(--ui-shadow);margin-bottom:24px;min-width:0;}
  .panel-head {padding:20px 24px;gap:16px;background:#fff;}
  .panel-head .subtitle {font-size:13px;margin-top:5px;}
  .panel-head>div {min-width:0;}
  .panel-body {padding:24px;}
  .panel-body p {font-size:14px;color:var(--muted);}
  .panel-body h2:not(:first-child) {margin-top:26px;}
  .panel-body h2 {margin-bottom:12px;}
  .note {background:#f2f6fc;border:1px solid #dce6f5;border-left:3px solid #91add2;padding:15px 18px;border-radius:8px;color:#435b79;font-size:13px;line-height:1.65;}
  .note p:last-child {margin-bottom:0;}
  .message {border-radius:9px;padding:15px 18px;font-size:14px;line-height:1.6;border-left-width:3px;}
  .message.error,.field-error {color:#a41c39;}
  .message.error {background:#fff3f5;border-color:#f0c8d0;}
  .message.success {background:#edf8f1;color:#176b53;border-color:#c8e8d4;}
  .field {gap:8px;margin-bottom:22px;min-width:0;}
  .field label,.employee-filters label {font-size:13px;font-weight:600;line-height:1.5;}
  .field-required {font-size:11px;color:#66778d;}
  .field :is(input:not([type=checkbox]):not([type=radio]),select,textarea),.search input,.employee-filters :is(input,select) {
    min-height:44px;padding:11px 13px;font-size:14px;line-height:1.5;color:var(--ink);border:1px solid #cbd6e4;border-radius:8px;background:#fff;
  }
  .field input::placeholder,.search input::placeholder,.employee-filters input::placeholder {color:#6c7d92;opacity:1;}
  .field :is(input,select,textarea):hover,.employee-filters :is(input,select):hover {border-color:#96aac2;}
  .field :is(input,select,textarea):focus-visible,.search input:focus-visible {border-color:#2f6bc2;outline:2px solid #b5cef1;outline-offset:1px;}
  .field textarea {height:104px;resize:vertical;}
  .field small {font-size:12px;line-height:1.6;color:#596b82;}
  .field small:empty {display:none;}
  .field-error {font-size:13px;line-height:1.6;max-width:70ch;white-space:normal;overflow-wrap:break-word;}
  .form-grid {gap:0 24px;align-items:start;}
  form.form-grid {align-items:end;}
  form.form-grid>.field {margin-bottom:0;}
  form.form-grid {row-gap:20px;}
  form.form-grid>button,form.form-grid>.button {align-self:end;min-height:44px;max-height:48px;}
  .form-grid .field-checkbox {align-self:start;}
  .field label.checkbox-label,.checkbox-label {font-size:14px;line-height:1.6;gap:10px;}
  input[type=checkbox],.field input[type=checkbox] {width:18px;height:18px;min-width:18px;flex-basis:18px;min-height:18px;padding:0;margin-top:3px;}
  .field-checkbox .checkbox-label {min-height:28px;}
  .multi-checklist legend {font-size:14px;font-weight:600;margin-bottom:10px;}
  .multi-options {border-color:#cbd6e4;border-radius:8px;padding:8px 12px;}
  .multi-options .checkbox-label {padding:8px 3px;min-height:40px;font-size:14px;border-bottom:1px solid #edf1f6;}
  .multi-options .checkbox-label:last-child {border-bottom:0;}
  .multi-options .checkbox-label:hover {background:#f5f8fd;}
  .employee-filters {gap:14px;padding:20px 24px;background:#fbfcfe;align-items:end;}
  .employee-filters>div {flex:1 1 155px;min-width:150px;}
  .employee-filters>div:first-child {flex:1.5 1 210px;}
  .employee-filters label {margin-bottom:8px;}
  .employee-filters button,.employee-filters>.button {height:44px;}
  .search {align-items:center;flex-wrap:wrap;gap:10px;}
  .search input {flex:1 1 200px;min-width:120px;}
  .search button {font-size:14px;min-height:44px;}
  .search label {font-size:13px;font-weight:600;}
  .table-wrap {min-width:0;scrollbar-width:thin;scrollbar-color:#a9b8cb #eef2f7;}
  .table-wrap table {font-size:14px;line-height:1.55;}
  .table-wrap th {font-size:11px;font-weight:650;letter-spacing:.65px;color:#536783;background:#f5f8fc;line-height:1.6;}
  .table-wrap :is(td,th) {padding:16px 22px;vertical-align:middle;}
  .table-wrap td {border-color:#e8edf4;}
  .table-wrap td small {font-size:12px;line-height:1.55;margin-top:5px;}
  .table-wrap td code {font-size:12px;}
  .table-wrap tbody tr:hover>td {background-color:#f8faff;}
  .table-wrap td:last-child {min-width:120px;}
  .table-wrap td:last-child>a:not(:has(strong)),.search>a,.pagination a,.panel-body>a:not(.button):not(.back),.button-row>a:not(.button) {
    display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:7px 12px;margin:2px 3px 2px 0;border:1px solid #d7e1ef;border-radius:7px;background:#f7faff;color:#234f88;font-size:13px;line-height:1.5;font-weight:600;text-decoration:none;white-space:normal;
  }
  .table-wrap td:last-child>a:not(:has(strong)):hover,.search>a:hover,.pagination a:hover,.panel-body>a:not(.button):not(.back):hover,.button-row>a:not(.button):hover {background:#eaf1fc;border-color:#a4bbda;color:#173e74;}
  .table-wrap td:last-child>form {display:inline-block;}
  .table-wrap td:last-child>form button {min-height:38px;padding:7px 12px;font-size:13px;}
  .table-wrap .empty-cell,.table-wrap td[colspan]:only-child {padding:36px 24px;text-align:center;color:var(--muted);white-space:normal;}
  .pagination {padding:15px 22px;font-size:12px;align-items:center;gap:14px;flex-wrap:wrap;background:#fff;}
  .pagination a {margin-left:8px;}
  .detail-list {padding:4px 24px;}
  .detail-list>div {grid-template-columns:minmax(130px,.7fr) minmax(0,1.3fr);padding:15px 0;gap:24px;border-color:#e8edf4;}
  .detail-list dt {font-size:13px;line-height:1.6;}
  .detail-list dd {font-size:14px;line-height:1.6;}
  .detail-grid {font-size:14px;line-height:1.7;}
  .revision-list article {padding:22px 24px;}
  .revision-list strong {font-size:14px;}
  .revision-list small {font-size:12px;}
  .revision-list p,.revision-list summary {font-size:13px;line-height:1.65;}
  .revision-list summary {padding:8px 0;font-weight:600;}
  .revision-values {font-size:13px;line-height:1.7;}
  .plain-list {font-size:14px;line-height:1.65;}
  .permission-tags {gap:7px;}
  .permission-tags span {font-size:11px;padding:5px 8px;}
  .two-columns {grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px;}
  .welcome-banner {position:relative;background:#11284d;border:1px solid #183964;padding:28px 32px;border-radius:12px;gap:28px;box-shadow:0 4px 14px rgb(17 40 77 / 7%);}
  .welcome-banner:before {content:'';position:absolute;left:0;top:24px;bottom:24px;width:4px;background:#e82e53;border-radius:0 4px 4px 0;}
  .welcome-banner h2 {font-size:27px;line-height:1.25;letter-spacing:-.6px;margin:8px 0 12px;color:#fff;}
  .welcome-banner h2 br {display:none;}
  .welcome-banner h2 br:after {content:' ';}
  .welcome-banner p {font-size:14px;line-height:1.65;max-width:65ch;color:#d1dced;}
  .welcome-banner .eyebrow {color:#b7c9e1;}
  .welcome-banner .banner-symbol {background:#fff;padding:14px;border-radius:10px;}
  .welcome-banner .banner-symbol img {width:154px;}
  .stats {gap:16px;}
  .stat {padding:21px 22px;border-radius:11px;box-shadow:var(--ui-shadow);position:relative;}
  .stat>span {font-size:13px;line-height:1.5;}
  .stat strong {font-size:34px;letter-spacing:-1px;margin:12px 0 8px;font-variant-numeric:tabular-nums;color:var(--navy);}
  .stat small {font-size:12px;line-height:1.55;}
  .stat:nth-child(3) {border-top:3px solid #365f9e;padding-top:19px;}
  .action-list a {min-height:84px;padding:19px 24px;gap:20px;}
  .action-list strong {font-size:14px;}
  .action-list small {font-size:12px;line-height:1.55;}
  .action-list a>span {display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 32px;border:1px solid #dce5f2;border-radius:8px;background:#f6f9fe;color:#30598f;}
  .module-grid {gap:16px;padding:24px;}
  .module-card {position:relative;padding:20px;border-radius:10px;background:#fff;border-color:#dfe6ef;transition:border-color .15s,box-shadow .15s;}
  .module-card:hover {border-color:#9eb5d4;background:#fbfcff;box-shadow:0 3px 12px rgb(18 40 75 / 5%);}
  .module-card:after {content:'\2197';position:absolute;right:18px;top:17px;color:#7b8da5;font-size:17px;}
  .module-icon {display:flex;align-items:center;justify-content:center;width:40px;height:40px;background:#edf3fc;border:1px solid #e1eaf8;border-radius:10px;color:#315b91;}
  .module-card strong {font-size:14px;line-height:1.5;margin:14px 0 5px;}
  .module-card small {font-size:12px;}
  .scope-list li {font-size:14px;padding:13px 0;gap:15px;}
  .auth-shell {background:#f1f5fa;padding:40px 24px;}
  .login-layout {max-width:1080px;box-shadow:0 16px 60px rgb(18 40 75 / 8%);border-radius:18px;border-color:#dce4ef;}
  .login-hero {background:#11284d;padding:44px;}
  .login-hero .brand-logo {width:210px;}
  .hero-copy {margin:62px 0;}
  .hero-copy h1 {font-size:42px;line-height:1.2;}
  .hero-copy p {font-size:15px;line-height:1.8;color:#d0daeb;}
  .hero-footer {font-size:12px;line-height:1.7;}
  .hero-footer span {color:#adbed7;}
  .login-form {padding:46px;}
  .login-form h1 {font-size:30px;}
  .login-form .subtitle {font-size:14px;line-height:1.7;}
  .auth-note {font-size:13px;line-height:1.65;}
  .report-catalog {gap:22px;}
  .report-catalog h2 {font-size:18px;}
  .report-catalog p {font-size:14px;}
  .report-table th {font-size:11px;}
  .report-table td {font-size:13px;}
  .panel.payroll-worksheet .worksheet-table {min-width:3100px;}
  .panel.payroll-worksheet .worksheet-table th:first-child,.panel.payroll-worksheet .worksheet-table td:first-child {min-width:84px;padding-left:16px;padding-right:12px;background:#fff;}
  .panel.payroll-worksheet .worksheet-table .worksheet-employee {left:0;min-width:240px;max-width:280px;font-size:14px;box-shadow:3px 0 5px rgb(24 47 82 / 3%);}
  .panel.payroll-worksheet .worksheet-table thead th {z-index:5;background:#f1f5fb;font-size:11px;}
  .panel.payroll-worksheet .worksheet-table thead th:first-child,.panel.payroll-worksheet .worksheet-table thead .worksheet-employee {z-index:6;background:#f1f5fb;}
  .panel.payroll-worksheet .worksheet-table tbody th.worksheet-employee {font-weight:600;vertical-align:top;}
  .panel.payroll-worksheet .worksheet-table td:last-child,.panel.payroll-worksheet .worksheet-table th:last-child {min-width:300px;max-width:380px;}
  .panel.payroll-worksheet .worksheet-table .field-error {font-size:13px;line-height:1.65;padding:9px 12px;background:#fff2f4;border:1px solid #f0d4dc;border-radius:7px;margin-top:10px;}
  .panel.payroll-worksheet .worksheet-table :is(input:not([type=checkbox]),select,textarea) {border-color:#c4d0e0;border-radius:7px;min-height:42px;font-size:14px;background:#f4f6f9;}
  .panel.payroll-worksheet .worksheet-table [data-calculated] {font-size:14px;min-width:145px;}
  .panel.payroll-worksheet .worksheet-table tr.worksheet-dirty [data-calculated] {background:#fff5da;}
  .panel.payroll-worksheet .worksheet-bases-hidden .worksheet-table {min-width:2150px;}
  .payroll-register-table :is(th,td):first-child {box-shadow:3px 0 5px rgb(24 47 82 / 3%);}
  .employee-picker {font-size:14px;}
  .employee-picker-results {border-color:#cbd6e4;box-shadow:0 8px 24px rgb(18 40 75 / 10%);}
}
@media screen and (min-width:1600px) {
  .main {padding:36px 48px 56px;}
  .topbar {padding-inline:48px;}
  .phase-strip {padding-inline:48px;}
}
@media screen and (max-width:1200px) {
  .main {padding:26px 24px 40px;}
  .topbar {padding-inline:24px;}
  .phase-strip {padding-inline:24px;}
  .page-heading {flex-wrap:wrap;gap:18px;}
  .page-heading>.button-row {max-width:100%;justify-content:flex-start;}
  .stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  .two-columns {grid-template-columns:1fr;}
  .module-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media screen and (max-width:1000px) {
  .context {display:none;}
  .user-menu {margin-left:auto;}
  .welcome-banner .banner-symbol {display:none;}
}
@media screen and (max-width:760px) {
  body {font-size:14px;}
  .sidebar {width:min(290px,88vw);padding:26px 14px;}
  .shell {margin-left:0;}
  .sidebar.open {box-shadow:15px 0 70px rgb(14 32 59 / 30%);}
  .sidebar-close {display:block;min-height:36px;top:10px;right:10px;}
  #menu-toggle {display:inline-flex;min-height:40px;min-width:40px;align-items:center;justify-content:center;padding:8px;font-size:19px;}
  .topbar {height:auto;min-height:72px;padding:12px 16px;gap:10px;}
  .user-menu {gap:9px;min-width:0;}
  .user-menu .avatar {width:32px;height:32px;flex-shrink:0;}
  .user-menu strong {font-size:12px;max-width:100px;}
  .user-menu small {font-size:10px;}
  .user-menu .text-link {display:none;}
  .user-menu .button,.user-menu button {min-height:38px;padding:7px 10px;font-size:12px;}
  .phase-strip {padding:9px 16px;font-size:11px;gap:8px;}
  .main {padding:24px 16px 40px;}
  h1 {font-size:28px;}
  .page-heading {gap:16px;margin-bottom:20px;}
  .page-heading>div:first-child {flex-basis:100%;}
  .page-heading>.button-row {justify-content:flex-start;gap:8px;}
  .page-heading>.button-row .button {font-size:13px;padding:10px 12px;}
  .panel {border-radius:10px;margin-bottom:20px;}
  .panel-head,.panel-body {padding:20px;}
  .panel-head h2 {font-size:17px;}
  .form-grid {grid-template-columns:minmax(0,1fr);gap:0;}
  form.form-grid {gap:16px;}
  .field {margin-bottom:20px;}
  .field :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {font-size:16px;}
  .field label {font-size:14px;}
  .field small {font-size:12px;}
  .field label.checkbox-label {font-size:14px;}
  .employee-filters {padding:18px;gap:14px;}
  .employee-filters>div,.employee-filters>div:first-child {flex:1 1 100%;min-width:0;}
  .employee-filters :is(input,select) {font-size:16px;}
  .table-wrap :is(td,th) {padding:14px 18px;}
  .table-wrap table {font-size:13px;min-width:600px;}
  .table-wrap td small {font-size:12px;}
  .pagination {padding:14px 18px;}
  .pagination a {min-height:44px;}
  .welcome-banner {padding:24px;}
  .welcome-banner h2 {font-size:25px;}
  .welcome-banner p {font-size:14px;}
  .stats {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .stat {padding:18px;}
  .stat>span {font-size:12px;}
  .stat strong {font-size:30px;}
  .stat small {font-size:11px;}
  .module-grid {grid-template-columns:minmax(0,1fr);padding:18px;gap:12px;}
  .module-card {padding:18px;}
  .action-list a {padding:18px 20px;}
  .action-list small {font-size:12px;}
  .detail-list {padding-inline:20px;}
  .detail-list>div {grid-template-columns:minmax(85px,.7fr) minmax(0,1.3fr);gap:16px;}
  .detail-list dt,.detail-list dd {font-size:13px;}
  .revision-list article {padding:20px;}
  .auth-shell {padding:18px;}
  .login-layout {max-width:480px;border-radius:14px;}
  .login-hero {padding:26px;}
  .login-hero .brand-logo {width:160px;}
  .hero-copy {margin:26px 0;}
  .hero-copy h1 {font-size:30px;}
  .hero-copy p {font-size:14px;}
  .login-form {padding:28px 24px;}
  .login-form h1 {font-size:28px;}
  .auth-note {font-size:12px;}
  .panel.payroll-worksheet .worksheet-table {min-width:3100px;}
}
@media screen and (max-width:380px) {
  .user-menu .avatar {display:none;}
  .user-menu strong {max-width:82px;}
  .user-menu {gap:7px;}
  .stats {grid-template-columns:1fr;}
}
@media (prefers-reduced-motion:reduce) {
  *,*:before,*:after {scroll-behavior:auto!important;transition:none!important;animation:none!important;}
}

@media screen {
  a.action-link {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 12px;margin:3px 4px 3px 0;border:1px solid #d4dfef;border-radius:7px;background:#f7faff;color:#234f88;font-size:13px;line-height:1.5;font-weight:600;text-decoration:none;vertical-align:middle;}
  a.action-link:hover {background:#eaf1fc;border-color:#a4bbda;color:#173e74;text-decoration:none;}
  .revision-list a.action-link {margin-bottom:8px;}
  .panel-head a.action-link {flex-shrink:0;}
}
@media screen and (max-width:760px) {a.action-link {min-height:44px;}}

/* Keep page chrome within the viewport; wide records scroll in their own table panels. */
@media screen {
  .sr-only {left:0;top:0;}
  .table-wrap {position:relative;}
}
@media screen and (max-width:760px) {
  .panel.payroll-worksheet .worksheet-table .worksheet-employee {min-width:200px;max-width:220px;}
}
/* Shared status semantics. Labels remain visible; dots are decorative. */
@media screen {
  .pill.status-success,.pill.status-warning,.pill.status-info,.pill.status-neutral,.pill.status-danger {
    gap:6px;padding:4px 9px;border:1px solid transparent;border-radius:6px;font-size:12px;font-weight:600;letter-spacing:0;vertical-align:middle;line-height:1.5;white-space:nowrap;
  }
  .pill[class*="status-"]:before {content:'';width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:currentColor;}
  .pill.status-success {color:#166534;background:#ecfdf3;border-color:#bbebcd;}
  .pill.status-warning {color:#854d0e;background:#fffbeb;border-color:#f5dfa0;}
  .pill.status-info {color:#1e40af;background:#eff6ff;border-color:#cadcfc;}
  .pill.status-neutral {color:#475569;background:#f1f5f9;border-color:#dce4ed;}
  .pill.status-danger {color:#991b1b;background:#fef2f2;border-color:#f4caca;}
  .table-wrap td:has(>.pill[class*="status-"]) {vertical-align:middle;}
}
@media screen {
  .employee-filters>.employee-page-size {flex:0 1 160px;min-width:145px;}
  .page-links {display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
  .page-links a {margin:0;min-width:38px;}
  .page-current {display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:38px;padding:7px 12px;border:1px solid #bdcfe9;border-radius:7px;background:#eaf1fc;color:#173e74;font-weight:700;}
  .page-gap {padding:0 5px;}
  .pagination-range {display:block;margin-top:4px;color:var(--muted);font-size:12px;}
}
@media screen and (max-width:760px) {
  .employee-filters>.employee-page-size {flex:1 1 100%;}
  .page-links a,.page-current {min-width:44px;min-height:44px;}
}

/* Template import: a bounded spreadsheet preview, with all columns available. */
@media screen {
  .import-preview-scroll { max-height: 34rem; overflow: auto; }
  .import-preview-table { min-width: 2500px; }
  .import-preview-table th { position: sticky; top: 0; z-index: 2; white-space: nowrap; }
  .import-preview-table td { min-width: 130px; max-width: 260px; overflow-wrap: anywhere; vertical-align: top; }
  .import-preview-table th:first-child, .import-preview-table td:first-child { min-width: 80px; }
  .import-preview-table td:nth-child(2) { min-width: 230px; }
  .import-preview-table td:last-child { min-width: 240px; white-space: pre-wrap; }
  .import-preview-table tbody tr:nth-child(even) { background: #f8fafd; }
  .import-preview-scroll:focus-visible { outline: 2px solid #1e40af; outline-offset: 2px; }
}
/* Shared error details: progressively enhanced; messages remain readable without JS. */
@media screen {
  .error-message-source {position:absolute!important;left:0!important;top:0!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;}
  .field-error.error-is-compact, [data-error-message].error-is-compact {display:inline-flex;align-items:center;max-width:100%;margin:4px 4px 4px 0;vertical-align:middle;}
  .message.error.error-is-compact {display:flex;align-items:center;background:transparent;border:0;padding:0;margin:0 0 16px;box-shadow:none;}
  button.error-details-trigger {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:34px;min-width:34px;height:34px;min-height:34px;padding:7px;margin:0;background:#fff5f5;border:1px solid #efb9b9;border-radius:7px;color:#b42318;cursor:pointer;box-shadow:none;line-height:1;}
  button.error-details-trigger:hover {background:#fee4e2;border-color:#d58b86;color:#912018;}
  button.error-details-trigger:focus-visible {outline:3px solid #1e40af;outline-offset:3px;}
  .error-details-trigger svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .error-details-tooltip {position:fixed;z-index:10020;max-width:min(390px,calc(100vw - 24px));max-height:50vh;overflow:hidden;padding:12px 14px;border-radius:8px;background:#11284d;color:#fff;font-size:13px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 8px 24px #11284d33;pointer-events:none;}
  .error-details-tooltip[hidden] {display:none;}
  dialog.error-details-dialog {width:min(560px,calc(100vw - 32px));max-width:560px;max-height:80vh;overflow:auto;box-sizing:border-box;padding:24px;border:1px solid #d9e2ef;border-radius:14px;color:#11284d;background:#fff;box-shadow:0 24px 64px #11284d40;}
  .error-details-dialog::backdrop {background:#10244880;}
  .error-details-header {display:flex;align-items:center;justify-content:space-between;gap:16px;}
  .error-details-header h2 {margin:0;font-size:21px;}
  button.error-details-dismiss {width:44px;min-width:44px;height:44px;padding:0;border:0;background:transparent;color:#596b82;font-size:28px;box-shadow:none;}
  .error-details-content {margin:20px 0 24px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.7;}
  .error-details-footer {display:flex;justify-content:flex-end;}
  @media(max-width:760px) {button.error-details-trigger {width:44px;min-width:44px;height:44px;min-height:44px;}}
}
@media print {
  .error-details-trigger,.error-details-dialog,.error-details-tooltip {display:none!important;}
  .error-message-source {position:static!important;display:inline!important;clip:auto!important;clip-path:none!important;width:auto!important;height:auto!important;white-space:pre-wrap!important;}
}
