*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:#f5f7fb;color:#172033}aside{position:fixed;inset:0 auto 0 0;width:235px;background:#111827;color:white;padding:26px 18px}.brand{font-size:22px;font-weight:900;letter-spacing:.2px}.brand span{color:#76a7ff}.brand small{font-size:10px;margin-left:5px;color:#94a3b8}.brand.dark{color:#111827;margin-bottom:20px}.workspace{font-size:12px;color:#94a3b8;padding:12px 10px 20px;line-height:1.4}aside>a{display:block;color:#cbd5e1;text-decoration:none;padding:12px 14px;border-radius:9px;margin:4px 0}aside>a:hover{background:#1f2937;color:#fff}.foot{position:absolute;bottom:20px;font-size:11px;color:#94a3b8;padding:10px}.foot a{color:#93c5fd}main{margin-left:235px;padding:34px;max-width:1550px}.login-main{margin:0;min-height:100vh;display:flex;align-items:center;justify-content:center}.login-card{width:420px;background:white;border:1px solid #e5e7eb;border-radius:18px;padding:30px;box-shadow:0 18px 45px rgba(15,23,42,.08)}h1{margin:0 0 6px;font-size:28px}h2{font-size:17px;margin:0 0 14px}h3{font-size:14px;margin:22px 0 10px}p,.muted{color:#64748b}.page-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.btn,button{display:inline-block;background:#2563eb;color:#fff;border:0;border-radius:9px;padding:10px 15px;font-weight:800;text-decoration:none;cursor:pointer}.secondary{background:#e2e8f0!important;color:#172033!important}.danger{background:#111827!important}.smallbtn{padding:8px 11px;font-size:12px}.mini{padding:5px 8px}.flash{background:#ecfdf5;color:#065f46;padding:12px 14px;border-radius:10px;margin-bottom:18px;overflow-wrap:anywhere}.panel{background:white;border:1px solid #e5e7eb;border-radius:15px;padding:20px;box-shadow:0 2px 10px rgba(15,23,42,.03);margin-bottom:18px}.grid{display:grid;grid-template-columns:370px 1fr;gap:20px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px}.client-grid{display:grid;grid-template-columns:repeat(3,minmax(230px,1fr));gap:18px}.client-card{background:white;border:1px solid #e5e7eb;border-radius:16px;padding:22px;text-decoration:none;color:#172033;transition:.15s}.client-card:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(15,23,42,.07)}.client-title{font-weight:800;font-size:17px}.big{font-size:34px;font-weight:900;margin-top:20px}.client-card small{color:#64748b}.client-bottom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #eef2f7;margin-top:20px;padding-top:14px;font-size:12px}.badge{padding:6px 9px;border-radius:999px;background:#e2e8f0;font-size:10px;font-weight:900;text-transform:uppercase}.badge.draft{background:#fef3c7;color:#92400e}.badge.awaiting_approval{background:#dbeafe;color:#1d4ed8}.badge.approved{background:#dcfce7;color:#166534}.badge.changes_requested{background:#fee2e2;color:#991b1b}.badge.finalised{background:#111827;color:white}label{display:block;font-size:12px;font-weight:800;color:#475569;margin:12px 0}input,select,textarea{width:100%;padding:10px;border:1px solid #dbe1ea;border-radius:8px;margin-top:6px;background:white}.check{display:flex;align-items:center;gap:8px;font-weight:700}.check input{width:auto;margin:0}.checks{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.grid-form{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.inline-form{display:grid;grid-template-columns:1fr 1fr 1.4fr auto;gap:10px;align-items:end}.wide{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;color:#64748b;font-size:10px;text-transform:uppercase;padding:10px;border-bottom:1px solid #e5e7eb}td{padding:11px 10px;border-bottom:1px solid #eef2f7;white-space:nowrap}td small{display:block;color:#94a3b8;margin-top:3px}.link-btn,a{color:#2563eb}.statusbar{display:flex;justify-content:space-between;align-items:center;background:white;border:1px solid #e5e7eb;border-radius:14px;padding:16px 18px;margin-bottom:14px}.statusbar small{display:block;color:#64748b;margin-top:5px}.actions-inline{display:flex;gap:8px;align-items:center}.actions-inline form{margin:0}.filters{display:flex;gap:10px;background:white;border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin-bottom:15px}.filters input{margin:0;width:240px}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.metric{background:white;border:1px solid #e5e7eb;border-radius:14px;padding:18px}.metric span{font-size:10px;color:#64748b;font-weight:900;text-transform:uppercase}.metric b{display:block;font-size:22px;margin-top:8px}.money-input{width:100px;margin:0;padding:7px}.row{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid #eef2f7}.button-wide{display:block;text-align:center;margin-top:17px;padding:12px;background:#2563eb;color:white;text-decoration:none;border-radius:9px;font-weight:800}.notice{padding:14px;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;color:#9a3412;font-size:12px;line-height:1.5}.note{font-size:11px}.lock-panel{border-left:5px solid #111827}.audit{padding:12px 0;border-bottom:1px solid #eef2f7}.audit b{display:block}.audit span{float:right;color:#94a3b8;font-size:10px;margin-top:-16px}.audit small{display:block;color:#64748b;margin-top:4px}.demo{background:#f8fafc;border-radius:10px;padding:12px;margin-top:18px;font-size:12px;line-height:1.7}.public-wrap{max-width:1100px;margin:auto}.public-card{background:white;border:1px solid #e5e7eb;border-radius:18px;padding:28px}.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:20px 0}.summary span{background:#f8fafc;border-radius:10px;padding:13px;color:#64748b;font-size:11px}.summary b{display:block;color:#172033;font-size:18px;margin-top:5px}.actions{display:flex;justify-content:flex-end;gap:10px}.narrow{max-width:1100px}@media(max-width:950px){aside{position:relative;width:100%}.foot{display:none}main{margin:0;padding:20px}.grid,.two-col,.client-grid,.metric-grid,.grid-form,.inline-form{grid-template-columns:1fr}.actions-inline,.statusbar{align-items:flex-start;flex-direction:column}.checks{grid-template-columns:1fr}}

/* V6 payroll workbench */
.payroll-grid-panel{padding:14px}
.payroll-grid-hint{font-size:12px;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;margin-bottom:12px}
.payroll-table th.num,.payroll-table td.num{text-align:right}
.payroll-table td.num{font-variant-numeric:tabular-nums}
.payroll-table .quick-col{background:#f8fbff}
.payroll-table .quick-cell{background:#fbfdff}
.payroll-table .recurring-col{background:#f8fafc}
.payroll-table .recurring-cell{background:#fcfcfd}
.compact-input{width:94px;text-align:right;font-variant-numeric:tabular-nums}
.net-header,.net-pay-cell{background:#eef0f3!important}
.net-pay-cell{font-weight:900;color:#111827}
.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:112px}
.input-link{font-size:12px;white-space:nowrap}
.payslip-icon{width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;background:#eef4ff;border:1px solid #cfe0ff;color:#2563eb;text-decoration:none;transition:.15s}
.payslip-icon:hover{background:#2563eb;color:#fff;transform:translateY(-1px);box-shadow:0 5px 12px rgba(37,99,235,.18)}
.payslip-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.quick-save-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:14px}
.quick-save-bar span{font-size:11px;color:#64748b}
.employee-cell{min-width:170px}
.actions-head{text-align:right}

/* V7 client workspace + dynamic payroll grid */
.client-head-actions{display:flex;align-items:center;gap:10px}
.view-toggle{display:flex;background:#e8eef9;border-radius:11px;padding:3px}
.view-toggle button{border:0;background:transparent;color:#2563eb;padding:7px 10px;border-radius:8px;cursor:pointer}
.view-toggle button.active{background:#2563eb;color:white;box-shadow:0 2px 8px rgba(37,99,235,.2)}
.client-search-row,.payroll-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0}
.search-box{display:flex;align-items:center;gap:8px;background:white;border:1px solid #dbe3ef;border-radius:12px;padding:0 12px;min-width:320px;box-shadow:0 2px 8px rgba(15,23,42,.03)}
.search-box span{font-size:20px;color:#64748b}
.search-box input{border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;width:100%;padding:11px 0!important}
.client-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px}
.client-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:22px;text-decoration:none;color:inherit;box-shadow:0 8px 22px rgba(15,23,42,.04);transition:.15s}
.client-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.08);border-color:#cbd5e1}
.client-card-number{font-size:32px;font-weight:900;margin-top:22px}
.client-card small{color:#64748b}
.client-card-footer{border-top:1px solid #edf1f6;margin-top:20px;padding-top:15px;display:flex;justify-content:space-between}
.client-list-panel{padding:12px 18px}
.client-list-panel table{width:100%}
.payroll-toolbar{position:relative}
.add-column-wrap{position:relative}
.add-column-btn{white-space:nowrap}
.column-menu,.mini-column-menu{display:none;position:absolute;background:#fff;border:1px solid #dbe3ef;border-radius:12px;box-shadow:0 14px 35px rgba(15,23,42,.15);z-index:50}
.column-menu.show,.mini-column-menu.show{display:block}
.column-menu{right:0;top:46px;width:290px;padding:8px}
.column-menu-title{font-weight:800;padding:9px 10px;border-bottom:1px solid #edf1f6;margin-bottom:5px}
.column-option{width:100%;display:flex;justify-content:space-between;align-items:center;background:white!important;color:#111827!important;border:0!important;padding:10px!important;border-radius:8px;text-align:left;cursor:pointer}
.column-option:hover{background:#f1f5f9!important}
.column-option small{color:#64748b;font-weight:400}
.column-create-link{display:block;border-top:1px solid #edf1f6;margin-top:5px;padding:10px;color:#2563eb}
.dynamic-head{position:relative}
.dynamic-head-inner{display:flex;align-items:center;justify-content:flex-end;gap:4px}
.column-more{background:transparent!important;color:#64748b!important;border:0!important;padding:2px 5px!important;font-size:18px}
.mini-column-menu{right:4px;top:34px;width:210px;padding:6px}
.mini-column-menu button{width:100%;background:white!important;color:#b42318!important;border:0!important;text-align:left;padding:9px!important}
.sidebar-client{margin:14px 10px 18px;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.035)}
.sidebar-client label{display:block;font-size:9px;letter-spacing:.12em;color:#94a3b8;margin-bottom:6px}
.sidebar-client select{width:100%;background:#172033;color:white;border:1px solid #334155;border-radius:8px;padding:9px}
.client-subnav{display:flex;flex-direction:column;margin-top:10px}
.client-subnav a{padding:7px 4px!important;font-size:12px!important;color:#cbd5e1!important}
.empty-search{text-align:center;color:#64748b;padding:25px}

/* V7.3 verified navigation, client lists, search and modals */
.sidebar-section-label{
  font-size:9px;letter-spacing:.12em;color:#64748b;font-weight:800;
  margin:18px 22px 4px
}
.sidebar-client{
  margin:15px 14px 12px!important;
  padding:12px!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.045)!important
}
.sidebar-client label{color:#94a3b8!important;margin:0 0 7px!important}
.sidebar-client select{
  width:100%!important;margin:0!important;padding:9px 28px 9px 9px!important;
  background:#172033!important;color:#fff!important;border:1px solid #334155!important
}
.client-subnav{margin-top:9px!important;border-top:1px solid rgba(148,163,184,.14);padding-top:6px}
.client-subnav a{
  display:block!important;padding:7px 5px!important;margin:0!important;
  color:#dbeafe!important;font-size:12px!important
}
.client-subnav a:hover{background:rgba(37,99,235,.14)!important}

.client-head-actions{display:flex!important;align-items:center!important;gap:10px!important}
.view-toggle{
  display:inline-flex!important;align-items:center!important;
  background:#e6efff!important;border:1px solid #c9dcff!important;
  border-radius:11px!important;padding:3px!important
}
.view-toggle button{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-width:37px!important;height:34px!important;padding:0 9px!important;
  border:0!important;background:transparent!important;color:#2563eb!important;
  border-radius:8px!important;font-size:17px!important;cursor:pointer!important
}
.view-toggle button.active{
  background:#2563eb!important;color:#fff!important;
  box-shadow:0 3px 9px rgba(37,99,235,.24)!important
}
.client-search-row{display:flex!important;margin:14px 0 18px!important}
.client-search{max-width:520px!important;width:100%!important}

.switch-modal-backdrop{
  position:fixed;inset:0;background:rgba(15,23,42,.48);
  z-index:9999;align-items:center;justify-content:center;padding:20px
}
.switch-modal{
  width:min(540px,100%);background:white;border-radius:18px;
  box-shadow:0 25px 70px rgba(15,23,42,.25);padding:24px
}
.switch-modal h3{margin:0 0 7px;font-size:20px}
.switch-modal p{margin:0 0 20px;color:#64748b;line-height:1.5}
.switch-modal-actions,.modal-form-actions{
  display:flex;justify-content:flex-end;gap:9px;margin-top:18px
}
.add-client-modal{width:min(700px,100%)}
.modal-title-row{display:flex;justify-content:space-between;align-items:flex-start}
.modal-close{
  background:transparent!important;color:#64748b!important;
  border:0!important;font-size:28px!important;padding:0 5px!important
}
.modal-form-actions button{width:auto}
.client-card-number{min-height:42px}
.small-search{min-width:260px!important}
.payitems-title{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:10px}
.client-workspace-tabs{
  display:flex;gap:6px;margin-bottom:18px;background:#eaf0fa;
  border-radius:12px;padding:4px;width:max-content
}
.client-workspace-tabs a{
  text-decoration:none;padding:9px 13px;border-radius:9px;color:#475569;font-weight:700
}
.client-workspace-tabs a.active,.client-workspace-tabs a:hover{
  background:white;color:#2563eb;box-shadow:0 2px 8px rgba(15,23,42,.06)
}

/* V8 consolidated UX */
.persistent-client-nav{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 0 18px;padding:5px 0 12px;border-bottom:1px solid #dfe6ef}.persistent-client-nav small{display:block;font-size:9px;color:#64748b;letter-spacing:.12em;font-weight:800}.persistent-client-nav strong{font-size:20px}.client-tabs{display:flex;gap:5px;background:#eaf0fa;padding:4px;border-radius:12px}.client-tabs a{padding:9px 12px;text-decoration:none;color:#475569;font-weight:700;border-radius:9px}.client-tabs a.active,.client-tabs a:hover{background:#fff;color:#2563eb;box-shadow:0 2px 8px rgba(15,23,42,.06)}
.dashboard-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 18px}.stat-card{background:#fff;border:1px solid #e2e8f0;border-radius:15px;padding:18px}.stat-card small{display:block;color:#64748b;font-weight:800;font-size:10px}.stat-card strong{display:block;font-size:25px;margin-top:8px}.status-pill{display:inline-flex;align-items:center;width:max-content;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.03em}.status-pill.draft{background:#fff0c2;color:#9a5b00}.status-pill.awaiting_approval,.status-pill.sent{background:#dcecff;color:#1d4ed8}.status-pill.approved{background:#dcfce7;color:#15803d}.status-pill.finalised{background:#bbf7d0;color:#166534}.status-pill.changes_requested{background:#fee2e2;color:#b91c1c}
.client-card-footer{gap:8px;align-items:center}.employee-list-search{margin-bottom:14px}.employee-master-form .panel{margin-bottom:16px}.master-save-bar{position:sticky;bottom:15px;display:flex;justify-content:flex-end;margin-top:18px;z-index:20}.master-save{background:#d98b95!important;color:#fff!important;border-color:#d98b95!important;font-size:15px!important;padding:13px 22px!important;box-shadow:0 8px 22px rgba(217,139,149,.28)!important}.master-save:hover{background:#c87582!important}.checks-row{display:flex;gap:15px;flex-wrap:wrap}.trash-btn{background:#fff1f2!important;color:#be123c!important;border:1px solid #fecdd3!important;padding:5px 7px!important;border-radius:8px!important}.opening-recurring-row{display:grid;grid-template-columns:minmax(150px,1fr) 130px 90px;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #eef2f7}.delete-column-option{color:#b42318!important}.mini-column-menu form+form{border-top:1px solid #edf1f6}.mini-column-menu .delete-column-option{font-weight:800}.sidebar-section-label{margin-top:18px}
\n/* V9 corrections */\n.standalone-login{margin-left:0!important;min-height:100vh!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:30px!important}\n.login-shell{width:100%;display:flex;justify-content:center;align-items:center;min-height:calc(100vh - 60px)}\n.v9-login-card{width:min(430px,100%);padding:34px!important;border-radius:20px!important}\n.login-brand{font-size:27px;font-weight:900;letter-spacing:.01em;margin-bottom:24px}.login-brand span{color:#6d8fff}.login-brand small{font-size:10px;color:#94a3b8;margin-left:6px}\n.login-button{width:100%;margin-top:4px}.readonly-field{background:#f8fafc!important;color:#64748b}.compact-two{gap:12px!important}.compact-two>label{min-width:0}\n
/* V10 usability + consistency */
.back-link{display:inline-flex;align-items:center;gap:5px;color:#2563eb;text-decoration:none;font-weight:700;margin-bottom:8px}.back-link:hover{text-decoration:underline}
.employee-head-actions{display:flex;gap:8px;align-items:center}.employment-status-box{margin-top:12px;padding:12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc}
.excel-icon,.pdf-icon{display:inline-flex;align-items:center;justify-content:center;font-weight:900;border-radius:5px;margin-right:5px}.excel-icon{width:21px;height:21px;background:#178a46;color:white;font-size:13px}.pdf-icon{height:21px;padding:0 5px;background:#dc2626;color:#fff;font-size:9px;letter-spacing:.02em}
.input-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;text-decoration:none;font-size:15px;color:#2563eb}.input-icon:hover{background:#dbeafe}.row-actions{white-space:nowrap}.quick-save-top{background:#2563eb!important;color:white!important;white-space:nowrap}.quick-save-note{padding:10px 4px;color:#64748b;font-size:12px}
.payroll-table-wrap{max-height:65vh;overflow:auto;position:relative}.payroll-table-wrap table{min-width:max-content}.payroll-table-wrap thead th{position:sticky;top:0;z-index:12;background:#fff}.payroll-table-wrap th:first-child,.payroll-table-wrap td:first-child{position:sticky;left:0;z-index:11;background:#fff}.payroll-table-wrap thead th:first-child{z-index:13}
.dynamic-head,.dynamic-head-inner{min-width:112px}.dynamic-head-inner{justify-content:center}.payroll-table-wrap input[type=number]{min-width:92px;width:92px}

/* V11 — clean warnings, monthly not-paid state, friendly employment status */
.not-paid-row td{background:#fff1f2!important;color:#7f1d1d}
.not-paid-row .net-pay-cell{background:#fee2e2!important}
.not-paid-pill{display:inline-flex;margin-top:6px;padding:3px 7px;border-radius:999px;background:#fecdd3;color:#9f1239;font-size:9px;font-weight:900;letter-spacing:.06em}
.not-paid-btn,.restore-pay-btn{width:32px;height:32px;border-radius:9px;border:1px solid transparent;padding:0!important;display:inline-flex;align-items:center;justify-content:center;font-size:20px;font-weight:500;cursor:pointer}
.not-paid-btn{background:#fff1f2!important;color:#dc2626!important;border-color:#fecaca!important}
.not-paid-btn:hover{background:#dc2626!important;color:white!important}
.restore-pay-btn{background:#ecfdf5!important;color:#059669!important;border-color:#a7f3d0!important}
.restore-pay-btn:hover{background:#059669!important;color:white!important}
.inline-action-form{display:inline-flex;margin:0}
.employee-head-actions{display:flex;gap:9px;align-items:center}
.duplicate-warning{display:flex;gap:14px;align-items:flex-start;background:#fff8e8;border:1px solid #f6d88b;border-radius:14px;padding:16px 18px;margin-bottom:18px}
.duplicate-warning-icon{min-width:32px;width:32px;height:32px;border-radius:50%;background:#f59e0b;color:white;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:18px}
.duplicate-warning-body p{margin:5px 0;color:#6b4f18}
.duplicate-block-note{font-size:12px!important}
.duplicate-warning-actions{display:flex;gap:8px;margin-top:10px}
.rose-outline{background:#fff!important;color:#be6574!important;border:1px solid #e8a5b0!important}
.duplicate-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}
.duplicate-modal{background:white;width:min(520px,100%);border-radius:18px;padding:25px;box-shadow:0 25px 70px rgba(15,23,42,.24)}
.employment-status-card{grid-column:1/-1;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:16px}
.employment-status-top{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}
.employment-status-top h3{margin:0 0 4px}.employment-status-top p{margin:0;color:#64748b;font-size:12px}
.employment-pill,.employee-status-pill{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800;white-space:nowrap}
.employment-pill.active,.employee-status-pill.active{background:#dcfce7;color:#166534}
.employment-pill.scheduled,.employee-status-pill.scheduled{background:#fef3c7;color:#92400e}
.employment-pill.inactive,.employee-status-pill.inactive{background:#e5e7eb;color:#4b5563}
.friendly-toggle{display:flex!important;align-items:center!important;gap:10px!important;margin:15px 0!important}
.friendly-toggle input{position:absolute;opacity:0;pointer-events:none}
.toggle-track{width:38px;height:22px;border-radius:999px;background:#cbd5e1;position:relative;flex:none;transition:.15s}
.toggle-track:after{content:"";position:absolute;width:16px;height:16px;border-radius:50%;background:white;top:3px;left:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);transition:.15s}
.friendly-toggle input:checked + .toggle-track{background:#2563eb}
.friendly-toggle input:checked + .toggle-track:after{left:19px}
.friendly-toggle small{display:block;color:#64748b;font-weight:400}
.status-help{margin:6px 0 0;color:#64748b;font-size:11px}
/* V12 */
.back-link{width:34px!important;height:34px!important;border-radius:10px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;background:#eef4ff!important;border:1px solid #d5e3ff!important;color:#2563eb!important;text-decoration:none!important;font-size:0!important;padding:0!important}.back-link:before{content:'←';font-size:18px;font-weight:800}.back-link:hover{background:#dfeaff!important}
.form-warning{display:flex;flex-direction:column;gap:4px;background:#fff1f2;border:1px solid #fecdd3;color:#9f1239;padding:14px 16px;border-radius:13px;margin-bottom:16px}.form-warning span{font-size:12px}.field-error{border-color:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.08)!important}.error-text{color:#dc2626!important;margin-top:4px!important}.current-effective{display:flex;justify-content:space-between;align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;margin-bottom:12px}.current-effective span{color:#64748b;font-size:11px}.current-effective b{font-size:12px}
.app-confirm-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(3px);z-index:12000;align-items:center;justify-content:center;padding:20px}.app-confirm-modal{width:min(440px,100%);background:white;border-radius:18px;padding:25px;text-align:center;box-shadow:0 28px 80px rgba(15,23,42,.3)}.confirm-icon{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;background:#fff1f2;color:#dc2626;font-size:22px;font-weight:900}.app-confirm-modal h3{margin:0 0 8px}.app-confirm-modal p{color:#64748b;line-height:1.5;margin:0}.app-confirm-actions{display:flex;justify-content:center;gap:9px;margin-top:20px}.confirm-primary{background:#d96f80!important;color:white!important}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}.legacy-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rules-section-title{margin:26px 0 12px}.rules-section-title h2{margin:0}.rules-section-title p{margin:4px 0;color:#64748b}.rate-band-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rate-band-group,.stat-component-card{border:1px solid #e2e8f0;border-radius:12px;padding:12px}.rate-band-group h3{margin:0 0 8px}.rate-band-group table,.stat-component-card table{width:100%;font-size:11px}.mini-band-form{display:grid;grid-template-columns:1fr 1fr 80px 38px;gap:5px;margin-top:8px}.mini-band-form input,.mini-band-form button{margin:0!important}.band-form{display:grid;grid-template-columns:1.2fr 1fr 1fr 90px auto;gap:6px;margin-top:10px}.band-form input,.band-form button{margin:0!important}.stat-component-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stat-card-head{display:flex;justify-content:space-between;gap:10px}.stat-card-head h3{margin:0}.basis-scroll{overflow:auto}.basis-scroll table{min-width:980px}
.calc-table{width:100%;border-collapse:collapse}.calc-table th,.calc-table td{padding:10px 8px;border-bottom:1px solid #e8edf4;text-align:right}.calc-table th:first-child,.calc-table td:first-child{text-align:left}.calc-table small{display:block;color:#94a3b8}.mini-link{border:0!important;background:transparent!important;color:#2563eb!important;font-size:10px!important;padding:0 0 0 6px!important}.paye-detail{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px;margin:10px 0}.paye-summary{display:flex;gap:16px;flex-wrap:wrap;font-size:11px;color:#475569;margin-bottom:10px}.paye-detail table{width:100%;font-size:11px}.paye-detail th,.paye-detail td{padding:7px;border-bottom:1px solid #e2e8f0}.metric b{font-variant-numeric:tabular-nums}
@media(max-width:1100px){.stat-grid,.rate-band-groups,.stat-component-grid{grid-template-columns:1fr}.band-form{grid-template-columns:1fr 1fr}.mini-band-form{grid-template-columns:1fr 1fr}}
/* V12 legacy statutory enable/disable switches */
.feature-toggle-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:9px;margin:14px 0 16px}
.feature-switch{display:flex!important;align-items:center!important;gap:9px!important;margin:0!important;padding:10px 12px;border:1px solid #dbe3ef;border-radius:11px;background:#f8fafc;font-weight:700}
.feature-switch input{width:16px!important;height:16px!important;margin:0!important}

/* V13 statutory workflow */
.rules-list tr{cursor:pointer}.rules-list tr:hover td{background:#f8fbff}.rule-arrow{text-align:right;font-size:22px;color:#2563eb}
.rule-pill{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.rule-pill.draft{background:#fef3c7;color:#92400e}.rule-pill.current{background:#dcfce7;color:#166534}.rule-pill.past{background:#e5e7eb;color:#475569}.rule-pill.future{background:#dbeafe;color:#1d4ed8}
.rules-note p{margin:5px 0 0;color:#64748b}.head-back{display:flex;align-items:flex-start;gap:11px}.icon-back{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;background:#f8fbff;border:1px solid #dbe3ef;border-radius:10px;text-decoration:none;color:#2563eb}
.locked-card,.error-card{padding:13px 15px;border-radius:12px;margin-bottom:14px}.locked-card{background:#f1f5f9;color:#475569}.error-card{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239;display:flex;flex-direction:column}
.meta-card small{display:block;color:#64748b;margin-top:5px}.stat-section{margin-bottom:14px}.stat-section>p{color:#64748b}.edit-head{font-size:10px;color:#64748b;font-weight:800}.edit-row,.edit-head{display:grid;gap:8px;align-items:center;margin:7px 0}.two-relief{grid-template-columns:1fr 1fr 42px}.paye-row{grid-template-columns:1.2fr 1fr 1fr .7fr 42px}.add-inline-btn{margin-top:8px;background:#eef4ff!important;color:#2563eb!important;border:1px solid #d4e2ff!important}
.method-card>label{max-width:500px}.method-fields>div{display:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:10px 0}.method-fields .method-fixed{grid-template-columns:1fr}.method-progressive{display:none}.prog-row{display:grid;grid-template-columns:1fr 1fr .75fr 42px;gap:8px;margin:7px 0;align-items:center}
.custom-stat{border:1px solid #dce5f1;border-radius:14px;padding:15px;margin:12px 0;background:#fbfdff}.custom-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.remove-check{font-size:11px;color:#9f1239!important}
.basis-scroll{overflow:auto}.basis-scroll table{min-width:1200px}.stat-test{border:1px dashed #9bb8ee}.test-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.test-summary{display:flex;gap:10px;margin:10px 0}.test-summary span{background:#f8fafc;padding:12px 16px;border-radius:10px}.test-summary b{display:block;margin-top:3px}
.master-actions{position:sticky;bottom:12px;z-index:15;display:flex;justify-content:flex-end;gap:9px;background:rgba(244,247,252,.92);backdrop-filter:blur(8px);border:1px solid #dbe3ef;border-radius:14px;padding:12px}.finalise-btn{background:#111827!important}
@media(max-width:850px){.two-relief,.paye-row,.three-col,.test-grid,.method-fields>div,.prog-row{grid-template-columns:1fr}}

/* V14 statutory refinements */
.statutory-calc-card{margin-bottom:14px}.statutory-calc-card>p{color:#64748b;margin-top:-4px}
.method-control,.rounding-control{display:block;max-width:520px;margin:14px 0}
.method-panel label small,.mini-field small,.rounding-note{display:block;color:#8593aa;font-size:10px;font-weight:400;margin-top:5px;line-height:1.35}
.rounding-note{min-height:14px}
.mini-field{display:block}.mini-field input{width:100%}
.percent-field{position:relative}.percent-field input{padding-right:27px}.percent-field span{position:absolute;right:9px;top:50%;transform:translateY(-50%);color:#64748b}
.custom-stat-card{border-left:3px solid #d9e7ff}.custom-identity{margin:10px 0}.remove-custom{float:right;color:#b42339!important;font-size:11px}
.add-custom-tax-btn{margin:0 0 14px 4px}
.current-bases-note{background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:10px 12px;color:#1e40af;font-size:11px;margin:10px 0}
.basis-save-btn{margin-top:14px}
.calculation-bases-card .basis-scroll{max-height:620px}
.head-row{font-size:11px;color:#526784;text-transform:uppercase;letter-spacing:.03em}

/* V17 test-payroll workbench + method education */
.method-help{display:block;color:#7b8aa3;font-size:10px;line-height:1.4;margin-top:6px;font-weight:400}.prog-help{color:#64748b;font-size:11px;margin:0 0 7px}.prog-head{font-size:10px;color:#526784;text-transform:uppercase;letter-spacing:.03em;padding:0 2px}
.payroll-test-workbench{padding:18px}.test-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.test-head h2{margin:0 0 4px}.test-head p{margin:0;color:#64748b}.test-profile-strip{display:grid;grid-template-columns:repeat(3,minmax(150px,240px));gap:9px;margin:14px 0}.test-payroll-scroll{overflow:auto;border:1px solid #e0e7f1;border-radius:13px;background:white}.test-payroll-table{border-collapse:collapse;min-width:max-content;width:100%;font-size:12px}.test-payroll-table th{font-size:9px;color:#526784;letter-spacing:.03em;padding:12px 10px;border-bottom:1px solid #dfe6f0;white-space:nowrap;background:#fbfdff}.test-payroll-table td{padding:10px;border-bottom:0;text-align:right;white-space:nowrap}.test-payroll-table .employee-col{text-align:left;min-width:150px}.test-payroll-table .employee-col small{display:block;color:#8a98ad;margin-top:3px}.test-payroll-table .test-money{width:105px;min-width:105px;text-align:right;padding:8px 9px}.test-payroll-table .result-cell{min-width:92px}.test-payroll-table .test-net,.test-payroll-table .net-head{background:#edf0f4}.test-inline-note{color:#8190a7;font-size:10px;margin:8px 2px 0}.test-breakdown-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.test-breakdown-head h2{margin:0 0 4px}.test-breakdown-head p{margin:0;color:#64748b}.test-kpis{display:flex;gap:8px}.test-kpis span{background:#f4f7fb;border:1px solid #e2e8f0;border-radius:10px;padding:8px 12px;font-size:9px;color:#65758d}.test-kpis b{display:block;color:#111827;font-size:14px;margin-top:3px}.paye-breakdown-test summary{cursor:pointer;font-weight:800;color:#2563eb;padding:10px 0}.draft-state-note{display:block;color:#9a6700;font-size:9px;margin-top:3px;text-transform:uppercase;font-weight:800}
@media(max-width:900px){.test-profile-strip{grid-template-columns:1fr}.test-head,.test-breakdown-head{flex-direction:column}.test-kpis{width:100%}}
/* V19 statutory editor polish */
.paye-row{align-items:start}.paye-row>input,.paye-row>.percent-field,.paye-row>.trash-btn{margin-top:0}.paye-row .mini-field{margin:0}.paye-row .mini-field small{min-height:14px}
.single-method-field{grid-template-columns:minmax(0,520px)!important}.method-capped,.custom-method-capped{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
.prog-head{margin-bottom:2px;color:#64748b;font-size:11px}.prog-help{color:#64748b;font-size:12px;margin:4px 0 8px}

/* V20 shared statutory method renderer */
.method-wrap > .method-panel{display:none}
.method-progressive,.custom-method-progressive{grid-template-columns:1fr!important}
.prog-help{font-size:11px;color:#6f809b;margin-bottom:8px}
.prog-head{font-size:10px;color:#526784;text-transform:uppercase;font-weight:800}
.percent-input{position:relative;display:block}
.percent-input input{width:100%;padding-right:28px}
.percent-input span{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#64748b;font-weight:700;pointer-events:none}
.paye-row{align-items:start!important}
.paye-row .mini-field{min-height:63px}
.paye-row .trash-btn{margin-top:8px}
.method-help{display:block;color:#70819d;font-size:10px;line-height:1.45;margin-top:6px;max-width:720px}

/* V22 Employee Master */
.employee-master-v22{display:flex;flex-direction:column;gap:14px;padding-bottom:90px}.employee-section{padding:22px 24px}.employee-section-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:18px}.employee-section-head>span{display:flex;align-items:center;justify-content:center;min-width:30px;height:30px;border-radius:50%;background:#eef4ff;color:#2563eb;font-weight:900}.employee-section-head h2{margin:2px 0 3px}.employee-section-head p{margin:0;color:#6b7c99}.three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.four-col{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.optional{font-weight:400;color:#8a98ad;font-size:10px}.employee-section textarea{resize:vertical}.employee-summary-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}.employee-summary-cards>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:13px}.employee-summary-cards small{display:block;color:#6b7c99}.employee-summary-cards b{font-size:18px}.employee-history-grid>div{border:1px solid #e4eaf2;border-radius:13px;padding:15px;background:#fcfdff}.compact-history{margin:8px 0 14px}.compact-history th,.compact-history td{font-size:11px;padding:8px}.current-tax-strip{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.current-tax-strip span{background:#f1f5f9;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:700}.checkbox-card{border:1px solid #dbe3ef;border-radius:10px;padding:12px!important;min-height:45px;align-items:center}.leave-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin-bottom:16px}.leave-summary-card{border:1px solid #dce5f1;border-radius:13px;padding:13px;background:#fbfdff;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.leave-summary-card>b{grid-column:1/3}.leave-summary-card>span{justify-self:end;font-size:10px;color:#64748b}.leave-summary-card div small{display:block;color:#8290a8}.leave-summary-card div strong{font-size:16px}.leave-actions{align-items:start;margin:14px 0}.sub-card{border:1px solid #dce5f1;border-radius:13px;padding:14px;background:#fcfdff}.sub-card h3{margin-top:0}.leave-admin{margin-top:14px}@media(max-width:1000px){.three-col,.four-col,.employee-summary-cards{grid-template-columns:1fr 1fr}}@media(max-width:700px){.three-col,.four-col,.employee-summary-cards{grid-template-columns:1fr}}
/* V23 employee master refinements */
.persistent-client-nav{position:sticky;top:0;z-index:900;background:rgba(244,247,252,.97);backdrop-filter:blur(10px);padding-top:10px;box-shadow:0 5px 12px rgba(15,23,42,.035)}
.required-star{color:#dc2626;font-weight:900}.employee-master-v22 input[type=date]{min-width:165px;padding-right:36px}.opening-recurring-row{grid-template-columns:minmax(190px,1.4fr) 130px 145px 170px 110px!important}.master-save-bar{display:flex;justify-content:flex-end;gap:10px;align-items:center}.leave-export-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.leave-export-head h3{margin:0}

/* V24 employee bulk import */
.employee-list-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.import-guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.import-guide{padding:18px}.import-step{display:flex;gap:12px;align-items:flex-start;margin-bottom:14px}.import-step>span{width:30px;height:30px;min-width:30px;border-radius:50%;background:#eaf1ff;color:#2563eb;font-weight:900;display:flex;align-items:center;justify-content:center}.import-step p{margin:3px 0 0;color:#6b7c99}.import-upload-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.import-upload-form input[type=file]{flex:1;min-width:240px;border:1px dashed #b9c6d8;border-radius:10px;padding:10px;background:#fbfdff}.import-preview-panel{padding:18px}.import-preview-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:10px}.import-preview-head h2{margin:0}.import-preview-head p{margin:3px 0;color:#6b7c99}.import-kpis{display:flex;gap:8px}.import-kpis span{border-radius:10px;padding:8px 12px;font-size:11px}.import-kpis span b{font-size:17px;margin-right:4px}.import-kpis .ready{background:#ecfdf3;color:#166534}.import-kpis .errors{background:#fff1f2;color:#9f1239}.import-confirm{margin:4px 0 12px}.import-preview-scroll{overflow:auto;max-height:600px;border:1px solid #e3e9f1;border-radius:12px}.import-table{margin:0;min-width:900px}.import-table thead th{position:sticky;top:0;background:#f7f9fc;z-index:2}.import-ready-row{background:#fbfffc}.import-error-row{background:#fffafa}.import-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:900;text-transform:uppercase}.import-status.ready{background:#dcfce7;color:#166534}.import-status.error{background:#fee2e2;color:#991b1b}.import-errors{margin:0;padding-left:16px;color:#b42339;font-size:10px}.import-footnote{font-size:10px;color:#6b7c99}@media(max-width:850px){.import-guide-grid{grid-template-columns:1fr}.employee-list-actions{justify-content:flex-start}}

/* V25: compact excluded-payroll action + simple leave range */
.action-not-paid-pill{margin:0!important;white-space:nowrap;align-self:center}.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}.leave-date-range{display:grid;grid-template-columns:1fr 1fr;gap:8px}.leave-date-range label{margin-top:0}.leave-days-selected{margin:-2px 0 10px;color:#64748b;font-size:10px}.leave-days-selected:before{content:'✓ ';color:#16a34a;font-weight:900}@media(max-width:700px){.leave-date-range{grid-template-columns:1fr}}


/* V26 compact employee identity + leave summary polish */
.employee-compact-sticky{
  position:sticky;top:var(--employee-sticky-top,78px);z-index:870;
  width:min(760px,calc(100% - 22px));margin:0 auto;
  max-height:0;opacity:0;pointer-events:none;overflow:hidden;
  transform:translateY(-9px) scale(.985);
  transition:max-height .22s ease,opacity .18s ease,transform .22s ease,margin .22s ease;
}
.employee-compact-sticky.is-visible{
  max-height:56px;opacity:1;pointer-events:auto;overflow:visible;
  transform:translateY(0) scale(1);margin:8px auto 12px;
  min-height:44px;padding:7px 9px 7px 14px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:rgba(255,255,255,.94);backdrop-filter:blur(14px);
  border:1px solid rgba(213,222,234,.92);border-radius:14px;
  box-shadow:0 9px 24px rgba(15,23,42,.08);
}
.employee-compact-identity{display:flex;align-items:center;gap:8px;min-width:0;white-space:nowrap;overflow:hidden}
.employee-compact-identity strong{font-size:13px;color:#0f172a;overflow:hidden;text-overflow:ellipsis}
.employee-compact-code,.employee-compact-role{font-size:10px;color:#687a95;padding-left:8px;border-left:1px solid #dce4ef;overflow:hidden;text-overflow:ellipsis}
.employee-compact-code{font-weight:800;color:#52647e}
.employee-compact-status{font-size:9px;font-weight:800;border-radius:999px;padding:4px 7px}
.employee-compact-status.active{background:#dcfce7;color:#166534}.employee-compact-status.inactive{background:#fee2e2;color:#991b1b}
.employee-compact-back{display:flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;border-radius:9px;border:1px solid #d9e3ef;color:#2563eb;text-decoration:none;background:#f8fbff}
.employee-compact-back:hover{background:#eef5ff}

.leave-summary-grid{grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:10px;align-items:stretch}
.leave-summary-card{position:relative;min-height:128px;grid-template-rows:40px 1fr;align-content:start;overflow:hidden}
.leave-summary-card>b{grid-column:1/3;height:38px;line-height:18px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;word-break:break-word;padding-right:4px}
.leave-summary-card>span{grid-column:3;align-self:start;white-space:nowrap}
.leave-summary-card>div{align-self:end;min-width:0}
.leave-summary-card div small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.leave-summary-card div strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:1400px){.leave-summary-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:900px){.employee-compact-role{display:none}.leave-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.employee-compact-sticky.is-visible{width:calc(100% - 12px);border-radius:12px}.employee-compact-code{display:none}.leave-summary-grid{grid-template-columns:1fr}}

/* V27 formula-powered statutory rules */
.formula-method-panel{grid-template-columns:1fr!important}.formula-input{font-family:Consolas,monospace;min-height:68px;resize:vertical;background:#fbfdff}
.formula-reference-chips{display:flex;gap:6px;flex-wrap:wrap;max-height:110px;overflow:auto;margin:8px 0}
.formula-ref-chip{border:1px solid #d7e1ef;background:#fff;color:#425873;border-radius:999px;padding:5px 8px;font-size:9px}.formula-ref-chip:hover{background:#eef4ff;color:#2563eb}
.formula-explainer{margin:9px 0 12px;padding:10px 12px;border:1px solid #dce6f2;background:#f8fbff;border-radius:10px}.formula-explainer>b{display:block;font-size:10px;margin-bottom:3px}.formula-explainer>span{font-size:10px;color:#5f718d}
.formula-explainer details{margin-top:7px;border-top:1px solid #e2e8f0;padding-top:6px}.formula-explainer summary{cursor:pointer;font-size:9px;font-weight:800;color:#2563eb}.formula-explainer p{font-size:9px;color:#667790;margin:4px 0}

/* V28: friendly Rules / Bases split */
.stat-workspace-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 12px;max-width:900px}
.stat-workspace-switch a{display:grid;grid-template-columns:30px auto;column-gap:9px;align-items:center;text-decoration:none;color:#26364d;border:1px solid #dce5f1;background:#fff;border-radius:12px;padding:9px 11px}
.stat-workspace-switch a>span{grid-row:1/3;width:28px;height:28px;border-radius:50%;background:#eef3f8;display:flex;align-items:center;justify-content:center;font-weight:900;color:#64748b}.stat-workspace-switch a>b{font-size:12px}.stat-workspace-switch a>small{font-size:9px;color:#75859d}
.stat-workspace-switch a.active{border-color:#a9c4ff;background:#f6f9ff}.stat-workspace-switch a.active>span{background:#2563eb;color:#fff}.stat-workspace-switch a.active>b{color:#1d4ed8}
.stat-simple-note{max-width:1100px;padding:9px 11px;border-radius:9px;background:#f8fafc;border:1px solid #e4eaf2;color:#5d6f89;font-size:10px;margin-bottom:12px}.stat-simple-note b{color:#23344d}.stat-simple-note em{font-style:normal;font-weight:800;color:#31527d}
.compact-rule-section{padding:14px 16px!important;margin-bottom:9px!important}.compact-rule-section h2{font-size:15px;margin-bottom:4px}.compact-rule-section>p{font-size:10px;margin:0 0 9px}
.bases-jump-card{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 14px;border:1px dashed #b9c9de;border-radius:11px;background:#fbfdff;margin:12px 0}.bases-jump-card b{display:block;font-size:11px}.bases-jump-card span{font-size:9px;color:#70819a}
.base-builder-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin:12px 0}.base-builder-toolbar h2{margin:0}.base-builder-toolbar p{margin:3px 0;color:#6d7e98;font-size:10px}
.base-builder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.base-builder-card{border:1px solid #dde6f1;background:#fff;border-radius:13px;padding:13px;min-width:0}.base-builder-card.named{border-style:dashed;background:#fcfdff}
.base-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.base-card-head h3{margin:0;font-size:13px}.base-kind{font-size:8px;color:#8190a5}
.base-name-input{font-size:13px!important;font-weight:800!important;border:0!important;border-bottom:1px dashed #cbd5e1!important;border-radius:0!important;padding:2px 0!important;background:transparent!important;max-width:280px}
.base-composition{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-height:38px;margin:9px 0;padding:8px 9px;border-radius:9px;background:#f6f9fc;border:1px solid #e7edf4}.base-composition span{background:#fff;border:1px solid #dbe4ef;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:700;color:#334b68}.base-composition b{color:#8b99aa;font-size:10px}.base-composition em{font-size:9px;color:#8a98aa}
.base-basic-row{display:flex;gap:12px;flex-wrap:wrap;padding:5px 0}.base-basic-row .check{font-size:10px}.base-items{border-top:1px solid #edf1f6;margin-top:7px;padding-top:7px}.base-items summary{cursor:pointer;font-size:9px;font-weight:800;color:#315b94;user-select:none}
.base-item-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:7px;max-height:230px;overflow:auto}.base-item{display:flex;gap:7px;align-items:center;border:1px solid #edf1f5;border-radius:8px;padding:6px 7px;background:#fcfdff}.base-item b{font-size:9px;display:block}.base-item small{display:block;font-size:8px;color:#8a98ad}
.base-reference-preview{font-size:9px;color:#667892;margin:-3px 0 7px}.base-reference-preview code{background:#eef2f7;border-radius:5px;padding:2px 5px}.remove-base-link{border:0;background:transparent;color:#c2415c;font-size:9px;padding:5px 0;cursor:pointer}
.new-base-card{display:grid;grid-template-columns:1fr minmax(260px,420px) auto;gap:10px;align-items:center;margin-top:11px;padding:12px 14px;border:1px dashed #b7c7da;border-radius:12px;background:#fbfdff}.new-base-card h3{margin:0;font-size:11px}.new-base-card p{margin:3px 0 0;font-size:9px;color:#77869b}
.base-bottom-help{display:flex;gap:10px;align-items:flex-start;margin-top:10px;padding:10px 12px;border-radius:10px;background:#eef7ff;color:#45617e;font-size:9px}.base-bottom-help b{color:#1e5a91}.base-bottom-help span{line-height:1.5}
@media(max-width:950px){.base-builder-grid{grid-template-columns:1fr}.new-base-card{grid-template-columns:1fr}.stat-workspace-switch{grid-template-columns:1fr}}

/* V29 — clean statutory rule builder */
.rule-paid-by{display:inline-flex;align-items:center;gap:4px;margin:6px 0 12px;padding:5px 9px;border:1px solid #dbe5f3;border-radius:999px;background:#f8fbff;color:#53657d;font-size:12px}.rule-paid-by b{color:#17233a}.custom-rule-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.custom-rule-actions{display:flex;align-items:center;gap:14px}.enabled-pill{padding:6px 10px;border-radius:999px;background:#eafaf1;color:#147a43;font-size:12px;font-weight:700}.formula-tool-row{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.formula-op{width:34px;height:32px;border:1px solid #cfdbea;background:#fff;border-radius:8px;font-weight:800;cursor:pointer}.formula-op:hover{border-color:#2f67ea;background:#f3f7ff}.formula-op.formula-word{width:auto;padding:0 10px}.formula-reference-help{margin-top:8px;border:1px solid #dce6f2;border-radius:10px;background:#fbfdff;padding:9px 12px}.formula-reference-help summary{cursor:pointer;font-weight:700;color:#245bc8}.reference-group{padding:10px 0;border-bottom:1px solid #e9eef5}.reference-group:last-child{border-bottom:0}.reference-group>small{display:block;color:#71839b;margin:2px 0 7px}.formula-help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.formula-help-grid>span{padding:10px;border:1px solid #e1e8f2;border-radius:8px;background:#fff;font-size:12px;line-height:1.45}.paye-live-explainer{margin-top:14px}.paye-live-explainer details{margin-top:7px}.paye-live-explainer summary{cursor:pointer;color:#245bc8;font-weight:700}.rule-builder-modal{width:min(1050px,88vw);max-width:none;max-height:86vh;overflow:auto;padding:24px}.builder-block{margin-top:16px;padding:16px;border:1px solid #dce5f0;border-radius:12px;background:#f9fbfe}.builder-block label{margin-bottom:12px}.builder-hint{font-size:12px;color:#6c7e96}.builder-help{margin:14px 0}.custom-stat-card:not(:has(.custom-rule-actions)) .custom-identity{margin-top:8px}@media(max-width:800px){.formula-help-grid{grid-template-columns:1fr}.custom-rule-heading,.custom-rule-actions{flex-direction:column}.rule-builder-modal{width:94vw}}

/* V30 consolidated statutory UI */
.rule-builder-modal{width:min(1180px,92vw)!important;max-height:90vh!important;overflow:auto!important}.rule-builder-form{display:grid;gap:14px}.builder-method-panels>[data-builder-method]{display:none}.builder-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.builder-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.builder-band-head,.builder-band-row{display:grid;grid-template-columns:1fr 1fr .7fr 42px;gap:8px;align-items:end}.builder-band-head{font-size:9px;text-transform:uppercase;color:#65758d;margin-bottom:5px}.builder-band-row{margin-bottom:7px}.builder-footer-options{display:flex;gap:16px;align-items:end;flex-wrap:wrap;border-top:1px solid #e7edf5;padding-top:12px}.builder-footer-options>label:first-child{min-width:240px}
.formula-builder-panel{display:grid!important;gap:8px}.formula-tool-row{display:flex;gap:5px;flex-wrap:wrap}.formula-tool-row button{min-width:34px;border:1px solid #cbd8ea;background:#fff;border-radius:8px;padding:7px 9px;font-weight:800;cursor:pointer}.formula-reference-browser{border:1px solid #dce6f2;border-radius:10px;background:#fbfdff;padding:8px 10px}.formula-reference-browser>summary{cursor:pointer;color:#2563eb;font-size:10px;font-weight:800}.reference-browser-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:9px 0}.reference-browser-tabs button{border:1px solid #dce5f1;background:#fff;border-radius:999px;padding:5px 9px;font-size:9px}.reference-browser-tabs button.active{background:#2563eb;color:#fff}.ref-group{display:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.ref-insert{display:flex;flex-direction:column;align-items:flex-start;border:1px solid #e1e8f1;background:#fff;border-radius:8px;padding:7px;text-align:left}.ref-insert b{font-size:9px}.ref-insert small{font-size:8px;color:#7c8da4}
.interactive-formula-help{border:1px solid #d8e3f2;border-radius:12px;padding:10px;background:#fafdff;overflow:hidden}.formula-help-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.formula-help-topic{display:flex;flex-direction:column;align-items:flex-start;border:1px solid #dce6f2;background:#fff;border-radius:9px;padding:9px;text-align:left;transition:.22s ease;min-height:54px}.formula-help-topic b{font-size:9px}.formula-help-topic span{font-size:8px;color:#687b95}.formula-help-topic.help-topic-away{opacity:0;transform:scale(.96);pointer-events:none;height:0;min-height:0;padding:0;border:0;overflow:hidden}.help-detail{display:none;opacity:0;transform:translateY(6px)}.help-detail.open{display:block;animation:helpOpen .22s ease forwards}.help-detail p{font-size:10px;color:#60728c}.help-back{border:0;background:transparent;color:#2563eb;font-weight:800;padding:0}.help-example{display:grid;gap:4px;margin-top:8px;padding:9px;border-radius:8px;background:#fff;border:1px solid #e3e9f2}.help-example span{font-size:9px;color:#6e7e95}@keyframes helpOpen{to{opacity:1;transform:none}}
.compact-custom-rule{padding:13px 15px!important}.custom-rule-title-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.custom-rule-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0}.custom-rule-summary-grid span{padding:8px;border:1px solid #e4eaf3;border-radius:8px;background:#fbfcfe}.custom-rule-summary-grid small{display:block;font-size:8px;color:#7d8da3}.custom-rule-summary-grid b{font-size:10px}.disabled-pill{background:#eef1f4;color:#6e7b8c;border-radius:999px;padding:4px 7px;font-size:8px;font-weight:800}.disabled-custom-rule{opacity:.72}.small-edit-rule{padding:6px 10px!important}.pretty-formula{font-family:Consolas,monospace}
.paye-explainer-head{display:flex;justify-content:space-between;align-items:center}.paye-explainer-head small{display:block;color:#7c8ba0;font-size:8px}.tiny-info-btn{border:1px solid #ccd9e9;background:#fff;border-radius:8px;padding:5px 8px;color:#2563eb;font-size:9px}.paye-formula-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}.paye-formula-steps span{display:grid;grid-template-columns:auto 1fr auto;gap:6px;align-items:center;border:1px solid #e1e8f1;background:#fff;border-radius:8px;padding:7px}.paye-formula-steps b,.paye-formula-steps em{font-size:8px}.paye-formula-steps em{font-style:normal;color:#78899f}.paye-relief-line{font-size:9px}.paye-example-box{display:none;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid #e2e8f0}.paye-example-box.open{display:grid}.paye-example-result{display:grid;grid-template-columns:1fr auto;gap:3px 8px}.paye-example-result small{font-size:8px;color:#7a899e}.paye-example-result b{font-size:10px}
.auto-pill{font-size:7px;background:#e7f7ef;color:#14804a;border-radius:999px;padding:3px 6px}.base-list{display:grid;gap:3px;margin-top:7px;max-height:280px;overflow:auto}.base-list-row{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:7px;padding:6px 7px;border-bottom:1px solid #eef2f6}.base-list-row:hover{background:#f8fbff}.base-list-row b{font-size:9px}.base-list-row small{display:block;font-size:8px;color:#8391a4}.base-list-row em{font-size:7px;font-style:normal;background:#fff3cd;color:#8a6412;border-radius:999px;padding:3px 6px}.base-live-expression{display:flex;gap:5px;align-items:center;flex-wrap:wrap;min-height:42px;margin:9px 0;padding:8px;border:1px solid #e1e8f1;background:#f7faff;border-radius:9px}.base-expression-piece{display:flex;gap:4px;align-items:center}.base-token{border:1px solid #ccd9ea;background:#fff;border-radius:999px;padding:5px 8px;font-size:9px;font-weight:700}.base-op-select{width:42px!important;padding:4px!important;border-radius:7px!important;font-weight:900!important}.base-paren-toggle{border:1px solid #d7e0eb;background:#fff;color:#91a0b3;border-radius:6px;padding:3px 5px;font-size:9px}.base-paren-toggle.active{background:#2563eb;color:#fff}
@media(max-width:900px){.builder-three,.builder-two,.ref-group,.paye-formula-steps,.paye-example-box,.custom-rule-summary-grid{grid-template-columns:1fr}.formula-help-topic-grid{grid-template-columns:1fr}}

/* V31 statutory polish */
.statutory-sticky-shell{position:sticky;top:0;z-index:40;background:rgba(246,249,253,.96);backdrop-filter:blur(12px);padding-top:4px;transition:box-shadow .2s ease,transform .2s ease}.statutory-sticky-shell:has(+ .form-error-banner),.statutory-sticky-shell{box-shadow:0 1px 0 rgba(34,63,103,.06)}
.statutory-sticky-shell .page-head{transition:all .2s ease}.statutory-sticky-shell .stat-workspace-switch{margin-top:8px}.statutory-sticky-shell .stat-simple-note{margin-bottom:8px}
.formula-tool-row button,.formula-tool-btn{color:#17233a!important;background:#fff!important;border:1px solid #cbd8ea!important;min-width:38px;min-height:34px;font-size:12px!important;opacity:1!important}.formula-tool-row button:hover{background:#eef4ff!important;color:#1f5ed7!important}
.reference-browser-tabs button{color:#344861!important;opacity:1!important}.reference-browser-tabs button.active{color:#fff!important}.ref-insert b{display:block!important;color:#17233a!important;font-size:10px!important;opacity:1!important}.ref-insert small{display:block!important;color:#6d7f97!important}
.formula-help-topic b{display:block!important;color:#17233a!important;font-size:11px!important;margin-bottom:3px}.formula-help-topic span{display:block!important;color:#62758f!important;font-size:9px!important;line-height:1.35}.formula-help-topic{min-height:66px;text-align:left!important}
.generated-formula-panel{display:block!important;margin-top:14px;padding-top:12px;border-top:1px solid #e1e8f1}.generated-formula-panel:before{content:'Formula · generated from the method fields';display:block;font-size:10px;font-weight:800;color:#53657d;margin-bottom:7px}.generated-formula-panel .formula-reference-browser,.generated-formula-panel .interactive-formula-help,.generated-formula-panel .formula-tool-row{display:flex}.generated-formula-panel textarea{background:#fffdf7}
.base-live-expression{padding:7px 8px;min-height:38px;gap:4px}.base-expression-piece{gap:3px}.base-token{padding:4px 8px}.advanced-only{display:none!important}.base-advanced .advanced-only{display:inline-flex!important}.base-advanced-toggle{border:1px solid #cfdbea;background:#fff;color:#245bc8;border-radius:8px;padding:7px 10px;font-weight:700;cursor:pointer;margin-top:5px}.base-builder-toolbar>div{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.base-builder-toolbar>div p{width:100%;margin:0}.base-bottom-help span{line-height:1.45}
@media(max-width:800px){.statutory-sticky-shell{top:0}.formula-help-topic-grid{grid-template-columns:1fr}.ref-group{grid-template-columns:1fr 1fr}}

/* V32 — formula builder polish */
.formula-glow,.formula-tool-row button,.formula-more summary,.base-advanced-tools button{transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease,color .15s ease}.formula-glow:hover,.formula-tool-row button:hover,.formula-more summary:hover,.base-advanced-tools button:hover{background:#f0f6ff!important;border-color:#91b7ff!important;color:#1859c9!important;box-shadow:0 0 0 3px rgba(73,135,255,.10),0 3px 12px rgba(66,123,219,.12)!important;transform:translateY(-1px)}
.formula-tool-sep{width:1px;background:#dbe4f0;align-self:stretch;margin:2px 3px}.formula-more{position:relative}.formula-more summary{list-style:none;border:1px solid #cbd8ea;background:#fff;border-radius:8px;padding:7px 10px;font-weight:800;cursor:pointer}.formula-more summary::-webkit-details-marker{display:none}.formula-more>div{position:absolute;z-index:10;top:calc(100% + 5px);right:0;display:grid;grid-template-columns:repeat(2,minmax(90px,1fr));gap:5px;background:#fff;border:1px solid #dbe5f1;border-radius:10px;padding:7px;box-shadow:0 12px 30px rgba(30,55,90,.12)}
.generated-formula-status{display:flex;align-items:center;gap:8px;font-size:9px;color:#6a7c93;margin-top:3px}.generated-formula-status button{display:none;border:0;background:transparent;color:#2563eb;font-weight:800;font-size:9px;cursor:pointer}.generated-formula-status.formula-modified{color:#9a6d18}.generated-formula-status.formula-modified button{display:inline}.rounding-example{display:block!important;margin-top:4px;color:#72839b!important;font-weight:500!important;font-size:9px!important}
.interactive-formula-help{position:relative}.formula-help-topic-grid{transition:opacity .18s ease,transform .18s ease}.formula-help-topic-grid.topics-leaving{opacity:0;transform:scale(.985)}.formula-help-active-card{display:none;flex-direction:column;align-items:flex-start;width:min(520px,100%);min-height:66px;border:1px solid #aac3ef;background:#fff;border-radius:9px;padding:9px;text-align:left;transition:transform .22s cubic-bezier(.2,.8,.2,1),opacity .2s ease;position:relative;top:0;left:0}.formula-help-active-card b{font-size:11px;color:#17233a}.formula-help-active-card span{font-size:9px;color:#62758f;margin-top:3px}.formula-help-active-card.active{box-shadow:0 5px 18px rgba(44,91,167,.10)}.formula-help-detail-wrap{margin-top:10px}.help-detail.open{min-height:180px}.help-detail h4{margin:12px 0 5px;font-size:16px}.help-back{margin:5px 0 8px}.help-example code{font-size:11px}
.base-live-expression{gap:6px}.base-token{cursor:pointer}.base-advanced-editor-wrap{margin:8px 0 10px;padding:10px;border:1px solid #dbe5f1;border-radius:10px;background:#fbfdff}.base-advanced-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:6px}.base-advanced-head b{font-size:10px}.base-advanced-head span{font-size:8px;color:#78899f}.base-advanced-editor{width:100%;font-family:Consolas,monospace;border:1px solid #ccd9e8;border-radius:8px;padding:8px;resize:vertical}.base-advanced-tools{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.base-advanced-tools button{border:1px solid #cbd8ea;background:#fff;border-radius:7px;padding:5px 8px;font-weight:800;font-size:9px}.base-advanced-editor-wrap>small{display:block;margin-top:5px;color:#73849b;font-size:8px}.advanced-only{display:none!important}.base-advanced .advanced-only{display:block!important}.base-advanced .base-advanced-tools{display:flex!important}
@media(max-width:900px){.formula-more>div{right:auto;left:0}.formula-help-active-card{width:100%}.base-advanced-head{flex-direction:column}}


/* V33 — formula rendering, typography and compact help */
.formula-tool-row,.base-advanced-tools{align-items:center!important}
.formula-tool-row button,.base-advanced-tools button,.formula-more summary{
  font-family:inherit!important;font-size:12px!important;font-weight:700!important;line-height:1!important;
  color:#17233a!important;background:#fff!important;opacity:1!important;min-height:38px!important;
  padding:8px 11px!important;border:1px solid #cbd8ea!important;border-radius:9px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;
}
.formula-more summary{font-size:12px!important}.formula-more>div button{width:100%!important;justify-content:flex-start!important}
.formula-tool-row button:hover,.base-advanced-tools button:hover,.formula-more summary:hover{
  background:#f0f6ff!important;border-color:#91b7ff!important;color:#1859c9!important;
  box-shadow:0 0 0 3px rgba(73,135,255,.10),0 3px 12px rgba(66,123,219,.12)!important;transform:translateY(-1px)
}
.base-token{font-family:inherit!important;font-size:10px!important;font-weight:700!important;line-height:1.15!important;color:#17233a!important;background:#fff!important;opacity:1!important;visibility:visible!important;border:1px solid #cbd8ea!important;border-radius:999px!important;padding:6px 10px!important;min-width:max-content!important}
.base-token:hover{color:#1859c9!important;border-color:#91b7ff!important;background:#f0f6ff!important;box-shadow:0 0 0 3px rgba(73,135,255,.08)!important}
.base-op-select{font-family:inherit!important;font-size:12px!important;font-weight:700!important;color:#17233a!important;background:#fff!important;height:34px!important;width:48px!important;padding:4px 6px!important}
.base-live-expression{gap:6px!important;min-height:46px!important;align-content:center!important}
.base-advanced-tools{display:flex!important;gap:6px!important;flex-wrap:wrap!important;margin-top:8px!important}
.base-advanced-tools .formula-tool-sep{height:30px!important;align-self:center!important}
.base-advanced-editor{font-family:Consolas,'Courier New',monospace!important;color:#17233a!important;background:#fffdf8!important;line-height:1.45!important}

.ref-insert{color:#17233a!important;opacity:1!important;visibility:visible!important;min-height:52px!important}
.ref-insert b{display:block!important;color:#17233a!important;font-family:inherit!important;font-size:10px!important;font-weight:750!important;line-height:1.2!important;opacity:1!important;visibility:visible!important}
.ref-insert small{display:block!important;color:#6d7f99!important;font-size:8px!important;line-height:1.2!important;opacity:1!important;visibility:visible!important;margin-top:2px!important}
.reference-browser-tabs button{font-family:inherit!important;font-size:9px!important;font-weight:700!important;color:#34465f!important;opacity:1!important}
.reference-browser-tabs button.active{color:#fff!important;background:#2563eb!important}

.interactive-formula-help{padding:10px!important;border:1px solid #d8e3f2!important;border-radius:12px!important;background:#fbfdff!important;overflow:hidden!important}
.formula-help-topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;transition:opacity .18s ease,transform .18s ease!important}
.formula-help-topic{min-height:58px!important;padding:8px 10px!important;border:1px solid #dce6f2!important;border-radius:9px!important;background:#fff!important;color:#17233a!important;text-align:left!important;display:flex!important;flex-direction:column!important;justify-content:center!important;transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .18s ease,opacity .18s ease!important}
.formula-help-topic b{font-size:10px!important;font-weight:750!important;color:#17233a!important;margin:0 0 3px!important;line-height:1.15!important}
.formula-help-topic span{font-size:8px!important;color:#657791!important;line-height:1.35!important}
.formula-help-topic:hover{background:#f4f8ff!important;border-color:#a9c5f5!important;box-shadow:0 0 0 3px rgba(73,135,255,.07)!important;transform:translateY(-1px)!important}
.formula-help-topic-grid.topics-leaving{opacity:0!important;transform:scale(.985)!important;pointer-events:none!important}
.formula-help-expanded{display:none;position:relative!important;min-height:0!important}
.formula-help-expanded-top{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;margin:0 0 8px!important}
.help-back{order:2!important;font-family:inherit!important;font-size:9px!important;font-weight:750!important;color:#2563eb!important;background:transparent!important;border:0!important;padding:0!important;cursor:pointer!important}
.formula-help-active-card{order:1!important;width:min(420px,100%)!important;min-height:auto!important;padding:8px 10px!important;border:1px solid #aac3ef!important;border-radius:9px!important;background:#fff!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;box-shadow:0 3px 12px rgba(44,91,167,.08)!important;transition:transform .21s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease!important}
.formula-help-active-card b{font-size:10px!important;font-weight:750!important;color:#17233a!important;line-height:1.15!important}.formula-help-active-card span{font-size:8px!important;color:#657791!important;margin-top:2px!important;line-height:1.3!important}
.formula-help-detail-wrap{margin-top:0!important}.help-detail{display:none!important;margin:0!important;min-height:0!important;opacity:0!important;transform:translateY(4px)!important}.help-detail.open{display:block!important;animation:v33HelpIn .18s ease forwards!important;min-height:0!important}.help-detail p{font-size:9px!important;line-height:1.45!important;color:#566a84!important;margin:0 0 7px!important}.help-example-row{display:grid!important;grid-template-columns:minmax(240px,.8fr) 1fr!important;gap:10px!important;align-items:center!important;padding:7px 2px!important;border-top:1px solid #e8edf4!important}.help-example-row:first-of-type{border-top:0!important}.help-example-row code{font-size:10px!important;color:#17233a!important;background:transparent!important;padding:0!important;white-space:normal!important}.help-example-row span{font-size:8px!important;line-height:1.35!important;color:#6d7f98!important}.help-inline-key{font-size:8px!important;color:#62758f!important;padding-top:7px!important;border-top:1px solid #e8edf4!important}
@keyframes v33HelpIn{to{opacity:1;transform:none}}

.generated-formula-status{font-family:inherit!important}.rounding-example{font-size:8px!important;color:#71839b!important;margin-top:4px!important;display:block!important}

@media(max-width:850px){.formula-help-topic-grid{grid-template-columns:1fr!important}.help-example-row{grid-template-columns:1fr!important;gap:3px!important}.formula-help-active-card{width:100%!important}.ref-group{grid-template-columns:1fr 1fr!important}}

/* V34 — salary semantics + guided formula editing */
.salary-meaning{margin-left:8px;color:#6b7d95}.mini-info{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;background:#eef5ff;color:#2563eb;font-size:9px;font-weight:800;cursor:help;margin-left:3px}.salary-reference-note{display:flex;gap:8px 16px;flex-wrap:wrap;align-items:center;margin:7px 0;padding:8px 10px;border:1px solid #dce7f5;border-radius:9px;background:#f7fbff;color:#5b6f89;font-size:9px;line-height:1.35}.salary-reference-note>b{color:#1c3555}.salary-reference-note strong{color:#17233a}.base-reference-picker-slot{margin-top:8px}.base-reference-picker-slot .formula-reference-browser{margin:0}.formula-reference-browser>summary{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.formula-reference-browser>summary small{font-size:8px;font-weight:500;color:#73849b}.reference-browser-tabs{gap:6px!important}.ref-group{grid-template-columns:repeat(3,minmax(0,1fr))!important}.ref-insert{min-height:58px!important}.ref-insert small{max-width:100%;white-space:normal}.formula-live-assistant{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:30px;margin:5px 0 2px;padding:6px 8px;border-left:3px solid #b9cff5;background:#f7faff;border-radius:0 7px 7px 0;color:#5d708a;font-size:9px;line-height:1.35}.formula-live-assistant>b{color:#1c4f9e;font-size:9px}.formula-live-assistant code{padding:2px 6px;border-radius:5px;background:#fff;border:1px solid #dbe6f4;color:#17233a;font-size:9px}.formula-live-assistant span strong{color:#17233a}.formula-live-assistant.active{border-left-color:#2563eb;background:#f1f6ff}.base-advanced-editor{min-height:70px}.base-advanced-editor:focus,.formula-input:focus{border-color:#8bb4ff!important;box-shadow:0 0 0 3px rgba(65,125,230,.08)!important}.formula-help-expanded-top{align-items:flex-start!important}.formula-help-active-card{position:relative!important;left:0!important;top:0!important}.formula-help-detail-wrap{width:100%!important}.help-example-row{min-height:36px}.help-detail[data-topic="salary"] .help-example-row code{font-weight:800}.reference-browser-tabs button,.formula-tool-row button,.base-advanced-tools button,.formula-more summary{font-family:inherit!important;font-weight:700!important}
@media(max-width:850px){.ref-group{grid-template-columns:1fr!important}.salary-reference-note{display:grid}.formula-live-assistant{display:grid;gap:4px}}
/* V35 — focused Base Builder flow */
.v35-base-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:14px 0}.v35-base-toolbar h2{margin:0 0 3px}.v35-base-toolbar p{margin:0;color:#718199;font-size:10px}
.v35-base-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}.v35-base-card{border:1px solid #dce5f0;border-radius:14px;background:#fff;overflow:hidden;transition:box-shadow .22s ease,border-color .22s ease,transform .22s ease}.v35-base-card:hover{border-color:#bfd0e8}.v35-base-card.open{grid-column:1/-1;border-color:#abc4ee;box-shadow:0 8px 24px rgba(37,99,235,.08)}
.v35-base-summary{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(0,2.4fr) 28px;gap:14px;align-items:center;width:100%;border:0;background:#fff;padding:14px 16px;text-align:left;cursor:pointer;color:#172033}.v35-base-summary:hover{background:#fbfdff}.v35-base-title{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.v35-base-title>b{font-size:12px}.v35-base-title>small{width:100%;font-size:8px;color:#7d8da2;font-weight:500}.v35-base-chevron{font-size:18px;color:#6f829b;transition:transform .2s ease}.v35-base-card.open .v35-base-chevron{transform:rotate(180deg)}
.v35-base-card .base-live-expression{border:0;background:transparent;padding:0;margin:0;min-height:auto;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.v35-base-card .base-token{font-size:8px;padding:4px 7px}.v35-formula-op{font-size:10px;font-weight:800;color:#50627b}.v35-formula-text{font-size:8px;color:#6d7d93}
.v35-base-details{display:none;border-top:1px solid #e8edf4;padding:14px 16px 16px;background:#fcfdff;animation:v35Detail .2s ease}.v35-base-card.open .v35-base-details{display:block}@keyframes v35Detail{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.v35-base-context{display:flex;gap:8px;align-items:baseline;margin-bottom:8px}.v35-base-context b{font-size:10px}.v35-base-context span{font-size:9px;color:#718199}.v35-base-controls{display:grid;grid-template-columns:minmax(280px,1.4fr) auto auto;gap:12px;align-items:end;margin-bottom:8px}.v35-base-controls>label:first-child{font-size:9px;font-weight:800}.v35-base-controls select{margin-top:4px}.v35-base-controls .check{padding-bottom:9px;font-size:9px}.salary-clarity-strip{display:flex;gap:14px;flex-wrap:wrap;border:1px solid #e4ebf4;background:#f8fbff;border-radius:9px;padding:7px 9px;margin:7px 0 10px}.salary-clarity-strip span{font-size:8px;color:#667993}.salary-clarity-strip b{color:#2c4667}
.v35-base-card .base-items{margin:8px 0 10px}.v35-base-card .base-list{max-height:230px}.v35-card-advanced-toggle{border:1px solid #c7d6eb;background:#fff;color:#2459a6;border-radius:9px;padding:7px 10px;font-size:9px;font-weight:800;cursor:pointer}.v35-card-advanced-toggle:hover{background:#f1f6ff;box-shadow:0 0 0 3px rgba(59,130,246,.08)}
.v35-card-advanced{display:none;margin-top:10px;border:1px solid #d8e3f2;border-radius:12px;background:#fff;padding:11px}.v35-base-card.advanced-open .v35-card-advanced{display:block;animation:v35Detail .2s ease}.base-advanced-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px}.base-advanced-head>div{display:grid;gap:2px}.base-advanced-head b{font-size:10px}.base-advanced-head span{font-size:8px;color:#718199}.v35-reset-formula{border:0;background:#eef5ff;color:#2463c7;border-radius:8px;padding:6px 8px;font-size:8px;font-weight:800;cursor:pointer}.base-advanced-editor{width:100%;font:13px Consolas,monospace;line-height:1.5;min-height:78px;border:1px solid #cbd8e8;border-radius:9px;padding:10px;background:#fffdf7;color:#172033}.base-advanced-editor:focus{outline:none;border-color:#6ea1f4;box-shadow:0 0 0 3px rgba(59,130,246,.1)}
.formula-live-assistant{min-height:34px;margin:6px 0 8px;padding:7px 9px;border-radius:8px;background:#f7f9fc;border:1px solid #e3e9f1;display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:8px;color:#64748b}.formula-live-assistant.active{background:#eef6ff;border-color:#c6dcfb}.formula-live-assistant code{font-size:9px;color:#172033}.formula-live-assistant code strong{background:#dbeafe;color:#1d4ed8;border-radius:4px;padding:2px 4px}.formula-live-assistant span{font-size:8px}
.v35-tools{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:7px 0}.v35-tools>span{width:1px;height:22px;background:#dce5f1;margin:0 2px}.v35-tools button,.v35-tools summary{font-family:inherit!important;font-size:10px!important;font-weight:700!important;line-height:1!important;min-width:34px;height:34px;border:1px solid #cbd8e8;background:#fff;color:#172033;border-radius:8px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.v35-tools button:hover,.v35-tools summary:hover{border-color:#77a8f5;background:#f0f6ff;box-shadow:0 0 10px rgba(59,130,246,.16);color:#1d4ed8}.formula-more{position:relative}.formula-more>summary{list-style:none}.formula-more>summary::-webkit-details-marker{display:none}.formula-more>div{position:absolute;z-index:15;right:0;top:39px;display:grid;grid-template-columns:repeat(2,auto);gap:5px;padding:7px;background:#fff;border:1px solid #dce5f0;border-radius:9px;box-shadow:0 10px 25px rgba(15,23,42,.12)}
.v35-card-advanced .formula-reference-browser{margin-top:8px}.v35-card-advanced .ref-group{grid-template-columns:repeat(3,minmax(0,1fr))}.base-formula-help-drawer{margin-top:8px;border:1px solid #dce6f2;border-radius:10px;background:#fbfdff;padding:8px 10px}.base-formula-help-drawer>summary{font-size:9px;color:#2563eb;font-weight:800;cursor:pointer}.base-formula-help-drawer>summary small{color:#8290a4;font-weight:500;margin-left:5px}.base-help-topic-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}.base-help-topic-grid button{border:1px solid #e1e8f1;border-radius:8px;background:#fff;text-align:left;padding:7px;cursor:pointer}.base-help-topic-grid button:hover{border-color:#b9d0f4;background:#f7faff}.base-help-topic-grid b{display:block;font-size:8px}.base-help-topic-grid span{font-size:7px;color:#74859c}.base-help-detail{display:none;padding:8px 2px}.base-help-detail.open{display:grid;gap:6px;animation:v35Detail .18s ease}.base-help-detail h4{margin:0;font-size:11px}.base-help-detail p{margin:0;font-size:9px;color:#5f7087}.base-help-detail code{display:block;background:#fff;border:1px solid #e1e8f1;border-radius:7px;padding:7px;font-size:9px}.base-help-detail small{font-size:8px;color:#77889e}.base-help-back{justify-self:start;border:0;background:transparent;color:#2563eb;font-size:8px;font-weight:800;cursor:pointer}
@media(max-width:1000px){.v35-base-grid{grid-template-columns:1fr}.v35-base-card.open{grid-column:auto}.v35-base-summary{grid-template-columns:1fr 26px}.v35-base-summary .base-live-expression{grid-column:1/-1}.v35-base-controls{grid-template-columns:1fr}.v35-base-controls .check{padding-bottom:0}.base-help-topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v35-card-advanced .ref-group{grid-template-columns:1fr 1fr}}
.v35-simple-editor{display:grid;gap:6px;margin:9px 0;padding:9px;border:1px solid #e2e9f2;background:#fff;border-radius:9px}.v35-simple-editor>div:first-child{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.v35-simple-editor b{font-size:9px}.v35-simple-editor span{font-size:8px;color:#77889e}.v35-simple-expression{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.v35-simple-op{width:42px!important;min-height:28px!important;padding:3px 5px!important;border-radius:7px!important;font-size:10px!important;font-weight:800!important}

/* --- V36 aliases from V35 base layout --- */
.v36-base-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:14px 0}.v36-base-toolbar h2{margin:0 0 3px}.v36-base-toolbar p{margin:0;color:#718199;font-size:10px}
.v36-base-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}.v36-base-card{border:1px solid #dce5f0;border-radius:14px;background:#fff;overflow:hidden;transition:box-shadow .22s ease,border-color .22s ease,transform .22s ease}.v36-base-card:hover{border-color:#bfd0e8}.v36-base-card.open{grid-column:1/-1;border-color:#abc4ee;box-shadow:0 8px 24px rgba(37,99,235,.08)}
.v36-base-summary{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(0,2.4fr) 28px;gap:14px;align-items:center;width:100%;border:0;background:#fff;padding:14px 16px;text-align:left;cursor:pointer;color:#172033}.v36-base-summary:hover{background:#fbfdff}.v36-base-title{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.v36-base-title>b{font-size:12px}.v36-base-title>small{width:100%;font-size:8px;color:#7d8da2;font-weight:500}.v36-base-chevron{font-size:18px;color:#6f829b;transition:transform .2s ease}.v36-base-card.open .v36-base-chevron{transform:rotate(180deg)}
.v36-base-card .base-live-expression{border:0;background:transparent;padding:0;margin:0;min-height:auto;display:flex;align-items:center;gap:5px;flex-wrap:wrap}.v36-base-card .base-token{font-size:8px;padding:4px 7px}.v36-formula-op{font-size:10px;font-weight:800;color:#50627b}.v36-formula-text{font-size:8px;color:#6d7d93}
.v36-base-details{display:none;border-top:1px solid #e8edf4;padding:14px 16px 16px;background:#fcfdff;animation:v36Detail .2s ease}.v36-base-card.open .v36-base-details{display:block}@keyframes v36Detail{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.v36-base-context{display:flex;gap:8px;align-items:baseline;margin-bottom:8px}.v36-base-context b{font-size:10px}.v36-base-context span{font-size:9px;color:#718199}.v36-base-controls{display:grid;grid-template-columns:minmax(280px,1.4fr) auto auto;gap:12px;align-items:end;margin-bottom:8px}.v36-base-controls>label:first-child{font-size:9px;font-weight:800}.v36-base-controls select{margin-top:4px}.v36-base-controls .check{padding-bottom:9px;font-size:9px}.salary-clarity-strip{display:flex;gap:14px;flex-wrap:wrap;border:1px solid #e4ebf4;background:#f8fbff;border-radius:9px;padding:7px 9px;margin:7px 0 10px}.salary-clarity-strip span{font-size:8px;color:#667993}.salary-clarity-strip b{color:#2c4667}
.v36-base-card .base-items{margin:8px 0 10px}.v36-base-card .base-list{max-height:230px}.v36-card-advanced-toggle{border:1px solid #c7d6eb;background:#fff;color:#2459a6;border-radius:9px;padding:7px 10px;font-size:9px;font-weight:800;cursor:pointer}.v36-card-advanced-toggle:hover{background:#f1f6ff;box-shadow:0 0 0 3px rgba(59,130,246,.08)}
.v36-card-advanced{display:none;margin-top:10px;border:1px solid #d8e3f2;border-radius:12px;background:#fff;padding:11px}.v36-base-card.advanced-open .v36-card-advanced{display:block;animation:v36Detail .2s ease}.base-advanced-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px}.base-advanced-head>div{display:grid;gap:2px}.base-advanced-head b{font-size:10px}.base-advanced-head span{font-size:8px;color:#718199}.v36-reset-formula{border:0;background:#eef5ff;color:#2463c7;border-radius:8px;padding:6px 8px;font-size:8px;font-weight:800;cursor:pointer}.base-advanced-editor{width:100%;font:13px Consolas,monospace;line-height:1.5;min-height:78px;border:1px solid #cbd8e8;border-radius:9px;padding:10px;background:#fffdf7;color:#172033}.base-advanced-editor:focus{outline:none;border-color:#6ea1f4;box-shadow:0 0 0 3px rgba(59,130,246,.1)}
.v36-tools{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:7px 0}.v36-tools>span{width:1px;height:22px;background:#dce5f1;margin:0 2px}.v36-tools button,.v36-tools summary{font-family:inherit!important;font-size:10px!important;font-weight:700!important;line-height:1!important;min-width:34px;height:34px;border:1px solid #cbd8e8;background:#fff;color:#172033;border-radius:8px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.v36-tools button:hover,.v36-tools summary:hover{border-color:#77a8f5;background:#f0f6ff;box-shadow:0 0 10px rgba(59,130,246,.16);color:#1d4ed8}.formula-more{position:relative}.formula-more>summary{list-style:none}.formula-more>summary::-webkit-details-marker{display:none}.formula-more>div{position:absolute;z-index:15;right:0;top:39px;display:grid;grid-template-columns:repeat(2,auto);gap:5px;padding:7px;background:#fff;border:1px solid #dce5f0;border-radius:9px;box-shadow:0 10px 25px rgba(15,23,42,.12)}
.v36-card-advanced .formula-reference-browser{margin-top:8px}.v36-card-advanced .ref-group{grid-template-columns:repeat(3,minmax(0,1fr))}.base-formula-help-drawer{margin-top:8px;border:1px solid #dce6f2;border-radius:10px;background:#fbfdff;padding:8px 10px}.base-formula-help-drawer>summary{font-size:9px;color:#2563eb;font-weight:800;cursor:pointer}.base-formula-help-drawer>summary small{color:#8290a4;font-weight:500;margin-left:5px}.base-help-topic-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}.base-help-topic-grid button{border:1px solid #e1e8f1;border-radius:8px;background:#fff;text-align:left;padding:7px;cursor:pointer}.base-help-topic-grid button:hover{border-color:#b9d0f4;background:#f7faff}.base-help-topic-grid b{display:block;font-size:8px}.base-help-topic-grid span{font-size:7px;color:#74859c}.base-help-detail{display:none;padding:8px 2px}.base-help-detail.open{display:grid;gap:6px;animation:v36Detail .18s ease}.base-help-detail h4{margin:0;font-size:11px}.base-help-detail p{margin:0;font-size:9px;color:#5f7087}.base-help-detail code{display:block;background:#fff;border:1px solid #e1e8f1;border-radius:7px;padding:7px;font-size:9px}.base-help-detail small{font-size:8px;color:#77889e}.base-help-back{justify-self:start;border:0;background:transparent;color:#2563eb;font-size:8px;font-weight:800;cursor:pointer}
@media(max-width:1000px){.v36-base-grid{grid-template-columns:1fr}.v36-base-card.open{grid-column:auto}.v36-base-summary{grid-template-columns:1fr 26px}.v36-base-summary .base-live-expression{grid-column:1/-1}.v36-base-controls{grid-template-columns:1fr}.v36-base-controls .check{padding-bottom:0}.base-help-topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v36-card-advanced .ref-group{grid-template-columns:1fr 1fr}}

/* V36 Base Builder — one formula source, complete help, validation */
.v36-formula-status{display:grid;gap:4px;margin:6px 0;padding:7px 9px;border-radius:8px;font-size:8px;border:1px solid #dce6f2;background:#f8fbff;color:#5f7188}.v36-formula-status.valid{border-color:#cdebdc;background:#f5fcf8;color:#256c4b}.v36-formula-status.invalid{border-color:#ffd4d4;background:#fff8f8;color:#a53535}.v36-formula-status small{font-size:7px;line-height:1.45;color:#74859b}.v36-formula-status small b{color:#455a75}
.v36-help-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.v36-help-section{display:grid;gap:5px;padding:9px 0;border-bottom:1px solid #e7edf4}.v36-help-section:last-child{border-bottom:0}.v36-help-section>b{font-size:10px}.v36-help-section p{font-size:9px!important;line-height:1.5}.v36-help-note{display:grid;gap:4px;padding:9px;border:1px solid #cfe0f7;border-radius:8px;background:#f5f9ff}.v36-help-note b{font-size:9px;color:#244f89}.v36-help-note span{font-size:8px;line-height:1.45;color:#60748e}.v36-reference-manual{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.v36-reference-manual.compact{grid-template-columns:repeat(3,minmax(0,1fr))}.v36-reference-manual>div{display:grid;gap:3px;padding:8px;border:1px solid #e1e8f1;border-radius:8px;background:#fff}.v36-reference-manual b{font-size:9px}.v36-reference-manual span,.v36-reference-manual small{font-size:7.5px;line-height:1.4;color:#74859b}.v36-reference-manual code{font-size:8px!important;padding:5px!important;background:#f8fafc!important}.v36-help-drawer .base-help-detail.open{gap:8px}.v36-help-drawer .base-help-detail>h4{font-size:12px}.v36-help-drawer .base-help-back{font-size:9px}
@media(max-width:1100px){.v36-help-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v36-reference-manual,.v36-reference-manual.compact{grid-template-columns:1fr 1fr}}@media(max-width:700px){.v36-help-grid,.v36-reference-manual,.v36-reference-manual.compact{grid-template-columns:1fr}}

/* V37 — statutory workspace visual system */
.v37-create-base-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:10px 0 12px;padding:14px 16px;border:1px solid #dbe5f2;border-radius:14px;background:#fff}.v37-create-base-bar h3{margin:0 0 3px;font-size:14px}.v37-create-base-bar p{margin:0;color:#718198;font-size:9px}.v37-create-base-bar form{display:flex;gap:8px;align-items:end;margin:0}.v37-create-base-bar input{min-width:260px}
.v36-base-grid{grid-template-columns:1fr!important}.v36-base-card.open{grid-column:auto!important}.v36-base-summary{grid-template-columns:240px 1fr 28px!important;min-height:76px}.v36-base-summary .base-live-expression{justify-content:flex-start!important}.v36-base-card.open .v36-base-summary{background:#f8fbff}
.formula-more>div{min-width:240px!important;grid-template-columns:repeat(2,minmax(105px,1fr))!important;gap:8px!important;padding:10px!important}.formula-more>div button{min-width:0!important;width:100%!important;padding:0 10px!important;justify-content:center!important}.v36-formula-toolbar{position:relative;z-index:3}.formula-reference-browser{position:relative;z-index:1;margin-top:10px!important}
.stat-meta{border-radius:14px!important;border:1px solid #dce5f0!important;box-shadow:none!important;margin-bottom:12px!important}.stat-section{border:1px solid #dce5f0!important;border-radius:15px!important;background:#fff!important;padding:18px 20px!important;margin:0 0 12px!important;box-shadow:0 2px 8px rgba(31,56,88,.025)!important}.stat-section h2{font-size:16px!important;margin:0 0 4px!important}.stat-section>p{font-size:10px!important;color:#718198!important;margin:0 0 12px!important}.statutory-calc-card{position:relative}.rule-paid-by{display:inline-flex!important;margin:3px 0 12px!important;padding:5px 8px!important;border-radius:999px!important;background:#f3f7fc!important;color:#63758e!important;font-size:9px!important}.method-control{max-width:520px}.compact-rule-section{padding:18px 20px!important;margin-bottom:12px!important}
.v37-test-workbench{padding:0!important;overflow:hidden;border:1px solid #dce5f0!important;border-radius:16px!important;background:#fff}.v37-test-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 20px;border-bottom:1px solid #e7edf5;background:#fbfdff}.v37-test-head h2{margin:0 0 4px;font-size:17px}.v37-test-head p{margin:0;color:#718198;font-size:10px}.v37-test-body{padding:18px 20px;display:grid;gap:16px}.v37-test-group{display:grid;gap:9px}.v37-test-group-title{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:800;color:#23334b}.v37-test-group-title:after{content:"";height:1px;background:#e8edf4;flex:1}.v37-test-inputs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.v37-test-inputs label{font-size:9px;font-weight:700;color:#52657f}.v37-test-inputs input{margin-top:5px}.v37-test-note{padding:10px 12px;border-radius:10px;background:#f6f9fd;color:#657892;font-size:9px}.v37-results{display:grid;gap:12px}.v37-result-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.v37-result-kpis>div{padding:12px;border:1px solid #e0e7f0;border-radius:12px;background:#fff}.v37-result-kpis small{display:block;font-size:8px;color:#74859b;font-weight:800;text-transform:uppercase}.v37-result-kpis b{display:block;margin-top:4px;font-size:15px}.v37-trace-grid{display:grid;grid-template-columns:1fr 1.35fr;gap:12px}.v37-trace-card{border:1px solid #e0e7f0;border-radius:13px;padding:14px;background:#fff}.v37-trace-card h3{margin:0 0 10px;font-size:12px}.v37-trace-row{display:grid;grid-template-columns:1fr auto;gap:12px;padding:7px 0;border-bottom:1px solid #edf1f6;font-size:9px}.v37-trace-row:last-child{border-bottom:0}.v37-trace-row span{color:#64758c}.v37-trace-row b{font-size:10px}.v37-calc-table{width:100%;border-collapse:collapse}.v37-calc-table th,.v37-calc-table td{padding:8px 6px;border-bottom:1px solid #edf1f6;text-align:left;font-size:9px}.v37-calc-table th{font-size:8px;color:#718198;text-transform:uppercase}.v37-calc-table td:last-child,.v37-calc-table th:last-child{text-align:right}.v37-calc-table small{display:block;color:#8190a4;margin-top:2px}.v37-zero-state{padding:14px;border:1px dashed #cbd8e8;border-radius:12px;color:#718198;font-size:9px;text-align:center}
@media(max-width:1000px){.v36-base-summary{grid-template-columns:1fr 28px!important}.v36-base-summary .base-live-expression{grid-column:1/-1}.v37-test-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.v37-result-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.v37-trace-grid{grid-template-columns:1fr}.v37-create-base-bar{align-items:stretch;flex-direction:column}.v37-create-base-bar form{align-items:stretch}.v37-create-base-bar input{min-width:0;flex:1}}

.client-status-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.small-status{font-size:17px!important}.client-readiness{padding:12px 16px;border-radius:12px;margin-bottom:18px;font-size:12px}.client-readiness.ok{background:#f0fdf4;border:1px solid #bbf7d0}.client-readiness.warning{background:#fff7ed;border:1px solid #fed7aa}.recent-payroll-row{display:grid;grid-template-columns:150px 1fr 160px 90px;align-items:center;gap:16px;padding:14px 5px;border-bottom:1px solid #eef2f7;text-decoration:none;color:#172033}.recent-payroll-row:hover{background:#f8fbff}.recent-payroll-row strong{text-align:right;color:#2563eb}.company-settings-modal{width:min(980px,94vw);max-height:90vh;overflow:auto}.contact-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;padding:10px;border-bottom:1px solid #eef2f7}.contact-row small{display:block;color:#64748b}.recipient-chip{background:#eaf2ff;color:#1d4ed8;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:900}.contact-add-grid{display:grid;grid-template-columns:1fr 1.4fr .6fr 1fr auto;gap:10px;align-items:end}.import-steps{display:grid;grid-template-columns:1fr 1fr;gap:20px}.preview-good{color:#15803d;font-weight:800}.preview-bad{color:#b91c1c;font-weight:800}.import-error-row{background:#fff7f7}.import-confirm{display:flex;justify-content:flex-end;margin-top:16px}
/* V42 contact editor */
.contacts-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.contacts-head h3{margin-bottom:4px}.unsaved-chip{background:#fff7d6;color:#8a5b00;border:1px solid #f5d77b;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800}.contacts-editor{max-height:320px;overflow:auto;border:1px solid #e3eaf4;border-radius:14px;margin:12px 0}.contact-edit-row{display:grid;grid-template-columns:1fr 1.4fr .65fr 1fr auto;gap:10px;align-items:end;padding:12px;border-bottom:1px solid #eef2f7}.contact-edit-row:last-child{border-bottom:0}.contact-edit-row label{margin:0}.contact-edit-row.pending-delete{opacity:.48;background:#fff5f5;text-decoration:line-through}.contact-edit-row.pending-delete .contact-remove{opacity:1;text-decoration:none}.contacts-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}.contacts-actions button{margin:0}@media(max-width:760px){.contact-edit-row{grid-template-columns:1fr 1fr}.contact-edit-row .contact-remove{justify-self:start}.contacts-actions{align-items:stretch;flex-direction:column}.contacts-actions button{width:100%}}

/* =========================================================
   V43 · Mo Lapaye responsive application shell
   ========================================================= */
:root{
  --ml-navy:#0D1B2A;--ml-navy-2:#12243A;--ml-green:#22C55E;--ml-green-2:#14B8A6;
  --ml-bg:#F5F7FA;--ml-card:#FFFFFF;--ml-text:#152238;--ml-muted:#66758F;--ml-border:#DDE5EF;
  --ml-sidebar:252px;--ml-radius:16px;
}
html{background:var(--ml-bg)}
body.ml-body{background:var(--ml-bg);color:var(--ml-text);min-height:100vh;overflow-x:hidden}
.ml-body aside.ml-sidebar{
  position:fixed!important;inset:0 auto 0 0;width:var(--ml-sidebar)!important;height:100dvh!important;
  background:linear-gradient(180deg,#0D1B2A 0%,#101D30 100%)!important;
  padding:18px 14px 14px!important;box-sizing:border-box;overflow-y:auto;z-index:1000;
  display:flex;flex-direction:column;gap:12px;border-right:1px solid rgba(255,255,255,.05)
}
.ml-sidebar a{margin:0!important}
.ml-product{display:flex;align-items:center;gap:11px;padding:3px 5px 12px;border-bottom:1px solid rgba(255,255,255,.08)}
.ml-product-icon{width:38px;height:38px;object-fit:cover;border-radius:11px;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.ml-product-wordmark{display:flex;flex-direction:column;min-width:0}.ml-product-wordmark strong{font-size:18px;color:white;letter-spacing:-.02em}.ml-product-wordmark span{text-transform:uppercase;font-size:7px;letter-spacing:.18em;color:#9FB1C9;margin-top:1px}
.ml-context-card{padding:2px 4px}.ml-context-label,.ml-nav-label{font-size:8px;letter-spacing:.16em;font-weight:900;color:#6F87A7;margin:4px 0 6px}
.ml-workspace-identity{display:grid!important;grid-template-columns:34px 1fr auto;gap:9px;align-items:center;padding:8px!important;border:1px solid rgba(255,255,255,.08);border-radius:11px;text-decoration:none!important;background:rgba(255,255,255,.035)}
.ml-workspace-identity:hover{background:rgba(255,255,255,.065)}
.ml-workspace-logo,.ml-workspace-fallback{width:34px;height:34px;border-radius:9px;object-fit:contain;background:white;display:grid;place-items:center;color:var(--ml-navy);font-weight:900}
.ml-workspace-identity b{display:block;color:#F8FAFC;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ml-workspace-identity small{display:block;color:#8195B0;font-size:8px;margin-top:2px}.ml-chevron{color:#6F87A7;font-size:18px}
.ml-client-select{width:100%!important;background:#13243A!important;color:white!important;border:1px solid #2A3C54!important;border-radius:10px!important;padding:10px 11px!important;font-size:11px!important}
.ml-client-select option{background:#fff;color:#111827}
.ml-nav{display:flex;flex-direction:column;gap:3px;padding:0 4px}.ml-nav a{display:flex!important;align-items:center;gap:10px;color:#CAD5E4!important;text-decoration:none!important;padding:9px 10px!important;border-radius:9px;font-size:11px!important;transition:.16s ease}.ml-nav a span{width:16px;text-align:center;color:#8296AF}.ml-nav a:hover{background:rgba(255,255,255,.06);color:white!important}.ml-nav a.active{background:linear-gradient(90deg,rgba(34,197,94,.18),rgba(20,184,166,.08));color:white!important;box-shadow:inset 2px 0 0 var(--ml-green)}.ml-nav a.active span{color:#5EE29A}
.ml-nav-workspace{border-top:1px solid rgba(255,255,255,.07);padding-top:8px}
.ml-admin-future{margin:4px;padding:8px 9px;border:1px dashed rgba(94,226,154,.23);border-radius:9px}.ml-admin-future span{display:block;font-size:8px;font-weight:900;letter-spacing:.16em;color:#5EE29A}.ml-admin-future small{display:block;font-size:8px;color:#778BA6;margin-top:3px;line-height:1.35}
.ml-user-card{margin-top:auto;display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:8px;padding:9px;border-top:1px solid rgba(255,255,255,.08)}.ml-user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#22C55E,#14B8A6);display:grid;place-items:center;color:#fff;font-weight:900}.ml-user-card b{display:block;color:#fff;font-size:10px}.ml-user-card span{display:block;color:#8195B0;font-size:8px;text-transform:capitalize}.ml-user-card>a{color:#8195B0!important;text-decoration:none!important;font-size:16px!important}.ml-version{text-align:center;color:#425977;font-size:7px;letter-spacing:.12em}
.ml-main{margin-left:var(--ml-sidebar)!important;width:auto!important;min-height:100dvh;padding:0!important;box-sizing:border-box;background:var(--ml-bg)}
.ml-page-shell{width:min(100%,1680px);margin:0 auto;padding:26px clamp(20px,2.6vw,46px) 60px;box-sizing:border-box}
.ml-main.login-main{margin-left:0!important}.ml-main.login-main .ml-page-shell{width:100%;max-width:none;padding:0}
.ml-mobile-menu{display:none;position:fixed;top:12px;left:12px;z-index:1100;width:42px;height:42px;border-radius:11px!important;padding:0!important;box-shadow:0 6px 22px rgba(13,27,42,.18)}
.ml-sidebar-scrim{display:none}
.persistent-client-nav{display:none!important}
.page-head.ml-responsive-head,.page-head{gap:18px;align-items:flex-start}.page-head h1{letter-spacing:-.025em}
.panel,.stat-card{border-radius:var(--ml-radius)!important;border-color:var(--ml-border)!important;box-shadow:0 4px 18px rgba(15,31,51,.035)}
table{width:100%}.table-wrap,.payroll-table-wrap{max-width:100%;overflow:auto}
input,select,textarea{max-width:100%;box-sizing:border-box}
.two-col,.dashboard-stats,.client-status-grid,.ml-settings-grid{min-width:0}
.ml-settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.ml-brand-preview{display:flex;align-items:center;gap:13px;padding:14px;background:#F8FAFC;border:1px solid var(--ml-border);border-radius:13px;margin:12px 0}
.ml-brand-preview img,.ml-logo-placeholder{width:52px;height:52px;border-radius:12px;object-fit:contain;background:#fff;border:1px solid #E5EAF1;display:grid;place-items:center;font-size:22px;font-weight:900}
.ml-brand-preview b{display:block}.ml-brand-preview span{display:block;color:var(--ml-muted);font-size:11px;margin-top:3px}
.ml-logo-upload{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.ml-logo-upload label{margin:0}
.ml-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.ml-section-head h2{margin:0}.ml-section-head p{margin:4px 0 0;color:var(--ml-muted);font-size:12px}
.ml-setup-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:13px}.ml-setup-steps>div{padding:14px;border:1px solid var(--ml-border);border-radius:13px;background:#FAFBFD}.ml-setup-steps span{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#EAFBF1;color:#16A34A;font-weight:900;font-size:11px;margin-bottom:9px}.ml-setup-steps b{display:block;font-size:12px}.ml-setup-steps small{display:block;color:var(--ml-muted);font-size:9px;margin-top:3px;line-height:1.35}
@media (min-width:1500px){.ml-page-shell{width:min(100%,1760px)}.panel{padding-left:22px!important;padding-right:22px!important}}
@media (min-width:1900px){:root{--ml-sidebar:270px}.ml-page-shell{width:min(92vw,1900px)}}
@media (max-width:1180px){
  .ml-settings-grid{grid-template-columns:1fr}.ml-setup-steps{grid-template-columns:1fr 1fr}
  .dashboard-stats.client-status-grid{grid-template-columns:1fr 1fr}.contact-add-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:860px){
  :root{--ml-sidebar:270px}
  .ml-body aside.ml-sidebar{transform:translateX(-105%);transition:transform .22s ease;box-shadow:15px 0 40px rgba(13,27,42,.18)}
  .ml-body aside.ml-sidebar.open{transform:translateX(0)}
  .ml-mobile-menu{display:grid;place-items:center}.ml-sidebar-scrim{position:fixed;inset:0;background:rgba(7,15,27,.42);z-index:990}.ml-sidebar-scrim.open{display:block}
  .ml-main{margin-left:0!important}.ml-page-shell{padding:70px 18px 42px}
  .two-col,.client-status-grid,.dashboard-stats{grid-template-columns:1fr!important}.import-steps{grid-template-columns:1fr!important}.recent-payroll-row{grid-template-columns:1fr auto!important}
}
@media (max-width:560px){
  .ml-page-shell{padding-left:12px;padding-right:12px}.page-head{flex-direction:column;align-items:stretch!important}
  .actions-inline{width:100%;display:flex;flex-wrap:wrap}.actions-inline .btn,.actions-inline button{flex:1}
  .ml-setup-steps{grid-template-columns:1fr}.ml-logo-upload{grid-template-columns:1fr}
  .panel{padding:14px!important;border-radius:13px!important}.switch-modal,.company-settings-modal{width:calc(100vw - 20px)!important;max-height:92dvh}
  .contact-add-grid{grid-template-columns:1fr!important}
}

/* =========================================================
   V44 · Context architecture, subtle responsive type & login
   ========================================================= */
:root{--ml-navy:#102238;--ml-navy-2:#132940}
.ml-body aside.ml-sidebar{background:linear-gradient(180deg,#102238 0%,#0F2034 100%)!important}

/* Subtle only: ~5–8% lift on larger screens, never oversized. */
@media (min-width:1200px){
  .ml-page-shell{font-size:clamp(14px,.77vw,15px)}
  .ml-nav a,.ml-client-select{font-size:clamp(11px,.64vw,12px)!important}
  .ml-product-wordmark strong{font-size:clamp(18px,1.08vw,20px)}
  .page-head h1{font-size:clamp(26px,1.7vw,30px)}
  input,select,textarea,button,.btn{font-size:1em}
}
.ml-scope-box,.ml-context-banner{border:1px solid #DCE6EF;background:#F8FBFD;border-radius:12px;padding:12px 14px;margin:12px 0}
.ml-scope-box span,.ml-context-banner>span{display:block;color:#67809C;font-size:8px;font-weight:900;letter-spacing:.14em}
.ml-scope-box b,.ml-context-banner>b{display:block;margin-top:3px}
.ml-scope-box small,.ml-context-banner small{display:block;color:#6B7B91;margin-top:4px}
.ml-scope-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:8px;font-weight:900;letter-spacing:.07em}
.ml-scope-pill.workspace{background:#EAFBF1;color:#168347}.ml-scope-pill.client{background:#EAF2FF;color:#285FB8}
.ml-empty-state{padding:24px;text-align:center;color:#718096}.ml-empty-state b,.ml-empty-state span{display:block}.ml-empty-state span{margin-top:4px;font-size:11px}
.ml-users-settings{margin-top:18px}

/* Login is independent of the authenticated shell and always centered. */
.ml-main.login-main.standalone-login{margin:0!important;width:100%!important;max-width:none!important;min-height:100dvh!important;background:radial-gradient(circle at 20% 20%,rgba(34,197,94,.07),transparent 30%),#F5F7FA!important}
.ml-main.login-main.standalone-login .ml-page-shell{width:100%!important;max-width:none!important;min-height:100dvh!important;margin:0!important;padding:24px!important;display:grid!important;place-items:center!important}
.ml-login-shell{width:100%;min-height:calc(100dvh - 48px);display:grid;place-items:center}
.ml-login-card{width:min(430px,100%);box-sizing:border-box;background:#fff;border:1px solid #E2E8F0;border-radius:22px;padding:32px;box-shadow:0 22px 60px rgba(13,27,42,.10)}
.ml-login-brand{display:flex;align-items:center;gap:12px;padding-bottom:18px;margin-bottom:24px;border-bottom:1px solid #EDF2F7}.ml-login-brand img{width:46px;height:46px;border-radius:13px;object-fit:cover}.ml-login-brand strong{display:block;font-size:21px}.ml-login-brand span{display:block;font-size:8px;letter-spacing:.16em;color:#708198;text-transform:uppercase;margin-top:2px}.ml-login-card h1{margin:0}.ml-login-card>p{margin:6px 0 18px;color:#66758F}.ml-login-form button{width:100%;margin-top:8px}.ml-demo{margin-top:20px!important}.ml-login-version{text-align:center;margin-top:12px;color:#9AA8B8;font-size:8px}
@media(max-width:560px){.ml-main.login-main.standalone-login .ml-page-shell{padding:14px!important}.ml-login-card{padding:23px;border-radius:18px}.ml-login-shell{min-height:calc(100dvh - 28px)}}


/* =========================================================
   V45 · Payroll Workbench / Focus Mode
   ========================================================= */
.ml-sidebar-collapse{
  position:absolute;top:18px;right:-13px;width:26px;height:26px;border-radius:50%!important;
  display:grid;place-items:center;padding:0!important;background:#fff!important;color:#16304B!important;
  border:1px solid #D7E1EC!important;box-shadow:0 5px 14px rgba(13,27,42,.14);z-index:3;font-size:18px!important
}
.ml-body aside.ml-sidebar{overflow:visible}
.ml-body aside.ml-sidebar>.ml-nav,.ml-body aside.ml-sidebar>.ml-context-card,.ml-body aside.ml-sidebar>.ml-user-card,.ml-body aside.ml-sidebar>.ml-admin-future{overflow:visible}
.ml-sidebar-collapsed{--ml-sidebar:76px}
.ml-sidebar-collapsed .ml-sidebar{padding-left:10px!important;padding-right:10px!important}
.ml-sidebar-collapsed .ml-product{justify-content:center;padding-left:0;padding-right:0}
.ml-sidebar-collapsed .ml-product-wordmark,
.ml-sidebar-collapsed .ml-context-card,
.ml-sidebar-collapsed .ml-nav-label,
.ml-sidebar-collapsed .ml-nav-workspace,
.ml-sidebar-collapsed .ml-admin-future,
.ml-sidebar-collapsed .ml-user-card>div:nth-child(2),
.ml-sidebar-collapsed .ml-user-card>a,
.ml-sidebar-collapsed .ml-version{display:none!important}
.ml-sidebar-collapsed .ml-product-icon{width:40px;height:40px}
.ml-sidebar-collapsed .ml-nav{padding:4px 0;gap:5px}
.ml-sidebar-collapsed .ml-nav a{justify-content:center;padding:11px!important;font-size:0!important;position:relative}
.ml-sidebar-collapsed .ml-nav a span{font-size:14px!important;width:auto}
.ml-sidebar-collapsed .ml-nav a:hover:after{
  content:attr(title);position:absolute;left:58px;top:50%;transform:translateY(-50%);
  white-space:nowrap;background:#0D1B2A;color:#fff;padding:7px 9px;border-radius:7px;font-size:10px;
  box-shadow:0 6px 18px rgba(0,0,0,.18);z-index:1200
}
.ml-sidebar-collapsed .ml-user-card{display:flex!important;justify-content:center;padding:9px 0}
.ml-sidebar-collapsed .ml-user-avatar{width:34px;height:34px}
.ml-sidebar-collapsed .ml-sidebar-collapse{right:-13px}
.ml-sidebar-collapsed .ml-main{margin-left:76px!important}

.payroll-workbench-head{
  display:grid;grid-template-columns:minmax(250px,1fr) auto auto;gap:16px;align-items:end;
  margin-bottom:14px;padding:4px 2px 0
}
.payroll-workbench-title .eyebrow{margin-bottom:5px;display:block}
.payroll-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.payroll-title-line h1{margin:0;font-size:clamp(24px,1.7vw,30px);letter-spacing:-.03em}
.payroll-workbench-title p{margin:3px 0 0;font-size:11px;color:#73839A}
.payroll-status-pill{
  display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:8px;font-weight:900;
  letter-spacing:.08em;text-transform:uppercase;background:#FFF3C4;color:#9A6500
}
.payroll-status-pill.finalised,.payroll-status-pill.approved{background:#E7F8EE;color:#137A42}
.payroll-status-pill.awaiting_approval{background:#EAF2FF;color:#285FB8}
.payroll-period-picker{display:flex;gap:8px;align-items:end;margin:0}
.payroll-period-picker label{margin:0;font-size:8px;font-weight:900;letter-spacing:.08em;color:#6B7A90;text-transform:uppercase}
.payroll-period-picker input{display:block;margin-top:5px;min-width:165px;background:#fff}
.payroll-period-picker button{height:40px;margin:0}
.payroll-head-actions{display:flex;gap:8px;align-items:center}
.payroll-head-actions .compact-back{width:40px;height:40px;display:grid;place-items:center;padding:0!important;text-decoration:none}
.payroll-focus-btn.active{border-color:#22C55E!important;color:#168347!important;background:#EEFBF3!important}

.payroll-commandbar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;margin-bottom:10px;
  background:#fff;border:1px solid #DDE5EF;border-radius:14px;box-shadow:0 3px 14px rgba(15,31,51,.025)
}
.payroll-version b{display:block}.payroll-version small{display:block;margin-top:3px;color:#748399;font-size:9px}
.payroll-command-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.payroll-command-actions .btn,.payroll-command-actions button{min-height:38px;margin:0}
.inline-form{margin:0}
.payroll-action-menu{position:relative}
.payroll-action-menu summary{list-style:none;cursor:pointer;min-height:38px;display:flex;align-items:center}
.payroll-action-menu summary::-webkit-details-marker{display:none}
.payroll-action-popover{
  position:absolute;right:0;top:calc(100% + 7px);width:250px;background:#fff;border:1px solid #DDE5EF;border-radius:12px;
  padding:7px;box-shadow:0 14px 34px rgba(13,27,42,.14);z-index:60
}
.payroll-action-popover a{display:flex;gap:10px;align-items:center;padding:10px;border-radius:9px;text-decoration:none;color:#172033}
.payroll-action-popover a:hover{background:#F5F8FC}
.payroll-action-popover b,.payroll-action-popover small{display:block}.payroll-action-popover small{font-size:9px;color:#7B899C;margin-top:2px}

.payroll-summary{
  display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;margin-bottom:10px;
  border:1px solid #DDE5EF;border-radius:13px;overflow:hidden;background:#DDE5EF
}
.payroll-summary>div{background:#fff;padding:10px 12px;min-width:0}
.payroll-summary small{display:block;font-size:7px;font-weight:900;letter-spacing:.09em;color:#76859A}
.payroll-summary b{display:block;margin-top:3px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.payroll-summary .summary-net{background:#F1FCF5}.payroll-summary .summary-net b{color:#168347}

.payroll-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:9px 0}
.payroll-search-filters{display:flex;align-items:center;gap:9px;min-width:0}
.payroll-search-box{width:min(430px,42vw)}
.payroll-filter-tabs{display:flex;background:#EDF2F7;padding:3px;border-radius:10px}
.payroll-filter-tabs button{
  border:0!important;background:transparent!important;color:#66758F!important;box-shadow:none!important;
  padding:7px 9px!important;min-height:auto!important;font-size:9px!important;margin:0!important;border-radius:8px!important
}
.payroll-filter-tabs button.active{background:#fff!important;color:#17324C!important;box-shadow:0 2px 7px rgba(13,27,42,.08)!important}
.payroll-column-menu{width:280px}
.column-menu-title small{display:block;color:#73839A;margin-top:3px;font-size:9px}

.payroll-grid-panel{padding:0!important;overflow:visible!important}
.payroll-grid-hint{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:9px 12px;border-bottom:1px solid #E7EDF4;font-size:9px;color:#748399}
.payroll-grid-hint span{display:flex;align-items:center;gap:6px}
.editable-key,.calculated-key{width:10px;height:10px;border-radius:3px;display:inline-block}.editable-key{background:#fff;border:1px solid #BFD1E3}.calculated-key{background:#F5F7FA;border:1px solid #E1E7EE}

.payroll-table-wrap{overflow:auto;max-height:calc(100dvh - 315px);min-height:300px;position:relative}
.payroll-workbench-table{border-collapse:separate!important;border-spacing:0!important;min-width:max-content!important;width:max-content!important}
.payroll-workbench-table th,.payroll-workbench-table td{height:54px;box-sizing:border-box;white-space:nowrap}
.payroll-workbench-table thead th{position:sticky;top:0;z-index:15;background:#F8FAFC;border-bottom:1px solid #DCE4EE}
.payroll-workbench-table .calculated-col{background:#FAFBFC}
.payroll-workbench-table .editable-head{background:#F5F9FD}
.payroll-workbench-table .editable-cell{background:#FFF}
.payroll-workbench-table .editable-cell input{background:#FFF;border-color:#C9D7E5}
.payroll-workbench-table .sticky-employee{position:sticky;left:0;z-index:18;min-width:215px;max-width:215px;background:#fff!important;box-shadow:7px 0 10px -12px rgba(13,27,42,.55)}
.payroll-workbench-table thead .sticky-employee{z-index:24;background:#F8FAFC!important}
.payroll-workbench-table .sticky-actions{position:sticky;right:0;z-index:18;min-width:62px;width:62px;background:#fff!important;box-shadow:-7px 0 10px -12px rgba(13,27,42,.55)}
.payroll-workbench-table thead .sticky-actions{z-index:24;background:#F8FAFC!important}
.payroll-workbench-table .sticky-net{position:sticky;right:62px;z-index:17;min-width:120px;background:#F0F3F6!important}
.payroll-workbench-table thead .sticky-net{z-index:23}
.payroll-workbench-table tbody tr:hover td:not(.sticky-net){background:#F9FCFF}
.payroll-workbench-table tbody tr.dirty-row td{box-shadow:inset 0 1px 0 #DDF5E7,inset 0 -1px 0 #DDF5E7}
.payroll-workbench-table tbody tr.dirty-row .sticky-employee:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#22C55E
}
.row-state-pill{display:inline-flex;margin-top:5px;padding:2px 6px;border-radius:999px;background:#F1F3F6;color:#7A8798;font-size:7px;font-weight:900}
.quick-save-note{display:flex;justify-content:space-between;gap:16px;padding:8px 12px!important;font-size:9px!important}
#dirtyStatus{font-weight:800;color:#758399}.dirty-row~* #dirtyStatus{color:#168347}

.row-action-menu{position:relative;display:inline-block}
.row-action-menu summary{list-style:none;width:30px;height:30px;display:grid;place-items:center;border:1px solid #D8E1EB;border-radius:8px;cursor:pointer;font-size:18px;color:#50627A;background:#fff}
.row-action-menu summary::-webkit-details-marker{display:none}
.row-action-menu>div{
  position:absolute;right:0;top:36px;width:190px;background:#fff;border:1px solid #DDE5EF;border-radius:10px;padding:6px;
  box-shadow:0 12px 30px rgba(13,27,42,.15);z-index:70
}
.row-action-menu a,.row-action-menu button{
  display:block;width:100%;text-align:left;padding:8px 9px!important;border:0!important;background:transparent!important;
  color:#23344B!important;text-decoration:none;border-radius:7px!important;font-size:10px!important;box-shadow:none!important;margin:0!important
}
.row-action-menu a:hover,.row-action-menu button:hover{background:#F4F7FA!important}
.row-action-menu .danger-menu-action{color:#B42318!important}.row-action-menu .restore-menu-action{color:#168347!important}

.payroll-empty-period{display:flex;justify-content:space-between;align-items:center;gap:20px}
.payroll-empty-period h2,.payroll-empty-period p{margin:0}.payroll-empty-period p{margin-top:4px}

/* Focus grid: strip the shell down to the things needed for payroll working. */
.payroll-focus{--ml-sidebar:76px}
.payroll-focus .ml-sidebar{padding-left:10px!important;padding-right:10px!important}
.payroll-focus .ml-product-wordmark,.payroll-focus .ml-context-card,.payroll-focus .ml-nav-label,.payroll-focus .ml-nav-workspace,.payroll-focus .ml-admin-future,.payroll-focus .ml-user-card>div:nth-child(2),.payroll-focus .ml-user-card>a,.payroll-focus .ml-version{display:none!important}
.payroll-focus .ml-product{justify-content:center}.payroll-focus .ml-nav{padding:4px 0}.payroll-focus .ml-nav a{justify-content:center;padding:11px!important;font-size:0!important}.payroll-focus .ml-nav a span{font-size:14px!important;width:auto}
.payroll-focus .ml-user-card{display:flex!important;justify-content:center}
.payroll-focus .ml-main{margin-left:76px!important}
.payroll-focus .ml-page-shell{max-width:none!important;width:100%!important;padding-top:12px!important;padding-left:16px!important;padding-right:16px!important}
.payroll-focus .payroll-workbench-head{grid-template-columns:1fr auto auto;margin-bottom:7px}
.payroll-focus .payroll-workbench-title p,.payroll-focus .payroll-workbench-title .eyebrow{display:none}
.payroll-focus .payroll-title-line h1{font-size:21px}
.payroll-focus .payroll-summary>div{padding-top:7px;padding-bottom:7px}
.payroll-focus .payroll-table-wrap{max-height:calc(100dvh - 235px)}

@media(max-width:1180px){
  .payroll-summary{grid-template-columns:repeat(3,1fr)}
  .payroll-workbench-head{grid-template-columns:1fr auto}
  .payroll-head-actions{grid-column:2}.payroll-period-picker{grid-row:2;grid-column:1/3}
  .payroll-commandbar{align-items:flex-start}.payroll-command-actions{max-width:70%}
}
@media(max-width:860px){
  .ml-sidebar-collapse{display:none}
  .ml-sidebar-collapsed .ml-main,.payroll-focus .ml-main{margin-left:0!important}
  .payroll-workbench-head{grid-template-columns:1fr}.payroll-period-picker,.payroll-head-actions{grid-column:auto!important;grid-row:auto!important}
  .payroll-commandbar{flex-direction:column;align-items:stretch}.payroll-command-actions{max-width:none;justify-content:flex-start}
  .payroll-summary{grid-template-columns:1fr 1fr}
  .payroll-toolbar{align-items:stretch;flex-direction:column}.payroll-search-filters{flex-direction:column;align-items:stretch}.payroll-search-box{width:100%}
  .payroll-filter-tabs{width:max-content;max-width:100%;overflow:auto}
  .payroll-table-wrap{max-height:none}
}
@media(max-width:560px){
  .payroll-summary{grid-template-columns:1fr 1fr}.payroll-command-actions .btn,.payroll-command-actions form,.payroll-command-actions button{flex:1}
  .payroll-command-actions form button{width:100%}.payroll-period-picker{flex-wrap:wrap}.payroll-period-picker label{flex:1}.payroll-period-picker input{min-width:0;width:100%}
}

.locked-default-note{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;background:#F0F4F8;color:#66758F;font-size:8px;font-weight:900;letter-spacing:.04em}


/* =========================================================
   V46 · Payroll Workbench refinement
   ========================================================= */
.flash{transition:opacity .28s ease,transform .28s ease,max-height .28s ease,margin .28s ease,padding .28s ease}
.flash.flash-leave{opacity:0;transform:translateY(-8px);max-height:0;margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important;overflow:hidden}

.payroll-primary-head{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  margin:0 0 10px;padding:4px 2px;
}
.payroll-identity{min-width:0}
.payroll-identity .payroll-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.payroll-identity h1{margin:0;font-size:clamp(24px,1.7vw,30px);letter-spacing:-.03em}
.payroll-identity>p{margin:3px 0 0;color:#75849A}
.payroll-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:4px;color:#728197;font-size:9px}
.payroll-meta b{color:#26394F}
.approval-stale{display:inline-flex;padding:3px 7px;border-radius:999px;background:#FFF3CD;color:#8A6100;font-weight:800}
.payroll-top-actions{display:flex;align-items:end;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.payroll-top-actions .btn,.payroll-top-actions button{margin:0;min-height:38px}
.payroll-period-picker label{font-size:7px}
.payroll-period-picker input{min-width:155px}
.icon-action{width:40px!important;padding:0!important;display:grid!important;place-items:center;font-size:16px!important}
.compact-back{width:40px;height:40px;display:grid;place-items:center;padding:0!important;text-decoration:none}

.payroll-summary{margin-top:0}
.payroll-viewbar{
  display:flex;align-items:center;gap:14px;min-height:36px;padding:6px 10px;margin:0;
  border:1px solid #DDE5EF;border-bottom:0;border-radius:12px 12px 0 0;background:#F9FBFD
}
.payroll-viewtoggles{display:flex;align-items:center;gap:5px}
.viewbar-label{font-size:8px;font-weight:900;letter-spacing:.08em;color:#7A899D;text-transform:uppercase;margin-right:3px}
.payroll-viewtoggles button{
  display:flex;align-items:center;gap:6px;min-height:26px!important;padding:5px 8px!important;margin:0!important;
  border:1px solid transparent!important;background:transparent!important;color:#6C7C91!important;
  box-shadow:none!important;font-size:9px!important;border-radius:8px!important
}
.payroll-viewtoggles button.active{background:#fff!important;color:#20344D!important;border-color:#D9E3EE!important;box-shadow:0 2px 7px rgba(13,27,42,.05)!important}
.view-dot{width:9px;height:9px;border-radius:3px;display:inline-block}
.view-dot.editable{background:#fff;border:1px solid #AFC4D9}.view-dot.calculated{background:#EDF1F5;border:1px solid #D6DFE8}
.payroll-save-global{font-size:9px;font-weight:800;margin-left:auto}.payroll-save-global.saved{color:#168347}.payroll-save-global.saving{color:#6C7C91}.payroll-save-global.error{color:#B42318}
.payroll-grid-note{font-size:9px;color:#748399}
.payroll-grid-panel{border-radius:0 0 16px 16px!important}

/* Fit the screen first; scroll only when the required columns genuinely cannot fit. */
.payroll-workbench-table{
  width:100%!important;
  min-width:calc(1080px + (var(--dynamic-cols, 0) * 125px))!important;
  table-layout:auto!important;
}
.payroll-workbench-table th,.payroll-workbench-table td{padding-left:10px!important;padding-right:10px!important}
.payroll-workbench-table .sticky-employee{min-width:210px;max-width:none!important;width:16%}
.payroll-workbench-table .editable-col{min-width:112px}
.payroll-workbench-table .calculated-col{min-width:76px}
.payroll-workbench-table .sticky-net{min-width:108px}
.payroll-workbench-table .sticky-actions{min-width:64px}
.payroll-table-wrap{width:100%;overflow:auto}
.payroll-focus .payroll-workbench-table{width:100%!important}
.payroll-focus .ml-page-shell{width:100%!important;max-width:none!important}
.payroll-focus .payroll-primary-head{margin-bottom:7px}
.payroll-focus .payroll-meta{margin-top:2px}
.payroll-focus .payroll-summary>div{padding-top:7px;padding-bottom:7px}
.payroll-focus .payroll-table-wrap{max-height:calc(100dvh - 210px)}
@media(min-width:1500px){
  .payroll-workbench-table{min-width:100%!important}
}
.payroll-grid-panel.hide-input-cols .editable-col{display:none}
.payroll-grid-panel.hide-calculated-cols .calculated-col{display:none}

.employee-name-line{display:flex;align-items:center;gap:6px;min-width:0}
.line-status{display:inline-flex;align-items:center;padding:2px 5px;border-radius:999px;font-size:6px;font-weight:900;letter-spacing:.06em}
.line-status.finalised{background:#E8F1FA;color:#2D5B88}.line-status.sent{background:#EAF2FF;color:#285FB8}.line-status.approved{background:#E7F8EE;color:#147642}.line-status.changed{background:#FFF3CD;color:#8A6100}
.row-save-state{display:block;min-height:10px;margin-top:2px;font-size:7px;font-weight:800}
.row-save-state.waiting,.row-save-state.saving{color:#8290A2}.row-save-state.saved{color:#168347}.row-save-state.error{color:#B42318}
.finalised-row .editable-col{background:#F5F7F9!important;color:#6F7C8D}
.finalised-row input{display:none}

/* Cleaner employee action popover. */
.row-action-menu>div.employee-action-card{
  width:215px;padding:7px;border-radius:12px;border:1px solid #DCE5EF;background:#fff;
  box-shadow:0 14px 34px rgba(13,27,42,.16)
}
.row-action-menu.open-up>div.employee-action-card{top:auto!important;bottom:36px}
.employee-action-card a,.employee-action-card button{
  display:flex!important;align-items:center!important;gap:9px!important;min-height:36px;
  border-radius:8px!important;padding:8px 9px!important
}
.employee-action-card form{margin:0}
.menu-icon{width:20px;height:20px;display:grid;place-items:center;border-radius:6px;background:#F1F5F9;color:#47627D;font-size:11px;flex:0 0 20px}
.employee-action-card .danger-menu-action .menu-icon{background:#FFF0EE;color:#B42318}
.employee-action-card .restore-menu-action .menu-icon{background:#EAFBF1;color:#168347}
.menu-separator{height:1px;background:#EEF2F6;margin:5px 2px}

/* Approval pages */
.approval-hub-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:18px;margin-bottom:18px}
.approval-recipient-summary{display:flex;flex-direction:column;gap:4px;padding:10px 12px;margin:10px 0 14px;background:#F8FAFC;border:1px solid #E4EAF1;border-radius:10px;font-size:9px;color:#66758F}
.approval-recipient-summary b{color:#1E334A;font-size:8px;margin-right:5px}
.approval-attachment-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0 14px}
.attachment-option{display:flex!important;align-items:center;gap:9px;padding:10px 12px!important;margin:0!important;border:1px solid #DCE5EF;border-radius:10px;background:#FAFBFD}
.attachment-option input{width:auto!important;margin:0}.attachment-option b,.attachment-option small{display:block}.attachment-option small{font-size:9px;color:#76859A;margin-top:2px}
.employee-approval-status{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;padding:0!important;overflow:hidden;background:#DDE5EF;margin-bottom:18px}
.employee-approval-status>div{background:#fff;padding:12px}.employee-approval-status small{display:block;font-size:7px;font-weight:900;letter-spacing:.08em;color:#76859A}.employee-approval-status b{display:block;margin-top:4px}
.employee-lock-card{display:flex;align-items:center;justify-content:space-between;gap:20px}.employee-lock-card h2,.employee-lock-card p{margin:0}.employee-lock-card p{margin-top:4px}
.client-approval-public{max-width:760px;margin:40px auto}

@media(max-width:1180px){
  .payroll-primary-head{align-items:flex-start}.payroll-top-actions{max-width:68%}
  .approval-hub-grid{grid-template-columns:1fr}
}
@media(max-width:860px){
  .payroll-primary-head{flex-direction:column;align-items:stretch}.payroll-top-actions{max-width:none;justify-content:flex-start}
  .payroll-save-global{margin-left:0}.payroll-viewbar{flex-wrap:wrap}.payroll-grid-note{width:100%}
  .employee-approval-status{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .approval-attachment-grid{grid-template-columns:1fr}.employee-lock-card{flex-direction:column;align-items:stretch}
}

.approval-extra-recipients{margin:0 0 12px;border:1px dashed #D5E0EA;border-radius:10px;padding:8px 10px;background:#FBFCFE}
.approval-extra-recipients summary{cursor:pointer;font-size:9px;font-weight:800;color:#52677F}
.approval-extra-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:9px}
@media(max-width:860px){.approval-extra-grid{grid-template-columns:1fr}}

/* V47 */
.payroll-period-picker label{font-size:10px!important;letter-spacing:.06em}.payroll-period-picker input{font-size:13px!important;font-weight:700!important;min-width:190px}
.ml-page-shell,.payroll-grid-panel,.payroll-table-wrap{max-width:none!important;width:100%!important}
.payroll-workbench-table{width:100%!important;min-width:0!important;table-layout:auto!important;font-size:12px!important}
.payroll-workbench-table th{font-size:9px!important;padding:11px 7px!important}.payroll-workbench-table td{font-size:12px!important;padding:11px 7px!important}
.payroll-workbench-table .employee-name-line b{font-size:13px!important}.payroll-workbench-table td small{font-size:10px!important}.line-status{font-size:8px!important}
.payroll-summary small{font-size:8px!important}.payroll-summary b{font-size:13px!important}
.payroll-workbench-table .money-input{width:clamp(68px,6vw,105px)!important;min-width:68px}.payroll-workbench-table th:first-child,.payroll-workbench-table td:first-child{min-width:185px}
.row-action-menu>div.employee-action-card{position:fixed!important;z-index:10050!important;width:230px!important}
.employee-menu-person{padding:9px 10px 10px;border-bottom:1px solid #EEF2F6;margin-bottom:5px}.employee-menu-person b{display:block;font-size:12px}.employee-menu-person small{display:block;font-size:9px;color:#8290A2;margin-top:2px}
.employee-row.action-active td{background:#F3FAFF!important;box-shadow:inset 0 1px #9ED7F5,inset 0 -1px #9ED7F5}.employee-row.action-active td:first-child{box-shadow:inset 3px 0 #37B6E9,inset 0 1px #9ED7F5,inset 0 -1px #9ED7F5}
.payroll-focus .ml-sidebar-toggle{pointer-events:auto!important;display:grid!important;z-index:11000!important}
.ml-email-settings{margin-top:18px}.ml-test-email-form{display:flex;align-items:end;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid #EEF2F6}.ml-test-email-form label{margin:0;min-width:280px}


/* =========================================================
   V48 · Public approval + payslip distribution
   ========================================================= */
.line-status.payslip-sent{background:#E8F8EF;color:#14804A}
.payslip-popover{min-width:285px}
.payroll-action-popover form{margin:0}
.payroll-action-popover form button{
  width:100%;display:flex;align-items:center;gap:10px;text-align:left;
  background:transparent!important;color:#172033!important;border:0!important;
  box-shadow:none!important;border-radius:9px!important;padding:9px 10px!important;
}
.payroll-action-popover form button:hover{background:#F5F8FB!important}
.payroll-action-popover form button div{display:flex;flex-direction:column}
.payroll-action-popover form button small{font-size:9px;color:#7A899D;margin-top:2px;font-weight:500}
.payroll-next-step{display:flex;align-items:center;justify-content:space-between;gap:20px}
.payroll-next-step h2,.payroll-next-step p{margin:0}.payroll-next-step p{margin-top:5px}
.next-step-actions{display:flex;gap:10px;flex-wrap:wrap}.next-step-actions form{margin:0}

.ml-scope-pill.workspace.verified{background:#E8F8EF;color:#08783D}
.ml-scope-pill.workspace.configured{background:#FFF4D6;color:#8A6200}
.email-verified-note{margin:0 0 12px;padding:8px 10px;border-radius:9px;background:#F1FBF5;color:#147642;font-size:10px;font-weight:700}

/* Public approval pages never inherit the authenticated app shell. */
.public-approval-body{
  margin:0;background:#F4F7FA;color:#132238;font-family:inherit;min-height:100vh;
}
.public-approval-shell{max-width:1080px;margin:0 auto;padding:28px 20px 36px}
.public-approval-brand{display:flex;align-items:center;gap:10px;margin-bottom:20px}
.public-approval-brand img{width:42px;height:42px;border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.08)}
.public-approval-brand b{display:block;font-size:17px}.public-approval-brand small{display:block;font-size:8px;letter-spacing:.14em;color:#718096;margin-top:2px}
.public-review-card{background:#fff;border:1px solid #DFE7EF;border-radius:20px;padding:28px;box-shadow:0 12px 30px rgba(15,23,42,.04)}
.public-review-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.public-review-head h1{font-size:28px;margin:3px 0 4px;letter-spacing:-.025em}.public-review-head p{margin:0;color:#738197}
.public-eyebrow{font-size:9px;font-weight:900;letter-spacing:.12em;color:#6A7B91}
.public-status{display:inline-flex;padding:7px 10px;border-radius:999px;background:#EEF3F8;font-size:9px;font-weight:900;text-transform:uppercase}
.public-status.approved,.public-status.finalised{background:#E8F8EF;color:#147642}
.public-status.awaiting_approval{background:#EAF2FF;color:#245FB6}
.public-status.changes_requested{background:#FFF2E8;color:#9C4E15}
.public-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}
.public-summary-grid.three{grid-template-columns:repeat(3,1fr)}
.public-summary-grid>div{padding:14px 15px;border:1px solid #E6ECF2;border-radius:12px;background:#FAFBFD}
.public-summary-grid small{display:block;font-size:8px;font-weight:900;letter-spacing:.08em;color:#718096}
.public-summary-grid b{display:block;margin-top:6px;font-size:16px}
.public-downloads{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}
.public-review-table-wrap{overflow:auto;border:1px solid #E5EBF1;border-radius:12px}
.public-review-table{width:100%;border-collapse:collapse}.public-review-table th,.public-review-table td{padding:12px 14px;border-bottom:1px solid #EDF1F5;text-align:left;font-size:12px}
.public-review-table th{font-size:9px;letter-spacing:.06em;color:#718096;background:#FAFBFD}.public-review-table tr:last-child td{border-bottom:0}
.public-approval-form{margin-top:22px;padding-top:20px;border-top:1px solid #E8EDF2}
.public-approval-form label{display:block;margin-bottom:12px;font-size:10px;font-weight:700}
.public-approval-form input,.public-approval-form textarea{width:100%;box-sizing:border-box;margin-top:5px}
.public-approval-actions{display:flex;justify-content:flex-end;gap:10px}
.public-success-confirmation{display:flex;gap:13px;align-items:flex-start;margin-top:22px;padding:16px;border-radius:13px;background:#EDFAF3;border:1px solid #CDEEDC}
.public-success-confirmation>span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#18A55B;color:#fff;font-weight:900}
.public-success-confirmation h2{margin:1px 0 4px;font-size:16px}.public-success-confirmation p{margin:0;color:#526579}
.public-warning{margin-top:20px;padding:13px 14px;border-radius:11px;background:#FFF6E6;border:1px solid #F4DEAD;color:#785719;font-size:11px}
.public-approval-footer{text-align:center;margin-top:16px;color:#8A98AA;font-size:9px}
.public-flashes .flash{margin-bottom:14px}
@media(max-width:760px){
  .public-approval-shell{padding:16px 12px 26px}.public-review-card{padding:18px}
  .public-summary-grid,.public-summary-grid.three{grid-template-columns:1fr 1fr}
  .public-review-head{flex-direction:column}.public-review-head h1{font-size:23px}
  .payroll-next-step{flex-direction:column;align-items:flex-start}
}
@media(max-width:480px){
  .public-summary-grid,.public-summary-grid.three{grid-template-columns:1fr}
  .public-approval-actions{flex-direction:column}.public-approval-actions button{width:100%}
}


/* =========================================================
   V49 · TRUE ADAPTIVE LAYOUT
   Principle: layout creates space; typography does not shrink to create it.
   ========================================================= */
:root{
  --app-vw:100vw;
  --app-vh:100vh;
  --app-sidebar-live:var(--ml-sidebar,250px);
  --app-main-live:calc(100vw - var(--app-sidebar-live));
  --app-gutter:clamp(16px,1.55vw,34px);
  --app-section-gap:clamp(12px,1.1vw,20px);
  --app-readable:13px;
  --app-small:11px;
}

/* The authenticated app always occupies the actual viewport. */
html,body.ml-body{width:100%;max-width:none;min-width:0;overflow-x:hidden}
.ml-main{
  width:calc(100% - var(--ml-sidebar))!important;
  max-width:none!important;
  margin-left:var(--ml-sidebar)!important;
  min-width:0!important;
}
.ml-page-shell{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:clamp(18px,1.7vw,30px) var(--app-gutter) clamp(38px,3.5vw,64px)!important;
  min-width:0!important;
}
.ml-sidebar-collapsed .ml-main{
  width:calc(100% - var(--ml-sidebar))!important;
}
.payroll-focus .ml-main{
  width:calc(100% - var(--ml-sidebar))!important;
}
.payroll-focus.ml-sidebar-collapsed .ml-main{
  width:calc(100% - var(--ml-sidebar))!important;
}

/* Never impose a desktop max-width on large screens. */
@media(min-width:1181px){
  .ml-page-shell{width:100%!important;max-width:none!important}
}
@media(min-width:1500px){
  .ml-page-shell{width:100%!important;max-width:none!important}
}
@media(min-width:1900px){
  .ml-page-shell{width:100%!important;max-width:none!important}
}

/* General page layout should scale by available width. */
.page-head{
  width:100%;min-width:0;gap:clamp(12px,1.4vw,24px);
}
.page-head>div:first-child{min-width:0}
.page-head h1{font-size:clamp(24px,1.45vw,34px)!important}
.page-head p{font-size:clamp(12px,.72vw,14px);line-height:1.45}
.panel{width:100%;max-width:none;min-width:0;box-sizing:border-box}
.dashboard-stats,.client-status-grid{
  width:100%;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
}
.two-col{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.grid{grid-template-columns:minmax(280px,24%) minmax(0,1fr)!important}
.grid-form{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}
.inline-form{grid-template-columns:repeat(3,minmax(140px,1fr)) auto!important}
.ml-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.client-card-grid,.client-grid{
  grid-template-columns:repeat(auto-fit,minmax(clamp(240px,18vw,330px),1fr))!important;
}
.client-search-row,.client-list-panel,.client-card-grid{width:100%;max-width:none}

/* Keep typography comfortably readable. */
body.ml-body{font-size:var(--app-readable)}
label{font-size:12px!important}
input,select,textarea{font-size:13px!important}
.btn,button{font-size:13px}
table{font-size:12px}
th{font-size:10px}
td{font-size:12px}
.stat-card small,.dashboard-stats small{font-size:9px!important}
.stat-card strong,.dashboard-stats strong{font-size:clamp(17px,1.05vw,24px)}

/* Payroll: use the whole available monitor before allowing scroll. */
.payroll-primary-head{
  width:100%;
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto;
  align-items:end!important;
  column-gap:clamp(14px,1.4vw,28px);
  row-gap:10px;
}
.payroll-top-actions{
  max-width:none!important;
  width:auto;
  justify-content:flex-end!important;
  flex-wrap:wrap;
}
.payroll-period-picker input{font-size:13px!important;min-width:180px!important}
.payroll-summary{
  width:100%;
  grid-template-columns:repeat(6,minmax(120px,1fr))!important;
}
.payroll-summary>div{min-width:0}
.payroll-summary small{font-size:9px!important}
.payroll-summary b{font-size:clamp(13px,.86vw,17px)!important}
.payroll-toolbar{
  width:100%;display:grid!important;
  grid-template-columns:minmax(360px,1fr) auto;
  align-items:center!important;gap:12px;
}
.payroll-search-filters{min-width:0}
.payroll-search-box{width:min(100%,620px)!important}
.payroll-viewbar{width:100%;box-sizing:border-box}
.payroll-grid-panel{width:100%!important;max-width:none!important;overflow:visible!important}
.payroll-table-wrap{
  width:100%!important;
  max-width:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  
}
.payroll-workbench-table{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  table-layout:fixed!important;
}
.payroll-workbench-table th,
.payroll-workbench-table td{
  font-size:12px!important;
  padding:11px clamp(5px,.52vw,10px)!important;
  overflow:hidden;
  text-overflow:ellipsis;
}
.payroll-workbench-table th{font-size:9px!important}
.payroll-workbench-table .sticky-employee{
  width:clamp(180px,15vw,280px)!important;
  min-width:180px!important;
}
.payroll-workbench-table .editable-col{
  width:clamp(88px,7vw,135px)!important;
  min-width:78px!important;
}
.payroll-workbench-table .calculated-col{
  width:clamp(66px,5.2vw,105px)!important;
  min-width:62px!important;
}
.payroll-workbench-table .sticky-net{
  width:clamp(95px,6.4vw,130px)!important;
  min-width:90px!important;
}
.payroll-workbench-table .sticky-actions{
  width:64px!important;min-width:64px!important;max-width:64px!important;
  right:0!important;text-align:center!important;
}
.payroll-workbench-table .money-input{
  width:100%!important;min-width:0!important;max-width:112px!important;
  padding-left:6px!important;padding-right:6px!important;
}
.payroll-workbench-table .employee-name-line b{font-size:13px!important}
.payroll-workbench-table td small{font-size:10px!important}

/* The final Actions cell is the real table edge: no detached white strip. */
.payroll-workbench-table th:last-child,
.payroll-workbench-table td:last-child{
  border-right:0!important;
  background-clip:padding-box;
}
.payroll-workbench-table thead tr,
.payroll-workbench-table tbody tr{width:100%}
.payroll-workbench-table .row-actions{
  display:table-cell!important;
  vertical-align:middle!important;
  text-align:center!important;
}
.row-action-menu{display:inline-block!important;margin:0 auto!important}
.row-action-menu>summary{margin:0 auto!important}

/* On roomy monitors, fill space naturally rather than leaving a narrow app island. */
@media(min-width:1600px){
  :root{--app-gutter:clamp(24px,1.55vw,42px)}
  .payroll-workbench-table .sticky-employee{width:16%!important}
  .payroll-workbench-table .editable-col{width:auto!important}
  .payroll-workbench-table .calculated-col{width:auto!important}
  .payroll-workbench-table .sticky-net{width:8%!important}
  .client-card-grid,.client-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important}
}
@media(min-width:2200px){
  :root{--app-gutter:clamp(30px,1.6vw,54px)}
  .panel{padding:clamp(20px,1.2vw,28px)!important}
  .payroll-primary-head h1{font-size:32px!important}
  .payroll-workbench-table th,.payroll-workbench-table td{padding-top:13px!important;padding-bottom:13px!important}
}

/* Medium desktop / laptop: keep text, reduce layout gaps. */
@media(max-width:1365px) and (min-width:861px){
  :root{--app-gutter:18px}
  .payroll-primary-head{grid-template-columns:1fr}
  .payroll-top-actions{justify-content:flex-start!important}
  .payroll-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .payroll-toolbar{grid-template-columns:1fr auto}
  .ml-settings-grid{grid-template-columns:1fr!important}
  .grid{grid-template-columns:1fr!important}
}

/* Tablet and mobile switch from fixed desktop sidebar to drawer. */
@media(max-width:860px){
  .ml-main,.ml-sidebar-collapsed .ml-main,.payroll-focus .ml-main,.payroll-focus.ml-sidebar-collapsed .ml-main{
    margin-left:0!important;width:100%!important;max-width:none!important;
  }
  .ml-page-shell{padding:64px 14px 34px!important}
  .page-head{flex-direction:column;align-items:stretch!important}
  .page-head .actions-inline,.client-head-actions{width:100%;flex-wrap:wrap}
  .two-col,.ml-settings-grid,.grid{grid-template-columns:1fr!important}
  .grid-form{grid-template-columns:1fr 1fr!important}
  .inline-form{grid-template-columns:1fr 1fr!important}
  .payroll-primary-head{grid-template-columns:1fr}
  .payroll-top-actions{justify-content:flex-start!important;width:100%}
  .payroll-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .payroll-toolbar{grid-template-columns:1fr!important}
  .payroll-search-box{width:100%!important;max-width:none!important}
  .payroll-workbench-table{
    table-layout:auto!important;
    min-width:max-content!important;
  }
  .payroll-workbench-table .sticky-employee{min-width:190px!important}
  .payroll-workbench-table .editable-col{min-width:96px!important}
  .payroll-workbench-table .calculated-col{min-width:78px!important}
  .payroll-workbench-table .sticky-net{min-width:105px!important}
}
@media(max-width:560px){
  .grid-form,.inline-form{grid-template-columns:1fr!important}
  .payroll-summary{grid-template-columns:1fr 1fr!important}
  .payroll-top-actions>*{flex:1 1 auto}
  .payroll-top-actions .btn,.payroll-top-actions button{width:100%}
  .payroll-period-picker{width:100%}.payroll-period-picker label{width:100%}.payroll-period-picker input{width:100%!important}
  .client-card-grid,.client-grid{grid-template-columns:1fr!important}
}

/* Zoom/viewport classes measured by JS. */
:root[data-viewport="ultrawide"] .ml-page-shell,
:root[data-viewport="wide"] .ml-page-shell{max-width:none!important;width:100%!important}
:root[data-viewport="ultrawide"] .payroll-grid-panel,
:root[data-viewport="wide"] .payroll-grid-panel{width:100%!important}

/* Modal/dialog sizing is viewport-aware across the whole app. */
.modal,.modal-card,.duplicate-modal,.settings-modal,.employee-modal{
  max-width:min(94vw,1100px)!important;
}
.modal-backdrop,.duplicate-overlay{padding:clamp(10px,2vw,28px)!important}

/* V51 critical payroll submit reliability */
.direct-payroll-action button.is-working,.direct-payroll-action.is-submitting button{
  opacity:.72;cursor:wait!important;pointer-events:none;
}

/* V52 — usability-first payroll cockpit */
.payroll-cockpit{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:12px 0;padding:13px 16px;background:#fff;border:1px solid #dbe5ef;border-radius:14px;box-shadow:0 3px 12px rgba(15,23,42,.035)}
.workflow-steps{display:flex;align-items:center;min-width:0;flex:1}.workflow-step{display:flex;align-items:center;gap:8px;white-space:nowrap}.workflow-step>span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#eef3f8;color:#64748b;font-weight:800;font-size:12px;border:1px solid #dbe5ef}.workflow-step div{display:flex;flex-direction:column;line-height:1.1}.workflow-step b{font-size:12px;color:#334155}.workflow-step small{font-size:10px;color:#8795a8;margin-top:3px}.workflow-step.done>span{background:#e9f9ef;color:#16834a;border-color:#c9efd8}.workflow-step.done b{color:#0f6f3e}.workflow-step.current>span{background:#eaf1ff;color:#2463df;border-color:#c8d9ff;box-shadow:0 0 0 3px rgba(36,99,223,.08)}.workflow-step.current b{color:#174ea6}.workflow-line{height:1px;background:#dce5ef;min-width:18px;max-width:48px;flex:1;margin:0 9px}.payroll-attention{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.attention-chip{border:0;border-radius:999px;padding:7px 10px;font:700 10px/1.1 inherit;text-decoration:none;white-space:nowrap;cursor:pointer}.attention-chip.warn{background:#fff5df;color:#8a5a00}.attention-chip.info{background:#eef4ff;color:#2457a7}.attention-chip.muted{background:#f1f5f9;color:#526174}.attention-chip.good{background:#eaf8ef;color:#187444}.attention-chip.compare{background:#f5f3ff;color:#6550a5}
.payroll-action-dock{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:14px 0 0;padding:14px 16px;border:1px solid #d9e4ef;background:#fff;border-radius:14px;box-shadow:0 4px 16px rgba(15,23,42,.04)}.payroll-action-dock>div:first-child{display:flex;align-items:center;gap:11px}.payroll-action-dock b{display:block;font-size:14px}.payroll-action-dock small{display:block;margin-top:3px;color:#718096;font-size:11px}.dock-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:#eaf8ef;color:#16834a;font-weight:900}.locked-dock .dock-icon{background:#f1f5f9;color:#526174}.revision-inline{position:relative}.revision-inline>summary{list-style:none;cursor:pointer}.revision-inline form{position:absolute;right:0;bottom:calc(100% + 8px);width:min(420px,80vw);padding:12px;background:#fff;border:1px solid #dbe5ef;border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.14);display:flex;gap:8px;z-index:20}.revision-inline input{flex:1;min-width:0}
/* Preserve readable type; space comes from layout, not microscopic fonts. */
.payroll-workbench-table{font-size:14px!important}.payroll-workbench-table th{font-size:10.5px!important;letter-spacing:.01em}.payroll-workbench-table td{font-size:13.5px!important}.payroll-workbench-table .employee-name-line b{font-size:14px!important}.payroll-workbench-table td small{font-size:11px!important}.payroll-summary b{font-size:clamp(14px,.92vw,18px)!important}.payroll-summary small{font-size:9.5px!important}.payroll-period-picker input{font-size:14px!important;font-weight:650}
@media(max-width:1200px){.payroll-cockpit{align-items:flex-start;flex-direction:column}.payroll-attention{justify-content:flex-start}.workflow-steps{width:100%}}
@media(max-width:760px){.workflow-step small{display:none}.workflow-step b{font-size:11px}.workflow-line{min-width:8px;margin:0 5px}.payroll-action-dock{align-items:flex-start;flex-direction:column}.next-step-actions{width:100%;flex-wrap:wrap}.next-step-actions form{flex:1}.next-step-actions button{width:100%}}


/* =========================================================
   V53 · USABILITY-FIRST PAYROLL WORKBENCH
   ========================================================= */
.usability-head{
  align-items:end!important;
  margin-bottom:12px!important;
}
.payroll-stage-actions{
  display:flex;align-items:end;justify-content:flex-end;gap:8px;flex-wrap:wrap;
}
.payroll-stage-actions form{margin:0}
.payroll-stage-actions .btn,.payroll-stage-actions button{min-height:40px}
.payroll-stage-actions .payroll-period-picker input{height:40px}

/* concise context instead of a decorative workflow strip */
.payroll-review-strip{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin:10px 0 12px;padding:11px 14px;border:1px solid #DDE6EE;border-radius:12px;background:#fff;
}
.review-primary{display:flex;align-items:center;gap:10px;min-width:0}
.review-primary .review-icon{
  width:29px;height:29px;border-radius:9px;display:grid;place-items:center;flex:0 0 auto;
  background:#EEF5FF;color:#2767D7;font-size:11px;font-weight:900;
}
.review-primary b{display:block;font-size:12px;color:#172033}
.review-primary small{display:block;font-size:10px;color:#7A899D;margin-top:2px}
.review-signals{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.signal{
  border:0;border-radius:999px;padding:6px 9px;font-size:9px;font-weight:800;text-decoration:none;white-space:nowrap;
}
button.signal{cursor:pointer}
.signal.good{background:#EAF8F0;color:#147642}.signal.info{background:#EDF4FF;color:#285EAC}
.signal.warning{background:#FFF5DE;color:#8A6300}.signal.danger{background:#FFF0F0;color:#AE3131}

/* main workbench + useful side rail */
.payroll-workspace-layout{
  display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:14px;align-items:start;width:100%;
}
.payroll-workspace-main{min-width:0}
.payroll-utility-rail{display:flex;flex-direction:column;gap:10px;min-width:0}
.utility-card{
  background:#fff;border:1px solid #DEE6EE;border-radius:12px;padding:13px;
  box-shadow:0 2px 8px rgba(15,23,42,.025);
}
.utility-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.utility-head>b{font-size:11px;color:#172033}
.utility-head>span{font-size:8px;font-weight:800;color:#75859A;background:#F2F5F8;padding:4px 7px;border-radius:999px}
.utility-head>span.all-clear{color:#147642;background:#EAF8F0}
.utility-head>span.has-issues{color:#9A5B00;background:#FFF5DE}
.utility-list{display:flex;flex-direction:column;gap:8px}
.utility-list>div{display:grid;grid-template-columns:18px 1fr;gap:7px;align-items:start}
.utility-list>div>span{font-size:10px;color:#3B78D8}
.utility-list b{display:block;font-size:9px;color:#263548}
.utility-list small{display:block;font-size:8px;color:#7B899B;margin-top:1px}
.delivery-meter{height:7px;border-radius:999px;background:#EDF1F5;overflow:hidden}
.delivery-meter>span{display:block;height:100%;border-radius:inherit;background:#24B16B;min-width:0}
.delivery-stats{display:flex;justify-content:space-between;gap:8px;margin-top:9px;color:#67778C;font-size:8px}
.delivery-stats i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:4px}
.delivery-stats i.sent{background:#24B16B}.delivery-stats i.pending{background:#F0B43C}
.comparison-value{font-size:18px;font-weight:900;color:#172033;letter-spacing:-.02em}
.comparison-value.up{color:#168052}.comparison-value.down{color:#B44949}
.utility-note{display:block;color:#8190A2;font-size:8px;line-height:1.35;margin-top:4px}
.activity-list{display:flex;flex-direction:column;gap:9px}
.activity-list>div{display:grid;grid-template-columns:8px 1fr;gap:7px}
.activity-list i{width:6px;height:6px;background:#31A96B;border-radius:50%;margin-top:4px}
.activity-list b{display:block;font-size:8px;color:#263548}
.activity-list small{display:block;font-size:7px;color:#8794A4;margin-top:1px;line-height:1.35}

/* table is the work area, not a giant empty card */
.payroll-grid-panel{
  min-height:0!important;height:auto!important;padding-bottom:0!important;
}
.payroll-grid-panel .payroll-table-wrap{min-height:0!important}
.payroll-workbench-table tbody tr:last-child td{border-bottom:0}
.payroll-workbench-table{margin-bottom:0!important}
.payroll-grid-panel:has(tbody tr:nth-child(-n+5):last-child){min-height:0!important}
.payroll-workbench-table td,.payroll-workbench-table th{font-size:12px!important}
.payroll-workbench-table .employee-name-line b{font-size:13px!important}
.employee-cell>small{font-size:10px!important}
.employee-delta{display:block!important;margin-top:3px;color:#7E8C9E!important;font-size:8px!important}
.employee-delta.up{color:#158052!important}.employee-delta.down{color:#B14A4A!important}
.employee-row.prior-changed:not(.dirty-row) .sticky-employee{box-shadow:inset 3px 0 #8BB7F1}
.payroll-filter-tabs button{font-size:10px!important}
.payroll-search-box input{font-size:12px!important}

/* cleaner status: one simple state line rather than visually noisy badges */
.employee-name-line{gap:5px!important;flex-wrap:wrap}
.line-status{font-size:7px!important;padding:2px 5px!important}
.finalised-row .line-status.finalised{display:none}
.finalised-row .line-status.payslip-sent{font-size:8px!important}
.finalised-row .employee-name-line:after{
  content:"Finalised";font-size:8px;font-weight:800;color:#176D4A;background:#EAF8F0;padding:2px 6px;border-radius:999px;
}
.finalised-row:has(.line-status.payslip-sent) .employee-name-line:after{content:"Finalised · Payslip sent"}

/* stage-relevant row menu */
.finalised-row .employee-action-card a[href*="employee-approval"]{display:none}

/* compact final state; no huge locked panel */
.finalised-status-bar{
  margin-top:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 12px;border:1px solid #CFE8D8;border-radius:12px;background:#F5FBF7;
}
.finalised-status-main{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:9px;color:#64758A}
.finalised-status-main b{font-size:10px;color:#183329}
.lock-dot{width:26px;height:26px;border-radius:8px;background:#E4F6EA;display:grid;place-items:center}
.revision-drawer{
  display:none;margin-top:8px;padding:13px;border:1px solid #DDE5EC;border-radius:12px;background:#fff;
  grid-template-columns:minmax(180px,1fr) minmax(420px,2fr);gap:15px;align-items:center;
}
.revision-drawer.open{display:grid}
.revision-drawer>div b{display:block;font-size:11px}.revision-drawer>div small{display:block;color:#7B899B;font-size:9px;margin-top:3px}
.revision-drawer form{display:grid;grid-template-columns:1fr auto auto;gap:8px;margin:0}
.compact-action-dock{padding:10px 12px!important;margin-top:12px!important}

/* improve table action edge consistency */
.payroll-workbench-table .sticky-actions{
  width:62px!important;min-width:62px!important;max-width:62px!important;
  background:#fff!important;border-right:0!important;
}
.payroll-workbench-table tr td:last-child,
.payroll-workbench-table tr th:last-child{padding-left:5px!important;padding-right:5px!important}
.row-action-menu>summary{margin:0 auto!important}

/* wide displays: rail stays useful; table still receives most space */
@media(min-width:1900px){
  .payroll-workspace-layout{grid-template-columns:minmax(0,1fr) 280px}
  .payroll-utility-rail{gap:12px}
  .utility-card{padding:15px}
}
@media(max-width:1450px){
  .payroll-workspace-layout{grid-template-columns:minmax(0,1fr) 220px}
  .activity-card{display:none}
}
@media(max-width:1180px){
  .payroll-workspace-layout{grid-template-columns:1fr}
  .payroll-utility-rail{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
  }
  .activity-card{display:none}
}
@media(max-width:860px){
  .payroll-review-strip{align-items:flex-start;flex-direction:column}
  .review-signals{justify-content:flex-start}
  .payroll-utility-rail{grid-template-columns:1fr}
  .payroll-stage-actions{justify-content:flex-start;width:100%}
  .revision-drawer.open{grid-template-columns:1fr}
  .revision-drawer form{grid-template-columns:1fr}
}


/* =========================================================
   V55 · LIFE-EASY PAYROLL WORKBENCH
   ========================================================= */
.v55-summary-cards{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:9px!important;background:transparent!important;border:0!important;overflow:visible!important;
}
.v55-summary-cards .summary-card{
  min-height:78px;display:flex!important;align-items:center!important;gap:10px;
  padding:12px 13px!important;border:1px solid #DFE7EF!important;border-radius:12px!important;
  background:#fff!important;box-shadow:0 2px 8px rgba(15,23,42,.025);
}
.v55-summary-cards .summary-icon{
  width:30px;height:30px;border-radius:9px;display:grid;place-items:center;
  background:#EFF5FF;color:#285FC8;font-size:12px;flex:0 0 auto;
}
.v55-summary-cards .summary-net{background:#F3FCF6!important;border-color:#D9EEE1!important}
.v55-summary-cards .summary-net .summary-icon{background:#E3F7EA;color:#16804F}
.v55-summary-cards small{font-size:8px!important;letter-spacing:.05em}
.v55-summary-cards b{font-size:14px!important;margin-top:2px!important}
.v55-summary-cards em{display:block;font-style:normal;color:#8593A4;font-size:8px;margin-top:2px}

.employee-cell-layout{display:grid;grid-template-columns:18px minmax(0,1fr);gap:7px;align-items:start}
.employee-cell-content{min-width:0}
.row-select{width:14px;height:14px;margin:2px 0 0;accent-color:#2469EA}
.select-all-label{display:flex;align-items:center;gap:6px;cursor:pointer}
.select-all-label input{width:13px;height:13px;accent-color:#2469EA}
.employee-history-link{
  appearance:none;border:0;background:transparent;padding:0;margin:0;color:#172033;
  font:inherit;font-weight:800;cursor:pointer;text-align:left;
}
.employee-history-link:hover{text-decoration:underline;text-underline-offset:2px}
.row-change-reason{margin-top:4px;color:#356CB5;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-change-reason span{background:#EDF4FF;padding:1px 4px;border-radius:999px;font-weight:800}
.row-exception-list{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.row-exception-list span{font-size:7px;font-weight:700;padding:2px 5px;border-radius:999px}
.row-exception-list .blocker{background:#FDECEC;color:#AB3030}
.row-exception-list .warning{background:#FFF3DA;color:#936100}
.row-exception-list .info{background:#EDF4FF;color:#356CB5}
.row-exception-list .more{background:#F1F4F7;color:#6F7F92}
.row-client-comment{
  margin-top:4px;max-width:230px;color:#6E5B8B;background:#F7F1FC;border-radius:6px;
  padding:3px 5px;font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.exception-row .sticky-employee{box-shadow:inset 3px 0 #E7AF43}
.prior-changed.exception-row .sticky-employee{box-shadow:inset 3px 0 #E7AF43}

.tab-count{
  display:inline-flex;min-width:15px;height:15px;padding:0 4px;align-items:center;justify-content:center;
  border-radius:999px;background:#E7EFFD;color:#285EAB;font-size:7px;font-weight:900;
}
.tab-count.warn{background:#FFF0D0;color:#8C5B00}

.bulk-action-bar{
  display:none;align-items:center;justify-content:space-between;gap:10px;
  margin:8px 0;padding:8px 10px;border:1px solid #BAD5FF;border-radius:10px;background:#F2F7FF;
  position:sticky;top:6px;z-index:35;box-shadow:0 5px 18px rgba(37,99,235,.08)
}
.bulk-action-bar.show{display:flex}
.bulk-selection{display:flex;align-items:center;gap:8px;white-space:nowrap}.bulk-selection b{font-size:10px}
.link-button{border:0!important;background:transparent!important;color:#356BC5!important;padding:2px!important;box-shadow:none!important;font-size:8px!important}
.bulk-apply-group{display:flex;align-items:center;gap:6px;min-width:0;flex:1;justify-content:center}
.bulk-apply-group select,.bulk-apply-group input{height:31px;min-width:0;border:1px solid #CFDCE8;border-radius:8px;background:#fff;padding:4px 7px;font-size:9px}
.bulk-apply-group select{width:150px}.bulk-apply-group input{width:90px}
.bulk-buttons{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bulk-buttons button,.bulk-apply-group button{min-height:31px!important;padding:6px 9px!important;font-size:9px!important}

.v55-rail{position:sticky;top:12px}
.quick-action-list{display:flex;flex-direction:column}
.quick-action-list>a,.quick-action-list>button,.quick-action-list form>button{
  width:100%;display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:7px;
  padding:8px 4px!important;border:0!important;border-bottom:1px solid #EEF2F5!important;
  background:transparent!important;color:#1E2B3B!important;text-align:left;text-decoration:none!important;
  box-shadow:none!important;border-radius:0!important
}
.quick-action-list>*:last-child,.quick-action-list form:last-child>button{border-bottom:0!important}
.quick-action-list>a:hover,.quick-action-list>button:hover,.quick-action-list form>button:hover{background:#F7F9FB!important}
.quick-action-list span{color:#178252;font-size:11px;text-align:center}
.quick-action-list b{display:block;font-size:9px}.quick-action-list small{display:block;color:#8794A4;font-size:7px;margin-top:1px}
.quick-action-list form{margin:0}
.mini-link{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;color:#316AC1!important;font-size:7px!important}

.delivery-ring-row{display:flex;align-items:center;gap:12px}
.delivery-ring{
  --delivery-pct:0;width:78px;height:78px;border-radius:50%;
  background:conic-gradient(#1A9B5F calc(var(--delivery-pct)*1%),#E8EDF1 0);
  display:grid;place-items:center;flex:0 0 auto;position:relative
}
.delivery-ring:after{content:"";position:absolute;inset:8px;border-radius:50%;background:#fff}
.delivery-ring>div{position:relative;z-index:1;text-align:center}
.delivery-ring b{display:block;font-size:14px;color:#187B4D}.delivery-ring small{font-size:7px;color:#7E8D9E}
.delivery-legend{display:flex;flex-direction:column;gap:5px;flex:1}
.delivery-legend span{display:grid;grid-template-columns:7px 1fr auto;gap:5px;align-items:center;font-size:8px;color:#647487}
.delivery-legend i{width:6px;height:6px;border-radius:50%}.delivery-legend .sent{background:#1A9B5F}.delivery-legend .pending{background:#E2AE37}.delivery-legend .failed{background:#D84B4B}
.delivery-legend b{font-size:8px;color:#1C2938}

.health-issue-list{display:flex;flex-direction:column;gap:5px}
.health-issue-list button{
  width:100%;display:grid;grid-template-columns:18px 1fr;gap:6px;text-align:left;
  border:0!important;background:transparent!important;padding:5px 2px!important;box-shadow:none!important;color:#253447!important
}
.health-issue-list button>span{width:16px;height:16px;border-radius:50%;display:grid;place-items:center;font-size:8px;font-weight:900}
.health-issue-list button.blocker>span{background:#FCEAEA;color:#B02F2F}
.health-issue-list button.warning>span{background:#FFF1D4;color:#926000}
.health-issue-list button.info>span{background:#EAF3FF;color:#3569B7}
.health-issue-list b{display:block;font-size:8px}.health-issue-list small{display:block;font-size:7px;color:#8593A4;margin-top:1px}
.all-clear-list{display:flex;flex-direction:column;gap:6px;color:#38775A;font-size:8px}

.workbench-drawer-backdrop{position:fixed;inset:0;background:rgba(12,25,39,.24);opacity:0;transition:opacity .16s ease;z-index:150}
.workbench-drawer-backdrop.show{opacity:1}
.workbench-drawer{
  position:fixed;right:0;top:0;height:100vh;width:min(560px,92vw);background:#fff;z-index:160;
  box-shadow:-18px 0 44px rgba(15,23,42,.14);transform:translateX(105%);transition:transform .2s ease;
  display:flex;flex-direction:column
}
.workbench-drawer.open{transform:translateX(0)}
.drawer-head{display:flex;justify-content:space-between;gap:14px;padding:20px;border-bottom:1px solid #E5EBF0}
.drawer-head small{font-size:8px;letter-spacing:.1em;color:#718195;font-weight:800}.drawer-head h2{margin:3px 0 3px;font-size:20px}.drawer-head p{margin:0;color:#7A899B;font-size:9px}
.drawer-close{width:32px;height:32px;border-radius:9px!important;padding:0!important;background:#F1F4F7!important;color:#536276!important}
.drawer-body{padding:18px;overflow:auto}
.drawer-loading,.drawer-empty{padding:24px;text-align:center;color:#7B899A;font-size:10px}

.history-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:18px}
.history-summary>div{padding:10px;border:1px solid #E4EAF0;border-radius:9px;background:#FAFBFC}
.history-summary small{display:block;color:#8492A3;font-size:7px}.history-summary b{display:block;margin-top:3px;font-size:11px}
.drawer-body h3{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#66768A;margin:18px 0 7px}
.history-table-wrap{overflow:auto;border:1px solid #E5EBF0;border-radius:10px}
.history-table{width:100%;border-collapse:collapse}.history-table th,.history-table td{padding:8px 9px;border-bottom:1px solid #EDF1F4;font-size:8px;text-align:left}
.history-table th{background:#F8FAFB;color:#718195;font-size:7px}.history-items-row td{background:#FAFBFC;padding-top:4px;padding-bottom:6px}
.history-items-row span{display:inline-block;margin:2px 4px 2px 0;padding:2px 5px;border-radius:5px;background:#EEF3F8;font-size:7px}
.history-status{padding:2px 5px;border-radius:999px;background:#EDF3F8;font-size:7px}
.salary-history-list{display:flex;flex-direction:column}.salary-history-list>div{display:grid;grid-template-columns:110px 90px 1fr;gap:8px;padding:8px 2px;border-bottom:1px solid #EDF1F4;font-size:8px}.salary-history-list small{color:#8391A2}

.delivery-log-list{display:flex;flex-direction:column;gap:7px}
.delivery-log-row{display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:8px;padding:10px;border:1px solid #E4EAF0;border-radius:10px}
.delivery-state-icon{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#F1F4F7;font-weight:900}
.delivery-log-row.sent .delivery-state-icon{background:#E8F7EE;color:#18784B}.delivery-log-row.failed .delivery-state-icon{background:#FCEAEA;color:#B02F2F}
.delivery-log-main b,.delivery-log-meta b{display:block;font-size:9px}.delivery-log-main small,.delivery-log-meta small{display:block;color:#8391A2;font-size:7px;margin-top:2px}
.delivery-log-meta{text-align:right}.delivery-error{grid-column:2/-1;color:#A83939;background:#FEF0F0;border-radius:6px;padding:5px;font-size:7px}
.delivery-resend-form{grid-column:2/-1;margin:0}.delivery-resend-form button{min-height:29px!important;padding:5px 9px!important;font-size:8px!important}

.full-activity-list{display:flex;flex-direction:column}
.full-activity-list>div{display:grid;grid-template-columns:14px 1fr;gap:8px;padding-bottom:14px;position:relative}
.full-activity-list>div>span{width:8px;height:8px;background:#22A567;border:2px solid #E4F6EC;border-radius:50%;margin-top:3px;z-index:1}
.full-activity-list>div:not(:last-child):before{content:"";position:absolute;left:3px;top:10px;bottom:0;width:1px;background:#DCE5EA}
.full-activity-list b{display:block;font-size:9px}.full-activity-list small{display:block;color:#8492A3;font-size:7px;margin-top:2px}.full-activity-list p{font-size:8px;color:#59697C;margin:4px 0 0}

.public-comment-table input{min-width:220px;font-size:11px}
.public-approval-fields{display:grid;grid-template-columns:1fr 1.5fr;gap:12px;margin-top:16px}
.public-approval-review-form{padding-top:0;border-top:0}

@media print{
  .ml-sidebar,.payroll-stage-actions,.payroll-review-strip,.payroll-utility-rail,.payroll-toolbar,.payroll-viewbar,.bulk-action-bar,.row-actions,.finalised-status-bar,.revision-drawer{display:none!important}
  .ml-main{margin:0!important;width:100%!important}.ml-page-shell{padding:0!important}
  .payroll-workspace-layout{display:block!important}.payroll-grid-panel{border:0!important;box-shadow:none!important}
}
@media(max-width:1700px){.v55-summary-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:1180px){
  .v55-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .v55-rail{position:static}.bulk-action-bar{align-items:flex-start;flex-wrap:wrap}.bulk-apply-group{justify-content:flex-start}
}
@media(max-width:700px){
  .v55-summary-cards{grid-template-columns:1fr!important}
  .bulk-action-bar{align-items:flex-start;flex-direction:column}
  .history-summary{grid-template-columns:1fr 1fr}
  .public-approval-fields{grid-template-columns:1fr}
}


/* =========================================================
   V56 · TRUE PAYROLL WORKBENCH
   Full-width grid. Permanent dashboard rail removed.
   ========================================================= */
.v56-head{
  display:flex!important;align-items:flex-end!important;justify-content:space-between!important;
  gap:16px!important;margin-bottom:10px!important;
}
.v56-head .payroll-title-line h1{font-size:24px!important;line-height:1.1!important}
.v56-actions{display:flex!important;align-items:flex-end!important;gap:7px!important;flex-wrap:wrap!important}
.v56-actions .btn,.v56-actions button{min-height:38px!important;font-size:12px!important;padding:8px 12px!important}
.v56-actions .payroll-period-picker input{height:38px!important;font-size:12px!important;min-width:160px!important}

.v56-payroll-statusbar{
  display:grid;grid-template-columns:repeat(6,minmax(110px,1fr)) auto;
  align-items:stretch;border:1px solid #DDE6EE;border-radius:11px;background:#fff;
  margin:0 0 10px;overflow:hidden;min-height:58px;
}
.v56-payroll-statusbar .status-total{
  padding:9px 11px;border-right:1px solid #E7EDF2;display:flex;flex-direction:column;justify-content:center;
}
.v56-payroll-statusbar .status-total small{font-size:9px;color:#718196;text-transform:uppercase;letter-spacing:.04em}
.v56-payroll-statusbar .status-total b{font-size:14px;color:#172033;margin-top:2px;white-space:nowrap}
.v56-payroll-statusbar .status-total.net{background:#F2FBF5}.v56-payroll-statusbar .status-total.net b{color:#137A49}
.v56-payroll-statusbar .status-signals{
  display:flex;align-items:center;justify-content:flex-end;gap:5px;padding:8px 10px;flex-wrap:wrap;min-width:150px;
}
.v56-payroll-statusbar .signal{font-size:9px!important;padding:5px 7px!important}

.v56-workbench-main{width:100%;min-width:0}
.v56-workbench-main .payroll-toolbar{margin-top:0!important}
.payroll-grid-panel{width:100%!important;max-width:none!important;min-height:0!important;height:auto!important}
.payroll-table-wrap{width:100%!important;max-width:100%!important}
.payroll-workbench-table{width:100%!important;min-width:max-content!important;font-size:12px!important}
.payroll-workbench-table th{font-size:10px!important}
.payroll-workbench-table td{font-size:12px!important;vertical-align:middle!important}
.payroll-workbench-table .employee-history-link{font-size:12px!important}
.payroll-workbench-table .employee-cell>small,.payroll-workbench-table .employee-cell-content>small{font-size:10px!important}

.column-group-row th{height:25px!important;padding:5px 9px!important;border-bottom:1px solid #E2E9EF!important}
.input-group-head{
  background:#F4F8FD!important;color:#507096!important;font-size:8px!important;letter-spacing:.12em;text-align:center!important
}
.calculated-group-head{
  background:#F8F9FB!important;color:#748296!important;font-size:8px!important;letter-spacing:.12em;text-align:center!important
}
.editable-col{background:#FCFDFF}
.payroll-workbench-table tbody .editable-col{background:#FBFDFF}
.payroll-workbench-table tbody .calculated-col{background:#fff}
.payroll-workbench-table .sticky-net{background:#F3F6F8!important}
.payroll-workbench-table .money-input{font-size:12px!important;min-height:34px!important}
.v56-grid-meta{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:6px 3px;margin-top:2px;color:#77879A;font-size:9px;
}
.editable-key,.calc-key{display:inline-block;width:8px;height:8px;border:1px solid #CBD9E8;border-radius:2px;margin:0 4px 0 8px}
.editable-key{background:#FBFDFF}.calc-key{background:#F3F5F7}
.user-hidden-column{display:none!important}

.v56-column-menu{width:300px!important;max-height:70vh!important;overflow:auto!important}
.column-visibility-list{display:grid;grid-template-columns:1fr 1fr;gap:3px 8px;padding:8px 10px;border-bottom:1px solid #E9EEF3}
.column-visibility-list label{display:flex;align-items:center;gap:6px;font-size:9px;padding:4px 2px;color:#344356}
.column-visibility-list input{width:13px;height:13px;accent-color:#2469EA}
.secondary-title{border-top:0!important;margin-top:0!important}

/* Selection toolbar is functional, and only exists when something is selected. */
.bulk-action-bar{
  width:100%;box-sizing:border-box;margin:7px 0!important;
  background:#F2F7FF!important;border-color:#C6D9F7!important;
}
.bulk-apply-group select,.bulk-apply-group input{font-size:10px!important;height:33px!important}
.bulk-buttons button,.bulk-apply-group button{font-size:10px!important;min-height:33px!important}

/* Import modal */
.v56-modal-backdrop{
  position:fixed;inset:0;background:rgba(13,27,43,.32);z-index:180;opacity:0;transition:opacity .16s ease
}
.v56-modal-backdrop.show{opacity:1}
.v56-modal{
  position:fixed;z-index:190;left:50%;top:50%;transform:translate(-50%,-46%) scale(.98);
  width:min(620px,92vw);max-height:88vh;overflow:auto;background:#fff;border-radius:16px;
  box-shadow:0 24px 70px rgba(15,23,42,.23);opacity:0;pointer-events:none;transition:.16s ease;
}
.v56-modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.v56-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:19px 20px 14px;border-bottom:1px solid #E5EBF0}
.v56-modal-head small{font-size:8px;letter-spacing:.1em;color:#6F8094;font-weight:800}.v56-modal-head h2{font-size:20px;margin:3px 0}.v56-modal-head p{font-size:10px;color:#78889A;margin:0}
.import-upload-form{padding:18px 20px 20px}
.import-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:135px;border:1.5px dashed #BFCFE0;border-radius:12px;background:#FAFCFE;cursor:pointer;padding:16px}
.import-dropzone:hover{background:#F5F9FE;border-color:#8CB2E7}
.import-dropzone .import-icon{width:34px;height:34px;border-radius:9px;background:#E8F7EE;color:#11834E;display:grid;place-items:center;font-weight:900;margin-bottom:7px}
.import-dropzone b{font-size:12px}.import-dropzone small{font-size:9px;color:#7C8C9E;margin:3px 0 10px}
.import-dropzone input{max-width:270px;font-size:10px}
.import-mode-choice{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:13px}
.import-mode-choice label{border:1px solid #DEE6EE;border-radius:10px;padding:9px;display:flex;align-items:flex-start;gap:7px;cursor:pointer}
.import-mode-choice label:has(input:checked){border-color:#8EB5F0;background:#F3F7FF}
.import-mode-choice input{margin-top:2px;accent-color:#2469EA}.import-mode-choice b{display:block;font-size:9px}.import-mode-choice small{display:block;font-size:7px;color:#78889B;margin-top:2px;line-height:1.35}
.import-modal-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:15px}

/* Undo — short-lived, actionable, not a permanent banner. */
.payroll-undo-toast{
  position:fixed;left:50%;bottom:24px;transform:translate(-50%,16px);z-index:220;
  display:flex;align-items:center;gap:12px;background:#172033;color:#fff;border-radius:10px;
  padding:9px 10px 9px 13px;box-shadow:0 10px 30px rgba(15,23,42,.2);opacity:0;transition:.15s ease;font-size:10px;
}
.payroll-undo-toast.show{opacity:1;transform:translate(-50%,0)}
.payroll-undo-toast button{min-height:28px!important;padding:4px 8px!important;background:#fff!important;color:#172033!important;font-size:9px!important}

/* Employee history is intentionally smaller than the removed audit drawer. */
.history-drawer{width:min(440px,92vw)!important}
.row-client-comment.resolved{opacity:.55;text-decoration:none}.row-client-comment.resolved span{font-weight:800;margin-left:4px}

/* Import preview */
.import-preview-page{max-width:1500px;margin:0 auto;padding-bottom:40px}
.import-preview-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}
.import-preview-head h1{margin:5px 0 2px;font-size:25px}.import-preview-head p{margin:0;color:#77879A;font-size:11px}
.back-link{font-size:9px;text-decoration:none;color:#356CC1}.import-mode-pill{font-size:9px;font-weight:800;text-transform:uppercase;background:#EEF4FF;color:#3568B7;border-radius:999px;padding:6px 9px}
.import-summary-row{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:10px}
.import-summary-row>div{background:#fff;border:1px solid #DFE7EE;border-radius:10px;padding:10px 12px}.import-summary-row small{display:block;font-size:8px;color:#78889A}.import-summary-row b{display:block;font-size:18px;margin-top:2px}.import-summary-row .warn{background:#FFF9EE;border-color:#F0D89B}
.import-mapping-panel{padding:14px!important;margin-bottom:10px}.import-mapping-panel h2,.import-preview-panel h2{font-size:14px;margin:0}.import-mapping-panel p,.import-preview-panel p{font-size:9px;color:#7A899A;margin:3px 0 0}
.mapping-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}.mapping-grid label{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:8px;font-size:9px}.mapping-grid select{height:34px;border:1px solid #D5E0E9;border-radius:8px;background:#fff;font-size:9px}
.import-preview-panel{padding:0!important;overflow:hidden}.import-preview-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid #E5EBF0}
.import-mode-help{text-align:right}.import-mode-help b{display:block;font-size:9px}.import-mode-help small{display:block;font-size:7px;color:#7F8D9E}
.import-table-wrap{overflow:auto;max-height:60vh}.import-preview-table{width:100%;border-collapse:collapse;min-width:900px}.import-preview-table th,.import-preview-table td{padding:9px 10px;border-bottom:1px solid #E9EEF2;text-align:left;font-size:9px;vertical-align:top}.import-preview-table th{position:sticky;top:0;background:#F7F9FB;color:#617286;font-size:8px;z-index:2}
.match-pill{display:inline-block;border-radius:999px;padding:2px 5px;font-size:7px;font-weight:800;text-transform:uppercase;margin-right:5px}.match-pill.matched{background:#E7F7ED;color:#137949}.match-pill.unmatched,.match-pill.ambiguous{background:#FCECED;color:#A63838}.import-preview-table td>small{display:block;font-size:7px;color:#8492A3;margin-top:3px}
.import-change-list{display:flex;flex-direction:column;gap:4px}.import-change-list>div{display:flex;justify-content:space-between;gap:12px}.import-change-list b{font-size:8px}.import-change-list span{font-size:8px;color:#6A798B}.import-change-list strong{color:#156D48}.import-warning{color:#9A6400;background:#FFF4DC;border-radius:5px;padding:4px 5px;font-size:7px;margin-bottom:3px}.muted{color:#9AA6B3}
.import-problem-row{background:#FFF8F8}.import-warning-row{background:#FFFCF5}
.import-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.import-preview-actions>div{display:flex;align-items:center;gap:10px}.import-preview-actions form{margin:0}.import-action-note{font-size:8px;color:#8A6500}

/* Remove old permanent dashboard assumptions in V56. */
.payroll-utility-rail,.activity-drawer,.delivery-drawer{display:none!important}

@media(max-width:1450px){
  .v56-payroll-statusbar{grid-template-columns:repeat(3,1fr);}.v56-payroll-statusbar .status-signals{grid-column:1/-1;border-top:1px solid #E7EDF2;justify-content:flex-start}
}
@media(max-width:950px){
  .v56-head{align-items:flex-start!important;flex-direction:column}.v56-actions{width:100%;justify-content:flex-start!important}
  .v56-payroll-statusbar{grid-template-columns:repeat(2,1fr)}
  .import-mode-choice{grid-template-columns:1fr}.mapping-grid{grid-template-columns:1fr}
}

.column-view-presets{display:flex;gap:5px;padding:8px 10px 2px}
.column-view-presets button{min-height:28px!important;padding:4px 7px!important;font-size:8px!important;background:#F3F6F9!important;color:#42546A!important;border:1px solid #DDE5ED!important}

/* =========================================================
   V57 · PROFESSIONAL PAYROLL WORKSTATION
   Readability and workflow take priority over decorative density.
   ========================================================= */
body.ml-body{font-size:14px!important}
.v56-head{align-items:center!important;margin-bottom:16px!important}
.v56-head .payroll-title-line h1{font-size:27px!important;letter-spacing:-.025em}
.payroll-meta{font-size:13px!important;margin-top:6px!important;color:#53657a!important}
.v56-actions{gap:10px!important}
.v56-actions .btn,.v56-actions button{min-height:42px!important;font-size:14px!important;padding:9px 15px!important;border-radius:10px!important}
.v56-actions .payroll-period-picker label{font-size:11px!important;letter-spacing:.06em!important}
.v56-actions .payroll-period-picker input{height:42px!important;font-size:14px!important;min-width:175px!important}

.v56-payroll-statusbar{grid-template-columns:repeat(6,minmax(135px,1fr)) auto;min-height:82px!important;margin-bottom:16px!important;border-radius:14px!important;box-shadow:0 4px 16px rgba(15,23,42,.035)}
.v56-payroll-statusbar .status-total{padding:14px 16px!important}
.v56-payroll-statusbar .status-total small{font-size:11px!important}
.v56-payroll-statusbar .status-total b{font-size:17px!important;margin-top:5px!important}
.v56-payroll-statusbar .signal{font-size:12px!important;padding:7px 9px!important}

.payroll-toolbar{margin:0 0 14px!important;padding:0 2px!important}
.payroll-search-box{width:min(100%,560px)!important}
.payroll-search-box input{height:44px!important;font-size:14px!important}
.payroll-filter-tabs{min-height:44px!important}
.payroll-filter-tabs button{font-size:13px!important;min-height:38px!important;padding:8px 12px!important}
.add-column-btn{min-height:42px!important;font-size:14px!important;padding:8px 14px!important}

.payroll-grid-panel{border-radius:14px!important;box-shadow:0 5px 20px rgba(15,23,42,.04)!important}
.payroll-workbench-table th{font-size:11px!important;padding:12px 9px!important}
.payroll-workbench-table td{font-size:13px!important;padding:14px 9px!important}
.payroll-workbench-table .employee-history-link{font-size:14px!important;font-weight:800!important}
.payroll-workbench-table .employee-cell>small,.payroll-workbench-table .employee-cell-content>small{font-size:12px!important}
.payroll-workbench-table .money-input{font-size:13px!important;min-height:38px!important}
.employee-delta,.row-change-reason{font-size:11px!important}
.line-status,.row-exception-list span{font-size:10px!important;padding:3px 6px!important}
.input-group-head,.calculated-group-head{font-size:10px!important}
.v56-grid-meta{font-size:11px!important;padding:9px 4px!important}
.row-action-menu>summary{width:36px!important;height:36px!important;font-size:18px!important}
.employee-action-card{font-size:13px!important;min-width:230px!important}
.employee-action-card button,.employee-action-card a{font-size:13px!important;min-height:38px!important}

.v56-column-menu{width:340px!important}
.column-menu-title b{font-size:14px!important}.column-menu-title small{font-size:11px!important}
.column-view-presets{gap:7px!important;padding:10px 12px 4px!important}
.column-view-presets button{min-height:34px!important;padding:6px 10px!important;font-size:12px!important}
.column-visibility-list{gap:5px 12px!important;padding:10px 12px!important}
.column-visibility-list label{font-size:12px!important;padding:5px 2px!important}

/* Import modal: readable at normal desktop scale. */
.v56-modal{width:min(720px,94vw)!important;border-radius:18px!important}
.v56-modal-head{padding:23px 24px 18px!important}
.v56-modal-head small{font-size:11px!important}.v56-modal-head h2{font-size:24px!important;margin:5px 0!important}.v56-modal-head p{font-size:14px!important;line-height:1.45!important}
.v56-modal .drawer-close,.history-modal .drawer-close{width:36px!important;height:36px!important;font-size:20px!important}
.import-upload-form{padding:22px 24px 24px!important}
.import-dropzone{min-height:170px!important;padding:22px!important}
.import-dropzone .import-icon{width:42px!important;height:42px!important;font-size:16px!important}
.import-dropzone b{font-size:15px!important}.import-dropzone small{font-size:12px!important;line-height:1.45!important;margin:6px 0 12px!important}.import-dropzone input{font-size:13px!important;max-width:340px!important}
.import-mode-choice{gap:10px!important;margin-top:18px!important}
.import-mode-choice label{padding:14px!important;gap:10px!important;min-height:92px!important}
.import-mode-choice b{font-size:13px!important}.import-mode-choice small{font-size:12px!important;line-height:1.45!important;margin-top:4px!important}
.import-modal-footer{margin-top:20px!important}.import-modal-footer .btn,.import-modal-footer button{font-size:14px!important;min-height:42px!important;padding:9px 14px!important}

/* History is a compact modal, never a screen-height drawer. */
.history-modal-backdrop{position:fixed;inset:0;background:rgba(13,27,43,.30);z-index:180;opacity:0;pointer-events:none;transition:.16s ease}
.history-modal-backdrop.show{opacity:1;pointer-events:auto}
.history-modal{position:fixed;z-index:191;left:50%;top:50%;transform:translate(-50%,-46%) scale(.98);width:min(760px,94vw);max-height:82vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.24);opacity:0;pointer-events:none;transition:.16s ease}
.history-modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.history-modal .drawer-head{position:sticky;top:0;background:#fff;z-index:2;padding:20px 22px 16px!important;border-bottom:1px solid #e5ebf0}
.history-modal .drawer-head small{font-size:10px!important}.history-modal .drawer-head h2{font-size:22px!important}.history-modal .drawer-head p{font-size:12px!important}
.history-modal .drawer-body{padding:18px 22px 22px!important}
.history-modal .drawer-loading,.history-modal .drawer-empty{font-size:13px!important;padding:28px!important}
.history-modal .history-summary{gap:10px!important;margin-bottom:18px!important}.history-modal .history-summary>div{padding:12px!important}.history-modal .history-summary small{font-size:11px!important}.history-modal .history-summary b{font-size:15px!important}
.history-modal .drawer-body h3{font-size:12px!important;margin:18px 0 8px!important}
.history-modal .history-table th{font-size:11px!important}.history-modal .history-table td{font-size:12px!important;padding:10px!important}.history-modal .history-items-row span,.history-modal .history-status{font-size:10px!important}
.history-modal .salary-history-list>div{font-size:12px!important;grid-template-columns:130px 110px 1fr!important;padding:10px 2px!important}

/* Import preview must be as readable as the upload modal. */
.import-preview-head h1{font-size:28px!important}.import-preview-head p{font-size:14px!important}.back-link,.import-mode-pill{font-size:12px!important}
.import-summary-row small{font-size:11px!important}.import-summary-row b{font-size:20px!important}
.import-mapping-panel h2,.import-preview-panel h2{font-size:17px!important}.import-mapping-panel p,.import-preview-panel p{font-size:12px!important}
.mapping-grid label,.mapping-grid select{font-size:12px!important}.mapping-grid select{height:39px!important}
.import-mode-help b{font-size:12px!important}.import-mode-help small{font-size:11px!important}
.import-preview-table th{font-size:11px!important}.import-preview-table td{font-size:12px!important;padding:11px 12px!important}.import-preview-table td>small{font-size:10px!important}
.match-pill{font-size:10px!important}.import-change-list b,.import-change-list span{font-size:11px!important}.import-warning{font-size:11px!important}.import-action-note{font-size:11px!important}

@media(max-width:1450px){.v56-payroll-statusbar{grid-template-columns:repeat(3,1fr)!important}.v56-payroll-statusbar .status-signals{grid-column:1/-1!important}}
@media(max-width:950px){.v56-head{align-items:flex-start!important}.v56-payroll-statusbar{grid-template-columns:repeat(2,1fr)!important}.import-mode-choice{grid-template-columns:1fr!important}}
.v57-summary-cards{border:0!important;background:transparent!important;overflow:visible!important;gap:12px!important;box-shadow:none!important}
.v57-summary-cards .status-total{border:1px solid #e3e9ef!important;border-radius:14px!important;background:#fff!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important;box-shadow:0 4px 18px rgba(15,23,42,.035)}
.v57-summary-cards .status-total.net{background:#f5fcf7!important}
.v57-summary-cards .summary-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#f1f5fb;color:#2e67d1;font-size:14px;font-weight:900;flex:0 0 auto}
.v57-summary-cards .status-total.net .summary-icon{background:#e8f8ee;color:#17834e}
.v57-summary-cards .status-total>div{display:flex;flex-direction:column;min-width:0}
.v57-summary-cards .status-signals{border:0!important;background:transparent!important}

/* =========================================================
   V58 · FUNCTION-FIRST VISUAL HIERARCHY
   Calm contrast: clearer scan zones without high-saturation colour.
   ========================================================= */
.payroll-workbench-table{--ml-input-band:#edf4fb;--ml-input-soft:#f7faff;--ml-calc-band:#eef1f5;--ml-calc-soft:#fafbfc;--ml-guide:#e7f0fa;--ml-row:#edf5fc;--ml-active:#dbeafb}
.column-group-row .input-group-head{background:var(--ml-input-band)!important;color:#365a7d!important;border-bottom:2px solid #cbdbea!important;font-weight:900!important;letter-spacing:.08em!important}
.column-group-row .calculated-group-head{background:var(--ml-calc-band)!important;color:#4c5f73!important;border-bottom:2px solid #d6dde5!important;font-weight:900!important;letter-spacing:.08em!important}
.payroll-workbench-table thead tr:not(.column-group-row) th{background:#f5f7fa!important;color:#43566c!important;font-weight:800!important;border-bottom:1px solid #cfd9e3!important}
.payroll-workbench-table thead tr:not(.column-group-row) th.editable-col{background:#f1f6fc!important}
.payroll-workbench-table thead tr:not(.column-group-row) th.calculated-col{background:#f4f6f8!important}
.payroll-workbench-table tbody td.editable-col{background:var(--ml-input-soft)!important}
.payroll-workbench-table tbody td.calculated-col{background:var(--ml-calc-soft)!important}
.payroll-workbench-table tbody td.sticky-net{background:#eef3f6!important;font-weight:800!important}
.payroll-workbench-table .sticky-employee{border-right:2px solid #d9e2eb!important}
.payroll-workbench-table .sticky-net{border-left:2px solid #dde4ea!important}
.payroll-workbench-table .actions-col,.payroll-workbench-table th:last-child{border-left:2px solid #d9e2eb!important}
.payroll-workbench-table tbody .employee-row:hover td{background:var(--ml-row)!important}
.payroll-workbench-table td.ml-col-guide,.payroll-workbench-table th.ml-col-guide{background:var(--ml-guide)!important}
.payroll-workbench-table tbody .employee-row:hover td.ml-col-guide,.payroll-workbench-table tbody .employee-row.ml-edit-row td.ml-col-guide{background:var(--ml-active)!important;box-shadow:inset 0 1px #bdd4ec,inset 0 -1px #bdd4ec!important}
.payroll-workbench-table tbody .employee-row:hover .sticky-employee,.payroll-workbench-table tbody .employee-row.ml-edit-row .sticky-employee{box-shadow:inset 4px 0 #6b9ed3!important}
.payroll-workbench-table .money-input:focus{outline:2px solid #7fa9d6!important;outline-offset:1px!important;background:#fff!important}
/* Actions stays compact; do not reserve a fake blank rail. */
.payroll-workbench-table th:last-child,.payroll-workbench-table td:last-child{width:64px!important;min-width:64px!important;max-width:64px!important;padding-left:8px!important;padding-right:8px!important}
/* Menus should feel transient, not sticky. */
.payroll-action-popover,.column-menu,.mini-column-menu,.employee-action-card{box-shadow:0 14px 34px rgba(15,23,42,.14)!important}

/* =========================================================
   V59 · STABILITY + FUNCTION-FIRST PAYROLL TABLE
   Fixes geometry, actions, transient menus and pay-item flow.
   ========================================================= */

/* Calm, readable table hierarchy — more contrast, not more colour. */
.payroll-grid-panel{
  overflow:visible!important;
  border:1px solid #d5e0ea!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 18px rgba(24,44,70,.045)!important;
}
.payroll-table-wrap{overflow:auto!important;max-width:100%!important;border-radius:13px!important}
.payroll-workbench-table{
  --ml-input-band:#dfeaf6;
  --ml-input-head:#edf3f9;
  --ml-input-soft:#f8fbfe;
  --ml-calc-band:#e8edf3;
  --ml-calc-head:#f1f4f7;
  --ml-calc-soft:#ffffff;
  --ml-row-hover:#e6f0fa;
  --ml-col-hover:#edf3f9;
  --ml-intersection:#d3e4f5;
  table-layout:fixed!important;
  width:max(100%,calc(1370px + (var(--dynamic-cols) * 118px)))!important;
  min-width:calc(1370px + (var(--dynamic-cols) * 118px))!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  margin:0!important;
}
.payroll-workbench-table col.col-employee{width:235px}
.payroll-workbench-table col.col-basic{width:98px}
.payroll-workbench-table col.col-travel{width:108px}
.payroll-workbench-table col.col-ot{width:88px}
.payroll-workbench-table col.col-recurring{width:118px}
.payroll-workbench-table col.col-unpaid{width:104px}
.payroll-workbench-table col.col-taxable{width:102px}
.payroll-workbench-table col.col-gross{width:105px}
.payroll-workbench-table col.col-paye{width:96px}
.payroll-workbench-table col.col-csg{width:88px}
.payroll-workbench-table col.col-nsf{width:78px}
.payroll-workbench-table col.col-net{width:106px}
.payroll-workbench-table col.col-employer{width:112px}
.payroll-workbench-table col.col-actions{width:70px}

.payroll-workbench-table .column-group-row th{
  height:34px!important;padding:8px 10px!important;border-bottom:1px solid #c7d4e0!important;
  color:#40566f!important;font-size:10px!important;font-weight:850!important;letter-spacing:.055em!important;
}
.payroll-workbench-table .input-group-head{background:var(--ml-input-band)!important;color:#315a83!important}
.payroll-workbench-table .calculated-group-head{background:var(--ml-calc-band)!important;color:#4c5f73!important}
.payroll-workbench-table thead tr:nth-child(2) th{
  height:44px!important;padding:10px 7px!important;border-bottom:1px solid #cfd9e3!important;
  color:#405269!important;font-size:10.5px!important;font-weight:800!important;white-space:nowrap!important;
}
.payroll-workbench-table thead tr:nth-child(2) th.editable-col{background:var(--ml-input-head)!important}
.payroll-workbench-table thead tr:nth-child(2) th.calculated-col,
.payroll-workbench-table thead tr:nth-child(2) th.net-head{background:var(--ml-calc-head)!important}
.payroll-workbench-table thead .sticky-employee,
.payroll-workbench-table thead .actions-head{background:#f4f7fa!important;color:#42556b!important}

.payroll-workbench-table tbody td{
  height:76px!important;padding:12px 8px!important;border-bottom:1px solid #e3eaf0!important;
  color:#1f3043!important;font-size:12.5px!important;transition:background .08s ease,border-color .08s ease!important;
}
.payroll-workbench-table tbody td.editable-col{background:var(--ml-input-soft)!important}
.payroll-workbench-table tbody td.calculated-col{background:var(--ml-calc-soft)!important}
.payroll-workbench-table tbody td.net-pay-cell{background:#edf3f7!important;font-weight:850!important;border-left:1px solid #d4dee7!important;border-right:1px solid #d4dee7!important}
.payroll-workbench-table tbody td.actions-col{background:#fbfcfd!important;border-left:1px solid #dce4eb!important;text-align:center!important}
.payroll-workbench-table tbody td.sticky-employee{border-right:1px solid #d4dee8!important;background:#fff!important}
.payroll-workbench-table tbody .employee-history-link{font-size:13.5px!important;color:#172a3e!important}
.payroll-workbench-table tbody .employee-cell-content>small{font-size:11px!important;color:#7a8da1!important}
.payroll-workbench-table .money-input{
  width:100%!important;max-width:94px!important;min-width:0!important;height:36px!important;
  font-size:12.5px!important;font-weight:600!important;border:1px solid #cdd9e5!important;border-radius:8px!important;
  background:#fff!important;color:#14273c!important;text-align:right!important;padding:6px 9px!important;
}
.payroll-workbench-table .money-input:focus{outline:2px solid #7fa8d2!important;outline-offset:1px!important;border-color:#7fa8d2!important}

/* Employee is the only sticky data column. Keep Net Pay prominent, not sticky. */
.payroll-workbench-table .sticky-employee{position:sticky!important;left:0!important;z-index:7!important}
.payroll-workbench-table thead .sticky-employee{z-index:12!important}
.payroll-workbench-table .sticky-net,
.payroll-workbench-table .sticky-actions,
.payroll-workbench-table .actions-head,
.payroll-workbench-table .actions-col{position:static!important;right:auto!important;left:auto!important;min-width:0!important;max-width:none!important;width:auto!important}
.payroll-workbench-table th:last-child,.payroll-workbench-table td:last-child{
  width:auto!important;min-width:0!important;max-width:none!important;padding-left:6px!important;padding-right:6px!important;
}
.payroll-workbench-table .row-actions{min-width:0!important;display:table-cell!important;vertical-align:middle!important}
.row-action-menu{display:inline-block!important;margin:0!important}
.row-action-menu>summary{width:34px!important;height:34px!important;margin:0 auto!important;border:1px solid #cbd7e2!important;border-radius:9px!important;background:#fff!important;color:#4b6076!important;display:grid!important;place-items:center!important}
.row-action-menu[open]>summary{border-color:#6f9bc7!important;box-shadow:0 0 0 2px rgba(111,155,199,.13)!important}
.row-action-menu>div.employee-action-card{z-index:10080!important;width:240px!important;border:1px solid #d9e2ea!important;border-radius:12px!important;box-shadow:0 18px 42px rgba(20,38,58,.18)!important}

/* Stronger row/column scan guidance, still calm. */
.payroll-workbench-table tbody .employee-row:hover td{background:var(--ml-row-hover)!important}
.payroll-workbench-table td.ml-col-guide,
.payroll-workbench-table th.ml-col-guide{background:var(--ml-col-hover)!important}
.payroll-workbench-table tbody .employee-row:hover td.ml-col-guide,
.payroll-workbench-table tbody .employee-row.ml-edit-row td.ml-col-guide{background:var(--ml-intersection)!important;box-shadow:inset 0 1px #aecae5,inset 0 -1px #aecae5!important}
.payroll-workbench-table tbody .employee-row:hover td.sticky-employee,
.payroll-workbench-table tbody .employee-row.ml-edit-row td.sticky-employee{background:#e3eef9!important;box-shadow:inset 4px 0 #6d9dca!important}
.payroll-workbench-table tbody .employee-row.ml-edit-row td{background:#edf5fc!important}

/* Clearer group boundaries. */
.payroll-workbench-table [data-column="basic"]{border-left:1px solid #cad8e5!important}
.payroll-workbench-table [data-column="unpaid"]{border-left:2px solid #c7d1dc!important}
.payroll-workbench-table [data-column="actions"]{border-left:2px solid #d1dae3!important}

/* Toolbar: visibility and adding pay items are now two separate jobs. */
.payroll-grid-controls{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.payroll-grid-controls .btn,.payroll-grid-controls summary{min-height:38px!important;font-size:12px!important;padding:8px 12px!important}
.columns-details{position:relative!important}
.columns-details>.columns-popover{width:340px!important;right:0!important;left:auto!important;max-height:70vh!important;overflow:auto!important;padding:8px!important}
.column-menu-title{padding:9px 10px!important}.column-menu-title b{font-size:13px!important}.column-menu-title small{display:block;font-size:11px!important;color:#748598!important;margin-top:2px}
.column-view-presets{display:flex;gap:6px;padding:7px 10px!important}
.column-view-presets button{font-size:10.5px!important;min-height:30px!important;padding:5px 8px!important}
.column-visibility-list{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px 8px!important;padding:8px 10px 10px!important}
.column-visibility-list label{font-size:11px!important;padding:5px 2px!important}
.column-create-link{display:block!important;padding:10px!important;font-size:11px!important}
.add-pay-item-btn{white-space:nowrap}

/* Add Pay Item modal. */
.add-pay-item-backdrop{position:fixed;inset:0;background:rgba(16,31,48,.30);z-index:190;opacity:0;transition:.15s ease}
.add-pay-item-backdrop.show{opacity:1}
.add-pay-item-modal{position:fixed;z-index:200;left:50%;top:50%;width:min(560px,92vw);max-height:82vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 25px 70px rgba(14,31,50,.24);opacity:0;pointer-events:none;transform:translate(-50%,-46%) scale(.985);transition:.15s ease}
.add-pay-item-modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.modal-head-clean{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:18px 20px 14px;border-bottom:1px solid #e2e8ee}
.modal-head-clean small{font-size:10px;font-weight:800;letter-spacing:.08em;color:#6e8093}.modal-head-clean h2{font-size:21px;margin:3px 0 3px;color:#17293c}.modal-head-clean p{font-size:12.5px;line-height:1.45;color:#6c7e91;margin:0}
.modal-close{width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;border:0!important;border-radius:9px!important;background:#eef2f6!important;color:#52677d!important;font-size:20px!important;display:grid!important;place-items:center!important}
.add-pay-item-body{padding:16px 20px 20px}.available-pay-item-list{display:flex;flex-direction:column;gap:7px}.add-grid-item-form{margin:0}
.add-grid-item-form button{width:100%!important;min-height:58px!important;display:grid!important;grid-template-columns:32px 1fr auto!important;gap:10px!important;align-items:center!important;text-align:left!important;padding:10px 12px!important;background:#fff!important;color:#1e3144!important;border:1px solid #d9e2ea!important;border-radius:10px!important;box-shadow:none!important}
.add-grid-item-form button:hover{background:#f5f8fb!important;border-color:#a9bfd4!important}.pay-item-plus{width:28px;height:28px;border-radius:8px;background:#e8f2fb;color:#326c9f;display:grid;place-items:center;font-size:18px;font-weight:800}.add-grid-item-form b{display:block;font-size:12.5px}.add-grid-item-form small{display:block;font-size:10.5px;color:#7b8b9c;margin-top:2px}.pay-item-add-label{font-size:11px;font-weight:800;color:#326c9f}.manage-pay-items-link{display:inline-block;margin-top:13px;font-size:11.5px;color:#326aa0;text-decoration:none}.empty-pay-items{padding:18px;border:1px dashed #cdd9e4;border-radius:10px;background:#f8fafc}.empty-pay-items b{display:block;font-size:12.5px}.empty-pay-items small{display:block;font-size:11px;color:#748598;margin-top:3px}

/* Reliable compact history modal. */
.history-modal-backdrop[hidden]{display:none!important}
.history-modal-backdrop{z-index:190!important}
.history-modal{z-index:201!important;width:min(680px,92vw)!important;max-height:78vh!important;border-radius:16px!important}
.history-modal .drawer-head{padding:17px 19px 13px!important}.history-modal .drawer-head h2{font-size:20px!important}.history-modal .drawer-head p{font-size:12px!important}.history-modal .drawer-body{padding:16px 19px 19px!important}

/* Import modal typography: readable at normal Windows/Chrome zoom. */
.v56-modal{width:min(650px,94vw)!important}
.v56-modal-head small{font-size:10px!important}.v56-modal-head h2{font-size:22px!important}.v56-modal-head p{font-size:13px!important;line-height:1.45!important}
.import-dropzone{min-height:150px!important}.import-dropzone b{font-size:14px!important}.import-dropzone small{font-size:12px!important;line-height:1.4!important}.import-dropzone input{font-size:12px!important}
.import-mode-choice label{padding:12px!important;min-height:88px!important}.import-mode-choice b{font-size:12.5px!important}.import-mode-choice small{font-size:11px!important;line-height:1.4!important;margin-top:3px!important}.import-modal-footer .btn,.import-modal-footer button{font-size:13px!important;min-height:40px!important}

/* Transient menus remain visually compact but readable. */
.payroll-action-popover{border:1px solid #d9e2ea!important;border-radius:11px!important;box-shadow:0 16px 38px rgba(18,35,54,.17)!important}
.payroll-action-popover a,.payroll-action-popover button{font-size:11.5px!important}.payroll-action-popover b{font-size:12px!important}.payroll-action-popover small{font-size:10px!important}

@media(max-width:1450px){
  .payroll-workbench-table{width:calc(1370px + (var(--dynamic-cols) * 118px))!important}
}
.payroll-workbench-table col.col-actions{width:70px!important}
.payroll-workbench-table th.actions-head,.payroll-workbench-table td.actions-col{width:70px!important;min-width:70px!important;max-width:70px!important}
/* V59.1 column visibility fix: cell-driven layout avoids collapsed neighbour columns. */
.payroll-workbench-table{table-layout:auto!important}
.payroll-workbench-table [data-column="employee"]{min-width:235px!important}
.payroll-workbench-table [data-column="basic"]{min-width:98px!important}
.payroll-workbench-table [data-column="travel"]{min-width:108px!important}
.payroll-workbench-table [data-column="ot"]{min-width:88px!important}
.payroll-workbench-table [data-column^="rec-"]{min-width:118px!important}
.payroll-workbench-table [data-column="unpaid"]{min-width:104px!important}
.payroll-workbench-table [data-column="taxable"]{min-width:102px!important}
.payroll-workbench-table [data-column="gross"]{min-width:105px!important}
.payroll-workbench-table [data-column="paye"]{min-width:96px!important}
.payroll-workbench-table [data-column="csg"]{min-width:88px!important}
.payroll-workbench-table [data-column="nsf"]{min-width:78px!important}
.payroll-workbench-table [data-column="net"]{min-width:106px!important}
.payroll-workbench-table [data-column="employer"]{min-width:112px!important}
.payroll-workbench-table [data-column="actions"]{min-width:70px!important;max-width:76px!important;width:70px!important}

/* =========================================================
   V60 · FUNCTIONAL PAYROLL COMMAND BAR + INPUT WORKSHEETS
   ========================================================= */
.v60-titlebar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;margin-bottom:10px!important}
.v60-titlebar .payroll-title-line h1{font-size:25px!important;line-height:1.12!important;margin:0!important}.v60-titlebar .payroll-meta{font-size:11px!important;margin-top:5px!important}

.payroll-command-bar{display:flex;align-items:stretch;gap:8px;width:100%;overflow-x:auto;overflow-y:visible;padding:0 0 9px;margin-bottom:10px;scrollbar-width:thin}
.command-group{flex:0 0 auto;border:1px solid #d8e2eb;border-radius:11px;background:#fff;padding:7px 8px;min-height:72px;box-shadow:0 2px 7px rgba(20,40,60,.025)}
.command-group-label{font-size:8.5px;line-height:1;text-transform:uppercase;letter-spacing:.09em;color:#718297;font-weight:850;margin:0 0 6px 3px}
.command-group-actions{display:flex;align-items:stretch;gap:5px}.command-group form{margin:0}.command-menu{position:relative}.command-menu>summary{list-style:none}.command-menu>summary::-webkit-details-marker{display:none}
.command-action{appearance:none;text-decoration:none;border:1px solid transparent!important;background:#f2f5f8!important;color:#1b2d40!important;border-radius:8px!important;min-height:43px!important;padding:6px 9px!important;display:grid!important;grid-template-columns:20px auto!important;gap:6px!important;align-items:center!important;text-align:left!important;box-shadow:none!important;cursor:pointer;white-space:nowrap}
.command-action:hover{background:#eaf0f5!important}.command-action>span{font-size:13px;text-align:center;color:#3d6e9f}.command-action b{display:block;font-size:11px!important;line-height:1.1}.command-action small{display:block;font-size:8.5px!important;color:#75869a;line-height:1.2;margin-top:2px}.command-action.strong{background:#edf5fb!important;border-color:#d5e5f2!important}.command-action.primary{background:#2867e8!important;color:#fff!important}.command-action.primary>span,.command-action.primary small{color:#fff!important}.command-action.compact{min-width:78px}
.command-period{min-width:205px}.command-period-form{display:grid;grid-template-columns:30px 132px 30px;gap:4px;align-items:center}.command-period-form input{height:43px!important;border:1px solid #cfdbe6!important;border-radius:8px!important;background:#fff!important;padding:6px 8px!important;font-size:11px!important;font-weight:750!important;min-width:0!important}.command-icon-btn{height:43px!important;min-height:43px!important;width:30px!important;padding:0!important;border:1px solid #d7e0e8!important;background:#f5f7f9!important;color:#486179!important;border-radius:8px!important;font-size:21px!important}
.command-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:10090;width:245px;background:#fff;border:1px solid #d8e1e9;border-radius:11px;box-shadow:0 17px 38px rgba(16,34,52,.16);padding:6px}.command-popover-right{left:auto;right:0}.command-popover a,.command-popover button{display:grid!important;width:100%!important;grid-template-columns:28px 1fr!important;gap:7px!important;align-items:center!important;padding:8px!important;border:0!important;border-radius:7px!important;background:#fff!important;color:#203346!important;text-decoration:none!important;text-align:left!important;box-shadow:none!important}.command-popover a:hover,.command-popover button:hover{background:#f3f6f8!important}.command-popover b{font-size:11px!important}.command-popover small{display:block;font-size:9px!important;color:#7a8b9d;margin-top:1px}.command-popover>form{margin:0}

/* Compact filter bar: review-first. */
.v60-toolbar{align-items:center!important;gap:10px!important}.v60-primary-filters{display:flex!important;align-items:center!important;gap:3px!important;padding:3px!important;background:#edf2f6!important;border-radius:9px!important}.v60-primary-filters>button,.filter-more-menu>summary{min-height:34px!important;padding:6px 9px!important;font-size:11px!important;border-radius:7px!important;white-space:nowrap}.filter-more-menu{position:relative}.filter-more-menu>summary{list-style:none;cursor:pointer;color:#50647a;font-weight:800}.filter-more-menu>summary::-webkit-details-marker{display:none}.filter-popover{position:absolute;top:calc(100% + 5px);right:0;z-index:10070;width:145px;background:#fff;border:1px solid #d9e2ea;border-radius:9px;padding:5px;box-shadow:0 13px 30px rgba(18,36,55,.14)}.filter-popover button{width:100%!important;display:block!important;text-align:left!important;background:#fff!important;color:#32475b!important;border:0!important;box-shadow:none!important;padding:7px 8px!important;font-size:11px!important}.filter-popover button:hover{background:#f2f5f8!important}

/* Main payroll table: only Employee left and Actions right are frozen. */
.v60-payroll-table{table-layout:auto!important;border-collapse:separate!important;border-spacing:0!important;min-width:1320px!important;width:100%!important}
.v60-payroll-table [data-column="employee"]{width:250px!important;min-width:250px!important;max-width:250px!important;box-sizing:border-box!important}.v60-payroll-table [data-column="actions"]{width:70px!important;min-width:70px!important;max-width:70px!important;box-sizing:border-box!important}
.v60-payroll-table .sticky-employee{position:sticky!important;left:0!important;z-index:20!important;background:#fff!important;border-right:1px solid #bfcdd9!important;box-shadow:5px 0 9px -9px rgba(20,40,60,.7)!important}.v60-payroll-table thead .sticky-employee{z-index:32!important;background:#eaf1f7!important}
.v60-payroll-table .sticky-actions{position:sticky!important;right:0!important;z-index:21!important;background:#fff!important;border-left:1px solid #becbd7!important;box-shadow:-5px 0 9px -9px rgba(20,40,60,.7)!important}.v60-payroll-table thead .sticky-actions{z-index:33!important;background:#eaf1f7!important}
.v60-payroll-table tbody .employee-row:hover .sticky-employee,.v60-payroll-table tbody .employee-row.ml-edit-row .sticky-employee{background:#dceaf6!important}.v60-payroll-table tbody .employee-row:hover .sticky-actions,.v60-payroll-table tbody .employee-row.ml-edit-row .sticky-actions{background:#dceaf6!important}
.v60-payroll-table .input-group-head{background:#d9e7f4!important;color:#264a6c!important;border-bottom:1px solid #b8cadb!important}.v60-payroll-table .calculated-group-head{background:#e4eaf0!important;color:#3b536a!important;border-bottom:1px solid #c5d0da!important}.v60-payroll-table thead tr:nth-child(2) th{background:#eef3f7!important;color:#334e68!important;font-weight:850!important;border-bottom:1px solid #cbd6df!important}.v60-payroll-table thead tr:nth-child(2) th.input-summary-col,.v60-payroll-table thead tr:nth-child(2) th.editable-col{background:#e8f1f8!important}
.v60-payroll-table tbody td{background:#fff!important}.v60-payroll-table tbody td.input-summary-col,.v60-payroll-table tbody td.editable-col{background:#f6faff!important}.v60-payroll-table tbody td.calculated-col{background:#fbfcfd!important}.v60-payroll-table tbody td.net-pay-cell{background:#eaf4ef!important;color:#143e2c!important}
.v60-payroll-table tbody .employee-row:hover td{background:#e5eff8!important}.v60-payroll-table tbody .employee-row:hover td.net-pay-cell{background:#dcefe4!important}.v60-payroll-table td.ml-col-guide,.v60-payroll-table th.ml-col-guide{background:#dbe9f6!important}.v60-payroll-table tbody .employee-row:hover td.ml-col-guide,.v60-payroll-table tbody .employee-row.ml-edit-row td.ml-col-guide{background:#cadff1!important;box-shadow:inset 0 1px #9ebfda,inset 0 -1px #9ebfda!important}
.v60-payroll-table th,.v60-payroll-table td{padding:10px 9px!important;font-size:11.5px!important}.v60-payroll-table th{font-size:9.5px!important}.v60-payroll-table [data-column="basic"]{min-width:105px!important}.v60-payroll-table [data-column="allowances"]{min-width:112px!important}.v60-payroll-table [data-column="ot"]{min-width:94px!important}.v60-payroll-table [data-column="deductions"]{min-width:112px!important}.v60-payroll-table [data-column="unpaid"]{min-width:105px!important}.v60-payroll-table [data-column="gross"]{min-width:105px!important}.v60-payroll-table [data-column="paye"]{min-width:92px!important}.v60-payroll-table [data-column="csg"]{min-width:88px!important}.v60-payroll-table [data-column="nsf"]{min-width:82px!important}.v60-payroll-table [data-column="net"]{min-width:112px!important}.v60-payroll-table [data-column="employer"]{min-width:118px!important}
.drilldown-cell a{display:flex;align-items:center;justify-content:flex-end;gap:5px;color:#214f77;text-decoration:none}.drilldown-cell a small{font-size:8px;color:#5c83a6;opacity:0;transition:.12s}.drilldown-cell:hover a small{opacity:1}.drilldown-cell a:hover{text-decoration:underline;text-underline-offset:2px}.v60-payroll-table .money-input{min-height:35px!important;font-size:11.5px!important}
.v60-payroll-table .row-action-menu>div.employee-action-card{position:fixed!important;z-index:10110!important}
.payroll-table-wrap{position:relative!important;overflow:auto!important;max-width:100%!important;overscroll-behavior-x:contain}.payroll-grid-panel{overflow:visible!important}

/* Columns control for the compact V60 grid. */
.columns-details>.columns-popover{width:310px!important}.column-visibility-list{grid-template-columns:1fr 1fr!important}.user-hidden-column{display:none!important}

/* Monthly Inputs spreadsheet workspace. */
.input-workspace-page{width:100%;min-width:0}.input-workspace-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:11px}.input-back-link{display:inline-block;font-size:10px;color:#47729e;text-decoration:none;margin-bottom:5px}.input-title-line{display:flex;align-items:center;gap:10px}.input-title-line h1{margin:0;font-size:25px;color:#14283c}.input-title-line span{font-size:12px;color:#5f7286;padding:4px 7px;border-radius:999px;background:#eef3f7}.input-workspace-head p{font-size:11px;color:#708296;margin:4px 0 0}.input-workspace-actions{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap}.input-workspace-actions form{margin:0}.input-period-form label{display:flex;flex-direction:column;gap:3px;font-size:8px;text-transform:uppercase;font-weight:850;letter-spacing:.08em;color:#6c7e91}.input-period-form input{height:39px;border:1px solid #cfdae5;border-radius:8px;background:#fff;padding:6px 8px;font-size:11px;font-weight:750}
.input-workspace-tabs{display:flex;gap:4px;padding:4px;background:#e9eff4;border-radius:9px;width:max-content;margin-bottom:8px}.input-workspace-tabs a{text-decoration:none;color:#50657b;font-size:11px;font-weight:800;padding:8px 12px;border-radius:7px}.input-workspace-tabs a.active{background:#fff;color:#17395b;box-shadow:0 1px 4px rgba(20,40,60,.08)}
.input-workspace-toolbar{display:flex;align-items:center;gap:12px;justify-content:space-between;border:1px solid #dce5ec;border-radius:10px;background:#fff;padding:7px 9px;margin-bottom:7px}.input-workspace-search{display:flex;align-items:center;gap:6px;min-width:260px;flex:1;max-width:480px}.input-workspace-search input{width:100%;height:34px;border:0;outline:0;background:transparent;font-size:11px}.input-scope-control{display:flex;align-items:center;gap:8px;font-size:9.5px;color:#526579}.input-scope-control>span{font-weight:800}.input-scope-control label{display:flex;align-items:center;gap:4px;white-space:nowrap}.input-scope-control input{accent-color:#2e6cac}.matrix-save-state{font-size:9px;font-weight:800;color:#28744e;white-space:nowrap}.matrix-save-state.saving,.matrix-save-state.waiting{color:#7a6b34}.matrix-save-state.error{color:#ad3737}.matrix-save-state.warning{color:#886100}
.matrix-help-strip{display:flex;gap:18px;flex-wrap:wrap;padding:6px 9px;color:#6f8093;font-size:8.5px}.matrix-help-strip b{color:#42576d}
.input-matrix-panel{padding:0!important;overflow:hidden!important}.input-matrix-wrap{overflow:auto;max-width:100%;max-height:66vh}.input-matrix-table{border-collapse:separate;border-spacing:0;min-width:100%;width:max-content}.input-matrix-table th,.input-matrix-table td{border-right:1px solid #e3e9ee;border-bottom:1px solid #e4eaf0;padding:7px 8px;min-width:135px;background:#fff;box-sizing:border-box}.input-matrix-table thead th{position:sticky;top:0;z-index:8;background:#e7eef5;color:#334e68;font-size:9px;text-align:center}.input-matrix-table .matrix-employee-head,.input-matrix-table .matrix-employee-cell{position:sticky;left:0;z-index:12;min-width:250px!important;width:250px!important;max-width:250px!important;background:#fff!important;text-align:left;border-right:1px solid #bfcdda;box-shadow:5px 0 9px -9px rgba(20,40,60,.7)}.input-matrix-table thead .matrix-employee-head{z-index:20;background:#dbe7f2!important}.matrix-col-title{font-size:10px;font-weight:850;color:#234664;white-space:normal;line-height:1.2}.input-matrix-table thead th small{display:block;font-size:7.5px;color:#72859a;margin-top:2px}.matrix-employee-cell b{display:block;font-size:11.5px;color:#172b3f}.matrix-employee-cell small{display:block;font-size:9px;color:#7a8a9d;margin-top:2px}.matrix-state{display:inline-block;margin-top:4px;font-size:7.5px;font-weight:850;color:#a43d3d;background:#fbecec;border-radius:999px;padding:2px 5px}.matrix-value-cell{position:relative;text-align:right;vertical-align:middle}.matrix-input{width:100%;height:34px;border:1px solid #cad7e2;border-radius:7px;background:#fff;text-align:right;padding:5px 7px;font-size:11px;color:#152b40;outline:0}.matrix-input:focus{border-color:#719dc5;box-shadow:0 0 0 2px rgba(82,137,188,.13)}.matrix-locked-value{display:block;font-size:11px;text-align:right}.matrix-cell-meta{display:flex;justify-content:flex-end;gap:4px;min-height:13px;margin-top:2px}.recurring-badge{font-size:6.8px;font-weight:800;color:#357350;background:#e8f4ed;border-radius:999px;padding:1px 4px}.matrix-delta{font-size:7px;color:#6c7f92}.matrix-delta.up{color:#25764c}.matrix-delta.down{color:#a04444}.matrix-row-total,.matrix-total-head{position:sticky;right:0;z-index:10;min-width:120px!important;background:#f1f5f8!important;text-align:right!important;border-left:1px solid #c4d0db!important}.input-matrix-table thead .matrix-total-head{z-index:18}.input-matrix-table tfoot th{position:sticky;bottom:0;z-index:9;background:#e8eef3;color:#304b65;font-size:9px;text-align:right}.input-matrix-table tfoot th:first-child{left:0;z-index:18;text-align:left}.matrix-row:hover td{background:#e8f1f9!important}.matrix-row:hover .matrix-employee-cell{background:#dceaf6!important}.matrix-value-cell.matrix-hover-col,.matrix-value-cell.matrix-active-col{background:#dfeaf5!important}.matrix-row.matrix-active-row td{box-shadow:inset 0 1px #a9c3da,inset 0 -1px #a9c3da}.matrix-row.matrix-active-row .matrix-value-cell.matrix-active-col{background:#ccdfef!important}.matrix-dirty{background:#fff7dc!important}.matrix-invalid{background:#fdeaea!important;box-shadow:inset 0 0 0 1px #d67575!important}.matrix-row-excluded{opacity:.62}.matrix-no-components{padding:35px;text-align:center}.matrix-no-components h2{font-size:18px;margin:0 0 5px}.matrix-no-components p{font-size:11px;color:#748598;margin:0 0 12px}.matrix-empty-search{padding:28px;text-align:center;color:#748598;font-size:11px}

/* Right-side action popover opens inward from the frozen action column. */
.v60-payroll-table .employee-action-card{transform-origin:top right!important}

@media(max-width:1450px){
  .command-group-label{font-size:8px}.command-action{padding:5px 7px!important}.command-action small{display:none!important}.command-action b{font-size:10.5px!important}.command-group{min-height:61px}.command-period{min-width:190px}.command-period-form{grid-template-columns:27px 124px 27px}.command-period-form input,.command-icon-btn{height:38px!important;min-height:38px!important}
  .v60-payroll-table{min-width:1260px!important}
}
@media(max-width:1180px){
  .payroll-command-bar{padding-bottom:7px}.command-group{padding:6px}.command-review .command-action[data-jump-filter="changed"]{display:none!important}.v60-toolbar{align-items:flex-start!important;flex-wrap:wrap!important}.payroll-search-filters{flex:1 1 620px!important}.payroll-grid-controls{margin-left:auto!important}.v60-primary-filters>button[data-filter="changed"],.v60-primary-filters>button[data-filter="exceptions"]{display:inline-flex!important}
  .input-workspace-head{align-items:flex-start;flex-direction:column}.input-workspace-toolbar{align-items:flex-start;flex-wrap:wrap}.input-scope-control{order:3;width:100%}
}
@media(max-width:820px){
  .v60-titlebar .payroll-title-line h1{font-size:21px!important}.v57-summary-cards{grid-template-columns:repeat(2,1fr)!important}.payroll-search-filters{display:grid!important;grid-template-columns:1fr!important}.v60-primary-filters{width:max-content!important;max-width:100%!important}.input-workspace-tabs{width:100%;overflow:auto}.input-workspace-tabs a{white-space:nowrap}.input-workspace-search{min-width:200px}.input-matrix-table .matrix-employee-head,.input-matrix-table .matrix-employee-cell{min-width:215px!important;width:215px!important;max-width:215px!important}
}

/* V61 employee-level statutory applicability */
.statutory-toggle-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 14px}.statutory-toggle-grid .checkbox-card{min-height:68px;align-items:flex-start}.statutory-toggle-grid .checkbox-card small{display:block;font-weight:400;opacity:.72;margin-top:3px}@media(max-width:1050px){.statutory-toggle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.statutory-toggle-grid{grid-template-columns:1fr}}

/* =========================================================
   V62 · POLISHED WORKSPACE NAVIGATION + RESPONSIVE PAYROLL UI
   ========================================================= */

/* Internal Mo Lapaye workspace tabs. These are app tabs, not browser tabs. */
.ml-workspace-tabs-shell{
  width:100%;min-width:0;display:flex;align-items:flex-end;gap:8px;
  padding:8px var(--app-gutter,24px) 0;background:#eef3f8;border-bottom:1px solid #d7e1ea;
  overflow:hidden;
}
.ml-workspace-tabs-shell[hidden]{display:none!important}
.ml-workspace-tabs{display:flex;align-items:flex-end;gap:3px;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;flex:1;padding-top:2px}
.ml-workspace-tab{display:flex;align-items:center;min-width:132px;max-width:245px;height:36px;border:1px solid #cfdae5;border-bottom:0;border-radius:8px 8px 0 0;background:#dfe9f2;color:#435a70;flex:0 0 auto;cursor:grab;position:relative}
.ml-workspace-tab:hover{background:#e8f0f6}
.ml-workspace-tab.dragging{opacity:.55;cursor:grabbing}
.ml-workspace-tab.drop-before::before,.ml-workspace-tab.drop-after::after{content:"";position:absolute;top:6px;bottom:6px;width:3px;border-radius:999px;background:#1f73e8}
.ml-workspace-tab.drop-before::before{left:-2px}
.ml-workspace-tab.drop-after::after{right:-2px}
.ml-workspace-tab.active{background:#fff;color:#17324b;border-color:#bdccda;box-shadow:0 -2px 8px rgba(20,39,58,.035)}
.ml-workspace-tab a{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;text-decoration:none;padding:0 7px 0 11px;font:600 12px/35px "Segoe UI",Inter,Arial,sans-serif}
.ml-workspace-tab button{appearance:none;border:0!important;box-shadow:none!important;background:transparent!important;color:#74869a!important;width:28px!important;min-width:28px!important;height:34px!important;min-height:34px!important;padding:0!important;border-radius:5px!important;font-size:17px!important;font-weight:400!important}
.ml-workspace-tab button:hover{background:#d4e0ea!important;color:#253e55!important}
.ml-workspace-tab.active button:hover{background:#edf2f6!important}
.ml-workspace-tabs-clear{flex:0 0 auto;margin-bottom:4px!important;min-height:28px!important;padding:5px 8px!important;border:1px solid #ced9e3!important;background:#f7f9fb!important;color:#5d7084!important;border-radius:6px!important;font:600 10px/1 "Segoe UI",Inter,Arial,sans-serif!important;box-shadow:none!important}

/* Summary cards own the available width; no review badge lives outside the grid. */
.v57-summary-cards{grid-template-columns:repeat(6,minmax(0,1fr))!important;width:100%!important;min-width:0!important;overflow:visible!important}
.v57-summary-cards .status-total{min-width:0!important;padding:11px 12px!important}
.v57-summary-cards .status-total b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Payroll ribbon: keep the structure, remove the heavy SaaS-card feeling. */
.payroll-command-bar{
  display:flex!important;flex-wrap:wrap!important;align-items:stretch!important;gap:7px!important;
  width:100%!important;max-width:100%!important;overflow:visible!important;padding:0!important;margin:0 0 11px!important;
  font-family:"Segoe UI",Inter,Arial,sans-serif!important;
}
.command-group{min-width:0!important;min-height:68px!important;padding:7px!important;border-radius:8px!important;border-color:#d8e1e9!important;box-shadow:0 1px 3px rgba(19,37,55,.025)!important}
.command-group-label{font-family:"Segoe UI",Inter,Arial,sans-serif!important;font-size:9px!important;font-weight:650!important;letter-spacing:.055em!important;color:#718196!important;margin:0 0 6px 2px!important}
.command-group-actions{gap:4px!important}
.command-action{min-height:42px!important;padding:6px 9px!important;border-radius:6px!important;font-family:"Segoe UI",Inter,Arial,sans-serif!important;background:#f3f6f8!important}
.command-action:hover{background:#e9eff4!important}
.command-action>span{font-size:12px!important;color:#47729c!important}
.command-action b{font-family:"Segoe UI",Inter,Arial,sans-serif!important;font-size:12px!important;line-height:1.08!important;font-weight:650!important;letter-spacing:0!important}
.command-action small{font-family:"Segoe UI",Inter,Arial,sans-serif!important;font-size:9px!important;font-weight:400!important;line-height:1.18!important;color:#7b8999!important;margin-top:2px!important}
.command-action.strong{background:#edf4f9!important;border-color:#d8e5ee!important}
.command-action.primary{background:#2867e8!important;border-color:#2867e8!important}
.command-period{flex:0 1 205px!important}
.command-inputs{flex:0 1 auto!important}.command-review{flex:0 1 auto!important}.command-process{flex:0 1 auto!important}.command-outputs{flex:0 1 auto!important}
.command-period-form{grid-template-columns:29px minmax(118px,132px) 29px!important}
.command-period-form input,.command-icon-btn{height:42px!important;min-height:42px!important;border-radius:6px!important}
.command-popover{font-family:"Segoe UI",Inter,Arial,sans-serif!important}

/* One compact filter status + one filter menu. */
.v60-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important}
.payroll-search-filters{display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important;flex:1 1 700px!important}
.payroll-search-box{flex:1 1 360px!important;min-width:230px!important;max-width:620px!important}
.payroll-filter-control{display:flex;align-items:stretch;gap:5px;flex:0 0 auto}
.active-filter-card{display:flex;align-items:center;gap:7px;min-width:150px;height:36px;padding:0 9px;border:1px solid #dbe4ec;border-radius:7px;background:#fff;font-family:"Segoe UI",Inter,Arial,sans-serif}
.active-filter-card small{font-size:9px;color:#8190a0;text-transform:uppercase;letter-spacing:.045em;font-weight:600}
.active-filter-card b{font-size:11px;color:#263c51;font-weight:650;white-space:nowrap}
.payroll-filter-control .filter-more-menu>summary{display:flex!important;align-items:center!important;height:36px!important;min-height:36px!important;padding:0 11px!important;border:1px solid #d8e1e9!important;background:#eef2f5!important;color:#30475d!important;border-radius:7px!important;font:650 11px/1 "Segoe UI",Inter,Arial,sans-serif!important;box-shadow:none!important}
.filter-popover-all{right:0!important;left:auto!important;width:190px!important;padding:5px!important}
.filter-popover-all button{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;border-radius:6px!important;font-family:"Segoe UI",Inter,Arial,sans-serif!important;font-weight:550!important}
.filter-popover-all button.active{background:#edf4fb!important;color:#1d4f80!important;font-weight:700!important}

/* Status treatment: clear enough to scan, soft enough not to imply system failure. */
.v60-payroll-table tbody .employee-row.not-paid-row td{background:#fff5f5!important;border-top-color:#f1dada!important;border-bottom-color:#f1dada!important}
.v60-payroll-table tbody .employee-row.not-paid-row .sticky-employee{background:#fff1f1!important;box-shadow:inset 4px 0 #d97777,5px 0 9px -9px rgba(20,40,60,.7)!important}
.v60-payroll-table tbody .employee-row.not-paid-row .sticky-actions{background:#fff5f5!important}
.v60-payroll-table tbody .employee-row.not-paid-row:hover td{background:#fdeaea!important}
.v60-payroll-table tbody .employee-row.not-paid-row:hover .sticky-employee{background:#fbe4e4!important}
.v60-payroll-table tbody .employee-row.not-paid-row td.net-pay-cell{background:#fae8e8!important}
.row-state-pill{background:#f8dddd!important;color:#a03838!important;border:1px solid #edc8c8!important}
.v60-payroll-table tbody .employee-row.exception-row:not(.not-paid-row) .sticky-employee{box-shadow:inset 4px 0 #d8a84f,5px 0 9px -9px rgba(20,40,60,.7)!important}
.v60-payroll-table tbody .employee-row.finalised-row:not(.not-paid-row) .sticky-employee{box-shadow:inset 4px 0 #77a58c,5px 0 9px -9px rgba(20,40,60,.7)!important}

/* Inputs receive the same not-paid scan language. */
.input-matrix-table .matrix-row-excluded{opacity:1!important}
.input-matrix-table .matrix-row-excluded td{background:#fff5f5!important}
.input-matrix-table .matrix-row-excluded .matrix-employee-cell{background:#fff0f0!important;box-shadow:inset 4px 0 #d97777,5px 0 9px -9px rgba(20,40,60,.7)!important}
.input-matrix-table .matrix-row-excluded:hover td{background:#fdeaea!important}

/* Responsive geometry: the page never gains a horizontal scrollbar; only data tables do. */
.ml-main{overflow-x:clip!important}
.payroll-table-wrap,.input-matrix-wrap{overflow:auto!important;max-width:100%!important}
@media(max-width:1650px) and (min-width:1181px){
  .payroll-command-bar{gap:6px!important}
  .command-action{padding-left:7px!important;padding-right:7px!important}
  .command-action b{font-size:11.5px!important}
}
@media(max-width:1450px){
  .v57-summary-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .payroll-search-filters{flex:1 1 100%!important}
  .payroll-grid-controls{margin-left:auto!important}
}
@media(max-width:1000px){
  .v57-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .payroll-search-filters{align-items:stretch!important;flex-wrap:wrap!important}
  .payroll-search-box{max-width:none!important;flex:1 1 100%!important}
  .payroll-filter-control{width:100%!important}.active-filter-card{flex:1!important}
  .input-workspace-head{align-items:flex-start!important;flex-direction:column!important}
}
@media(max-width:700px){
  .v57-summary-cards{grid-template-columns:1fr!important}
  .ml-workspace-tabs-shell{padding-left:12px!important;padding-right:12px!important}
  .ml-workspace-tabs-clear{display:none!important}
  .command-group{width:100%!important;flex:1 1 100%!important}
  .command-group-actions{flex-wrap:wrap!important}.command-action{flex:1 1 140px!important}
  .command-period-form{grid-template-columns:34px minmax(0,1fr) 34px!important}
}

/* =========================================================
   V63 · TYPOGRAPHY CONSISTENCY + LEAVE ENGINE
   ========================================================= */
:root{--ml-ui-font:"Segoe UI",Inter,Arial,sans-serif}
.ml-body,.ml-main,.ml-sidebar,button,.btn,input,select,textarea,table{font-family:var(--ml-ui-font)!important}
.command-group-label,.command-action,.active-filter-card,.filter-more-menu,.ml-workspace-tab a{font-family:var(--ml-ui-font)!important}
.command-action b{font-weight:600!important}.command-action small{font-weight:400!important}.command-group-label{font-weight:600!important;letter-spacing:.04em!important}
.active-filter-card{min-width:154px!important;gap:0!important;padding:0 11px!important}
.active-filter-card span{font-size:11px;color:#53677b;font-weight:400;white-space:nowrap}.active-filter-card b{font-size:11px!important;font-weight:600!important;color:#20374e!important;margin-left:2px}
.command-leave{flex:0 1 auto!important}.command-leave .command-action{min-width:128px}

.leave-page-head p,.leave-workspace-head p{margin:4px 0 0}.leave-rule-callout{display:flex;gap:12px;align-items:center;padding:11px 13px;margin:0 0 14px;border:1px solid #cfe0ec;border-radius:9px;background:#f5f9fc;color:#476177;font-size:12px}.leave-rule-callout b{color:#173750}.leave-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.leave-rule-card{padding:15px!important;margin:0!important}.leave-rule-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.leave-rule-card-head h2{margin:3px 0 0;font-size:15px}.leave-rule-code{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#668099;font-weight:650}.leave-category{font-size:9px;padding:4px 7px;border-radius:999px;background:#edf2f6;color:#5a7085;text-transform:capitalize}.leave-rule-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}.leave-rule-metrics span{padding:8px;border:1px solid #e3eaf0;border-radius:7px;background:#fbfcfd}.leave-rule-metrics small{display:block;color:#7b8c9d;font-size:8px;text-transform:uppercase}.leave-rule-metrics b{display:block;margin-top:3px;font-size:11px}.leave-rule-card p{font-size:11px;line-height:1.45;margin:8px 0;color:#617387}.leave-rule-note{font-size:10px;padding:7px 8px;background:#fff8e9;border:1px solid #f2dfb4;border-radius:7px;color:#7d622e}.leave-version-editor{margin-top:10px;border-top:1px solid #e8edf2;padding-top:8px}.leave-version-editor>summary{cursor:pointer;color:#315d84;font-size:11px;font-weight:600}.leave-inline-rule-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}.leave-inline-rule-form label,.leave-custom-form label,.leave-policy-toolbar label{margin:0;font-size:10px}.leave-inline-rule-form input,.leave-inline-rule-form select,.leave-custom-form input,.leave-custom-form select,.leave-policy-toolbar input{margin-top:4px;padding:7px}.leave-rule-actions{display:flex;gap:7px;align-items:end}.leave-rule-actions button{padding:8px 10px}.leave-impact-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.leave-impact-cards span{padding:12px;border:1px solid #e0e8ef;border-radius:8px}.leave-impact-cards b{display:block;font-size:22px}.leave-impact-cards small{color:#718398}.leave-custom-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;align-items:end}.leave-custom-form button{height:36px}

.leave-policy-toolbar{display:flex;gap:10px;align-items:end;justify-content:flex-end;margin:0 0 10px}.leave-policy-toolbar label{width:180px}.leave-policy-table-wrap,.leave-sheet-wrap{overflow:auto;border:1px solid #dce5ed;border-radius:10px;background:#fff}.leave-policy-table{min-width:1180px}.leave-policy-table th,.leave-sheet-table th{background:#edf4f9;color:#35516a;font-size:9px;font-weight:650}.leave-policy-table td{vertical-align:top}.leave-policy-table td:first-child{min-width:210px}.leave-policy-table td small{white-space:normal;max-width:180px}.leave-policy-table input,.leave-policy-table select{min-width:120px;margin:0;padding:7px;font-size:11px}.policy-floor-note{color:#a15d20!important}.policy-history{margin-top:14px}

.leave-workspace-head{display:flex;justify-content:space-between;gap:16px;align-items:end;margin-bottom:12px}.leave-workspace-head h1{margin-top:4px}.leave-period-box{display:flex;gap:8px;align-items:end}.leave-period-box label{margin:0;font-size:9px}.leave-period-box input{width:150px;margin-top:4px;padding:8px}.leave-type-tabs{display:flex;gap:4px;overflow:auto;padding:0 0 7px;margin-bottom:5px}.leave-type-tabs a{flex:0 0 auto;padding:8px 10px;border:1px solid #d9e3eb;border-radius:7px;background:#f3f6f8;color:#405a70;text-decoration:none;font-size:10px;font-weight:550}.leave-type-tabs a.active{background:#e7f4ee;border-color:#b9ddca;color:#1e6948;font-weight:650}.leave-sheet-rulebar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:9px 11px;margin-bottom:8px;border:1px solid #dbe5ed;border-radius:8px;background:#f8fafc}.leave-sheet-rulebar b{display:block;font-size:12px}.leave-sheet-rulebar span{font-size:9px;color:#6b7e91}.leave-sheet-rulebar p{max-width:680px;margin:0;color:#65798c;font-size:10px;line-height:1.4}.leave-sheet-table{min-width:1280px;font-size:11px}.leave-sheet-table th{text-align:center;border-right:1px solid #dfe8ef}.leave-sheet-table .group-head th{background:#dceaf4}.leave-sheet-table td{padding:7px;border-right:1px solid #edf1f4;vertical-align:middle}.leave-sheet-table .leave-employee{position:sticky;left:0;z-index:2;background:#fff;min-width:210px}.leave-sheet-table .leave-employee b{display:block}.leave-sheet-table .leave-employee small{font-size:9px}.leave-sheet-table input{margin:0;padding:6px;min-width:82px;font-size:11px}.leave-sheet-table td:last-child input{min-width:150px}.leave-balance,.leave-cash{text-align:right;background:#f3faf6}.leave-balance b,.leave-cash b{font-size:12px}.leave-cash small{display:block;font-size:8px;color:#75889b}.leave-eligibility{display:block;max-width:180px;white-space:normal;font-size:9px;font-weight:600}.leave-not-eligible td{background:#f5f6f7!important;color:#8895a1}.leave-not-eligible .leave-employee{background:#eef1f3!important}.leave-verify td{background:#fffaf0}.leave-verify .leave-employee{background:#fff7e7}.pay-treatment{display:inline-block;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:650}.pay-treatment.paid{background:#e7f6ed;color:#28724e}.pay-treatment.unpaid{background:#fdeaea;color:#a33e3e}.pay-treatment.conditional{background:#fff3d8;color:#8a641b}.leave-sheet-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:9px;color:#708297;font-size:10px}.leave-sheet-footer button{padding:9px 14px}.leave-sheet-footer button:disabled{opacity:.45;cursor:not-allowed}

@media(max-width:1200px){.leave-rule-grid{grid-template-columns:1fr}.leave-inline-rule-form{grid-template-columns:repeat(2,minmax(0,1fr))}.leave-custom-form{grid-template-columns:repeat(2,minmax(0,1fr))}.leave-workspace-head{align-items:flex-start;flex-direction:column}.leave-period-box{width:100%}}
@media(max-width:760px){.leave-rule-callout{align-items:flex-start;flex-direction:column}.leave-inline-rule-form,.leave-custom-form{grid-template-columns:1fr}.leave-policy-toolbar{justify-content:stretch}.leave-policy-toolbar label{width:auto;flex:1}.leave-sheet-rulebar{flex-direction:column}}
.leave-drawdown-select{display:block;width:100%;min-width:155px;margin:0 0 5px!important;padding:5px 6px!important;font-size:9.5px!important;border:1px solid #d8e2ea;border-radius:6px;background:#fff;color:#40566b}.leave-as-required{font-size:9.5px;color:#536d84;font-weight:600}.leave-employee-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}

/* =========================================================
   V64 · GLOBAL POLISH, LEAVE WORKFLOW & RESPONSIVE AUDIT
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden!important}
.ml-main,.ml-page-shell,.v56-workbench-main,.payroll-grid-panel{min-width:0!important;max-width:100%!important;box-sizing:border-box}
.ml-page-shell{overflow-x:clip!important}
.payroll-table-wrap,.input-matrix-wrap,.leave-sheet-wrap,.leave-policy-table-wrap{max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain}
.ml-workspace-tabs-shell{max-width:100%!important;min-width:0!important;overflow:hidden!important}
.ml-workspace-tabs{max-width:100%!important;min-width:0!important;overflow-x:auto!important}

/* One clear, reusable Back control across Mo Lapaye. */
.back-link,.input-back-link,.employee-compact-back{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
 min-height:42px!important;min-width:94px!important;padding:9px 14px!important;margin:0 0 10px!important;
 border:1px solid #cbd8e4!important;border-radius:9px!important;background:#fff!important;color:#29465f!important;
 text-decoration:none!important;font:600 12px/1 var(--ml-ui-font)!important;box-shadow:0 1px 2px rgba(20,40,60,.025)!important;
 white-space:nowrap!important
}
.back-link:hover,.input-back-link:hover,.employee-compact-back:hover{background:#f3f7fa!important;border-color:#aebfce!important;color:#173750!important}

/* Contextual help: hover enhances it; click/tap also keeps it open. */
.ml-info-help{display:inline-block;position:relative;vertical-align:middle;margin-left:5px}
.ml-info-help>summary{list-style:none;display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;border:1px solid #b8c8d6;border-radius:50%;background:#f5f8fa;color:#47647d;font:700 11px/1 var(--ml-ui-font);cursor:pointer;user-select:none}
.ml-info-help>summary::-webkit-details-marker{display:none}
.ml-info-help>summary:hover{background:#eaf2f7;border-color:#8eabc1}
.ml-info-pop{display:none;position:absolute;z-index:90;left:0;top:25px;width:min(360px,78vw);padding:11px 12px;border:1px solid #cad7e2;border-radius:9px;background:#fff;color:#40566b;box-shadow:0 12px 30px rgba(18,40,61,.15);font:400 11px/1.45 var(--ml-ui-font);text-transform:none;letter-spacing:0}
.ml-info-pop>b{display:block;margin-bottom:5px;color:#173750;font-size:12px}.ml-info-pop p{margin:0 0 6px!important}.ml-info-pop ul{margin:5px 0 0 17px;padding:0}.ml-info-pop li{margin:3px 0}.ml-info-pop dl{display:grid;grid-template-columns:88px 1fr;gap:3px 8px;margin:7px 0 0}.ml-info-pop dt{font-weight:650;color:#536b80}.ml-info-pop dd{margin:0}
.ml-info-help[open]>.ml-info-pop{display:block}
@media(hover:hover) and (pointer:fine){.ml-info-help:hover>.ml-info-pop{display:block}}
.leave-rule-title-line,.policy-leave-name,.conditional-builder-head{display:flex;align-items:center;gap:4px;min-width:0}
.leave-rule-title-line h2{margin:3px 0 0}

/* Conditional rule builder only appears when Conditional is selected. */
.leave-conditional-builder{grid-column:1/-1;display:grid;grid-template-columns:1.2fr .9fr 1fr .8fr .9fr;gap:8px;padding:10px;border:1px solid #d7e2eb;border-radius:9px;background:#f8fbfd}
.leave-conditional-builder[hidden]{display:none!important}.conditional-builder-head{grid-column:1/-1}.conditional-builder-head b{font-size:11px;color:#29485f}

/* Company leave cycle setup. */
.company-leave-cycle-panel{margin-bottom:14px!important}.company-cycle-head small{font-size:9px;letter-spacing:.06em;color:#71869a;font-weight:650}.company-cycle-head h2{margin:3px 0 4px;font-size:16px}.company-cycle-head p{margin:0 0 12px;color:#687c8f;font-size:11px}
.company-cycle-form{display:grid;grid-template-columns:1.05fr 1.25fr .7fr .7fr .85fr .95fr .9fr 1.25fr auto;gap:8px;align-items:end}.company-cycle-form label{font-size:10px;margin:0}.company-cycle-form input,.company-cycle-form select{margin-top:4px;padding:8px;font-size:11px}.company-cycle-form button{height:37px;white-space:nowrap}.company-cycle-form input[readonly]{background:#f3f5f7;color:#7a8997}.policy-cycle-control{display:flex;align-items:center;gap:4px}.policy-cycle-control select{flex:1}

/* Leave worksheet: calculated cells are visibly read-only, input cells behave like a sheet. */
.leave-sheet-hint{display:flex;gap:8px;align-items:center;margin:0 0 7px;padding:7px 9px;border:1px solid #dbe6ee;border-radius:7px;background:#f8fbfd;color:#647a8e;font-size:9px}.leave-sheet-hint b{color:#31536d}.leave-calculated-cell{background:#f4f7f9!important}.leave-calculated-cell input[readonly]{background:transparent!important;border-color:transparent!important;box-shadow:none!important;color:#4e6478!important}.leave-calculated-cell small,.leave-sheet-table td small{display:block;margin-top:3px;font-size:8px;color:#7a8c9d;white-space:normal}.leave-cycle-label{display:block;min-width:125px;font-size:9px;color:#4f687d}.leave-note-input{min-width:150px!important}
.leave-grid-input:focus{outline:none!important;border-color:#5f9be5!important;box-shadow:0 0 0 2px rgba(59,130,246,.11)!important;background:#fff!important}

/* Columns popover: single list, clear sections, less checkbox-panel clutter. */
.v64-columns-popover{width:330px!important;max-width:min(330px,calc(100vw - 28px))!important;padding:0!important;overflow:hidden!important}
.v64-columns-popover .column-menu-title{padding:14px 15px 11px;border-bottom:1px solid #e4eaf0}.v64-columns-popover .column-menu-title b{font-size:13px;font-weight:650}.v64-columns-popover .column-menu-title small{display:block;margin-top:3px;font-size:9px;line-height:1.35;color:#718398}
.column-menu-section{padding:10px 15px;border-bottom:1px solid #edf1f4}.column-menu-section-title{display:block;margin-bottom:7px;font-size:9px;font-weight:700;letter-spacing:.055em;text-transform:uppercase;color:#74879a}
.v64-segmented{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:0!important;padding:2px!important;border:1px solid #d5dfe7;border-radius:8px;background:#f3f6f8}.v64-segmented button{border:0!important;border-radius:6px!important;background:transparent!important;min-height:31px!important;padding:6px 8px!important;font-size:10px!important;font-weight:600!important;box-shadow:none!important}.v64-segmented button:hover{background:#fff!important}
.v64-column-list{display:grid!important;grid-template-columns:1fr!important;gap:0!important}.v64-column-list label,.pay-item-view-list label{display:flex!important;align-items:center!important;gap:9px!important;min-height:32px!important;padding:5px 2px!important;border:0!important;background:transparent!important;font-size:11px!important;font-weight:500!important}.v64-column-list label+label,.pay-item-view-list label+label{border-top:1px solid #f0f3f6!important}.v64-column-list input,.pay-item-view-list input{flex:0 0 auto;margin:0!important;width:15px!important;height:15px!important}
.pay-item-view-list{display:grid}.pay-item-view-list label{align-items:flex-start!important}.pay-item-view-list span{display:grid;gap:1px}.pay-item-view-list b{font-size:11px;font-weight:600;color:#284258}.pay-item-view-list small{font-size:9px;line-height:1.3;color:#77899a;font-weight:400}.v64-columns-popover .column-create-link{display:block;padding:11px 15px!important;margin:0!important;background:#fafcfd;border:0!important;font-size:10px!important;font-weight:600!important}
.detail-pay-col{white-space:nowrap}.pay-detail-hidden{display:none!important}

/* Showing reads as one typographic sentence. */
.active-filter-card span,.active-filter-card b{font-family:var(--ml-ui-font)!important}.active-filter-card span{font-weight:500!important}.active-filter-card b{font-weight:600!important;margin-left:1px!important}

@media(max-width:1350px){
 .company-cycle-form{grid-template-columns:repeat(4,minmax(0,1fr))}.company-cycle-form button{width:100%}
 .leave-conditional-builder{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:850px){
 .company-cycle-form{grid-template-columns:repeat(2,minmax(0,1fr))}.leave-conditional-builder{grid-template-columns:1fr 1fr}
 .back-link,.input-back-link,.employee-compact-back{min-height:42px!important;min-width:92px!important}
}
@media(max-width:560px){.company-cycle-form,.leave-conditional-builder{grid-template-columns:1fr}.ml-info-pop{left:auto;right:0}}

/* =========================================================
   V65 · STABLE WORKSPACES + LAPTOP COMPACT MODE
   ========================================================= */
/* Shared Back control owns the arrow so pages supply plain text only. */
.back-link::before,.input-back-link::before,.employee-compact-back::before{content:'←';font-size:17px;font-weight:700;line-height:1}

/* Workspace tabs never reorder; the strip remains available while content scrolls. */
.ml-workspace-tabs-shell{position:sticky!important;top:0!important;z-index:120!important;box-shadow:0 1px 0 rgba(28,55,78,.06)}
.ml-workspace-tabs{scroll-behavior:smooth}

/* Leave policy: calmer hierarchy and local overflow only. */
.company-leave-cycle-panel,.leave-policy-table-wrap{max-width:100%;min-width:0}
.leave-policy-table{min-width:1120px!important}
.leave-policy-table th:first-child,.leave-policy-table td:first-child{position:sticky;left:0;z-index:3;background:#fff}
.leave-policy-table thead th:first-child{z-index:4;background:#eaf2f8}
.policy-workspace-summary{display:grid;gap:2px}.policy-workspace-summary small{display:block;color:#7890a3;font-size:9px}
.policy-override-stack{display:grid;grid-template-columns:1fr 1fr;gap:6px;min-width:310px}.policy-override-stack label{margin:0;font-size:9px;color:#708498}.policy-override-stack input,.policy-override-stack select{margin-top:3px;padding:7px!important;font-size:10px!important}
.policy-effective-summary{display:grid;gap:3px;min-width:150px}.policy-effective-summary strong{font-size:12px}.policy-effective-summary small{font-size:9px;color:#74889a}

/* Laptop mode: prioritise the working grid over dashboard chrome. */
@media (max-width:1600px), (max-height:850px){
  .ml-workspace-tabs-shell{padding-top:4px!important}.ml-workspace-tab{height:32px!important;min-width:120px!important}.ml-workspace-tab a{line-height:31px!important;font-size:11px!important}.ml-workspace-tab button{height:30px!important;min-height:30px!important}
  .payroll-primary-head{margin:8px 0 6px!important}.payroll-title-line h1{font-size:25px!important}.payroll-meta{font-size:10px!important}
  .payroll-command-bar{gap:6px!important;margin-bottom:7px!important}.command-group{min-height:56px!important;padding:5px 7px!important}.command-group-label{font-size:7.5px!important;margin-bottom:3px!important}.command-action{min-height:38px!important;padding:5px 8px!important}.command-action b{font-size:11px!important}.command-action small{font-size:7.5px!important}
  .v57-summary-cards .status-total{min-height:66px!important;padding:8px 10px!important}.v57-summary-cards .status-total b{font-size:16px!important}.v57-summary-cards .status-total small{font-size:8px!important}
  .v60-toolbar{margin:7px 0!important}.payroll-search-box{min-height:42px!important}.active-filter-card,.filter-toggle-btn,.payroll-columns-toggle{min-height:38px!important}
}
@media (max-height:760px){
  .payroll-primary-head{margin-top:5px!important}.payroll-title-line h1{font-size:22px!important}.payroll-command-bar{margin-top:4px!important}
  .v57-summary-cards .status-total{min-height:56px!important;padding:6px 9px!important}.v57-summary-cards .status-total b{font-size:14px!important}
}
@media (max-height:850px) and (min-width:1000px){
  .command-action small{display:none!important}
  .command-group{min-height:50px!important}
  .command-action{min-height:34px!important}
  .command-period{flex-basis:188px!important}
  .command-period-form{grid-template-columns:26px minmax(108px,122px) 26px!important}
  .command-period-form input,.command-icon-btn{height:34px!important;min-height:34px!important}
  .command-inputs .command-action{padding-left:6px!important;padding-right:6px!important}
  .command-leave .command-action{min-width:106px!important}
  .payroll-command-bar{gap:5px!important}
}
/* V65 global legacy back-icon normalisation. */
.icon-back{width:auto!important;min-width:88px!important;height:42px!important;min-height:42px!important;padding:0 13px!important;gap:7px!important;border-radius:9px!important;background:#fff!important;border:1px solid #cbd8e4!important;color:#29465f!important;font:600 12px/1 var(--ml-ui-font)!important;text-decoration:none!important}
.icon-back::after{content:'Back';font-size:12px;font-weight:600}
.icon-back:hover{background:#f3f7fa!important;border-color:#aebfce!important;color:#173750!important}
.policy-fixed-unit{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border:1px solid #e5ebf0;border-radius:7px;background:#f8fafb;color:#667c8f}.policy-fixed-unit small{font-size:9px}.policy-fixed-unit b{font-size:10px;color:#314b61}
/* V65 company policy rows stay calm until an override is actually needed. */
.v65-policy-table{min-width:980px!important}.v65-policy-table th:nth-child(1){width:24%}.v65-policy-table th:nth-child(2){width:20%}.v65-policy-table th:nth-child(3){width:38%}.v65-policy-table th:nth-child(4){width:18%}
.policy-row-editor{border:1px solid #e0e7ed;border-radius:8px;background:#fbfcfd;min-width:330px}.policy-row-editor>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;cursor:pointer}.policy-row-editor>summary::-webkit-details-marker{display:none}.policy-row-editor>summary span{display:grid;gap:2px}.policy-row-editor>summary b{font-size:10px;color:#2d485e}.policy-row-editor>summary small{font-size:8.5px;color:#7b8d9d}.policy-row-editor>summary i{font-style:normal;color:#6f8294;transition:transform .16s ease}.policy-row-editor[open]>summary i{transform:rotate(180deg)}.policy-row-editor[open]>summary{border-bottom:1px solid #e6ebef;background:#f5f8fa}
.policy-row-editor .policy-override-stack{padding:9px;grid-template-columns:1fr 1fr}.policy-override-note{grid-column:1/-1}.policy-override-help{align-self:end;justify-self:end}

/* =========================================================
   V66 · SIMPLE OT ENGINE + GLOBAL UI CONSISTENCY
   ========================================================= */
.ml-back-card{display:inline-flex;align-items:center;gap:9px;min-height:42px;padding:9px 15px;margin:0 0 12px;border:1px solid #cbd8e4;border-radius:9px;background:#fff;color:#29465f!important;text-decoration:none!important;font:600 12px/1 var(--ml-ui-font)!important}.ml-back-card span{font-size:17px}.ml-back-card:hover{background:#f3f7fa}
.ot-policy-card,.ot-entry-form,.ot-entry-list,.ot-rule-summary{font-family:var(--ml-ui-font)!important}.policy-grid,.ot-entry-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px 12px}.policy-grid label,.ot-entry-grid label{margin:0}.checkline{display:flex!important;align-items:center;gap:8px;min-height:38px}.checkline input{width:auto;margin:0}.form-actions{display:flex;justify-content:flex-end;margin-top:12px}.ot-effective-strip,.ot-rule-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;align-items:center;padding:14px 16px!important}.ot-effective-strip div,.ot-rule-summary div{min-width:0}.ot-effective-strip small,.ot-rule-summary small{display:block;color:#728399;font-size:9px}.ot-effective-strip b,.ot-rule-summary b{display:block;margin-top:3px;font-size:12px;white-space:normal}.ot-entry-list{padding:0!important;overflow:auto}.ot-entry-list table{min-width:980px}.muted{color:#7b8b9d!important}.info-banner{display:flex;gap:9px;align-items:center;border:1px solid #d8e4ed;border-radius:9px;background:#f7fbfe;padding:10px 12px;margin-bottom:12px;font-size:10px}.info-banner span{color:#64788c}.compact-page-head{margin-bottom:12px!important}.custom-leave-create summary{cursor:pointer;display:flex;gap:10px;align-items:center}.custom-leave-create summary span{font-size:10px;color:#738497}.custom-leave-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:8px 12px;margin-top:12px}.custom-leave-grid label{margin:0}.custom-leave-grid .wide{grid-column:span 2}.company-custom-leaves{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.company-custom-leaves span{background:#eef4f8;border:1px solid #dce6ee;border-radius:999px;padding:5px 9px;font-size:9px}.unit-input{display:flex;align-items:center;gap:5px}.unit-input input{min-width:70px!important}.unit-input span{font-size:9px;color:#72869a;white-space:nowrap}.unit-input select{width:auto;min-width:72px;margin:0;padding:6px}.ml-period-card{border:1px solid #d7e2ea;border-radius:9px;background:#fff;padding:6px 8px}.ml-period-card>small{display:block;font-size:8px;font-weight:650;letter-spacing:.06em;color:#718196;margin-bottom:4px}.ml-period-control{display:flex;align-items:center;gap:4px}.ml-period-control .period-arrow{display:flex;align-items:center;justify-content:center;width:30px;height:32px;border:1px solid #d8e2ea;border-radius:6px;background:#f6f9fb;color:#38536b!important;text-decoration:none}.ml-period-control input{margin:0;height:32px;padding:5px 8px;font-family:var(--ml-ui-font)!important;font-weight:600}.company-cycle-form label:nth-of-type(3),.company-cycle-form label:nth-of-type(4){transition:.15s}.company-cycle-form:has(#companyCycleBasis:not([value="custom"])){}
/* make sticky workspace navigation resilient: no transformed ancestor and own background */
.ml-main{overflow:visible!important}.ml-workspace-tabs-shell{position:sticky!important;top:0!important;z-index:500!important;background:#eef3f8!important}
@media(max-width:1250px){.policy-grid,.ot-entry-grid,.custom-leave-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}.ot-effective-strip,.ot-rule-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.policy-grid,.ot-entry-grid,.custom-leave-grid,.ot-effective-strip,.ot-rule-summary{grid-template-columns:1fr}.custom-leave-grid .wide{grid-column:auto}}

/* =========================================================
   V67 · SIMPLE MONTHLY OT + SIDEBAR / SHARED UI STABILITY
   ========================================================= */
/* The sidebar itself must remain usable on shorter laptop screens. */
.ml-body aside.ml-sidebar{display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4b6075 transparent}
.ml-body aside.ml-sidebar::-webkit-scrollbar{width:7px}.ml-body aside.ml-sidebar::-webkit-scrollbar-thumb{background:#4b6075;border-radius:999px}.ml-body aside.ml-sidebar::-webkit-scrollbar-track{background:transparent}
.ml-product{position:sticky;top:0;z-index:8;background:#102238;padding-top:10px!important;padding-bottom:10px!important}
.ml-user-card{position:sticky;bottom:18px;z-index:8;background:#102238!important;margin-top:auto!important}
.ml-version{position:sticky;bottom:0;z-index:8;background:#102238;padding-bottom:6px!important}
.ml-sidebar-collapse{position:fixed!important;left:calc(var(--ml-sidebar) - 14px)!important;right:auto!important;top:22px!important;z-index:1200!important}
.ml-sidebar-collapsed .ml-sidebar-collapse{left:62px!important}
@media(max-width:860px){.ml-sidebar-collapse{display:none!important}.ml-body aside.ml-sidebar{overflow-y:auto!important}}

/* Workspace tabs are always available when vertical content scrolls. */
.ml-workspace-tabs-shell{position:sticky!important;top:0!important;z-index:900!important;background:#eef3f8!important}

/* Dynamic OT policy editors. */
.v67-ot-policy-card{padding:16px!important;overflow:visible!important}
.v67-policy-topline{display:grid;grid-template-columns:minmax(180px,240px) repeat(2,minmax(180px,1fr));gap:12px;align-items:end;margin-bottom:14px}.v67-policy-topline>div{border:1px solid #e1e8ee;background:#f8fafc;border-radius:9px;padding:9px 11px;min-height:58px}.v67-policy-topline small{display:block;color:#718599;font-size:9px}.v67-policy-topline b{display:block;margin-top:4px;font-size:12px}
.v67-policy-tabs{display:flex;gap:4px;background:#e9eff4;border-radius:9px;padding:4px;width:max-content;max-width:100%;margin:0 0 14px}.v67-policy-tabs button{background:transparent!important;color:#50657b!important;border:0!important;box-shadow:none!important;padding:8px 13px!important;min-height:34px!important;font-weight:650!important}.v67-policy-tabs button.active{background:#fff!important;color:#17395b!important;box-shadow:0 1px 4px rgba(20,40,60,.08)!important}
.v67-policy-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:10px 12px}.v67-policy-grid.compact label{margin:0}.v67-policy-grid small{display:block;margin-top:4px;color:#78899a;font-size:9px;font-weight:400}
.v67-rate-editor-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:18px 0 8px}.v67-rate-editor-head h3{margin:0;font-size:14px}.v67-rate-editor-head p{margin:3px 0 0;color:#73869a;font-size:10px}
.v67-rate-list{display:grid;gap:7px}.v67-rate-row{display:grid;grid-template-columns:minmax(220px,1fr) minmax(130px,220px) auto;gap:10px;align-items:end;border:1px solid #e0e7ed;background:#fbfcfd;border-radius:9px;padding:9px}.v67-rate-row label{margin:0}.v67-rate-row .mini{margin-bottom:1px!important}
.v67-above-card{max-width:760px;border:1px solid #dce5ec;background:#f8fafc;border-radius:10px;padding:13px;margin-bottom:12px}.v67-above-card h3{margin:0 0 4px;font-size:14px}.v67-above-card p{margin:0 0 10px;color:#6f8194;font-size:10px}
.v67-guidance-card{border:1px solid #dce7ef;background:#f7fbfe;border-radius:9px;padding:10px 12px;margin-top:12px;font-size:10px;color:#5f7488}.v67-guidance-card p{margin:5px 0}.v67-guidance-card details>summary{font-weight:700;color:#29475f;cursor:pointer}

/* Monthly overtime worksheet: one employee row, configurable rate columns. */
.v67-ot-rule-summary{grid-template-columns:repeat(4,minmax(0,1fr)) auto!important}
.v67-ot-help{margin-top:8px}.v67-ot-sheet-panel{padding:0!important;overflow:hidden!important}.v67-ot-sheet-wrap{width:100%;max-width:100%;overflow:auto;scrollbar-width:thin}.v67-ot-sheet{min-width:1120px;width:100%;border-collapse:separate;border-spacing:0}.v67-ot-sheet th{background:#e9f1f7;color:#2d4a62;font-size:9px;text-transform:uppercase;letter-spacing:.02em;padding:9px;border-bottom:1px solid #cddce8;white-space:nowrap}.v67-ot-sheet th small{display:block;font-size:8px;color:#7b8c9b;margin-top:2px}.v67-ot-sheet td{padding:9px;border-bottom:1px solid #e4ebf0;vertical-align:middle;background:#fff}.v67-ot-sheet tbody tr:last-child td{border-bottom:0}.v67-ot-sheet input,.v67-ot-sheet select{margin:0!important;min-height:34px!important;padding:6px 8px!important;font-size:11px!important}.v67-ot-sheet .ot-employee-cell{min-width:250px;position:sticky;left:0;z-index:3}.v67-ot-sheet thead th:first-child{position:sticky;left:0;z-index:5}.ot-employee-cell b{display:block;font-size:12px}.ot-employee-cell small,.ot-hourly-cell small,.ot-rate-cell small,.ot-result-cell small,.ot-meal-cell small{display:block;color:#75889a;font-size:8.5px;margin-top:3px}.ot-class-pill{display:inline-flex;margin-top:5px;padding:3px 6px;border-radius:999px;font-size:8px;font-weight:700}.ot-class-pill.ok{background:#e8f7ee;color:#217845}.ot-class-pill.locked{background:#f1f3f5;color:#6f7780}.ot-hourly-cell{min-width:180px}.ot-rate-cell{min-width:130px}.ot-rate-cell input{text-align:right}.ot-rate-cell.disabled{background:#f2f4f6!important}.ot-rate-cell.disabled input{background:#e7ebee!important;color:#9ba4ab!important;border-color:#d9dfe4!important}.ot-locked-row td{background:#f6f7f8!important;color:#8a949c!important}.ot-locked-row .ot-employee-cell{background:#f6f7f8!important}.ot-locked-row input,.ot-locked-row select{background:#e9edf0!important;color:#8d979f!important}.ot-meal-cell{min-width:130px}.v67-check{display:flex!important;align-items:center!important;gap:6px!important;margin:0!important}.v67-check input{width:auto!important;min-height:auto!important}.ot-meal-qty{width:74px!important}.ot-result-cell{min-width:150px}.ot-result-cell b{font-size:12px;color:#143b5d}

/* Keep command groups from clipping their own controls. */
.payroll-command-bar,.command-group,.command-group-actions{overflow:visible!important}.command-inputs{flex:0 1 auto!important}.command-inputs .command-group-actions{flex-wrap:nowrap}.command-inputs .command-action{min-width:0}.command-outputs{min-width:max-content!important}

/* Shared typography and month controls. */
.ml-period-card,.command-period,.input-workspace-actions,.payroll-command-bar{font-family:var(--ml-ui-font)!important}.ml-period-control input,.command-period-form input{font-weight:600!important;font-family:var(--ml-ui-font)!important}

@media(max-width:1250px){.v67-policy-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.v67-policy-topline{grid-template-columns:1fr 1fr}.v67-ot-rule-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.command-inputs .command-group-actions{flex-wrap:wrap}}
@media(max-width:760px){.v67-policy-grid,.v67-policy-topline{grid-template-columns:1fr}.v67-rate-row{grid-template-columns:1fr}.v67-ot-rule-summary{grid-template-columns:1fr!important}}

/* V68 overtime policy + worksheet stabilization */
.v68-ot-policy-card{display:grid;gap:16px;overflow:visible}.v68-policy-tabs{display:flex;gap:6px;align-items:center;padding:4px;background:#eaf0f6;border-radius:10px;width:max-content}.v68-policy-tabs button{border:0;background:transparent;color:#42556f;padding:9px 14px;border-radius:8px;font-weight:650}.v68-policy-tabs button.active{background:#fff;color:#10243d;box-shadow:0 1px 3px rgba(17,36,61,.10)}
.v68-policy-topline{display:grid;grid-template-columns:minmax(180px,.7fr) repeat(3,minmax(180px,1fr));gap:10px;align-items:stretch}.v68-policy-topline>div{border:1px solid var(--line,#d9e3ee);border-radius:10px;padding:9px 12px;background:#f8fafc;display:flex;flex-direction:column;gap:3px}.v68-policy-topline small,.v68-rate-name small,.v68-policy-grid small,.v68-above-grid small,.v68-policy-top-grid small{color:#718198;font-size:11px;line-height:1.35}.v68-policy-top-grid,.v68-policy-grid,.v68-above-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:12px;align-items:end}.v68-above-grid{grid-template-columns:repeat(2,minmax(240px,1fr))}.v68-checkline{min-height:42px;align-self:end}
.v68-rate-editor-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:4px}.v68-rate-editor-head h3{margin:0 0 3px}.v68-rate-editor-head p{margin:0;color:#6f8096;font-size:12px}.v68-rate-list{display:grid;gap:8px}.v68-rate-row{display:grid;grid-template-columns:minmax(280px,1fr) minmax(150px,210px) auto;gap:12px;align-items:center;border:1px solid #dce5ee;border-radius:10px;padding:10px 12px;background:#fff}.v68-rate-row.core{background:#fbfcfe}.v68-rate-name{display:flex;flex-direction:column;gap:3px;min-width:0}.v68-rate-name label{margin:0}.v68-rate-row label{margin:0}.v68-core-pill,.v68-effective-rate{font-size:11px;font-weight:650;color:#52667f;background:#edf2f7;border-radius:999px;padding:5px 8px;white-space:nowrap}.v68-guidance-card{padding:11px 13px;border:1px solid #dce5ee;border-radius:10px;background:#f8fbfd;color:#43566e}.v68-guidance-card p{margin:5px 0 0;line-height:1.45}
.v67-ot-sheet th small{display:block;margin-top:2px;font-weight:500;color:#718198}.ot-locked-row .ot-rate-cell input:disabled{background:#edf1f5;color:#9aa8b8;cursor:not-allowed}.ot-locked-row{background:#f5f7f9}.ot-locked-row .ot-employee-cell{border-left:3px solid #aeb9c5}.ot-meal-cell .v67-check{min-height:32px}
@media(max-width:1250px){.v68-policy-topline{grid-template-columns:repeat(2,minmax(180px,1fr))}.v68-policy-top-grid,.v68-policy-grid{grid-template-columns:repeat(2,minmax(190px,1fr))}}@media(max-width:760px){.v68-policy-topline,.v68-policy-top-grid,.v68-policy-grid,.v68-above-grid{grid-template-columns:1fr}.v68-rate-row{grid-template-columns:1fr}.v68-rate-editor-head{align-items:stretch;flex-direction:column}.v68-rate-editor-head button{align-self:flex-start}}

/* =========================================================
   V69 · OT / SCHEDULE CLARITY + ALIGNMENT
   ========================================================= */
.v68-policy-top-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch!important}
.v68-policy-top-grid>label,.v68-policy-grid>label,.v68-above-grid>label{display:flex;flex-direction:column;justify-content:flex-start;margin:0!important;min-width:0}
.v68-policy-top-grid input,.v68-policy-top-grid select,.v68-policy-grid input,.v68-policy-grid select,.v68-above-grid input,.v68-above-grid select{min-height:42px!important}
.v69-option-card{border:1px solid #dce5ee;border-radius:10px;background:#f8fafc;padding:10px 12px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;gap:5px!important;min-height:86px;margin:0!important}
.v69-option-card>span:first-child{font-size:10px;font-weight:700;color:#475d74;text-transform:uppercase;letter-spacing:.03em}.v69-option-card .check{margin:0!important;display:flex!important;align-items:center!important;gap:8px!important;font-size:12px;font-weight:650}.v69-option-card .check input{min-height:auto!important;width:auto!important;margin:0!important}.v69-option-card small{font-size:9.5px;color:#728499;line-height:1.35}
.v68-rate-row{min-height:88px}.v68-rate-row>label{align-self:center}.v68-rate-row>label input{min-height:42px!important}.v68-core-pill{align-self:center}
.v68-rate-editor-head{align-items:center!important}.v68-rate-editor-head>button{flex:0 0 auto}
.v69-info-callout{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;align-items:flex-start;border:1px solid #d7e3ec;background:#f7fbfe;border-radius:10px;padding:12px 14px;margin-top:12px;color:#496176}.v69-info-callout .v69-info-icon{width:24px;height:24px;border:1px solid #bdd0df;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:750;color:#315a78;background:#fff}.v69-info-callout b{display:block;color:#243e57;font-size:12px;margin-bottom:4px}.v69-info-callout p{margin:3px 0;font-size:11px;line-height:1.45}
.v68-ot-policy-card>label:last-of-type textarea{min-height:64px!important}

.schedule-editor{min-width:0}.schedule-editor>label{margin-bottom:10px}.schedule-fixed-fields,.schedule-weekly-fields{border:1px solid #dfe7ee;background:#fbfcfd;border-radius:10px;padding:11px;margin:8px 0 10px}.weekly-pattern-grid{display:grid;grid-template-columns:repeat(7,minmax(62px,1fr));gap:7px;margin-top:8px}.weekly-pattern-grid label{margin:0;font-size:9px;text-transform:uppercase;color:#5d7084}.weekly-pattern-grid input{margin-top:4px!important;min-width:0;text-align:center}.schedule-calc-strip{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:10px;padding:8px 10px;border-radius:8px;background:#eef4f8;color:#536a7e;font-size:10px}.schedule-calc-strip b{color:#173a58}.schedule-calc-strip .warning{color:#9b5c19;font-weight:650}.schedule-legacy-note{border:1px solid #ecd8a4;background:#fff8e7;color:#725625;border-radius:9px;padding:9px 11px;font-size:10px;line-height:1.4;margin:8px 0 10px}.schedule-error{border:1px solid #efc2c2;background:#fff3f3;color:#8f3434;padding:8px 10px;border-radius:8px;margin:8px 0;font-size:10px}

.ot-hourly-cell{min-width:255px!important}.ot-hourly-cell small{max-width:245px;white-space:normal;line-height:1.35}.v67-ot-sheet th:nth-child(2){min-width:255px}

@media(max-width:1250px){.v68-policy-top-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.weekly-pattern-grid{grid-template-columns:repeat(4,minmax(62px,1fr))}}
@media(max-width:760px){.v68-policy-top-grid{grid-template-columns:1fr}.weekly-pattern-grid{grid-template-columns:repeat(2,minmax(62px,1fr))}}

/* V70 polish ------------------------------------------------------------- */
.leave-overview-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin-bottom:12px}
.leave-overview-item{border:1px solid #dce5f1;border-radius:12px;background:#fbfdff;padding:12px 14px;display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;min-height:82px}
.leave-overview-item>div{min-width:0}.leave-overview-item b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.leave-overview-item small{display:block;color:#74859b;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.leave-overview-item strong{font-size:17px;color:#173a58;white-space:nowrap}.leave-overview-item>span{grid-column:1/3;color:#8290a8;font-size:10px}
.matrix-quantity-cell .matrix-input{margin-bottom:3px}.matrix-calculated-amount{display:block;color:#63758a;font-size:9px;line-height:1.25;margin-top:3px;white-space:nowrap}.matrix-calculated-amount b{color:#173a58}.matrix-quantity-cell{min-width:150px}
/* Keep payroll action popovers compact and anchored cleanly inside the viewport. */
.v60-payroll-table .row-action-menu>div.employee-action-card{max-height:min(470px,calc(100vh - 28px))!important;overflow-y:auto!important;overscroll-behavior:contain!important}
/* Overtime configuration: one alignment system for fields/cards. */
.ot-policy-grid,.ot-rules-grid{align-items:start!important}.ot-policy-grid>label,.ot-rules-grid>label{display:flex!important;flex-direction:column!important;height:100%!important}.ot-policy-grid input,.ot-policy-grid select,.ot-rules-grid input,.ot-rules-grid select{min-height:40px!important}
.ot-rate-row{align-items:center!important}.ot-rate-row>div:last-child{align-self:center!important}
.meal-guidance,.ot-guidance-card{display:block!important;width:100%!important;line-height:1.45!important}.meal-guidance>*{max-width:none!important}
@media(max-width:900px){.leave-overview-strip{grid-template-columns:1fr 1fr}}@media(max-width:600px){.leave-overview-strip{grid-template-columns:1fr}}

/* V70 overtime pages: consistent grid/baseline alignment */
.v68-policy-top-grid{display:grid!important;grid-template-columns:minmax(180px,.85fr) minmax(270px,1.35fr) minmax(220px,1fr) minmax(260px,1.2fr)!important;gap:14px!important;align-items:start!important}
.v68-policy-top-grid>label,.v68-policy-grid>label,.v68-policy-topline>label{margin:0!important;align-self:stretch!important}
.v68-policy-top-grid>label>input,.v68-policy-top-grid>label>select,.v68-policy-grid>label>input,.v68-policy-grid>label>select,.v68-policy-topline input,.v68-policy-topline select{height:42px!important;margin-top:6px!important}
.v68-policy-top-grid small,.v68-policy-grid small{display:block!important;min-height:30px!important;margin-top:5px!important;line-height:1.35!important}
.v69-option-card{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;padding:10px 12px!important;border:1px solid #dfe7ef!important;background:#fbfcfe!important;border-radius:10px!important;min-height:105px!important}
.v69-option-card>span:first-child{font-size:10px!important;font-weight:800!important;color:#4d6075!important;text-transform:uppercase!important;letter-spacing:.03em!important;margin-bottom:8px!important}
.v69-option-card .check{min-height:42px!important;display:flex!important;align-items:center!important;margin:0!important;font-weight:700!important}
.v68-rate-row{display:grid!important;grid-template-columns:minmax(0,1fr) 260px 105px!important;gap:14px!important;align-items:center!important;padding:13px 16px!important;min-height:88px!important}
.v68-rate-row .v68-rate-name{align-self:center!important}.v68-rate-row>label{margin:0!important;align-self:center!important}.v68-rate-row>label input{height:42px!important;margin-top:5px!important}.v68-effective-rate,.v68-core-pill{justify-self:end!important;align-self:center!important;white-space:nowrap!important}
.v68-rate-editor-head{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:16px!important;margin:14px 0 8px!important}.v68-rate-editor-head h3{margin:0 0 3px!important}.v68-rate-editor-head p{margin:0!important}
.v69-info-callout{display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;gap:12px!important;align-items:start!important;padding:14px 16px!important}.v69-info-callout p{margin:5px 0 0!important;line-height:1.5!important}.v69-info-icon{width:24px!important;height:24px!important;display:grid!important;place-items:center!important}
.v68-policy-topline{display:grid!important;grid-template-columns:180px repeat(3,minmax(0,1fr))!important;gap:12px!important;align-items:end!important}.v68-policy-topline>div{min-height:62px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;padding:9px 12px!important}
.v68-policy-grid.compact{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;align-items:start!important}
@media(max-width:1200px){.v68-policy-top-grid{grid-template-columns:1fr 1fr!important}.v68-policy-topline{grid-template-columns:1fr 1fr!important}.v68-policy-grid.compact{grid-template-columns:1fr 1fr!important}}@media(max-width:700px){.v68-policy-top-grid,.v68-policy-topline,.v68-policy-grid.compact{grid-template-columns:1fr!important}.v68-rate-row{grid-template-columns:1fr!important}.v68-effective-rate,.v68-core-pill{justify-self:start!important}}

/* V71 global responsive + review polish */
:root{--ml-control-h:38px}
.command-period-form{align-items:end!important}.command-period-form input,.command-icon-btn{height:var(--ml-control-h)!important;min-height:var(--ml-control-h)!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important}
.command-period-form input{line-height:1!important;padding-top:0!important;padding-bottom:0!important}
.ml-period-control{display:grid!important;grid-template-columns:32px minmax(120px,1fr) 32px!important;align-items:center!important;gap:4px!important}.ml-period-control .period-arrow,.ml-period-control input{height:var(--ml-control-h)!important;min-height:var(--ml-control-h)!important;box-sizing:border-box!important}

/* Employee identity order + deduplicated status row */
.employee-cell-content{min-width:0}.employee-name-line{display:block!important;margin-bottom:2px}.employee-job-title{display:block!important;color:#6c7f91!important;font-size:10px!important;line-height:1.25!important;margin-bottom:5px!important}.employee-status-row{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-bottom:3px}.employee-status-row .line-status{position:static!important;margin:0!important;font-size:8.5px!important;line-height:1!important;padding:4px 6px!important;border-radius:999px!important;white-space:nowrap}.employee-status-row .issue{max-width:170px;overflow:hidden;text-overflow:ellipsis}.employee-status-row .not-paid{background:#ffe9e6;color:#ad3029}.employee-status-row .payslip-sent{background:#e6f7ed;color:#167343}.employee-status-row .finalised{background:#e8f3ec;color:#17683e}.employee-status-row .approved{background:#e8f1ff;color:#205fa8}.employee-status-row .sent{background:#edf2f8;color:#4c6178}
.finalised-row:has(.line-status.payslip-sent) .employee-name-line:after{content:none!important}

/* Row selection must remain visible at all breakpoints */
.employee-cell-layout{grid-template-columns:20px minmax(0,1fr)!important}.row-select{display:block!important;visibility:visible!important;opacity:1!important;width:15px!important;height:15px!important;min-width:15px!important;appearance:auto!important}.select-all-label input{display:inline-block!important;visibility:visible!important;opacity:1!important;appearance:auto!important}

/* Monthly input action-required cues */
.matrix-value-cell.needs-monthly-entry{background:#fff9df!important}.matrix-value-cell.needs-monthly-entry .matrix-input{border-color:#e0b84e!important;background:#fffef5!important}.matrix-value-cell.needs-quantity{background:#fff1f0!important}.matrix-value-cell.needs-quantity .matrix-input{border-color:#e6aaa5!important;background:#fffafa!important}.recurring-badge.action-required{display:inline-flex!important;white-space:normal!important;text-align:left!important;line-height:1.15!important;padding:3px 5px!important}.recurring-badge.action-required.warning{background:#fff1b8!important;color:#8a6300!important}.recurring-badge.action-required.danger{background:#ffdeda!important;color:#9e332d!important}

/* Keep action menus anchored and viewport-friendly */
.row-action-menu{position:relative!important}.employee-action-card{position:absolute!important;right:0!important;left:auto!important;top:calc(100% + 6px)!important;width:220px!important;max-width:min(220px,calc(100vw - 28px))!important;max-height:min(430px,70vh)!important;overflow-y:auto!important;z-index:1600!important}.row-action-menu[open].open-up .employee-action-card{top:auto!important;bottom:calc(100% + 6px)!important}

/* Overtime table vertical alignment */
.v67-ot-sheet td{vertical-align:top!important}.v67-ot-sheet select,.v67-ot-sheet input[type=number]{height:38px!important;box-sizing:border-box!important}.v67-ot-sheet td>select,.v67-ot-sheet .ot-rate-cell>input,.v67-ot-sheet .meal-qty-input{margin-top:0!important}.v67-ot-sheet .ot-treatment-cell,.v67-ot-sheet .ot-meal-cell,.v67-ot-sheet .ot-result-cell{padding-top:13px!important}.v67-ot-sheet td small{display:block;margin-top:5px;line-height:1.2}

/* Overtime policy/rules grid alignment */
.v67-ot-policy-grid,.v67-ot-rule-grid{align-items:start!important}.v67-ot-policy-grid>*,.v67-ot-rule-grid>*{min-width:0}.ot-guidance-card{display:block!important;width:100%!important}.ot-guidance-card>*{max-width:none!important}

/* Responsive system: preserve usable table widths; scroll middle, keep edge columns */
.payroll-table-wrap{overflow:auto!important;max-width:100%!important;overscroll-behavior-inline:contain}.payroll-table{min-width:1180px!important}.sticky-employee{position:sticky!important;left:0!important;z-index:18!important}.sticky-actions{position:sticky!important;right:0!important;z-index:18!important}.payroll-table thead .sticky-employee,.payroll-table thead .sticky-actions{z-index:30!important}.payroll-table thead th{position:sticky;top:0;z-index:15}.payroll-table thead tr.column-group-row th{top:0}.payroll-table thead tr+tr th{top:31px}
@media(max-width:1500px){.v57-summary-cards{gap:8px!important}.status-total{min-height:68px!important;padding:10px 12px!important}.payroll-command-bar{gap:6px!important}.command-group{padding:6px!important}.payroll-table{min-width:1250px!important}.employee-cell-content .row-change-reason,.employee-cell-content .employee-delta{font-size:9px!important}}
@media(max-width:1200px){.payroll-primary-head{margin-bottom:4px!important}.v57-summary-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}.status-total{min-height:60px!important}.payroll-command-bar{flex-wrap:wrap!important;overflow-x:visible!important}.command-group{flex:1 1 auto!important;min-width:150px!important}.command-period{flex:0 0 190px!important}.payroll-table{min-width:1300px!important}.payroll-toolbar{gap:6px!important}.employee-action-card{position:fixed!important;right:18px!important;top:auto!important;bottom:18px!important;max-height:60vh!important}}
@media(max-height:780px) and (min-width:861px){.payroll-primary-head{margin-top:3px!important;margin-bottom:3px!important}.payroll-command-bar{margin-bottom:5px!important}.v57-summary-cards{margin-bottom:6px!important}.status-total{min-height:54px!important;padding:7px 10px!important}.status-total small{font-size:8px!important}.status-total b{font-size:16px!important}.payroll-toolbar{margin-bottom:6px!important}.ml-workspace-tab{height:31px!important}.ml-workspace-tab a{line-height:30px!important}}

/* =========================================================
   V72 · GLOBAL CONSISTENCY / RESPONSIVE / LIVE-DATA PASS
   ========================================================= */
/* Sidebar: fixed product/footer, only navigation region scrolls. */
.ml-body aside.ml-sidebar{overflow:hidden!important;display:flex!important;flex-direction:column!important;height:100dvh!important;padding-bottom:0!important}
.ml-sidebar>.ml-product{flex:0 0 auto!important}
.ml-sidebar-scroll-region{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;padding-bottom:14px;scrollbar-width:thin;scrollbar-color:#4b6075 transparent}
.ml-sidebar-scroll-region::-webkit-scrollbar{width:7px}.ml-sidebar-scroll-region::-webkit-scrollbar-thumb{background:#4b6075;border-radius:999px}.ml-sidebar-scroll-region::-webkit-scrollbar-track{background:transparent}
.ml-sidebar-footer{flex:0 0 auto!important;position:relative!important;z-index:5!important;background:#0f2034!important;border-top:1px solid rgba(255,255,255,.08);padding:8px 0 max(8px,env(safe-area-inset-bottom))}
.ml-sidebar-footer .ml-user-card{margin-top:0!important;margin-bottom:2px!important}.ml-sidebar-footer .ml-version{position:static!important;margin:3px auto 0!important;text-align:center!important;opacity:.55!important;pointer-events:none!important}
.ml-sidebar-collapsed .ml-sidebar-scroll-region{overflow-y:auto!important}.ml-sidebar-collapsed .ml-sidebar-footer{padding-left:0!important;padding-right:0!important}

/* App tabs are a base-shell concern and stay available while page content scrolls. */
.ml-main{overflow:visible!important}.ml-workspace-tabs-shell{position:sticky!important;top:0!important;z-index:15000!important;align-self:stretch!important;background:#eef3f8!important;isolation:isolate!important;overflow:visible!important}
.ml-workspace-tabs{overflow-x:auto!important;overflow-y:hidden!important}.ml-page-shell{overflow:visible!important}

/* Shared compact period selector. */
.command-period{min-width:0!important}.command-period-form{grid-template-columns:34px minmax(126px,158px) 34px!important;gap:5px!important;align-items:center!important}.command-period-form input,.command-icon-btn{height:40px!important;min-height:40px!important;margin:0!important;box-sizing:border-box!important;line-height:1!important}.command-period-form input{min-width:0!important;padding:0 9px!important;font-size:12px!important}.command-icon-btn{width:34px!important;padding:0!important}
@media(max-width:1250px), (max-height:780px){.command-period{flex:0 0 auto!important}.command-period-form{grid-template-columns:30px minmax(118px,142px) 30px!important;gap:4px!important}.command-period-form input,.command-icon-btn{height:36px!important;min-height:36px!important}.command-icon-btn{width:30px!important}.command-period-form input{font-size:11px!important;padding:0 6px!important}.command-group{padding:5px 6px!important}}

/* Ribbon/popovers: menus must escape clipping containers. */
.payroll-command-bar,.command-group,.command-group-actions,.command-menu{overflow:visible!important}.command-menu{position:relative!important}.command-popover{max-width:calc(100vw - 20px)!important;box-sizing:border-box!important}.command-popover a,.command-popover button{font-family:var(--ml-ui-font)!important;grid-template-columns:28px minmax(0,1fr)!important;min-height:48px!important}.command-popover b{font-size:11.5px!important;font-weight:650!important;line-height:1.2!important}.command-popover small{font-size:9.5px!important;font-weight:400!important;line-height:1.25!important;color:#75889b!important}.command-popover .menu-glyph{width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:#eef4f8;color:#294d6a;font-size:15px;font-weight:700}.command-popover>form+form,.command-menu-danger-zone{border-top:1px solid #edf1f4;margin-top:4px!important;padding-top:4px!important}.command-menu-danger-zone button{color:#a73731!important}.command-menu-danger-zone .menu-glyph{background:#fff0ee!important;color:#ad332d!important}

/* Lightweight payroll readiness/health cue. */
.payroll-health-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:-1px 0 8px;padding:6px 10px;border:1px solid #dbe5ed;border-radius:9px;background:#f8fbfd;color:#61758a;font-size:9.5px}.payroll-health-strip b{color:#29455d}.payroll-health-strip.ready{border-color:#d8eadf;background:#f7fbf8}.payroll-health-strip.has-issues{border-color:#efdfb6;background:#fffaf0}.payroll-health-strip button{border:0!important;background:transparent!important;color:#8b6200!important;padding:0!important;min-height:0!important;box-shadow:none!important;font:inherit!important}.health-ok{color:#247247;font-weight:650}

/* Employee rows: stable identity order and guaranteed selectable controls. */
.employee-cell-layout{display:grid!important;grid-template-columns:18px minmax(0,1fr)!important;gap:8px!important;align-items:start!important}.employee-cell-layout>.row-select{margin-top:3px!important;position:relative!important;z-index:4!important;pointer-events:auto!important}.employee-name-line{order:1}.employee-job-title{order:2}.employee-status-row{order:3}.employee-cell-content{display:flex!important;flex-direction:column!important}.employee-code-secondary{order:4}

/* Employee action menu trigger must stay interactive above sticky/grid overlays. */
.sticky-actions,.row-actions{pointer-events:auto!important}.row-action-menu{z-index:40!important;pointer-events:auto!important}.employee-actions-trigger{position:relative!important;z-index:45!important;pointer-events:auto!important;cursor:pointer!important}.employee-action-card{z-index:21000!important}
@media(max-width:1200px){.employee-action-card{position:fixed!important;right:auto!important;bottom:auto!important;max-height:min(430px,70vh)!important}}

/* Monthly input grid: one column contract shared by header/body/footer. */
.input-matrix-table{table-layout:fixed!important}.matrix-employee-head,.matrix-employee-cell,.matrix-employee-foot{min-width:250px!important;width:250px!important;max-width:250px!important;box-sizing:border-box!important}.matrix-employee-foot{position:sticky!important;left:0!important;z-index:20!important;text-align:left!important;background:#e8eef3!important}.matrix-component-total{min-width:135px!important;width:135px!important;max-width:135px!important;box-sizing:border-box!important;text-align:right!important}.matrix-row-total,.matrix-total-head,.matrix-total-foot{min-width:120px!important;width:120px!important;max-width:120px!important;box-sizing:border-box!important;position:sticky!important;right:0!important;text-align:right!important;border-left:1px solid #c4d0db!important}.matrix-total-foot{bottom:0!important;z-index:21!important;background:#e8eef3!important}.input-matrix-table tfoot th{height:30px!important;padding:5px 8px!important}
@media(max-width:820px){.matrix-employee-head,.matrix-employee-cell,.matrix-employee-foot{min-width:215px!important;width:215px!important;max-width:215px!important}}

/* Global typography consistency in menus/actions/forms. */
.command-action b,.command-popover b,.payroll-action-popover b,.employee-action-card b,.filter-popover button,.column-menu-title b{font-family:var(--ml-ui-font)!important;font-weight:650!important}.command-action small,.command-popover small,.payroll-action-popover small,.employee-action-card small,.muted,.help,.hint{font-family:var(--ml-ui-font)!important;font-weight:400!important}.command-group-label{font-family:var(--ml-ui-font)!important;font-weight:650!important}

/* Large-to-small layout keeps the work grid primary. */
@media(max-width:1500px){.payroll-command-bar{flex-wrap:wrap!important}.command-group{flex:0 1 auto!important}.command-inputs,.command-review,.command-outputs{flex:0 1 auto!important}.v57-summary-cards{grid-template-columns:repeat(6,minmax(130px,1fr))!important;overflow-x:auto!important}.status-total{min-width:130px!important}}
@media(max-width:1100px){.v57-summary-cards{grid-template-columns:repeat(3,minmax(150px,1fr))!important}.payroll-command-bar{display:flex!important}.command-group{min-width:145px!important}.command-review{flex:1 1 340px!important}.command-inputs{flex:1 1 280px!important}.command-outputs{flex:0 1 250px!important}}
/* JS computes viewport-safe employee-menu coordinates; CSS must not pin it to a stale edge. */
.v60-payroll-table .row-action-menu>div.employee-action-card{position:fixed!important;right:auto!important;bottom:auto!important}

/* =========================================================
   V73 · SHARED SHELL / POPOVER / REVIEW STABILITY PASS
   ========================================================= */
/* True shell-level frozen tabs: the page content becomes the scroller, not the tab strip. */
body.context-client{height:100dvh!important;overflow:hidden!important}
body.context-client .ml-main{height:100dvh!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
body.context-client .ml-workspace-tabs-shell{position:relative!important;top:auto!important;flex:0 0 auto!important;width:100%!important;z-index:25000!important;overflow:hidden!important;box-shadow:0 1px 0 rgba(28,55,78,.10)!important}
body.context-client .ml-page-shell{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;scrollbar-gutter:stable!important}
body.context-client .ml-workspace-tabs{min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important}
@media(max-width:860px){body.context-client{height:auto!important;overflow:auto!important}body.context-client .ml-main{height:auto!important;min-height:100dvh!important;overflow:visible!important}body.context-client .ml-workspace-tabs-shell{position:sticky!important;top:0!important}body.context-client .ml-page-shell{overflow:visible!important}}

/* Global portal layer for every floating menu. */
.ml-popover-layer{position:fixed;inset:0;z-index:29999;pointer-events:none}
.ml-popover-layer>[data-ml-floating="1"]{pointer-events:auto!important;box-shadow:0 18px 44px rgba(20,42,62,.20)!important}

/* Employee row actions open beside the sticky Actions column, never on top of it. */
.employee-action-card{width:220px!important;max-width:calc(100vw - 20px)!important;border-radius:12px!important}
.employee-action-card .employee-action-head{padding:10px 12px!important}
.employee-action-card a,.employee-action-card button{min-height:38px!important;padding:8px 11px!important}
.employee-payroll-input-link{font:inherit;font-weight:800;color:#18324c;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.employee-payroll-input-link:hover{color:#1263a4}

/* Workspace pay-item navigation must remain visible even with a client selected. */
.ml-nav-workspace a[title="Workspace Earnings / Deductions"]{display:flex!important}

/* Shared period selector: balanced at laptop sizes without squeezing the month text. */
.command-period-form{grid-template-columns:36px minmax(136px,166px) 36px!important}
.command-period-form input{font-weight:650!important;text-align:left!important}
@media(max-width:1280px){.command-period-form{grid-template-columns:32px minmax(128px,150px) 32px!important}.command-period-form input,.command-icon-btn{height:36px!important;min-height:36px!important}}

/* Refresh is a secondary safety action; review and process retain stronger hierarchy. */
.command-review form .command-action{background:#f3f7fa!important;color:#18324c!important}

/* ===== V74 employee payroll review ===== */
.employee-payroll-review{max-width:1600px;margin:0 auto}.review-head{margin-bottom:16px}.review-head h1{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.review-breadcrumb{font-size:11px;color:#7c8da0;margin-bottom:6px}.review-breadcrumb span{padding:0 5px;color:#a4b1bd}.review-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:14px}.review-metric{background:#fff;border:1px solid #dfe7ee;border-radius:12px;padding:14px 15px;display:grid;gap:4px;min-width:0}.review-metric span{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#75879a}.review-metric b{font-size:18px;color:#102a43}.review-metric small{font-size:9.5px;color:#7c8da0}.review-metric.net{background:#f1fbf5;border-color:#cfeeda}.review-metric.net b{color:#078143}.review-metric.deduction{background:#fffafa}.review-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(420px,.9fr);gap:14px;align-items:start}.review-column{min-width:0}.review-source-column{display:grid;gap:10px}.review-section-title{padding:2px 2px 4px}.review-section-title h2,.payslip-preview-head h2{font-size:18px;margin:0 0 3px;color:#102a43}.review-section-title p,.payslip-preview-head p{margin:0;color:#74869a;font-size:11px}.review-card,.payslip-preview-card{background:#fff;border:1px solid #dfe7ee;border-radius:12px;padding:13px 15px;box-shadow:0 1px 2px rgba(18,45,67,.02)}.review-card-head,.payslip-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.review-card-head>div{display:flex;align-items:center;gap:8px;min-width:0}.review-card h3{font-size:13px;margin:0;color:#18344d}.review-status-ok,.review-status-info{width:23px;height:23px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:800;flex:0 0 auto}.review-status-ok{background:#e9f8ef;color:#0a9b50}.review-status-info{background:#edf4ff;color:#236ee7}.review-chip{font-size:9px;background:#edf4ff;color:#2c6dc8;border-radius:999px;padding:5px 9px;font-weight:650}.review-link{font-size:10px;font-weight:650;color:#246fd1;text-decoration:none;border:1px solid #cfe0f5;border-radius:8px;padding:6px 9px;background:#fff;white-space:nowrap}.review-link.strong{font-size:10px}.review-data-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:12px}.review-data-grid div{display:grid;gap:2px}.review-data-grid small{font-size:9px;color:#8493a3}.review-data-grid b{font-size:11px;color:#203d56}.review-inline-edit{margin-top:10px;border-top:1px solid #edf1f4;padding-top:8px}.review-inline-edit summary{cursor:pointer;color:#42647f;font-size:10px;font-weight:650}.review-inline-edit form{margin-top:10px}.review-edit-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.review-table{display:grid;margin-top:10px}.review-table-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(95px,.6fr);gap:12px;align-items:center;padding:7px 2px;border-top:1px solid #edf1f4;font-size:10px}.review-table-row.head{padding-top:4px;border-top:0;color:#7a8b9d;text-transform:uppercase;font-size:8.5px;font-weight:700}.review-table-row>span{min-width:0}.review-table-row b{font-size:10.5px}.review-table-row small{display:block;font-size:8.5px;color:#8393a2;margin-top:2px}.review-table-row .num{text-align:right;font-variant-numeric:tabular-nums}.review-empty{margin:10px 0 0;color:#8291a0;font-size:10px}.compact-review-card p{margin:8px 0 0;color:#697e91;font-size:10px}.payslip-preview-column{position:sticky;top:10px}.payslip-preview-card{padding:14px}.mini-payslip{border:1px solid #dce6ed;border-radius:10px;padding:12px;margin-top:12px}.mini-payslip-brand,.mini-payslip-employee{display:flex;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #e7edf2}.mini-payslip-brand>div,.mini-payslip-employee>div{display:grid;gap:2px}.mini-payslip-brand b{font-size:14px}.mini-payslip-brand small,.mini-payslip-employee small{font-size:8.5px;color:#75879a}.mini-payslip-employee{padding-top:10px}.mini-payslip-employee b{font-size:11px}.mini-payslip-columns{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.mini-pay-box{border:1px solid #e2e8ee;border-radius:8px;overflow:hidden}.mini-pay-box-title{display:flex;justify-content:space-between;padding:7px 8px;font-size:10px}.mini-pay-box.earnings .mini-pay-box-title{background:#eaf9f0;color:#087d43}.mini-pay-box.deductions .mini-pay-box-title{background:#fff0f0;color:#c83c3c}.mini-pay-row{display:flex;justify-content:space-between;gap:8px;padding:4px 8px;border-top:1px solid #eef2f5;font-size:9px}.mini-pay-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mini-pay-row b{white-space:nowrap;font-weight:600}.mini-net{display:flex;justify-content:space-between;align-items:center;background:#edf9f2;border:1px solid #cfeeda;border-radius:8px;padding:10px;margin-top:10px;color:#087d43}.mini-net span{display:grid}.mini-net small{font-size:8.5px;font-weight:400;color:#6f8d7d}.mini-net>b{font-size:17px}.mini-employer{margin-top:9px;border:1px solid #e0e7ee;border-radius:8px;overflow:hidden}.mini-employer>div{display:flex;justify-content:space-between;gap:10px;padding:5px 8px;font-size:9px;border-top:1px solid #edf1f4}.mini-employer>div:first-child{border-top:0;background:#eef4ff;color:#285eaa;font-weight:700}.review-calculation{margin-top:10px;border:1px solid #dfe7ee;border-radius:8px}.review-calculation summary{padding:9px 10px;cursor:pointer;font-size:10px;font-weight:700;color:#21415c;display:flex;justify-content:space-between}.review-calculation summary span{font-size:8.5px;font-weight:400;color:#8192a2}.calc-scroll{overflow:auto;padding:0 9px 8px}.review-actions{display:grid;grid-template-columns:auto 1fr;gap:8px;margin-top:10px}.review-actions form{margin:0}.review-actions button,.review-actions .button-wide{height:38px;margin:0;display:flex;align-items:center;justify-content:center}.employee-payroll-review .calc-table{font-size:9px}.employee-payroll-review .calc-table th,.employee-payroll-review .calc-table td{padding:6px 5px}
@media(max-width:1250px){.review-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.review-layout{grid-template-columns:1fr}.payslip-preview-column{position:relative;top:auto}.review-data-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.review-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.review-data-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.review-edit-grid{grid-template-columns:1fr 1fr}.mini-payslip-columns{grid-template-columns:1fr}.review-table-row{grid-template-columns:minmax(0,1.2fr) minmax(0,.9fr) 90px}.review-card-head{align-items:flex-start}.review-link{white-space:normal;text-align:center}}

/* V74: force the client workspace shell to own scrolling, keeping tabs genuinely frozen. */
@media(min-width:861px){html,body.context-client{height:100%!important;overflow:hidden!important}body.context-client .ml-main{height:100vh!important;max-height:100vh!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}body.context-client .ml-workspace-tabs-shell{position:relative!important;flex:0 0 auto!important;top:auto!important;z-index:40000!important}body.context-client .ml-page-shell{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}}

/* V74 shared trigger safety: sticky columns and ribbons must never swallow menu clicks. */
details.command-menu>summary,details.row-action-menu>summary,details.payroll-action-menu>summary{pointer-events:auto!important;position:relative!important;z-index:5!important;cursor:pointer!important}
.ml-popover-layer{position:fixed!important;inset:0!important;pointer-events:none!important;z-index:50000!important}.ml-popover-layer>[data-ml-floating]{pointer-events:auto!important}

/* ===== V75 structural UI reset ===== */
/* Shared menu system: the panel lives in #mlPopoverLayer while open. */
.ml-menu-host{position:relative!important;min-width:0}
.ml-menu-trigger{font-family:inherit!important;cursor:pointer!important}
.ml-menu-panel[hidden]{display:none!important}
#mlPopoverLayer{position:fixed!important;inset:0!important;pointer-events:none!important;z-index:2147482990!important}
#mlPopoverLayer>.ml-menu-floating{pointer-events:auto!important;background:#fff!important;border:1px solid #dbe4ee!important;border-radius:12px!important;box-shadow:0 18px 45px rgba(15,34,53,.20)!important;box-sizing:border-box!important}
#mlPopoverLayer>.command-popover{padding:7px!important;min-width:240px!important}
#mlPopoverLayer>.employee-action-card{padding:9px!important;min-width:260px!important}
#mlPopoverLayer>.command-popover>a,#mlPopoverLayer>.command-popover>button,#mlPopoverLayer>.command-popover>form>button,
#mlPopoverLayer>.employee-action-card>a,#mlPopoverLayer>.employee-action-card>button,#mlPopoverLayer>.employee-action-card>form>button{width:100%!important;box-sizing:border-box!important}
.employee-actions-trigger{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:38px!important;height:38px!important;border:1px solid #cbd8e6!important;border-radius:10px!important;background:#fff!important;color:#16324b!important;font-size:18px!important;line-height:1!important;padding:0!important}
.employee-actions-trigger:hover,.employee-actions-trigger[aria-expanded="true"]{border-color:#72a6e8!important;box-shadow:0 0 0 3px rgba(47,103,234,.08)!important}

/* One responsive payroll command bar, not six independently-sized boxes. */
.payroll-command-bar{display:grid!important;grid-template-columns:minmax(210px,.92fr) minmax(270px,1.25fr) minmax(160px,.72fr) minmax(280px,1.3fr) minmax(190px,.82fr) minmax(245px,1.05fr)!important;gap:8px!important;align-items:stretch!important;overflow:visible!important}
.payroll-command-bar>.command-group{min-width:0!important;height:auto!important;box-sizing:border-box!important}
.command-group-actions{min-width:0!important;display:flex!important;align-items:stretch!important;gap:5px!important}
.command-action{min-width:0!important;box-sizing:border-box!important;flex:1 1 auto!important}
.command-action>div{min-width:0!important}.command-action b,.command-action small{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.command-period-form{display:grid!important;grid-template-columns:38px minmax(125px,1fr) 38px!important;align-items:center!important;gap:5px!important}
.command-period-form>*{height:40px!important;box-sizing:border-box!important}
@media(max-width:1450px){.payroll-command-bar{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:980px){.payroll-command-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:620px){.payroll-command-bar{grid-template-columns:1fr!important}.command-period-form{grid-template-columns:40px minmax(0,1fr) 40px!important}}

/* Workspace tabs are structural chrome; page content alone scrolls on desktop. */
@media(min-width:861px){
 body.context-client .ml-main{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;height:100dvh!important;overflow:hidden!important}
 body.context-client .ml-workspace-tabs-shell{grid-row:1!important;position:relative!important;inset:auto!important;z-index:50000!important;background:#eef4f8!important}
 body.context-client .ml-page-shell{grid-row:2!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;height:auto!important}
}

/* Employee payroll review: use available desktop width; never crush the payslip. */
.employee-payroll-review{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important}
.employee-payroll-review .review-head{width:100%!important}
.employee-payroll-review .review-layout{display:grid!important;grid-template-columns:minmax(0,1.55fr) minmax(480px,1fr)!important;gap:18px!important;align-items:start!important;width:100%!important}
.employee-payroll-review .review-source-column,.employee-payroll-review .payslip-preview-column{min-width:0!important;width:auto!important}
.employee-payroll-review .payslip-preview-column{position:sticky!important;top:12px!important;align-self:start!important}
.employee-payroll-review .payslip-preview-card{width:100%!important;min-width:0!important;box-sizing:border-box!important;background:#fff!important;border:1px solid #dfe7ee!important;box-shadow:0 8px 24px rgba(18,45,67,.06)!important}
.employee-payroll-review .mini-payslip{min-width:0!important;width:100%!important;box-sizing:border-box!important;background:#fff!important}
.employee-payroll-review .review-metrics{grid-template-columns:repeat(6,minmax(0,1fr))!important}
@media(max-width:1280px){
 .employee-payroll-review .review-layout{grid-template-columns:1fr!important}
 .employee-payroll-review .payslip-preview-column{position:relative!important;top:auto!important}
 .employee-payroll-review .review-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:700px){.employee-payroll-review .review-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.employee-payroll-review .review-data-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.mini-payslip-columns{grid-template-columns:1fr!important}}

/* Back buttons: no pseudo arrows / negative offsets. */
.back-link{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:40px!important;padding:0 14px!important;border:1px solid #cfdbe8!important;border-radius:10px!important;background:#fff!important;color:#24435e!important;text-decoration:none!important;white-space:nowrap!important;line-height:1!important;box-sizing:border-box!important}
.back-link::before,.back-link::after{content:none!important}

/* Sidebar footer never covers navigation. */
.ml-sidebar{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;overflow:hidden!important}
.ml-sidebar .sidebar-scroll,.ml-sidebar .sidebar-nav-scroll,.ml-sidebar nav{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
.ml-sidebar .sidebar-footer,.ml-sidebar .sidebar-user{position:relative!important;inset:auto!important;z-index:2!important;background:inherit!important}

/* ========================= V76 STRUCTURAL UI RESET =========================
   Compact horizontal payroll command strip + native top-layer action drawers.
   These rules intentionally override accumulated V60-V75 ribbon/menu patches. */

/* Payroll action bar is a compact tool strip. It never wraps or squeezes cards. */
.payroll-command-bar{
  display:flex!important;
  align-items:stretch!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
  overscroll-behavior-x:contain!important;
  padding:2px 2px 6px!important;
  margin:4px 0 5px!important;
}
.payroll-command-bar::-webkit-scrollbar{height:7px}
.payroll-command-bar::-webkit-scrollbar-thumb{background:#aebdca;border-radius:999px}
.payroll-command-bar::-webkit-scrollbar-track{background:transparent}
.payroll-command-bar .command-group{
  flex:0 0 auto!important;
  min-width:0!important;
  width:auto!important;
  height:58px!important;
  padding:5px 7px!important;
  border:1px solid #d7e0e8!important;
  border-radius:7px!important;
  background:#fff!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.payroll-command-bar .command-group-label{
  margin:0 0 3px!important;
  font:700 8px/1.05 "Segoe UI",Inter,Arial,sans-serif!important;
  letter-spacing:.05em!important;
  text-transform:uppercase!important;
  color:#64778b!important;
}
.payroll-command-bar .command-group-actions{display:flex!important;align-items:stretch!important;gap:4px!important;height:36px!important;white-space:nowrap!important}
.payroll-command-bar .command-action,
.payroll-command-bar button.command-action,
.payroll-command-bar a.command-action{
  min-height:36px!important;height:36px!important;max-height:36px!important;
  padding:5px 9px!important;gap:6px!important;border-radius:6px!important;
  font:600 11px/1.05 "Segoe UI",Inter,Arial,sans-serif!important;
  white-space:nowrap!important;box-shadow:none!important;
}
.payroll-command-bar .command-action>span{font-size:12px!important;line-height:1!important;min-width:13px!important}
.payroll-command-bar .command-action b{font-size:11px!important;line-height:1.05!important}
.payroll-command-bar .command-action small{font-size:7.5px!important;line-height:1!important;margin-top:2px!important}
.payroll-command-bar .command-period{width:202px!important;min-width:202px!important}
.payroll-command-bar .command-inputs{width:286px!important;min-width:286px!important}
.payroll-command-bar .command-leave{width:150px!important;min-width:150px!important}
.payroll-command-bar .command-review{width:315px!important;min-width:315px!important}
.payroll-command-bar .command-process{width:178px!important;min-width:178px!important}
.payroll-command-bar .command-outputs{width:250px!important;min-width:250px!important}
.command-period-form{display:grid!important;grid-template-columns:30px 134px 30px!important;gap:3px!important;height:36px!important}
.command-period-form .command-icon-btn{width:30px!important;height:36px!important;min-width:30px!important;min-height:36px!important;padding:0!important;border-radius:6px!important}
.command-period-form input[type="month"]{width:134px!important;height:36px!important;min-height:36px!important;padding:0 7px!important;font-size:11px!important;border-radius:6px!important}
/* Do not change this strip into stacked cards at smaller laptop sizes. Scroll it. */
@media(max-width:1400px){.payroll-command-bar{flex-wrap:nowrap!important;overflow-x:auto!important}.payroll-command-bar .command-group{flex:0 0 auto!important}}
@media(max-width:860px){.payroll-command-bar{flex-wrap:nowrap!important;overflow-x:auto!important;padding-bottom:7px!important}.payroll-command-bar .command-group{height:56px!important}.payroll-command-bar .command-action{height:34px!important;min-height:34px!important}.command-period-form,.command-period-form .command-icon-btn,.command-period-form input[type="month"]{height:34px!important;min-height:34px!important}}

/* Native <dialog> drawers live in the browser top layer, so table/card overflow cannot clip them. */
dialog.ml-action-drawer{
  position:fixed!important;
  inset:0 0 0 auto!important;
  margin:0!important;
  width:min(360px,92vw)!important;
  max-width:min(360px,92vw)!important;
  height:100dvh!important;
  max-height:100dvh!important;
  padding:0!important;
  border:0!important;
  border-left:1px solid #d7e1ea!important;
  border-radius:0!important;
  background:#fff!important;
  color:#172b40!important;
  box-shadow:-18px 0 44px rgba(22,42,63,.20)!important;
  overflow:hidden!important;
}
dialog.ml-action-drawer[open]{display:grid!important;grid-template-rows:auto 1fr!important}
dialog.ml-action-drawer::backdrop{background:rgba(17,35,52,.24)!important;backdrop-filter:blur(1px)}
.ml-action-drawer-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;padding:18px 18px 14px!important;border-bottom:1px solid #e2e8ef!important;background:#fff!important}
.ml-action-drawer-head small{display:block!important;font-size:8px!important;font-weight:800!important;letter-spacing:.08em!important;color:#7a8b9d!important;margin-bottom:5px!important}
.ml-action-drawer-head h2{margin:0!important;font-size:19px!important;line-height:1.15!important;color:#102942!important}
.ml-action-drawer-head p{margin:5px 0 0!important;font-size:10px!important;color:#718297!important}
.ml-action-drawer-close{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;border:1px solid #d6e0e9!important;border-radius:8px!important;background:#f8fafc!important;color:#52677b!important;font-size:20px!important;line-height:1!important;display:grid!important;place-items:center!important;cursor:pointer!important}
.ml-action-drawer-body{overflow-y:auto!important;overscroll-behavior:contain!important;padding:10px!important;display:grid!important;align-content:start!important;gap:4px!important}
.ml-action-drawer-body form{margin:0!important}
.ml-drawer-action{width:100%!important;min-height:52px!important;display:grid!important;grid-template-columns:28px 1fr!important;align-items:center!important;gap:9px!important;text-align:left!important;text-decoration:none!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#233b52!important;padding:8px 10px!important;cursor:pointer!important;font-family:"Segoe UI",Inter,Arial,sans-serif!important}
.ml-drawer-action:hover{background:#f2f6f9!important}
.ml-drawer-action>span{width:28px!important;height:28px!important;display:grid!important;place-items:center!important;border-radius:7px!important;background:#edf3f8!important;color:#385a79!important;font-size:13px!important}
.ml-drawer-action b{display:block!important;font-size:12px!important;line-height:1.15!important;color:inherit!important}
.ml-drawer-action small{display:block!important;font-size:9px!important;line-height:1.3!important;color:#74869a!important;margin-top:2px!important;font-weight:500!important}
.ml-drawer-divider{height:1px!important;background:#e4eaf0!important;margin:7px 4px!important}
.ml-drawer-action.danger-menu-action{color:#b42318!important}.ml-drawer-action.danger-menu-action>span{background:#fff0ee!important;color:#b42318!important}
.ml-drawer-action.restore-menu-action{color:#168347!important}.ml-drawer-action.restore-menu-action>span{background:#ecfaf2!important;color:#168347!important}

/* Row action button is deliberately simple; the drawer handles all menu layout. */
.v60-payroll-table .employee-actions-trigger,.employee-actions-trigger{
  width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
  padding:0!important;margin:0 auto!important;display:grid!important;place-items:center!important;
  border:1px solid #c9d7e3!important;border-radius:8px!important;background:#fff!important;
  color:#4b6177!important;font-size:18px!important;line-height:1!important;cursor:pointer!important;
  position:relative!important;z-index:2!important;pointer-events:auto!important;
}
.v60-payroll-table .employee-actions-trigger:hover,.employee-actions-trigger:hover{border-color:#7ea4c8!important;background:#f7fbff!important}
/* Old row-action popover CSS is intentionally neutralized in V76. */
.row-action-menu,.employee-action-card{position:static!important;transform:none!important;inset:auto!important;z-index:auto!important}

/* Shared back buttons: icon remains inside the button. */
.ml-back-button,.page-back,.back-button,a.secondary[href*="payroll"],a.secondary[href*="employee"]{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:34px!important;padding:7px 12px!important;line-height:1!important}


/* V77: stable payroll tools + bulk editing drawers */
.ml-drawer-section-title{
  padding:10px 10px 4px!important;
  font-size:8px!important;
  line-height:1!important;
  text-transform:uppercase!important;
  letter-spacing:.09em!important;
  font-weight:800!important;
  color:#7b8ea1!important;
}
.ml-drawer-placeholder{
  margin:2px 8px 5px;padding:11px 12px;border:1px dashed #d5e0e9;border-radius:9px;background:#fafcfe;color:#486176;
}
.ml-drawer-placeholder b{display:block;font-size:11px}.ml-drawer-placeholder small{display:block;margin-top:3px;color:#8191a1;font-size:9px;line-height:1.35}
.bulk-action-bar{justify-content:space-between!important;gap:12px!important;min-height:42px!important;padding:7px 10px!important}
.bulk-action-bar .bulk-buttons{margin-left:auto!important;flex-wrap:nowrap!important}
.bulk-action-bar .bulk-buttons button{white-space:nowrap!important}
.bulk-pay-drawer-form{display:block!important;padding:16px!important}
.bulk-pay-drawer-form>label{display:block;margin-bottom:14px;font-size:10px;font-weight:700;color:#334b61}
.bulk-pay-drawer-form select,.bulk-pay-drawer-form input[type="number"]{width:100%;height:40px;margin-top:6px;border:1px solid #cad8e4;border-radius:8px;padding:7px 10px;background:#fff;font:inherit}
.bulk-apply-mode{border:0;margin:2px 0 14px;padding:0}.bulk-apply-mode legend{font-size:10px;font-weight:800;margin-bottom:8px;color:#334b61}
.bulk-apply-mode label{display:grid;grid-template-columns:18px 1fr;gap:9px;align-items:flex-start;padding:10px;border:1px solid #dbe4ec;border-radius:9px;margin-bottom:7px;background:#fff;cursor:pointer}
.bulk-apply-mode label:has(input:checked){border-color:#87acef;background:#f3f7ff}
.bulk-apply-mode input{margin-top:2px}.bulk-apply-mode b{display:block;font-size:11px;color:#20384e}.bulk-apply-mode small{display:block;font-size:9px;color:#74869a;margin-top:2px;line-height:1.3}
.bulk-pay-preview{padding:11px 12px;border-radius:9px;background:#f5f8fb;border:1px solid #dbe4ec;margin-bottom:15px}.bulk-pay-preview b{display:block;font-size:10px}.bulk-pay-preview small{display:block;margin-top:3px;font-size:9px;color:#718397;line-height:1.35}
.ml-drawer-footer-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px;border-top:1px solid #e3e9ef}.ml-drawer-footer-actions button{min-height:36px!important}
@media(max-width:700px){.bulk-action-bar{align-items:flex-start!important}.bulk-action-bar .bulk-buttons{overflow-x:auto;max-width:70vw;padding-bottom:2px}.bulk-action-bar .bulk-buttons button{flex:0 0 auto}}


/* V78 stability + polish --------------------------------------------------- */
button.is-working,[role="button"].is-working{pointer-events:none!important;opacity:.72!important}
/* Give Period breathing room while preserving the compact single-row toolbar. */
.payroll-command-strip .period-control{min-width:230px!important}
.payroll-command-strip .period-group,.payroll-toolbar .period-group{min-width:230px!important}
/* Global drawer typography hierarchy. */
dialog.ml-action-drawer .ml-action-drawer-head small{font-size:10px!important;line-height:1.2!important;letter-spacing:.09em!important}
dialog.ml-action-drawer .ml-action-drawer-head h2{font-size:21px!important;line-height:1.2!important;font-weight:700!important}
dialog.ml-action-drawer .ml-action-drawer-head p{font-size:12px!important;line-height:1.4!important}
dialog.ml-action-drawer .ml-drawer-section-title{font-size:10px!important;line-height:1.2!important;letter-spacing:.1em!important;font-weight:800!important;color:#73869a!important}
dialog.ml-action-drawer .ml-drawer-action b{font-size:13px!important;line-height:1.25!important;font-weight:700!important}
dialog.ml-action-drawer .ml-drawer-action small{font-size:11px!important;line-height:1.35!important;font-weight:500!important}
/* Meaningful, soft action colours without making the product noisy. */
dialog.ml-action-drawer .ml-drawer-action>span{background:#edf4ff!important;color:#2c67c7!important}
dialog.ml-action-drawer .ml-drawer-action[data-tone="pdf"]>span{background:#fff0f0!important;color:#d92d20!important}
dialog.ml-action-drawer .ml-drawer-action[data-tone="input"]>span{background:#ecf8f7!important;color:#087f78!important}
dialog.ml-action-drawer .ml-drawer-action[data-tone="review"]>span{background:#f4efff!important;color:#6941c6!important}
dialog.ml-action-drawer .ml-drawer-action[data-tone="report"]>span{background:#eef2ff!important;color:#4f46e5!important}
dialog.ml-action-drawer .ml-drawer-action[data-tone="declaration"]>span{background:#ecfdf3!important;color:#168347!important}

.payroll-command-bar .command-period{width:228px!important;min-width:228px!important}

/* V79 shared navigation / notifications / salary-basis review */
.ml-global-back{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:76px;height:36px;padding:0 16px!important;border-radius:10px!important;background:#dcecff!important;border:1px solid #b9d6f5!important;color:#174d7a!important;font-size:12px!important;font-weight:750!important;line-height:1!important;text-decoration:none!important;box-shadow:none!important;white-space:nowrap}
.ml-global-back:hover{background:#cfe5fb!important;color:#103e65!important;border-color:#9fc7ed!important}
.page-head>.ml-global-back,.review-head>.ml-global-back,.employee-head-actions>.ml-global-back{margin-left:auto!important}
.employee-head-actions{display:flex!important;align-items:center!important;gap:10px!important}
.input-workspace-head{position:relative}.input-workspace-head .ml-global-back{position:absolute;right:0;top:0}.input-workspace-head>div:first-child{padding-right:90px}
.leave-workspace-head,.leave-page-head{position:relative}.leave-workspace-head .ml-global-back,.leave-page-head .ml-global-back{position:absolute;right:0;top:0}

.ml-toast-host{position:fixed;right:22px;top:22px;z-index:16000;display:grid;gap:10px;pointer-events:none;width:min(380px,calc(100vw - 32px))}.ml-toast{display:grid;grid-template-columns:28px 1fr 24px;gap:9px;align-items:start;background:#fff;border:1px solid #dbe6ee;border-radius:13px;padding:12px 12px;box-shadow:0 18px 50px rgba(15,35,55,.18);font-size:12px;color:#24425b;opacity:0;transform:translateY(-8px);transition:.2s;pointer-events:auto}.ml-toast.show{opacity:1;transform:none}.ml-toast.error{border-color:#f3c7c7;background:#fffafa}.ml-toast.warning{border-color:#f1d89e;background:#fffdf7}.ml-toast-icon{width:26px;height:26px;border-radius:8px;background:#e9f6ef;color:#16804c;display:grid;place-items:center;font-weight:900}.ml-toast.error .ml-toast-icon{background:#ffeaea;color:#c43e3e}.ml-toast.warning .ml-toast-icon{background:#fff0c9;color:#9b6a00}.ml-toast button{background:transparent!important;color:#71859a!important;padding:0!important;font-size:18px!important;line-height:1!important}
.app-input-modal{text-align:left}.app-input-modal .confirm-icon{margin-left:0}.app-input-modal .confirm-icon.info{background:#eaf3ff;color:#276fd0}.app-input-modal .app-input-value{margin-top:14px}.confirm-primary.calm{background:#2d72cc!important}

.notification-client-picker{max-width:460px}.notification-recipient-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}.notification-recipient-grid label{margin:0}.notification-recipient-grid small{display:block;margin-top:5px;color:#8191a0;font-weight:500}.notification-save{grid-column:1/-1;display:flex;justify-content:flex-end}.ml-approval-notifications .email-verified-note{margin-top:12px}
.salary-basis-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.salary-basis-head h2{margin-bottom:4px}.salary-basis-head p{margin:0;font-size:11px;line-height:1.45}.salary-basis-head>span{font-size:10px;color:#16804c;font-weight:700;white-space:nowrap}.salary-basis-table th,.salary-basis-table td{vertical-align:middle}.salary-basis-table input,.salary-basis-table select{margin:0;min-width:110px;height:36px;padding:6px 8px}.salary-basis-table td:first-child{min-width:210px}.salary-basis-table td:last-child{background:#f4f8fc}.salary-basis-table .salary-basic-used{color:#123b5d}.input-workspace-tabs a{white-space:nowrap}

/* V79 period group: slightly wider so arrows + month + calendar fit comfortably. */
.payroll-command-bar .command-period{min-width:190px!important;width:190px!important;flex:0 0 190px!important}.command-period-form{grid-template-columns:34px 116px 34px!important}.command-period-form input[type=month]{min-width:0!important;width:116px!important}

@media(max-width:900px){.notification-recipient-grid{grid-template-columns:1fr}.notification-save{grid-column:auto}.ml-global-back{height:34px;min-width:70px}.salary-basis-workspace{overflow:hidden}.salary-basis-workspace .table-wrap{overflow:auto}}
\n/* V80 global stability: scroll is a shell capability, not a page patch. */\nhtml{height:100%;overflow:hidden!important}body.ml-body{height:100dvh!important;overflow:hidden!important}.ml-main{height:100dvh!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}.ml-workspace-tabs-shell{flex:0 0 auto!important}.ml-page-shell{flex:1 1 auto!important;min-height:0!important;min-width:0!important;overflow:auto!important;overscroll-behavior:contain!important;padding-bottom:48px!important}.table-wrap,.payroll-table-wrap,.input-workspace-table-wrap,.public-review-table-wrap{overflow:auto!important;max-width:100%!important}.payroll-command-bar{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;align-items:stretch!important}.payroll-command-bar>.command-group{flex:0 0 auto!important;min-width:max-content!important}.payroll-command-bar .command-period{width:232px!important;min-width:232px!important;flex-basis:232px!important}.command-period-form{grid-template-columns:34px 146px 34px!important}.command-period-form input[type=month]{width:146px!important;min-width:146px!important}.command-review{width:245px!important;min-width:245px!important}.command-outputs{width:205px!important;min-width:205px!important}.public-reply-note{margin:12px 0 0;padding:10px 12px;border:1px solid #dce7f2;border-radius:10px;background:#f6faff;color:#4e6379;font-size:11px;display:flex;gap:7px;flex-wrap:wrap}.public-reply-note b{color:#17395b}.public-reply-note a{font-weight:700;color:#2865b3}.ml-change-summary,.ml-feedback-meta,.ml-feedback-block,.ml-change-card,.ml-feedback-employee{border:1px solid #e2e9f0;border-radius:12px;background:#fff;padding:12px;margin-bottom:10px}.ml-change-summary b,.ml-feedback-meta b{display:block}.ml-change-summary small,.ml-feedback-meta small{color:#73869a}.ml-change-card-head{display:flex;justify-content:space-between;gap:12px}.ml-change-card-head span{font-weight:700}.ml-change-card-head .positive{color:#138a4b}.ml-change-card-head .negative{color:#c64747}.ml-change-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px;font-size:10px;color:#708297}.ml-change-metrics b{display:block;color:#17395b;margin-top:2px}.ml-change-card ul{margin:8px 0 0;padding-left:18px;font-size:10px;color:#51677e}.ml-feedback-block small{font-size:8px;letter-spacing:.08em;color:#6f8297;font-weight:800}.ml-feedback-block p,.ml-feedback-employee p{margin:5px 0 0;white-space:pre-wrap}.ml-feedback-employee{display:grid;grid-template-columns:1fr auto;gap:8px}.ml-feedback-employee p{grid-column:1/-1}.resolved-pill{font-size:9px;font-weight:700;color:#168548;background:#eaf8ef;border-radius:999px;padding:5px 8px;align-self:start}.salary-formula-hint{display:block;color:#71849a;margin-top:3px;font-size:8px}.field-not-used{background:#f3f6f9!important;color:#8b9aaa!important}.ml-action-drawer-body{overflow:auto!important;min-height:0!important}\n@media(max-width:860px){.ml-page-shell{overflow:auto!important}.payroll-command-bar{overflow-x:auto!important}.payroll-command-bar>.command-group{flex:0 0 auto!important}}\n
/* V82 — Payroll Tools master-update workspaces */
.ml-master-tool{position:relative}.ml-master-tool .ml-tool-icon{display:grid;place-items:center;width:31px;height:31px;border-radius:10px;background:#f0f5fb;color:#245b91;flex:0 0 31px}.ml-master-tool .ml-tool-icon svg,.master-hero-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.ml-master-tool[data-tone="allowance"] .ml-tool-icon{background:#edf8f2;color:#177a52}.ml-master-tool[data-tone="deduction"] .ml-tool-icon{background:#fff4ed;color:#b85a2e}.ml-tool-arrow{margin-left:auto!important;font-size:19px!important;color:#9aabba!important}.master-update-shell{max-width:1500px}.master-update-head{align-items:flex-start}.master-title-wrap{display:flex;gap:13px;align-items:center}.master-kicker{font-size:9px;font-weight:900;letter-spacing:.11em;color:#7b8da0;margin-bottom:4px}.master-title-wrap h1{font-size:24px}.master-title-wrap p{margin:4px 0 0}.master-hero-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:#eaf2fb;color:#235c93}.master-hero-icon.allowance{background:#e9f7f0;color:#177a52}.master-hero-icon.deduction{background:#fff1e8;color:#ad542b}.master-hero-icon svg{width:24px;height:24px}.master-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#fff;border:1px solid #e3eaf1;border-radius:14px;padding:12px 14px;margin-bottom:16px}.master-period{display:flex;align-items:center;gap:10px}.master-period>span{font-size:10px;font-weight:850;color:#718398}.master-period form{margin:0}.master-period input{margin:0;width:150px;padding:8px 10px}.master-toolbar-actions{display:flex;gap:8px}.master-toolbar-actions a,.master-toolbar-actions button{font-size:11px;padding:9px 12px;text-decoration:none;border-radius:9px;font-weight:800}.master-entry-panel{padding:18px}.master-entry-title,.master-list-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.master-entry-title h2,.master-list-head h2{margin:0 0 4px}.master-entry-title p,.master-list-head p{margin:0;font-size:11px}.master-safe-pill{font-size:9px;font-weight:850;color:#24704e;background:#eaf8f0;border:1px solid #d3efdf;padding:7px 9px;border-radius:999px;white-space:nowrap}.master-entry-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px 12px;margin-top:13px;align-items:end}.master-entry-grid label{margin:0;font-size:10px}.master-entry-grid input,.master-entry-grid select{margin-top:5px;padding:9px}.master-entry-grid label small{display:block;font-size:8px;color:#8a99a8;margin-top:4px;line-height:1.35}.master-comment{grid-column:span 2}.master-entry-submit{display:flex;align-items:end;height:100%}.master-entry-submit button{width:100%;min-height:37px}.optional{font-weight:600;color:#9aa8b7}.master-list-panel{padding:0;overflow:hidden}.master-list-head{padding:17px 18px;border-bottom:1px solid #e9eef3;align-items:center}.master-search{display:flex;align-items:center;gap:5px;width:310px;border:1px solid #dbe4ed;border-radius:9px;padding:0 9px;background:#fff}.master-search span{color:#8293a5}.master-search input{border:0;margin:0;padding:9px 3px;outline:none;box-shadow:none}.master-table-wrap{max-height:52vh}.master-table th{position:sticky;top:0;background:#f7f9fb;z-index:1;padding:10px 12px}.master-table td{padding:11px 12px}.master-money{font-variant-numeric:tabular-nums;font-weight:800}.master-row-use{background:#edf3f9!important;color:#285b88!important;padding:6px 9px;font-size:9px}.master-empty{text-align:center;color:#8b9aab;padding:28px!important}.master-import-dialog{border:0;border-radius:16px;padding:0;width:min(520px,calc(100vw - 28px));box-shadow:0 24px 70px rgba(15,32,51,.25)}.master-import-dialog::backdrop{background:rgba(15,29,43,.35)}.master-import-head{display:flex;justify-content:space-between;padding:17px 18px;border-bottom:1px solid #e6edf3}.master-import-head small{font-size:8px;font-weight:900;letter-spacing:.1em;color:#71869c}.master-import-head h2{margin:3px 0 0}.master-import-head>button{background:transparent!important;color:#65788d!important;font-size:22px;padding:0 4px}.master-import-body{padding:18px}.master-import-body p{font-size:11px;line-height:1.6}.master-import-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}
@media(max-width:1050px){.master-entry-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}.master-comment{grid-column:span 1}}@media(max-width:700px){.master-toolbar,.master-entry-title,.master-list-head{align-items:stretch;flex-direction:column}.master-toolbar-actions{flex-wrap:wrap}.master-entry-grid{grid-template-columns:1fr}.master-search{width:100%}.master-safe-pill{align-self:flex-start}}

/* V83 — spreadsheet-style master update workspaces */
.master-grid-shell{max-width:none!important}.master-sheet-panel{padding:0;overflow:hidden}.master-sheet-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid #e7edf3}.master-sheet-topbar h2{margin:0}.master-sheet-topbar p{margin:5px 0 0;font-size:11px;color:#71849a}.master-sheet-title-row{display:flex;align-items:center;gap:10px}.master-sheet-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.master-sheet-tools .master-search{width:290px}.master-sheet-tools button{font-size:10px;padding:8px 10px}.master-sheet-tools .active-filter{background:#e9f1ff!important;color:#1e5cbd!important;border-color:#bfd3fa!important}.master-grid-wrap{max-height:58vh;overflow:auto;background:#fff}.master-grid{border-collapse:separate;border-spacing:0;min-width:1280px;width:100%;font-size:10px}.master-grid th{position:sticky;top:0;z-index:4;background:#f4f7fa;color:#536a82;text-transform:uppercase;letter-spacing:.025em;font-size:8px;font-weight:900;border-right:1px solid #e5ebf1;border-bottom:1px solid #dfe7ef;padding:8px 9px;white-space:nowrap}.master-grid td{height:34px;border-right:1px solid #e8edf2;border-bottom:1px solid #e8edf2;padding:0;background:#fff;white-space:nowrap}.master-grid .row-no{position:sticky;left:0;z-index:3;width:34px;min-width:34px;text-align:center;color:#8b9aab;background:#f7f9fb!important;font-variant-numeric:tabular-nums}.master-grid th.row-no{z-index:6}.master-grid .readonly-cell{padding:7px 9px;background:#fbfcfd;color:#273d54}.master-grid .employee-name{min-width:170px}.master-grid .money-cell{font-variant-numeric:tabular-nums;font-weight:800;text-align:right;min-width:110px}.master-grid .muted-cell{color:#98a6b5;text-align:center}.master-grid .editable-cell{position:relative;min-width:125px;outline:none}.master-grid .comment-cell{min-width:190px}.master-grid .editable-cell input,.master-grid .editable-cell select{width:100%;height:33px;margin:0;border:0!important;border-radius:0!important;background:transparent;padding:6px 8px;font:inherit;color:#18324c;box-shadow:none!important;outline:none}.master-grid .editable-cell select{padding-right:25px}.master-grid .editable-cell:focus-within{box-shadow:inset 0 0 0 2px #2f6ee5;z-index:2}.master-grid .cell-selected{background:#eef4ff!important;box-shadow:inset 0 0 0 1px #9dbcf5}.master-grid .cell-active{box-shadow:inset 0 0 0 2px #2f6ee5!important}.master-grid .cell-changed{background:#fff9e7!important}.master-grid .row-changed .row-no{background:#fff4cd!important;color:#735b00;font-weight:900}.master-grid tr:hover td:not(.cell-selected):not(.cell-changed){background:#f8fbff}.master-grid-footer{position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:11px 16px;background:#fff;border-top:1px solid #dfe7ef;z-index:8}.master-grid-status{display:flex;flex-direction:column;gap:2px}.master-grid-status b{font-size:11px}.master-grid-status small{font-size:9px;color:#7d8ea0}.master-grid-footer-actions{display:flex;gap:8px}.master-grid-footer-actions button{min-width:120px}.master-review-breakdown{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.master-review-breakdown>div{border:1px solid #e0e8f0;border-radius:10px;padding:10px 12px;min-width:105px;background:#f9fbfd}.master-review-breakdown b{display:block;font-size:17px;color:#1d5ec5}.master-review-breakdown span{display:block;font-size:9px;color:#6d8093;text-transform:capitalize;margin-top:2px}.new-component-row td{background:#fcfefd}.new-component-row .row-no{background:#eef8f3!important}.new-basic-preview{color:#164b85!important}.master-grid input[type=month]{min-width:132px}@media(max-width:900px){.master-sheet-topbar{align-items:flex-start;flex-direction:column}.master-sheet-tools{width:100%}.master-sheet-tools .master-search{width:min(100%,320px)}.master-grid-wrap{max-height:62vh}}
.payroll-status-pill.ready_to_resend{background:#eaf3ff;color:#1f5fb8;border-color:#cfe0f7}.resolved-button{border:0!important;cursor:pointer;font:inherit}.resolved-button:hover{background:#dff4e7!important;color:#0f6c3a!important}
\n\n/* =========================================================
   V84 · Master update hardening + public approval brand restore
   ========================================================= */
/* Payroll Tools rows are fully clickable; remove the redundant detached arrows. */
.ml-master-tool .ml-tool-arrow{display:none!important}
.ml-master-tool{grid-template-columns:auto 1fr!important;padding-right:14px!important}

/* Ready-to-resend is a first-class process state everywhere. */
.badge.ready_to_resend,.status-pill.ready_to_resend,.public-status.ready_to_resend{
  background:#E8F2FF!important;color:#185AA8!important;border-color:#C9DCF4!important;
}

/* Restore the light Mo Lapaye colour hierarchy on the public approval portal. */
.public-approval-body{background:linear-gradient(180deg,#F1F7F6 0,#F5F8FB 42%,#F4F7FA 100%)!important}
.public-approval-brand img{border:1px solid #DDEBE6!important;box-shadow:0 5px 16px rgba(20,120,82,.10)!important}
.public-review-card{border-color:#D6E5E1!important;box-shadow:0 18px 42px rgba(24,71,88,.07)!important}
.public-eyebrow{color:#2F7180!important}
.public-status.awaiting_approval{background:#E8F1FF!important;color:#175CB4!important;border:1px solid #CDDEFA!important}
.public-status.changes_requested{background:#FFF3E7!important;color:#98531C!important;border:1px solid #F0D8BD!important}
.public-status.approved,.public-status.finalised{background:#E7F8EF!important;color:#087A43!important;border:1px solid #C8EAD8!important}
.public-summary-grid>div{background:#FAFCFD!important;border-color:#DEE8EC!important}
.public-summary-grid>div:nth-child(2){background:#F3F8FF!important;border-color:#DCE9F8!important}
.public-summary-grid>div:nth-child(3){background:#FFF9EE!important;border-color:#F1E5C8!important}
.public-summary-grid>div:nth-child(4){background:#ECF9F2!important;border-color:#CFEADA!important}
.public-summary-grid>div:nth-child(4) b{color:#087A43!important}
.public-downloads .btn.secondary{background:#EAF1F5!important;color:#173A50!important;border:1px solid #D5E2E9!important}
.public-approval-actions button[name="action"][value="approve"]{background:#167A54!important;box-shadow:0 5px 14px rgba(22,122,84,.18)!important}
.public-approval-actions button[name="action"][value="approve"]:hover{background:#116A48!important}
.public-approval-actions button[name="action"][value="changes"]{background:#E9EFF4!important;color:#263B4D!important;border:1px solid #D7E1E8!important}
.public-review-table th{background:#F2F7F8!important;color:#557184!important}
.public-approval-form input:focus,.public-approval-form textarea:focus{border-color:#60A89A!important;box-shadow:0 0 0 3px rgba(64,160,137,.12)!important;outline:none!important}

/* =========================================================
   V85 · Monthly Inputs compact toolbar + Salary Basis cleanup
   ========================================================= */
.input-workspace-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin-bottom:7px!important;
  position:static!important;
}
.input-workspace-head>div:first-child{padding-right:0!important}
.input-workspace-title{min-width:0;flex:1 1 auto}
.input-workspace-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex:0 0 auto!important;
  flex-wrap:nowrap!important;
}
.input-workspace-actions .ml-period-card{margin:0!important}
.input-workspace-actions form{margin:0!important}
.input-workspace-actions .btn,.input-workspace-actions button{height:36px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important}
.input-workspace-actions .input-back-button{background:#dcecff!important;border:1px solid #b9d6f5!important;color:#174d7a!important;min-width:76px!important}
.input-workspace-tabs{margin-top:0!important;margin-bottom:7px!important}
.salary-basis-workspace{margin-top:0!important}
.salary-basis-head{margin-bottom:9px!important}
.salary-basis-table th,.salary-basis-table td{padding-top:8px!important;padding-bottom:8px!important}
.salary-basis-table td:last-child{min-width:170px!important}
@media(max-width:1100px){
  .input-workspace-head{align-items:flex-start!important;flex-direction:column!important}
  .input-workspace-actions{width:100%!important;justify-content:flex-start!important;overflow-x:auto!important;padding-bottom:2px!important}
}
/* V86 employee payslip review */
.employee-payroll-review .salary-basis-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.employee-payroll-review .salary-edit-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.payslip-v86{padding:14px!important}.employee-payslip-live{padding:14px!important}.pay-basis-panel{margin-top:10px;border:1px solid #dce6ed;border-radius:9px;overflow:hidden;background:#fbfdff}.pay-basis-title{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;background:#edf4ff;color:#214f8f;font-size:10px}.pay-basis-title span{font-size:8.5px;background:#fff;border:1px solid #d5e3f6;border-radius:999px;padding:3px 7px}.pay-basis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}.pay-basis-grid>div{display:grid;gap:2px;padding:7px 10px;border-top:1px solid #edf2f6}.pay-basis-grid>div:nth-child(odd){border-right:1px solid #edf2f6}.pay-basis-grid small{font-size:8px;color:#7b8da0}.pay-basis-grid b{font-size:9.5px;color:#18344d}.mini-pay-row.detailed{align-items:center;padding:7px 8px}.mini-pay-row.detailed>span{display:grid;gap:2px;white-space:normal}.mini-pay-row.detailed>span>b{font-size:9px}.mini-pay-row.detailed small{font-size:7.8px;color:#7c8da0}.mini-pay-row.total{font-weight:800;background:#fafcfd;padding:7px 8px}.mini-pay-empty{padding:10px 8px;font-size:8.5px;color:#8192a2}.detailed-employer .employer-total{font-weight:700;background:#f8fbff}.detailed-employer .employer-cost{font-weight:800;background:#eef4ff;color:#214f8f}.payslip-actions{grid-template-columns:1fr 1.7fr}.payslip-actions .secondary{background:#e9eef4;color:#18344d;border-color:#d4dde6}.review-calculation[open] summary{border-bottom:1px solid #e6edf3}.payslip-preview-column{top:8px}
@media(max-width:760px){.employee-payroll-review .salary-basis-grid,.employee-payroll-review .salary-edit-grid,.pay-basis-grid{grid-template-columns:1fr}.pay-basis-grid>div:nth-child(odd){border-right:0}.payslip-actions{grid-template-columns:1fr}}
/* V87 Vistra-style employee payslip preview */
.payslip-v87{background:#111827;padding:18px}.payslip-v87 .payslip-preview-head{background:#fff;border-radius:12px 12px 0 0;padding:16px 16px 8px}.vistra-live-payslip{background:#fff;padding:10px 14px 16px;font-size:12px;color:#111}.vlp-top-grid{display:grid;grid-template-columns:1.15fr 1fr;border:2px solid #222}.vlp-company,.vlp-period{padding:12px}.vlp-company{border-right:2px solid #222;text-align:center;display:flex;flex-direction:column;gap:5px}.vlp-company strong{font-size:17px}.vlp-company span{white-space:pre-line}.vlp-period strong{font-size:17px;display:block;margin-bottom:8px}.vlp-period div{display:grid;grid-template-columns:85px 1fr;gap:8px;margin:4px 0}.vlp-employee-grid{display:grid;grid-template-columns:1fr 1fr;border:2px solid #222;border-top:0}.vlp-employee-grid>div{padding:8px;display:grid;grid-template-columns:110px 1fr;gap:5px 8px}.vlp-pay-table{border:2px solid #222;border-top:0}.vlp-row{display:grid;grid-template-columns:2fr .9fr .9fr .9fr 1fr;min-height:29px}.vlp-row>span{padding:6px 8px}.vlp-row>span:nth-child(n+3){border-left:1px solid #222;text-align:right}.vlp-head{font-weight:700;border-bottom:1px solid #222}.vlp-head>span:nth-child(n+3){text-align:center}.vlp-total{font-weight:700}.vlp-net{font-weight:700;border-top:1px solid #222}.vlp-bottom-grid{display:grid;grid-template-columns:.55fr .9fr .9fr 1fr .9fr 1.45fr .8fr;border:2px solid #222;border-top:0}.vlp-bottom-grid>*{padding:5px 6px;border-right:1px solid #222;border-top:1px solid #222}.vlp-bottom-grid>*:nth-child(-n+7){border-top:0}.vlp-bottom-grid>*:nth-child(7n){border-right:0}.payslip-v87 .review-calculation,.payslip-v87 .review-actions{background:#fff}.employee-payroll-bank-block{margin-top:14px;padding:14px;border:1px solid var(--line,#dbe3ee);border-radius:12px;background:#f8fbff}.employee-payroll-bank-block h3{margin:0 0 10px}
@media(max-width:900px){.vlp-top-grid,.vlp-employee-grid{grid-template-columns:1fr}.vlp-company{border-right:0;border-bottom:2px solid #222}.vistra-live-payslip{overflow-x:auto}.vlp-pay-table,.vlp-bottom-grid{min-width:760px}}

/* V88 payslip refinements */
.payslip-v88 .payslip-preview-head{padding-bottom:12px}.payslip-v88 .vlp-row{grid-template-columns:2fr .62fr .9fr .9fr 1fr}.payslip-v88 .vlp-row>span:nth-child(2){text-align:center;font-variant-numeric:tabular-nums}.payslip-v88 .vlp-head>span:nth-child(2){color:transparent}.vlp-bottom-ptd-only>*{border-top:1px solid #222}.payslip-actions.single{grid-template-columns:1fr}.payroll-calc-breakdown{background:#fff;padding:12px 14px 16px}.pcb-head{border:1px solid #dfe7ee;border-radius:9px 9px 0 0;padding:11px 12px;background:#f8fbff}.pcb-head h3{margin:0 0 2px;font-size:13px;color:#18344d}.pcb-head p{margin:0;font-size:9px;color:#7c8da0}.pcb-card{border:1px solid #dfe7ee;border-top:0;background:#fff}.pcb-card summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px}.pcb-card summary span{display:grid;gap:2px}.pcb-card summary b{font-size:11px;color:#18344d}.pcb-card summary small{font-size:8.5px;color:#7c8da0}.pcb-card summary strong{font-size:12px}.pcb-body{padding:0 12px 12px}.pcb-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:9px}.pcb-kpis>div{padding:8px;border:1px solid #e5ebf2;border-radius:8px;display:grid;gap:2px}.pcb-kpis small,.pcb-stat small{font-size:7.8px;color:#7c8da0}.pcb-kpis b{font-size:9.5px}.pcb-body table{width:100%;border-collapse:collapse;font-size:8.5px}.pcb-body th,.pcb-body td{padding:6px;border-bottom:1px solid #edf1f5;text-align:right}.pcb-body th:first-child,.pcb-body td:first-child{text-align:left}.pcb-result{display:flex;justify-content:space-between;padding:9px 6px 2px;font-size:10px}.pcb-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:9px 0 0}.pcb-stat{border:1px solid #dfe7ee;border-radius:9px;padding:9px 10px;display:grid;grid-template-columns:1fr auto;gap:12px}.pcb-stat>div{display:grid;gap:2px}.pcb-stat>div:last-child{text-align:right}.pcb-stat b{font-size:9px}.pcb-stat strong{font-size:10px;color:#18344d}@media(max-width:900px){.pcb-kpis,.pcb-stat-grid{grid-template-columns:1fr 1fr}}

/* V89 · Employee review navigation + independent statutory audit */
.employee-review-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0 14px;padding:9px 12px;border:1px solid #dfe7ee;border-radius:11px;background:#fff}.employee-nav-controls{display:flex;align-items:center;gap:8px;min-width:0;flex:1}.employee-nav-btn{height:34px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 11px;border:1px solid #d8e2eb;border-radius:8px;background:#f8fbff;color:#21415c;text-decoration:none;font-size:10px;font-weight:700;white-space:nowrap}.employee-nav-btn:hover{background:#eef5ff;border-color:#bfd4ec}.employee-nav-btn.disabled{opacity:.42;cursor:not-allowed}.employee-nav-search{display:grid;grid-template-columns:auto minmax(210px,360px);align-items:center;gap:8px;margin:0 2px}.employee-nav-search label{font-size:9px;color:#7b8da0;font-weight:700;white-space:nowrap}.employee-nav-search input{height:34px;margin:0!important;padding:0 10px!important;border-radius:8px!important;font-size:10px!important;min-width:0}.employee-nav-meta{display:flex;align-items:center;gap:5px;color:#667a8d;font-size:9px;white-space:nowrap}.employee-nav-meta b{font-size:10px;color:#18344d}.employee-nav-meta span{margin-left:8px;padding-left:9px;border-left:1px solid #dfe7ee;color:#8a99a8}.statutory-audit-section{margin-top:16px;border:1px solid #dfe7ee;border-radius:12px;background:#fff;padding:14px}.statutory-audit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.statutory-audit-head h2{margin:2px 0 3px;font-size:16px;color:#18344d}.statutory-audit-head p{margin:0;font-size:9.5px;color:#7c8da0}.section-kicker{font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:#6f84a0;font-weight:800}.rule-version-chip{font-size:8.5px;padding:5px 8px;border:1px solid #dbe5ef;border-radius:999px;background:#f8fbff;color:#5f7488;white-space:nowrap}.statutory-detail-card{border:1px solid #dfe7ee;border-radius:10px;background:#fbfdff;overflow:hidden}.paye-detail-card{margin-bottom:10px}.statutory-card-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid #e7edf3;background:#fff}.statutory-card-title h3{margin:0;font-size:11px;color:#18344d}.statutory-card-title p{margin:2px 0 0;font-size:8px;color:#7c8da0}.statutory-card-title>strong{font-size:12px;color:#18344d;white-space:nowrap}.statutory-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:10px}.statutory-kpis>div,.contribution-working>div{display:grid;gap:2px;padding:8px;border:1px solid #e5ebf2;border-radius:8px;background:#fff}.statutory-kpis small,.contribution-working small{font-size:7.8px;color:#7c8da0}.statutory-kpis b,.contribution-working b{font-size:9.5px;color:#18344d}.statutory-table-wrap{overflow:auto;padding:0 10px 8px}.statutory-band-table{width:100%;border-collapse:collapse;font-size:8.7px}.statutory-band-table th,.statutory-band-table td{padding:7px;border-bottom:1px solid #e8eef3;text-align:right}.statutory-band-table th:first-child,.statutory-band-table td:first-child{text-align:left}.statutory-band-table th{font-size:7.8px;text-transform:uppercase;color:#6f8193}.statutory-result-line{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;background:#f4f8fc;font-size:10px}.statutory-component-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.contribution-card{padding-bottom:10px}.contribution-working{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px 10px 7px}.formula-line{margin:0 10px;padding:8px 10px;border-radius:8px;background:#eef4fa;color:#28445d;font-size:9px;font-weight:700;font-variant-numeric:tabular-nums}.payslip-v89 .vlp-row{min-height:31px}.payslip-v89 .vlp-row>span{padding-top:7px;padding-bottom:7px}
@media(max-width:900px){.employee-review-nav{align-items:stretch;flex-direction:column}.employee-nav-controls{flex-wrap:wrap}.employee-nav-search{order:3;width:100%;grid-template-columns:1fr}.employee-nav-search input{width:100%}.employee-nav-meta{justify-content:space-between}.statutory-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.statutory-component-grid{grid-template-columns:1fr}}
.vlp-document-footer{display:grid;grid-template-columns:1fr 2.4fr 1fr;align-items:center;gap:8px;margin-top:8px;padding:7px 10px;background:#dff3fb;font-size:8.5px;color:#172033}.vlp-document-footer b{text-align:center;font-weight:600}.vlp-document-footer span:last-child{text-align:right}

/* V90 · Company payslip branding, leave balances and laptop layout */
.company-settings-v90{width:min(1080px,95vw)!important;max-height:92vh!important;padding-bottom:18px!important}
.company-settings-v90 .modal-title-row{position:sticky;top:0;z-index:5;background:#fff;padding-bottom:12px;border-bottom:1px solid #e8eef4}
.company-settings-form{display:grid;gap:14px;margin-top:14px}.settings-section{border:1px solid #e2e9f1;border-radius:14px;background:#fbfdff;padding:14px}.settings-section-head{margin-bottom:12px}.settings-section-head h3{margin:0 0 3px;font-size:14px;color:#18344d}.settings-section-head p{margin:0;font-size:10px;color:#75879a}.settings-grid{gap:12px 14px}.settings-section label{margin:0}.settings-save-row{display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:0;background:#fff;padding:10px 0 2px;z-index:4}.settings-save-row button{margin:0}.contacts-settings-section{margin-top:14px}.payslip-branding-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:14px;align-items:stretch}.logo-setting-card{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;align-items:center;border:1px solid #e4ebf2;border-radius:12px;background:#fff;padding:12px}.logo-setting-preview{height:88px;border:1px dashed #cfd9e5;border-radius:10px;display:grid;place-items:center;background:#f8fbff;overflow:hidden;color:#8a99a8;font-size:10px}.logo-setting-preview img{max-width:94%;max-height:78px;width:auto;height:auto;object-fit:contain}.logo-setting-controls{display:grid;gap:8px}.remove-logo-check{display:flex!important;align-items:center;gap:8px;font-size:10px;color:#6e7f91}.remove-logo-check input{width:auto!important;margin:0!important}.payslip-setting-fields{display:grid;gap:12px}.settings-toggle{display:flex!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid #e3eaf2;border-radius:11px;background:#fff}.settings-toggle input{width:auto!important;margin:3px 0 0!important}.settings-toggle span{display:grid;gap:2px}.settings-toggle b{font-size:11px;color:#18344d}.settings-toggle small{font-size:9px;color:#7a8b9c}.company-settings-v90 .contacts-editor{max-height:260px}

.payslip-v90 .vlp-company{display:block!important;padding:12px!important}.payslip-v90 .vlp-company.has-company-logo{display:grid!important;grid-template-columns:minmax(110px,.8fr) minmax(0,1.55fr);gap:14px;align-items:center;text-align:left}.vlp-company-logo{min-width:0;display:grid;place-items:center;padding:4px}.vlp-company-logo img{display:block;max-width:100%;max-height:74px;width:auto;height:auto;object-fit:contain}.vlp-company-copy{min-width:0;display:grid;gap:5px;text-align:center}.has-company-logo .vlp-company-copy{text-align:left;padding-right:8px}.vlp-company-copy strong,.vlp-company-copy span,.vlp-company-copy small{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal;white-space:normal!important}.vlp-company-copy strong{line-height:1.22}.vlp-company-copy span{line-height:1.35}.vlp-company-copy small{line-height:1.3}.vlp-leave-balance{border:2px solid #222;border-top:0}.vlp-leave-row{display:grid;grid-template-columns:2fr repeat(3,1fr)}.vlp-leave-row>*{padding:5px 7px;border-left:1px solid #222;text-align:right}.vlp-leave-row>*:first-child{border-left:0;text-align:left}.vlp-leave-row+.vlp-leave-row{border-top:1px solid #222}.vlp-leave-head{font-weight:700}.payslip-v90 .vlp-period span{white-space:nowrap}

/* Give the payslip more breathing room on common laptop widths. */
.employee-payroll-review .review-layout{grid-template-columns:minmax(0,1.12fr) minmax(560px,.92fr)!important;gap:18px!important}
@media(max-width:1180px){.employee-payroll-review .review-layout{grid-template-columns:1fr!important}.employee-payroll-review .payslip-preview-column{position:relative!important;top:auto!important}.employee-payroll-review .review-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:760px){.company-settings-v90{width:calc(100vw - 20px)!important}.payslip-branding-grid,.logo-setting-card{grid-template-columns:1fr}.logo-setting-preview{height:76px}.settings-save-row{flex-direction:column}.settings-save-row button{width:100%}.payslip-v90 .vlp-company.has-company-logo{grid-template-columns:1fr;text-align:center}.has-company-logo .vlp-company-copy{text-align:center;padding-right:0}.vlp-company-logo img{max-height:62px}}

/* V91 payroll review refinements */
.leave-workspace-head-v91{display:grid!important;grid-template-columns:minmax(230px,.8fr) minmax(680px,1.7fr);gap:18px;align-items:end!important;margin-bottom:8px!important}
.leave-workspace-title h1{margin:0}.leave-workspace-title p{margin:4px 0 0}
.leave-workspace-toolbar{display:grid;grid-template-columns:150px minmax(190px,1fr) minmax(190px,1fr) auto auto;gap:8px;align-items:end;min-width:0}
.leave-toolbar-field{margin:0!important;font-size:9px!important;color:#62768a}.leave-toolbar-field input,.leave-toolbar-field select{width:100%;height:36px;margin-top:4px!important;padding:7px 9px!important;font-size:10px!important}
.leave-workspace-toolbar .btn{height:36px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;margin:0}
.leave-quick-types{display:flex;align-items:center;gap:6px;margin:0 0 9px;min-height:30px}.leave-quick-types>span{font-size:9px;color:#8392a1;font-weight:700;margin-right:2px}.leave-quick-types a{padding:6px 9px;border:1px solid #d9e3eb;border-radius:7px;background:#f7f9fb;color:#405a70;text-decoration:none;font-size:9px;font-weight:650}.leave-quick-types a.active{background:#e7f4ee;border-color:#b9ddca;color:#1e6948}.leave-quick-types small{margin-left:auto;color:#7a8c9d;font-size:9px}
.payslip-delivery-warning{width:20px;height:20px;border-radius:999px;border:1px solid #e6ad49;background:#fff7df;color:#9b6500;font-weight:900;font-size:12px;display:inline-grid;place-items:center;cursor:pointer;padding:0;margin-left:3px}.payslip-delivery-warning:hover{background:#ffefbd}
.payslip-delivery-modal[hidden]{display:none}.payslip-delivery-modal{position:fixed;inset:0;z-index:1000;background:rgba(16,24,40,.34);display:grid;place-items:center;padding:20px}.payslip-delivery-dialog{width:min(680px,calc(100vw - 32px));max-height:75vh;overflow:hidden;background:#fff;border-radius:14px;border:1px solid #dce5ee;box-shadow:0 24px 70px rgba(15,23,42,.22);display:grid;grid-template-rows:auto minmax(0,1fr)}.payslip-delivery-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:16px 17px;border-bottom:1px solid #e7edf3}.payslip-delivery-head h3{margin:0 0 3px;font-size:15px;color:#18344d}.payslip-delivery-head p{margin:0;font-size:9.5px;color:#75879a}.payslip-delivery-head button{width:30px;height:30px;border:0;border-radius:8px;background:#f0f4f8;color:#587085;font-size:18px;cursor:pointer}.payslip-delivery-list{overflow:auto;padding:8px 12px 12px}.payslip-delivery-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(280px,1.4fr);gap:14px;padding:11px 7px;border-bottom:1px solid #edf1f5}.payslip-delivery-row:last-child{border-bottom:0}.payslip-delivery-row b{display:block;font-size:10.5px;color:#18344d}.payslip-delivery-row small{display:block;margin-top:2px;font-size:8.5px;color:#8292a2}.payslip-delivery-reason{font-size:9.5px;color:#5c7084;line-height:1.4}
@media(max-width:1200px){.leave-workspace-head-v91{grid-template-columns:1fr!important}.leave-workspace-toolbar{grid-template-columns:140px minmax(180px,1fr) minmax(180px,1fr) auto auto}}
@media(max-width:800px){.leave-workspace-toolbar{grid-template-columns:1fr 1fr}.leave-employee-search{grid-column:1/-1}.leave-workspace-toolbar .btn{width:100%}.leave-quick-types{flex-wrap:wrap}.payslip-delivery-row{grid-template-columns:1fr}}

/* V92 — declaration template mapping */
.declaration-head{align-items:flex-end}.declaration-return-card{border-left:4px solid var(--accent,#d6a15d)}
.declaration-coming-row{display:flex;justify-content:space-between;gap:18px;padding:12px 14px;border-radius:10px;background:rgba(127,127,127,.07);font-size:.9rem}.declaration-coming-row span{color:var(--muted,#718096)}
.declaration-upload-form{display:grid;grid-template-columns:minmax(250px,1.3fr) repeat(3,minmax(150px,.8fr)) auto;gap:12px;align-items:end}.declaration-upload-form label{margin:0}.declaration-upload-form button{height:42px;white-space:nowrap}
.declaration-flow-note{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;color:var(--muted,#667085);font-size:.83rem}.declaration-flow-note span{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:rgba(127,127,127,.12);font-weight:800;color:inherit}.declaration-flow-note b{opacity:.4}
.declaration-template-list{display:grid;gap:12px}.declaration-template-card{display:flex;align-items:center;gap:20px;border:1px solid var(--border,#e6e8ec);border-radius:14px;padding:16px 18px}.declaration-template-card.active-template{border-color:rgba(43,132,93,.35);background:rgba(43,132,93,.035)}.declaration-template-main{flex:1;min-width:0}.declaration-template-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.declaration-template-title>div{display:flex;flex-direction:column;gap:3px;min-width:0}.declaration-template-title b{font-size:1rem}.declaration-template-title small{color:var(--muted,#718096);overflow-wrap:anywhere}.declaration-progress-line{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;align-items:center;gap:10px;margin:13px 0 10px}.declaration-progress-track{height:8px;border-radius:999px;background:rgba(127,127,127,.15);overflow:hidden}.declaration-progress-track span{display:block;height:100%;border-radius:inherit;background:var(--accent,#d6a15d)}.declaration-progress-line small{color:var(--muted,#718096)}.declaration-change-chips,.declaration-legend{display:flex;gap:7px;flex-wrap:wrap}.decl-chip{display:inline-flex;align-items:center;min-height:26px;padding:4px 9px;border-radius:999px;background:rgba(127,127,127,.10);font-size:.72rem;font-weight:750;color:var(--muted,#667085)}.decl-chip.ok{background:rgba(43,132,93,.10);color:#237a54}.decl-chip.info{background:rgba(49,130,206,.10);color:#2b6cb0}.decl-chip.warn{background:rgba(221,107,32,.11);color:#b65d16}.decl-chip.danger{background:rgba(197,48,48,.10);color:#c53030}.decl-chip.removed{background:rgba(113,128,150,.13);color:#596579;text-decoration:none}.declaration-template-action{flex:0 0 auto}.declaration-template-action .button{white-space:nowrap}
.declaration-editor-summary{display:flex;justify-content:space-between;gap:18px;align-items:center}.declaration-editor-progress{flex:1;display:grid;grid-template-columns:auto minmax(180px,1fr) auto auto auto;gap:12px;align-items:center}.declaration-editor-progress>div:first-child{display:flex;align-items:baseline;gap:8px}.declaration-editor-progress small,.declaration-editor-progress span{color:var(--muted,#718096);font-size:.8rem}.declaration-editor-progress b{font-size:1.35rem}.declaration-stage-status{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.declaration-legend{margin:12px 2px}
.declaration-map-section{padding:0;overflow:hidden}.declaration-map-section .ml-section-head{padding:18px 20px 8px}.declaration-map-table-wrap{max-width:100%;overflow:auto}.declaration-map-table{min-width:1180px}.declaration-map-table th{position:sticky;top:0;z-index:1;background:var(--panel,#fff)}.declaration-map-table td{vertical-align:top}.declaration-map-table td:first-child{min-width:280px;max-width:380px}.declaration-map-table td:first-child>b{display:block;line-height:1.25;overflow-wrap:anywhere}.declaration-map-table td:first-child>small{display:block;margin-top:5px;color:var(--muted,#718096)}.declaration-map-table input,.declaration-map-table select{min-width:150px;margin:0}.declaration-map-table td:nth-child(4) input{min-width:300px;width:100%}.decl-row-new,.decl-row-updated{background:rgba(221,107,32,.025)}.decl-row-unchanged{background:rgba(43,132,93,.018)}.decl-suggestion{margin-top:8px;padding:8px;border:1px dashed rgba(221,107,32,.35);border-radius:8px;background:rgba(221,107,32,.05);font-size:.74rem}.decl-suggestion button{display:block;margin-top:7px}.decl-reviewed-check{display:flex!important;align-items:center;gap:6px;white-space:nowrap}.decl-reviewed-check input{min-width:auto;width:auto}.decl-reviewed-check span{font-size:.78rem}.declaration-sticky-actions{position:sticky;bottom:12px;z-index:8;display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:12px 14px;margin:14px 0;border:1px solid var(--border,#e6e8ec);border-radius:13px;background:var(--panel,#fff);box-shadow:0 8px 30px rgba(15,23,42,.09)}.declaration-sticky-actions>div{margin-right:auto;display:flex;flex-direction:column}.declaration-sticky-actions>div span{font-size:.75rem;color:var(--muted,#718096)}.declaration-sticky-actions button[disabled]{opacity:.45;cursor:not-allowed}.declaration-removed-list{display:flex;flex-wrap:wrap;gap:8px}.declaration-removed-list span{padding:7px 10px;border-radius:8px;background:rgba(113,128,150,.11);font-size:.8rem;color:var(--muted,#596579)}
@media(max-width:1100px){.declaration-upload-form{grid-template-columns:1fr 1fr}.declaration-upload-form button{grid-column:span 2}.declaration-editor-summary{align-items:stretch;flex-direction:column}.declaration-editor-progress{grid-template-columns:auto 1fr auto}.declaration-editor-progress>span:nth-last-child(-n+2){display:none}}
@media(max-width:720px){.declaration-upload-form{grid-template-columns:1fr}.declaration-upload-form button{grid-column:auto}.declaration-template-card{align-items:stretch;flex-direction:column}.declaration-template-action .button{display:block;text-align:center}.declaration-progress-line{grid-template-columns:1fr auto}.declaration-progress-line small{grid-column:1/-1}.declaration-editor-progress{grid-template-columns:auto 1fr}.declaration-editor-progress>span{display:none}.declaration-sticky-actions{position:static;flex-wrap:wrap}.declaration-sticky-actions>div{width:100%;margin:0}.declaration-sticky-actions button{flex:1 1 150px}}

/* V93 — declaration traceability + reliable sidebar wheel */
.ml-body aside.ml-sidebar{overflow:hidden!important}
.ml-sidebar-scroll-region{overscroll-behavior:contain!important;scroll-behavior:auto!important}
.declaration-head-actions{display:flex;align-items:center;gap:9px}
.declaration-editor-help{display:flex;gap:9px;align-items:center;margin:0 20px 10px;padding:10px 12px;border:1px solid #dbe6ef;border-radius:10px;background:#f8fbfd;color:#536b80;font-size:.78rem;line-height:1.35}.declaration-editor-help b{color:#18344d;white-space:nowrap}.declaration-editor-help strong{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:999px;background:#e6f1ff;color:#2468b2;font-size:.7rem}
.decl-field-title{display:flex;align-items:flex-start;gap:7px}.decl-field-title>b{flex:1;min-width:0}.decl-info-btn{flex:0 0 auto!important;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;padding:0!important;border-radius:999px!important;border:1px solid #b9d6f5!important;background:#eef6ff!important;color:#2468b2!important;font-size:11px!important;font-weight:900!important;line-height:1!important}.decl-info-btn:hover{background:#dcecff!important}
.decl-source-readable{margin-top:5px;max-width:390px;color:#718397;font-size:.68rem;line-height:1.3;overflow-wrap:anywhere}
.declaration-info-modal[hidden]{display:none}.declaration-info-modal{position:fixed;inset:0;z-index:17000;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.38)}.declaration-info-dialog{width:min(760px,calc(100vw - 30px));max-height:min(82vh,760px);overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);border-radius:16px;background:#fff;border:1px solid #dce5ee;box-shadow:0 28px 80px rgba(15,23,42,.24)}.declaration-info-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:17px 19px;border-bottom:1px solid #e7edf3}.declaration-info-head small{display:block;color:#6f86a0;font-size:.64rem;font-weight:850;letter-spacing:.12em}.declaration-info-head h3{margin:3px 0 0;color:#17334c;font-size:1.05rem}.declaration-info-head button{width:32px;height:32px;padding:0;border:0;border-radius:9px;background:#eef3f7;color:#506b80;font-size:20px;cursor:pointer}.declaration-info-body{overflow:auto;padding:16px 19px 20px;display:grid;gap:10px}.declaration-info-body section{padding:11px 12px;border:1px solid #e2e9f0;border-radius:10px;background:#fbfcfd}.declaration-info-body h4{margin:0 0 5px;color:#203e58;font-size:.75rem}.declaration-info-body p{margin:0;color:#536b80;font-size:.78rem;line-height:1.45}.declaration-info-body code{display:inline-block;margin-top:6px;padding:4px 7px;border-radius:6px;background:#edf2f7;color:#41576a;font-size:.7rem}.declaration-info-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.declaration-info-body .decl-formula-explain{background:#f5f9ff;border-color:#d5e5f8}.declaration-current-spec-note{padding:9px 11px!important;border-radius:8px;background:#fff8e8;color:#856317!important;font-size:.7rem!important}
.declaration-audit-principle{display:flex;align-items:center;justify-content:space-between;gap:16px;border-left:4px solid #2e9b68}.declaration-audit-principle b{font-size:.9rem}.declaration-audit-principle p{margin:4px 0 0;color:#66798c;font-size:.78rem}.declaration-dictionary-section .ml-section-head{margin-bottom:10px}.declaration-dictionary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.declaration-dictionary-card{border:1px solid #e0e8ef;border-radius:12px;padding:13px;background:#fff}.decl-dict-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:9px;border-bottom:1px solid #edf1f4}.decl-dict-title b{font-size:.82rem;color:#17344d}.decl-dict-title code{font-size:.65rem;background:#f1f5f8;color:#60758a;border-radius:6px;padding:4px 6px;overflow-wrap:anywhere}.declaration-dictionary-card dl{margin:10px 0 0;display:grid;gap:8px}.declaration-dictionary-card dl>div{display:grid;grid-template-columns:100px 1fr;gap:8px}.declaration-dictionary-card dt{font-size:.66rem;font-weight:800;color:#7a8d9e;text-transform:uppercase;letter-spacing:.04em}.declaration-dictionary-card dd{margin:0;font-size:.75rem;line-height:1.4;color:#40596e}
@media(max-width:850px){.declaration-info-two,.declaration-dictionary-grid{grid-template-columns:1fr}.declaration-head-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}.declaration-editor-help{align-items:flex-start;flex-direction:column}.declaration-dictionary-card dl>div{grid-template-columns:1fr;gap:2px}}
/* V94 employment lifecycle */
.employment-lifecycle-block{margin:18px 0;padding:18px;border:1px solid #dbe3ea;border-radius:14px;background:#fbfcfd}
.employee-subsection-head{margin-bottom:14px}.employee-subsection-head h3{margin:0 0 4px}.employee-subsection-head p{margin:0;color:#687484;font-size:13px}
.four-col{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.employment-history{margin-top:16px}.employment-history h4{margin:0 0 8px}
@media(max-width:1050px){.four-col{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.four-col{grid-template-columns:1fr}}
/* V94 End-of-Year Bonus */
.eoy-toolbar{display:flex;justify-content:space-between;align-items:end;gap:18px}.eoy-toolbar form{min-width:180px}.eoy-law-note{max-width:700px;display:flex;flex-direction:column;gap:4px}.eoy-law-note span{color:#687484;font-size:13px}.eoy-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:14px 0}.eoy-summary-grid .panel{margin:0}.eoy-summary-grid small,.eoy-summary-grid b{display:block}.eoy-summary-grid b{font-size:21px;margin-top:5px}.eoy-table td small{display:block;color:#6f7a86;margin-top:3px}.eoy-warning-dot{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#fff1cf;color:#8a5a00;font-weight:800;margin-left:6px}.eoy-detail-dialog{width:min(1040px,94vw)}.eoy-detail-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.eoy-detail-cards>div{padding:12px;border:1px solid #dce3ea;border-radius:10px}.eoy-detail-cards small,.eoy-detail-cards b{display:block}.eoy-trace{min-width:340px;display:grid;gap:5px;padding:8px 0}.eoy-trace>div{display:grid;grid-template-columns:1fr auto;gap:3px 12px;padding:6px 0;border-bottom:1px solid #edf1f4}.eoy-trace>div small{grid-column:1/-1;color:#6f7a86}.eoy-trace>div.excluded{opacity:.65}.eoy-payment-note{margin-top:16px;padding:14px;border-radius:10px;background:#f5f8fa;display:flex;flex-direction:column;gap:4px}.eoy-classify{display:grid;grid-template-columns:110px minmax(180px,1fr) auto;gap:6px;align-items:center}.eoy-next-settlement{border-style:dashed}
@media(max-width:1100px){.eoy-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.eoy-toolbar{align-items:stretch;flex-direction:column}.eoy-detail-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* V95 — clearer notice terms and payroll availability */
.field-info-dot{display:inline-grid!important;place-items:center;width:19px!important;height:19px!important;min-width:19px!important;padding:0!important;margin-left:5px;border:1px solid #b9d5f3!important;border-radius:999px!important;background:#eef6ff!important;color:#2369b2!important;font-size:11px!important;font-weight:900!important;vertical-align:middle;cursor:pointer}
.notice-terms-grid label small{min-height:32px}.notice-help-card{margin:10px 0 14px;padding:14px 16px;border:1px solid #d7e4ef;border-radius:12px;background:#f7fbff}.notice-help-card>b{display:block;margin-bottom:9px;color:#18344d}.notice-help-card>div{display:grid;grid-template-columns:130px 1fr;gap:10px;padding:6px 0;border-bottom:1px solid #e8f0f6}.notice-help-card>div:last-of-type{border-bottom:0}.notice-help-card strong{font-size:12px;color:#294b68}.notice-help-card span,.notice-help-card p{font-size:12px;line-height:1.45;color:#60758a}.notice-help-card p{margin:10px 0 0;padding-top:9px;border-top:1px dashed #d5e2ed}.employment-end-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:12px}.employment-end-dates label small{min-height:48px}.payroll-availability-card{padding:0;overflow:hidden}.payroll-availability-main{display:grid;grid-template-columns:minmax(320px,1.2fr) minmax(260px,.8fr);gap:20px;align-items:center;padding:16px 18px}.payroll-availability-summary{padding:12px 14px;border:1px solid #e3eaf1;border-radius:11px;background:#fff;display:grid;gap:3px}.payroll-availability-summary small{color:#718096}.payroll-availability-summary b{font-size:14px;color:#1f3c56}.payroll-availability-summary span{font-size:11px;line-height:1.4;color:#758697}.payroll-availability-advanced{border-top:1px solid #e3eaf1;background:#fbfcfd}.payroll-availability-advanced summary{padding:11px 18px;cursor:pointer;font-size:12px;font-weight:700;color:#5c7185}.payroll-availability-advanced[open] summary{border-bottom:1px solid #edf1f5}.payroll-availability-advanced label{display:block;padding:13px 18px 16px;margin:0}.payroll-availability-advanced input{max-width:360px}.payroll-availability-advanced small{display:block;max-width:700px;margin-top:5px}
@media(max-width:900px){.employment-end-dates,.payroll-availability-main{grid-template-columns:1fr}.notice-help-card>div{grid-template-columns:1fr;gap:2px}.notice-terms-grid label small,.employment-end-dates label small{min-height:auto}}

/* V96 — Admin hubs */
.admin-hub-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:4px 0 18px}.admin-hub-head h1{margin:7px 0 5px;font-size:30px;letter-spacing:-.035em;color:#10243b}.admin-hub-head p{margin:0;max-width:850px;color:#667994;line-height:1.5}.admin-scope{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:900;letter-spacing:.09em}.admin-scope.workspace{background:#e8f0ff;color:#2458b9}.admin-scope.client{background:#e7f8f2;color:#087a5c}.admin-head-stat{min-width:145px;border:1px solid #dbe5f0;background:#fff;border-radius:14px;padding:12px 16px;text-align:right;box-shadow:0 4px 14px rgba(21,40,66,.04)}.admin-head-stat strong{display:block;font-size:24px;color:#10243b}.admin-head-stat span{font-size:12px;color:#74859c}.admin-back{white-space:nowrap}.admin-hub-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}.admin-search-wrap{flex:1;max-width:560px;display:flex;align-items:center;gap:8px;border:1px solid #cfdae8;background:#fff;border-radius:12px;padding:0 12px;box-shadow:0 2px 9px rgba(24,42,68,.03)}.admin-search-wrap span{font-size:20px;color:#7a8ca3}.admin-search-wrap input{border:0!important;box-shadow:none!important;padding:12px 4px!important;width:100%;background:transparent!important}.admin-context-note{font-size:12px;color:#5e7189;background:#f5f8fb;border:1px solid #e0e7f0;padding:9px 12px;border-radius:10px}.admin-context-note.workspace-warning{background:#fffaf0;border-color:#efe0b7;color:#7a6130}.admin-hub-section{margin:0 0 28px}.admin-section-title{display:flex;justify-content:space-between;align-items:end;margin:0 0 11px;padding:0 2px}.admin-section-title h2{margin:0 0 3px;font-size:17px;color:#122840}.admin-section-title p{margin:0;color:#7a8ca3;font-size:12px;line-height:1.4}.admin-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.admin-setting-card{display:grid;grid-template-columns:42px minmax(0,1fr) 20px;gap:12px;align-items:start;text-decoration:none!important;color:inherit!important;background:#fff;border:1px solid #dbe4ee;border-radius:14px;padding:17px 16px;box-shadow:0 2px 8px rgba(20,43,70,.025);transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.admin-setting-card:hover{border-color:#9fb8d6;box-shadow:0 8px 22px rgba(25,52,82,.08);transform:translateY(-1px)}.admin-card-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#f0f5fb;color:#274d76;font-size:18px;font-weight:800}.admin-card-body{min-width:0}.admin-card-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.admin-card-title h3{margin:0;font-size:14px;color:#10243b}.admin-card-body p{margin:6px 0 0;color:#64778f;font-size:12px;line-height:1.46}.admin-scope-pill{font-size:9px;font-weight:900;letter-spacing:.07em;border-radius:999px;padding:3px 6px}.admin-scope-pill.workspace{background:#edf3ff;color:#315fb7}.admin-scope-pill.client{background:#e9f8f2;color:#08795d}.admin-card-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.admin-card-meta span{font-size:10px;color:#667a92;background:#f5f8fb;border-radius:999px;padding:4px 7px}.admin-card-arrow{align-self:center;color:#8093aa;font-size:24px}.admin-empty-search{border:1px dashed #cad6e4;border-radius:12px;padding:24px;text-align:center;color:#71839a;background:#fbfcfe}@media(max-width:900px){.admin-card-grid{grid-template-columns:1fr}.admin-hub-toolbar,.admin-hub-head{align-items:stretch;flex-direction:column}.admin-search-wrap{max-width:none}.admin-head-stat{text-align:left;min-width:0}}
.eoy-live-status{display:flex;align-items:center;gap:8px;background:#f7f9fc;border:1px solid #e0e7f0;border-radius:10px;padding:7px 10px}.eoy-live-status b{font-size:18px;color:#17314f}.eoy-live-status span{font-size:11px;color:#6e8097}.eoy-classification-table td small{display:block;margin-top:4px}.eoy-system-source{background:#fbfcfe}.eoy-system-source td:first-child{border-left:3px solid #b5c6d9}

/* V97 — pay-item EOY rules + visible application scrolling */
html,body.ml-body{overflow-y:auto!important;scrollbar-gutter:stable}
body.ml-body::-webkit-scrollbar{width:11px}body.ml-body::-webkit-scrollbar-track{background:#eef2f6}body.ml-body::-webkit-scrollbar-thumb{background:#a9b8c8;border:3px solid #eef2f6;border-radius:999px}body.ml-body::-webkit-scrollbar-thumb:hover{background:#879aaf}
.ml-main{overflow-x:clip!important;overflow-y:visible!important;min-height:100dvh!important}
.ml-body aside.ml-sidebar{overflow:hidden!important}
.ml-sidebar-scroll-region{overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;scrollbar-width:thin;scrollbar-color:#526982 transparent}
.ml-sidebar-scroll-region::-webkit-scrollbar{width:7px}.ml-sidebar-scroll-region::-webkit-scrollbar-track{background:transparent}.ml-sidebar-scroll-region::-webkit-scrollbar-thumb{background:#526982;border-radius:999px}
.eoy-table thead th,.eoy-classification-table thead th{position:sticky;top:0;z-index:4;background:#fff;box-shadow:0 1px 0 #dfe7ef}
.eoy-rules-wrap{max-height:58vh;overflow:auto!important}
.payitem-layout{grid-template-columns:minmax(360px,.95fr) minmax(720px,1.65fr)!important;align-items:start}.payitem-create-form small{display:block;margin-top:5px;color:#71839a;line-height:1.4}.inline-eoy-form{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(220px,1.3fr) auto;gap:6px;align-items:center;min-width:480px}.inline-eoy-form select,.inline-eoy-form input{margin:0!important}.payitem-eoy-help{display:block;margin-top:4px!important;color:#71839a!important;line-height:1.35}.eoy-rules-panel .panel-head{align-items:center}.eoy-rules-panel .panel-head .button{white-space:nowrap}
@media(max-width:1250px){.payitem-layout{grid-template-columns:1fr!important}.inline-eoy-form{min-width:420px}}
@media(max-width:700px){.inline-eoy-form{grid-template-columns:1fr;min-width:280px}.eoy-rules-panel .panel-head{align-items:stretch;flex-direction:column}.eoy-rules-panel .panel-head .button{text-align:center}}

/* V98 — Earnings/Deductions register redesign */
.payitem-create-panel,.payitem-register-panel{margin-bottom:18px}
.payitem-create-grid{display:grid;grid-template-columns:minmax(220px,1.2fr) minmax(180px,.8fr) minmax(220px,1fr) minmax(240px,1.2fr);gap:12px 14px;align-items:end}
.payitem-create-grid>label{margin:0}.payitem-create-grid .payitem-note-field{min-width:0}.payitem-toggle-stack{display:flex;gap:18px;align-items:center;min-height:42px;grid-column:1/4}.payitem-create-action{display:flex;justify-content:flex-end;align-items:end}.payitem-register-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.payitem-filter-pills{display:flex;gap:6px;flex-wrap:wrap}.payitem-filter-pills button{background:#eef3f7!important;color:#42566b!important;border:1px solid #dbe4ec!important;border-radius:999px!important;padding:7px 11px!important;font-size:10px!important;font-weight:800!important}.payitem-filter-pills button.active{background:#dfeeff!important;color:#185ea8!important;border-color:#b9d6f4!important}.payitem-register-note{margin:10px 0 12px}.payitem-register-table{min-width:980px}.payitem-register-table td{vertical-align:middle}.payitem-row-sub{display:block;margin-top:3px;color:#8090a0;font-size:9px}.eoy-state-pill{display:inline-flex;border-radius:999px;padding:5px 8px;font-size:9px;font-weight:900;letter-spacing:.02em}.eoy-state-pill.included{background:#e8f5ed;color:#176c41}.eoy-state-pill.excluded{background:#f0f2f5;color:#465464}.payitem-edit-details{position:relative}.payitem-edit-details>summary{list-style:none;cursor:pointer;display:inline-flex!important;align-items:center;justify-content:center}.payitem-edit-details>summary::-webkit-details-marker{display:none}.payitem-edit-popover{position:absolute;z-index:60;right:0;top:calc(100% + 8px);width:min(360px,80vw);padding:14px;background:#fff;border:1px solid #dbe4ec;border-radius:12px;box-shadow:0 18px 45px rgba(35,55,75,.18)}.payitem-edit-form{display:grid;gap:10px}.payitem-edit-form label{margin:0}.payitem-danger-zone{border-top:1px solid #edf1f5;margin-top:12px;padding-top:12px}.payitem-table-wrap{overflow:auto;max-width:100%}
@media(max-width:1100px){.payitem-create-grid{grid-template-columns:1fr 1fr}.payitem-toggle-stack{grid-column:1/2}.payitem-create-action{grid-column:2/3}}@media(max-width:720px){.payitem-create-grid{grid-template-columns:1fr}.payitem-toggle-stack,.payitem-create-action{grid-column:auto}.payitem-create-action{justify-content:stretch}.payitem-create-action button{width:100%}.payitem-register-tools{align-items:stretch}.payitem-register-tools .search-box{width:100%}}

/* V99 — simplified EOY Bonus + cleaner pay-item editing */
.payitem-create-grid-v99{display:grid!important;grid-template-columns:minmax(220px,1.15fr) minmax(180px,.8fr) minmax(220px,.95fr) minmax(240px,1.15fr)!important;gap:10px 14px!important;align-items:start!important}
.payitem-create-grid-v99>label{margin:0!important;display:grid!important;grid-template-rows:18px 42px!important;align-content:start!important}
.payitem-create-grid-v99>label>input,.payitem-create-grid-v99>label>select{height:42px!important;margin:0!important}
.payitem-create-helper{grid-column:1/-1!important;margin-top:-2px!important;color:#71839a!important;font-size:11px!important;line-height:1.4!important}
.payitem-create-footer{grid-column:1/-1!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:16px!important;padding-top:2px!important}
.payitem-create-footer .payitem-toggle-stack{grid-column:auto!important;min-height:auto!important}.payitem-create-footer button{white-space:nowrap!important}
.payitem-v99-drawer{width:min(430px,94vw)!important;max-width:min(430px,94vw)!important}.payitem-v99-drawer .ml-action-drawer-body{padding:18px!important;gap:16px!important}
.payitem-drawer-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}.payitem-drawer-summary>div{border:1px solid #e1e8ef!important;background:#f8fafc!important;border-radius:10px!important;padding:10px!important}.payitem-drawer-summary small,.payitem-drawer-summary b{display:block!important}.payitem-drawer-summary small{color:#74869a!important;font-size:9px!important}.payitem-drawer-summary b{margin-top:4px!important;font-size:12px!important}
.payitem-drawer-form{display:grid!important;gap:14px!important}.payitem-drawer-form label{margin:0!important}.payitem-drawer-form label small{display:block!important;margin-top:5px!important;color:#71839a!important;line-height:1.4!important}.payitem-drawer-form textarea{resize:vertical!important;min-height:92px!important}.payitem-drawer-form button{width:100%!important}.payitem-danger-zone{margin-top:2px!important}.payitem-danger-zone button{width:100%!important}

.eoy-page-head{align-items:flex-end!important}.eoy-head-actions{display:flex!important;align-items:flex-end!important;gap:10px!important}.eoy-year-form label{margin:0!important;min-width:150px!important}.eoy-year-form select{margin-top:5px!important}.eoy-simple-note{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;margin:0 0 12px!important;padding:10px 12px!important;border:1px solid #dce6ef!important;border-radius:10px!important;background:#f8fafc!important}.eoy-simple-note b{font-size:11px!important;color:#1d3550!important}.eoy-simple-note span{font-size:11px!important;color:#66798e!important}
.eoy-simple-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;margin-bottom:12px!important}.eoy-simple-summary .panel{margin:0!important;padding:15px 16px!important}.eoy-simple-summary small,.eoy-simple-summary b{display:block!important}.eoy-simple-summary small{font-size:10px!important;color:#71839a!important;text-transform:uppercase!important;letter-spacing:.04em!important}.eoy-simple-summary b{font-size:20px!important;margin-top:5px!important;color:#122d48!important}.eoy-review-banner{margin:0 0 12px!important}
.eoy-main-panel{margin-bottom:14px!important}.eoy-main-title{margin-bottom:4px!important}.eoy-simple-table{min-width:1050px!important}.eoy-simple-table td small{display:block!important;margin-top:3px!important;color:#7a8b9c!important}.eoy-simple-table td:last-child{text-align:right!important;white-space:nowrap!important}.eoy-v99-drawer{width:min(520px,96vw)!important;max-width:min(520px,96vw)!important}.eoy-v99-drawer-body{padding:18px!important;gap:14px!important}.eoy-explain-card{border:1px solid #e0e7ef!important;border-radius:12px!important;padding:14px!important;background:#fff!important}.eoy-explain-card>small{display:block!important;font-size:9px!important;text-transform:uppercase!important;letter-spacing:.08em!important;color:#75879a!important;font-weight:800!important;margin-bottom:5px!important}.eoy-explain-card h3{margin:0 0 4px!important;font-size:15px!important}.eoy-explain-card p{margin:0!important;color:#65788b!important;font-size:11px!important;line-height:1.5!important}.eoy-mini-facts{display:flex!important;justify-content:space-between!important;gap:14px!important;border-top:1px solid #edf1f5!important;margin-top:10px!important;padding-top:10px!important;font-size:11px!important}
.eoy-formula-line,.eoy-formula-result{display:flex!important;justify-content:space-between!important;gap:16px!important;padding:8px 0!important;font-size:12px!important}.eoy-formula-line{border-bottom:1px solid #edf1f5!important}.eoy-formula-result{padding-top:12px!important;font-size:14px!important}.eoy-formula-result b{color:#12673f!important;font-size:17px!important}.eoy-card-heading h3{margin:2px 0 8px!important}.eoy-month-list{display:grid!important;gap:6px!important}.eoy-month-row{border:1px solid #e5ebf1!important;border-radius:9px!important;overflow:hidden!important}.eoy-month-row summary{cursor:pointer!important;list-style:none!important;padding:10px 11px!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:10px!important;background:#fafbfd!important}.eoy-month-row summary::-webkit-details-marker{display:none}.eoy-month-row summary span:first-child{display:flex!important;flex-direction:column!important}.eoy-month-row summary small{color:#8190a1!important;font-size:9px!important}.eoy-month-breakdown{padding:6px 11px 10px!important}.eoy-month-breakdown>div{display:flex!important;justify-content:space-between!important;gap:12px!important;padding:8px 0!important;border-bottom:1px solid #edf1f5!important;font-size:11px!important}.eoy-month-breakdown>div:last-child{border-bottom:0!important}.eoy-month-breakdown>div span{display:flex!important;flex-direction:column!important}.eoy-month-breakdown>div small{font-size:9px!important;color:#8190a1!important;margin-top:2px!important}.eoy-month-breakdown>div.excluded{opacity:.62!important}.eoy-payment-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-bottom:8px!important}.eoy-payment-grid>div{border:1px solid #e5ebf1!important;border-radius:9px!important;padding:10px!important}.eoy-payment-grid span,.eoy-payment-grid b{display:block!important}.eoy-payment-grid span{font-size:9px!important;color:#8190a1!important;text-transform:uppercase!important}.eoy-payment-grid b{margin-top:4px!important;font-size:14px!important}
.eoy-compact-rules{margin-bottom:20px!important}.eoy-rule-groups{display:grid!important;grid-template-columns:1fr 1fr 1fr!important;gap:10px!important;margin-top:8px!important}.eoy-rule-groups>div{border:1px solid #e4eaf0!important;border-radius:10px!important;padding:12px!important;background:#fafbfd!important}.eoy-rule-groups small{display:block!important;text-transform:uppercase!important;font-size:9px!important;letter-spacing:.06em!important;color:#75879a!important;font-weight:800!important;margin-bottom:7px!important}.eoy-rule-groups p{margin:0!important;display:flex!important;gap:5px!important;flex-wrap:wrap!important}.eoy-rule-chip{display:inline-flex!important;align-items:center!important;border-radius:999px!important;padding:5px 8px!important;font-size:9px!important;font-weight:750!important}.eoy-rule-chip.included{background:#e7f6ed!important;color:#14663d!important}.eoy-rule-chip.excluded{background:#eef1f4!important;color:#47596b!important}.eoy-rule-chip.system{background:#edf4ff!important;color:#2e65a5!important}.eoy-rule-details{margin-top:10px!important;border-top:1px solid #e6ecf1!important;padding-top:10px!important}.eoy-rule-details>summary{cursor:pointer!important;font-weight:700!important;font-size:11px!important;color:#2d557d!important}.eoy-rule-details .table-wrap{margin-top:10px!important;max-height:320px!important;overflow:auto!important}
@media(max-width:1050px){.payitem-create-grid-v99{grid-template-columns:1fr 1fr!important}.eoy-simple-summary{grid-template-columns:1fr 1fr!important}.eoy-rule-groups{grid-template-columns:1fr!important}}@media(max-width:700px){.payitem-create-grid-v99{grid-template-columns:1fr!important}.payitem-create-footer{flex-direction:column!important;align-items:stretch!important}.payitem-create-footer button{width:100%!important}.eoy-head-actions{align-items:stretch!important;flex-direction:column!important}.eoy-simple-summary{grid-template-columns:1fr!important}.eoy-payment-grid{grid-template-columns:1fr!important}}

/* V100 — EOY spreadsheet review workspace */
.eoy-workflow-bar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;margin-bottom:12px!important;padding:13px 16px!important}.eoy-workflow-bar>div:first-child{display:grid!important;grid-template-columns:auto auto 1fr!important;align-items:center!important;gap:9px!important}.eoy-workflow-bar small{font-size:9px!important;letter-spacing:.08em!important;color:#71839a!important}.eoy-workflow-bar b{font-size:12px!important;color:#18344f!important}.eoy-workflow-bar span{font-size:11px!important;color:#6b7e91!important}.eoy-workflow-actions{display:flex!important;gap:8px!important;align-items:center!important}.eoy-workflow-actions form{margin:0!important}
.eoy-sheet-dialog{width:96vw!important;max-width:96vw!important;height:90vh!important;max-height:90vh!important;padding:0!important;border:0!important;border-radius:14px!important;box-shadow:0 24px 70px rgba(18,45,72,.22)!important;overflow:hidden!important}.eoy-sheet-dialog::backdrop{background:rgba(24,42,61,.38)!important}.eoy-sheet-shell{height:100%!important;display:flex!important;flex-direction:column!important;background:#f6f8fb!important}.eoy-sheet-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;padding:16px 18px!important;background:#fff!important;border-bottom:1px solid #dce5ee!important}.eoy-sheet-head small{font-size:9px!important;font-weight:800!important;letter-spacing:.08em!important;color:#6f8194!important}.eoy-sheet-head h2{margin:3px 0 2px!important;font-size:20px!important}.eoy-sheet-head p{margin:0!important;font-size:11px!important;color:#708296!important}.eoy-sheet-meta{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:8px!important;padding:10px 14px!important;background:#f6f8fb!important}.eoy-sheet-meta>div{background:#fff!important;border:1px solid #dfe6ee!important;border-radius:9px!important;padding:10px 12px!important}.eoy-sheet-meta small,.eoy-sheet-meta b,.eoy-sheet-meta span{display:block!important}.eoy-sheet-meta small{font-size:8px!important;text-transform:uppercase!important;letter-spacing:.07em!important;color:#74879a!important}.eoy-sheet-meta b{font-size:14px!important;margin:3px 0!important;color:#18344f!important}.eoy-sheet-meta span{font-size:9px!important;color:#718397!important;line-height:1.35!important}.eoy-sheet-warning{margin:0 14px 8px!important;display:flex!important;gap:8px!important;flex-wrap:wrap!important}.eoy-sheet-warning span{font-size:10px!important}
.eoy-grid-wrap{margin:0 14px 10px!important;border:1px solid #cfd9e4!important;background:#fff!important;overflow:auto!important;flex:1!important;min-height:250px!important}.eoy-excel-grid{border-collapse:separate!important;border-spacing:0!important;min-width:1500px!important;width:100%!important;font-size:10px!important}.eoy-excel-grid th,.eoy-excel-grid td{border-right:1px solid #d9e1e8!important;border-bottom:1px solid #d9e1e8!important;padding:7px 8px!important;text-align:right!important;white-space:nowrap!important;background:#fff!important}.eoy-excel-grid thead th{position:sticky!important;top:0!important;z-index:5!important;background:#edf2f7!important;text-align:center!important;font-size:9px!important;text-transform:uppercase!important;letter-spacing:.04em!important;color:#435c73!important}.eoy-excel-grid .eoy-grid-item-col{position:sticky!important;left:0!important;z-index:4!important;text-align:left!important;min-width:245px!important;max-width:245px!important}.eoy-excel-grid thead .eoy-grid-item-col{z-index:7!important;background:#e5edf5!important}.eoy-excel-grid .eoy-grid-total{position:sticky!important;right:0!important;z-index:4!important;background:#f5f8fb!important;min-width:110px!important}.eoy-excel-grid thead .eoy-grid-total{z-index:7!important;background:#e5edf5!important}.eoy-grid-item-col small{display:block!important;margin-top:2px!important;font-size:8px!important;color:#7c8ea0!important;font-weight:500!important}.eoy-grid-section td{position:static!important;text-align:left!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.05em!important;font-size:9px!important;padding:6px 8px!important}.eoy-grid-section.included td{background:#eef8f2!important;color:#1c6b43!important}.eoy-grid-section.adjustment td{background:#fff5eb!important;color:#9a5b14!important}.eoy-grid-section.excluded td,.eoy-grid-section.deduction td{background:#f2f4f7!important;color:#657587!important}.eoy-grid-line.excluded td,.eoy-grid-line.deduction td{color:#738395!important;background:#fbfcfd!important}.eoy-grid-line.excluded .eoy-grid-item-col,.eoy-grid-line.deduction .eoy-grid-item-col{background:#fbfcfd!important}.eoy-grid-subtotal td{background:#f0f6fb!important;font-weight:700!important;border-top:2px solid #9eb4c8!important}.eoy-grid-adjustment-total td{background:#fff8ef!important;color:#865317!important}.eoy-grid-final td{background:#eaf7ef!important;color:#155d39!important;font-weight:800!important;border-top:2px solid #5ca77d!important;border-bottom:2px solid #5ca77d!important}.eoy-grid-final .eoy-grid-item-col,.eoy-grid-final .eoy-grid-total{background:#eaf7ef!important}.eoy-sheet-foot{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:14px!important;padding:10px 14px!important;background:#fff!important;border-top:1px solid #dce5ee!important}.eoy-sheet-foot span{font-size:10px!important;color:#65798c!important}.eoy-leavers-panel{margin:14px 0!important}.eoy-leavers-panel .panel-head{align-items:center!important}
@media(max-width:900px){.eoy-sheet-meta{grid-template-columns:1fr 1fr!important}.eoy-workflow-bar{align-items:stretch!important;flex-direction:column!important}.eoy-workflow-bar>div:first-child{grid-template-columns:1fr!important}.eoy-workflow-actions{flex-wrap:wrap!important}}

/* V101 — EOY review: valid inline table disclosure, predictable scrolling, minimal frozen cells */
.eoy-review-detail-row[hidden]{display:none!important}
.eoy-review-detail-row>td{padding:0!important;background:#f7f9fc!important;border-bottom:1px solid #d7e0e9!important}
.eoy-inline-review{padding:14px 16px 16px!important;background:#f7f9fc!important}
.eoy-inline-review-head{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:18px!important;margin-bottom:10px!important}
.eoy-inline-review-head>div:first-child{min-width:200px!important}
.eoy-inline-review-head small{font-size:9px!important;font-weight:800!important;letter-spacing:.06em!important;color:#708296!important}
.eoy-inline-review-head h3{margin:3px 0 2px!important;font-size:16px!important;color:#18344f!important}
.eoy-inline-review-head p{margin:0!important;font-size:10px!important;color:#728397!important}
.eoy-inline-review-facts{display:grid!important;grid-template-columns:repeat(4,minmax(120px,1fr))!important;gap:8px!important;flex:1!important;max-width:900px!important}
.eoy-inline-review-facts span{display:block!important;background:#fff!important;border:1px solid #dfe6ee!important;border-radius:8px!important;padding:8px 10px!important}
.eoy-inline-review-facts small,.eoy-inline-review-facts b{display:block!important}
.eoy-inline-review-facts small{font-size:8px!important;text-transform:uppercase!important;letter-spacing:.05em!important;color:#7a8b9d!important}
.eoy-inline-review-facts b{font-size:11px!important;margin-top:2px!important;color:#18344f!important}
.eoy-inline-warning{margin:0 0 10px!important;display:flex!important;gap:8px!important;flex-wrap:wrap!important}
.eoy-inline-warning span{font-size:10px!important}
.eoy-grid-wrap-inline{margin:0!important;flex:none!important;min-height:0!important;max-height:none!important;overflow-x:auto!important;overflow-y:visible!important;border-radius:8px!important}
.eoy-grid-wrap-inline .eoy-excel-grid{min-width:1450px!important}
/* Do not vertically freeze headers/rows. Only keep row labels and total visible while horizontally reviewing. */
.eoy-grid-wrap-inline .eoy-excel-grid thead th{position:static!important;top:auto!important;z-index:auto!important}
.eoy-grid-wrap-inline .eoy-excel-grid .eoy-grid-item-col{position:sticky!important;left:0!important;z-index:2!important;box-shadow:2px 0 0 #d9e1e8!important}
.eoy-grid-wrap-inline .eoy-excel-grid thead .eoy-grid-item-col{z-index:3!important;background:#e5edf5!important}
.eoy-grid-wrap-inline .eoy-excel-grid .eoy-grid-total{position:sticky!important;right:0!important;z-index:2!important;box-shadow:-2px 0 0 #d9e1e8!important}
.eoy-grid-wrap-inline .eoy-excel-grid thead .eoy-grid-total{z-index:3!important;background:#e5edf5!important}
.eoy-grid-wrap-inline .eoy-grid-section td{position:static!important;box-shadow:none!important}
.eoy-inline-review-note{margin-top:9px!important;font-size:10px!important;color:#65798c!important;line-height:1.45!important}
.eoy-review-toggle{min-width:125px!important}
@media(max-width:1000px){.eoy-inline-review-head{display:block!important}.eoy-inline-review-facts{margin-top:10px!important;grid-template-columns:1fr 1fr!important;max-width:none!important}}

/* V102 — EOY employee review cards */
.eoy-main-panel-v102{margin:14px 0!important}
.eoy-main-panel-v102>.panel-head{padding:0 0 10px!important}
.eoy-employee-stack{display:grid!important;gap:18px!important}
.eoy-employee-card{position:relative!important;background:#fff!important;border:1px solid #dce5ee!important;border-radius:13px!important;box-shadow:0 4px 16px rgba(31,55,78,.055)!important;overflow:hidden!important}
.eoy-employee-card .eoy-employee-accent{position:absolute!important;left:0!important;top:0!important;bottom:0!important;width:4px!important;background:#5d8fc7!important}
.eoy-employee-card.needs-review .eoy-employee-accent{background:#d6942e!important}
.eoy-employee-card.is-reviewed .eoy-employee-accent{background:#3e9a68!important}
.eoy-employee-summary{display:grid!important;grid-template-columns:minmax(180px,1.3fr) minmax(150px,1fr) repeat(4,minmax(110px,.8fr)) minmax(110px,.7fr) auto!important;gap:10px!important;align-items:center!important;padding:13px 14px 13px 18px!important;background:#fff!important}
.eoy-employee-summary>div:not(.eoy-employee-controls){min-width:0!important}
.eoy-employee-summary small{display:block!important;font-size:8px!important;letter-spacing:.055em!important;color:#75879a!important;font-weight:800!important;margin-bottom:3px!important}
.eoy-employee-summary b{display:block!important;font-size:11px!important;color:#18344f!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.eoy-employee-summary span:not(.badge){display:block!important;font-size:9px!important;color:#718397!important;margin-top:2px!important}
.eoy-employee-name b{font-size:12px!important}
.eoy-employee-controls{justify-self:end!important}.eoy-employee-controls .button{white-space:nowrap!important}
.eoy-review-detail{border-top:1px solid #dce5ee!important;background:#f6f8fb!important}
.eoy-review-detail[hidden]{display:none!important}
.eoy-review-detail .eoy-inline-review{padding:14px 14px 15px!important;background:#f6f8fb!important}
.eoy-review-footer-v102{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-top:10px!important;padding-top:10px!important;border-top:1px solid #dce5ee!important}
.eoy-review-footer-v102 .eoy-inline-review-note{margin:0!important;max-width:900px!important}
.eoy-reviewed-stamp{display:flex!important;align-items:center!important;gap:8px!important;padding:7px 10px!important;border:1px solid #bee2cd!important;background:#eff9f3!important;border-radius:8px!important;color:#246e48!important;white-space:nowrap!important}
.eoy-reviewed-stamp>span{font-size:16px!important;font-weight:900!important}.eoy-reviewed-stamp b,.eoy-reviewed-stamp small{display:block!important}.eoy-reviewed-stamp b{font-size:10px!important}.eoy-reviewed-stamp small{font-size:8px!important;color:#5f8a72!important}
.eoy-review-actions button[disabled]{opacity:.48!important;cursor:not-allowed!important}
.eoy-process-copy{min-width:0!important}
@media(max-width:1350px){.eoy-employee-summary{grid-template-columns:1.4fr 1fr 1fr 1fr 1fr 1fr!important}.eoy-employee-state,.eoy-employee-controls{grid-column:auto!important}.eoy-employee-controls{justify-self:start!important}}
@media(max-width:900px){.eoy-employee-summary{grid-template-columns:1fr 1fr!important}.eoy-employee-controls{justify-self:stretch!important}.eoy-employee-controls .button{width:100%!important}.eoy-review-footer-v102{align-items:stretch!important;flex-direction:column!important}.eoy-individual-review-form .button{width:100%!important}}

/* V102 — appearance system: System / Light / Dark */
:root{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"] body,
html[data-theme="dark"] .ml-main,
html[data-theme="dark"] .ml-page-shell{background:#0e1621!important;color:#e7edf4!important}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .eoy-employee-card,
html[data-theme="dark"] .eoy-employee-summary,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .app-confirm-modal,
html[data-theme="dark"] .switch-modal,
html[data-theme="dark"] .ml-popover,
html[data-theme="dark"] .payitem-edit-drawer{background:#151f2b!important;color:#e7edf4!important;border-color:#2b3a4a!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,
html[data-theme="dark"] b,html[data-theme="dark"] strong,html[data-theme="dark"] label{color:#edf3f9!important}
html[data-theme="dark"] p,html[data-theme="dark"] small,html[data-theme="dark"] .muted,html[data-theme="dark"] .eyebrow{color:#9fb0c1!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0f1823!important;color:#edf3f9!important;border-color:#344659!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#718295!important}
html[data-theme="dark"] .table-wrap,html[data-theme="dark"] table,html[data-theme="dark"] th,html[data-theme="dark"] td{border-color:#2c3c4d!important}
html[data-theme="dark"] th{background:#182432!important;color:#b8c6d4!important}
html[data-theme="dark"] td{background:#141e29!important;color:#dbe4ed!important}
html[data-theme="dark"] .eoy-review-detail,html[data-theme="dark"] .eoy-review-detail .eoy-inline-review{background:#101923!important;border-color:#2b3a4a!important}
html[data-theme="dark"] .eoy-inline-review-facts span{background:#15212e!important;border-color:#314255!important}
html[data-theme="dark"] .eoy-inline-review-facts b,html[data-theme="dark"] .eoy-employee-summary b{color:#edf3f9!important}
html[data-theme="dark"] .eoy-excel-grid th,html[data-theme="dark"] .eoy-excel-grid td{background:#121c27!important;border-color:#2f4051!important;color:#dce6ef!important}
html[data-theme="dark"] .eoy-excel-grid thead th,html[data-theme="dark"] .eoy-grid-wrap-inline .eoy-excel-grid thead .eoy-grid-item-col,html[data-theme="dark"] .eoy-grid-wrap-inline .eoy-excel-grid thead .eoy-grid-total{background:#1b2a39!important;color:#c8d5e2!important}
html[data-theme="dark"] .eoy-grid-section.included td{background:#173126!important;color:#87d8aa!important}
html[data-theme="dark"] .eoy-grid-section.adjustment td{background:#352719!important;color:#efbd77!important}
html[data-theme="dark"] .eoy-grid-section.excluded td,html[data-theme="dark"] .eoy-grid-section.deduction td{background:#202a35!important;color:#a6b4c2!important}
html[data-theme="dark"] .eoy-grid-line.excluded td,html[data-theme="dark"] .eoy-grid-line.deduction td,html[data-theme="dark"] .eoy-grid-line.excluded .eoy-grid-item-col,html[data-theme="dark"] .eoy-grid-line.deduction .eoy-grid-item-col{background:#151f2a!important;color:#9eacba!important}
html[data-theme="dark"] .eoy-grid-subtotal td{background:#182a39!important}
html[data-theme="dark"] .eoy-grid-adjustment-total td{background:#302519!important;color:#efbd77!important}
html[data-theme="dark"] .eoy-grid-final td,html[data-theme="dark"] .eoy-grid-final .eoy-grid-item-col,html[data-theme="dark"] .eoy-grid-final .eoy-grid-total{background:#173126!important;color:#8be0b0!important}
html[data-theme="dark"] .notice{background:#182431!important;border-color:#344659!important;color:#c8d5e2!important}
html[data-theme="dark"] .notice.warning{background:#332719!important;border-color:#6b4d26!important;color:#efc27f!important}
html[data-theme="dark"] .notice.success{background:#173126!important;border-color:#2d6847!important;color:#9de2b8!important}
html[data-theme="dark"] .flash{background:#162231!important;color:#e9f0f7!important;border-color:#33465b!important}
html[data-theme="dark"] .ml-workspace-tabs-shell{background:#111c28!important;border-color:#2d3c4d!important}
html[data-theme="dark"] .ml-workspace-tab{background:#182431!important;border-color:#34475a!important;color:#c9d6e2!important}
html[data-theme="dark"] .ml-workspace-tab{background:#182431!important;border-color:#34475a!important;color:#c9d6e2!important}
html[data-theme="dark"] .ml-settings-grid .panel,html[data-theme="dark"] .ml-email-settings,html[data-theme="dark"] .ml-users-settings{background:#151f2b!important}
.ml-appearance-options{display:flex!important;gap:8px!important;flex-wrap:wrap!important;margin-top:10px!important}.ml-theme-choice{display:flex!important;align-items:center!important;gap:7px!important;padding:9px 12px!important;border:1px solid #d6e0ea!important;border-radius:9px!important;background:#fff!important;cursor:pointer!important}.ml-theme-choice input{margin:0!important}.ml-theme-choice span{font-size:11px!important;font-weight:700!important}.ml-theme-choice:has(input:checked){border-color:#2f6fed!important;box-shadow:0 0 0 2px rgba(47,111,237,.10)!important}.ml-theme-preview-note{margin-top:8px!important;font-size:10px!important;color:#718397!important}html[data-theme="dark"] .ml-theme-choice{background:#101923!important;border-color:#344659!important}html[data-theme="dark"] .ml-theme-choice:has(input:checked){border-color:#6b9cff!important}

/* V103 — dark-mode contrast pass + EOY linked inputs */
html[data-theme="dark"] .ml-login-card{background:#151f2b!important;border-color:#314255!important;box-shadow:0 24px 70px rgba(0,0,0,.34)!important}
html[data-theme="dark"] .ml-login-brand{border-bottom-color:#2c3b4b!important}
html[data-theme="dark"] .ml-login-brand strong,html[data-theme="dark"] .ml-login-card h1{color:#f2f6fa!important}
html[data-theme="dark"] .ml-login-card>p,html[data-theme="dark"] .ml-login-brand span,html[data-theme="dark"] .ml-login-version{color:#93a6ba!important}
html[data-theme="dark"] .ml-demo{background:#101923!important;border:1px solid #2c3c4e!important;color:#b8c7d6!important}
html[data-theme="dark"] .ml-demo b{color:#edf3f9!important}

html[data-theme="dark"] .payroll-command-bar .command-group{background:#151f2b!important;border-color:#2c3c4e!important}
html[data-theme="dark"] .payroll-command-bar .command-group-label{color:#8fa3b8!important}
html[data-theme="dark"] .command-action{background:#1b2734!important;border-color:#314255!important;color:#dce6ef!important}
html[data-theme="dark"] .command-action:hover{background:#223141!important}
html[data-theme="dark"] .command-action.strong{background:#1c3040!important;border-color:#31516b!important}
html[data-theme="dark"] .command-action>span{color:#8db5db!important}
html[data-theme="dark"] .command-action b{color:#e9f0f7!important}
html[data-theme="dark"] .command-action small{color:#91a4b7!important}
html[data-theme="dark"] .command-action.primary,html[data-theme="dark"] .command-action.primary:hover{background:#2f6fed!important;border-color:#2f6fed!important}

html[data-theme="dark"] .v57-summary-cards .status-total{background:#151f2b!important;border-color:#2e3e50!important;box-shadow:none!important}
html[data-theme="dark"] .v57-summary-cards .status-total.net{background:#153126!important}
html[data-theme="dark"] .v57-summary-cards .status-total small{color:#91a5b8!important}
html[data-theme="dark"] .v57-summary-cards .status-total b{color:#edf3f9!important}
html[data-theme="dark"] .v57-summary-cards .status-total.net b{color:#8ee0b0!important}
html[data-theme="dark"] .v57-summary-cards .summary-icon{background:#1e2d3e!important;color:#8bb5dc!important}
html[data-theme="dark"] .v57-summary-cards .status-total.net .summary-icon{background:#1b402f!important;color:#8ee0b0!important}

html[data-theme="dark"] .payroll-grid-panel{background:#111b27!important;border-color:#2d3d4e!important}
html[data-theme="dark"] .v60-payroll-table tbody td,
html[data-theme="dark"] .v60-payroll-table tbody td.input-summary-col,
html[data-theme="dark"] .v60-payroll-table tbody td.editable-col,
html[data-theme="dark"] .v60-payroll-table tbody td.calculated-col{background:#141e29!important;color:#dbe5ee!important;border-color:#2b3a4a!important}
html[data-theme="dark"] .v60-payroll-table .sticky-employee,
html[data-theme="dark"] .v60-payroll-table .sticky-actions{background:#16222f!important;border-color:#334457!important}
html[data-theme="dark"] .v60-payroll-table thead .sticky-employee,
html[data-theme="dark"] .v60-payroll-table thead .sticky-actions,
html[data-theme="dark"] .v60-payroll-table thead tr:nth-child(2) th,
html[data-theme="dark"] .v60-payroll-table thead tr:nth-child(2) th.input-summary-col,
html[data-theme="dark"] .v60-payroll-table thead tr:nth-child(2) th.editable-col{background:#1b2a39!important;color:#c4d2df!important;border-color:#344659!important}
html[data-theme="dark"] .v60-payroll-table .input-group-head{background:#183149!important;color:#a9cbea!important;border-color:#33536e!important}
html[data-theme="dark"] .v60-payroll-table .calculated-group-head{background:#202d3a!important;color:#bac8d6!important;border-color:#3a4959!important}
html[data-theme="dark"] .v60-payroll-table tbody td.net-pay-cell{background:#173126!important;color:#91dfb3!important}
html[data-theme="dark"] .v60-payroll-table tbody .employee-row:hover td,
html[data-theme="dark"] .v60-payroll-table tbody .employee-row:hover .sticky-employee,
html[data-theme="dark"] .v60-payroll-table tbody .employee-row:hover .sticky-actions{background:#1b2b3a!important}
html[data-theme="dark"] .v60-payroll-table tbody .employee-row:hover td.net-pay-cell{background:#1d3d2e!important}
html[data-theme="dark"] .v60-payroll-table tbody .employee-row.not-paid-row td,
html[data-theme="dark"] .v60-payroll-table tbody .employee-row.not-paid-row .sticky-employee,
html[data-theme="dark"] .v60-payroll-table tbody .employee-row.not-paid-row .sticky-actions{background:#342326!important;color:#e7c4c8!important}

html[data-theme="dark"] .input-matrix-table th{background:#1b2a39!important;color:#b8c9d8!important;border-color:#344659!important}
html[data-theme="dark"] .input-matrix-table td,html[data-theme="dark"] .input-matrix-table .matrix-employee-cell{background:#141e29!important;color:#dde6ef!important;border-color:#2d3d4e!important}
html[data-theme="dark"] .input-matrix-table .matrix-employee-head,html[data-theme="dark"] .input-matrix-table .matrix-employee-foot{background:#1b2a39!important;color:#c9d5e0!important}
html[data-theme="dark"] .input-matrix-table .matrix-row-total,html[data-theme="dark"] .input-matrix-table .matrix-total-foot{background:#182634!important;color:#edf3f9!important}
html[data-theme="dark"] .matrix-input{background:#101923!important;color:#eef4fa!important;border-color:#344659!important}

html[data-theme="dark"] .admin-hub-head h1,html[data-theme="dark"] .admin-section-title h2,html[data-theme="dark"] .admin-card-title h3{color:#edf3f9!important}
html[data-theme="dark"] .admin-hub-head p,html[data-theme="dark"] .admin-section-title p,html[data-theme="dark"] .admin-card-body p{color:#9eb0c2!important}
html[data-theme="dark"] .admin-head-stat,html[data-theme="dark"] .admin-search-wrap,html[data-theme="dark"] .admin-setting-card{background:#151f2b!important;border-color:#2f4051!important;box-shadow:none!important}
html[data-theme="dark"] .admin-head-stat strong{color:#eef4fa!important}
html[data-theme="dark"] .admin-head-stat span,html[data-theme="dark"] .admin-card-meta span{color:#9eb0c2!important}
html[data-theme="dark"] .admin-card-icon{background:#1c2a38!important;color:#9fc2e4!important}
html[data-theme="dark"] .admin-card-meta span{background:#101923!important}
html[data-theme="dark"] .admin-setting-card:hover{background:#1a2734!important;border-color:#49647e!important}
html[data-theme="dark"] .admin-context-note{background:#14202c!important;border-color:#304254!important;color:#aebdcc!important}
html[data-theme="dark"] .admin-context-note.workspace-warning{background:#302718!important;border-color:#66502b!important;color:#e5c78e!important}

html[data-theme="dark"] .statusbar,html[data-theme="dark"] .filters{background:#151f2b!important;border-color:#304154!important}
html[data-theme="dark"] .client-card,html[data-theme="dark"] .public-card,html[data-theme="dark"] .metric{background:#151f2b!important;border-color:#304154!important;color:#e7edf4!important}
html[data-theme="dark"] .demo{background:#101923!important;color:#aebdcc!important}
html[data-theme="dark"] .summary span{background:#101923!important;color:#9eb0c2!important}
html[data-theme="dark"] .summary b{color:#edf3f9!important}

.recurring-badge.eoy-linked{background:#e6f3ff!important;color:#245e93!important;border:1px solid #bad7ef!important}
.recurring-badge.eoy-linked.warning{background:#fff5df!important;color:#8a5a10!important;border-color:#edd29c!important}
html[data-theme="dark"] .recurring-badge.eoy-linked{background:#17334a!important;color:#9bc8eb!important;border-color:#315978!important}
html[data-theme="dark"] .recurring-badge.eoy-linked.warning{background:#3a2d18!important;color:#efc77c!important;border-color:#6d5429!important}
html[data-theme="dark"] .eoy-input-link-notice{background:#16283a!important;border-color:#31516b!important;color:#b9d3ea!important}

/* =========================================================
   V104 · Full appearance-system audit
   Dark mode is a first-class palette, not a light UI on a dark canvas.
   Light mode remains the product baseline; every rule below is dark-only.
   ========================================================= */
html[data-theme="dark"]{
  --ml-bg:#0b141f;
  --ml-card:#111d29;
  --ml-text:#eef4f9;
  --ml-muted:#9cafc1;
  --ml-border:#2b3d4f;
  --v104-bg:#0b141f;
  --v104-surface:#111d29;
  --v104-surface-2:#162432;
  --v104-surface-3:#1b2b3b;
  --v104-input:#0d1823;
  --v104-border:#2b3d4f;
  --v104-border-strong:#3b5269;
  --v104-text:#edf4fa;
  --v104-text-2:#c5d2de;
  --v104-muted:#91a5b9;
  --v104-disabled:#64778a;
  --v104-blue:#6fa4ff;
  --v104-green:#82ddb0;
  --v104-amber:#efc47f;
  --v104-red:#efa0a8;
  scrollbar-color:#40556a #0b141f;
}
html[data-theme="dark"],html[data-theme="dark"] body{background:var(--v104-bg)!important;color:var(--v104-text)!important}
html[data-theme="dark"] body.ml-body,html[data-theme="dark"] .ml-main,html[data-theme="dark"] .ml-page-shell,
html[data-theme="dark"] .public-wrap{background:var(--v104-bg)!important;color:var(--v104-text)!important}
html[data-theme="dark"] body.ml-body::-webkit-scrollbar-track,html[data-theme="dark"] *::-webkit-scrollbar-track{background:#0b141f!important}
html[data-theme="dark"] body.ml-body::-webkit-scrollbar-thumb,html[data-theme="dark"] *::-webkit-scrollbar-thumb{background:#40556a!important;border-color:#0b141f!important}

/* Core type and links */
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] h5,
html[data-theme="dark"] .page-head,html[data-theme="dark"] .client-title,html[data-theme="dark"] .row strong,
html[data-theme="dark"] label,html[data-theme="dark"] b,html[data-theme="dark"] strong{color:var(--v104-text)!important}
html[data-theme="dark"] p,html[data-theme="dark"] small,html[data-theme="dark"] .muted,html[data-theme="dark"] .note,
html[data-theme="dark"] .helper,html[data-theme="dark"] .eyebrow{color:var(--v104-muted)!important}
html[data-theme="dark"] a:not(.btn):not(.button):not(.command-action):not(.ml-nav a){color:#83b2ff!important}
html[data-theme="dark"] hr{border-color:var(--v104-border)!important}

/* Primary surfaces used throughout old + new screens */
html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .client-card,
html[data-theme="dark"] .public-card,html[data-theme="dark"] .metric,html[data-theme="dark"] .statusbar,
html[data-theme="dark"] .filters,html[data-theme="dark"] .sub-card,html[data-theme="dark"] .review-card,
html[data-theme="dark"] .statutory-audit-section,html[data-theme="dark"] .payroll-calc-breakdown,
html[data-theme="dark"] .employee-review-nav,html[data-theme="dark"] .payroll-availability-summary,
html[data-theme="dark"] .declaration-dictionary-card,html[data-theme="dark"] .employment-lifecycle-block,
html[data-theme="dark"] .eoy-employee-card,html[data-theme="dark"] .eoy-employee-summary,
html[data-theme="dark"] .base-builder-card,html[data-theme="dark"] .v35-base-card,html[data-theme="dark"] .v36-base-card,
html[data-theme="dark"] .stat-section,html[data-theme="dark"] .v37-create-base-bar,
html[data-theme="dark"] .v37-test-workbench,html[data-theme="dark"] .v37-trace-card{
  background:var(--v104-surface)!important;border-color:var(--v104-border)!important;color:var(--v104-text)!important;box-shadow:none!important;
}
html[data-theme="dark"] .panel:hover,html[data-theme="dark"] .client-card:hover{border-color:#385069!important}

/* Forms: make native controls consistently dark */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="dark"] select,html[data-theme="dark"] textarea,
html[data-theme="dark"] .search-box,html[data-theme="dark"] .master-search,html[data-theme="dark"] .formula-input,
html[data-theme="dark"] .matrix-input,html[data-theme="dark"] .base-advanced-editor,
html[data-theme="dark"] .bulk-pay-drawer-form select,html[data-theme="dark"] .bulk-pay-drawer-form input[type="number"]{
  background:var(--v104-input)!important;color:var(--v104-text)!important;border-color:var(--v104-border-strong)!important;box-shadow:none!important;
}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#73869a!important;opacity:1!important}
html[data-theme="dark"] select option{background:#101c28!important;color:#eaf1f7!important}
html[data-theme="dark"] input[type="checkbox"],html[data-theme="dark"] input[type="radio"]{accent-color:#4f8cff}
html[data-theme="dark"] input:disabled,html[data-theme="dark"] select:disabled,html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] .readonly-field,html[data-theme="dark"] .field-not-used{background:#14202b!important;color:#8396a8!important;border-color:#293a4b!important;opacity:1!important}
html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(.85) sepia(.08) saturate(.7)!important}

/* Buttons and small controls */
html[data-theme="dark"] .secondary,html[data-theme="dark"] .btn.secondary,html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .back-link,html[data-theme="dark"] .icon-back,html[data-theme="dark"] .employee-nav-btn,
html[data-theme="dark"] .smallbtn.secondary,html[data-theme="dark"] .payslip-actions .secondary,
html[data-theme="dark"] .public-downloads .btn.secondary,html[data-theme="dark"] .ml-sidebar-collapse{
  background:#1b2a39!important;color:#dce7f0!important;border:1px solid #385069!important;box-shadow:none!important;
}
html[data-theme="dark"] .secondary:hover,html[data-theme="dark"] .btn.secondary:hover,html[data-theme="dark"] .button.secondary:hover,
html[data-theme="dark"] .back-link:hover,html[data-theme="dark"] .icon-back:hover,html[data-theme="dark"] .employee-nav-btn:hover{background:#24374a!important;color:#fff!important}
html[data-theme="dark"] button:disabled,html[data-theme="dark"] .btn:disabled,html[data-theme="dark"] .button:disabled{opacity:.52!important;cursor:not-allowed!important}
html[data-theme="dark"] .tiny-info-btn,html[data-theme="dark"] .field-info-dot,html[data-theme="dark"] .decl-info-btn,
html[data-theme="dark"] .mini-info{background:#1b3044!important;color:#9bc7ef!important;border-color:#365875!important}

/* Tabs / segmented controls / view toggles */
html[data-theme="dark"] .client-workspace-tabs,html[data-theme="dark"] .client-tabs,html[data-theme="dark"] .payroll-filter-tabs,
html[data-theme="dark"] .view-toggle,html[data-theme="dark"] .stat-workspace-switch,html[data-theme="dark"] .reference-browser-tabs{
  background:#13202c!important;border-color:var(--v104-border)!important;
}
html[data-theme="dark"] .client-workspace-tabs a,html[data-theme="dark"] .client-tabs a,html[data-theme="dark"] .payroll-filter-tabs button,
html[data-theme="dark"] .stat-workspace-switch a,html[data-theme="dark"] .reference-browser-tabs button{color:#9fb2c4!important;background:transparent!important;border-color:transparent!important}
html[data-theme="dark"] .client-workspace-tabs a.active,html[data-theme="dark"] .client-tabs a.active,
html[data-theme="dark"] .payroll-filter-tabs button.active,html[data-theme="dark"] .stat-workspace-switch a.active,
html[data-theme="dark"] .reference-browser-tabs button.active{background:#203246!important;color:#f1f6fb!important;border-color:#405974!important}

/* Sidebar / shell */
html[data-theme="dark"] .ml-sidebar{background:#0d1b2a!important;border-right-color:#26394c!important}
html[data-theme="dark"] .ml-context-card{border-color:#2a4056!important}
html[data-theme="dark"] .ml-workspace-identity,html[data-theme="dark"] .ml-client-select{background:#13263a!important;border-color:#304a64!important;color:#edf4fa!important}
html[data-theme="dark"] .ml-context-label,html[data-theme="dark"] .ml-nav-label{color:#738ba3!important}
html[data-theme="dark"] .ml-nav a{color:#bdcada!important}
html[data-theme="dark"] .ml-nav a:hover{background:#172c40!important;color:#fff!important}
html[data-theme="dark"] .ml-nav a.active{background:linear-gradient(90deg,rgba(34,197,94,.18),rgba(20,184,166,.07))!important;color:#fff!important}
html[data-theme="dark"] .ml-version{color:#50677f!important}
html[data-theme="dark"] .ml-product-wordmark strong{color:#f3f7fb!important}
html[data-theme="dark"] .ml-product-wordmark span{color:#7f94a9!important}
html[data-theme="dark"] .ml-workspace-logo,html[data-theme="dark"] .ml-workspace-fallback{background:#f8fafc!important;color:#102238!important}

/* Generic tables + list screens */
html[data-theme="dark"] table{color:var(--v104-text-2)!important;background:transparent!important}
html[data-theme="dark"] table thead th,html[data-theme="dark"] .payroll-table-wrap thead th,
html[data-theme="dark"] .import-table thead th,html[data-theme="dark"] .master-table th,
html[data-theme="dark"] .rules-list thead th,html[data-theme="dark"] .eoy-table thead th,
html[data-theme="dark"] .eoy-classification-table thead th,html[data-theme="dark"] .public-review-table th{
  background:#1a2a39!important;color:#a9bbcb!important;border-color:#34495d!important;
}
html[data-theme="dark"] table tbody td,html[data-theme="dark"] .payroll-table-wrap td,
html[data-theme="dark"] .rules-list td{background:#111d29!important;color:#dce6ee!important;border-color:#293b4d!important}
html[data-theme="dark"] table tbody tr:hover td,html[data-theme="dark"] .rules-list tr:hover td{background:#172635!important}
html[data-theme="dark"] td small{color:#879bad!important}
html[data-theme="dark"] .wide,html[data-theme="dark"] .table-wrap{background:transparent!important}

/* Client list + card/list view */
html[data-theme="dark"] .client-grid,html[data-theme="dark"] .client-list-wrap{background:transparent!important}
html[data-theme="dark"] .client-card small,html[data-theme="dark"] .client-bottom{color:#91a5b8!important}
html[data-theme="dark"] .client-bottom{border-color:#2a3b4d!important}
html[data-theme="dark"] .column-menu,html[data-theme="dark"] .mini-column-menu,
html[data-theme="dark"] .payroll-action-popover,html[data-theme="dark"] .row-action-menu>div,
html[data-theme="dark"] #mlPopoverLayer>.ml-menu-floating{background:#152230!important;border-color:#34495d!important;box-shadow:0 18px 45px rgba(0,0,0,.34)!important}
html[data-theme="dark"] .column-option,html[data-theme="dark"] .mini-column-menu button,
html[data-theme="dark"] .row-action-menu summary{background:#152230!important;color:#dce6ef!important;border-color:#34495d!important}
html[data-theme="dark"] .column-option:hover,html[data-theme="dark"] .mini-column-menu button:hover,
html[data-theme="dark"] .row-action-menu a:hover,html[data-theme="dark"] .row-action-menu button:hover{background:#203246!important;color:#fff!important}

/* Payroll workbench legacy + current */
html[data-theme="dark"] .payroll-commandbar,html[data-theme="dark"] .payroll-command-bar .command-group,
html[data-theme="dark"] .payroll-summary>div,html[data-theme="dark"] .payroll-health-strip,
html[data-theme="dark"] .review-metric,html[data-theme="dark"] .review-card,
html[data-theme="dark"] .payroll-finalised-bar,html[data-theme="dark"] .finalised-status-bar{
  background:#111d29!important;border-color:#2e4256!important;color:#e8f0f7!important;box-shadow:none!important;
}
html[data-theme="dark"] .payroll-summary .summary-net,html[data-theme="dark"] .review-metric.net{background:#143326!important;color:#92e1b5!important}
html[data-theme="dark"] .payroll-health-strip.ready{background:#153126!important;border-color:#2d6749!important}
html[data-theme="dark"] .payroll-health-strip.has-issues{background:#332719!important;border-color:#6b4f29!important;color:#e9c487!important}
html[data-theme="dark"] .payroll-status-pill,html[data-theme="dark"] .status-pill.draft{background:#3a301d!important;color:#f1ce85!important;border-color:#65522f!important}
html[data-theme="dark"] .payroll-status-pill.finalised,html[data-theme="dark"] .payroll-status-pill.approved,
html[data-theme="dark"] .status-pill.finalised,html[data-theme="dark"] .status-pill.approved{background:#173126!important;color:#8fe0b2!important;border-color:#2f674a!important}
html[data-theme="dark"] .payroll-period-picker,html[data-theme="dark"] .payroll-period-picker input{background:#101b27!important;color:#edf4fa!important;border-color:#344a60!important}
html[data-theme="dark"] .editable-key,html[data-theme="dark"] .calculated-key,html[data-theme="dark"] .locked-default-note{background:#182634!important;color:#afbfcd!important;border-color:#32475b!important}
html[data-theme="dark"] .payroll-workbench-table thead th,html[data-theme="dark"] .payroll-workbench-table thead .sticky-employee,
html[data-theme="dark"] .payroll-workbench-table thead .sticky-actions{background:#1b2b3b!important;color:#bac9d6!important;border-color:#34495d!important}
html[data-theme="dark"] .payroll-workbench-table .editable-cell,html[data-theme="dark"] .payroll-workbench-table .calculated-col,
html[data-theme="dark"] .payroll-workbench-table .sticky-employee,html[data-theme="dark"] .payroll-workbench-table .sticky-actions{background:#121e2a!important;color:#dbe5ed!important;border-color:#2b3d4f!important}
html[data-theme="dark"] .payroll-workbench-table .sticky-net{background:#173126!important;color:#91dfb3!important}
html[data-theme="dark"] .payroll-workbench-table tbody tr:hover td:not(.sticky-net){background:#182838!important}
html[data-theme="dark"] .employee-actions-trigger,html[data-theme="dark"] .v60-payroll-table .employee-actions-trigger{background:#1b2a39!important;color:#dce7ef!important;border-color:#3a5269!important}
html[data-theme="dark"] .employee-actions-trigger:hover,html[data-theme="dark"] .v60-payroll-table .employee-actions-trigger:hover{background:#26394c!important}

/* Master / monthly input spreadsheet workspaces */
html[data-theme="dark"] .master-toolbar,html[data-theme="dark"] .master-grid-wrap,html[data-theme="dark"] .master-grid-footer,
html[data-theme="dark"] .master-search{background:#111d29!important;border-color:#2d4053!important;color:#dce7ef!important}
html[data-theme="dark"] .master-grid th{background:#1a2a39!important;color:#afc0cf!important;border-color:#34495d!important}
html[data-theme="dark"] .master-grid td,html[data-theme="dark"] .master-grid .readonly-cell{background:#111d29!important;color:#dbe5ed!important;border-color:#2b3d4f!important}
html[data-theme="dark"] .master-grid .row-no{background:#182634!important;color:#91a6b9!important}
html[data-theme="dark"] .master-grid .cell-selected{background:#193452!important;box-shadow:inset 0 0 0 1px #5c93ce!important}
html[data-theme="dark"] .master-grid .cell-changed{background:#332c1d!important;color:#efcf8a!important}
html[data-theme="dark"] .master-grid .row-changed .row-no{background:#3b311c!important;color:#efd18d!important}
html[data-theme="dark"] .master-grid tr:hover td:not(.cell-selected):not(.cell-changed){background:#172635!important}
html[data-theme="dark"] .master-safe-pill{background:#173126!important;color:#8cdfad!important}
html[data-theme="dark"] .master-review-breakdown>div{background:#152331!important;border-color:#2d4256!important}
html[data-theme="dark"] .input-matrix-table .matrix-employee-cell,html[data-theme="dark"] .input-matrix-table td{background:#101c28!important;color:#dce6ef!important}
html[data-theme="dark"] .input-matrix-table .matrix-employee-head,html[data-theme="dark"] .input-matrix-table .matrix-employee-foot,
html[data-theme="dark"] .matrix-employee-foot,html[data-theme="dark"] .matrix-total-foot{background:#1b2b3a!important;color:#c9d6e2!important}

/* Employee screens */
html[data-theme="dark"] .employee-summary-cards>div,html[data-theme="dark"] .employee-history-grid>div,
html[data-theme="dark"] .current-tax-strip span,html[data-theme="dark"] .leave-summary-card,
html[data-theme="dark"] .employment-status-card,html[data-theme="dark"] .employment-status-box,
html[data-theme="dark"] .current-effective,html[data-theme="dark"] .feature-switch,
html[data-theme="dark"] .employee-payroll-bank-block{background:#152230!important;border-color:#2d4155!important;color:#dce6ef!important}
html[data-theme="dark"] .employee-section-head>span,html[data-theme="dark"] .input-icon{background:#1a3046!important;color:#9cc5eb!important}
html[data-theme="dark"] .employee-compact-back{background:#192938!important;color:#dce7ef!important;border-color:#354d63!important}
html[data-theme="dark"] .employee-compact-back:hover{background:#24394d!important}

/* Leave rules + leave policy */
html[data-theme="dark"] .leave-rule-card,html[data-theme="dark"] .leave-policy-card,
html[data-theme="dark"] .leave-rule-item,html[data-theme="dark"] .leave-settings-card,
html[data-theme="dark"] .leave-summary-card{background:#111d29!important;border-color:#2d4154!important;color:#e7eef5!important}
html[data-theme="dark"] .leave-rule-card input,html[data-theme="dark"] .leave-rule-card select,
html[data-theme="dark"] .leave-policy-card input,html[data-theme="dark"] .leave-policy-card select{background:#0d1823!important;color:#edf4fa!important;border-color:#344b61!important}
html[data-theme="dark"] .leave-quick-types a{background:#172635!important;color:#b8c8d6!important;border-color:#33495e!important}
html[data-theme="dark"] .leave-quick-types a.active{background:#173126!important;color:#8fdeb1!important;border-color:#2f684a!important}

/* Overtime rule editors */
html[data-theme="dark"] .overtime-rule-card,html[data-theme="dark"] .overtime-rate-card,
html[data-theme="dark"] .overtime-rule-row,html[data-theme="dark"] .ot-rate-card,
html[data-theme="dark"] .rule-paid-by{background:#111d29!important;border-color:#2d4154!important;color:#e7eef5!important}
html[data-theme="dark"] .overtime-rule-card input,html[data-theme="dark"] .overtime-rate-card input,
html[data-theme="dark"] .ot-rate-card input{background:#0d1823!important;color:#edf4fa!important;border-color:#344b61!important}
html[data-theme="dark"] .rule-note,html[data-theme="dark"] .salary-reference-note{background:#142333!important;color:#a9bfd3!important;border-color:#304a62!important}

/* Statutory builders / formula tooling */
html[data-theme="dark"] .formula-explainer,html[data-theme="dark"] .formula-reference-help,
html[data-theme="dark"] .formula-reference-browser,html[data-theme="dark"] .interactive-formula-help,
html[data-theme="dark"] .formula-help-topic,html[data-theme="dark"] .formula-help-active-card,
html[data-theme="dark"] .base-advanced-editor-wrap,html[data-theme="dark"] .base-formula-help-drawer,
html[data-theme="dark"] .v35-simple-editor,html[data-theme="dark"] .v35-card-advanced,
html[data-theme="dark"] .v36-card-advanced,html[data-theme="dark"] .v36-reference-manual>div,
html[data-theme="dark"] .builder-block,html[data-theme="dark"] .new-base-card,
html[data-theme="dark"] .base-composition,html[data-theme="dark"] .base-item,
html[data-theme="dark"] .custom-rule-summary-grid span,html[data-theme="dark"] .paye-detail{
  background:#13202c!important;border-color:#2d4256!important;color:#d9e5ef!important;
}
html[data-theme="dark"] .formula-op,html[data-theme="dark"] .formula-tool-row button,html[data-theme="dark"] .formula-tool-btn,
html[data-theme="dark"] .base-advanced-tools button,html[data-theme="dark"] .formula-more summary,
html[data-theme="dark"] .base-help-topic-grid button,html[data-theme="dark"] .base-token,
html[data-theme="dark"] .base-op-select,html[data-theme="dark"] .v35-tools button,
html[data-theme="dark"] .v35-tools summary,html[data-theme="dark"] .v36-tools button,html[data-theme="dark"] .v36-tools summary,
html[data-theme="dark"] .ref-insert{background:#1a2a39!important;color:#dce7f0!important;border-color:#3a5066!important}
html[data-theme="dark"] .formula-op:hover,html[data-theme="dark"] .formula-tool-row button:hover,
html[data-theme="dark"] .base-advanced-tools button:hover,html[data-theme="dark"] .base-help-topic-grid button:hover,
html[data-theme="dark"] .base-token:hover{background:#24394d!important;color:#fff!important}
html[data-theme="dark"] code,html[data-theme="dark"] .base-reference-preview code,html[data-theme="dark"] .decl-dict-title code,
html[data-theme="dark"] .declaration-info-body code{background:#0d1823!important;color:#9bc8ef!important;border-color:#2d4357!important}
html[data-theme="dark"] .generated-formula-panel textarea,html[data-theme="dark"] .base-advanced-editor{background:#101923!important;color:#e7eef5!important;border-color:#344a5f!important}
html[data-theme="dark"] .v37-test-head,html[data-theme="dark"] .v37-test-note,html[data-theme="dark"] .v37-result-kpis>div{background:#142230!important;color:#dbe6ef!important;border-color:#2d4256!important}

/* Admin hubs + settings */
html[data-theme="dark"] .admin-setting-card,html[data-theme="dark"] .admin-head-stat,
html[data-theme="dark"] .admin-search-wrap,html[data-theme="dark"] .settings-section,
html[data-theme="dark"] .logo-setting-card,html[data-theme="dark"] .settings-toggle,
html[data-theme="dark"] .ml-brand-preview,html[data-theme="dark"] .ml-setup-steps>div,
html[data-theme="dark"] .ml-scope-box,html[data-theme="dark"] .ml-context-banner{background:#111d29!important;border-color:#2d4154!important;color:#e7eef5!important;box-shadow:none!important}
html[data-theme="dark"] .admin-setting-card:hover{background:#172635!important;border-color:#47647f!important}
html[data-theme="dark"] .admin-card-icon,html[data-theme="dark"] .master-hero-icon,
html[data-theme="dark"] .ml-master-tool .ml-tool-icon{background:#1a2c3d!important;color:#9ec4e7!important}
html[data-theme="dark"] .admin-card-meta span{background:#0d1823!important;color:#9eb1c2!important}
html[data-theme="dark"] .settings-save-row,html[data-theme="dark"] .company-settings-v90 .modal-title-row{background:#111d29!important;border-color:#2d4154!important}
html[data-theme="dark"] .logo-setting-preview{background:#0d1823!important;border-color:#2d4154!important}
html[data-theme="dark"] .admin-empty-search{background:#142230!important;color:#9eb1c2!important;border-color:#2d4154!important}

/* Earnings / Deductions */
html[data-theme="dark"] .payitem-register,html[data-theme="dark"] .payitem-create-card,
html[data-theme="dark"] .payitem-drawer-summary>div,html[data-theme="dark"] .payitem-edit-popover{
  background:#111d29!important;color:#e8f0f7!important;border-color:#2d4154!important;
}
html[data-theme="dark"] .payitem-filter-pills button{background:#1a2a39!important;color:#b9c9d7!important;border-color:#354c62!important}
html[data-theme="dark"] .payitem-filter-pills button.active{background:#204064!important;color:#eaf3fc!important;border-color:#4978a8!important}
html[data-theme="dark"] .eoy-state-pill.included{background:#173126!important;color:#8cdfad!important}
html[data-theme="dark"] .eoy-state-pill.excluded{background:#202a35!important;color:#b2c0cc!important}

/* Declaration mapping / dictionaries / dialogs */
html[data-theme="dark"] .declaration-editor-help,html[data-theme="dark"] .declaration-current-spec-note,
html[data-theme="dark"] .declaration-info-body section,html[data-theme="dark"] .declaration-info-body .decl-formula-explain{
  background:#142230!important;border-color:#2e4357!important;color:#b7c8d6!important;
}
html[data-theme="dark"] .declaration-current-spec-note{background:#332919!important;color:#ecc986!important;border-color:#6a5129!important}
html[data-theme="dark"] .declaration-info-dialog,html[data-theme="dark"] .declaration-info-head{background:#111d29!important;color:#e8f0f7!important;border-color:#2e4357!important}
html[data-theme="dark"] .declaration-info-head button{background:#1a2a39!important;color:#dce7f0!important}

/* Drawers / modals / menus */
html[data-theme="dark"] dialog.ml-action-drawer,html[data-theme="dark"] .ml-action-drawer-head,
html[data-theme="dark"] .switch-modal,html[data-theme="dark"] .duplicate-modal,
html[data-theme="dark"] .app-confirm-modal,html[data-theme="dark"] .payslip-delivery-dialog,
html[data-theme="dark"] .payitem-edit-drawer{background:#111d29!important;color:#e8f0f7!important;border-color:#2e4357!important;box-shadow:0 22px 60px rgba(0,0,0,.42)!important}
html[data-theme="dark"] .ml-action-drawer-close,html[data-theme="dark"] .payslip-delivery-head button{background:#1a2a39!important;color:#dce7f0!important;border-color:#365069!important}
html[data-theme="dark"] .ml-drawer-action{color:#dce7f0!important;border-color:#2b3f52!important}
html[data-theme="dark"] .ml-drawer-action:hover{background:#1a2a39!important}
html[data-theme="dark"] .ml-drawer-action>span{background:#183149!important;color:#9ec8ed!important}
html[data-theme="dark"] .bulk-apply-mode label,html[data-theme="dark"] .bulk-pay-preview,
html[data-theme="dark"] .ml-drawer-placeholder{background:#142230!important;border-color:#2d4256!important;color:#c9d6e1!important}
html[data-theme="dark"] .bulk-apply-mode label:has(input:checked){background:#193752!important;border-color:#4b7398!important}

/* Alerts / status / toast */
html[data-theme="dark"] .flash{background:#153126!important;color:#9ce1ba!important;border:1px solid #2e684a!important}
html[data-theme="dark"] .notice{background:#162432!important;color:#c8d5e1!important;border-color:#344a60!important}
html[data-theme="dark"] .notice.warning,html[data-theme="dark"] .duplicate-warning,
html[data-theme="dark"] .payslip-delivery-warning,html[data-theme="dark"] .approval-stale{background:#342819!important;color:#efc680!important;border-color:#6b502a!important}
html[data-theme="dark"] .notice.success,html[data-theme="dark"] .client-readiness.ok{background:#173126!important;color:#98dfb7!important;border-color:#2f684a!important}
html[data-theme="dark"] .form-warning,html[data-theme="dark"] .error-card,
html[data-theme="dark"] .import-error-row{background:#342326!important;color:#efb1b7!important;border-color:#6c3d44!important}
html[data-theme="dark"] .ml-toast,html[data-theme="dark"] .ml-toast.error,html[data-theme="dark"] .ml-toast.warning{background:#152230!important;color:#e7eef5!important;border-color:#334a5f!important;box-shadow:0 15px 40px rgba(0,0,0,.35)!important}
html[data-theme="dark"] .ml-toast-icon{background:#19382a!important;color:#8de0b2!important}
html[data-theme="dark"] .ml-toast.error .ml-toast-icon{background:#43262a!important;color:#efaab1!important}
html[data-theme="dark"] .ml-toast.warning .ml-toast-icon{background:#3a2f1c!important;color:#efca82!important}

/* Import / validation screens */
html[data-theme="dark"] .import-upload-form input[type=file],html[data-theme="dark"] .test-payroll-scroll,
html[data-theme="dark"] .test-summary span,html[data-theme="dark"] .test-kpis span,
html[data-theme="dark"] .import-kpis>div{background:#13212e!important;color:#dce6ef!important;border-color:#2e4357!important}
html[data-theme="dark"] .import-ready-row{background:#143025!important;color:#a0dfbb!important}
html[data-theme="dark"] .import-error-row{background:#342326!important;color:#efb2b8!important}
html[data-theme="dark"] .import-status.error{background:#48272c!important;color:#f0adb5!important}

/* EOY review cards and spreadsheet */
html[data-theme="dark"] .eoy-main-panel-v102,html[data-theme="dark"] .eoy-sheet-shell,
html[data-theme="dark"] .eoy-review-detail,html[data-theme="dark"] .eoy-inline-review,
html[data-theme="dark"] .eoy-grid-wrap,html[data-theme="dark"] .eoy-grid-wrap-inline,
html[data-theme="dark"] .eoy-sheet-foot{background:#0f1a25!important;border-color:#2d4154!important;color:#e7eef5!important}
html[data-theme="dark"] .eoy-sheet-head,html[data-theme="dark"] .eoy-sheet-meta,
html[data-theme="dark"] .eoy-sheet-meta>div,html[data-theme="dark"] .eoy-inline-review-facts span{
  background:#152331!important;border-color:#31485d!important;color:#e7eef5!important;
}
html[data-theme="dark"] .eoy-excel-grid th,html[data-theme="dark"] .eoy-excel-grid td{background:#111d29!important;color:#dce6ee!important;border-color:#2b3d4f!important}
html[data-theme="dark"] .eoy-excel-grid thead th,html[data-theme="dark"] .eoy-grid-wrap-inline .eoy-excel-grid thead .eoy-grid-item-col,
html[data-theme="dark"] .eoy-grid-wrap-inline .eoy-excel-grid thead .eoy-grid-total{background:#1a2a39!important;color:#b9cad8!important}
html[data-theme="dark"] .eoy-grid-section.included td{background:#173126!important;color:#8ddeaf!important}
html[data-theme="dark"] .eoy-grid-section.adjustment td{background:#352719!important;color:#efc27f!important}
html[data-theme="dark"] .eoy-grid-section.excluded td,html[data-theme="dark"] .eoy-grid-section.deduction td{background:#202b36!important;color:#acbac6!important}
html[data-theme="dark"] .eoy-grid-line.excluded td,html[data-theme="dark"] .eoy-grid-line.deduction td,
html[data-theme="dark"] .eoy-grid-line.excluded .eoy-grid-item-col,html[data-theme="dark"] .eoy-grid-line.deduction .eoy-grid-item-col{background:#141f2a!important;color:#9facb8!important}
html[data-theme="dark"] .eoy-grid-subtotal td{background:#182b3b!important;color:#e5edf4!important}
html[data-theme="dark"] .eoy-grid-adjustment-total td{background:#302519!important;color:#efc27f!important}
html[data-theme="dark"] .eoy-grid-final td,html[data-theme="dark"] .eoy-grid-final .eoy-grid-item-col,
html[data-theme="dark"] .eoy-grid-final .eoy-grid-total{background:#173126!important;color:#8de0b1!important}
html[data-theme="dark"] .eoy-reviewed-stamp{background:#173126!important;color:#8edfb1!important;border-color:#2f684b!important}
html[data-theme="dark"] .eoy-reviewed-stamp small{color:#84b99a!important}
html[data-theme="dark"] .eoy-rule-groups>div,html[data-theme="dark"] .eoy-explain-card,
html[data-theme="dark"] .eoy-month-row summary,html[data-theme="dark"] .eoy-simple-note{background:#13212e!important;color:#cbd7e1!important;border-color:#2d4256!important}

/* Public approval pages */
html[data-theme="dark"] .public-summary-grid>div{background:#13212e!important;color:#dce6ef!important;border-color:#2d4256!important}
html[data-theme="dark"] .public-summary-grid>div:nth-child(2){background:#15283a!important}
html[data-theme="dark"] .public-summary-grid>div:nth-child(3){background:#332919!important}
html[data-theme="dark"] .public-summary-grid>div:nth-child(4){background:#173126!important}
html[data-theme="dark"] .public-reply-note,html[data-theme="dark"] .ml-change-summary,
html[data-theme="dark"] .ml-feedback-meta,html[data-theme="dark"] .ml-feedback-block,
html[data-theme="dark"] .ml-change-card,html[data-theme="dark"] .ml-feedback-employee{background:#13212e!important;border-color:#2d4256!important;color:#dce6ef!important}

/* Login: native dark card, not a white card on a dark canvas */
html[data-theme="dark"] .ml-login-shell{background:radial-gradient(circle at 50% 15%,#142638 0,#0b141f 48%,#08111a 100%)!important}
html[data-theme="dark"] .ml-login-card{background:#111d29!important;border-color:#32485d!important;color:#eaf2f8!important;box-shadow:0 28px 80px rgba(0,0,0,.46)!important}
html[data-theme="dark"] .ml-login-brand{border-bottom-color:#2c4053!important}
html[data-theme="dark"] .ml-login-card input{background:#0c1722!important;color:#eef5fa!important;border-color:#38516a!important}
html[data-theme="dark"] .ml-login-card label{color:#becddb!important}
html[data-theme="dark"] .ml-demo{background:#0d1823!important;color:#a8b8c7!important;border-color:#2c4053!important}

/* Document previews intentionally remain paper-white in both themes. */
html[data-theme="dark"] .vistra-live-payslip,html[data-theme="dark"] .payslip-v87 .payslip-preview-head,
html[data-theme="dark"] .payslip-v87 .review-calculation,html[data-theme="dark"] .payslip-v87 .review-actions,
html[data-theme="dark"] .payslip-preview-card .vistra-live-payslip{
  background:#fff!important;color:#152238!important;border-color:#dce4ec!important;color-scheme:light!important;
}
html[data-theme="dark"] .vistra-live-payslip *,html[data-theme="dark"] .payslip-preview-card .vistra-live-payslip *{color:inherit}

/* Focus visibility and selection */
html[data-theme="dark"] :focus-visible{outline:2px solid #6fa4ff!important;outline-offset:2px!important}
html[data-theme="dark"] ::selection{background:#315f91;color:#fff}

/* V104 · template-specific audit fixes found by class inventory */
html[data-theme="dark"] .ml-global-back{background:#1b2d3e!important;color:#cfe1f0!important;border-color:#3a5671!important}
html[data-theme="dark"] .ml-global-back:hover{background:#253d52!important;color:#fff!important;border-color:#4e7090!important}
html[data-theme="dark"] .input-workspace-tabs{background:#13212e!important;border:1px solid #2d4256!important}
html[data-theme="dark"] .input-workspace-tabs a{color:#9eb1c2!important}
html[data-theme="dark"] .input-workspace-tabs a.active{background:#20364a!important;color:#eef5fa!important;box-shadow:none!important}
html[data-theme="dark"] .input-workspace-toolbar,html[data-theme="dark"] .input-workspace-search,
html[data-theme="dark"] .input-matrix-panel,html[data-theme="dark"] .ml-period-card{background:#111d29!important;border-color:#2d4256!important;color:#e8f0f7!important}
html[data-theme="dark"] .matrix-help-strip{background:#142332!important;color:#a9bfd1!important;border-color:#30475d!important}
html[data-theme="dark"] .matrix-no-components,html[data-theme="dark"] .matrix-empty-search{background:#13212e!important;color:#9eb1c2!important;border-color:#2d4256!important}
html[data-theme="dark"] .salary-basis-table td:last-child{background:#152432!important}
html[data-theme="dark"] .salary-basis-table .salary-basic-used{color:#a9d0f0!important}
html[data-theme="dark"] .ot-rule-summary,html[data-theme="dark"] .v67-ot-rule-summary,html[data-theme="dark"] .v67-ot-help{background:#142332!important;color:#b5c7d7!important;border-color:#30475d!important}

/* Clients */
html[data-theme="dark"] .client-list-panel,html[data-theme="dark"] .client-search-row{background:#111d29!important;border-color:#2d4256!important;color:#e8f0f7!important}
html[data-theme="dark"] .client-list-panel table td{background:#111d29!important;color:#dce6ef!important}
html[data-theme="dark"] .client-list-panel table tbody tr:hover td{background:#172635!important}
html[data-theme="dark"] .view-toggle{background:#162635!important;border-color:#344b61!important;color:#bdccda!important}
html[data-theme="dark"] .empty-search{background:#13212e!important;color:#9eb1c2!important;border-color:#2d4256!important}

/* V68/V69 overtime rules — these were the largest remaining light islands */
html[data-theme="dark"] .v68-ot-policy-card{background:#111d29!important;border-color:#2d4256!important;color:#e8f0f7!important}
html[data-theme="dark"] .v68-policy-tabs{background:#13212e!important;border:1px solid #2d4256!important}
html[data-theme="dark"] .v68-policy-tabs button{background:transparent!important;color:#a4b6c6!important}
html[data-theme="dark"] .v68-policy-tabs button.active{background:#20364a!important;color:#f0f5fa!important;box-shadow:none!important}
html[data-theme="dark"] .v68-policy-topline>div,html[data-theme="dark"] .v68-rate-row,
html[data-theme="dark"] .v68-rate-row.core,html[data-theme="dark"] .v68-guidance-card,
html[data-theme="dark"] .v69-option-card,html[data-theme="dark"] .v69-info-callout{
  background:#142230!important;border-color:#30475c!important;color:#dce6ee!important;
}
html[data-theme="dark"] .v68-rate-row:hover{background:#182a39!important;border-color:#3c5872!important}
html[data-theme="dark"] .v68-rate-name small,html[data-theme="dark"] .v68-policy-grid small,
html[data-theme="dark"] .v68-above-grid small,html[data-theme="dark"] .v68-policy-top-grid small,
html[data-theme="dark"] .v68-rate-editor-head p{color:#91a6b8!important}
html[data-theme="dark"] .v68-core-pill,html[data-theme="dark"] .v68-effective-rate{background:#1b2b3a!important;color:#bac9d6!important;border:1px solid #344b60!important}
html[data-theme="dark"] .v69-info-icon{background:#19334b!important;color:#9ac7ed!important}

/* Leave rules */
html[data-theme="dark"] .leave-rule-callout{background:#142332!important;border-color:#30475d!important;color:#afc2d2!important}
html[data-theme="dark"] .leave-rule-callout b{color:#eaf2f8!important}
html[data-theme="dark"] .leave-category{background:#1b2b3a!important;color:#b8c8d5!important;border:1px solid #344a5f!important}
html[data-theme="dark"] .leave-rule-code{color:#8298ab!important}
html[data-theme="dark"] .leave-rule-metrics span,html[data-theme="dark"] .leave-impact-cards span{background:#142230!important;border-color:#30465a!important;color:#e5edf4!important}
html[data-theme="dark"] .leave-rule-metrics small,html[data-theme="dark"] .leave-impact-cards small{color:#91a5b7!important}
html[data-theme="dark"] .leave-rule-card p{color:#a9bac9!important}
html[data-theme="dark"] .leave-rule-note{background:#352a19!important;border-color:#6b512a!important;color:#e9c485!important}
html[data-theme="dark"] .leave-version-editor{border-color:#2b3e51!important}
html[data-theme="dark"] .leave-version-editor>summary{color:#8eb9df!important}
html[data-theme="dark"] .leave-conditional-builder,html[data-theme="dark"] .leave-rule-builder{background:#13212e!important;border-color:#2d4256!important;color:#dce6ef!important}

/* Statutory / builder cards that use explicit white backgrounds */
html[data-theme="dark"] .v35-base-summary,html[data-theme="dark"] .v35-base-details,
html[data-theme="dark"] .v36-base-summary,html[data-theme="dark"] .v36-base-details,
html[data-theme="dark"] .v37-create-base-bar,html[data-theme="dark"] .base-live-expression,
html[data-theme="dark"] .formula-live-assistant,html[data-theme="dark"] .formula-live-assistant.active,
html[data-theme="dark"] .base-bottom-help,html[data-theme="dark"] .current-bases-note,
html[data-theme="dark"] .basses-jump-card{background:#13212e!important;color:#dce6ef!important;border-color:#2d4256!important}
html[data-theme="dark"] .v35-base-summary:hover,html[data-theme="dark"] .v36-base-summary:hover{background:#182a39!important}
html[data-theme="dark"] .base-composition span,html[data-theme="dark"] .formula-help-grid>span,
html[data-theme="dark"] .paye-formula-steps span,html[data-theme="dark"] .statutory-kpis>div,
html[data-theme="dark"] .contribution-working>div{background:#162534!important;color:#dce6ef!important;border-color:#30475d!important}
html[data-theme="dark"] .statutory-detail-card,html[data-theme="dark"] .pcb-card,
html[data-theme="dark"] .statutory-card-title,html[data-theme="dark"] .pcb-head{background:#13212e!important;border-color:#2d4256!important;color:#dce6ef!important}
html[data-theme="dark"] .statutory-result-line,html[data-theme="dark"] .formula-line{background:#192a39!important;color:#c9d7e2!important;border-color:#344b60!important}

/* Finalised/revision status bars */
html[data-theme="dark"] .finalised-status-bar,html[data-theme="dark"] .payroll-finalised-bar{background:#122c22!important;border-color:#315f49!important;color:#b7e7c9!important}
html[data-theme="dark"] .finalised-status-bar .secondary,html[data-theme="dark"] .payroll-finalised-bar .secondary{background:#1c3546!important;color:#e4edf5!important;border-color:#456278!important}

/* Status chips */
html[data-theme="dark"] .badge.draft,html[data-theme="dark"] .status-pill.draft{background:#3a301d!important;color:#f0cb7e!important}
html[data-theme="dark"] .badge.awaiting_approval,html[data-theme="dark"] .status-pill.awaiting_approval,
html[data-theme="dark"] .badge.ready_to_resend,html[data-theme="dark"] .status-pill.ready_to_resend{background:#193652!important;color:#9cc9f1!important}
html[data-theme="dark"] .badge.changes_requested,html[data-theme="dark"] .status-pill.changes_requested{background:#40252a!important;color:#efadb5!important}
html[data-theme="dark"] .badge.approved,html[data-theme="dark"] .badge.finalised,
html[data-theme="dark"] .status-pill.approved,html[data-theme="dark"] .status-pill.finalised{background:#173126!important;color:#91dfb2!important}

/* Preserve contrast for light/paper document preview children despite global text rules */
html[data-theme="dark"] .vistra-live-payslip h1,html[data-theme="dark"] .vistra-live-payslip h2,
html[data-theme="dark"] .vistra-live-payslip h3,html[data-theme="dark"] .vistra-live-payslip h4,
html[data-theme="dark"] .vistra-live-payslip b,html[data-theme="dark"] .vistra-live-payslip strong,
html[data-theme="dark"] .vistra-live-payslip label{color:#152238!important}
html[data-theme="dark"] .vistra-live-payslip p,html[data-theme="dark"] .vistra-live-payslip small,
html[data-theme="dark"] .vistra-live-payslip .muted{color:#64748b!important}
html[data-theme="dark"] .vistra-live-payslip table th{background:#f2f5f8!important;color:#43566b!important;border-color:#dbe2e9!important}
html[data-theme="dark"] .vistra-live-payslip table td{background:#fff!important;color:#152238!important;border-color:#e3e8ee!important}


/* =========================================================
   V105 · Exhaustive theme inheritance + remaining-light-surface audit
   This layer is intentionally generated from the legacy light-surface
   inventory so overlooked cards/forms inherit the dark system automatically.
   Paper/document previews are excluded and remain light by design.
   ========================================================= */
html[data-theme="dark"]{
  --v105-bg:#0b141f;--v105-surface:#111d29;--v105-surface-2:#152432;
  --v105-surface-3:#1a2b3a;--v105-input:#0d1823;--v105-border:#2d4256;
  --v105-border-strong:#3a536a;--v105-text:#edf4fa;--v105-text-2:#c8d5e1;
  --v105-muted:#93a7ba;--v105-hover:#182a39;--v105-focus:#6fa4ff;
}

/* Core native controls — one source of truth for every screen. */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,html[data-theme="dark"] textarea{
  background:var(--v105-input)!important;color:var(--v105-text)!important;
  border-color:var(--v105-border-strong)!important;box-shadow:none!important;
}
html[data-theme="dark"] select option{background:#101c28!important;color:var(--v105-text)!important}
html[data-theme="dark"] input:disabled,html[data-theme="dark"] select:disabled,html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] input[readonly],html[data-theme="dark"] textarea[readonly]{
  background:#13202c!important;color:#9fb0c0!important;border-color:#2a3d50!important;opacity:1!important;
}
html[data-theme="dark"] fieldset,html[data-theme="dark"] details{border-color:var(--v105-border)!important}
html[data-theme="dark"] details>summary{color:var(--v105-text-2)!important}
html[data-theme="dark"] ::-webkit-calendar-picker-indicator{filter:invert(.82) sepia(.08) saturate(.6) hue-rotate(175deg)}

/* Specific components reported during V104 QA. */
html[data-theme="dark"] .policy-row-editor,html[data-theme="dark"] .policy-row-editor>summary,
html[data-theme="dark"] .policy-row-editor[open]>summary,html[data-theme="dark"] .policy-override-stack,
html[data-theme="dark"] .schedule-fixed-fields,html[data-theme="dark"] .schedule-weekly-fields,
html[data-theme="dark"] .schedule-editor,html[data-theme="dark"] .payroll-availability-summary,
html[data-theme="dark"] .payroll-availability-advanced,html[data-theme="dark"] .payroll-availability-advanced>summary,
html[data-theme="dark"] .notice-help-card,html[data-theme="dark"] .ml-info-pop,
html[data-theme="dark"] .info-popover,html[data-theme="dark"] .leave-info-popover{
  background:var(--v105-surface-2)!important;color:var(--v105-text-2)!important;border-color:var(--v105-border)!important;
}
html[data-theme="dark"] .policy-row-editor>summary b,html[data-theme="dark"] .payroll-availability-summary b,
html[data-theme="dark"] .notice-help-card>b,html[data-theme="dark"] .notice-help-card strong{color:var(--v105-text)!important}
html[data-theme="dark"] .policy-row-editor>summary small,html[data-theme="dark"] .policy-override-stack label,
html[data-theme="dark"] .payroll-availability-summary small,html[data-theme="dark"] .payroll-availability-summary span,
html[data-theme="dark"] .notice-help-card span,html[data-theme="dark"] .notice-help-card p{color:var(--v105-muted)!important}
html[data-theme="dark"] .schedule-calc-strip{background:#172838!important;color:#aac0d2!important;border:1px solid #30485e!important}
html[data-theme="dark"] .schedule-calc-strip b{color:#e7f0f7!important}
html[data-theme="dark"] .schedule-legacy-note{background:#342918!important;color:#ebc886!important;border-color:#6d5229!important}
html[data-theme="dark"] .schedule-error{background:#3a2328!important;color:#efb0b6!important;border-color:#744047!important}

/* Never allow legacy white accordion/table rows to leak into dark mode. */
html[data-theme="dark"] .policy-row-editor input,html[data-theme="dark"] .policy-row-editor select,
html[data-theme="dark"] .policy-row-editor textarea,html[data-theme="dark"] .schedule-fixed-fields input,
html[data-theme="dark"] .schedule-weekly-fields input{background:var(--v105-input)!important;color:var(--v105-text)!important;border-color:var(--v105-border-strong)!important}
html[data-theme="dark"] .client-overview-table tbody tr,html[data-theme="dark"] .recent-payrolls tbody tr,
html[data-theme="dark"] .recent-payrolls td,html[data-theme="dark"] .client-dashboard-table td{background:transparent!important;color:var(--v105-text-2)!important}
html[data-theme="dark"] .recent-payrolls tbody tr:hover td,html[data-theme="dark"] .client-dashboard-table tbody tr:hover td{background:var(--v105-hover)!important}

/* White tooltip/popover defaults must never flash in dark mode. */
html[data-theme="dark"] [role="tooltip"],html[data-theme="dark"] .tooltip,html[data-theme="dark"] .popover,
html[data-theme="dark"] .ml-info-pop,html[data-theme="dark"] .ml-menu-floating,html[data-theme="dark"] .column-menu,
html[data-theme="dark"] .mini-column-menu{background:#172635!important;color:var(--v105-text)!important;border-color:#385168!important;box-shadow:0 16px 44px rgba(0,0,0,.38)!important}

/* Automatically covered legacy near-white surfaces that had no dark override. */
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .payroll-grid-hint,
html[data-theme="dark"] .payroll-table .recurring-col,
html[data-theme="dark"] .payroll-table-wrap th:first-child,
html[data-theme="dark"] .payroll-table-wrap td:first-child,
html[data-theme="dark"] .rose-outline,
html[data-theme="dark"] .formula-ref-chip,
html[data-theme="dark"] .stat-simple-note,
html[data-theme="dark"] .base-builder-card.named,
html[data-theme="dark"] .help-example,
html[data-theme="dark"] .base-paren-toggle,
html[data-theme="dark"] .base-advanced-toggle,
html[data-theme="dark"] .formula-more>div,
html[data-theme="dark"] .formula-live-assistant code,
html[data-theme="dark"] .v35-card-advanced-toggle,
html[data-theme="dark"] .base-help-detail code,
html[data-theme="dark"] .v36-card-advanced-toggle,
html[data-theme="dark"] .v36-reference-manual code,
html[data-theme="dark"] .ml-client-select option,
html[data-theme="dark"] .payroll-workbench-table .editable-cell input,
html[data-theme="dark"] .view-dot.editable,
html[data-theme="dark"] .row-action-menu>div.employee-action-card,
html[data-theme="dark"] .approval-recipient-summary,
html[data-theme="dark"] .employee-approval-status>div,
html[data-theme="dark"] .payroll-cockpit,
html[data-theme="dark"] .payroll-action-dock,
html[data-theme="dark"] .revision-inline form,
html[data-theme="dark"] .payroll-review-strip,
html[data-theme="dark"] .utility-card,
html[data-theme="dark"] .revision-drawer,
html[data-theme="dark"] .v55-summary-cards .summary-card,
html[data-theme="dark"] .bulk-apply-group select,
html[data-theme="dark"] .bulk-apply-group input,
html[data-theme="dark"] .workbench-drawer,
html[data-theme="dark"] .v56-payroll-statusbar,
html[data-theme="dark"] .editable-col,
html[data-theme="dark"] .payroll-workbench-table tbody .calculated-col,
html[data-theme="dark"] .v56-modal,
html[data-theme="dark"] .payroll-undo-toast button,
html[data-theme="dark"] .import-summary-row>div,
html[data-theme="dark"] .mapping-grid select,
html[data-theme="dark"] .history-modal,
html[data-theme="dark"] .history-modal .drawer-head,
html[data-theme="dark"] .payroll-workbench-table tbody td.actions-col,
html[data-theme="dark"] .payroll-workbench-table tbody td.sticky-employee,
html[data-theme="dark"] .payroll-workbench-table .money-input,
html[data-theme="dark"] .row-action-menu>summary,
html[data-theme="dark"] .add-pay-item-modal,
html[data-theme="dark"] .add-grid-item-form button,
html[data-theme="dark"] .empty-pay-items,
html[data-theme="dark"] .command-group,
html[data-theme="dark"] .command-period-form input,
html[data-theme="dark"] .command-popover,
html[data-theme="dark"] .command-popover a,
html[data-theme="dark"] .command-popover button,
html[data-theme="dark"] .filter-popover,
html[data-theme="dark"] .filter-popover button,
html[data-theme="dark"] .input-period-form input,
html[data-theme="dark"] .leave-policy-table-wrap,
html[data-theme="dark"] .leave-sheet-wrap,
html[data-theme="dark"] .leave-sheet-rulebar,
html[data-theme="dark"] .leave-sheet-table .leave-employee,
html[data-theme="dark"] .leave-drawdown-select,
html[data-theme="dark"] .input-back-link,
html[data-theme="dark"] .ml-info-pop,
html[data-theme="dark"] .leave-policy-table th:first-child,
html[data-theme="dark"] .leave-policy-table td:first-child,
html[data-theme="dark"] .policy-row-editor,
html[data-theme="dark"] .ml-back-card,
html[data-theme="dark"] .v67-policy-topline>div,
html[data-theme="dark"] .v67-rate-row,
html[data-theme="dark"] .v67-above-card,
html[data-theme="dark"] .v67-ot-sheet td,
html[data-theme="dark"] .v69-info-callout .v69-info-icon,
html[data-theme="dark"] .schedule-fixed-fields,
html[data-theme="dark"] .schedule-weekly-fields,
html[data-theme="dark"] .review-link,
html[data-theme="dark"] .employee-payroll-review .mini-payslip,
html[data-theme="dark"] .pay-basis-title span,
html[data-theme="dark"] .payroll-availability-advanced{
  background:var(--v105-surface-2)!important;color:var(--v105-text-2)!important;border-color:var(--v105-border)!important;
}

/* Interactive light-only states get a dark elevated state. */
html[data-theme="dark"] .client-workspace-tabs a:hover,
html[data-theme="dark"] .client-tabs a:hover,
html[data-theme="dark"] .payroll-viewtoggles button.active,
html[data-theme="dark"] .payroll-workbench-table .money-input:focus,
html[data-theme="dark"] .ml-workspace-tab.active,
html[data-theme="dark"] .active-filter-card,
html[data-theme="dark"] .leave-grid-input:focus,
html[data-theme="dark"] .v64-segmented button:hover,
html[data-theme="dark"] .v67-policy-tabs button.active{
  background:var(--v105-surface-3)!important;color:var(--v105-text)!important;border-color:var(--v105-border-strong)!important;
}

/* Re-assert intentional paper-white document surfaces after the exhaustive layer. */
html[data-theme="dark"] .vistra-live-payslip,html[data-theme="dark"] .payslip-preview-card .vistra-live-payslip,
html[data-theme="dark"] .payslip-v87 .payslip-preview-head,html[data-theme="dark"] .payslip-v87 .review-calculation,
html[data-theme="dark"] .payslip-v87 .review-actions{background:#fff!important;color:#152238!important;border-color:#dce4ec!important;color-scheme:light!important}


/* ==========================================================================
   V106 · APP-WIDE THEME COVERAGE LAYER
   Generated by comparing every white/near-white structural CSS selector with
   the existing dark-theme selector inventory. Only selectors with NO dark
   equivalent are added here. Document/payslip paper surfaces are excluded.
   ========================================================================== */
html[data-theme="dark"]{--v106-bg:#0b141f;--v106-surface:#111d29;--v106-surface-2:#152432;--v106-surface-3:#1a2b3a;--v106-input:#0d1823;--v106-border:#2d4256;--v106-border-strong:#3a536a;--v106-text:#edf4fa;--v106-text-2:#c8d5e1;--v106-muted:#93a7ba}
html[data-theme="dark"] .payroll-table .quick-col,
html[data-theme="dark"] .payroll-table .quick-cell,
html[data-theme="dark"] .payroll-table .recurring-cell,
html[data-theme="dark"] .net-header,
html[data-theme="dark"] .payslip-icon,
html[data-theme="dark"] .sidebar-client,
html[data-theme="dark"] .trash-btn,
html[data-theme="dark"] .not-paid-row td,
html[data-theme="dark"] .not-paid-btn,
html[data-theme="dark"] .toggle-track:after,
html[data-theme="dark"] .confirm-icon,
html[data-theme="dark"] .locked-card,
html[data-theme="dark"] .add-inline-btn,
html[data-theme="dark"] .custom-stat,
html[data-theme="dark"] .master-actions,
html[data-theme="dark"] .test-payroll-table th,
html[data-theme="dark"] .persistent-client-nav,
html[data-theme="dark"] .employee-compact-sticky.is-visible,
html[data-theme="dark"] .formula-ref-chip:hover,
html[data-theme="dark"] .stat-workspace-switch a>span,
html[data-theme="dark"] .bases-jump-card,
html[data-theme="dark"] .disabled-pill,
html[data-theme="dark"] .base-list-row:hover,
html[data-theme="dark"] .statutory-sticky-shell,
html[data-theme="dark"] .formula-glow:hover,
html[data-theme="dark"] .formula-more summary:hover,
html[data-theme="dark"] .formula-help-topic:hover,
html[data-theme="dark"] .salary-clarity-strip,
html[data-theme="dark"] .v35-card-advanced-toggle:hover,
html[data-theme="dark"] .v35-reset-formula,
html[data-theme="dark"] .v35-tools button:hover,
html[data-theme="dark"] .v35-tools summary:hover,
html[data-theme="dark"] .v36-card-advanced-toggle:hover,
html[data-theme="dark"] .v36-reset-formula,
html[data-theme="dark"] .v36-tools button:hover,
html[data-theme="dark"] .v36-tools summary:hover,
html[data-theme="dark"] .v36-formula-status,
html[data-theme="dark"] .v36-formula-status.valid,
html[data-theme="dark"] .v36-formula-status.invalid,
html[data-theme="dark"] .v36-help-note,
html[data-theme="dark"] .v36-base-card.open .v36-base-summary,
html[data-theme="dark"] .recent-payroll-row:hover,
html[data-theme="dark"] .contact-edit-row.pending-delete,
html[data-theme="dark"] .ml-workspace-identity:hover,
html[data-theme="dark"] .ml-brand-preview img,
html[data-theme="dark"] .ml-logo-placeholder,
html[data-theme="dark"] .ml-main.login-main.standalone-login,
html[data-theme="dark"] .payroll-focus-btn.active,
html[data-theme="dark"] .payroll-action-popover a:hover,
html[data-theme="dark"] .payroll-workbench-table .editable-head,
html[data-theme="dark"] .row-state-pill,
html[data-theme="dark"] .payroll-viewbar,
html[data-theme="dark"] .menu-icon,
html[data-theme="dark"] .menu-separator,
html[data-theme="dark"] .attachment-option,
html[data-theme="dark"] .approval-extra-recipients,
html[data-theme="dark"] .employee-row.action-active td,
html[data-theme="dark"] .payroll-action-popover form button:hover,
html[data-theme="dark"] .email-verified-note,
html[data-theme="dark"] .public-approval-body,
html[data-theme="dark"] .public-review-card,
html[data-theme="dark"] .public-status,
html[data-theme="dark"] .workflow-step>span,
html[data-theme="dark"] .locked-dock .dock-icon,
html[data-theme="dark"] .review-primary .review-icon,
html[data-theme="dark"] .utility-head>span,
html[data-theme="dark"] .v55-summary-cards .summary-icon,
html[data-theme="dark"] .v55-summary-cards .summary-net,
html[data-theme="dark"] .row-exception-list .more,
html[data-theme="dark"] .row-client-comment,
html[data-theme="dark"] .bulk-action-bar,
html[data-theme="dark"] .quick-action-list>a:hover,
html[data-theme="dark"] .quick-action-list>button:hover,
html[data-theme="dark"] .quick-action-list form>button:hover,
html[data-theme="dark"] .delivery-ring:after,
html[data-theme="dark"] .drawer-close,
html[data-theme="dark"] .history-summary>div,
html[data-theme="dark"] .history-table th,
html[data-theme="dark"] .history-items-row td,
html[data-theme="dark"] .history-items-row span,
html[data-theme="dark"] .delivery-state-icon,
html[data-theme="dark"] .v56-payroll-statusbar .status-total.net,
html[data-theme="dark"] .input-group-head,
html[data-theme="dark"] .calculated-group-head,
html[data-theme="dark"] .payroll-workbench-table tbody .editable-col,
html[data-theme="dark"] .calc-key,
html[data-theme="dark"] .import-dropzone,
html[data-theme="dark"] .import-dropzone:hover,
html[data-theme="dark"] .import-mode-choice label:has(input:checked),
html[data-theme="dark"] .import-mode-pill,
html[data-theme="dark"] .import-summary-row .warn,
html[data-theme="dark"] .import-preview-table th,
html[data-theme="dark"] .import-problem-row,
html[data-theme="dark"] .column-view-presets button,
html[data-theme="dark"] .payroll-workbench-table thead tr:not(.column-group-row) th,
html[data-theme="dark"] .payroll-workbench-table thead tr:not(.column-group-row) th.editable-col,
html[data-theme="dark"] .payroll-workbench-table thead tr:not(.column-group-row) th.calculated-col,
html[data-theme="dark"] .payroll-workbench-table tbody td.sticky-net,
html[data-theme="dark"] .payroll-workbench-table thead .actions-head,
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .add-grid-item-form button:hover,
html[data-theme="dark"] .command-icon-btn,
html[data-theme="dark"] .command-popover a:hover,
html[data-theme="dark"] .command-popover button:hover,
html[data-theme="dark"] .filter-popover button:hover,
html[data-theme="dark"] .input-title-line span,
html[data-theme="dark"] .matrix-row-total,
html[data-theme="dark"] .matrix-total-head,
html[data-theme="dark"] .ml-workspace-tabs-clear,
html[data-theme="dark"] .payroll-filter-control .filter-more-menu>summary,
html[data-theme="dark"] .input-matrix-table .matrix-row-excluded td,
html[data-theme="dark"] .input-matrix-table .matrix-row-excluded .matrix-employee-cell,
html[data-theme="dark"] .leave-type-tabs a,
html[data-theme="dark"] .leave-balance,
html[data-theme="dark"] .leave-cash,
html[data-theme="dark"] .leave-not-eligible td,
html[data-theme="dark"] .leave-not-eligible .leave-employee,
html[data-theme="dark"] .leave-verify td,
html[data-theme="dark"] .input-back-link:hover,
html[data-theme="dark"] .ml-info-help>summary,
html[data-theme="dark"] .leave-sheet-hint,
html[data-theme="dark"] .leave-calculated-cell,
html[data-theme="dark"] .v64-segmented,
html[data-theme="dark"] .v64-columns-popover .column-create-link,
html[data-theme="dark"] .policy-fixed-unit,
html[data-theme="dark"] .ml-back-card:hover,
html[data-theme="dark"] .info-banner,
html[data-theme="dark"] .company-custom-leaves span,
html[data-theme="dark"] .ml-period-control .period-arrow,
html[data-theme="dark"] .v67-guidance-card,
html[data-theme="dark"] .ot-class-pill.locked,
html[data-theme="dark"] .ot-rate-cell.disabled,
html[data-theme="dark"] .ot-locked-row td,
html[data-theme="dark"] .ot-locked-row .ot-employee-cell,
html[data-theme="dark"] .ot-locked-row,
html[data-theme="dark"] .leave-overview-item,
html[data-theme="dark"] .matrix-value-cell.needs-monthly-entry .matrix-input,
html[data-theme="dark"] .matrix-value-cell.needs-quantity,
html[data-theme="dark"] .matrix-value-cell.needs-quantity .matrix-input,
html[data-theme="dark"] .command-popover .menu-glyph,
html[data-theme="dark"] .command-review form .command-action,
html[data-theme="dark"] .review-metric.deduction,
html[data-theme="dark"] .mini-pay-box.deductions .mini-pay-box-title,
html[data-theme="dark"] .mini-employer>div:first-child,
html[data-theme="dark"] body.context-client .ml-workspace-tabs-shell,
html[data-theme="dark"] dialog.ml-action-drawer .ml-drawer-action[data-tone="pdf"]>span,
html[data-theme="dark"] dialog.ml-action-drawer .ml-drawer-action[data-tone="review"]>span,
html[data-theme="dark"] dialog.ml-action-drawer .ml-drawer-action[data-tone="report"]>span,
html[data-theme="dark"] .new-component-row td,
html[data-theme="dark"] .new-component-row .row-no,
html[data-theme="dark"] .pay-basis-panel,
html[data-theme="dark"] .mini-pay-row.total,
html[data-theme="dark"] .detailed-employer .employer-total,
html[data-theme="dark"] .detailed-employer .employer-cost,
html[data-theme="dark"] .rule-version-chip,
html[data-theme="dark"] .declaration-map-table th,
html[data-theme="dark"] .declaration-sticky-actions,
html[data-theme="dark"] .eoy-payment-note,
html[data-theme="dark"] .eoy-live-status,
html[data-theme="dark"] .eoy-system-source,
html[data-theme="dark"] .eoy-rule-chip.excluded,
html[data-theme="dark"] .eoy-excel-grid .eoy-grid-total,
html[data-theme="dark"] .eoy-review-detail-row>td{background:var(--v106-surface-2)!important;border-color:var(--v106-border)!important;color:var(--v106-text-2)!important;box-shadow:none!important}
html[data-theme="dark"] .company-cycle-form input[readonly]{background:var(--v106-input)!important;border-color:var(--v106-border-strong)!important;color:var(--v106-text)!important;box-shadow:none!important}

/* Translucent / sticky legacy surfaces caught separately. */
html[data-theme="dark"] .statutory-sticky-shell,html[data-theme="dark"] .master-actions,html[data-theme="dark"] .master-save-bar,html[data-theme="dark"] .sticky-action-bar,html[data-theme="dark"] .sticky-footer,html[data-theme="dark"] .page-sticky-actions{background:rgba(11,20,31,.96)!important;color:var(--v106-text)!important;border-color:var(--v106-border)!important;box-shadow:0 1px 0 #24394d!important}
/* Generic rule/form builders: application chrome, never paper. */
html[data-theme="dark"] .builder-block,html[data-theme="dark"] .formula-reference-help,html[data-theme="dark"] .formula-help-grid>span,html[data-theme="dark"] .paye-example-box,html[data-theme="dark"] .rate-band-group,html[data-theme="dark"] .stat-component-card,html[data-theme="dark"] .leave-rule-metrics span,html[data-theme="dark"] .leave-impact-cards span,html[data-theme="dark"] .ml-period-card,html[data-theme="dark"] .info-banner,html[data-theme="dark"] .leave-rule-callout{background:var(--v106-surface)!important;color:var(--v106-text-2)!important;border-color:var(--v106-border)!important;box-shadow:none!important}
/* Remaining generic card class (document previews are explicitly excluded). */
html[data-theme="dark"] .card:not(.payslip-preview-card):not(.vistra-live-payslip){background:var(--v106-surface)!important;color:var(--v106-text-2)!important;border-color:var(--v106-border)!important;box-shadow:none!important}
/* Popovers/tooltips from legacy and dynamically-created UI. */
html[data-theme="dark"] [class*="popover"]:not(.ml-popover-layer),html[data-theme="dark"] [class*="tooltip"],html[data-theme="dark"] [class*="floating-menu"],html[data-theme="dark"] [role="tooltip"]{background:#172635!important;color:var(--v106-text)!important;border-color:#385168!important}
/* Intentional paper surfaces LAST. */
html[data-theme="dark"] .vistra-live-payslip,html[data-theme="dark"] .payslip-preview-card .vistra-live-payslip,html[data-theme="dark"] .payslip-v87 .payslip-preview-head,html[data-theme="dark"] .payslip-v87 .review-calculation,html[data-theme="dark"] .payslip-v87 .review-actions{background:#fff!important;color:#152238!important;border-color:#dce4ec!important;color-scheme:light!important}

/* ========================================================================
   V107 · LOGIN SCREEN HARD ISOLATION
   The authenticated app uses a viewport/scroll shell. The login page must
   never inherit those sizing/overflow rules or the broad dark-mode audit.
   ======================================================================== */
body.context-public:has(.ml-main.login-main.standalone-login){
  margin:0!important;
  min-height:100dvh!important;
  height:auto!important;
  overflow:auto!important;
  background:#f5f7fa!important;
}
body.context-public .ml-main.login-main.standalone-login{
  margin:0!important;
  padding:24px!important;
  width:100%!important;
  max-width:none!important;
  min-height:100dvh!important;
  height:auto!important;
  overflow:auto!important;
  display:grid!important;
  place-items:center!important;
  background:radial-gradient(circle at 20% 18%,rgba(34,197,94,.07),transparent 30%),#f5f7fa!important;
}
body.context-public .ml-main.login-main.standalone-login>.ml-page-shell{
  display:grid!important;
  place-items:center!important;
  flex:none!important;
  width:100%!important;
  max-width:none!important;
  min-height:calc(100dvh - 48px)!important;
  height:auto!important;
  overflow:visible!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
}
body.context-public .ml-login-shell{
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  z-index:20!important;
  width:100%!important;
  min-height:calc(100dvh - 48px)!important;
  visibility:visible!important;
  opacity:1!important;
  background:transparent!important;
}
body.context-public .ml-login-card{
  display:block!important;
  position:relative!important;
  z-index:21!important;
  width:min(430px,calc(100vw - 36px))!important;
  visibility:visible!important;
  opacity:1!important;
  background:#fff!important;
  color:#172033!important;
  border:1px solid #e2e8f0!important;
  border-radius:22px!important;
  padding:32px!important;
  box-shadow:0 22px 60px rgba(13,27,42,.10)!important;
}
body.context-public .ml-login-brand{border-bottom-color:#edf2f7!important}
body.context-public .ml-login-brand strong,
body.context-public .ml-login-card h1{color:#172033!important}
body.context-public .ml-login-card>p,
body.context-public .ml-login-brand span,
body.context-public .ml-login-version{color:#66758f!important}
body.context-public .ml-login-card label{color:#475569!important}
body.context-public .ml-login-card input{
  background:#fff!important;color:#172033!important;border-color:#dbe1ea!important;
}
body.context-public .ml-login-card input:focus{outline:2px solid rgba(37,99,235,.18)!important;border-color:#2563eb!important}
body.context-public .ml-demo{background:#f8fafc!important;color:#475569!important;border:1px solid #edf2f7!important}
body.context-public .ml-login-form button{background:#2563eb!important;color:#fff!important}

html[data-theme="dark"] body.context-public:has(.ml-main.login-main.standalone-login){background:#0b141f!important}
html[data-theme="dark"] body.context-public .ml-main.login-main.standalone-login{
  background:radial-gradient(circle at 50% 14%,#15293b 0,#0b141f 48%,#08111a 100%)!important;
}
html[data-theme="dark"] body.context-public .ml-login-card{
  background:#111d29!important;color:#edf4fa!important;border-color:#32485d!important;
  box-shadow:0 28px 80px rgba(0,0,0,.46)!important;
}
html[data-theme="dark"] body.context-public .ml-login-brand{border-bottom-color:#2b4053!important}
html[data-theme="dark"] body.context-public .ml-login-brand strong,
html[data-theme="dark"] body.context-public .ml-login-card h1{color:#f2f6fa!important}
html[data-theme="dark"] body.context-public .ml-login-card>p,
html[data-theme="dark"] body.context-public .ml-login-brand span,
html[data-theme="dark"] body.context-public .ml-login-version{color:#93a6ba!important}
html[data-theme="dark"] body.context-public .ml-login-card label{color:#becddb!important}
html[data-theme="dark"] body.context-public .ml-login-card input{
  background:#0c1722!important;color:#eef5fa!important;border-color:#38516a!important;
}
html[data-theme="dark"] body.context-public .ml-demo{
  background:#152432!important;color:#becddb!important;border-color:#2d4256!important;
}
@media(max-width:560px){
  body.context-public .ml-main.login-main.standalone-login{padding:14px!important}
  body.context-public .ml-main.login-main.standalone-login>.ml-page-shell,
  body.context-public .ml-login-shell{min-height:calc(100dvh - 28px)!important}
  body.context-public .ml-login-card{padding:23px!important;border-radius:18px!important}
}


/* ========================================================================
   V109 · OVERLAY HOST SAFETY
   Full-screen host layers must remain transparent unless actively opened.
   V106's generic [class*=popover] dark rule accidentally painted the
   fixed #mlPopoverLayer, covering the authenticated application.
   ======================================================================== */
.ml-popover-layer,
html[data-theme="dark"] .ml-popover-layer{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:inherit!important;
}
.ml-popover-layer:not(:has(>[data-ml-floating])){pointer-events:none!important;}

/* V110 — Employment End & Final Settlement */
.contract-notice-block{margin-top:20px;padding:18px;border:1px solid var(--border,#d8e1ea);border-radius:14px;background:var(--panel-soft,#f8fbfd)}
.employment-end-section{border-top:4px solid #2f6feb}
.employment-end-primary-grid{display:grid;grid-template-columns:1.25fr 1fr 1fr 1fr;gap:12px;margin-top:12px}
.employment-end-system-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.employment-end-system-card{padding:14px 15px;border:1px solid var(--border,#d8e1ea);border-radius:12px;background:var(--surface-2,#f8fbfd);display:flex;flex-direction:column;gap:4px;min-height:96px}
.employment-end-system-card small{font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#6b7b8f)}
.employment-end-system-card b{font-size:16px;color:var(--text,#152238)}
.employment-end-system-card span{font-size:12px;color:var(--muted,#6b7b8f);line-height:1.35}
.employment-end-system-card .btn{margin-top:auto;align-self:flex-start}
.employment-end-alert{display:flex;gap:8px;align-items:flex-start;padding:12px 14px;border-radius:10px;margin:8px 0 16px;border:1px solid #f2c96d;background:#fff7df;color:#6d4b00}
.employment-end-alert.info{border-color:#bdd6f7;background:#eef6ff;color:#214b78}
.employment-history .muted{margin-top:-6px;color:var(--muted,#6b7b8f)}
.final-settlement-intro{display:flex;align-items:center;justify-content:space-between;gap:18px}
.final-settlement-intro p{margin:4px 0 0;color:var(--muted,#6b7b8f)}
.final-settlement-flow{display:flex;gap:8px;flex-wrap:wrap}
.final-settlement-flow span{padding:8px 10px;border-radius:999px;background:var(--surface-2,#eef4f9);border:1px solid var(--border,#d8e1ea);font-weight:700;font-size:12px}
.final-settlement-list-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.final-settlement-list-head h2{margin:0}.final-settlement-list-head p{margin:4px 0 0;color:var(--muted,#6b7b8f)}
.final-settlement-table td:first-child{display:flex;flex-direction:column;gap:2px}.final-settlement-table td:first-child small{color:var(--muted,#6b7b8f)}
.settlement-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;background:#e7edf4;color:#31445d;white-space:nowrap}.settlement-pill.reviewed{background:#dff5e8;color:#17623a}.settlement-pill.pending_review{background:#fff1d8;color:#8a5200}.settlement-pill.awaiting_last_day{background:#e9edf3;color:#526174}
.final-settlement-hero{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.final-settlement-hero>div{display:flex;flex-direction:column;gap:5px;padding:12px;border:1px solid var(--border,#d8e1ea);border-radius:10px;background:var(--surface-2,#f8fbfd)}.final-settlement-hero small{font-weight:700;color:var(--muted,#6b7b8f);text-transform:uppercase;font-size:10px}.final-settlement-hero b{font-size:15px}
.settlement-review-head h2{margin-bottom:4px}.settlement-review-head p{margin-top:0;color:var(--muted,#6b7b8f)}.settlement-check-table td:nth-child(3){max-width:650px;line-height:1.45}
.settlement-eoy-audit{display:flex;justify-content:space-between;align-items:center;gap:20px}.settlement-eoy-audit h2{margin:0 0 4px}.settlement-eoy-audit p{margin:0;color:var(--muted,#6b7b8f)}.settlement-eoy-numbers{display:flex;gap:12px}.settlement-eoy-numbers span{min-width:160px;padding:12px;border-radius:10px;background:var(--surface-2,#f8fbfd);border:1px solid var(--border,#d8e1ea);display:flex;flex-direction:column}.settlement-eoy-numbers small{color:var(--muted,#6b7b8f);font-weight:700}.settlement-actions{display:flex;justify-content:space-between;gap:20px;align-items:center}.settlement-actions p{margin:4px 0 0;color:var(--muted,#6b7b8f)}
.final-settlement-payroll-alert{margin:10px 0 14px;padding:14px 16px;border-radius:12px;border:1px solid #e7b24b;background:#fff8e7;display:grid;grid-template-columns:minmax(240px,1fr) minmax(320px,2fr) auto;align-items:center;gap:16px;color:#5f4300}.final-settlement-payroll-alert>div:first-child{display:flex;flex-direction:column;gap:3px}.final-settlement-payroll-alert span{font-size:12px}.final-settlement-alert-employees{display:flex;gap:8px;flex-wrap:wrap}.final-settlement-alert-employees a{display:flex;flex-direction:column;padding:8px 10px;border-radius:9px;background:#fff;border:1px solid #ead9ad;text-decoration:none;color:inherit}.final-settlement-alert-employees small{font-size:11px;color:#765d25}
html[data-theme='dark'] .contract-notice-block,html[data-theme='dark'] .employment-end-system-card,html[data-theme='dark'] .final-settlement-hero>div,html[data-theme='dark'] .settlement-eoy-numbers span{background:#142535;border-color:#2a4255}
html[data-theme='dark'] .employment-end-system-card b{color:#f4f7fb}
html[data-theme='dark'] .employment-end-alert{background:#3b2b0e;border-color:#6c4f18;color:#ffe4a1}html[data-theme='dark'] .employment-end-alert.info{background:#142c45;border-color:#2c5276;color:#cfe7ff}
html[data-theme='dark'] .final-settlement-payroll-alert{background:#30270f;border-color:#6a5420;color:#f7dda2}html[data-theme='dark'] .final-settlement-alert-employees a{background:#172737;border-color:#3c4f5d;color:#f5f7fa}html[data-theme='dark'] .final-settlement-alert-employees small{color:#b9c5cf}
@media(max-width:1100px){.employment-end-primary-grid,.employment-end-system-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.final-settlement-hero{grid-template-columns:repeat(2,minmax(0,1fr))}.final-settlement-payroll-alert{grid-template-columns:1fr}.final-settlement-intro{align-items:flex-start;flex-direction:column}}
@media(max-width:700px){.employment-end-primary-grid,.employment-end-system-grid,.final-settlement-hero{grid-template-columns:1fr}.settlement-eoy-audit,.settlement-actions{align-items:flex-start;flex-direction:column}.settlement-eoy-numbers{width:100%;flex-direction:column}.settlement-eoy-numbers span{min-width:0}}
.ml-theme-choice [data-system-theme-state]{display:block!important;font-size:9px!important;font-weight:600!important;opacity:.72;margin-top:1px}

/* V111 - EOY payment method + clearer breakdown controls */
.eoy-payment-method-box{min-width:210px;display:flex;flex-direction:column;gap:5px}.eoy-payment-method-box small{font-size:9px;font-weight:800;color:#6f7f91;letter-spacing:.05em}.eoy-payment-method-box form{margin:0}.eoy-payment-method-box select{min-width:210px}.eoy-method-explainer{margin:10px 0 14px;padding:11px 14px;border-radius:10px;border:1px solid #cfddeb;display:flex;gap:8px;align-items:flex-start;font-size:12px}.eoy-method-explainer b{white-space:nowrap}.eoy-method-explainer.info{background:#f3f8ff;color:#31536e}.eoy-method-explainer.warning{background:#fff7e8;border-color:#efcf96;color:#7b5517}.eoy-method-help{margin:-5px 0 14px}.employment-end-primary-grid .field-info-dot{vertical-align:middle}
html[data-theme="dark"] .eoy-method-explainer.info{background:#102537;border-color:#284860;color:#c8e5f8}html[data-theme="dark"] .eoy-method-explainer.warning{background:#302513;border-color:#5f4822;color:#f6d99b}
@media(max-width:1100px){.eoy-workflow-bar{flex-wrap:wrap}.eoy-payment-method-box{order:2}.eoy-workflow-actions{order:3;width:100%}}

/* V112 — Final Settlement audit workspace */
.final-settlement-payroll-alert{border-color:#e05a64;background:#fff0f1;color:#7d1520;box-shadow:inset 4px 0 0 #cf2534}
.final-settlement-alert-employees a{border-color:#efc2c6;background:#fff;color:#721b24}.final-settlement-alert-employees small{color:#99515a}
html[data-theme='dark'] .final-settlement-payroll-alert{background:#32171c;border-color:#a83b46;color:#ffd9dd;box-shadow:inset 4px 0 0 #e05260}
html[data-theme='dark'] .final-settlement-alert-employees a{background:#1b2937;border-color:#6b3941;color:#fff2f3}html[data-theme='dark'] .final-settlement-alert-employees small{color:#d7a6ac}
.fs-audit-section{margin-top:14px}.fs-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:14px}.fs-section-head h2{margin:3px 0 4px}.fs-section-head p{margin:0;color:var(--muted,#6b7b8f);max-width:950px}.fs-fact-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.fs-fact-grid>div,.fs-money-summary>div{padding:12px;border:1px solid var(--border,#d8e1ea);background:var(--surface-2,#f8fbfd);border-radius:10px;display:flex;flex-direction:column;gap:4px}.fs-fact-grid small,.fs-money-summary small{font-size:10px;text-transform:uppercase;font-weight:800;color:var(--muted,#6b7b8f)}.fs-fyi{font-size:9px;padding:2px 6px;border-radius:999px;background:#e9eef5;color:#586a80;margin-left:5px}.fs-source{font-size:11px;font-weight:700;color:#48647f}.fs-source-badge{white-space:nowrap;padding:7px 10px;border:1px solid var(--border,#d8e1ea);border-radius:999px;font-size:11px;font-weight:800;background:var(--surface-2,#f8fbfd)}.fs-money-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px}.fs-money-summary b{font-size:15px}.fs-pay-basis{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.fs-pay-basis span{border:1px solid var(--border,#d8e1ea);border-radius:999px;padding:6px 9px;font-size:11px}.fs-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.fs-two-col h3{margin:0 0 8px}.fs-mini-table td:first-child{display:flex;flex-direction:column}.fs-mini-table td:first-child small{color:var(--muted,#6b7b8f)}.table .num{text-align:right;white-space:nowrap}.fs-empty{padding:18px;border:1px dashed var(--border,#d8e1ea);border-radius:10px;display:flex;flex-direction:column;gap:4px;color:var(--muted,#6b7b8f)}.fs-empty b{color:var(--text,#172235)}.fs-breakdown-details{margin-top:12px;border:1px solid var(--border,#d8e1ea);border-radius:10px;overflow:hidden}.fs-breakdown-details>summary{padding:12px 14px;cursor:pointer;font-weight:800;background:var(--surface-2,#f8fbfd)}.fs-eoy-matrix{padding:0}.fs-eoy-matrix table{min-width:1450px}.fs-eoy-matrix td:first-child{min-width:240px}.fs-eoy-matrix td:first-child small{display:block;color:var(--muted,#6b7b8f)}.fs-group-row td{background:var(--surface-2,#eef4f9);font-weight:800;text-transform:uppercase;font-size:10px;color:var(--muted,#6b7b8f)}.fs-total-row td{border-top:2px solid #66a57d;background:#edf8f1}.settlement-check-table .fs-source{white-space:nowrap}.settlement-eoy-audit-full .settlement-eoy-numbers{margin-left:auto}
html[data-theme='dark'] .fs-fact-grid>div,html[data-theme='dark'] .fs-money-summary>div,html[data-theme='dark'] .fs-source-badge,html[data-theme='dark'] .fs-breakdown-details>summary{background:#142535;border-color:#2a4255}html[data-theme='dark'] .fs-fyi{background:#25394d;color:#c5d4e3}html[data-theme='dark'] .fs-source{color:#9dbbd5}html[data-theme='dark'] .fs-group-row td{background:#172a3a}html[data-theme='dark'] .fs-total-row td{background:#153525;border-color:#4c9a6c}html[data-theme='dark'] .fs-empty b{color:#f5f7fa}
@media(max-width:1200px){.fs-fact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fs-money-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.fs-two-col{grid-template-columns:1fr}}
@media(max-width:700px){.fs-fact-grid,.fs-money-summary{grid-template-columns:1fr}.fs-section-head{flex-direction:column}.settlement-eoy-audit-full .settlement-eoy-numbers{margin-left:0;width:100%}}
/* V114 final-settlement context and employment-end save */
.employment-end-section-actions{display:flex;align-items:center;gap:12px;margin:12px 0}.employment-end-section-actions small{opacity:.72}
.final-settlement-context{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.final-settlement-context span{opacity:.75;flex:1 1 480px}.final-settlement-filters{display:flex;gap:8px}.final-settlement-filters select{min-width:140px}
.eoy-base-note{margin-top:8px}

/* V115 final settlement / leaver cues */
.fs-inline-action{margin-top:8px}.fs-inline-action form{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.fs-inline-action input{min-width:220px;max-width:320px}.fs-inline-action .small{padding:7px 10px;font-size:12px}.fs-potential{display:block;margin-top:6px;font-weight:700;color:#2455a6}.leave-leaver-note{display:block;margin-top:5px;font-size:11px;font-weight:700;color:#2455a6}

/* V116 final-settlement calculation workspace */
.fs-subsection-title{margin:18px 0 8px;font-size:13px;letter-spacing:.02em}.fs-subsection-muted{margin-top:24px;color:var(--muted)}
.fs-calculation-stack{display:grid;gap:16px;margin:16px 0}.fs-calc-card{overflow:hidden}.fs-calc-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}.fs-calc-card-head h2{margin:2px 0 4px}.fs-calc-card-head p{margin:0;color:var(--muted);max-width:900px}.fs-card-amount{text-align:right;min-width:180px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}.fs-card-amount span{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:700}.fs-card-amount b{display:block;font-size:20px;margin-top:3px}
.fs-calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:9px;margin:10px 0 12px}.fs-calc-grid>div{border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:var(--surface-2)}.fs-calc-grid small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;font-weight:700}.fs-calc-grid b{display:block;margin-top:4px}.fs-formula-strip{padding:11px 13px;border-radius:10px;background:var(--surface-2);border-left:3px solid var(--primary);margin:10px 0 14px;line-height:1.55}.fs-card-note{display:block;color:var(--muted);margin-top:8px}
.fs-severance-options{display:grid;gap:14px;margin-top:14px}.fs-severance-option{border:1px solid var(--border);border-radius:14px;padding:16px;background:var(--surface)}.fs-severance-option.selected{outline:2px solid var(--primary);outline-offset:0}.fs-severance-option.recommended:not(.selected){border-color:color-mix(in srgb,var(--primary) 55%,var(--border))}.fs-sev-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.fs-sev-head h3{margin:5px 0 0;font-size:17px}.fs-sev-tag{display:inline-block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}.fs-sev-value{font-size:18px;font-weight:800;white-space:nowrap}.fs-recommended-badge{display:inline-block;margin-top:8px;padding:4px 8px;border-radius:999px;background:var(--surface-2);font-size:11px;font-weight:700}.fs-sev-why{margin:12px 0;padding:10px 12px;border-radius:9px;background:var(--surface-2);font-size:12px}.fs-sev-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.fs-sev-columns h4,.fs-sev-calculation h4{margin:4px 0 7px;font-size:12px;text-transform:uppercase;letter-spacing:.02em}.fs-sev-columns ul{margin:0;padding-left:18px}.fs-sev-columns li{margin:5px 0;line-height:1.45}.fs-sev-calculation{margin-top:13px;border-top:1px solid var(--border);padding-top:11px}.fs-sev-calculation>div{display:flex;justify-content:space-between;gap:20px;padding:5px 0}.fs-sev-calculation>div:last-child{border-top:1px solid var(--border);margin-top:4px;padding-top:9px}.fs-sev-offsets{margin-top:12px;padding:10px 12px;border-radius:9px;background:var(--surface-2);line-height:1.5}.fs-sev-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,240px);gap:10px;align-items:end;margin-top:14px}.fs-sev-form label{font-size:11px;font-weight:700;color:var(--muted)}.fs-sev-form input{margin-top:5px;width:100%}.fs-sev-form .fs-sev-basis{grid-column:1/-1}.fs-sev-form button{justify-self:start}.fs-clear-treatment{margin-top:14px}.fs-total-row td{border-top:2px solid var(--border)}
@media(max-width:900px){.fs-calc-card-head,.fs-sev-head{flex-direction:column}.fs-card-amount{width:100%;text-align:left}.fs-sev-columns{grid-template-columns:1fr}.fs-sev-form{grid-template-columns:1fr}.fs-sev-value{white-space:normal}}

/* V117 · linked regular / separate EOY payslip preview */
.payslip-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.payslip-view-switch{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.payslip-view-switch .button{min-width:auto;padding:8px 12px;border-radius:9px}
.payslip-view-switch .button.active{background:#2563eb;color:#fff;border-color:#2563eb}

/* V119 settlement / leave payout controls */
.leave-cashout-amount{margin-top:7px;padding-top:6px;border-top:1px solid #dce6f1;display:grid;gap:2px}.leave-cashout-amount span,.leave-cashout-amount small{font-size:10px;color:#65758a}.leave-cashout-amount b{font-size:12px}.leave-cashout-btn{margin-top:7px;width:100%;font-size:10px;padding:6px 8px}.fs-amount-action{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;flex-wrap:wrap}.fs-amount-action form{margin:0}.fs-amount-action button{white-space:nowrap;padding:6px 10px;font-size:11px}.fs-payslip-state{display:block;margin-top:4px;color:#6b7789;font-size:10px}

/* V121 employee master clean-up */
.employee-master-form{display:flex;flex-direction:column}
.payslip-security-card{margin-top:16px;padding:14px 16px;border:1px solid #dbeafe;background:#f8fbff;border-radius:12px;display:grid;gap:10px}
.payslip-security-card>div:first-child{display:flex;flex-direction:column;gap:3px}.payslip-security-card small{color:#64748b}
.payslip-password-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.payslip-password-row code{font-size:14px;font-weight:900;letter-spacing:1.4px;background:#fff;border:1px solid #dbe1ea;border-radius:8px;padding:8px 12px;color:#172033}
.employee-inline-warning{margin:14px 0 0;padding:12px 14px;border:1px solid #f0c36d;background:#fff8e8;border-radius:10px;display:flex;flex-direction:column;gap:4px;color:#7c4a03}.employee-inline-warning span{color:#7c4a03}
.ml-master-tool[data-tone="edf"] .ml-tool-icon{background:linear-gradient(135deg,#eee9ff,#e5f3ff);color:#6157c9;box-shadow:inset 0 0 0 1px rgba(97,87,201,.08)}
html[data-theme="dark"] .ml-master-tool[data-tone="edf"] .ml-tool-icon{background:linear-gradient(135deg,#2b264a,#17354a)!important;color:#b8b3ff!important}

/* V132 Reports */
.report-page-head{align-items:flex-end}.report-title-actions,.report-toolbar,.report-card-actions{display:flex;gap:10px;align-items:center}.report-category-tabs{display:flex;gap:8px;margin:0 0 18px;flex-wrap:wrap}.report-category-tabs button{border:1px solid #dbe4ee;background:#fff;border-radius:999px;padding:8px 14px;color:#53657b;font-weight:700}.report-category-tabs button.active{background:#122a43;color:#fff;border-color:#122a43}.report-library-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:14px}.report-library-card{background:#fff;border:1px solid #dfe7ef;border-radius:14px;padding:18px;display:grid;grid-template-columns:42px 1fr auto;gap:14px;align-items:start}.report-card-icon{width:42px;height:42px;border-radius:11px;background:#edf4ff;color:#2a67cc;display:grid;place-items:center;font-weight:800;font-size:18px}.report-card-category{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#7890aa;font-weight:800}.report-card-main h2{font-size:17px;margin:3px 0 5px}.report-card-main p{margin:0;color:#64748b;font-size:13px;line-height:1.45}.report-card-actions{flex-direction:column;align-items:flex-end}.report-star{border:1px solid #dbe4ee;background:#fff;color:#b4c0cf;border-radius:9px;width:34px;height:34px;font-size:18px;cursor:pointer}.report-star.active{color:#e2a600;background:#fff9df;border-color:#f1d36a}.report-star.large{width:40px;height:40px}.report-filter-panel{margin-bottom:14px}.report-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.report-filters label{min-width:145px;font-size:11px;font-weight:800;color:#61748b;text-transform:uppercase;letter-spacing:.04em}.report-filters input,.report-filters select{display:block;width:100%;margin-top:5px;min-height:38px}.report-toolbar{justify-content:space-between;margin:10px 0 14px;color:#64748b}.report-toolbar>div:last-child{display:flex;gap:8px}.report-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:14px}.report-summary-card{background:#fff;border:1px solid #dfe7ef;border-radius:12px;padding:14px 16px}.report-summary-card small{display:block;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:#7890aa;font-size:10px;margin-bottom:6px}.report-summary-card strong{font-size:20px;color:#17324d}.report-table-panel{padding:0;overflow:hidden}.report-table-head{display:flex;justify-content:space-between;align-items:end;padding:16px 18px;border-bottom:1px solid #e5ebf1}.report-table-head h2{margin:0 0 3px;font-size:17px}.report-table-head p{margin:0;color:#718096;font-size:12px}.report-search{font-size:11px;font-weight:800;color:#718096}.report-search input{display:block;margin-top:4px;min-width:220px}.report-table-scroll{overflow:auto;max-height:62vh}.report-table{margin:0;min-width:980px}.report-table th{position:sticky;top:0;background:#f7f9fc;z-index:1;cursor:pointer;white-space:nowrap}.report-table td{white-space:nowrap}.money-cell{text-align:right;font-variant-numeric:tabular-nums}.sort-mark{opacity:.35;font-size:11px}.report-empty{text-align:center!important;color:#8291a4;padding:32px!important}.ml-nav a[title="Reports"] span{font-size:14px}@media print{.ml-sidebar,.ml-workspace-tabs-shell,.report-filter-panel,.report-toolbar,.report-title-actions,.report-search{display:none!important}.ml-main{margin-left:0!important}.report-table-scroll{max-height:none;overflow:visible}.report-table{min-width:0;font-size:8px}.report-summary-grid{grid-template-columns:repeat(4,1fr)}}

/* ========================================================================
   V133 · REPORT LIST, DYNAMIC PERIOD FILTERS & READABILITY PASS
   ======================================================================== */
/* Author CSS on labels can override the browser's [hidden] rule. Make all
   dynamic report fields genuinely disappear when not relevant. */
.report-filters [hidden],
.report-list-row[hidden],
.report-library-empty[hidden]{display:none!important}

/* Xero-inspired readability: preserve density, remove micro-text. */
body.ml-body{font-size:14px!important;line-height:1.42!important}
.ml-main p,.ml-main .muted{font-size:13.5px;line-height:1.48}
.ml-main h1{font-size:27px!important;line-height:1.18!important}
.ml-main h2{font-size:18px;line-height:1.25}
.ml-main h3{font-size:15px;line-height:1.3}
.ml-main label{font-size:12.5px;line-height:1.3}
.ml-main input,.ml-main select,.ml-main textarea{font-size:13.5px;line-height:1.35}
.ml-main .btn,.ml-main button{font-size:12.5px;line-height:1.25}
.ml-main table{font-size:13px}
.ml-main th{font-size:10.5px;line-height:1.25}
.ml-main td{line-height:1.38}
.ml-main td small{font-size:11px;line-height:1.35}
.ml-main .eyebrow{font-size:10.5px!important;line-height:1.2!important}
.ml-main .badge{font-size:10.5px}

/* Navigation and persistent app chrome need to remain readable at a glance. */
.ml-sidebar .ml-nav a,.ml-sidebar .ml-nav button{font-size:13px!important}
.ml-sidebar .ml-nav a span{font-size:13px!important}
.ml-sidebar .sidebar-section-label{font-size:9.5px!important}
.ml-sidebar .sidebar-client label{font-size:9.5px!important}
.ml-workspace-tab a{font-size:12px!important}

/* Key payroll workbench controls were particularly small. */
.v60-titlebar .payroll-meta{font-size:12px!important}
.command-group-label{font-size:9.5px!important}
.command-action b{font-size:12px!important;line-height:1.2!important}
.command-action small{font-size:9.5px!important;line-height:1.28!important}
.command-period-form input{font-size:12px!important}
.v60-primary-filters>button,.filter-more-menu>summary{font-size:12px!important}
.v60-payroll-table th{font-size:10px!important}
.v60-payroll-table th,.v60-payroll-table td{font-size:12px!important;line-height:1.35!important}
.v60-payroll-table .money-input{font-size:12px!important}

/* Leave screens: raise the most common 8–10px text without making the sheet
   materially wider. */
.leave-rule-card p{font-size:12px!important}
.leave-rule-code,.leave-category,.leave-rule-metrics small,.leave-sheet-rulebar span,
.leave-sheet-table .leave-employee small,.leave-eligibility,.pay-treatment,.leave-cycle-label{font-size:10px!important}
.leave-rule-metrics b,.leave-version-editor>summary,.leave-sheet-table,.leave-sheet-table input{font-size:11.5px!important}
.leave-policy-table th,.leave-sheet-table th{font-size:10px!important}
.leave-policy-table input,.leave-policy-table select{font-size:11.5px!important}
.leave-sheet-rulebar p,.leave-sheet-footer{font-size:11px!important}

/* Report library is now a scalable list rather than cards. */
.report-page-head{align-items:flex-end}
.report-library-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:0 0 14px}
.report-category-tabs{display:flex;gap:8px;margin:0;flex-wrap:wrap}
.report-category-tabs button{border:1px solid #dbe4ee;background:#fff;border-radius:999px;padding:8px 14px;color:#53657b;font-weight:700;font-size:12.5px!important}
.report-category-tabs button.active{background:#122a43;color:#fff;border-color:#122a43}
.report-library-search{margin:0!important;width:min(290px,100%);font-size:11px!important;text-transform:uppercase;letter-spacing:.04em;color:#61748b!important}
.report-library-search input{margin-top:5px!important;min-height:38px}
.report-library-list-panel{padding:0!important;overflow:hidden}
.report-list-head,.report-list-row{display:grid;grid-template-columns:52px minmax(230px,1.1fr) 130px minmax(300px,1.8fr) 120px;align-items:center;gap:14px}
.report-list-head{padding:10px 16px;background:#f6f8fb;border-bottom:1px solid #e1e8ef;color:#66788d;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.report-list-row{min-height:68px;padding:10px 16px;border-bottom:1px solid #e8edf2;background:#fff;transition:background .12s ease}
.report-list-row:last-child{border-bottom:0}.report-list-row:hover{background:#f8fbfd}
.report-favourite-col{display:flex;align-items:center;justify-content:center}.report-favourite-col form{margin:0!important}
.report-star{display:grid!important;place-items:center!important;border:1px solid #d6e0e9!important;background:#fff!important;color:#9aabbb!important;border-radius:8px!important;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;font-size:20px!important;line-height:1!important;font-family:"Segoe UI Symbol","Arial Unicode MS",sans-serif!important;font-weight:400!important;box-shadow:none!important}
.report-star:hover{background:#f7fafc!important;border-color:#b9c8d6!important;color:#607991!important}.report-star.active{color:#d89b00!important;background:#fffaf0!important;border-color:#e7c66b!important}.report-star.large{width:40px!important;height:40px!important;min-width:40px!important;font-size:23px!important}
.report-list-name{display:flex;align-items:center;gap:11px;min-width:0}.report-list-name strong{display:block;font-size:14px;color:#1d354e;font-weight:700}.report-list-icon{width:32px;height:32px;flex:0 0 32px;border-radius:8px;background:#edf4ff;color:#2a67cc;display:grid;place-items:center;font-weight:800;font-size:14px}
.report-category-pill{display:inline-flex;align-items:center;padding:5px 8px;border:1px solid #dfe7ef;border-radius:999px;background:#f8fafc;color:#5e7286;font-size:11px;font-weight:700}
.report-list-description{color:#65788d;font-size:12.5px;line-height:1.4}.report-list-action{text-align:right}.report-list-action .btn{white-space:nowrap;padding:8px 11px!important}
.report-library-empty{padding:30px;text-align:center;color:#718398;font-size:13px}

/* Report page filters: only relevant controls exist visually. */
.report-filter-panel{margin-bottom:14px}
.report-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.report-filters label{min-width:150px;margin:0!important;font-size:11px!important;font-weight:800;color:#61748b!important;text-transform:uppercase;letter-spacing:.04em}
.report-filters input,.report-filters select{display:block;width:100%;margin-top:5px!important;min-height:40px;font-size:13px!important}
.report-filters .btn{min-height:40px;padding:9px 15px!important}
.report-toolbar{font-size:13px}
.report-table-head p{font-size:12.5px!important}.report-search{font-size:11px!important}.report-search input{font-size:13px!important}
.report-summary-card small{font-size:10.5px!important}.report-summary-card strong{font-size:21px!important}

@media(max-width:1100px){
  .report-library-toolbar{align-items:stretch;flex-direction:column}
  .report-library-search{width:100%;max-width:420px}
  .report-list-head{display:none}
  .report-list-row{grid-template-columns:42px minmax(190px,1fr) auto;gap:10px}
  .report-list-row>.report-list-description{grid-column:2/-1}
  .report-list-row>.report-list-action{grid-column:2/-1;text-align:left}
}

/* V134 — unified report alignment */
.report-page-shell{width:100%;display:grid;gap:14px}
.report-page-shell>.page-head,.report-page-shell>.panel,.report-page-shell>.report-toolbar,.report-page-shell>.report-summary-grid{width:100%;box-sizing:border-box;margin-left:0;margin-right:0}
.report-page-shell .report-page-head{margin-bottom:0;min-height:70px;align-items:flex-end}
.report-page-shell .report-filter-panel{margin-bottom:0;padding:18px 20px}
.report-page-shell .report-toolbar{margin:0;min-height:42px;align-items:center}
.report-page-shell .report-summary-grid{margin-bottom:0}
.report-page-shell .report-table-panel{margin:0;width:100%}
.report-page-shell .report-table-head{padding:18px 20px;align-items:flex-end}
.report-page-shell .report-table-scroll{width:100%}
.report-page-shell .report-table{width:100%;min-width:980px}
.report-page-shell .report-table th,.report-page-shell .report-table td{padding:11px 12px}
.report-page-shell .report-table tfoot td{position:sticky;bottom:0;background:#f7f9fc;border-top:2px solid #d9e2ec;z-index:1;font-variant-numeric:tabular-nums}
.report-page-shell .report-title-actions{margin-left:auto}
.report-page-shell .report-filters{width:100%;align-items:flex-end}
.report-page-shell .report-filters .btn{align-self:flex-end}
@media(max-width:900px){.report-page-shell .report-toolbar{align-items:flex-start;gap:10px;flex-direction:column}.report-page-shell .report-table-head{align-items:flex-start;gap:12px;flex-direction:column}.report-page-shell .report-search,.report-page-shell .report-search input{width:100%;min-width:0}}

/* V135 report-column alignment: headers, body and totals always share the same rule. */
.report-table th.report-align-left,.report-table td.report-align-left{text-align:left!important}
.report-table th.report-align-center,.report-table td.report-align-center{text-align:center!important}
.report-table th.report-align-right,.report-table td.report-align-right{text-align:right!important;font-variant-numeric:tabular-nums}

/* ========================================================================
   V138 · GLOBAL READABILITY + WIDE REPORT PERFORMANCE
   ======================================================================== */
/* A calmer, more readable application-wide type scale. */
body.ml-body{font-size:15px!important;line-height:1.5!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.ml-main p,.ml-main .muted{font-size:14px!important;line-height:1.55!important}
.ml-main h1{font-size:28px!important;line-height:1.2!important;letter-spacing:-.015em}
.ml-main h2{font-size:19px!important;line-height:1.3!important}
.ml-main h3{font-size:16px!important;line-height:1.35!important}
.ml-main label{font-size:13px!important;line-height:1.4!important}
.ml-main input,.ml-main select,.ml-main textarea{font-size:14px!important;line-height:1.4!important;min-height:40px}
.ml-main .btn,.ml-main button{font-size:13.5px!important;line-height:1.3!important}
.ml-main table{font-size:13.5px!important}
.ml-main th{font-size:11.25px!important;line-height:1.35!important;letter-spacing:.025em}
.ml-main td{font-size:13.5px!important;line-height:1.45!important}
.ml-main td small,.ml-main small{font-size:11.5px;line-height:1.4}
.ml-main .eyebrow{font-size:11px!important;line-height:1.3!important}
.ml-main .badge{font-size:11px!important}
.ml-sidebar .ml-nav a,.ml-sidebar .ml-nav button{font-size:14px!important;line-height:1.35!important}
.ml-sidebar .ml-nav a span{font-size:14px!important}
.ml-sidebar .sidebar-section-label,.ml-sidebar .sidebar-client label{font-size:10.5px!important;line-height:1.35!important}
.ml-workspace-tab a{font-size:13px!important}

/* Keep dense payroll grids usable, but no longer microscopic. */
.v60-payroll-table th{font-size:10.75px!important;line-height:1.35!important}
.v60-payroll-table th,.v60-payroll-table td{font-size:12.75px!important;line-height:1.42!important}
.v60-payroll-table .money-input{font-size:12.75px!important}
.command-group-label{font-size:10.5px!important}.command-action b{font-size:13px!important}.command-action small{font-size:10.5px!important}

/* Reports: improve scanability without sacrificing data density. */
.report-filters label{font-size:11.5px!important}.report-filters input,.report-filters select{font-size:14px!important}
.report-toolbar{font-size:13.5px!important}.report-table-head h2{font-size:18px!important}.report-table-head p{font-size:13px!important}
.report-search{font-size:11.5px!important}.report-search input{font-size:14px!important}
.report-summary-card small{font-size:11px!important}.report-summary-card strong{font-size:22px!important}
.report-page-shell .report-table th,.report-page-shell .report-table td{padding:12px 13px}

/* PRGF Exit is intentionally wide. Use native composited scrolling and keep
   employee identity visible while the 13-month history moves horizontally. */
.prgf-exit-panel{overflow:hidden!important}
.prgf-exit-scroll{
  overflow-x:auto!important;overflow-y:auto!important;max-height:64vh;
  scrollbar-gutter:stable both-edges;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;scroll-behavior:auto;
  contain:layout paint;will-change:scroll-position;
}
.prgf-exit-scroll::-webkit-scrollbar{height:12px;width:10px}
.prgf-exit-scroll::-webkit-scrollbar-track{background:#edf2f7;border-radius:999px}
.prgf-exit-scroll::-webkit-scrollbar-thumb{background:#8797a8;border:2px solid #edf2f7;border-radius:999px}
.prgf-exit-table{width:max-content!important;min-width:2850px!important;table-layout:fixed!important}
.prgf-exit-table th,.prgf-exit-table td{white-space:nowrap!important;box-sizing:border-box}
.prgf-exit-table th:nth-child(1),.prgf-exit-table td:nth-child(1){width:145px;min-width:145px;max-width:145px}
.prgf-exit-table th:nth-child(2),.prgf-exit-table td:nth-child(2){width:130px;min-width:130px;max-width:130px}
.prgf-exit-table th:nth-child(3),.prgf-exit-table td:nth-child(3){width:180px;min-width:180px;max-width:180px}
.prgf-exit-table th:nth-child(4),.prgf-exit-table td:nth-child(4){width:112px;min-width:112px;max-width:112px}
.prgf-exit-table th:nth-child(5),.prgf-exit-table td:nth-child(5){width:112px;min-width:112px;max-width:112px}
.prgf-exit-table th:nth-child(6),.prgf-exit-table td:nth-child(6){width:116px;min-width:116px;max-width:116px}
.prgf-exit-table th:nth-child(1),.prgf-exit-table td:nth-child(1){position:sticky;left:0;z-index:5;background:#fff}
.prgf-exit-table th:nth-child(2),.prgf-exit-table td:nth-child(2){position:sticky;left:145px;z-index:5;background:#fff}
.prgf-exit-table th:nth-child(3),.prgf-exit-table td:nth-child(3){position:sticky;left:275px;z-index:5;background:#fff}
.prgf-exit-table th:nth-child(4),.prgf-exit-table td:nth-child(4){position:sticky;left:455px;z-index:5;background:#fff}
.prgf-exit-table th:nth-child(5),.prgf-exit-table td:nth-child(5){position:sticky;left:567px;z-index:5;background:#fff}
.prgf-exit-table th:nth-child(6),.prgf-exit-table td:nth-child(6){position:sticky;left:679px;z-index:5;background:#fff;border-right:1px solid #d9e2ec}
.prgf-exit-table thead th:nth-child(-n+6){z-index:9;background:#f7f9fc!important}
.prgf-exit-table tfoot td:nth-child(-n+6){z-index:8;background:#f7f9fc!important}
.prgf-exit-table tbody tr:hover td:nth-child(-n+6){background:#f8fbfd}

@media(max-width:900px){
  body.ml-body{font-size:14.5px!important}.ml-main table{font-size:13px!important}
  .prgf-exit-table{min-width:2700px!important}
}

/* ========================================================================
   V139 · APPLICATION-WIDE TYPOGRAPHY / READABILITY RESET
   User-interface only: printed reports and generated PDFs keep their own
   purpose-built typography. This layer deliberately overrides historic
   micro-text from older modules so current and future screens inherit a
   consistent readable scale.
   ======================================================================== */
@media screen {
  :root{
    --ml-font-ui:Inter,"Segoe UI",Arial,sans-serif;
    --ml-font-xs:12px;
    --ml-font-sm:12.75px;
    --ml-font-base:14px;
    --ml-font-md:15px;
    --ml-font-lg:17px;
    --ml-font-xl:22px;
    --ml-text:#172033;
    --ml-text-secondary:#53657a;
    --ml-text-muted:#6b7c90;
  }

  html,body{font-family:var(--ml-font-ui)!important}
  body.ml-body{font-size:15px!important;line-height:1.52!important;color:var(--ml-text)!important}
  .ml-main{font-size:14px!important;line-height:1.5!important}
  .ml-main h1{font-size:28px!important;line-height:1.18!important;font-weight:750!important;letter-spacing:-.018em!important}
  .ml-main h2{font-size:19px!important;line-height:1.28!important;font-weight:720!important}
  .ml-main h3{font-size:16px!important;line-height:1.32!important;font-weight:700!important}
  .ml-main p,.ml-main .muted{font-size:14px!important;line-height:1.55!important;color:var(--ml-text-secondary)!important}
  .ml-main small{font-size:12px!important;line-height:1.42!important;color:var(--ml-text-muted)}
  .ml-main label{font-size:13px!important;line-height:1.4!important;color:#465a70!important}
  .ml-main input,.ml-main select,.ml-main textarea{font-family:var(--ml-font-ui)!important;font-size:14px!important;line-height:1.4!important;min-height:40px}
  .ml-main input::placeholder,.ml-main textarea::placeholder{font-size:13.5px!important;color:#7f8da0!important}
  .ml-main .btn,.ml-main button,.ml-main .button{font-family:var(--ml-font-ui)!important;font-size:13.5px!important;line-height:1.3!important;font-weight:700!important}
  .ml-main table{font-size:13.5px!important;line-height:1.45!important}
  .ml-main th{font-size:11.75px!important;line-height:1.35!important;font-weight:750!important;letter-spacing:.025em!important;color:#465d74!important}
  .ml-main td{font-size:13.5px!important;line-height:1.45!important}
  .ml-main td small{font-size:12px!important;line-height:1.4!important}

  /* Common status / metadata elements: never micro-text. */
  .badge,.status-pill,.payroll-status-pill,.import-status,.portal-pill,
  .recurring-badge,.matrix-state,.ot-class-pill,.decl-chip,
  .current-tax-strip span,.report-category-pill,.leave-as-required{
    font-size:11.5px!important;line-height:1.25!important;letter-spacing:.015em!important
  }
  .eyebrow,.ml-context-label,.ml-nav-label,.sidebar-section-label,
  .report-card-category{font-size:11.5px!important;line-height:1.3!important}
  .notice,.note,.flash{font-size:13px!important;line-height:1.5!important}

  /* Sidebar / persistent navigation. */
  .ml-product-wordmark strong{font-size:16px!important;line-height:1.2!important}
  .ml-product-wordmark span{font-size:12px!important;line-height:1.3!important}
  .ml-workspace-identity b,.ml-user-card b{font-size:13.5px!important;line-height:1.3!important}
  .ml-workspace-identity small,.ml-user-card span,.ml-version{font-size:11.5px!important;line-height:1.35!important}
  .ml-client-select{font-size:13.5px!important}
  .ml-sidebar .ml-nav a,.ml-sidebar .ml-nav button,.ml-sidebar .ml-nav a span{font-size:14px!important;line-height:1.35!important}
  .ml-workspace-tab a{font-size:13px!important}

  /* Payroll command bar and overview screens. */
  .v60-titlebar .payroll-title-line h1{font-size:27px!important}
  .v60-titlebar .payroll-meta,.payroll-meta{font-size:12.5px!important;line-height:1.4!important;color:#586c82!important}
  .command-group-label{font-size:11px!important;line-height:1.2!important;letter-spacing:.065em!important}
  .command-action{min-height:48px!important;padding:7px 10px!important}
  .command-action>span{font-size:15px!important}
  .command-action b{font-size:13.5px!important;line-height:1.2!important;font-weight:750!important}
  .command-action small{font-size:11.5px!important;line-height:1.3!important;margin-top:2px!important}
  .command-period-form input{font-size:13.5px!important;min-height:48px!important}
  .command-icon-btn{height:48px!important;min-height:48px!important}
  .command-popover b{font-size:13px!important}.command-popover small{font-size:11.5px!important;line-height:1.35!important}
  .v60-primary-filters>button,.filter-more-menu>summary,.filter-popover button{font-size:12.5px!important;line-height:1.3!important}
  .v60-primary-filters>button,.filter-more-menu>summary{min-height:38px!important}

  /* Main payroll calculation grid. Density remains payroll-friendly, but readable. */
  .v60-payroll-table th{font-size:11.5px!important;line-height:1.35!important;padding:11px 9px!important}
  .v60-payroll-table td{font-size:13px!important;line-height:1.42!important;padding:11px 9px!important}
  .v60-payroll-table td small,.v60-payroll-table .employee-cell small{font-size:11.75px!important;line-height:1.35!important}
  .v60-payroll-table .money-input{font-size:13.5px!important;min-height:38px!important}
  .drilldown-cell a small{font-size:11px!important}
  .row-actions,.input-link{font-size:12.5px!important}

  /* Monthly inputs / allowances / deductions / OT matrices. */
  .input-workspace-tabs a{font-size:13px!important;line-height:1.3!important;padding-top:9px!important;padding-bottom:9px!important}
  .input-workspace-search input{font-size:14px!important}
  .matrix-save-state{font-size:12.5px!important}
  .matrix-help-strip,.matrix-help-strip span,.matrix-help-strip b{font-size:12px!important;line-height:1.45!important}
  .input-matrix-table{font-size:13.5px!important}
  .input-matrix-table th{font-size:11.5px!important;line-height:1.32!important;padding-top:11px!important;padding-bottom:11px!important}
  .input-matrix-table td{font-size:13.5px!important;line-height:1.4!important}
  .matrix-col-title{font-size:12px!important;line-height:1.25!important}
  .input-matrix-table th small{font-size:10.75px!important;line-height:1.25!important}
  .matrix-employee-cell b{font-size:13.5px!important;line-height:1.3!important}
  .matrix-employee-cell small{font-size:11.75px!important;line-height:1.35!important}
  .matrix-input{font-size:14px!important;line-height:1.3!important;min-height:38px!important}
  .matrix-calculated-amount,.matrix-cell-meta,.matrix-delta{font-size:11.5px!important;line-height:1.3!important}
  .recurring-badge{font-size:10.75px!important;line-height:1.25!important;padding-top:3px!important;padding-bottom:3px!important}
  .salary-basis-table th{font-size:11.5px!important}.salary-basis-table td{font-size:13.5px!important}
  .salary-basis-table small,.salary-formula-hint{font-size:11.75px!important;line-height:1.35!important}
  .v67-ot-sheet th{font-size:11.25px!important}.v67-ot-sheet td{font-size:13px!important}.v67-ot-sheet small{font-size:11.5px!important}

  /* Leave workspace: previously one of the smallest areas in the app. */
  .leave-workspace-title p{font-size:13.5px!important;color:#607389!important}
  .leave-toolbar-field{font-size:12px!important;line-height:1.35!important;color:#52677c!important;font-weight:700!important}
  .leave-toolbar-field input,.leave-toolbar-field select{height:42px!important;min-height:42px!important;font-size:13.5px!important;padding:8px 10px!important}
  .leave-workspace-toolbar .btn{height:42px!important;font-size:13px!important}
  .leave-quick-types{min-height:38px!important;gap:7px!important}
  .leave-quick-types>span,.leave-quick-types a,.leave-quick-types small{font-size:11.5px!important;line-height:1.3!important}
  .leave-quick-types a{padding:7px 10px!important}
  .leave-sheet-rulebar b{font-size:14px!important;line-height:1.3!important}
  .leave-sheet-rulebar span,.leave-sheet-rulebar p{font-size:12px!important;line-height:1.45!important}
  .leave-sheet-hint,.leave-sheet-hint b,.leave-sheet-hint span{font-size:11.75px!important;line-height:1.45!important}
  .leave-sheet-table{font-size:13px!important;line-height:1.42!important}
  .leave-sheet-table th,.leave-policy-table th{font-size:11px!important;line-height:1.32!important;padding-top:11px!important;padding-bottom:11px!important}
  .leave-sheet-table td{font-size:13px!important;line-height:1.42!important;padding-top:12px!important;padding-bottom:12px!important}
  .leave-sheet-table input,.leave-sheet-table select{font-size:13.5px!important;min-height:40px!important}
  .leave-sheet-table .leave-employee b{font-size:13.5px!important;line-height:1.3!important}
  .leave-sheet-table .leave-employee small{font-size:11.5px!important;line-height:1.35!important}
  .leave-eligibility,.pay-treatment,.leave-cycle-label{font-size:11.75px!important;line-height:1.4!important}
  .leave-calculated-cell small,.leave-cashout-amount span,.leave-cashout-amount small,.leave-leaver-note{font-size:11.25px!important;line-height:1.4!important}
  .leave-cashout-amount b{font-size:13px!important}.leave-cashout-btn{font-size:12px!important}
  .leave-sheet-footer{font-size:12.5px!important;line-height:1.45!important}
  .unit-input span{font-size:11.5px!important}

  /* Employee master, setup/admin, declarations and generic helper copy. */
  .employee-section-head p,.settings-section-head p,.import-step p,.import-preview-head p{font-size:12.5px!important;line-height:1.45!important}
  .optional,.employee-summary-cards small,.leave-summary-card>span,.leave-summary-card div small{font-size:11.5px!important;line-height:1.35!important}
  .settings-toggle b{font-size:13px!important}.settings-toggle small,.remove-logo-check,.logo-setting-preview{font-size:11.5px!important;line-height:1.4!important}
  .import-kpis span,.import-errors,.import-footnote{font-size:11.5px!important;line-height:1.4!important}
  .declaration-flow-note,.decl-suggestion,.decl-reviewed-check span,.declaration-sticky-actions>div span,.declaration-removed-list span{font-size:12px!important;line-height:1.4!important}
  .declaration-editor-progress small,.declaration-editor-progress span{font-size:12.5px!important}
  .method-help,.prog-help,.prog-head{font-size:11.75px!important;line-height:1.4!important}

  /* Reports: readable screen tables while retaining horizontal-scroll layouts. */
  .report-filters label,.report-search{font-size:12px!important}.report-filters input,.report-filters select,.report-search input{font-size:14px!important}
  .report-toolbar{font-size:13.5px!important}.report-table-head p,.report-list-description{font-size:12.75px!important}
  .report-summary-card small{font-size:11.5px!important}.report-category-pill{font-size:11.5px!important}
  .report-page-shell .report-table th{font-size:11.5px!important}.report-page-shell .report-table td{font-size:13px!important}

  /* Dialogs / warnings / payslip delivery feedback. */
  .app-confirm-modal p,.switch-modal p{font-size:13.5px!important;line-height:1.5!important}
  .payslip-delivery-head p{font-size:12px!important;line-height:1.4!important}
  .payslip-delivery-row b{font-size:13px!important}.payslip-delivery-row small,.payslip-delivery-reason{font-size:11.75px!important;line-height:1.4!important}

  /* Employee portal follows the same accessibility floor. */
  body.portal-body{font-size:15px!important;line-height:1.52!important}
  .portal-head p,.portal-muted{font-size:13.5px!important;line-height:1.5!important}
  .portal-tabs a,.portal-btn,.portal-card label,.portal-table td{font-size:13.5px!important}
  .portal-table th{font-size:11.75px!important}
  .portal-calendar{font-size:13.5px!important}.portal-calendar th small{font-size:11.5px!important}
  .portal-chip,.portal-holiday{font-size:11.5px!important}
  .portal-pill,.portal-legend,.portal-cycle{font-size:12.5px!important}
  .portal-leave-title strong small,.portal-leave-stats small,.portal-payout-preview small{font-size:11.5px!important}

  /* Low-contrast secondary text was as much of a problem as size. */
  .ml-main small,.ml-main .muted,.payroll-meta,.command-action small,
  .matrix-help-strip,.matrix-employee-cell small,.leave-sheet-hint,
  .leave-sheet-table small,.leave-workspace-title p,.report-table-head p{
    color:#61758b!important
  }
}

/* V139 safety floor for legacy helper classes that pre-date the shared type scale. */
@media screen {
  .ml-main [class*="-hint"],.ml-main [class*="-help"],.ml-main [class*="-note"],
  .ml-main [class*="-meta"],.ml-main [class*="-caption"],.ml-main [class*="-subtext"]{
    font-size:12px!important;line-height:1.42!important
  }
  .ml-main [class*="-label"]{font-size:12px!important;line-height:1.35!important}
  .ml-main [class*="-pill"],.ml-main [class*="-chip"],.ml-main [class*="-badge"]{
    font-size:11.5px!important;line-height:1.25!important
  }
}

/* ========================================================================
   V140 · READABILITY PASS 2 + PAYROLL COMMAND RIBBON + SAFE FLOATING HELP
   ======================================================================== */
@media screen {
  :root{
    --ml-font-xs:12.75px;
    --ml-font-sm:13.5px;
    --ml-font-base:15px;
    --ml-font-md:16px;
    --ml-font-lg:18px;
    --ml-font-xl:24px;
    --ml-text:#142235;
    --ml-text-secondary:#445a70;
    --ml-text-muted:#61758a;
  }

  /* Global readability floor: avoid both micro-text and overly thin UI copy. */
  body.ml-body{font-size:15px!important;font-weight:450!important;line-height:1.55!important;color:var(--ml-text)!important}
  .ml-main{font-size:15px!important;line-height:1.52!important;color:var(--ml-text)!important}
  .ml-main p,.ml-main .muted{font-size:14.5px!important;line-height:1.55!important;color:var(--ml-text-secondary)!important;font-weight:450!important}
  .ml-main small{font-size:13px!important;line-height:1.42!important;color:var(--ml-text-muted)!important;font-weight:500!important}
  .ml-main label{font-size:13.5px!important;line-height:1.42!important;font-weight:600!important;color:#3f566d!important}
  .ml-main input,.ml-main select,.ml-main textarea{font-size:14.5px!important;font-weight:500!important;color:#16283b!important}
  .ml-main .btn,.ml-main button,.ml-main .button{font-size:14px!important;font-weight:700!important}
  .ml-main table{font-size:14px!important}.ml-main th{font-size:12.75px!important;font-weight:750!important}.ml-main td{font-size:14px!important}
  .ml-main td small{font-size:12.75px!important;font-weight:500!important}
  .badge,.status-pill,.payroll-status-pill,.import-status,.portal-pill,.recurring-badge,.matrix-state,.ot-class-pill,.decl-chip{font-size:12px!important;font-weight:700!important}

  /* Persistent navigation stays readable too. */
  .ml-sidebar .ml-nav a,.ml-sidebar .ml-nav button,.ml-sidebar .ml-nav a span{font-size:14.5px!important;font-weight:650!important}
  .ml-product-wordmark strong{font-size:16px!important;font-weight:750!important}.ml-product-wordmark span{font-size:12.5px!important;font-weight:550!important}
  .ml-sidebar-collapse{display:none!important}

  /* Premium command ribbon: grouped cards, larger icons and stronger hierarchy. */
  .payroll-command-shell{position:relative;display:flex;align-items:stretch;gap:8px;width:100%;margin:5px 0 12px;min-width:0}
  .payroll-command-bar{display:flex!important;flex:1 1 auto!important;min-width:0!important;align-items:stretch!important;gap:0!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;margin:0!important;scrollbar-width:none!important;scroll-behavior:smooth!important;overscroll-behavior-x:contain!important;background:#f8fafc!important;border:1px solid #d7e1ea!important;border-radius:13px!important;box-shadow:0 3px 12px rgba(24,45,66,.06)!important}
  .payroll-command-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
  .payroll-command-bar>.command-group{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;min-width:max-content!important;min-height:112px!important;padding:13px 14px!important;margin:0!important;border:0!important;border-right:1px solid #dce5ed!important;border-radius:0!important;background:#f8fafc!important;box-shadow:none!important}
  .payroll-command-bar>.command-group:last-child{border-right:0!important}
  .command-group-label{font-size:12px!important;line-height:1.2!important;font-weight:800!important;letter-spacing:.055em!important;color:#526981!important;margin:0 0 11px 2px!important}
  .command-group-actions{display:flex!important;align-items:stretch!important;gap:9px!important}
  .command-group form{display:flex!important;margin:0!important}
  .command-action{min-height:64px!important;padding:10px 13px!important;border:1px solid #dce5ed!important;border-radius:9px!important;background:#fff!important;grid-template-columns:28px auto!important;gap:9px!important;box-shadow:0 2px 5px rgba(26,47,68,.035)!important}
  .command-action:hover{background:#f3f7fa!important;border-color:#c9d7e3!important}
  .command-action>span{font-size:20px!important;line-height:1!important;color:#426c92!important;font-weight:700!important}
  .command-action b{font-size:14.5px!important;line-height:1.22!important;font-weight:750!important;color:#18324b!important;letter-spacing:0!important}
  .command-action small{font-size:12.5px!important;line-height:1.35!important;font-weight:550!important;color:#62778c!important;margin-top:3px!important}
  .command-action.strong{background:#f3f8fc!important;border-color:#cfe0ed!important}
  .command-action.primary{background:#1769df!important;border-color:#1769df!important;box-shadow:0 7px 16px rgba(23,105,223,.18)!important}
  .command-action.primary b,.command-action.primary small,.command-action.primary>span{color:#fff!important}
  .command-action.compact{min-width:170px!important}
  .command-period{min-width:245px!important;width:245px!important;flex-basis:245px!important}
  .command-period-form{display:grid!important;grid-template-columns:40px 145px 40px!important;gap:7px!important;align-items:stretch!important}
  .command-period-form input[type=month],.command-icon-btn{height:64px!important;min-height:64px!important}
  .command-period-form input[type=month]{width:145px!important;min-width:145px!important;font-size:14px!important;font-weight:700!important;text-align:center!important;background:#fff!important}
  .command-icon-btn{font-size:22px!important;font-weight:650!important;background:#fff!important;border-color:#dce5ed!important;border-radius:9px!important}
  .command-review{min-width:340px!important;width:auto!important}.command-outputs{min-width:205px!important;width:auto!important}
  .command-inputs{min-width:365px!important}.command-leave{min-width:190px!important}.command-process{min-width:205px!important}

  /* Arrow-based overflow navigation replaces the visible scrollbar. */
  .payroll-command-nav{flex:0 0 42px!important;width:42px!important;min-width:42px!important;align-self:stretch!important;border:1px solid #cdd9e4!important;border-radius:11px!important;background:#fff!important;color:#244b70!important;font-size:28px!important;font-weight:650!important;box-shadow:0 3px 10px rgba(24,45,66,.08)!important;display:flex!important;align-items:center!important;justify-content:center!important;transition:opacity .16s ease,transform .16s ease!important}
  .payroll-command-nav:hover:not(:disabled){background:#edf5fb!important;border-color:#b8ccdc!important}
  .payroll-command-nav:disabled,.payroll-command-nav.is-hidden{opacity:0!important;pointer-events:none!important;width:0!important;min-width:0!important;flex-basis:0!important;border-width:0!important;padding:0!important;overflow:hidden!important;transform:scale(.9)!important}

  /* Help/info cards are now body-level floating overlays and must remain readable. */
  .ml-info-pop.ml-help-floating{display:block!important;max-height:calc(100vh - 24px)!important;overflow:auto!important;padding:14px 15px!important;border-radius:11px!important;border:1px solid #c5d4e0!important;background:#fff!important;color:#334d65!important;box-shadow:0 18px 45px rgba(18,40,61,.2)!important;font-family:var(--ml-font-ui)!important;font-size:13.5px!important;line-height:1.5!important;font-weight:500!important;text-transform:none!important;letter-spacing:0!important}
  .ml-info-pop.ml-help-floating>b{font-size:14.5px!important;line-height:1.3!important;font-weight:750!important;color:#173750!important;margin-bottom:7px!important}
  .ml-info-pop.ml-help-floating p,.ml-info-pop.ml-help-floating div,.ml-info-pop.ml-help-floating li,.ml-info-pop.ml-help-floating dt,.ml-info-pop.ml-help-floating dd{font-size:13.5px!important;line-height:1.5!important}
  .ml-info-help>summary{width:21px!important;height:21px!important;font-size:12px!important;font-weight:800!important}

  /* Leave policy/setup screens: specifically remove the remaining tiny supporting copy. */
  .leave-policy-table td,.leave-policy-table td div,.leave-policy-table td span{font-size:14px!important;line-height:1.5!important}
  .leave-policy-table td small,.leave-policy-table .muted{font-size:13px!important;line-height:1.45!important;font-weight:500!important;color:#5c7186!important}
  .leave-policy-table td b,.leave-policy-table strong{font-size:14.5px!important;font-weight:750!important}
  .leave-policy-table th{font-size:12.75px!important;font-weight:800!important;padding-top:12px!important;padding-bottom:12px!important}
  .leave-policy-table td{padding-top:14px!important;padding-bottom:14px!important}
  .leave-policy-table select{font-size:14px!important;font-weight:600!important;min-height:46px!important}

  /* Keep compact displays functional without shrinking text: navigation handles overflow. */
  @media(max-width:1100px){
    .payroll-command-bar>.command-group{min-height:108px!important;padding:12px!important}
    .command-action{min-height:60px!important}
    .command-period-form input[type=month],.command-icon-btn{height:60px!important;min-height:60px!important}
  }
}

html[data-theme="dark"] .payroll-command-bar,html[data-theme="dark"] .payroll-command-bar>.command-group{background:#151f2b!important;border-color:#314255!important}
html[data-theme="dark"] .payroll-command-nav{background:#172635!important;color:#dce8f4!important;border-color:#385168!important}
html[data-theme="dark"] .ml-info-pop.ml-help-floating{background:#172635!important;color:#dce6ef!important;border-color:#385168!important}
html[data-theme="dark"] .ml-info-pop.ml-help-floating>b{color:#f1f6fb!important}

/* V140 final specificity guards: legacy module rules must not re-introduce micro-text or old ribbon sizing. */
@media screen {
  body.ml-body .ml-main small{font-size:13px!important;line-height:1.45!important;font-weight:500!important}
  body.ml-body .ml-main table small{font-size:12.75px!important;line-height:1.42!important;font-weight:500!important}
  body.ml-body .ml-main [class*="hint"],body.ml-body .ml-main [class*="helper"],body.ml-body .ml-main [class*="meta"]{font-weight:500!important}
  .payroll-command-bar>.command-period{width:245px!important;min-width:245px!important;flex:0 0 245px!important}
  .payroll-command-bar>.command-inputs{min-width:365px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-leave{min-width:190px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-review{min-width:340px!important;width:auto!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-process{min-width:205px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-outputs{min-width:205px!important;width:auto!important;flex:0 0 auto!important}
}

/* ============================================================
   V141 — Payroll command ribbon rebuilt to match the approved
   large-card reference.  Primary actions only; no micro-copy.
   ============================================================ */
@media screen {
  .payroll-command-shell{
    gap:0!important;
    margin:7px 0 13px!important;
    position:relative!important;
  }

  .payroll-command-bar{
    min-height:150px!important;
    background:#f6f9fc!important;
    border:1px solid #ccd9e5!important;
    border-radius:14px!important;
    box-shadow:0 4px 14px rgba(28,52,75,.07)!important;
  }

  .payroll-command-bar>.command-group{
    min-height:150px!important;
    padding:16px 17px 17px!important;
    background:#f6f9fc!important;
    border-right:1px solid #d6e1eb!important;
    justify-content:flex-start!important;
  }

  .command-group-label{
    margin:0 0 15px 2px!important;
    font-size:13px!important;
    line-height:1.15!important;
    font-weight:800!important;
    letter-spacing:.045em!important;
    color:#52687e!important;
    text-transform:uppercase!important;
    white-space:nowrap!important;
  }

  .command-group-actions{
    gap:10px!important;
    align-items:stretch!important;
    min-height:78px!important;
  }

  .command-group form,
  .command-menu{
    align-self:stretch!important;
  }

  .command-action{
    position:relative!important;
    display:grid!important;
    grid-template-columns:36px minmax(0,auto)!important;
    align-items:center!important;
    justify-content:start!important;
    gap:11px!important;
    min-width:178px!important;
    min-height:78px!important;
    padding:13px 16px!important;
    border:1px solid #d4e0ea!important;
    border-radius:10px!important;
    background:#fff!important;
    box-shadow:0 2px 5px rgba(24,46,66,.045)!important;
    color:#18344f!important;
    overflow:visible!important;
  }

  .command-action:hover{
    background:#f1f6fa!important;
    border-color:#bfcfdd!important;
    box-shadow:0 4px 10px rgba(24,46,66,.08)!important;
  }

  .command-action>span.command-glyph,
  .command-action>span:first-child{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    border-radius:8px!important;
    background:#edf3f7!important;
    color:#385f7f!important;
    font-size:22px!important;
    line-height:1!important;
    font-weight:800!important;
  }

  .command-action div{
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
  }

  .command-action b{
    font-size:15px!important;
    line-height:1.2!important;
    font-weight:750!important;
    color:#18344f!important;
    white-space:nowrap!important;
  }

  /* V141 deliberately removes ribbon descriptions/micro-copy. */
  .payroll-command-bar .command-action small{
    display:none!important;
  }

  .command-action.strong{
    background:#fff!important;
    border-color:#ccdce8!important;
  }

  .command-action.primary{
    min-width:190px!important;
    background:#1f6fe5!important;
    border-color:#1f6fe5!important;
    box-shadow:0 7px 16px rgba(31,111,229,.19)!important;
  }
  .command-action.primary:hover{
    background:#185fca!important;
    border-color:#185fca!important;
  }
  .command-action.primary b{color:#fff!important}
  .command-action.primary>span.command-glyph,
  .command-action.primary>span:first-child{
    background:rgba(255,255,255,.16)!important;
    color:#fff!important;
  }

  .command-review-action{
    padding-right:38px!important;
  }
  .command-count-badge{
    position:absolute!important;
    top:8px!important;
    right:9px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:22px!important;
    height:22px!important;
    padding:0 6px!important;
    border-radius:999px!important;
    background:#df493f!important;
    color:#fff!important;
    font-style:normal!important;
    font-size:11.5px!important;
    line-height:1!important;
    font-weight:800!important;
    box-shadow:0 2px 4px rgba(153,38,31,.22)!important;
  }
  .command-review-action:has(.command-count-badge){
    border-color:#ead7d5!important;
  }
  .command-review-action:has(.command-count-badge)>span:first-child{
    background:#fff0ef!important;
    color:#cc453d!important;
  }

  .payroll-command-bar>.command-period{
    width:255px!important;
    min-width:255px!important;
    flex:0 0 255px!important;
  }
  .command-period-form{
    grid-template-columns:42px 151px 42px!important;
    gap:8px!important;
    min-height:78px!important;
  }
  .command-period-form input[type=month],
  .command-icon-btn{
    height:78px!important;
    min-height:78px!important;
    border-radius:10px!important;
    border:1px solid #d4e0ea!important;
    background:#fff!important;
  }
  .command-period-form input[type=month]{
    width:151px!important;
    min-width:151px!important;
    padding:0 10px!important;
    font-size:14.5px!important;
    line-height:1.2!important;
    font-weight:750!important;
    color:#18344f!important;
    text-align:center!important;
  }
  .command-icon-btn{
    font-size:25px!important;
    line-height:1!important;
    font-weight:700!important;
    color:#395f7e!important;
  }

  .payroll-command-bar>.command-inputs{min-width:420px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-leave{min-width:225px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-review{min-width:430px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-process{min-width:235px!important;flex:0 0 auto!important}
  .payroll-command-bar>.command-outputs{min-width:230px!important;flex:0 0 auto!important}
  .command-action.compact{min-width:185px!important}

  /* Edge arrows appear only when the ribbon overflows. They overlay the
     ribbon edge rather than consuming permanent horizontal space. */
  .payroll-command-nav{
    position:absolute!important;
    z-index:14!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:40px!important;
    min-width:40px!important;
    height:64px!important;
    min-height:64px!important;
    flex:none!important;
    border:1px solid #c7d5e1!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.97)!important;
    color:#274f72!important;
    font-size:31px!important;
    font-weight:650!important;
    box-shadow:0 5px 14px rgba(22,44,64,.15)!important;
    backdrop-filter:blur(4px)!important;
  }
  .payroll-command-nav-left{left:-11px!important}
  .payroll-command-nav-right{right:-11px!important}
  .payroll-command-nav:disabled,
  .payroll-command-nav.is-hidden{
    opacity:0!important;
    width:40px!important;
    min-width:40px!important;
    height:64px!important;
    border-width:1px!important;
    padding:0!important;
    pointer-events:none!important;
    transform:translateY(-50%) scale(.92)!important;
  }
  .payroll-command-shell.has-overflow .payroll-command-bar{
    padding-left:0!important;
    padding-right:0!important;
  }

  @media(max-width:1100px){
    .payroll-command-bar,
    .payroll-command-bar>.command-group{min-height:142px!important}
    .payroll-command-bar>.command-group{padding:14px 15px 15px!important}
    .command-action{min-height:74px!important}
    .command-period-form input[type=month],.command-icon-btn{height:74px!important;min-height:74px!important}
  }
}

html[data-theme="dark"] .command-action>span.command-glyph,
html[data-theme="dark"] .command-action>span:first-child{background:#243544!important;color:#a7c7e2!important}
html[data-theme="dark"] .command-action.primary>span.command-glyph,
html[data-theme="dark"] .command-action.primary>span:first-child{background:rgba(255,255,255,.14)!important;color:#fff!important}
html[data-theme="dark"] .command-count-badge{background:#d9544c!important;color:#fff!important}

/* ============================================================
   V142 — NEW PAYROLL COMMAND RIBBON
   Built from scratch: content-width groups, compact desktop-tool
   proportions, no micro-copy, no stretched empty sections.
   ============================================================ */
@media screen {
  .payroll-ribbon-shell-v142{
    position:relative;
    display:block;
    margin:8px 0 10px;
    max-width:100%;
  }
  .payroll-ribbon-v142{
    display:flex;
    align-items:stretch;
    width:max-content;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -ms-overflow-style:none;
    background:#f7fafc;
    border:1px solid #cfdbe6;
    border-radius:10px;
    box-shadow:0 2px 7px rgba(25,48,70,.06);
  }
  .payroll-ribbon-v142::-webkit-scrollbar{display:none}
  .pr-group-v142{
    flex:0 0 auto;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    gap:8px;
    padding:9px 12px 10px;
    border-right:1px solid #d6e1ea;
    background:#f7fafc;
  }
  .pr-group-v142:last-child{border-right:0}
  .pr-group-label-v142{
    display:flex;
    align-items:center;
    gap:6px;
    min-height:18px;
    color:#4e6378;
    font-size:12.5px;
    line-height:1;
    font-weight:800;
    letter-spacing:.035em;
    text-transform:uppercase;
    white-space:nowrap;
  }
  .pr-heading-icon-v142{
    display:inline-flex;
    width:16px;
    justify-content:center;
    color:#58718a;
    font-size:14px;
    line-height:1;
  }
  .pr-actions-v142{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:46px;
  }
  .pr-actions-v142>form,.pr-menu-v142{display:flex;margin:0}
  .pr-action-v142{
    position:relative;
    box-sizing:border-box;
    display:inline-flex;
    align-items:center;
    justify-content:flex-start;
    gap:9px;
    height:46px;
    min-height:46px;
    min-width:142px;
    padding:0 13px 0 9px;
    border:1px solid #d3dee8;
    border-radius:7px;
    background:#fff;
    color:#193650;
    box-shadow:0 1px 2px rgba(27,50,70,.035);
    text-decoration:none;
    cursor:pointer;
    font-family:inherit;
    white-space:nowrap;
  }
  .pr-action-v142:hover{
    background:#f2f7fb;
    border-color:#b9cbd9;
  }
  .pr-action-v142 b{
    font-size:14px;
    line-height:1.1;
    font-weight:700;
    color:inherit;
    white-space:nowrap;
  }
  .pr-action-icon-v142{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 28px;
    width:28px;
    height:28px;
    border-radius:7px;
    background:#eef4f8;
    color:#386586;
    font-size:17px;
    line-height:1;
    font-weight:800;
    border:1px solid #e1e9f1;
  }
  .pr-action-icon-svg-v147 svg{width:17px;height:17px;display:block;stroke:currentColor;fill:none}
  .pr-action-icon-svg-v147.tone-blue{background:#edf4ff;color:#4479c7;border-color:#d8e6fb}
  .pr-action-icon-svg-v147.tone-green{background:#eef9f2;color:#3f8e61;border-color:#d7eedf}
  .pr-primary-v142{
    background:#1671e8;
    border-color:#1671e8;
    color:#fff;
    box-shadow:0 4px 10px rgba(22,113,232,.18);
  }
  .pr-primary-v142:hover{background:#0f63cf;border-color:#0f63cf}
  .pr-primary-v142 .pr-action-icon-v142{background:rgba(255,255,255,.15);color:#fff}
  .pr-review-v142:has(.pr-count-v142){border-color:#eaccca;background:#fffdfd}
  .pr-review-v142:has(.pr-count-v142) .pr-action-icon-v142{background:#fff0ef;color:#d4423a}
  .pr-count-v142{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:20px;
    height:20px;
    padding:0 5px;
    margin-left:4px;
    border-radius:999px;
    background:#e54339;
    color:#fff;
    font-size:11px;
    line-height:1;
    font-weight:800;
    font-style:normal;
  }
  .pr-period-v142{padding-right:10px}
  .pr-period-form-v142{
    position:relative;
    display:grid;
    grid-template-columns:34px 130px 34px;
    align-items:center;
    gap:6px;
    height:46px;
  }
  .pr-period-arrow-v142{
    width:34px;
    min-width:34px;
    height:46px;
    min-height:46px;
    padding:0;
    border:1px solid #d3dee8;
    border-radius:7px;
    background:#fff;
    color:#315d7e;
    font-size:20px;
    font-weight:750;
    line-height:1;
    cursor:pointer;
  }
  .pr-period-picker-v142{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6px;
    width:130px;
    height:46px;
    box-sizing:border-box;
    padding:0 10px;
    border:1px solid #d3dee8;
    border-radius:7px;
    background:#fff;
    color:#173650;
    cursor:pointer;
    overflow:hidden;
  }
  .pr-period-text-v142{
    font-size:14px;
    line-height:1;
    font-weight:750;
    white-space:nowrap;
  }
  .pr-calendar-v142{font-size:13px;color:#355f7e}
  .pr-period-native-v142{
    position:absolute!important;
    left:40px!important;
    top:0!important;
    width:130px!important;
    height:46px!important;
    opacity:0!important;
    cursor:pointer!important;
    z-index:2!important;
  }
  .payroll-ribbon-nav-v142{
    position:absolute;
    z-index:20;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    min-width:38px;
    height:58px;
    min-height:58px;
    padding:0;
    border:1px solid #a9bfd4;
    border-radius:11px;
    background:linear-gradient(180deg,#f8fbff 0%,#edf4fb 100%);
    color:#21577b;
    box-shadow:0 6px 16px rgba(24,48,68,.18);
    font-size:25px;
    line-height:1;
    font-weight:800;
    cursor:pointer;
  }
  .payroll-ribbon-nav-v142:hover{background:linear-gradient(180deg,#ffffff 0%,#e8f1fb 100%);border-color:#7ea3c5;color:#14466a;box-shadow:0 8px 18px rgba(24,48,68,.2)}
  .payroll-ribbon-nav-v142:active{transform:translateY(-50%) scale(.98)}
  .payroll-ribbon-nav-v142[hidden]{display:none!important}
  .payroll-ribbon-nav-left-v142{left:-8px}
  .payroll-ribbon-nav-right-v142{right:-8px}
  .payroll-ribbon-shell-v142.has-overflow .payroll-ribbon-v142{padding-inline:0}

  @media(max-width:900px){
    .pr-group-v142{padding:8px 10px 9px}
    .pr-action-v142{min-width:136px}
  }
}

@media screen {
  .pr-period-input-v142{
    box-sizing:border-box!important; width:130px!important; min-width:130px!important; height:46px!important; min-height:46px!important;
    padding:0 9px!important; border:1px solid #d3dee8!important; border-radius:7px!important; background:#fff!important;
    color:#173650!important; font-family:inherit!important; font-size:14px!important; line-height:1!important; font-weight:750!important; cursor:pointer!important;
  }
}

/* ============================================================
   V143 — Payroll workspace refinements
   - wider period group
   - cleaner, fixed employee-card information hierarchy
   - robust focus-mode icon rail
   ============================================================ */
@media screen {
  /* Period should read as a deliberate control, not a cramped utility. */
  .pr-period-v142{min-width:272px!important;padding-left:13px!important;padding-right:13px!important}
  .pr-period-form-v142{grid-template-columns:34px minmax(164px,1fr) 34px!important;gap:7px!important}
  .pr-period-input-v142{min-width:164px!important;width:164px!important;padding-left:12px!important;padding-right:8px!important}

  /* Employee cards use one predictable visual grammar. */
  .employee-card-v143{display:flex!important;flex-direction:column!important;gap:0!important;min-width:0!important}
  .employee-identity-v143{order:1!important;margin:0 0 7px!important}
  .employee-card-v143 .employee-name-line{display:flex!important;align-items:center!important;gap:6px!important;margin:0 0 3px!important;min-width:0!important}
  .employee-card-v143 .employee-payroll-input-link{font-size:13.5px!important;font-weight:800!important;line-height:1.25!important;min-width:0!important}
  .employee-card-v143 .employee-job-title{display:block!important;margin:0!important;font-size:11.5px!important;line-height:1.3!important;color:#667b90!important}
  .employee-card-v143 .employee-name-line .line-status{font-size:9px!important;padding:3px 6px!important;line-height:1!important;flex:0 0 auto!important}
  .employee-comparison-v143{order:2!important;display:block!important;margin:0 0 4px!important;font-size:11.5px!important;line-height:1.3!important;color:#6f8295!important}
  .employee-movement-v143{order:3!important;margin:0 0 5px!important;font-size:11.5px!important;line-height:1.3!important;color:#2f6fbd!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  .employee-warnings-v143{order:4!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;margin:0 0 5px!important}
  .employee-warnings-v143 span{font-size:10.5px!important;line-height:1.25!important;padding:2px 5px!important;max-width:100%!important;white-space:normal!important}
  .employee-card-v143 .row-client-comment{order:5!important;margin-top:0!important;margin-bottom:5px!important}
  .employee-delivery-v143{order:6!important;margin-top:0!important}
  .employee-delivery-v143 .payslip-sent{font-size:9px!important;padding:3px 6px!important}
  .employee-card-v143 .row-save-state{order:7!important}
  .employee-cell-layout>.row-select{margin-top:3px!important}

  /* Focus mode: true fixed-width icon rail, never clipped text. */
  body.payroll-focus{--ml-sidebar:64px!important}
  body.payroll-focus .ml-sidebar{
    width:64px!important;min-width:64px!important;max-width:64px!important;
    padding:10px 7px!important;overflow:visible!important;
  }
  body.payroll-focus .ml-sidebar-scroll-region{overflow-y:auto!important;overflow-x:visible!important}
  body.payroll-focus .ml-product{justify-content:center!important;padding:0!important;margin-bottom:10px!important}
  body.payroll-focus .ml-product-icon{width:38px!important;height:38px!important;min-width:38px!important}
  body.payroll-focus .ml-product-wordmark,
  body.payroll-focus .ml-context-card,
  body.payroll-focus .ml-nav-label,
  body.payroll-focus .ml-nav-workspace,
  body.payroll-focus .ml-admin-future,
  body.payroll-focus .ml-user-card>div:nth-child(2),
  body.payroll-focus .ml-user-card>a,
  body.payroll-focus .ml-version{display:none!important}
  body.payroll-focus .ml-nav{padding:0!important;margin:0!important;gap:6px!important;width:100%!important}
  body.payroll-focus .ml-nav a{
    width:48px!important;height:46px!important;min-width:48px!important;max-width:48px!important;
    padding:0!important;margin:0 auto!important;display:flex!important;justify-content:center!important;align-items:center!important;
    font-size:0!important;line-height:0!important;overflow:visible!important;white-space:nowrap!important;border-radius:9px!important;
  }
  body.payroll-focus .ml-nav a>span{display:grid!important;place-items:center!important;width:24px!important;height:24px!important;font-size:17px!important;line-height:1!important;margin:0!important;flex:0 0 24px!important}
  body.payroll-focus .ml-user-card{display:flex!important;justify-content:center!important;padding:8px 0!important}
  body.payroll-focus .ml-user-avatar{width:34px!important;height:34px!important;min-width:34px!important}
  body.payroll-focus .ml-main,
  body.payroll-focus.ml-sidebar-collapsed .ml-main{margin-left:64px!important;width:calc(100% - 64px)!important}
  body.payroll-focus .ml-page-shell{padding-left:14px!important;padding-right:14px!important}
}
@media(max-width:860px){
  body.payroll-focus .ml-main,body.payroll-focus.ml-sidebar-collapsed .ml-main{margin-left:0!important;width:100%!important}
}

/* ============================================================
   V144 — concise employee cards + dedicated payroll comparison
   ============================================================ */
@media screen {
  /* Employee column: identity/status only. Monetary movements now live in Review changes. */
  .employee-card-v143 .employee-identity-v143{order:1!important;margin-bottom:6px!important}
  .employee-lifecycle-v144{
    order:2!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    gap:3px!important;margin:0 0 6px!important;
  }
  .employee-lifecycle-v144 span{
    display:inline-flex!important;align-items:center!important;max-width:100%!important;
    padding:3px 7px!important;border-radius:999px!important;background:#edf5ff!important;color:#2563a9!important;
    font-size:12px!important;line-height:1.25!important;font-weight:650!important;white-space:normal!important;
  }
  .employee-warnings-v143{order:3!important;margin:0 0 6px!important;gap:4px!important}
  .employee-warnings-v143 span{
    font-size:12px!important;line-height:1.3!important;font-weight:650!important;padding:3px 7px!important;border-radius:999px!important;
  }
  .employee-delivery-v143{order:4!important;margin:0!important}
  .employee-delivery-v143 .payslip-sent{font-size:10.5px!important;padding:4px 7px!important;font-weight:800!important}
  .employee-card-v143 .row-save-state{order:5!important}

  /* Review changes is a true comparison workspace, not a narrow card drawer. */
  dialog.ml-action-drawer.review-changes-dialog-v144{
    width:min(1180px,94vw)!important;max-width:min(1180px,94vw)!important;
  }
  .review-changes-dialog-v144 .ml-action-drawer-head{padding:18px 22px 15px!important}
  .review-changes-body-v144{padding:16px 18px 22px!important;display:block!important}
  .review-summary-v144{margin:0 0 12px!important;padding:12px 14px!important}
  .review-summary-v144 b{font-size:14px!important;line-height:1.35!important}
  .review-summary-v144 small{font-size:12px!important;line-height:1.4!important;margin-top:2px!important;display:block!important}
  .review-change-table-wrap-v144{
    width:100%!important;max-width:100%!important;overflow:auto!important;border:1px solid #dbe5ee!important;
    border-radius:11px!important;background:#fff!important;
  }
  .review-change-table-v144{width:100%!important;border-collapse:separate!important;border-spacing:0!important;min-width:900px!important}
  .review-change-table-v144 th{
    position:sticky!important;top:0!important;z-index:2!important;background:#eef4f8!important;color:#47627b!important;
    font-size:12px!important;line-height:1.25!important;font-weight:800!important;text-transform:uppercase!important;
    letter-spacing:.025em!important;padding:10px 12px!important;border-bottom:1px solid #d7e2eb!important;text-align:left!important;
    white-space:nowrap!important;
  }
  .review-change-table-v144 td{
    padding:10px 12px!important;border-bottom:1px solid #e7edf3!important;color:#243d55!important;
    font-size:13px!important;line-height:1.35!important;font-weight:500!important;vertical-align:middle!important;
  }
  .review-change-table-v144 tbody tr:last-child td{border-bottom:0!important}
  .review-change-table-v144 tbody tr:hover td{background:#f8fbfd!important}
  .review-change-table-v144 td:first-child{min-width:175px!important}
  .review-change-table-v144 td:first-child a{color:#143e66!important;text-decoration:none!important;font-weight:750!important}
  .review-change-table-v144 .num{text-align:right!important;font-variant-numeric:tabular-nums!important;white-space:nowrap!important}
  .review-category-v144{
    display:inline-flex!important;padding:3px 7px!important;border-radius:999px!important;background:#f1f5f9!important;
    color:#536c83!important;font-size:11.5px!important;line-height:1.2!important;font-weight:700!important;white-space:nowrap!important;
  }
  .review-delta-v144{font-weight:800!important}
  .review-delta-v144.positive{color:#11824a!important}
  .review-delta-v144.negative{color:#bf3d3d!important}
  .review-text-value-v144{font-weight:650!important;color:#526b82!important}
}
@media(max-width:760px){
  dialog.ml-action-drawer.review-changes-dialog-v144{width:96vw!important;max-width:96vw!important}
}


/* ============================================================
   V145 — compact Payroll Tools + workflow badge + period alignment
   ============================================================ */
@media screen {
  /* Header status: show the payroll workflow, not raw internal status names. */
  .payroll-workflow-status-v145{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    min-height:24px!important;padding:4px 10px!important;border-radius:999px!important;
    font-size:11.5px!important;line-height:1!important;font-weight:850!important;letter-spacing:.035em!important;
    white-space:nowrap!important;border:1px solid transparent!important;box-shadow:none!important;
  }
  .payroll-workflow-status-v145.draft{background:#fff1c9!important;color:#9a6411!important;border-color:#f1d78e!important}
  .payroll-workflow-status-v145.awaiting_approval{background:#e8f2ff!important;color:#1f63ad!important;border-color:#c8ddf6!important}
  .payroll-workflow-status-v145.approved{background:#e5f7ec!important;color:#177044!important;border-color:#bfe8cf!important}
  .payroll-workflow-status-v145.finalised{background:#dff3e8!important;color:#0d6037!important;border-color:#addabd!important}
  .payroll-workflow-status-v145.changes_requested{background:#fff0ee!important;color:#ae3e36!important;border-color:#f0c5c0!important}
  .payroll-workflow-status-v145.ready_to_resend{background:#fff4dc!important;color:#98651c!important;border-color:#efd79e!important}

  /* Period is one true horizontal control row. */
  .pr-period-v142{min-width:272px!important;width:272px!important;box-sizing:border-box!important}
  .pr-period-form-v142{
    display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;
    gap:7px!important;width:100%!important;height:46px!important;min-height:46px!important;margin:0!important;padding:0!important;
  }
  .pr-period-arrow-v142,.pr-period-input-v142{
    margin:0!important;vertical-align:middle!important;align-self:center!important;height:46px!important;min-height:46px!important;box-sizing:border-box!important;
  }
  .pr-period-arrow-v142{flex:0 0 34px!important;width:34px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important}
  .pr-period-input-v142{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important;padding:0 12px!important;line-height:44px!important}

  /* Payroll Tools: scan-first menu. Descriptions are intentionally omitted from normal actions. */
  .payroll-tools-dialog-v145{width:min(390px,94vw)!important;max-width:min(390px,94vw)!important}
  .payroll-tools-dialog-v145 .ml-action-drawer-head{padding:18px 18px 14px!important}
  .payroll-tools-dialog-v145 .ml-action-drawer-head>div>small{font-size:11px!important;font-weight:800!important;letter-spacing:.08em!important;color:#6b8197!important}
  .payroll-tools-dialog-v145 .ml-action-drawer-head h2{font-size:22px!important;line-height:1.15!important;font-weight:800!important;margin:4px 0 5px!important;color:#112f49!important}
  .payroll-tools-dialog-v145 .ml-action-drawer-head p{font-size:12.5px!important;line-height:1.3!important;font-weight:550!important;color:#5d748a!important;margin:0!important}
  .payroll-tools-body-v145{padding:10px 14px 18px!important}
  .payroll-tools-body-v145 .ml-drawer-section-title{
    margin:12px 4px 5px!important;font-size:11.5px!important;line-height:1.2!important;font-weight:850!important;
    letter-spacing:.075em!important;color:#71869a!important;text-transform:uppercase!important;
  }
  .payroll-tools-body-v145 .ml-drawer-divider{margin:10px 4px!important}
  .payroll-tools-body-v145 .ml-drawer-action{
    min-height:43px!important;padding:7px 8px!important;gap:10px!important;border-radius:8px!important;align-items:center!important;
  }
  .payroll-tools-body-v145 .ml-drawer-action>span,
  .payroll-tools-body-v145 .ml-drawer-action>.ml-tool-icon{
    width:30px!important;height:30px!important;min-width:30px!important;flex:0 0 30px!important;border-radius:7px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
  }
  .payroll-tools-body-v145 .ml-drawer-action>div{display:flex!important;align-items:center!important;min-width:0!important}
  .payroll-tools-body-v145 .ml-drawer-action b{
    font-size:14px!important;line-height:1.25!important;font-weight:750!important;color:#25425d!important;margin:0!important;
  }
  .payroll-tools-body-v145 .ml-drawer-action small{display:none!important}
  .payroll-tools-body-v145 .ml-drawer-placeholder{margin:6px 4px 8px!important;padding:11px 12px!important;border-radius:9px!important}
  .payroll-tools-body-v145 .ml-drawer-placeholder b{font-size:12.5px!important;line-height:1.3!important;font-weight:750!important}
  .payroll-tools-body-v145 .ml-drawer-placeholder small{display:block!important;font-size:12px!important;line-height:1.45!important;font-weight:500!important;color:#5f768c!important;margin-top:3px!important}
}


/* V149 global anti-flicker pass ----------------------------------------------
   Help cards stay hidden in their source container and are only painted after
   the popover engine has moved and positioned them in the body overlay. */
.ml-info-help > .ml-info-pop:not(.ml-help-floating){
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.ml-popover-layer .ml-info-pop.ml-help-floating{
  display:block!important;
  pointer-events:auto!important;
}

/* V149 deliberately uses normal browser navigation. No View Transition API,
   crossfade, or old/new page layering. The current screen remains visible
   beneath a lightweight veil until the browser replaces it. */
.ml-navigation-loading{
  position:fixed;inset:0;z-index:2147483200;display:flex;align-items:center;justify-content:center;
  background:rgba(241,246,251,.30);backdrop-filter:blur(.35px);
  opacity:0;visibility:hidden;pointer-events:none;transition:opacity 55ms linear;
}
.ml-navigation-loading.show{opacity:1;visibility:visible;pointer-events:auto}
.ml-navigation-loading-card{
  display:inline-flex;align-items:center;gap:9px;padding:9px 13px;border:1px solid #cfdce8;border-radius:10px;
  background:rgba(255,255,255,.96);color:#294760;box-shadow:0 8px 24px rgba(23,48,70,.12);
  font-size:13px;font-weight:650;
}
.ml-navigation-spinner{width:16px;height:16px;border:2px solid #c8d8e7;border-top-color:#3377b8;border-radius:50%;animation:ml-v149-spin .7s linear infinite}
@keyframes ml-v149-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.ml-navigation-loading{transition:none}.ml-navigation-spinner{animation-duration:1.4s}}

/* V153 stable render boundary: no page-wide loading paint or transition. */
.ml-page-shell{position:relative}
.ml-page-content[aria-busy="true"]{cursor:progress}

/* V152 workspace-based tab strip — approved reference styling, without launcher. */
.ml-workspace-tabs-shell{
  position:relative!important;display:flex!important;align-items:stretch!important;gap:0!important;
  min-height:46px!important;height:46px!important;padding:5px 10px 0!important;
  background:#eaf2f8!important;border-bottom:1px solid #cbd8e5!important;
  box-shadow:0 2px 8px rgba(35,66,95,.06)!important;overflow:visible!important;
}
.ml-workspace-tabs-shell[hidden]{display:none!important}
.ml-workspace-tabs{display:flex!important;align-items:stretch!important;gap:0!important;min-width:0!important;flex:1 1 auto!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;scrollbar-width:none!important;scroll-behavior:smooth}
.ml-workspace-tabs::-webkit-scrollbar{display:none}
.ml-workspace-tab{
  position:relative!important;display:flex!important;align-items:center!important;flex:0 0 auto!important;
  width:auto!important;min-width:150px!important;max-width:260px!important;height:40px!important;margin:0!important;
  border:1px solid #cbd8e5!important;border-left:0!important;border-bottom-color:#bccddd!important;border-radius:0!important;
  background:#e6f0f7!important;color:#36526d!important;box-shadow:none!important;cursor:grab!important;
}
.ml-workspace-tab:first-child{border-left:1px solid #cbd8e5!important;border-radius:8px 0 0 8px!important}
.ml-workspace-tab:hover{background:#edf5fa!important}
.ml-workspace-tab.active{background:#fff!important;color:#17324b!important;border-color:#c6d5e3!important;border-left:0!important;border-bottom-color:#fff!important;box-shadow:none!important}
.ml-workspace-tab.active::before{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:3px;background:#1677ff;border-radius:2px 2px 0 0}
.ml-workspace-tab a{display:block!important;flex:1 1 auto!important;min-width:0!important;padding:0 7px 0 13px!important;color:inherit!important;text-decoration:none!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font:600 13px/39px var(--ml-ui-font,"Segoe UI",Inter,Arial,sans-serif)!important}
.ml-workspace-tab.active a{font-weight:700!important}
.ml-workspace-tab button{appearance:none!important;display:grid!important;place-items:center!important;flex:0 0 30px!important;width:30px!important;min-width:30px!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#688198!important;box-shadow:none!important;font:400 18px/1 Arial,sans-serif!important}
.ml-workspace-tab button:hover{background:#d9e7f1!important;color:#17324b!important}
.ml-workspace-tab.active button:hover{background:#edf3f7!important}
.ml-workspace-tab.dragging{opacity:.6!important}
.ml-workspace-tab.drop-before::before,.ml-workspace-tab.drop-after::after{content:"";position:absolute;top:5px;bottom:5px;width:3px;border-radius:999px;background:#1677ff;z-index:2}
.ml-workspace-tab.drop-before::before{left:-2px}.ml-workspace-tab.drop-after::after{right:-2px}
.ml-workspace-tabs-divider{width:1px;height:29px;align-self:center;background:#bdcedd;margin:0 12px;flex:0 0 auto}
.ml-workspace-tabs-clear{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;flex:0 0 auto!important;height:34px!important;min-height:34px!important;margin:3px 0 0!important;padding:0 13px!important;border:1px solid #c8d7e5!important;border-radius:7px!important;background:#f7fbfe!important;color:#29445f!important;box-shadow:0 1px 3px rgba(35,66,95,.06)!important;font:700 12px/1 var(--ml-ui-font,"Segoe UI",Inter,Arial,sans-serif)!important;white-space:nowrap!important}
.ml-workspace-tabs-clear:hover{background:#fff!important;border-color:#b5c9da!important}.ml-workspace-tabs-clear[hidden]{display:none!important}.ml-workspace-tabs-clear span{font-size:18px;font-weight:400;line-height:1}
body.context-client .ml-workspace-tabs-shell{background:#eaf2f8!important;overflow:visible!important}
html[data-theme="dark"] .ml-workspace-tabs-shell{background:#111c28!important;border-color:#2d3c4d!important}
html[data-theme="dark"] .ml-workspace-tab.active{background:#213142!important;color:#fff!important;border-bottom-color:#213142!important}
html[data-theme="dark"] .ml-workspace-tabs-clear{background:#182431!important;border-color:#34475a!important;color:#dbe6ef!important}
@media(max-width:860px){.ml-workspace-tabs-shell{padding-left:6px!important;padding-right:6px!important}.ml-workspace-tabs-divider,.ml-workspace-tabs-clear{display:none!important}.ml-workspace-tab{width:auto!important;min-width:140px!important;max-width:220px!important}}
/* V156 — separate EOY review without leaving the Payroll workspace. */
.eoy-view-head-v156{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px 12px}
.eoy-view-head-v156 small{font-size:11px;font-weight:800;letter-spacing:.08em;color:#64748b}
.eoy-view-head-v156 h2{margin:2px 0 2px;font-size:18px}
.eoy-view-head-v156 p{margin:0;color:#64748b;font-size:13px}
.eoy-job-v156{display:block;margin-top:3px;color:#64748b;font-size:11px;font-weight:500}
#eoyBonusViewToggle.is-active{background:#eff6ff;border-color:#93c5fd}
.public-review-note-v156{display:flex;gap:8px;align-items:center;margin:10px 0 14px;padding:10px 12px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:10px;font-size:13px;color:#1e3a5f}
.public-review-note-v156 span{color:#475569}

/* V157 — client-level access controls + revision dialog polish. */
.client-access-panel{background:#fff;border:1px solid #d9e5ef;border-radius:14px;overflow:hidden}
.client-access-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #e4edf4}
.client-access-head h3{margin:0 0 4px;font-size:16px}.client-access-head p{margin:0;color:#60758a;font-size:13px}
.client-access-table-wrap{overflow-x:auto}.client-access-table{min-width:1180px}.client-access-table td small{display:block;color:#6a7d90;margin-top:3px}
.client-access-check{display:inline-flex;align-items:center;gap:5px;margin:2px 8px 2px 0;white-space:nowrap;font-size:12px}.client-access-check input{margin:0}
.client-access-full{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eefaf2;color:#187044;font-weight:700;font-size:12px}.client-access-inherited{color:#74869a;font-size:12px}
.revision-dialog-v157{width:min(520px,calc(100vw - 32px));border:0;border-radius:16px;padding:0;box-shadow:0 22px 70px rgba(15,35,55,.22)}
.revision-dialog-v157::backdrop{background:rgba(13,32,49,.38)}
.revision-dialog-v157 form{padding:20px}.revision-dialog-v157 p{color:#5d7184;margin:8px 0 16px}.revision-dialog-v157 label{display:grid;gap:6px;font-weight:700}.revision-dialog-v157 input{width:100%}
.ml-confirm-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.ml-confirm-dialog-head small{color:#7c8fa2;font-weight:800;letter-spacing:.08em}.ml-confirm-dialog-head h3{margin:2px 0 0;font-size:19px}
.ml-confirm-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}

/* V158 — compact list-style Client Admin */
.admin-settings-list{display:grid;gap:18px;max-width:none}.admin-list-group{background:#fff;border:1px solid #dbe4ee;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px rgba(20,43,70,.025)}.admin-list-group-title{padding:14px 16px 10px;background:#fafcfe;border-bottom:1px solid #e6edf4}.admin-list-group-title h2{margin:0 0 2px;font-size:14px;color:#10243b}.admin-list-group-title p{margin:0;color:#7a8ca3;font-size:11px}.admin-list-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto 18px;align-items:center;gap:12px;padding:13px 16px;text-decoration:none!important;color:inherit!important;border-bottom:1px solid #edf2f6;background:#fff;transition:background .12s ease}.admin-list-row:last-child{border-bottom:0}.admin-list-row:hover{background:#f8fbfe}.admin-list-icon{width:34px;height:34px;border-radius:9px;background:#f0f5fb;color:#274d76;display:grid;place-items:center;font-weight:800}.admin-list-copy{min-width:0}.admin-list-copy b{display:block;font-size:13px;color:#10243b}.admin-list-copy small{display:block;margin-top:3px;color:#687c92;font-size:11px;line-height:1.4}.admin-list-meta{font-size:10px;color:#65788e;background:#f4f7fa;border-radius:999px;padding:5px 8px;white-space:nowrap}.admin-list-chevron{font-size:20px;color:#8294a9}.client-users-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.client-user-list{background:#fff;border:1px solid #dbe4ee;border-radius:14px;overflow:hidden}.client-user-row{display:grid;grid-template-columns:minmax(220px,1.2fr) 130px 110px minmax(220px,1fr) auto;gap:14px;align-items:center;padding:14px 16px;border-bottom:1px solid #edf2f6}.client-user-row:last-child{border-bottom:0}.client-user-identity b{display:block;color:#10243b}.client-user-identity small{display:block;color:#6d8096;margin-top:3px}.role-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:800;background:#eef3f8;color:#425b75}.role-badge.admin{background:#e8f7ef;color:#08764f}.role-badge.manager{background:#eaf1ff;color:#2d5cab}.role-badge.standard{background:#f2f4f7;color:#526274}.role-badge.viewer{background:#fff4df;color:#8a5a00}.owner-badge{display:inline-flex;margin-left:6px;border-radius:999px;padding:3px 6px;background:#e7f8f2;color:#087a5c;font-size:9px;font-weight:900}.client-user-access-summary{font-size:11px;color:#60758a}.client-user-actions{display:flex;gap:7px;justify-content:flex-end}.client-user-add{background:#fff;border:1px solid #dbe4ee;border-radius:14px;padding:16px;margin-bottom:14px}.client-user-add-grid{display:grid;grid-template-columns:1.2fr 1.4fr .8fr 1fr auto;gap:10px;align-items:end}.client-user-add-grid label{margin:0}.role-guide{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0 18px}.role-guide-item{background:#fff;border:1px solid #e0e8f0;border-radius:11px;padding:11px}.role-guide-item b{display:block;font-size:12px}.role-guide-item small{display:block;color:#718399;margin-top:4px;font-size:10px;line-height:1.4}@media(max-width:1000px){.admin-list-row{grid-template-columns:38px minmax(0,1fr) 18px}.admin-list-meta{display:none}.client-user-row{grid-template-columns:1fr auto}.client-user-row>*:nth-child(3),.client-user-row>*:nth-child(4){display:none}.client-user-add-grid,.role-guide{grid-template-columns:1fr 1fr}}@media(max-width:620px){.client-user-add-grid,.role-guide{grid-template-columns:1fr}.client-user-row{grid-template-columns:1fr}.client-user-actions{justify-content:flex-start}}
html[data-theme="dark"] .admin-list-group,html[data-theme="dark"] .admin-list-row,html[data-theme="dark"] .client-user-list,html[data-theme="dark"] .client-user-add,html[data-theme="dark"] .role-guide-item{background:#151f2b!important;border-color:#2f4051!important}html[data-theme="dark"] .admin-list-group-title{background:#111b26!important;border-color:#2f4051!important}html[data-theme="dark"] .admin-list-row{border-color:#263747!important}html[data-theme="dark"] .admin-list-row:hover{background:#1a2734!important}

/* V158 — public Mo Lapaye website and account flows */
.ml-marketing-body{margin:0;background:#f6f8fb;color:#10243b;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.ml-marketing-nav{height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 clamp(22px,4vw,70px);background:rgba(255,255,255,.94);border-bottom:1px solid #e5ebf2;position:sticky;top:0;z-index:50;backdrop-filter:blur(12px)}.ml-marketing-brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#10243b}.ml-marketing-brand img{width:38px;height:38px;border-radius:10px}.ml-marketing-brand span{display:grid}.ml-marketing-brand b{font-size:15px}.ml-marketing-brand small{font-size:8px;letter-spacing:.18em;color:#7b8ca1;font-weight:800}.ml-marketing-nav nav{display:flex;align-items:center;gap:18px}.ml-marketing-nav nav>a:not(.button):not(.secondary){text-decoration:none;color:#53677f;font-size:13px;font-weight:700}.ml-marketing-nav .secondary,.ml-marketing-nav .button{padding:9px 13px;border-radius:9px;text-decoration:none;font-size:12px}.ml-marketing-flashes{max-width:1180px;margin:16px auto 0;padding:0 24px}.ml-hero{max-width:1180px;margin:0 auto;padding:84px 24px 70px;display:grid;grid-template-columns:1.05fr .95fr;gap:64px;align-items:center}.ml-eyebrow{display:inline-flex;font-size:10px;font-weight:900;letter-spacing:.16em;color:#17855c}.ml-hero h1{font-size:clamp(46px,6vw,76px);line-height:.98;letter-spacing:-.055em;margin:16px 0 22px;color:#0f2237}.ml-hero p{max-width:650px;font-size:18px;line-height:1.65;color:#61758d;margin:0}.ml-hero-actions{display:flex;gap:10px;margin-top:28px}.ml-hero-actions a{padding:12px 17px;text-decoration:none;border-radius:10px;font-weight:800}.ml-hero-note{margin-top:18px;color:#8392a5;font-size:12px}.ml-hero-panel{position:relative}.ml-product-preview{background:#fff;border:1px solid #dce5ee;border-radius:22px;box-shadow:0 30px 80px rgba(23,47,76,.12);overflow:hidden;transform:rotate(-1deg)}.preview-top{height:46px;border-bottom:1px solid #e8eef4;background:#f9fbfd;display:flex;align-items:center;gap:7px;padding:0 14px}.preview-top span{width:8px;height:8px;border-radius:50%;background:#cdd7e2}.preview-top b{margin-left:8px;font-size:12px}.preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:22px}.preview-grid div{background:#f6f9fc;border:1px solid #e8eef4;border-radius:12px;padding:16px}.preview-grid small{display:block;font-size:8px;color:#8090a3;font-weight:900;letter-spacing:.08em}.preview-grid b{display:block;margin-top:8px;font-size:18px}.preview-lines{padding:0 22px 24px;display:grid;gap:9px}.preview-lines span{height:26px;border-radius:7px;background:linear-gradient(90deg,#eef4f8 0 28%,#f7f9fb 28% 100%);border:1px solid #edf1f5}.ml-entry-grid{max-width:1180px;margin:0 auto;padding:0 24px 72px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.ml-entry-grid>a,.ml-entry-grid>div{background:#fff;border:1px solid #dfe7ef;border-radius:14px;padding:20px;text-decoration:none;color:#10243b;box-shadow:0 3px 10px rgba(20,43,70,.025)}.ml-entry-grid span{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:#eef4fb;color:#2b5b8e;margin-bottom:14px}.ml-entry-grid b{display:block;font-size:14px}.ml-entry-grid small{display:block;margin-top:5px;color:#72849a;line-height:1.5}.ml-feature-section{background:#fff;border-top:1px solid #e6ecf2;border-bottom:1px solid #e6ecf2;padding:76px max(24px,calc((100vw - 1132px)/2))}.ml-section-kicker{font-size:10px;font-weight:900;letter-spacing:.16em;color:#2a67b7}.ml-feature-section h2{font-size:34px;letter-spacing:-.04em;margin:12px 0 28px}.ml-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.ml-feature-grid article{border:1px solid #e2e9f0;border-radius:13px;padding:18px;background:#fbfcfe}.ml-feature-grid article b{font-size:14px}.ml-feature-grid article p{font-size:12px;color:#6a7d92;line-height:1.6;margin:7px 0 0}.ml-cta{max-width:1180px;margin:0 auto;padding:72px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px}.ml-cta h2{font-size:30px;letter-spacing:-.035em;margin:9px 0}.ml-cta p{margin:0;color:#6e8095}.ml-cta .button{text-decoration:none;padding:12px 18px;border-radius:10px}.ml-marketing-footer{border-top:1px solid #e3eaf1;padding:28px max(24px,calc((100vw - 1132px)/2));display:flex;align-items:center;justify-content:space-between;color:#718399;font-size:11px}.ml-marketing-footer div{display:grid}.ml-marketing-footer b{color:#17304a;font-size:13px}.ml-auth-page{min-height:calc(100vh - 145px);display:grid;place-items:center;padding:50px 20px}.ml-auth-card{width:min(520px,100%);background:#fff;border:1px solid #dce5ee;border-radius:18px;padding:28px;box-shadow:0 22px 60px rgba(16,37,60,.08)}.ml-auth-heading h1{font-size:28px;letter-spacing:-.035em;margin:10px 0 8px}.ml-auth-heading p{margin:0 0 22px;color:#6a7d92;line-height:1.5}.ml-auth-form{display:grid;gap:13px}.ml-auth-form label{font-size:11px;font-weight:800;color:#52667c}.ml-auth-form input,.ml-auth-form select{width:100%;margin-top:6px}.ml-auth-form button{margin-top:4px}.ml-auth-foot{margin-top:18px;text-align:center;font-size:12px;color:#718399}.ml-auth-foot a{font-weight:800}@media(max-width:850px){.ml-marketing-nav nav>a:not(.button):not(.secondary){display:none}.ml-hero{grid-template-columns:1fr;padding-top:56px}.ml-hero-panel{max-width:620px}.ml-entry-grid,.ml-feature-grid{grid-template-columns:1fr}.ml-cta{align-items:flex-start;flex-direction:column}}@media(max-width:560px){.ml-marketing-nav{padding:0 16px}.ml-marketing-nav nav{gap:7px}.ml-marketing-nav .secondary{display:none}.ml-hero{padding-left:18px;padding-right:18px}.ml-hero-actions{align-items:stretch;flex-direction:column}.ml-entry-grid{padding-left:18px;padding-right:18px}.preview-grid{grid-template-columns:1fr}.ml-marketing-footer{align-items:flex-start;flex-direction:column;gap:8px}}

/* V159 — public product site + invitation onboarding */
.ml-marketing-body{background:#f7f9fc;color:#10243b;overflow-x:hidden}
.ml-marketing-nav{height:76px;padding:0 clamp(22px,4vw,72px);border-bottom:1px solid #e6ecf2;background:rgba(255,255,255,.92);box-shadow:0 1px 0 rgba(14,32,52,.02)}
.ml-marketing-brand img{width:36px;height:36px;border-radius:9px}.ml-marketing-brand b{font-size:16px;letter-spacing:-.01em}.ml-marketing-brand small{font-size:8px;letter-spacing:.18em}
.ml-marketing-nav nav{gap:22px}.ml-marketing-nav nav>a{font-size:12px;font-weight:800;text-decoration:none}.ml-marketing-nav nav>a:not(.ml-nav-cta):not(.ml-nav-signin){color:#53677f}.ml-nav-signin{color:#15304e;padding:10px 13px;border-radius:9px}.ml-nav-signin:hover{background:#f0f4f8}.ml-nav-cta{background:#1369e8;color:white!important;padding:10px 15px;border-radius:9px;box-shadow:0 7px 18px rgba(19,105,232,.15)}
.ml-home-hero{position:relative;padding:86px 30px 92px;background:radial-gradient(circle at 78% 26%,rgba(51,129,255,.10),transparent 31%),linear-gradient(180deg,#fbfcfe 0%,#f4f7fb 100%);border-bottom:1px solid #e5ebf2}.ml-home-hero-inner{width:min(1480px,100%);margin:auto;display:grid;grid-template-columns:.82fr 1.18fr;gap:70px;align-items:center}.ml-home-copy{padding-left:clamp(0px,2vw,34px)}.ml-home-copy h1{font-size:clamp(58px,6.1vw,94px);line-height:.93;letter-spacing:-.065em;margin:18px 0 26px;color:#0b213a;font-weight:850}.ml-home-copy h1 em{font-style:normal;color:#1670e8}.ml-home-copy>p{font-size:18px;line-height:1.72;color:#60758d;max-width:680px;margin:0}.ml-home-actions{display:flex;gap:11px;margin-top:32px}.ml-btn-primary,.ml-btn-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:10px;font-size:13px;font-weight:850;text-decoration:none}.ml-btn-primary{background:#1268e6;color:#fff;box-shadow:0 12px 25px rgba(18,104,230,.18)}.ml-btn-primary:hover{background:#0c5fd8}.ml-btn-secondary{background:#fff;color:#17334f;border:1px solid #d6e0ea}.ml-btn-secondary:hover{background:#f8fafc}.ml-btn-secondary.full{width:100%;box-sizing:border-box}.ml-home-trust{display:flex;flex-wrap:wrap;gap:18px;margin-top:24px;color:#8291a4;font-size:11px;font-weight:700}.ml-home-trust span{display:flex;align-items:center;gap:7px}.ml-home-trust span:before{content:"";width:5px;height:5px;border-radius:50%;background:#33b479}
.ml-home-product-wrap{position:relative;min-width:0}.ml-home-product-glow{position:absolute;inset:15% 8% -5%;background:rgba(45,116,214,.13);filter:blur(60px);border-radius:50%}.ml-home-product{position:relative;background:#fff;border:1px solid #d9e3ec;border-radius:18px;overflow:hidden;box-shadow:0 35px 90px rgba(18,47,79,.16),0 3px 10px rgba(18,47,79,.06);transform:perspective(1200px) rotateY(-2deg) rotateX(1deg)}.ml-demo-topbar{height:52px;background:#f7fafd;border-bottom:1px solid #e3eaf1;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 16px}.ml-demo-logo{display:flex;align-items:center;gap:8px;font-size:11px}.ml-demo-logo img{width:24px;height:24px;border-radius:6px}.ml-demo-period{font-size:10px;font-weight:800;background:#edf3f9;border:1px solid #dce6ef;border-radius:7px;padding:6px 10px}.ml-demo-user{justify-self:end;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#132c48;color:white;font-size:9px;font-weight:900}.ml-demo-body{display:grid;grid-template-columns:44px 1fr}.ml-demo-side{background:#102840;min-height:430px;padding-top:22px;display:flex;flex-direction:column;align-items:center;gap:18px}.ml-demo-side span{width:16px;height:16px;border-radius:5px;background:#29435e}.ml-demo-side .on{background:#27bf84;box-shadow:0 0 0 4px rgba(39,191,132,.1)}.ml-demo-main{padding:24px 24px 28px;min-width:0}.ml-demo-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.ml-demo-heading div{display:grid;gap:4px}.ml-demo-heading small{font-size:8px;color:#8090a3;font-weight:900;letter-spacing:.13em}.ml-demo-heading b{font-size:16px;letter-spacing:-.02em}.ml-demo-status{font-size:8px;font-weight:900;color:#188258;background:#e8f8f0;border:1px solid #caeedc;padding:6px 8px;border-radius:999px}.ml-demo-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:20px}.ml-demo-metrics div{background:#f6f9fc;border:1px solid #e5ecf2;border-radius:10px;padding:12px}.ml-demo-metrics small{display:block;font-size:7px;color:#8a99aa;font-weight:900;letter-spacing:.07em}.ml-demo-metrics b{display:block;margin-top:7px;font-size:12px;color:#17304a}.ml-demo-table{margin-top:15px;border:1px solid #e0e8ef;border-radius:10px;overflow:hidden}.ml-demo-table>div{display:grid;grid-template-columns:1.5fr repeat(4,.75fr);align-items:center;min-height:46px;border-top:1px solid #ebf0f4;font-size:9px;color:#4f647b}.ml-demo-table>div:first-child{border-top:0}.ml-demo-table span,.ml-demo-table strong{padding:0 11px;text-align:right}.ml-demo-table span:first-child{text-align:left;color:#223b55;font-weight:700}.ml-demo-table strong{color:#0b6444;background:#edf9f3;height:46px;display:flex;align-items:center;justify-content:flex-end}.ml-demo-table .head{min-height:34px;background:#edf3f8;color:#607389;font-size:7px;font-weight:900}.ml-demo-table .head span{color:#607389!important}.ml-demo-table i{display:inline-block;width:7px;height:7px;background:#cbd8e4;border-radius:2px;margin-right:6px}
.ml-home-portals,.ml-home-features{padding:92px 30px}.ml-home-portals{background:#fff}.ml-home-section-head{width:min(1120px,100%);margin:0 auto 38px;text-align:center}.ml-home-section-head h2{font-size:clamp(36px,4vw,54px);letter-spacing:-.05em;line-height:1.02;margin:13px 0;color:#0e2741}.ml-home-section-head>p{max-width:680px;margin:0 auto;color:#6b7e93;font-size:15px;line-height:1.65}.ml-portal-grid{width:min(1180px,100%);margin:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.ml-portal-card{display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:center;background:#fff;border:1px solid #dce5ed;border-radius:14px;padding:20px;text-decoration:none;color:#10243b;box-shadow:0 8px 25px rgba(17,46,77,.04);transition:.16s ease}.ml-portal-card:not(.static):hover{transform:translateY(-2px);border-color:#b9cce0;box-shadow:0 13px 35px rgba(17,46,77,.08)}.ml-portal-icon{width:38px;height:38px;border-radius:10px;background:#edf4fd;color:#246fca;display:grid;place-items:center;font-weight:900}.ml-portal-card b{display:block;font-size:14px}.ml-portal-card p{font-size:11px;line-height:1.5;color:#718399;margin:5px 0 0}.ml-arrow{font-size:18px;color:#7c90a5}.ml-tag{font-size:9px;background:#edf7f2;color:#23825d;border-radius:999px;padding:5px 8px;font-weight:800}
.ml-home-features{background:#0f243a;color:white}.ml-home-features .ml-home-section-head{text-align:left;width:min(1240px,100%)}.ml-home-section-head.split{display:grid;grid-template-columns:1fr .7fr;gap:70px;align-items:end}.ml-home-features .ml-home-section-head h2{color:white;margin-bottom:0}.ml-home-features .ml-home-section-head>p{color:#9fb0c1;margin:0;max-width:520px}.ml-feature-board{width:min(1240px,100%);margin:auto;display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.ml-feature-board article{min-height:190px;border:1px solid #294158;background:#152c43;border-radius:15px;padding:22px;position:relative;overflow:hidden}.ml-feature-board article.wide{grid-column:span 2}.ml-feature-board article>span{font-size:9px;font-weight:900;color:#5fa2f5;letter-spacing:.1em}.ml-feature-board h3{font-size:18px;margin:20px 0 8px;letter-spacing:-.02em}.ml-feature-board p{font-size:12px;line-height:1.65;color:#a7b6c5;margin:0;max-width:430px}.mini-ui{position:absolute;right:22px;bottom:22px;width:42%;display:grid;gap:6px}.mini-ui i{height:18px;border-radius:5px;background:#203b55;border:1px solid #31506d}.mini-ui i:first-child{background:#1d70c9;border-color:#3388e2}
.ml-home-final{width:min(1240px,calc(100% - 60px));margin:92px auto;display:grid;grid-template-columns:1.1fr .7fr;gap:70px;align-items:end;background:linear-gradient(135deg,#edf5ff,#f8fbff);border:1px solid #dce8f4;border-radius:22px;padding:52px}.ml-home-final h2{font-size:clamp(38px,4vw,56px);line-height:1.02;letter-spacing:-.05em;margin:13px 0 0;color:#0d2742}.ml-home-final p{font-size:14px;line-height:1.65;color:#657a90;margin:0 0 20px}.ml-marketing-footer{padding:30px max(30px,calc((100vw - 1240px)/2));background:#fff;border-top:1px solid #e4eaf0;display:grid;grid-template-columns:1fr auto 1fr;gap:30px}.ml-marketing-footer .brand{display:grid}.ml-marketing-footer .links{display:flex;gap:22px}.ml-marketing-footer a{text-decoration:none;color:#667b91;font-weight:700}.ml-marketing-footer>span{text-align:right}
.invite-card{max-width:500px}.invite-person{display:flex;align-items:center;gap:12px;background:#f6f9fc;border:1px solid #e1e8ef;border-radius:11px;padding:12px;margin:0 0 18px}.invite-person>span{width:36px;height:36px;border-radius:9px;background:#e5eef9;color:#285d94;display:grid;place-items:center;font-weight:900}.invite-person div{display:grid}.invite-person small{color:#77899c;margin-top:2px}.invite-status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:9px;font-weight:850;background:#fff5df;color:#946113;border:1px solid #f0d69a}.inline-user-action{display:inline-flex}.danger-soft{color:#b44b4b!important;border-color:#efcaca!important}.client-user-add-grid.invite-grid{grid-template-columns:1.2fr 1.5fr .8fr auto}
@media(max-width:1050px){.ml-home-hero-inner{grid-template-columns:1fr;gap:55px}.ml-home-copy{padding-left:0}.ml-home-product{transform:none}.ml-home-section-head.split,.ml-home-final{grid-template-columns:1fr;gap:24px}.ml-feature-board{grid-template-columns:repeat(2,1fr)}.ml-portal-grid{grid-template-columns:1fr}.client-user-add-grid.invite-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.ml-marketing-nav nav>a:not(.ml-nav-signin):not(.ml-nav-cta){display:none}.ml-home-hero{padding:58px 18px 68px}.ml-home-copy h1{font-size:54px}.ml-home-actions{flex-direction:column;align-items:stretch}.ml-demo-metrics{grid-template-columns:repeat(2,1fr)}.ml-demo-table>div{grid-template-columns:1.45fr repeat(2,.8fr)}.ml-demo-table span:nth-child(3),.ml-demo-table span:nth-child(4){display:none}.ml-home-portals,.ml-home-features{padding:70px 18px}.ml-feature-board{grid-template-columns:1fr}.ml-feature-board article.wide{grid-column:auto}.ml-home-final{width:calc(100% - 36px);margin:60px auto;padding:30px}.ml-marketing-footer{grid-template-columns:1fr;gap:16px}.ml-marketing-footer>span{text-align:left}.client-user-add-grid.invite-grid{grid-template-columns:1fr}}

/* V160 — public website refresh (approved minimal concept) */
.ml-v160-site{background:#fbfaf7;color:#0f1f2c;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.ml-v160-nav{height:86px;padding:0 clamp(28px,5vw,86px);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:38px;background:rgba(255,254,251,.96);border-bottom:1px solid #eeeae2;position:sticky;top:0;z-index:100;backdrop-filter:blur(16px)}
.ml-v160-brand{display:flex;align-items:center;gap:10px;color:#102333;text-decoration:none;white-space:nowrap}.ml-v160-brand img{width:42px;height:42px;object-fit:contain}.ml-v160-brand b{font-size:23px;letter-spacing:-.035em}
.ml-v160-mainnav{display:flex;justify-content:center;gap:38px}.ml-v160-mainnav a{position:relative;color:#1d2a35;text-decoration:none;font-size:13px;font-weight:600;padding:32px 0}.ml-v160-mainnav a.active:after{content:"";position:absolute;left:0;right:0;bottom:22px;height:2px;background:#0d4a3f;border-radius:99px}
.ml-v160-nav-actions{display:flex;align-items:center;gap:12px;white-space:nowrap}.ml-v160-country{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#40515f;margin-right:6px}.ml-v160-country i{font-style:normal;color:#6d7c87}.ml-v160-login,.ml-v160-attendance{height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;text-decoration:none;font-size:12px;font-weight:700}.ml-v160-login{padding:0 18px;color:#16322c;background:rgba(255,255,255,.72);border:1px solid #8aa39d}.ml-v160-attendance{padding:0 20px;background:#064b3e;color:white;border:1px solid #064b3e;gap:12px;box-shadow:0 7px 18px rgba(6,75,62,.09)}
.ml-v160-hero{min-height:505px;display:grid;grid-template-columns:.86fr 1.14fr;gap:44px;align-items:center;padding:66px clamp(28px,5vw,86px) 38px;background:radial-gradient(circle at 87% 40%,rgba(12,82,68,.08),transparent 30%),linear-gradient(120deg,#fffefa 0%,#fbfaf7 58%,#f3f3ee 100%);overflow:hidden}.ml-v160-hero-copy{padding:6px 0 20px}.ml-v160-kicker{font-size:10px;letter-spacing:.28em;font-weight:800;color:#4d6c72}.ml-v160-hero h1{font-size:clamp(60px,6.3vw,96px);line-height:.95;letter-spacing:-.066em;margin:23px 0 21px;font-weight:750;color:#111d29}.ml-v160-hero h1 em{font-style:normal;color:#0d715e}.ml-v160-hero-copy>p{font-size:18px;line-height:1.52;color:#586a78;margin:0}.ml-v160-hero-actions{margin-top:29px}.ml-v160-primary{display:inline-flex;height:50px;padding:0 25px;align-items:center;gap:24px;border-radius:7px;background:#075345;color:#fff;text-decoration:none;font-size:14px;font-weight:700;box-shadow:0 10px 20px rgba(7,83,69,.08)}.ml-v160-primary:hover{background:#06473c}.ml-v160-start-note{display:block;margin-top:14px;color:#829099;font-size:11px}
.ml-v160-visual{position:relative;min-width:0;padding-right:44px}.ml-v160-script-note{position:absolute;right:-2px;top:12px;font-family:"Segoe Print","Bradley Hand",cursive;font-size:19px;line-height:1.32;color:#243b44;transform:rotate(-5deg);z-index:2}.ml-v160-script-note span{display:block;width:45px;border-bottom:2px solid #33474e;margin-top:10px}
.ml-v160-laptop{position:relative;margin:0 auto;width:min(760px,94%);filter:drop-shadow(0 24px 24px rgba(41,50,52,.16));transform:perspective(1200px) rotateY(-2deg)}.ml-v160-screen{display:grid;grid-template-columns:145px 1fr;height:395px;background:#fff;border:12px solid #1e2528;border-bottom-width:16px;border-radius:18px 18px 8px 8px;overflow:hidden;box-shadow:inset 0 0 0 1px #202b30}.ml-v160-laptop-base{height:15px;width:109%;margin-left:-4.5%;background:linear-gradient(#c7c9c7,#e9e8e4 46%,#9da0a0 48%,#d6d5d0);border-radius:2px 2px 22px 22px;box-shadow:0 4px 4px rgba(0,0,0,.14)}
.ml-v160-demo-side{background:#fbfcfa;border-right:1px solid #e9ede9;padding:15px 11px}.ml-v160-demo-brand{display:flex!important;align-items:center!important;gap:7px!important;margin-bottom:20px;color:#0f2c28!important}.ml-v160-demo-brand img{width:20px;height:20px}.ml-v160-demo-brand b{font-size:11px}.ml-v160-demo-side>div{height:31px;display:flex;align-items:center;gap:8px;border-radius:6px;padding:0 8px;color:#586b72;font-size:10px}.ml-v160-demo-side>div.active{background:#e8f4ef;color:#0b634f;font-weight:800}.ml-v160-demo-side>div span{white-space:nowrap}
.ml-v160-demo-main{padding:22px 20px;background:#fff;min-width:0}.ml-v160-demo-top{display:grid;grid-template-columns:1fr auto auto;align-items:start;gap:11px}.ml-v160-demo-top div{display:grid}.ml-v160-demo-top b{font-size:20px;letter-spacing:-.03em}.ml-v160-demo-top small{font-size:9px;color:#87949a;margin-top:2px}.ml-v160-demo-top>span{font-size:14px;color:#637980;margin-top:1px}.ml-v160-demo-top>i{font-style:normal;width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#dce8e9;color:#546a70;font-weight:800;font-size:9px}
.ml-v160-demo-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:22px}.ml-v160-demo-kpis article{position:relative;border:1px solid #e9ece9;border-radius:8px;padding:12px;min-height:66px}.ml-v160-demo-kpis small{display:block;font-size:8px;color:#7c8c92}.ml-v160-demo-kpis b{display:block;font-size:13px;margin-top:10px}.ml-v160-demo-kpis span{position:absolute;right:10px;bottom:12px;width:25px;height:25px;border-radius:6px;display:grid;place-items:center;font-size:11px}.ml-v160-demo-kpis .green,.ml-v160-feature-strip .mint{background:#dff6ec;color:#0d785e}.ml-v160-demo-kpis .mint{background:#e7f7ef;color:#0a7a56}.ml-v160-demo-kpis .lavender,.ml-v160-feature-strip .lavender{background:#eee9ff;color:#4338ca}
.ml-v160-activity{margin-top:12px;border:1px solid #e8ecea;border-radius:8px;overflow:hidden}.ml-v160-activity-title{height:39px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0ee}.ml-v160-activity-title b{font-size:10px}.ml-v160-activity-title a{font-size:8px;color:#246dde}.ml-v160-activity>div:not(.ml-v160-activity-title){height:38px;padding:0 12px;display:grid;grid-template-columns:20px 1fr auto;align-items:center;border-bottom:1px solid #f0f2f1}.ml-v160-activity>div:last-child{border-bottom:0}.ml-v160-activity>div>span{font-size:9px;color:#0c755c}.ml-v160-activity p{margin:0;font-size:9px;color:#50646e}.ml-v160-activity i{font-style:normal;font-size:8px;padding:4px 7px;border-radius:999px}.ml-v160-activity i.done{background:#def6e9;color:#087b57}.ml-v160-activity i.pending{background:#fff0df;color:#cc7a24}
.ml-v160-feature-strip{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;padding:30px clamp(28px,5vw,86px);border-top:1px solid #efede7;border-bottom:1px solid #efede7}.ml-v160-feature-strip article{display:flex;justify-content:center;align-items:center;gap:18px;min-height:110px;border-right:1px solid #ecebe7}.ml-v160-feature-strip article:last-child{border-right:0}.ml-v160-feature-strip article>span{width:53px;height:53px;border-radius:50%;display:grid;place-items:center;font-size:22px}.ml-v160-feature-strip .blue{background:#e6efff;color:#1955b7}.ml-v160-feature-strip .peach{background:#fff0e3;color:#8e4a16}.ml-v160-feature-strip h3{font-size:17px;margin:0 0 6px}.ml-v160-feature-strip p{font-size:12px;line-height:1.45;color:#71818b;margin:0}
.ml-v160-story{display:grid;grid-template-columns:1fr 1fr;min-height:275px;background:#fbfaf7;border-bottom:1px solid #efede7}.ml-v160-mauritius-panel{position:relative;overflow:hidden;padding:27px clamp(28px,5vw,86px);background:linear-gradient(#a8d8ef 0 55%,#5ca4bd 56% 100%);color:white}.ml-v160-mauritius-panel>.top,.ml-v160-mauritius-panel>.bottom{position:relative;z-index:4;font-size:9px;line-height:1.8;letter-spacing:.28em;font-weight:800;text-shadow:0 1px 4px rgba(10,47,56,.18)}.ml-v160-mauritius-panel>.bottom{position:absolute;bottom:18px;left:clamp(28px,5vw,86px)}.ml-v160-island-art{position:absolute;inset:0}.ml-v160-island-art .sun{position:absolute;width:120px;height:120px;border-radius:50%;background:rgba(255,236,192,.55);right:18%;top:12%}.ml-v160-island-art .mountain{position:absolute;left:18%;bottom:25%;width:68%;height:62%;clip-path:polygon(0 100%,13% 72%,24% 80%,39% 28%,47% 50%,57% 18%,66% 57%,75% 44%,100% 100%);background:#4e7d68}.ml-v160-island-art .mountain.back{transform:translateX(-70px) scale(.92);opacity:.68;background:#6f967f}.ml-v160-island-art .mountain.front{background:linear-gradient(135deg,#607f63,#2f6758 55%,#8da474)}.ml-v160-island-art .water{position:absolute;left:0;right:0;bottom:0;height:29%;background:linear-gradient(180deg,#72bad0,#7ec4d4 55%,#a2d4dd);border-top:1px solid rgba(255,255,255,.7)}
.ml-v160-story-copy{position:relative;padding:44px clamp(52px,7vw,110px);display:flex;flex-direction:column;justify-content:center}.ml-v160-story-kicker{font-size:9px;letter-spacing:.28em;color:#62767f;font-weight:800}.ml-v160-story-kicker:before{content:"";display:inline-block;width:28px;border-top:2px solid #0a6e59;margin:0 11px 3px 0}.ml-v160-story-copy h2{font-size:clamp(35px,3.1vw,53px);line-height:1.02;letter-spacing:-.045em;margin:23px 0 11px;color:#111f2b}.ml-v160-story-copy p{font-size:18px;color:#6a7b85;margin:0}.ml-v160-story-words{position:absolute;right:5%;top:50%;transform:translateY(-50%);border-left:1px solid #dfe4e1;padding-left:39px;font-size:9px;line-height:2.2;letter-spacing:.28em;color:#677982}
.ml-v160-pricing-anchor{height:1px;overflow:hidden;opacity:0}.ml-v160-footer{min-height:95px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:34px;padding:20px clamp(28px,5vw,86px);background:#fff;border-top:1px solid #efede7}.ml-v160-footer-brand>div{display:flex;align-items:center;gap:8px}.ml-v160-footer-brand img{width:31px;height:31px}.ml-v160-footer-brand b{font-size:18px;letter-spacing:-.025em}.ml-v160-footer-brand small{display:block;color:#8b969c;font-size:8px;margin-top:10px}.ml-v160-footer nav{display:flex;gap:28px}.ml-v160-footer a{color:#62727d;text-decoration:none;font-size:10px}.ml-v160-footer-right{text-align:right;color:#63737c;font-size:10px}.ml-v160-footer-right>div{display:flex;justify-content:flex-end;align-items:center;gap:11px}.ml-v160-footer-right small{display:flex;justify-content:flex-end;gap:20px;margin-top:13px}.ml-social{font-size:14px;font-weight:800;color:#52626c}
@media(max-width:1100px){.ml-v160-nav{grid-template-columns:auto 1fr}.ml-v160-mainnav{display:none}.ml-v160-nav-actions{justify-self:end}.ml-v160-hero{grid-template-columns:1fr;padding-top:48px}.ml-v160-visual{padding-right:60px}.ml-v160-feature-strip{grid-template-columns:1fr 1fr}.ml-v160-feature-strip article:nth-child(2){border-right:0}.ml-v160-feature-strip article:nth-child(-n+2){border-bottom:1px solid #ecebe7}.ml-v160-story{grid-template-columns:1fr}.ml-v160-story-words{right:7%}.ml-v160-footer{grid-template-columns:1fr;gap:14px}.ml-v160-footer nav{justify-content:flex-start}.ml-v160-footer-right{text-align:left}.ml-v160-footer-right>div,.ml-v160-footer-right small{justify-content:flex-start}}
@media(max-width:760px){.ml-v160-nav{height:auto;min-height:72px;padding:12px 18px;grid-template-columns:1fr auto}.ml-v160-brand b{font-size:19px}.ml-v160-brand img{width:34px;height:34px}.ml-v160-country{display:none}.ml-v160-nav-actions{gap:7px}.ml-v160-login{padding:0 12px}.ml-v160-attendance{padding:0 13px}.ml-v160-hero{padding:50px 18px 34px}.ml-v160-hero h1{font-size:58px}.ml-v160-hero-copy>p br{display:none}.ml-v160-visual{padding-right:0}.ml-v160-script-note{display:none}.ml-v160-laptop{width:100%;transform:none}.ml-v160-screen{grid-template-columns:70px 1fr;height:330px;border-width:7px;border-bottom-width:10px}.ml-v160-demo-side{padding:10px 6px}.ml-v160-demo-side>div{justify-content:center}.ml-v160-demo-side>div span,.ml-v160-demo-brand b{display:none}.ml-v160-demo-brand{justify-content:center!important}.ml-v160-demo-kpis{grid-template-columns:1fr 1fr}.ml-v160-demo-kpis article:last-child{display:none}.ml-v160-feature-strip{grid-template-columns:1fr;padding:15px 18px}.ml-v160-feature-strip article{justify-content:flex-start;border-right:0!important;border-bottom:1px solid #ecebe7!important;padding:18px 10px}.ml-v160-feature-strip article:last-child{border-bottom:0!important}.ml-v160-story-copy{padding:40px 24px 100px}.ml-v160-story-copy h2{font-size:38px}.ml-v160-story-words{left:24px;right:auto;top:auto;bottom:25px;transform:none;border-left:0;border-top:1px solid #dfe4e1;padding:12px 0 0;line-height:1.5}.ml-v160-footer{padding:24px 18px}.ml-v160-footer nav{gap:14px;flex-wrap:wrap}}


/* ============================================================
   V161 — marketing homepage fidelity fixes
   Reset legacy application shell rules that were leaking into the
   public site, and match the approved Mo Lapaye concept full-width.
   ============================================================ */
.ml-v160-site main{
  margin-left:0!important;
  padding:0!important;
  max-width:none!important;
  width:100%!important;
}
.ml-v160-site .ml-v160-demo-side{
  position:static!important;
  inset:auto!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  color:inherit!important;
  padding:15px 11px!important;
}
.ml-v160-site .ml-v160-demo-side>div{
  display:flex!important;
  position:static!important;
}
.ml-v160-site .ml-v160-nav,
.ml-v160-site .ml-v160-hero,
.ml-v160-site .ml-v160-feature-strip,
.ml-v160-site .ml-v160-story,
.ml-v160-site .ml-v160-footer{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
.ml-v160-site .ml-v160-hero{
  min-height:450px!important;
  grid-template-columns:0.82fr 1.18fr!important;
  padding:52px clamp(44px,5.3vw,86px) 26px!important;
}
.ml-v160-site .ml-v160-hero-copy{padding-top:0!important}
.ml-v160-site .ml-v160-hero h1{
  font-size:clamp(64px,5.45vw,88px)!important;
  line-height:.94!important;
  margin-top:20px!important;
}
.ml-v160-site .ml-v160-visual{padding-right:34px!important}
.ml-v160-site .ml-v160-laptop{width:min(720px,96%)!important}
.ml-v160-site .ml-v160-screen{height:360px!important}
.ml-v160-site .ml-v160-feature-strip{padding-top:22px!important;padding-bottom:22px!important}
.ml-v160-site .ml-v160-feature-strip article{min-height:92px!important}
.ml-v160-site .ml-v160-story{min-height:220px!important}
.ml-v160-site .ml-v160-mauritius-panel{
  min-height:220px!important;
  background:#8fc9df!important;
}
.ml-v160-site .ml-v160-island-photo{
  position:absolute;
  inset:0;
  z-index:0;
  background-image:linear-gradient(rgba(17,66,71,.02),rgba(17,66,71,.02)),url('/static/mauritius-home.jpg');
  background-size:cover;
  background-position:center center;
}
.ml-v160-site .ml-v160-mauritius-panel>.top,
.ml-v160-site .ml-v160-mauritius-panel>.bottom{z-index:2!important}
.ml-v160-site .ml-v160-story-copy{padding-top:34px!important;padding-bottom:34px!important}
.ml-v160-site .ml-v160-story-copy h2{font-size:clamp(34px,3vw,50px)!important;margin-top:18px!important}
.ml-v160-site .ml-v160-footer{min-height:92px!important}
@media(max-width:1100px){
  .ml-v160-site .ml-v160-hero{grid-template-columns:1fr!important}
  .ml-v160-site .ml-v160-screen{height:360px!important}
}
@media(max-width:760px){
  .ml-v160-site .ml-v160-hero{padding:44px 18px 28px!important}
  .ml-v160-site .ml-v160-screen{height:320px!important}
}

/* V165 · Final Settlement small-screen table behaviour */
@media (max-width: 1250px){
  .settlement-review-panel .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
  .settlement-check-table{min-width:1120px;table-layout:fixed}
  .settlement-check-table th,.settlement-check-table td{padding-left:10px;padding-right:10px;vertical-align:top}
  .settlement-check-table th:nth-child(1),.settlement-check-table td:nth-child(1){width:185px;min-width:185px;position:sticky;left:0;z-index:3;background:var(--surface,#fff)}
  .settlement-check-table th:nth-child(2),.settlement-check-table td:nth-child(2){width:145px;min-width:145px}
  .settlement-check-table th:nth-child(3),.settlement-check-table td:nth-child(3){width:170px;min-width:170px}
  .settlement-check-table th:nth-child(4),.settlement-check-table td:nth-child(4){width:auto;min-width:380px;white-space:normal;line-height:1.45}
  .settlement-check-table th:last-child,.settlement-check-table td:last-child{width:175px;min-width:175px;position:sticky;right:0;z-index:3;background:var(--surface,#fff);box-shadow:-10px 0 16px -16px rgba(20,42,67,.55)}
  .settlement-check-table thead th:nth-child(1),.settlement-check-table thead th:last-child{z-index:5;background:var(--surface-2,#f7f9fc)}
  .fs-amount-action{display:flex;flex-direction:column;align-items:flex-end;gap:7px;white-space:normal}
  .fs-amount-action form,.fs-amount-action button{max-width:100%}
  .fs-amount-action button{white-space:normal;line-height:1.2;padding:8px 10px}
}
@media (max-width: 760px){
  .settlement-check-table{min-width:1000px}
  .settlement-check-table th:nth-child(1),.settlement-check-table td:nth-child(1){width:160px;min-width:160px}
  .settlement-check-table th:nth-child(4),.settlement-check-table td:nth-child(4){min-width:320px}
  .settlement-check-table th:last-child,.settlement-check-table td:last-child{width:155px;min-width:155px}
  .settlement-review-panel{padding-left:12px;padding-right:12px}
}
