:root{--surface:#fff;--surface-soft:#f6f8fc;--surface-hover:#eef2f8;--ink:#243248;--muted:#68758a;--line:#e2e7ef;--bg:#f3f5f9;--red:#d91c3c;--shadow:0 4px 20px #182a4305}
body{font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.6;letter-spacing:.05px}
button,input,select,textarea{font-family:inherit}button{transition:background-color .15s,border-color .15s,box-shadow .15s}button:disabled{cursor:not-allowed;opacity:.55}a{color:#b91c3b}input,select,textarea{border-color:var(--line);background:var(--surface);color:var(--ink)}input:focus,select:focus,textarea:focus{outline:2px solid #d91c3c55;outline-offset:2px}::placeholder{color:var(--muted);opacity:.9}
header{padding:20px 28px;background:var(--surface)}header h1{font-size:22px}.header-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.header-actions button{padding:9px 12px;font-size:12px}.appearance-toggle{white-space:nowrap;min-height:36px}.login-appearance{position:fixed;right:20px;top:20px;z-index:5}#loginView{background:var(--bg)}
.content{padding:26px 28px}.panel,.people-panel,.side-panel,.login-card{box-shadow:var(--shadow);background:var(--surface);border-color:var(--line)}.people-panel,.panel{border-radius:18px}.secondary{background:var(--surface);color:var(--ink);border:1px solid var(--line)}.secondary:hover{background:var(--surface-hover);border-color:#b7c3d4}.primary{box-shadow:0 3px 8px #d91c3c15}.people-hero{padding:24px;background:linear-gradient(120deg,var(--surface),var(--surface-soft));border-color:var(--line)}.people-hero h2{font-size:29px;letter-spacing:-.6px}.people-toolbar{flex-wrap:wrap;align-items:center}.people-buttons{flex-wrap:wrap}.people-toolbar button{font-size:12px;min-height:36px}.people-filters{padding:14px;background:var(--surface-soft);border-radius:12px;gap:10px}.people-filters input,.people-filters select{font-size:13px}.people-summary>div,.stat{background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}
.company-brand{padding-bottom:16px;gap:9px}.company-brand .logo-tile{padding:9px 13px;border-radius:13px}.company-brand .company-logo{width:74px;height:auto}.company-brand>small{font-size:9px;letter-spacing:2px}.login-brand .company-logo{width:80px;height:auto}.login-brand{margin-bottom:16px}.navlabel{margin-top:20px}nav button{font-size:13px;padding:11px 13px;border-radius:10px}nav details>summary{font-size:12px}aside{background:#141c2a}dialog{color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:18px}dialog::backdrop{background:#0b162580;backdrop-filter:blur(4px)}dialog .team-dialog-header{background:var(--surface)!important;border-color:var(--line)}.team-close{background:var(--surface-soft);color:var(--ink);border:1px solid var(--line);border-radius:11px;min-width:36px;min-height:36px}
[data-theme=dark]{--surface:#182233;--surface-soft:#1e2c40;--surface-hover:#29394f;--ink:#e6edf7;--muted:#a1b0c5;--line:#324158;--bg:#101925;--red:#ef496a;--shadow:0 5px 20px #00000015}
[data-theme=dark] body{background:var(--bg);color:var(--ink)}[data-theme=dark] aside{background:#0c1420;border-right:1px solid #29384c}[data-theme=dark] a{color:#ff93a8}[data-theme=dark] .eyebrow{color:#ff8fa5}[data-theme=dark] .primary{background:#c92248;color:#fff}[data-theme=dark] .primary:hover{background:#e1345a}[data-theme=dark] .role{background:#442337;color:#ffb1c1}[data-theme=dark] .account{background:#ffffff05}[data-theme=dark] .logo-tile{background:#fff}
[data-theme=dark] :is(.people-hero,#peopleView .people-hero,#medicalView .people-hero){background:linear-gradient(115deg,#1c2a3d,#242d41);border-color:var(--line)}
[data-theme=dark] :is(.workflow-card,.person-card,#peopleCards .person-card,.source-payslip,.person-actions,.medical-request-card,#medicalCards .medical-request-card,.branch-card,.people-location-card,.performance-chart-panel,.performance-table-panel,.source-table-wrap,.performance-table-scroll,.attendance-table-wrap){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.people-location-card.all-staff-card,.medical-summary>div:last-child){background:#352438;border-color:#664054;color:#ffb4c4}[data-theme=dark] .people-location-card:hover{background:var(--surface-hover)}
[data-theme=dark] :is(.people-filters,.profile-tabs,.profile-fields dt,.profile-original,.medical-route,.attendance-today,.attendance-scope,.attendance-totals>div,.medical-summary>div,.profile-grid>div,.source-pay-totals>div,.time-calendar>div,.time-calendar>strong,.workflow-checklist){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(#medicalBody,#medicalApprovalBody,#performanceTeamBody,.imported-body,#timeBody,#adminPanel){color:var(--ink);background:var(--surface)}
[data-theme=dark] :is(.person-details span,.person-details small,#peopleCards .person-details span,#peopleCards .person-details small,.medical-amount,.medical-summary strong,.medical-card-main h3,.attendance-totals strong,.branch-progress-summary dd,.branch-progress-summary article>strong){color:var(--ink)}
[data-theme=dark] :is(.medical-waiting,.medical-step,.medical-step.current,.medical-step.completed,.profile-review,.notice){background:#293044;color:var(--ink);border-color:#53617a}[data-theme=dark] .medical-step:before{border-color:var(--surface)}
[data-theme=dark] :is(.profile-tabs button,.profile-tabs,.person-avatar,.people-hero-icon,.articleicon){background:#29384e;color:#c0d1ea}[data-theme=dark] .profile-tabs button[aria-selected=true]{background:#c92248;color:white}
[data-theme=dark] :is(.performance-kpis article,.branch-progress-summary article){background:#1d3343;color:var(--ink);border-color:var(--line)}[data-theme=dark] .performance-kpis .customers{background:#1c3834}[data-theme=dark] .performance-kpis .debtors{background:#332c47}[data-theme=dark] .performance-kpis .health{background:#173c55}[data-theme=dark] :is(.performance-kpis small,.performance-bar,.branch-progress-summary dt,.branch-progress-summary article>span){color:var(--muted)}
[data-theme=dark] :is(table td,table th){border-color:var(--line)}[data-theme=dark] :is(.performance-table-scroll tbody th,.performance-table-scroll tbody tr:nth-child(even),.attendance-table-wrap tbody tr:nth-child(even),.source-table-wrap tr:nth-child(even),#arResults tbody tr:nth-child(even)){background:#1d2a3d;color:var(--ink)}[data-theme=dark] :is(.attendance-table-wrap th,.source-table-wrap th,#arResults th){background:#27384e;color:var(--ink)}[data-theme=dark] :is(.performance-table-scroll tbody tr:hover,#arResults tbody tr:hover){background:#293a50}[data-theme=dark] .performance-branch-link{color:#91cafa}
[data-theme=dark] :is(.person-status,.attendance-state,.performance-status){background:#254338;color:#ace2bf}[data-theme=dark] :is(.attendance-state.late,.performance-status.low,.medical-request-card .person-status){background:#493b25;color:#f5d498}[data-theme=dark] :is(.attendance-state.working,.branch-code){background:#283e59;color:#b4d6ff}[data-theme=dark] :is(.empty,#medicalCards>.empty){background:var(--surface-soft);border-color:var(--line)}
[data-theme=dark] :is(#search,#medicalForm input[type=file],#arFeedback,#arResults>.hint,.branch-debtor-state,.performance-snapshot){background:var(--surface-soft);color:var(--muted);border-color:var(--line)}[data-theme=dark] .side-link{color:#ff9bb0}[data-theme=dark] .top-updates{background:var(--surface)}
@media(max-width:950px){.header-actions{justify-content:flex-start}header{align-items:flex-start;flex-wrap:wrap}.people-toolbar{flex-direction:column;align-items:flex-start}.people-toolbar .people-buttons{width:100%}}
@media(max-width:650px){.company-brand .company-logo{width:40px}.company-brand .logo-tile{padding:6px 8px}.company-brand{padding:0}.content{padding:16px}header{padding:16px}.header-actions{gap:6px}.header-actions button{font-size:11px;padding:8px 10px}.people-hero h2{font-size:25px}.people-hero{padding:20px}.people-panel{padding:16px}nav button{font-size:12px}.login-appearance{top:12px;right:12px;font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
[data-theme=dark] #topUpdates{background:var(--surface);border-color:var(--line)}[data-theme=dark] #topUpdates button{background:var(--surface-soft);color:var(--ink);border-color:var(--line)}[data-theme=dark] #topUpdates button:hover{background:var(--surface-hover)}
.performance-kpis .stock>strong{font-size:clamp(18px,1.65vw,24px);overflow-wrap:normal;word-break:normal}.performance-kpis article{min-width:0}.performance-kpis article>div{flex-wrap:wrap}.performance-kpis article>strong{font-variant-numeric:tabular-nums}

nav .nav-action{display:flex;width:100%;text-align:left;justify-content:flex-start;background:transparent;border:0;color:#c8d2e1;box-shadow:none;font-weight:400;font-size:13px;margin:4px 0;padding:11px 14px;border-radius:10px}nav .nav-action:hover{background:#ffffff10;color:#fff}nav .nav-action[hidden]{display:none}.admin-actions-group{border-top:1px solid #ffffff12;margin-top:12px;padding-top:8px}

.role-module-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);width:100%}.role-module-row strong{flex:1;min-width:180px;font-size:13px}.role-module-row label{font-size:12px;margin:0;display:flex;align-items:center;gap:7px}

.person-login-option{display:flex!important;align-items:center;gap:10px;padding:16px;background:var(--surface-soft);border:1px solid var(--line);border-radius:12px;margin-top:20px!important}.person-login-option input{width:18px!important;height:18px;margin:0}#personLoginAccess{margin:18px 0}#personLoginOptions{padding:4px 0 12px}

.performance-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 12px}.performance-tabs button{padding:9px 18px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--ink);font-size:13px}.performance-tabs button[aria-pressed=true]{background:#254965;color:white;border-color:#254965}.compact-performance table{min-width:680px;font-variant-numeric:tabular-nums}.compact-performance tbody th{max-width:240px;white-space:normal}.compact-performance .performance-branch-link{font-size:12px;text-decoration:none;line-height:1.6}.compact-performance th,.compact-performance td{padding:16px}.compact-performance tfoot td{white-space:nowrap}.compact-performance thead th:first-child{position:sticky;left:0;z-index:3}.performance-table-panel .people-toolbar{align-items:center}.compact-performance .performance-status{white-space:normal;display:inline-block;text-align:right;max-width:180px}@media(max-width:650px){.compact-performance{overflow:visible;max-height:none;border:0}.compact-performance table{min-width:0;display:block}.compact-performance thead{display:none}.compact-performance tbody,.compact-performance tbody tr,.compact-performance tfoot{display:block}.compact-performance tbody tr{border:1px solid var(--line);border-radius:12px;margin:12px 0;overflow:hidden}.compact-performance tbody th{display:block;position:static;max-width:none;background:var(--surface-soft);padding:14px}.compact-performance tbody td{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 14px;white-space:normal;font-size:12px}.compact-performance tbody td:before{content:attr(data-label);font-size:11px;color:var(--muted);text-align:left}.compact-performance tfoot tr{display:flex;flex-wrap:wrap;padding:12px;gap:8px;border-radius:10px}.compact-performance tfoot th{width:100%}.compact-performance tfoot td{padding:6px;font-size:11px}.performance-tabs button{flex:1;padding:9px 12px}}

.full-performance table{min-width:1750px;font-size:11px}.full-performance th,.full-performance td{padding:9px 10px}.full-performance tbody th{min-width:180px}.full-performance thead th:nth-child(2),.full-performance thead th:nth-child(3){background:#544362}.full-performance thead th:nth-child(4),.full-performance thead th:nth-child(7),.full-performance thead th:nth-child(11){background:#d71932}.full-performance thead th:nth-child(5),.full-performance thead th:nth-child(6){background:#4c86c3}.full-performance thead th:nth-child(9),.full-performance thead th:nth-child(10){background:#589f3c}.full-performance .pending-stock,.full-performance .pending-cust{background:#f7e4e4;color:#7d2534;font-weight:600}.full-performance .gap-good{background:#d5efd9;color:#215c34;font-weight:700}.full-performance .gap-risk{background:#ffd9dd;color:#922c3b;font-weight:700}.full-performance .debtor-bar{background-image:linear-gradient(to right,#fb6972 var(--bar),transparent var(--bar))}.full-performance .cust-rate{background-image:linear-gradient(to right,#ccecd6 var(--bar),transparent var(--bar));color:#244b34}.full-performance .individual-score{background:#fbdce2;color:#982d46}.full-performance .health-cell{font-size:10px;font-weight:700;text-align:center;color:#fff}.full-performance .health-cell.good{background:#008e51}.full-performance .health-cell.excellent{background:#e6d239;color:#3b3815}.full-performance .health-cell.attention{background:#edb820;color:#47370a}.full-performance .health-cell.critical{background:#d62536}.full-performance .debtor-health{font-size:10px;font-weight:600}.full-performance tfoot td{font-size:11px}[data-theme=dark] .full-performance .pending-stock,[data-theme=dark] .full-performance .pending-cust{background:#4c2d39;color:#ffc7cf}[data-theme=dark] .full-performance .gap-good{background:#244d38;color:#b8e7c5}[data-theme=dark] .full-performance .gap-risk{background:#582b36;color:#ffc4cf}[data-theme=dark] .full-performance .individual-score{background:#4d2b3f;color:#ffbed7}[data-theme=dark] .full-performance .cust-rate{background-image:linear-gradient(to right,#2e5141 var(--bar),transparent var(--bar));color:#d2eddb}[data-theme=dark] .full-performance .debtor-bar{background-image:linear-gradient(to right,#8f3446 var(--bar),transparent var(--bar))}@media(max-width:650px){.full-performance table{min-width:0}.full-performance tbody th{min-width:0}.full-performance td.health-cell{color:white}.full-performance td.health-cell:before{color:inherit}.full-performance td{padding:10px 14px}}

.performance-table-panel.performance-expanded{position:fixed;inset:14px;z-index:20;margin:0;overflow:auto;box-shadow:0 12px 80px #0008}.performance-expanded .performance-table-scroll{max-height:calc(100vh - 240px)}.performance-expanded .people-toolbar{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.performance-expanded .compact-performance table{min-width:1750px}.performance-table-panel #performanceExpand{font-size:12px;padding:8px 12px}

/* Workbook target met and shortfall percentages */
.performance-kpis .performance-percentages{display:flex;justify-content:space-between;gap:12px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.performance-percentages small{display:flex;flex-direction:column;gap:3px}.performance-percentages b{font-size:18px}.performance-kpis .performance-shortfall{color:#c62037;text-align:right}html[data-theme="dark"] .performance-kpis .performance-shortfall{color:#ff9aaa}

.kpi-letters-panel{margin-bottom:24px}.kpi-letters-panel .people-toolbar label{display:grid;gap:6px;font-size:13px;max-width:100%}.kpi-letters-panel select{max-width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink)}.kpi-target-scroll{overflow:auto}.kpi-target-table{border-collapse:collapse;width:100%;min-width:580px}.kpi-target-table caption{text-align:left;font-weight:700;padding:14px 0}.kpi-target-table th,.kpi-target-table td{padding:14px;text-align:right;border-bottom:1px solid var(--line)}.kpi-target-table th:first-child{text-align:left}.kpi-target-table thead{background:var(--bg)}.kpi-letter-document{margin-top:18px}.kpi-letter-document summary{cursor:pointer;font-weight:700;padding:12px 0}.kpi-letter-document p{line-height:1.8}.kpi-letter-document>div{max-width:900px;margin:auto;padding:20px;border:1px solid var(--line);border-radius:12px}

/* Interim KPI letter dashboard: teal accent and clear monthly columns. */
.performance-table-panel.kpi-letters-panel{padding:24px;border:1px solid #b9dcd8;border-top:4px solid #138b80;border-radius:20px;background:linear-gradient(135deg,#f0faf8 0%,#ffffff 65%);box-shadow:0 8px 28px #174a4610}
.kpi-letter-header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:20px}.kpi-letter-header .eyebrow{color:#08786e;letter-spacing:1.6px;font-size:11px}.kpi-letter-header h3{font-size:25px;letter-spacing:-.5px;margin:7px 0;color:#173e48}.kpi-letter-header p{margin:8px 0 0;max-width:430px}.kpi-letter-header label{min-width:230px}.kpi-letter-header select{background:#fff;border-color:#bfd8d6;min-height:44px;width:100%;font-size:13px}
.kpi-letters-panel .kpi-target-scroll{border:1px solid #d1e5e2;border-radius:14px;background:#fff}.kpi-target-table{min-width:520px;font-variant-numeric:tabular-nums;font-size:13px}.kpi-target-table caption{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}.kpi-letters-panel .kpi-target-table thead{background:#e5f2f0;color:#22544f}.kpi-target-table th,.kpi-target-table td{padding:18px 12px;border-bottom:1px solid #e3eeec;white-space:nowrap}.kpi-target-table thead th{font-size:12px}.kpi-target-table tbody th{color:#39565c;font-size:12px}.kpi-target-table tbody td{font-weight:700;color:#183c46}.kpi-target-table tbody tr:nth-child(even){background:#f5faf9}.kpi-target-table tbody tr:last-child>*{border-bottom:0}.kpi-target-table tr>:nth-child(2){background:#13998b08}
.kpi-letters-panel>.hint{font-size:12px;line-height:1.65;margin:16px 0;color:#627a7d}.kpi-letters-panel .kpi-letter-document{border-top:1px solid #d1e5e2;padding-top:6px}.kpi-letter-document summary{color:#08786e;font-size:13px}.kpi-letter-document>div{background:var(--surface);margin-top:10px;padding:24px}.kpi-letter-document p{font-size:14px}
[data-theme=dark] .performance-table-panel.kpi-letters-panel{background:linear-gradient(135deg,#153438,#172536 70%);border-color:#2d565a;border-top-color:#4ac7b5;box-shadow:0 8px 28px #00000018}[data-theme=dark] .kpi-letter-header h3{color:#e5f8f4}[data-theme=dark] .kpi-letter-header .eyebrow,[data-theme=dark] .kpi-letter-document summary{color:#75ded0}[data-theme=dark] .kpi-letter-header select{background:#13272f;border-color:#3b6265;color:#e5f8f4}[data-theme=dark] .kpi-letters-panel .kpi-target-scroll{background:#142831;border-color:#33545a}[data-theme=dark] .kpi-letters-panel .kpi-target-table thead{background:#20444a;color:#a4e4d9}[data-theme=dark] .kpi-target-table tbody th{color:#b4ced0}[data-theme=dark] .kpi-target-table tbody td{color:#e5f8f4}[data-theme=dark] .kpi-target-table tbody tr:nth-child(even){background:#1a323b}[data-theme=dark] .kpi-target-table th,[data-theme=dark] .kpi-target-table td{border-color:#2a454c}[data-theme=dark] .kpi-letters-panel>.hint{color:#a0b9bf}[data-theme=dark] .kpi-letters-panel .kpi-letter-document{border-color:#33545a}
@media(max-width:1100px){.kpi-letter-header{flex-direction:column;gap:16px}.kpi-letter-header label{width:100%}.kpi-letter-header select{max-width:420px}}@media(max-width:600px){.performance-table-panel.kpi-letters-panel{padding:16px;border-radius:16px}.kpi-letter-header h3{font-size:22px}.kpi-target-table th,.kpi-target-table td{padding:15px 10px}.kpi-letter-document>div{padding:16px}}
.kpi-letter-header label{display:grid;gap:8px;font-size:12px;font-weight:600;color:var(--muted)}
/* KPI card follows the portal's red and rose brand colours. */
.performance-table-panel.kpi-letters-panel{background:linear-gradient(125deg,#fff0f3,#fff8f9 70%);border-color:#efc4cd;border-top-color:#d92749}
.kpi-letter-header .eyebrow,.kpi-letter-document summary{color:#b91f40}.kpi-letter-header h3{color:#602739}.kpi-letter-header select{border-color:#e7c4cc}
.kpi-letters-panel .kpi-target-scroll{border-color:#efd1d8}.kpi-letters-panel .kpi-target-table thead{background:#f9dfe6;color:#7a2d43}.kpi-target-table tbody th{color:#64434c}.kpi-target-table tbody td{color:#4d2835}.kpi-target-table tbody tr:nth-child(even){background:#fff3f6}.kpi-target-table tr>:nth-child(2){background:#d9274905}.kpi-target-table th,.kpi-target-table td{border-bottom-color:#f1dce2}.kpi-letters-panel>.hint{color:#7b626b}.kpi-letters-panel .kpi-letter-document{border-color:#efd1d8}
[data-theme=dark] .performance-table-panel.kpi-letters-panel{background:linear-gradient(125deg,#382335,#292333 75%)!important;border-color:#674052!important;border-top-color:#ef496a!important}
[data-theme=dark] .kpi-letter-header h3{color:#ffe9ef}[data-theme=dark] .kpi-letter-header .eyebrow,[data-theme=dark] .kpi-letter-document summary{color:#ff9db3}[data-theme=dark] .kpi-letter-header select{background:#302332;border-color:#715062;color:#ffe9ef}[data-theme=dark] .kpi-letters-panel .kpi-target-scroll{background:#2b2331;border-color:#654353}[data-theme=dark] .kpi-letters-panel .kpi-target-table thead{background:#593044;color:#ffd9e3}[data-theme=dark] .kpi-target-table tbody th{color:#e6bfcd}[data-theme=dark] .kpi-target-table tbody td{color:#ffeaf0}[data-theme=dark] .kpi-target-table tbody tr:nth-child(even){background:#382737}[data-theme=dark] .kpi-target-table th,[data-theme=dark] .kpi-target-table td{border-color:#523646}[data-theme=dark] .kpi-letters-panel>.hint{color:#d4b5c3}[data-theme=dark] .kpi-letters-panel .kpi-letter-document{border-color:#654353}
.kpi-allocation-box{margin:24px 0;padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:16px}.kpi-allocation-box h3{margin:0;font-size:18px}.kpi-allocation-box label{display:grid;gap:6px;font-size:12px;color:var(--muted)}.kpi-allocation-box input,.kpi-allocation-box select{min-height:42px;width:100%;border:1px solid var(--line);border-radius:9px;padding:9px;background:var(--surface);color:var(--ink)}.kpi-allocation-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.kpi-allocation-totals article{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}.kpi-allocation-totals article:last-child{border-color:#d76682;background:#ed496910}.kpi-allocation-totals span,.kpi-allocation-totals small{display:block;font-size:12px;color:var(--muted)}.kpi-allocation-totals strong{display:block;font-size:16px;margin:9px 0;overflow-wrap:anywhere}.kpi-allocation-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}.kpi-allocation-form>div,.kpi-allocation-message{grid-column:1/-1}.kpi-allocation-form>div{display:flex;flex-wrap:wrap;gap:8px}.kpi-allocation-box .kpi-target-table th,.kpi-allocation-box .kpi-target-table td{white-space:normal}.kpi-allocation-box .kpi-target-table{min-width:460px}.kpi-allocation-message{color:var(--red)}@media(max-width:650px){.kpi-allocation-box{padding:14px}.kpi-allocation-totals{grid-template-columns:1fr}.kpi-allocation-form{grid-template-columns:1fr}}
.kpi-allocation-totals article{display:block!important;min-width:0}.kpi-allocation-totals strong{white-space:nowrap;overflow-wrap:normal;font-size:14px}.kpi-allocation-box .people-toolbar{justify-content:space-between;text-align:left}.kpi-allocation-box .people-toolbar>div{flex:1}.kpi-allocation-totals{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}@media(max-width:1100px){.kpi-allocation-totals{grid-template-columns:1fr}.kpi-allocation-totals article{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:5px 12px}.kpi-allocation-totals strong{margin:0;font-size:16px}.kpi-allocation-totals small{grid-column:2;text-align:right}}
.kpi-staff-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.kpi-staff-heading .eyebrow{font-size:10px;margin-bottom:8px}.kpi-staff-heading h3{font-size:22px}.kpi-staff-heading label{min-width:150px}.kpi-staff-grid-form .kpi-staff-filter{max-width:360px;margin:20px 0 14px}.kpi-staff-grid-scroll{overflow:auto;border:1px solid var(--line);border-radius:12px}.kpi-staff-grid{border-collapse:collapse;width:100%;min-width:760px;font-size:12px;table-layout:fixed}.kpi-staff-grid th,.kpi-staff-grid td{padding:12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}.kpi-staff-grid thead{background:var(--surface-soft);color:var(--muted)}.kpi-staff-grid th:first-child{width:115px}.kpi-staff-grid th:nth-child(2){width:210px}.kpi-staff-grid td small{display:block;color:var(--muted);margin-top:5px}.kpi-staff-grid tbody tr:last-child>*{border-bottom:0}.kpi-staff-grid tbody tr:hover{background:var(--surface-soft)}.kpi-staff-grid input{font-size:13px;min-width:0;text-align:right}.kpi-staff-save{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}.kpi-staff-save .hint{font-size:12px}.kpi-staff-grid [hidden]{display:none!important}.kpi-allocation-message{font-size:13px}.kpi-staff-grid th:nth-child(3){width:155px}@media(max-width:650px){.kpi-staff-heading{flex-direction:column;gap:10px}.kpi-staff-heading label{width:100%}.kpi-staff-grid{min-width:700px}.kpi-staff-grid th,.kpi-staff-grid td{padding:10px}}
@media(max-width:1100px){.kpi-staff-grid-scroll{overflow:visible;border:0}.kpi-staff-grid{display:block;min-width:0;table-layout:auto}.kpi-staff-grid thead{display:none}.kpi-staff-grid tbody{display:block}.kpi-staff-grid tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;padding:12px;gap:12px;margin:12px 0}.kpi-staff-grid tbody th{grid-column:1;padding:0!important;width:auto!important}.kpi-staff-grid tbody td:nth-child(2){grid-column:2/4;padding:0}.kpi-staff-grid tbody td,.kpi-staff-grid tbody th{border:0}.kpi-staff-grid tbody td[data-label]{padding:0;min-width:0}.kpi-staff-grid td[data-label]:before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;margin:4px 0 7px}.kpi-staff-grid input{padding:8px;font-size:12px}}@media(max-width:500px){.kpi-staff-grid tbody tr{grid-template-columns:1fr}.kpi-staff-grid tbody th,.kpi-staff-grid tbody td:nth-child(2){grid-column:1}.kpi-staff-grid input{text-align:left}}
.person-department-badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:7px}.person-department-badge,.person-manager-badge{display:inline-block!important;padding:4px 9px;border-radius:7px;font-size:11px!important;font-weight:600;background:var(--surface-soft);color:var(--muted)!important}.person-manager-badge{background:#fbe0e8;color:#a71e42!important}[data-theme=dark] .person-manager-badge{background:#542b40;color:#ffb2c8!important}
.kpi-lock-note{background:var(--surface-soft);border:1px solid var(--line);border-left:4px solid #d92749;border-radius:10px;padding:12px 15px;font-size:13px;font-weight:600}.kpi-staff-grid input:disabled{opacity:.8;background:var(--surface-soft);cursor:not-allowed}
.kpi-revision-remark{margin-top:18px}.kpi-revision-remark textarea,.kpi-revision-card textarea{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit}.kpi-revision-history{margin-top:26px;border-top:1px solid var(--line);padding-top:20px}.kpi-revision-card{display:block!important;border:1px solid var(--line);padding:16px;border-radius:12px;margin-top:14px;background:var(--surface-soft)}.kpi-revision-card>p{font-size:13px;white-space:pre-wrap}.kpi-revision-card .kpi-target-table{min-width:700px}.kpi-revision-card label{margin-top:15px}.kpi-review-feedback{color:var(--red)}.kpi-revision-inbox{padding:18px;border:1px solid #d76682;border-radius:12px;margin-bottom:20px;background:#ed496910}.kpi-revision-inbox button{margin:8px 8px 0 0}.kpi-revision-inbox h3{font-size:17px}
#kpiApprovalsDialog{width:min(1000px,94vw);max-height:90dvh;padding:0;overflow:auto}#kpiApprovalsDialog .team-dialog-header{position:sticky;top:0;z-index:2;padding:20px;border-bottom:1px solid var(--line)}#kpiApprovalsDialog .team-dialog-header p{margin:5px 0 0}.kpi-popup-toolbar{padding:14px 22px;display:flex;justify-content:flex-end}#kpiApprovalsBody{padding:0 22px 22px}.kpi-popup-request{margin:10px 0 24px}.kpi-popup-request>h3{font-size:18px}.kpi-popup-review .kpi-revision-history{border-top:0;margin-top:0;padding-top:0}.kpi-popup-review .kpi-revision-history>h3{display:none}.kpi-popup-review .kpi-revision-card{background:var(--surface)}.kpi-popup-review textarea{font:inherit}#kpiApprovalButton .unread-count{background:var(--red)}
/* Keep all three target months visible without sideways scrolling. */
#kpiLetterTargets .kpi-target-scroll{overflow:visible}#kpiLetterTargets .kpi-target-table{min-width:0;table-layout:fixed;width:100%}#kpiLetterTargets .kpi-target-table th,#kpiLetterTargets .kpi-target-table td{white-space:normal;overflow-wrap:normal;padding:14px 10px}#kpiLetterTargets .kpi-target-table th:first-child{width:28%}.kpi-currency{font-size:10px;font-weight:500;display:block;color:var(--muted)}.kpi-money-value{display:block;font-weight:700;white-space:nowrap}@media(max-width:1100px){#kpiLetterTargets .kpi-target-table{font-size:12px}#kpiLetterTargets .kpi-target-table th,#kpiLetterTargets .kpi-target-table td{padding:13px 6px;text-align:center}#kpiLetterTargets .kpi-target-table th:first-child{text-align:left;font-size:11px}#kpiLetterTargets .kpi-target-table thead th{font-size:11px}.kpi-letter-header h3{font-size:23px}}
@media(max-width:480px){#kpiLetterTargets .kpi-target-table{font-size:11px}#kpiLetterTargets .kpi-target-table th,#kpiLetterTargets .kpi-target-table td{padding:12px 4px}#kpiLetterTargets .kpi-target-table th:first-child{width:25%;font-size:10px}#kpiLetterTargets .kpi-target-table thead th{font-size:10px}}
.kpi-manager-row{border-color:#d76682!important;background:#ed496910!important}.kpi-manager-row input[readonly]{background:var(--surface-soft);font-weight:700}.kpi-individual-report{margin-top:26px;border-top:1px solid var(--line);padding-top:20px}.kpi-individual-report h3{font-size:18px}.kpi-individual-report .kpi-target-table{min-width:650px}.kpi-individual-report .kpi-target-table td,.kpi-individual-report .kpi-target-table th{white-space:normal}.kpi-individual-report small{display:block;font-size:10px;color:var(--muted)}.kpi-staff-grid-form[hidden]{display:none!important}
#stats{display:none!important}.sidebar-welcome{padding:14px 10px 18px;border-bottom:1px solid #ffffff16;margin-bottom:14px}.sidebar-welcome .date{display:block;background:none;padding:0;margin:0 0 7px;font-size:11px;color:#a8b7cc;line-height:1.5;border-radius:0}.sidebar-welcome #greeting{font-size:17px;line-height:1.4;font-weight:650;letter-spacing:-.2px;color:#f2f5fb;margin:0}.dashboard-publish-toolbar{display:flex;justify-content:flex-end;margin:0 0 18px}.dashboard-publish-toolbar:has(button[hidden]){display:none}@media(max-width:600px){.sidebar-welcome{padding:10px 8px 13px;margin-bottom:8px}.sidebar-welcome #greeting{font-size:15px}.sidebar-welcome .date{font-size:10px}}
.sidebar-welcome[hidden],.dashboard-publish-toolbar[hidden]{display:none!important}
#targetLettersDialog{width:min(920px,94vw);max-height:90vh;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff);color:var(--ink);overflow:auto}#targetLettersDialog .team-dialog-header{position:sticky;top:-24px;background:var(--surface,#fff);z-index:2;padding:16px 0}.letter-ack-action{padding:16px 0}.kpi-popup-request article p{line-height:1.65}
#targetLettersBody .kpi-popup-request>article{display:block;min-width:0;width:100%}#targetLettersBody .kpi-popup-request{display:block}#targetLettersBody article p{display:block;line-height:1.7;overflow-wrap:normal}#targetLettersBody article h3{display:block;margin:12px 0}#targetLettersBody .kpi-target-scroll{width:100%;margin:20px 0}#targetLettersBody .kpi-target-table{min-width:520px}
#targetTestDialog{width:min(920px,94vw);max-height:90vh;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);overflow:auto}#targetTestBody article{display:block;width:100%;min-width:0}#targetTestBody article p{display:block;line-height:1.7}#targetTestBody .kpi-target-scroll{margin:20px 0}#targetTestBody .kpi-target-table{min-width:520px}
.branch-report-controls{display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:20px 0}.branch-report-controls label{flex:1;min-width:180px}.branch-report-controls select{width:100%}.branch-report-controls button{min-height:44px}.branch-report-results{border-top:1px solid var(--line);padding-top:20px}.branch-report-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.branch-report-summary article{display:flex;flex-direction:column;gap:8px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft);min-width:0}.branch-report-summary span,.branch-report-summary small{color:var(--muted);font-size:12px}.branch-report-summary strong{font-size:20px;color:var(--ink);overflow-wrap:anywhere}.branch-report-results td small{display:block;color:var(--muted);margin-top:6px}.branch-target-reports> .people-toolbar h3{font-size:22px}@media(max-width:700px){.branch-report-summary{grid-template-columns:1fr}.branch-report-controls button{width:100%}}

/* Dismissible welcome card shown after successful email/password sign-in. */
.login-welcome{position:fixed;inset:0;margin:auto;width:min(760px,calc(100vw - 36px));box-sizing:border-box;padding:48px 28px 30px;text-align:center;border:1px solid var(--line,#e9dce1);border-top:4px solid #e51b46;border-radius:24px;background:var(--surface,#fff);color:var(--text,#202b3d);box-shadow:0 28px 90px #0004}
.login-welcome::backdrop{background:#0c152b99;backdrop-filter:blur(5px)}
.login-welcome .welcome-close{position:absolute;right:14px;top:12px;width:36px;height:36px;padding:0;border:1px solid var(--line,#e9dce1);border-radius:50%;background:transparent;color:inherit;font-size:24px;cursor:pointer}
.welcome-mark{width:68px;height:68px;margin:0 auto 20px;display:grid;place-items:center;border-radius:22px;background:#ffe9ef;color:#d91440;font-size:36px}
.login-welcome .welcome-eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted,#718096);margin:0 0 12px}
.login-welcome h2{font-size:clamp(26px,7vw,36px);letter-spacing:-1px;margin:0 0 28px;overflow-wrap:anywhere}
.login-welcome .welcome-continue{min-width:140px}
[data-theme="dark"] .login-welcome{background:#182335;color:#f4f7fc;border-color:#344258}

.login-welcome h2{font-size:clamp(24px,6vw,32px);margin-bottom:12px;letter-spacing:-.6px}.login-welcome .welcome-brand{font-size:22px;font-weight:700;color:var(--red,#d71b43);margin:0 0 28px;overflow-wrap:anywhere}

.login-welcome .welcome-brand{font-size:clamp(32px,8vw,42px);letter-spacing:-1px;margin:0 0 24px}.login-welcome h2{font-size:24px}.welcome-note{padding:18px;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface-soft,#fff1f5);border:1px solid var(--line,#f1d4dc);border-radius:14px;line-height:1.6;margin:0 0 24px;max-height:44vh;max-height:min(44dvh,420px);overflow:auto;font-size:15px}.welcome-note[hidden]{display:none}.welcome-note-editor{width:min(540px,calc(100vw - 32px));box-sizing:border-box;border:1px solid var(--line);border-radius:20px;padding:26px;background:var(--surface,#fff);color:var(--ink,#202b3d)}.welcome-note-editor textarea{width:100%;box-sizing:border-box;font:inherit}.welcome-note-editor::backdrop{background:#0c152b99}

.login-welcome{padding:28px 28px 26px;max-height:calc(100dvh - 32px);overflow:auto}.welcome-logo{display:block;width:84px;height:84px;object-fit:contain;padding:6px;box-sizing:border-box;background:white;border-radius:16px;margin:0 auto 18px}.login-welcome .welcome-brand{font-size:clamp(32px,8vw,42px);margin:0 0 10px}.login-welcome h2{font-size:22px;margin:0 0 20px}.welcome-note-progress{font-size:12px;color:var(--muted);margin:0 0 10px}.welcome-step-actions{display:flex;justify-content:center;gap:12px}.welcome-step-actions button[hidden]{display:none}.welcome-note:focus-visible{outline:2px solid var(--red,#d71b43);outline-offset:3px}

.login-welcome .welcome-note-heading{display:block;text-align:left;padding:15px 17px;border-left:4px solid var(--red,#d71b43);border-radius:10px;background:var(--surface,#fff);margin:0 0 16px;white-space:normal}.welcome-note-heading .welcome-ceo-label{font-size:14px;font-weight:800;letter-spacing:1.1px;color:var(--red,#d71b43);margin:0 0 8px}.welcome-note-heading .welcome-ceo-title{font-size:21px;line-height:1.35;font-weight:800;color:var(--ink,#202b3d);margin:0 0 7px}.welcome-note-heading .welcome-ceo-company{font-size:13px;font-weight:650;color:var(--muted,#64748b);margin:0}
.login-welcome[open]{display:flex;flex-direction:column;overflow:hidden}.login-welcome .welcome-logo,.login-welcome .welcome-brand,.login-welcome h2,.login-welcome .welcome-note-progress,.login-welcome .welcome-step-actions{flex-shrink:0}.login-welcome .welcome-note{flex:1 1 auto;min-height:0;margin-bottom:16px}

.password-reveal-field{display:flex;align-items:stretch;gap:8px}.password-reveal-field input{flex:1;min-width:0}.password-reveal-field .password-reveal{flex:0 0 auto;min-width:64px;padding:10px 12px}

#performanceImportDialog{width:min(1120px,calc(100vw - 32px));max-height:90dvh;overflow:auto}#performanceImportDialog .team-dialog-header{position:sticky;top:-26px;z-index:2;padding:16px 0}.performance-import-fields{display:flex;gap:16px;align-items:end;flex-wrap:wrap;margin:20px 0}.performance-import-fields label{flex:1;min-width:200px}.performance-import-table{overflow:auto;max-height:360px;margin:18px 0}.performance-import-table table{width:100%;min-width:900px;border-collapse:collapse}.performance-import-table th,.performance-import-table td{padding:10px;border-bottom:1px solid var(--line);text-align:right}.performance-import-table th:first-child{text-align:left}.performance-import-history{margin-top:24px;border-top:1px solid var(--line);padding-top:18px}.performance-import-history li{padding:7px 0}#performanceImportStatus{white-space:pre-wrap}

#performanceHistoryBar{display:flex;align-items:center;gap:12px;width:fit-content;max-width:100%;box-sizing:border-box;padding:10px 14px;margin:0 0 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);grid-column:1/-1;justify-self:start}
#performanceHistoryBar .performance-report-date{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#performanceHistoryBar label{display:flex;align-items:center;gap:10px;margin:0;font-size:13px;font-weight:600;white-space:nowrap}
#performanceHistoryBar input{width:156px;min-width:0;height:38px;box-sizing:border-box;margin:0;padding:7px 10px;font-size:14px}
#performanceHistoryBar button{width:auto;min-height:38px;box-sizing:border-box;margin:0;padding:7px 12px;font-size:13px;white-space:nowrap}
#performanceHistoryBar #performanceDashboardHistoryStatus{min-height:0;max-width:330px;margin:0;padding-left:12px;border-left:1px solid var(--line);font-size:12px;line-height:1.45;color:var(--muted)}
@media(max-width:700px){#performanceHistoryBar{flex-wrap:wrap;gap:8px;padding:10px 12px;width:100%}#performanceHistoryBar .performance-report-date{gap:8px}#performanceHistoryBar label{gap:8px}#performanceHistoryBar input{width:148px}#performanceHistoryBar #performanceDashboardHistoryStatus{max-width:none;flex-basis:100%;padding:0;border:0}}
@media(max-width:420px){#performanceHistoryBar .performance-report-date{width:100%;align-items:end;flex-wrap:nowrap}#performanceHistoryBar label{min-width:0;flex:1;align-items:start;flex-direction:column;gap:5px}#performanceHistoryBar input{width:100%}#performanceHistoryBar button{flex-shrink:0}}

#companyPerformance>.performance-heading{flex-wrap:wrap;align-items:center}#companyPerformance>.performance-heading>div:first-child{flex:1;min-width:230px}#performanceDateSlot{flex:0 1 auto;max-width:100%;margin-left:auto}#performanceDateSlot #performanceHistoryBar{margin:0}#performanceDateSlot #performanceDashboardHistoryStatus{white-space:nowrap}@media(max-width:700px){#performanceDateSlot{width:100%}#performanceDateSlot #performanceDashboardHistoryStatus{white-space:normal}}

#branchTargetsDialog{width:min(900px,calc(100vw - 32px));max-width:900px;max-height:90vh;padding:28px;overflow:auto}
.branch-target-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:16px;margin:18px 0}
.branch-target-fields label{margin:0;display:grid;gap:8px}
.branch-target-current{padding:14px 16px;border:1px solid var(--border,#34445c);border-radius:12px;background:rgba(237,24,70,.06);line-height:1.6}
#branchTargetForm textarea{width:100%;box-sizing:border-box}
.branch-target-history-item{padding:12px 0;border-bottom:1px solid var(--border,#34445c);font-size:.88rem}
.branch-target-history-item p{margin:6px 0}

.kpi-target-view .content > :not(#kpiTargetsView){display:none!important}
.kpi-report-view .content > :not(#kpiReportsView){display:none!important}
.target-acknowledgements-view .content > :not(#targetAcknowledgementsView){display:none!important}
#kpiReportsView,#targetAcknowledgementsView{min-width:0}
.target-history-controls{display:flex;gap:18px;align-items:end;flex-wrap:wrap;margin:20px 0}
.target-history-controls label{min-width:170px}.target-history-controls label:last-child{flex:1;min-width:200px}
.target-history-controls input,.target-history-controls select{width:100%;margin-top:7px}
.target-history-card{display:block;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface,#fff);margin:16px 0;min-width:0}
.target-history-card details{margin:18px 0}.target-history-card summary{font-weight:600;cursor:pointer}
.target-history-card details article{display:block;width:100%;min-width:0}
.target-history-card p{line-height:1.65;white-space:normal;overflow-wrap:normal;word-break:normal}
.target-history-card .tag{white-space:nowrap}
#customerBaseDialog{width:min(1050px,calc(100% - 28px));padding-top:0}
.customer-base-result{padding:18px 20px;border-radius:15px;background:var(--surface-soft);margin:20px 0}
.customer-base-result h3{font-size:28px;margin:8px 0}.customer-base-result p{margin:4px 0}
.customer-base-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:18px 0}
.customer-base-summary article{display:flex;flex-direction:column;gap:8px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);min-width:0}
.customer-base-summary span{font-size:12px;color:var(--muted)}.customer-base-summary strong{font-size:23px}
.customer-base-warning{padding:16px;border:1px solid #d79b42;border-radius:12px;line-height:1.6}.customer-base-warning input{width:auto;margin-right:8px}
#kpiTargetsView{min-width:0}
#kpiTargetsView .kpi-letters-panel{margin-top:20px}
.personal-target-panel{margin:24px 0;padding:24px;border:1px solid var(--line,#34445c);border-radius:20px;background:var(--panel,#182435)}
.personal-target-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:18px;margin-top:18px}
.personal-target-card{min-width:0;border:1px solid var(--line,#34445c);border-top:4px solid #ef365d;border-radius:16px;padding:20px;background:rgba(237,24,70,.035)}
.personal-target-card dl{margin:20px 0}.personal-target-card dl>div{padding:12px 0;border-bottom:1px solid var(--line,#34445c)}
.personal-target-card dt{font-size:.85rem;color:var(--muted,#91a1b9)}.personal-target-card dd{margin:7px 0 0;font-size:1.15rem;font-weight:700}
.personal-target-card details{margin:18px 0}.personal-target-card summary{cursor:pointer;font-weight:600}
.personal-target-card details article{overflow:auto}.kpi-empty-targets{padding:20px;border-radius:12px;background:rgba(128,144,165,.09);line-height:1.7}
#kpiTargetsView .personal-target-card{display:block!important;width:auto;min-width:0;border:1px solid var(--line,#34445c);border-top:4px solid #ef365d}
#kpiTargetsView .personal-target-card h3{overflow-wrap:normal;word-break:normal}
#kpiTargetsView .personal-target-card p{margin:12px 0;white-space:normal;line-height:1.65;overflow-wrap:normal;word-break:normal}
#kpiTargetsView .personal-target-card details article{display:block!important;width:auto;min-width:0}
#kpiTargetsView .personal-target-card>button{margin-top:8px}

#portalView .workspace-grid[hidden]{display:none!important}
/* Improve readability of achieved / outstanding amounts in the three KPI cards. */
.performance-kpis :is(.stock,.customers,.debtors)>div:not(.performance-percentages){font-size:clamp(13px,1vw,15px);gap:14px;align-items:flex-start}
.performance-kpis :is(.stock,.customers,.debtors)>div:not(.performance-percentages)>span{flex:1;min-width:0;line-height:1.5;font-weight:500}
.performance-kpis :is(.stock,.customers,.debtors)>div:not(.performance-percentages)>span:last-child{text-align:right}
.performance-kpis :is(.stock,.customers,.debtors)>div:not(.performance-percentages) b{font-size:clamp(19px,1.5vw,24px);line-height:1.3;font-weight:750;margin-top:8px;font-variant-numeric:tabular-nums}
.medical-flow.medical-direct-flow{grid-template-columns:repeat(2,minmax(0,1fr))}
#medicalView .people-filters[hidden],#medicalEmployeeMatches[hidden]{display:none!important}
#medicalView .people-hero{padding:16px 20px;margin-bottom:14px;border-radius:16px;gap:0}
#medicalView .people-hero .eyebrow{font-size:10px;letter-spacing:1.2px}
#medicalView .people-hero h2{font-size:24px;line-height:1.25;margin:6px 0;letter-spacing:-.4px}
#medicalView .people-hero p{font-size:13px;line-height:1.45;margin:0;max-width:none}

#medicalView .people-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
#medicalBalance.medical-header-balance{flex:0 0 auto;border-left:1px solid var(--line);padding:4px 0 4px 24px;min-width:190px}
#medicalBalance[hidden]{display:none!important}
#medicalBalance small{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
#medicalBalance strong{display:block;font-size:25px;line-height:1.2;color:var(--ink);letter-spacing:-.5px}
@media(max-width:650px){#medicalView .people-hero{gap:16px}#medicalBalance.medical-header-balance{border-left:0;border-top:1px solid var(--line);padding:14px 0 0;flex-basis:100%}#medicalBalance strong{font-size:23px}}

#medicalPendingDialog{width:min(700px,calc(100% - 24px));padding-top:0}#medicalPendingBody{padding:0 20px 20px}#medicalAttachmentPreview:not(:empty){margin:16px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}#medicalAttachmentPreview img{display:block;max-width:100%;max-height:520px;object-fit:contain;margin:auto}#medicalAttachmentPreview iframe{display:block;width:100%;height:520px;border:0;border-radius:8px}#medicalCeoReview .people-buttons{display:flex;gap:12px;margin-top:16px}

/* Monthly branch targets: align saved figures with their column headings. */
.branch-saved-target-table{width:100%;min-width:640px;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums}
.branch-saved-target-table th,.branch-saved-target-table td{padding:12px 16px;vertical-align:middle;text-align:right;border-bottom:1px solid var(--line);white-space:nowrap}
.branch-saved-target-table thead th{font-size:13px;font-weight:700;color:var(--muted);padding-top:16px;padding-bottom:12px}
.branch-saved-target-table th:first-child{width:190px;text-align:left}
.branch-saved-target-table thead th:nth-child(2){width:25%}
.branch-saved-target-table tbody th{font-weight:600}
.branch-saved-target-table tbody td{font-size:14px}
.branch-saved-target-table tbody tr:last-child th,.branch-saved-target-table tbody tr:last-child td{border-bottom:0}
.branch-saved-target-table button[data-saved-period]{width:164px;min-height:42px;padding:9px 12px;text-align:left;font-size:13px}
@media(max-width:650px){.branch-saved-target-table th,.branch-saved-target-table td{padding:10px 12px}.branch-saved-target-table th:first-child{width:178px}}
.all-branch-staff-report .branch-report-controls{display:grid;grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) minmax(200px,1.5fr) auto;align-items:end;gap:14px;margin:18px 0}
.all-branch-staff-report .branch-report-controls label{display:flex;flex-direction:column;gap:6px}
.branch-staff-report-group{border:1px solid var(--line);border-radius:16px;padding:18px;margin:20px 0;background:var(--surface)}
.branch-staff-report-group h3{margin:0}.branch-staff-report-group .people-toolbar{margin-bottom:12px}.branch-staff-report-group td:nth-child(n+4),.branch-staff-report-group th:nth-child(n+4){text-align:right;font-variant-numeric:tabular-nums}
@media(max-width:900px){.all-branch-staff-report .branch-report-controls{grid-template-columns:1fr 1fr}}@media(max-width:560px){.all-branch-staff-report .branch-report-controls{grid-template-columns:1fr}.branch-staff-report-group{padding:12px}}
.branch-staff-report-group td small{display:block;margin-top:4px;color:var(--muted);font-size:11px}

.branch-report-summary .missing-target-count{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;text-align:left;padding:18px;border:1px solid var(--line);border-radius:14px;white-space:normal}
.branch-report-summary .missing-target-count strong{font-size:26px;line-height:1.2}.branch-report-summary .missing-target-count small{font-size:12px;color:var(--muted)}
.branch-missing-targets{padding:18px;border:1px solid var(--line);border-radius:14px;margin:16px 0}.branch-missing-targets[hidden]{display:none}.branch-missing-targets h3{margin:0 0 8px}.branch-missing-targets ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px 24px;padding-left:20px;margin-bottom:0}
/* Fit report controls to the available content width, including beside the sidebar. */
.all-branch-staff-report{container-type:inline-size;container-name:target-report}
.all-branch-staff-report .branch-report-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr) 160px;gap:16px;align-items:end;width:100%;box-sizing:border-box}
.all-branch-staff-report .branch-report-controls label{min-width:0;margin:0;gap:8px;font-size:14px;line-height:20px;align-self:end}
.all-branch-staff-report .branch-report-controls input,.all-branch-staff-report .branch-report-controls select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:52px;margin:0;padding:0 14px;font-size:14px;line-height:normal}
.all-branch-staff-report .branch-report-controls button{box-sizing:border-box;width:100%;min-width:0;height:52px;min-height:52px;margin:0;padding:0 18px;white-space:nowrap;display:flex;align-items:center;justify-content:center;font-size:14px}
.all-branch-staff-report .branch-report-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
@container target-report (max-width:820px){.all-branch-staff-report .branch-report-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.all-branch-staff-report .branch-report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container target-report (max-width:480px){.all-branch-staff-report .branch-report-controls,.all-branch-staff-report .branch-report-summary{grid-template-columns:minmax(0,1fr)}}
.opd-registration-card{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:20px;margin:16px 0}.opd-registration-card h3,.opd-registration-card p{margin:0}.opd-registration-card p{margin-top:6px}#opdForm fieldset{min-width:0;border:1px solid var(--line);border-radius:12px;padding:16px;margin:18px 0}#opdForm legend{font-weight:700;padding:0 6px}#opdForm .opd-check{display:flex;align-items:flex-start;gap:10px;margin:18px 0}#opdForm .opd-check input{width:auto;flex:none;margin-top:5px}.opd-child+.opd-child{border-top:1px solid var(--line);margin-top:16px;padding-top:16px}.opd-child h4{margin:0 0 10px}#opdForm [hidden]{display:none}

.medical-registration-view .content > :not(#medicalRegistrationsView){display:none!important}#opdAdminFilePreview{margin-top:18px}#opdAdminFilePreview a{display:block;margin-top:12px}

.medical-transfer-view .content > :not(#medicalTransfersView){display:none!important}.medical-bank-fields{min-width:0;border:1px solid var(--line);border-radius:12px;margin:18px 0;padding:16px}.medical-bank-fields legend{font-weight:700;padding:0 6px}

.medical-transfer-bulk{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;margin-bottom:18px}.medical-transfer-bulk label{display:flex;align-items:center;gap:8px;margin:0}.medical-transfer-bulk input,.medical-transfer-check,#medicalBulkTransferForm [type=checkbox]{width:auto;flex:none}#medicalBulkTransferForm .opd-check{display:flex;align-items:flex-start;gap:10px;margin:18px 0}
.medical-transfer-pick{display:flex;align-items:center;gap:8px;flex:none;min-height:44px;margin:0;cursor:pointer;font-size:13px}.medical-transfer-pick .medical-transfer-check,.medical-transfer-bulk input[type=checkbox]{width:22px;height:22px;min-width:22px;margin:0;accent-color:var(--accent,#e91d49);cursor:pointer}

.medical-correction-notice{padding:16px;margin:16px 0;border:1px solid #d39b38;border-radius:12px;background:rgba(211,155,56,.1)}.medical-correction-notice h3{margin:0 0 8px}.medical-correction-notice p:last-child{margin-bottom:0}

#medicalTransfersView .medical-transfer-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);align-items:end;gap:16px;margin:0 0 18px;padding:16px;border:1px solid var(--line);border-radius:14px}
#medicalTransfersView .medical-transfer-filters>label{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;width:auto;margin:0;font-size:13px;font-weight:600;line-height:1.4}
#medicalTransfersView .medical-transfer-filters input,#medicalTransfersView .medical-transfer-filters select{box-sizing:border-box;width:100%;min-width:0;min-height:48px;height:48px;margin:0;padding:10px 13px;font-size:14px;line-height:1.4;flex:none}
@media(max-width:1100px){#medicalTransfersView .medical-transfer-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#medicalTransfersView .medical-transfer-filters>label:nth-child(2){grid-column:1/-1;grid-row:2}}
@media(max-width:480px){#medicalTransfersView .medical-transfer-filters{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}#medicalTransfersView .medical-transfer-filters>label:nth-child(2){grid-column:auto;grid-row:auto}}

.medical-policy-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;margin:0 0 18px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.medical-policy-card h3{margin:0 0 6px;font-size:17px}.medical-policy-card p{margin:0;color:var(--muted);font-size:13px}.medical-policy-card .people-buttons{flex-wrap:wrap;flex-shrink:0}.medical-policy-card a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;padding:10px 14px;border:1px solid var(--line);border-radius:10px;font-size:13px;font-weight:600}@media(max-width:850px){.medical-policy-card{align-items:flex-start;flex-direction:column}}

.kpi-allocation-box .kpi-allocation-totals{position:sticky;top:0;z-index:5;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:14px;grid-template-columns:repeat(3,minmax(0,1fr))}.kpi-allocation-box .kpi-staff-grid-scroll{max-height:60vh;overflow:auto}.kpi-allocation-box .kpi-staff-grid thead{position:sticky;top:0;z-index:2}.kpi-over-target-message{grid-column:1/-1;margin:0;color:var(--red);font-weight:600}.kpi-staff-grid input.kpi-over-target{border:2px solid var(--red);background:#ed496915}.kpi-allocation-totals article{min-width:0}.kpi-allocation-totals strong{white-space:normal!important}@media(max-width:1100px){.kpi-allocation-box .kpi-allocation-totals article{display:block!important}.kpi-allocation-box .kpi-allocation-totals small{text-align:left;font-size:11px}.kpi-allocation-box .kpi-allocation-totals strong{font-size:13px;margin:6px 0}}@media(max-width:500px){.kpi-allocation-box .kpi-allocation-totals{gap:5px;padding:6px}.kpi-allocation-box .kpi-allocation-totals article{padding:8px}.kpi-allocation-box .kpi-allocation-totals span{font-size:10px}}

.kpi-allocation-box .kpi-staff-grid thead{z-index:4}.kpi-allocation-box .kpi-manager-row>th,.kpi-allocation-box .kpi-manager-row>td{position:sticky;top:var(--kpi-header-height,48px);z-index:3;background:var(--surface-soft);box-shadow:0 2px 0 #d76682}.kpi-allocation-box .kpi-manager-row{scroll-margin-top:var(--kpi-header-height,48px)}@media(max-width:1100px){.kpi-allocation-box .kpi-manager-row{position:sticky;top:0;z-index:3;background:var(--surface)!important;box-shadow:0 3px 8px #0002}.kpi-allocation-box .kpi-manager-row>th,.kpi-allocation-box .kpi-manager-row>td{position:static;background:transparent;box-shadow:none}}@media(max-width:500px){.kpi-allocation-box .kpi-manager-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.kpi-allocation-box .kpi-manager-row>th,.kpi-allocation-box .kpi-manager-row>td:nth-child(2){grid-column:1/-1}.kpi-allocation-box .kpi-manager-row td small{font-size:10px}}

.kpi-allocation-box .kpi-allocation-totals{position:static;z-index:auto}


.kpi-allocation-box .kpi-manager-pin{position:sticky;top:8px;z-index:10;margin:16px 0;border:1px solid #d76682;border-radius:12px;background:var(--surface);box-shadow:0 4px 14px #0003}.kpi-manager-viewport{overflow-x:auto;border-radius:12px}.kpi-manager-pin .kpi-manager-row,.kpi-manager-pin .kpi-manager-row>th,.kpi-manager-pin .kpi-manager-row>td{position:static!important;box-shadow:none!important;background:var(--surface-soft)!important}.kpi-manager-pin .kpi-staff-grid{margin:0}.kpi-manager-pin td[data-label]:before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:6px}.kpi-allocation-box .kpi-staff-grid-scroll{max-height:none}.kpi-manager-pin .kpi-manager-row{margin:0!important;border:0!important}.kpi-manager-pin .kpi-staff-grid tbody tr:last-child>*{border-bottom:0}@media(max-width:1100px){.kpi-allocation-box .kpi-staff-grid-scroll{overflow:visible}.kpi-manager-pin .kpi-manager-row{padding:12px!important}}
