/* Adapt to usable content width, including the wider desktop navigation. */
.content,.report-preview-shell{container:portal-content / inline-size}
.content .card,.content .grid>*{min-width:0}
.content form .grid.two,.content form .grid.three,.content form .grid.four{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.content .card h2,.content .card h3,.content .help,.content .routing-box{overflow-wrap:anywhere}
.content .page-head,.content .split,.content .employee-month-toolbar{flex-wrap:wrap}
.content .btn{white-space:normal;max-width:100%;min-height:44px;line-height:1.7}
.content input[type=email],.content input[type=url]{direction:ltr;text-align:left}
.content .table-wrap{max-width:100%;overscroll-behavior-inline:contain;scrollbar-gutter:stable}
.table-scroll-help{font-size:12px;color:var(--muted);margin:8px 0;line-height:1.8}
.table-wrap:focus-visible{outline:2px solid var(--gold2);outline-offset:3px}
.mobile-cell-label{display:none}
@container portal-content (max-width:900px){
 .grid.three,.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dash-main-grid,.dash-secondary-grid{grid-template-columns:minmax(0,1fr)}
 .dash-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
 .dashboard-metrics .stat:last-child{grid-column:1/-1}
}
@container portal-content (max-width:600px){
 .grid.two,.grid.three,.grid.four{grid-template-columns:minmax(0,1fr)}
 .dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dash-hero{flex-direction:column;align-items:stretch;padding:18px}
 .employee-portal .employee-month-toolbar .field{width:100%;min-width:0;flex:1 1 100%}
 .employee-month-toolbar form{flex-wrap:wrap;min-width:0}
 .portal-user-summary{grid-template-columns:minmax(0,1fr)}
 .portal-user-editor{grid-template-columns:minmax(0,1fr)}
 .dash-detail-grid{grid-template-columns:minmax(0,1fr)}
 .dash-payment-row{flex-wrap:wrap}.dash-payment-row>strong{max-width:100%}
}
@media(max-width:640px){
 .content .card{padding:16px}.content input,.content select,.content textarea{font-size:16px}
 .topbar{position:relative;height:auto;min-height:72px}.top-actions{min-width:0}
 .content .notice-item{padding:12px;min-width:0}.notice-item>*{min-width:0}
 .content .tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:6px}
 .content .tabs a{flex:0 0 auto;min-height:44px;display:flex;align-items:center}
 table.mobile-record-table,table.mobile-record-table tbody{display:block;min-width:0!important;width:100%}
 table.mobile-record-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 table.mobile-record-table tbody>tr{display:block;padding:12px;border-bottom:2px solid var(--line)}
 table.mobile-record-table tbody>tr>td{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.2fr);gap:10px;width:100%;padding:8px 0;text-align:start!important;overflow-wrap:anywhere}
 table.mobile-record-table .mobile-cell-label{display:block;font-size:12px;font-weight:600;color:var(--muted)}
 table.mobile-record-table .mobile-cell-value{min-width:0;overflow-wrap:anywhere}
 table.mobile-record-table tbody>tr:last-child{border-bottom:0}
 .payslip-record dl>div{grid-template-columns:1fr}
}
.payslip-sheet{padding:28px;background:var(--card);border:1px solid var(--line);border-radius:16px;max-width:100%;overflow-wrap:anywhere}
.payslip-sheet header{border-bottom:2px solid var(--gold2);padding-bottom:16px;margin-bottom:20px}
.payslip-sheet h1{font-size:26px}.payslip-sheet h2{font-size:20px}
.payslip-record{border:1px solid var(--line);border-radius:10px;padding:16px;margin-block:14px}
.payslip-record h3{margin:0 0 12px}.payslip-record dl{margin:0}
.payslip-record dl>div{display:grid;grid-template-columns:minmax(100px,.5fr) minmax(0,1.5fr);gap:12px;padding-block:6px}
.payslip-record dt{font-weight:600}.payslip-record dd{margin:0;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}
.payslip-actions{margin-bottom:18px}.payslip-actions .help{flex-basis:100%}
.payslip-sheet .payslip-totals{min-width:580px}
@media print{
 @page{size:A4;margin:14mm}
 body:has(.payslip-sheet){background:white!important;color:black!important;font-size:11pt}
 body:has(.payslip-sheet) .topbar,body:has(.payslip-sheet) .sidebar,.payslip-actions,.payslip-sheet .table-scroll-help{display:none!important}
 body:has(.payslip-sheet) .layout{display:block!important;min-height:0}
 body:has(.payslip-sheet) .content{display:block!important;container-type:normal;width:100%;max-width:none;padding:0;overflow:visible}
 .payslip-sheet{border:0;border-radius:0;padding:0;background:white!important;color:black!important}
 .payslip-sheet .help{color:#444!important}.payslip-sheet .table-wrap{overflow:visible;border:0}
 .payslip-sheet table.data{min-width:0!important;width:100%;table-layout:fixed}
 .payslip-sheet table.data td,.payslip-sheet table.data th{background:white!important;color:black!important;overflow-wrap:anywhere;padding:6px;font-size:9pt}
 .payslip-record{break-inside:avoid;border-color:#bbb}.payslip-sheet h2,.payslip-sheet h3{break-after:avoid}
 .payslip-sheet a{color:black!important;text-decoration:none}
}

@media screen and (max-width:640px){.payslip-sheet{padding:16px}.payslip-record dl>div{grid-template-columns:1fr;gap:3px}}

.page-head.dashboard-heading{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.page-head.dashboard-heading>div:first-child{width:100%;min-width:0}
.page-head.dashboard-heading p{max-width:none;width:100%}
.page-head.dashboard-heading>.actions{justify-content:flex-start}

/* Compact, comparison-friendly employee summaries with on-demand detail. */
.people-records{display:grid;gap:10px;margin-top:18px}
.people-record{border:1px solid var(--line);border-radius:12px;background:var(--card);min-width:0}
.people-summary{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,.8fr)) minmax(0,1.2fr) minmax(0,.55fr) auto;gap:16px;align-items:center;padding:14px 16px;cursor:pointer;list-style:none}
.people-summary::-webkit-details-marker{display:none}
.people-summary>div{min-width:0;overflow-wrap:anywhere}
.people-identity>strong,.people-identity>.muted{display:block}.people-identity>.muted{font-size:12px;margin-block:3px}.people-identity .badge{font-size:11px;padding:2px 8px}
.people-measure>span{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.people-measure>strong{font-size:14px;line-height:1.8}
.people-expand{display:flex;align-items:center;justify-content:center;gap:5px;padding:10px 12px;min-height:44px;border:1px solid var(--line);border-radius:9px;font-size:12px;color:var(--gold);background:var(--surface)}
.people-record .when-open{display:none}.people-record[open] .when-open{display:inline}.people-record[open] .when-closed{display:none}
.people-summary:focus-visible{outline:2px solid var(--gold2);outline-offset:3px;border-radius:12px}.people-summary:hover{background:var(--surface);border-radius:12px}
.people-details{border-top:1px solid var(--line);padding:18px;background:var(--surface);border-radius:0 0 12px 12px}
.people-detail-grid{display:grid;grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr));gap:20px}.people-detail-grid>section{min-width:0;overflow-wrap:anywhere}.people-detail-grid h3{font-size:14px;margin-top:0}.people-detail-grid p{font-size:13px}
.people-badges{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.people-record-actions{display:flex;flex-wrap:wrap;gap:12px;border-top:1px solid var(--line);padding-top:16px;margin-top:14px}.people-record-actions>.btn{min-width:116px;min-height:46px;margin:0!important;padding:10px 18px}
@container portal-content (max-width:800px){.people-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.people-summary>.people-identity{grid-column:1/-1}.people-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container portal-content (max-width:480px){.people-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.people-expand{grid-column:1/-1}.people-detail-grid{grid-template-columns:1fr}.people-record-actions>.btn{flex:1 1 120px}}
@media(max-width:640px){.people-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.people-summary>.people-identity,.people-expand{grid-column:1/-1}.people-detail-grid{grid-template-columns:1fr}}

/* Payroll summary: reserve more room for money than month/count. */
.content .payroll-summary{grid-template-columns:minmax(0,1fr) minmax(0,.85fr) repeat(2,minmax(0,1.8fr));margin-block-end:24px;align-items:stretch}
.payroll-summary .stat{display:flex;flex-direction:column;gap:8px;justify-content:flex-start}
.payroll-summary .stat>strong{margin-top:0;overflow-wrap:anywhere}
.payroll-summary .payroll-month-value{font-size:18px;line-height:1.7}
.payroll-summary .payroll-amount{font-size:22px;font-variant-numeric:tabular-nums}
.payroll-currencies{display:grid;gap:5px}
.payroll-currencies>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;min-width:0}
.payroll-currencies>div>span{font-size:12px;letter-spacing:0;text-transform:none}
.payroll-currencies>div>strong{font-size:16px;margin:0;line-height:1.6;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.content .payroll-overview-head{margin-block-end:20px;gap:16px;align-items:flex-end}
.payroll-overview-head>div{flex:1 1 540px;min-width:0}
.payroll-overview-head form{flex:0 1 320px;min-width:0;margin:0;gap:10px;flex-wrap:wrap}
.payroll-overview-head form>input{flex:1 1 175px;min-width:0}
.payroll-overview-head form>.btn{flex:0 0 auto}
@container portal-content (max-width:900px){.content .payroll-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container portal-content (max-width:420px){.content .payroll-summary{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.content .payroll-summary{grid-template-columns:minmax(0,1fr)}}
