/* Shared Mini WMS visual language, with Metrotech navy as the primary color.
   Application chrome only: PDF templates and canvas rendering stay independent. */
body.ems-theme {
  --bg:#f5f7fb; --line:#e2e8f0; --muted:#7d899b; --text:#253249;
  --navy:#0b3768; --blue:#0b3768; --navy-light:#edf2f7;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.55;
}
.ems-theme .topbar {height:60px;padding:0;margin:0;display:block;background:var(--navy);border-bottom:1px solid #ffffff12;box-shadow:0 2px 8px #0b37680d;z-index:40}
.ems-theme .topbar-inner {height:100%;margin:auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.ems-theme .topbar-brand {min-width:0;gap:18px}
.ems-theme .metro-logo {width:154px;height:30px;max-height:30px;object-fit:contain;background:transparent;border-radius:0;padding:0}
.ems-theme .topbar-title {display:block;color:#fff;font-size:14px;font-weight:600}
.ems-theme .topbar-divider {display:block;background:#ffffff30;height:24px}
.ems-theme .user-menu-wrap {margin-left:auto;flex:none}
.ems-theme .user-menu-btn {padding:5px 7px;border-radius:6px;color:#fff;font:inherit}
.ems-theme .user-menu-btn:hover {background:#ffffff12}
.ems-theme .user-avatar {width:30px;height:30px;flex-basis:30px;background:#ffffff1a;color:#fff;border:1px solid #ffffff26;font-weight:600}
.ems-theme .user-menu-copy strong {max-width:140px;color:#fff;font-size:12px;font-weight:600}
.ems-theme .user-menu-copy small {color:#ffffffad;font-size:10px;font-weight:400}
.ems-theme .user-menu-chevron {color:#ffffffad}
.ems-theme .user-menu {width:220px;border-radius:8px;box-shadow:0 6px 20px #14283c14}
.ems-theme .user-menu-meta {background:#fff}
.ems-theme .user-menu>button {font-size:13px;font-weight:400}
.ems-theme .shell {max-width:1440px;padding:24px 24px 48px;margin:auto}
.ems-theme .shell:has(#dashboard:not(.hidden)) {max-width:none;padding:24px 28px 48px 272px}
.ems-theme .ems-main {max-width:1440px;margin:auto}
.ems-theme .ems-nav {position:fixed;top:60px;bottom:0;left:0;z-index:35;display:flex;flex-direction:column;align-items:stretch;gap:5px;width:244px;overflow-y:auto;padding:24px 14px;background:#fff;border-right:1px solid var(--line);transform:none;box-shadow:none}
.ems-theme:has(#dashboard.hidden) .ems-nav {display:none}
.ems-theme .ems-nav-group {display:block;padding-top:16px;margin:0}
.ems-theme .ems-nav-group summary {display:flex;padding:6px 12px;font-weight:600;font-size:10px;letter-spacing:.08em;color:#8794a6}
.ems-theme .ems-nav-items {display:grid;padding-top:6px;gap:5px}
.ems-theme .ems-nav button {width:100%;min-height:42px;height:auto;padding:10px 12px;display:flex;align-items:center;gap:9px;border:0;border-radius:7px;background:transparent;color:#536176;font-size:13px;font-weight:500;white-space:normal;box-shadow:none;text-align:left}
.ems-theme .ems-nav button:hover {color:var(--navy);background:#f5f8fc}
.ems-theme .ems-nav button.active {color:var(--navy);background:transparent;box-shadow:none;font-weight:700}
.ems-theme .ems-nav span {margin-left:auto;color:var(--navy);background:#dce9f6;font-size:10px}
.ems-theme .ems-nav span:empty {display:none}
.ems-theme h2 {font-size:16px;font-weight:600;color:var(--text)}
.ems-theme h3 {color:var(--text);font-weight:600}
.ems-theme #roleTitle,.ems-theme #requestFormTitle,.ems-theme #queueTitle,.ems-theme #decisionHistoryTitle,.ems-theme #emsTasks>h2,.ems-theme .admin-head-card h2 {font-size:20px;font-weight:700}
.ems-theme .card {border-radius:9px;padding:20px;margin-bottom:16px;box-shadow:none;overflow:visible}
.ems-theme .profile-card {padding:0;border:0;background:transparent;margin-bottom:20px}
.ems-theme .profile-grid {margin-top:16px;background:#fff;border-radius:8px}
.ems-theme .profile-grid>div {padding:10px 14px}
.ems-theme .profile-grid label {font-size:11px;text-transform:none;letter-spacing:0;font-weight:500}
.ems-theme .profile-grid strong {font-weight:500;white-space:normal;overflow-wrap:anywhere}
.ems-theme .ems-overview {margin-bottom:20px}
.ems-theme .ems-overview>h2 {margin-bottom:4px;font-size:16px}
.ems-theme .ems-overview>p {font-size:12px}
.ems-theme .ems-metrics {gap:16px;border:0;border-radius:0;padding:0;background:transparent;margin-top:14px}
.ems-theme .ems-metrics>.ems-metric {display:flex;align-items:center;gap:14px;min-width:0;border:1px solid var(--line);border-radius:9px;padding:20px;background:#fff;box-shadow:0 2px 4px #183b6103}
.ems-theme .ems-metric-icon {width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:9px;background:#edf3fa;color:var(--navy)}
.ems-theme .ems-metric-icon.teal {background:#eaf7f5;color:#25857f}
.ems-theme .ems-metric-icon.amber {background:#fff5e6;color:#b87815}
.ems-theme .ems-metric-icon::before {content:'';width:21px;height:21px;background:currentColor;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat}
.ems-theme .ems-metric-copy {min-width:0}
.ems-theme .ems-metrics small {font-size:12px;color:#66758b;margin:0 0 3px}
.ems-theme .ems-metrics small::before {display:none}
.ems-theme .ems-metrics strong {font-size:clamp(17px,1.7vw,24px);color:var(--navy);font-weight:700;letter-spacing:-.6px;overflow-wrap:anywhere}
.ems-theme .ems-metric-copy>span {display:block;margin-top:4px;font-size:11px;color:#8994a4}
.ems-theme .ems-panels {gap:18px;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
.ems-theme .ems-panel-heading {margin-bottom:16px}
.ems-theme .ems-panel-heading h2 {font-size:14px;margin-bottom:4px}
.ems-theme .ems-panel-heading p {font-size:11px}
.ems-theme .ems-chart-panel {padding:20px}
.ems-theme .ems-chart-legend {display:flex;gap:16px;align-items:center;font-size:11px;color:#536176;margin:10px 0}
.ems-theme .ems-chart-legend span,.ems-theme .ems-distribution-legend span {display:inline-flex;align-items:center;gap:7px}
.ems-theme .ems-chart-legend i,.ems-theme .ems-distribution-legend i {display:inline-block;width:8px;height:8px;border-radius:3px}
.ems-theme .ems-chart-legend small {margin-left:auto;color:var(--muted)}
.ems-theme .ems-trend-svg {width:100%;height:auto;min-height:200px;display:block}
.ems-theme .ems-trend-svg text {font:11px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;fill:#8390a2}
.ems-theme .ems-chart-data {font-size:11px;color:#748198;margin-top:10px}
.ems-theme .ems-chart-data summary {cursor:pointer;width:max-content}
.ems-theme .ems-chart-data table {color:var(--text)}
.ems-theme .ems-donut {width:220px;height:220px;position:relative;margin:8px auto 14px}
.ems-theme .ems-donut svg {display:block;width:100%;height:100%}
.ems-theme .ems-donut-center {position:absolute;inset:50px 25px;display:flex;flex-direction:column;justify-content:center;text-align:center;pointer-events:none}
.ems-theme .ems-donut-center small {font-size:11px;color:var(--muted)}
.ems-theme .ems-donut-center strong {font-size:17px;letter-spacing:-.5px;color:var(--navy);overflow-wrap:anywhere}
.ems-theme .ems-distribution-legend {display:grid;gap:8px;font-size:12px}
.ems-theme .ems-distribution-legend>div {display:grid;grid-template-columns:1fr auto 38px;gap:10px;align-items:center}
.ems-theme .ems-distribution-legend small {color:var(--muted);text-align:right}
.ems-theme .ems-chart-empty {min-height:260px;display:grid;place-items:center;text-align:center;color:var(--muted);font-size:12px;padding:20px}
.ems-theme .ems-category-panel td:first-child {overflow-wrap:anywhere;max-width:420px}
.ems-theme .ems-category-share {width:25%}
.ems-theme .ems-category-track {display:block;height:6px;border-radius:4px;background:#edf2f8;margin:6px 0;overflow:hidden}
.ems-theme .ems-category-track i {display:block;height:100%;background:var(--navy);border-radius:4px}
.ems-theme .ems-task,.ems-theme .ems-category {padding:10px 0;font-size:13px}
.ems-theme .ems-task>div {min-width:0;overflow-wrap:anywhere}
.ems-theme .ems-task strong {white-space:nowrap}
.ems-theme .btn {border:1px solid transparent;border-radius:6px;min-height:36px;padding:7px 12px;font:600 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;vertical-align:middle}
.ems-theme .btn:hover:not(:disabled) {filter:brightness(.96)}
.ems-theme .btn:focus-visible,.ems-theme button:focus-visible,.ems-theme a:focus-visible {outline:2px solid var(--navy);outline-offset:2px}
.ems-theme .btn.ghost {background:#fff;border-color:var(--line);color:var(--navy)}
.ems-theme .btn.tiny {min-height:28px;padding:4px 8px;font-size:12px}
.ems-theme .btn.danger {color:#c92a2a;background:#fff5f5;border-color:#ffc9c9}
.ems-theme .field label {color:#495057;font-size:12px;font-weight:500;margin-bottom:5px}
.ems-theme .field input,.ems-theme .field select,.ems-theme .custom-select-trigger {height:36px;border-color:#ced4da;border-radius:6px;padding:7px 10px;color:var(--text);font:inherit}
.ems-theme .field input:focus,.ems-theme .field select:focus,.ems-theme textarea:focus {outline:none;border-color:var(--navy);box-shadow:0 0 0 2px #0b376814}
.ems-theme .custom-select.open .custom-select-trigger {border-color:var(--navy);box-shadow:0 0 0 2px #0b376814}
.ems-theme .custom-select-menu {border-radius:4px;box-shadow:0 4px 14px #00000012}
.ems-theme .custom-select-menu button {border-radius:3px}
.ems-theme .payment-form {grid-template-columns:minmax(140px,1.15fr) minmax(180px,1.6fr) minmax(135px,1fr) minmax(110px,.8fr) minmax(180px,1.3fr) auto;gap:12px}
.ems-theme .payment-form>.btn {height:36px;margin-top:24px;white-space:nowrap}
.ems-theme .evidence-picker {height:36px}
.ems-theme .file-pick-btn {height:36px!important;min-height:36px;border-radius:4px!important;background:#fff!important;font-weight:600!important}
.ems-theme .file-pick-info {line-height:36px}
.ems-theme .field input[type=file] {height:auto;min-height:36px}
.ems-theme .table-wrap {max-width:100%;margin-top:14px}
.ems-theme th,.ems-theme td {padding:8px 10px}
.ems-theme th {background:#fff;color:#495057;font-size:12px;font-weight:600}
.ems-theme td {font-size:13px}
.ems-theme tbody tr:hover {background:#f8f9fa}
.ems-theme #table tbody tr,.ems-theme #decisionHistoryTable tbody tr {height:46px}
.ems-theme .status,.ems-theme .role-chip,.ems-theme .signature-state,.ems-theme .user-state {font-size:10px;font-weight:600;padding:3px 8px;line-height:1.5}
.ems-theme .file-chip {border-radius:3px;background:#f1f3f5}
.ems-theme .empty {padding:32px 16px;font-size:13px}
.ems-theme .total-box {font-size:14px}
.ems-theme .modal-panel,.ems-theme .profile-modal-panel,.ems-theme .approval-recall-panel {border-radius:10px}
.ems-theme .modal-head h2 {font-size:18px}
.ems-theme .decision-panel {box-shadow:none}
.ems-theme textarea {border-radius:4px}
.ems-theme .audit,.ems-theme .pdf-split>div,.ems-theme .locked-profile-grid>div,.ems-theme .readiness-item,.ems-theme .setup-state,.ems-theme .toggle-row,.ems-theme .secret-status-row,.ems-theme .signature-mini-preview,.ems-theme .revision-banner,.ems-theme .signature-required-notice,.ems-theme .signature-decision-note {border-radius:4px}
.ems-theme .signature-required-notice button {border-radius:4px;background:var(--navy);font-weight:600}
.ems-theme .ui-toast {border-radius:4px;background:#fff;box-shadow:0 4px 14px #00000014;backdrop-filter:none}
.ems-theme .ui-toast-icon {border-radius:4px}
.ems-theme .login-card {border-radius:4px;padding:28px;box-shadow:none}
.ems-theme .login-mark {border-radius:4px;font-weight:700}
.ems-theme .login-card h2 {font-size:20px}
.ems-theme .login-btn {height:36px}

@media(max-width:1450px) {
  .ems-theme .payment-form {grid-template-columns:repeat(3,minmax(0,1fr))}
  .ems-theme .ems-metrics>.ems-metric {padding:16px;gap:10px}
}
@media(max-width:1100px) {
  .ems-theme .shell:has(#dashboard:not(.hidden)) {padding:24px}
  .ems-theme:has(#dashboard:not(.hidden)) .ems-sidebar-toggle {display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;border:0;border-radius:6px;background:#ffffff12;color:#fff;font-size:21px;cursor:pointer}
  .ems-theme .ems-nav {width:min(280px,85vw);transform:translateX(-100%);transition:transform .2s ease;visibility:hidden}
  .ems-theme .ems-nav.open {transform:translateX(0);visibility:visible}
  .ems-theme .ems-nav-backdrop.open {display:block;position:fixed;inset:60px 0 0;z-index:30;background:#0a192d61}
}
@media(max-width:760px) {
  .ems-theme .topbar-inner {padding:0 12px;gap:8px}
  .ems-theme .topbar-brand {gap:9px}
  .ems-theme .metro-logo {width:128px;height:28px}
  .ems-theme .topbar-title,.ems-theme .topbar-divider,.ems-theme .user-menu-copy {display:none}
  .ems-theme .shell,.ems-theme .shell:has(#dashboard:not(.hidden)) {padding:18px 12px 32px}
  .ems-theme .card {padding:16px}
  .ems-theme .profile-card {padding:0}
  .ems-theme .ems-panels,.ems-theme .payment-form {grid-template-columns:1fr}
  .ems-theme .payment-form>.btn {margin-top:0}
  .ems-theme .ems-metrics {grid-template-columns:1fr!important;gap:10px}
  .ems-theme .ems-metrics>.ems-metric {padding:16px}
  .ems-theme .ems-metrics strong {font-size:22px}
  .ems-theme .ems-task {flex-wrap:wrap}
  .ems-theme .ems-task>div {flex-basis:100%}
  .ems-theme .modal-panel {border-radius:0}
  .ems-theme .row {flex-wrap:wrap}
  .ems-theme .ems-category-share {display:none}
}
@media(prefers-reduced-motion:reduce) {
  .ems-theme .ems-nav,.ems-theme .ui-toast {transition:none}
}

/* Decorative inline SVG masks keep labels and loading indicators accessible. */
.ems-theme {
  --icon-dashboard:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E");
  --icon-file:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203H6a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V9zM14%203v6h6M8%2013h8M8%2017h5%22%2F%3E%3C%2Fsvg%3E");
  --icon-claim:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%203h12v18l-3-2-3%202-3-2-3%202zM9%207h6M9%2011h6M9%2015h3%22%2F%3E%3C%2Fsvg%3E");
  --icon-list:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%206h12M9%2012h12M9%2018h12M3%206h1M3%2012h1M3%2018h1%22%2F%3E%3C%2Fsvg%3E");
  --icon-check:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m5%2012%204%204L19%206%22%2F%3E%3C%2Fsvg%3E");
  --icon-checklist:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%206%202%202%203-3m-5%209%202%202%203-3M12%207h9M12%2015h9M12%2020h6%22%2F%3E%3C%2Fsvg%3E");
  --icon-history:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2011a9%209%200%201%201%202%207M3%204v7h7M12%207v5l3%202%22%2F%3E%3C%2Fsvg%3E");
  --icon-users:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%229%22%20cy%3D%227%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M3%2021v-3a6%206%200%200%201%2012%200v3M16%204a3%203%200%200%201%200%206M18%2014a5%205%200%200%201%203%204v3%22%2F%3E%3C%2Fsvg%3E");
  --icon-settings:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16M4%2017h16M8%204v6M16%2014v6%22%2F%3E%3C%2Fsvg%3E");
  --icon-chart:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%203v17h17M8%2016v-4M13%2016V8M18%2016V5%22%2F%3E%3C%2Fsvg%3E");
  --icon-eye:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2%2012s4-7%2010-7%2010%207%2010%207-4%207-10%207S2%2012%202%2012z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");
  --icon-download:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v12m-5-5%205%205%205-5M4%2016v5h16v-5%22%2F%3E%3C%2Fsvg%3E");
  --icon-recall:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%204%203%2010l6%206M3%2010h11a6%206%200%200%201%206%206v4%22%2F%3E%3C%2Fsvg%3E");
  --icon-upload:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V3m-5%205%205-5%205%205M4%2016v5h16v-5%22%2F%3E%3C%2Fsvg%3E");
  --icon-send:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%203%2018%209-18%209%204-9zM7%2012h14%22%2F%3E%3C%2Fsvg%3E");
  --icon-edit:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m15%204%205%205M4%2020l5-1L21%207l-5-5L4%2014z%22%2F%3E%3C%2Fsvg%3E");
  --icon-user:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%227%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E");
  --icon-logout:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%203H4v18h5M9%2012h12m-4-4%204%204-4%204%22%2F%3E%3C%2Fsvg%3E");
  --icon-wallet:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%207H4V5a2%202%200%200%201%202-2h12v4M4%207v12a2%202%200%200%200%202%202h14V7M20%2011h-6v6h6M17%2014h.01%22%2F%3E%3C%2Fsvg%3E");
}
.ems-theme [data-ems-view="home"],.ems-theme #roleTitle {--icon:var(--icon-dashboard)}
.ems-theme [data-ems-view="erf"],.ems-theme #requestFormTitle {--icon:var(--icon-file)}
.ems-theme [data-ems-view="ecf"] {--icon:var(--icon-claim)}
.ems-theme [data-ems-view="requests"],.ems-theme #queueTitle {--icon:var(--icon-list)}
.ems-theme [data-ems-view="tasks"],.ems-theme #emsTasks>h2 {--icon:var(--icon-checklist)}
.ems-theme [data-ems-view="history"],.ems-theme #decisionHistoryTitle {--icon:var(--icon-history)}
.ems-theme [data-ems-view="admin-users"],.ems-theme #adminDashboard .admin-head-card h2 {--icon:var(--icon-users)}
.ems-theme [data-ems-view="admin-app"],.ems-theme .app-section-head h2 {--icon:var(--icon-settings)}
.ems-theme #emsHome>.card:not(.profile-card)>h2,.ems-theme #emsHome .ems-panels h2 {--icon:var(--icon-chart)}
.ems-theme .btn[onclick^="openRequest"] {--icon:var(--icon-eye)}
.ems-theme .btn[onclick^="downloadFinalPdf"] {--icon:var(--icon-download)}
.ems-theme .btn[onclick^="openApprovalRecall"],.ems-theme .btn[onclick^="recallRequest"],.ems-theme #approvalRecallSubmit {--icon:var(--icon-recall)}
.ems-theme .file-pick-btn {--icon:var(--icon-upload)}
.ems-theme #submitExpenseBtn {--icon:var(--icon-send)}
.ems-theme .btn[onclick^="reviseRequest"] {--icon:var(--icon-edit)}
.ems-theme #userProfileMenuItem {--icon:var(--icon-user)}
.ems-theme .user-menu>button[onclick^="logout"] {--icon:var(--icon-logout)}
.ems-theme .ems-metrics small {--icon:var(--icon-wallet)}
.ems-theme [data-ems-view="home"]::before,
.ems-theme #roleTitle::before,
.ems-theme [data-ems-view="erf"]::before,
.ems-theme #requestFormTitle::before,
.ems-theme [data-ems-view="ecf"]::before,
.ems-theme [data-ems-view="requests"]::before,
.ems-theme #queueTitle::before,
.ems-theme [data-ems-view="tasks"]::before,
.ems-theme #emsTasks>h2::before,
.ems-theme [data-ems-view="history"]::before,
.ems-theme #decisionHistoryTitle::before,
.ems-theme [data-ems-view="admin-users"]::before,
.ems-theme #adminDashboard .admin-head-card h2::before,
.ems-theme [data-ems-view="admin-app"]::before,
.ems-theme .app-section-head h2::before,
.ems-theme #emsHome>.card:not(.profile-card)>h2::before,
.ems-theme #emsHome .ems-panels h2::before,
.ems-theme .btn[onclick^="openRequest"]::before,
.ems-theme .btn[onclick^="downloadFinalPdf"]::before,
.ems-theme .btn[onclick^="openApprovalRecall"]::before,
.ems-theme .btn[onclick^="recallRequest"]::before,
.ems-theme #approvalRecallSubmit::before,
.ems-theme .file-pick-btn::before,
.ems-theme #submitExpenseBtn::before,
.ems-theme .btn[onclick^="reviseRequest"]::before,
.ems-theme #userProfileMenuItem::before,
.ems-theme .user-menu>button[onclick^="logout"]::before,
.ems-theme .ems-metrics small::before {content:"";display:inline-block;width:16px;height:16px;flex:0 0 16px;vertical-align:-3px;background:currentColor;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat}
.ems-theme h2::before {margin-right:9px;color:var(--navy)}
.ems-theme .ems-metrics small::before,.ems-theme .user-menu>button::before {margin-right:7px}
.ems-theme .decision-action-loading::before {display:none}

.ems-theme .ems-panel-heading h2::before,.ems-theme .ems-overview>h2::before {content:"";display:inline-block;width:16px;height:16px;vertical-align:-3px;margin-right:8px;color:var(--navy);background:currentColor;mask:var(--icon-chart) center/contain no-repeat;-webkit-mask:var(--icon-chart) center/contain no-repeat}

.ems-theme #emsMetrics .ems-metric-copy small::before {display:none}

/* Resolve the session before choosing the login or authenticated workspace. */
.ems-theme .session-status {min-height:40vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--muted);text-align:center}

/* Keep modal actions outside the scrolling document body. Dynamic viewport
   units account for mobile browser chrome; safe areas protect edge controls. */
.ems-theme #detailModal .modal-panel {display:flex;flex-direction:column;overflow:hidden;padding:0;min-width:0;height:min(92vh,980px);height:min(92dvh,980px);max-height:100%}
.ems-theme #detailModal .modal-head {position:static;flex:none;min-width:0;gap:12px;flex-wrap:wrap;margin:0;padding:16px 20px}
.ems-theme #detailModal .modal-head>div:first-child {flex:1 1 220px;min-width:0}
.ems-theme #detailRef,.ems-theme #detailMeta {overflow-wrap:anywhere}
.ems-theme #detailModal .modal-head-actions {flex:none;flex-wrap:wrap;max-width:100%}
.ems-theme #detailModal .detail-content {flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:0 20px 20px}
.ems-theme #detailModal .pdf-split>div {min-width:0}
.ems-theme #detailModal .audit-row {grid-template-columns:14px minmax(0,1fr);overflow-wrap:anywhere}
.ems-theme #detailModal .decision-panel {position:static;flex:none;margin:0;padding:12px 20px;max-height:50%;overflow:auto}
.ems-theme #detailModal .decision-panel textarea {display:block;resize:none;height:64px}
.ems-theme #detailModal .decision-actions {flex-direction:row}
.ems-theme #detailModal .decision-actions .btn {width:auto;min-width:100px;min-height:44px;white-space:nowrap}
.ems-theme .status,.ems-theme .role-chip,.ems-theme .actions .btn {white-space:nowrap}
.ems-theme #detailItems .money,.ems-theme #paymentBody .money {white-space:nowrap;overflow-wrap:normal}
@media(max-width:900px){
  .ems-theme #detailModal {padding:0}
  .ems-theme #detailModal .modal-panel {width:100%;height:100vh;height:100dvh;border-radius:0}
  .ems-theme #detailModal .modal-head {padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
  .ems-theme #detailModal .detail-content {padding:0 max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left))}
  .ems-theme #detailModal .decision-panel {padding:10px max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
  .ems-theme #detailModal .decision-actions .btn {flex:1}
  .ems-theme #detailModal .decision-panel label {font-size:12px;margin-bottom:4px}
  .ems-theme #detailModal .decision-panel textarea {height:48px;font-size:16px}
  .ems-theme #detailModal .decision-actions {margin-top:8px}
  .ems-theme #detailModal .detail-section table {min-width:720px;table-layout:fixed}
  .ems-theme #detailModal .detail-section th:nth-child(1) {width:40px}
  .ems-theme #detailModal .detail-section th:nth-child(2) {width:140px}
  .ems-theme #detailModal .detail-section th:nth-child(3) {width:220px}
  .ems-theme #detailModal .detail-section th:nth-child(4) {width:110px}
  .ems-theme #detailModal .detail-section th:nth-child(5) {width:160px}
  .ems-theme #detailModal .detail-section th:nth-child(6) {width:160px}
  .ems-theme #table,.ems-theme #decisionHistoryTable,.ems-theme #requestForm .table-wrap table {min-width:780px}
  .ems-theme .ems-task strong {white-space:normal;overflow-wrap:anywhere}
}
