:root {
    --navy: #2e478f;
    --navy-dark: #1f326c;
    --red: #d71920;
    --ink: #18181b;
    --muted: #606776;
    --line: #d9dde6;
    --surface: #ffffff;
    --surface-soft: #f5f7fb;
    --success: #176b3a;
    --warning: #8a5a00;
    --danger: #a61b24;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(31, 50, 108, 0.08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--surface-soft); line-height: 1.5; }
a { color: var(--navy-dark); }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.auth-body { min-height: 100vh; background: linear-gradient(145deg, #eef2fb, #ffffff 58%, #f9ecec); }
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 460px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 22px 60px rgba(31, 50, 108, 0.16); padding: 34px; }
.auth-logo { display: block; width: 100%; margin: 0 auto 24px; }
.auth-card h1 { margin: 10px 0 18px; font-size: 1.75rem; }
.banner-message { margin: 0; padding: 12px 14px; border-left: 4px solid var(--red); background: #f6f8ff; color: var(--navy-dark); font-weight: 700; }
.auth-actions { display: flex; justify-content: center; gap: 16px; margin-top: 16px; }
.code-input { text-align: center; letter-spacing: 0.35em; font-size: 1.6rem; font-weight: 700; }

.site-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(280px, auto) 1fr auto; align-items: center; gap: 18px; padding: 10px 24px; color: #fff; background: var(--navy-dark); box-shadow: 0 4px 18px rgba(0,0,0,.14); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand img { width: 180px; background: #fff; border-radius: 4px; }
.brand span { font-size: 1.05rem; }
.primary-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.primary-nav a { color: #fff; text-decoration: none; padding: 9px 10px; border-radius: 7px; font-size: .92rem; }
.primary-nav a:hover, .primary-nav a.active { background: rgba(255,255,255,.15); }
.nav-divider { height: 24px; width: 1px; margin: 0 4px; background: rgba(255,255,255,.35); }
.nav-toggle { display: none; border: 1px solid rgba(255,255,255,.45); color: #fff; background: transparent; border-radius: 7px; padding: 8px 12px; }
.user-menu { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; font-size: .9rem; }
.user-menu form { margin: 0; }
.role-pill, .badge { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; }
.role-pill { padding: 3px 8px; background: rgba(255,255,255,.16); }
.badge { min-width: 20px; min-height: 20px; padding: 1px 6px; background: var(--red); color: #fff; font-size: .75rem; }

.site-main { width: min(1500px, calc(100% - 36px)); margin: 0 auto; padding: 30px 0 50px; }
.site-footer { padding: 22px; text-align: center; color: var(--muted); font-size: .9rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; }
.page-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--red); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.balance-chip { min-width: 190px; padding: 14px 18px; border-radius: var(--radius); color: #fff; background: var(--navy); box-shadow: var(--shadow); }
.balance-chip span, .balance-chip strong { display: block; }
.balance-chip span { font-size: .82rem; opacity: .86; }
.balance-chip strong { font-size: 1.25rem; }

.card, .admin-section { margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card { padding: 24px; }
.card h2, .card h3 { margin-top: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-header h2 { margin: 0; }
.nested-card { margin: 0; box-shadow: none; background: var(--surface-soft); }
.error-card { max-width: 720px; margin: 50px auto; text-align: center; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { min-height: 135px; display: flex; flex-direction: column; justify-content: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; }
.stat-card strong { color: var(--navy-dark); font-size: 2.2rem; line-height: 1; }
.stat-card span { margin-top: 10px; color: var(--muted); font-weight: 700; }
.stat-card:hover { transform: translateY(-2px); border-color: #aab5d7; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.summary-grid div { padding: 15px; border-radius: 10px; background: var(--surface-soft); }
.summary-grid span, .summary-grid strong { display: block; }
.summary-grid span { color: var(--muted); font-size: .85rem; }
.summary-grid strong { margin-top: 4px; color: var(--navy-dark); }

.alert { margin-bottom: 18px; padding: 13px 16px; border: 1px solid; border-radius: 10px; }
.alert-success { color: var(--success); background: #eef9f2; border-color: #a9d7ba; }
.alert-warning { color: var(--warning); background: #fff8e7; border-color: #e8cd8a; }
.alert-error { color: var(--danger); background: #fff0f1; border-color: #e8a9ae; }
.alert-info { color: var(--navy-dark); background: #eef3ff; border-color: #b9c7ed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .decision-form label { color: #333846; font-weight: 700; }
.field small, .help-text, small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #b8bfce; border-radius: 8px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(46,71,143,.25); outline-offset: 2px; border-color: var(--navy); }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--navy); }
.form-grid { display: grid; gap: 0 18px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full-span { grid-column: 1 / -1; }
.check-group { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 6px 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.check-group legend { padding: 0 6px; font-weight: 700; }
.check-group label, .checkbox-field label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.checkbox-field { justify-content: center; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.search-form { display: flex; gap: 10px; margin-bottom: 20px; }
.search-form input { flex: 1; }
.employee-search-form { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(200px, 240px) auto; gap: 12px; align-items: end; }
.employee-search-field, .employee-status-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.employee-search-field label, .employee-status-field label { color: #333846; font-weight: 700; }
.employee-search-input, .employee-status-filter { width: 100%; min-width: 0; }
.employee-search-actions { display: flex; gap: 10px; align-items: center; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 700; line-height: 1.2; }
.button-primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.button-primary:hover { color: #fff; background: var(--navy-dark); }
.button-secondary { color: var(--navy-dark); background: #fff; border-color: #aeb9d8; }
.button-secondary:hover { color: var(--red); border-color: var(--red); }
.button-small { min-height: 34px; padding: 6px 10px; font-size: .86rem; }
.button-full { width: 100%; }
.button-link { min-height: auto; padding: 5px; color: var(--navy-dark); background: transparent; border: 0; text-decoration: underline; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #3d4350; background: #f4f6fa; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:hover { background: #fafbfe; }
.empty-cell { padding: 25px; color: var(--muted); text-align: center; }
.table-note { max-width: 360px; margin: 8px 0 0; color: var(--muted); font-size: .88rem; }
.wide-table { min-width: 900px; }
.status { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.status-submitted { color: #725000; background: #fff1c2; }
.status-approved { color: var(--success); background: #dff4e7; }
.status-declined { color: var(--danger); background: #ffe0e2; }
.decision-form { min-width: 250px; display: grid; gap: 8px; }
.decision-form label { display: grid; gap: 4px; font-size: .8rem; }
.decision-form input, .decision-form select, .decision-form textarea { min-height: 35px; padding: 6px 8px; font-size: .88rem; }

.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.resource-card { min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.resource-card h2 { margin: 8px 0; }
.resource-card p { color: var(--muted); }
.resource-type { color: var(--red); font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.resource-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.resource-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface-soft); }

.admin-section { overflow: hidden; }
.admin-section > summary { display: flex; align-items: center; gap: 10px; padding: 18px 22px; color: var(--navy-dark); cursor: pointer; font-size: 1.1rem; font-weight: 800; list-style: none; }
.admin-section > summary::-webkit-details-marker { display: none; }
.admin-section > summary::before { content: '+'; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--navy); }
.admin-section[open] > summary::before { content: '−'; }
.admin-section[open] > summary { border-bottom: 1px solid var(--line); }
.section-content { padding: 22px; }
.summary-count { margin-left: auto; display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; background: var(--red); font-size: .8rem; }
.admin-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); gap: 22px; align-items: start; }
.equal-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nested-form { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.assignment-list { max-height: 420px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.assignment-list label { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 6px; }
.assignment-list label:hover { background: #eef2fb; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-bar a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 700; }
.filter-bar a.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1220px) {
    .site-header { grid-template-columns: auto auto 1fr; }
    .brand span { display: none; }
    .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 10px 20px 18px; background: var(--navy-dark); box-shadow: 0 12px 20px rgba(0,0,0,.18); }
    .primary-nav.open { display: flex; }
    .primary-nav a { padding: 11px; }
    .nav-divider { width: 100%; height: 1px; margin: 5px 0; }
    .nav-toggle { display: inline-flex; justify-self: start; }
    .user-menu { justify-self: end; }
    .admin-split { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .site-header { grid-template-columns: 1fr auto; padding: 9px 12px; }
    .brand img { width: 150px; }
    .nav-toggle { grid-column: 2; grid-row: 1; }
    .user-menu { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.18); }
    .site-main { width: min(100% - 22px, 1500px); padding-top: 20px; }
    .page-heading, .card-header { flex-direction: column; align-items: stretch; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-grid, .resource-grid, .two-columns, .three-columns, .equal-columns { grid-template-columns: 1fr; }
    .full-span { grid-column: auto; }
    .assignment-list { grid-template-columns: 1fr; }
    .card, .section-content { padding: 17px; }
    .search-form { flex-wrap: wrap; }
    .search-form input { flex-basis: 100%; }
    .employee-search-form { grid-template-columns: 1fr; }
    .employee-search-actions { justify-content: flex-start; }
}

@media (max-width: 520px) {
    .auth-main { padding: 12px; }
    .auth-card { padding: 22px 18px; }
    .employee-search-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .employee-search-actions .button:only-child { grid-column: 1 / -1; }
    .site-header { position: relative; }
    .brand img { width: 132px; }
    .user-menu > span:first-child { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
    .stat-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 105px; }
    .button { width: 100%; }
    .user-menu .button { width: auto; }
    .auth-actions { flex-direction: column; align-items: center; }
    .balance-chip { width: 100%; }
    .check-group { flex-direction: column; }
}

/* Portal 0.2 workflow additions */
.environment-banner{background:#8b1e2d;color:#fff;text-align:center;font-weight:700;padding:.45rem 1rem;letter-spacing:.04em}
.summary-grid-wide{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.request-balances{margin-bottom:1.25rem;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.request-balances>div{background:#fff;border:1px solid #d8dee9;border-radius:10px;padding:1rem}
.request-builder .field-action{display:flex;flex-direction:column;justify-content:flex-end}
.request-warning{margin:1rem 0}
.row-overage{background:#fff0f1}
.overage-text{color:#b00020;font-weight:700}
.inline-form{display:inline}
.row-actions{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.button-danger{background:#a61b2b;color:#fff;border-color:#a61b2b}
.button-danger:hover{background:#821421}
.link-button{border:0;background:transparent;color:#29458f;text-decoration:underline;cursor:pointer;margin-left:.5rem;padding:0;font:inherit;font-size:.85rem}
.detail-list{display:grid;gap:.8rem;margin:1rem 0 0}
.detail-list>div{display:grid;grid-template-columns:minmax(150px,220px) 1fr;gap:1rem;padding:.65rem 0;border-top:1px solid #e4e7ed}
.detail-list dt{font-weight:700;color:#3e4a60}.detail-list dd{margin:0}
.decision-card{border-left:5px solid #29458f}
.change-list{margin:0;display:grid;gap:.5rem}.change-list>div{display:grid;grid-template-columns:130px 1fr;gap:.5rem}.change-list dt{font-weight:700}.change-list dd{margin:0}
.status-awaiting-manager,.status-awaiting-final,.status-amendment-pending,.status-cancellation-pending{background:#fff1c7;color:#6b4a00}
.status-final-approved{background:#dff5e5;color:#166534}.status-cancelled,.status-manager-declined,.status-final-declined{background:#fbe1e5;color:#8b1e2d}
@media(max-width:760px){.detail-list>div,.change-list>div{grid-template-columns:1fr}.row-actions{min-width:180px}}

/* Portal 0.4 news and password self-service additions */
.news-section { overflow: hidden; }
.news-bulletin { color: var(--ink); }
.news-bulletin header { padding-bottom: 1rem; margin-bottom: 1.15rem; border-bottom: 1px solid var(--line); }
.news-bulletin h3 { margin: 0 0 .45rem; font-size: clamp(1.35rem, 2vw, 1.8rem); color: var(--navy-dark); }
.news-meta { margin: 0; color: var(--muted); font-size: .92rem; }
.news-body { line-height: 1.72; white-space: normal; overflow-wrap: anywhere; }
.news-bulletin-featured { padding: 1.2rem 1.25rem; border: 1px solid #cfd8ea; border-left: 5px solid var(--navy); border-radius: 10px; background: #fbfcff; }
.news-bulletin-detail { max-width: 1000px; }
.news-empty { padding: 2rem 1rem; text-align: center; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-soft); }
.news-empty h3 { margin: 0 0 .35rem; color: var(--navy-dark); }
.news-empty p { margin: 0; color: var(--muted); }
.status-active { color: var(--success); background: #dff4e7; }
.status-expired { color: #6b4a00; background: #fff1c7; }
.status-disabled { color: var(--danger); background: #ffe0e2; }

/* Portal 0.5 scheduled news, Manage dropdown, and payslip imports */
.primary-nav .nav-dropdown { position: relative; }
.primary-nav .nav-dropdown > summary { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 7px; color: #fff; cursor: pointer; font-size: .92rem; list-style: none; user-select: none; }
.primary-nav .nav-dropdown > summary::-webkit-details-marker { display: none; }
.primary-nav .nav-dropdown > summary::after { content: '▾'; font-size: .7rem; opacity: .8; }
.primary-nav .nav-dropdown[open] > summary::after { content: '▴'; }
.primary-nav .nav-dropdown > summary:hover,
.primary-nav .nav-dropdown.active > summary,
.primary-nav .nav-dropdown[open] > summary { background: rgba(255,255,255,.15); }
.nav-dropdown-menu { min-width: 210px; padding: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: var(--navy-dark); box-shadow: 0 16px 30px rgba(0,0,0,.25); }
.nav-dropdown-menu a { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.bulletin-attribution { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.bulletin-editor { color: var(--navy-dark); }
.form-note { color: var(--muted); font-size: .9rem; }
.status-scheduled { color: var(--navy-dark); background: #e5ecff; }
.status-imported { color: var(--success); background: #dff4e7; }
.status-duplicate { color: #5a4a00; background: #fff1c7; }
.status-needs-review { color: #8a4a00; background: #ffe7c4; }
.status-failed { color: var(--danger); background: #ffe0e2; }
.import-status-card code, .import-detail-list code { overflow-wrap: anywhere; }
.import-detail-list dd { min-width: 0; }
.button:disabled { cursor: not-allowed; opacity: .55; }

@media (min-width: 1221px) {
    .nav-dropdown-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 40; }
}

@media (max-width: 1220px) {
    .primary-nav .nav-dropdown { width: 100%; }
    .primary-nav .nav-dropdown > summary { padding: 11px; }
    .nav-dropdown-menu { position: static; margin: 2px 0 8px 14px; border-color: rgba(255,255,255,.16); box-shadow: none; }
    .nav-dropdown-menu a { padding-left: 16px; }
}


/* Portal 0.6 employee training records */
.status-current, .status-no-expiry { color: var(--success); background: #dff4e7; }
.status-renewal-due { color: #6b4a00; background: #fff1c7; }
.training-attachment-list { margin: 0; padding-left: 18px; }
.training-attachment-list li + li { margin-top: 4px; }
.training-existing-documents { margin-top: 16px; }


/* Portal 0.7 employee numbers, manager display, yearly usage, and negative balances */
.negative-hours { color: var(--danger) !important; }
.muted-text { color: var(--muted); }
.current-year-usage { margin-top: .65rem; }
.current-year-usage + form { margin-top: 1.25rem; }
.field input[readonly] { background: var(--surface-soft); color: var(--muted); cursor: not-allowed; }

.page-heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reminder-form code, .form-note code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .page-heading-actions { width: 100%; }
    .page-heading-actions .button { width: 100%; }
}

/* Portal 0.10.2 request-history alignment */
td.request-row-actions { vertical-align: middle; }
.request-row-actions-inner { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.request-row-actions-inner .inline-form { display: inline-flex; margin: 0; }
@media (max-width: 760px) {
    .request-row-actions-inner { min-width: 180px; }
}

/* Sign-in processing feedback and duplicate-submit protection. */
.button-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    margin-left: .55rem;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-button-spin .75s linear infinite;
}
.button[aria-busy="true"] .button-spinner { display: inline-block; }
.login-processing {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: .92rem;
    text-align: center;
}
@keyframes login-button-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .button-spinner { animation: none; }
}

/* Portal 0.13.5 job-change currency fields. */
.currency-input {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.currency-input > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0 .7rem;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 7px 0 0 7px;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 700;
}
.currency-input > input {
    min-width: 0;
    border-radius: 0 7px 7px 0;
}


/* Portal 0.16 Group Benefits management */
.benefit-rate-table { min-width: 760px; }
.benefit-rate-table td:first-child { width: 42%; font-weight: 700; }
.benefit-rate-table input { min-width: 160px; }
.benefit-master-groups { align-items: start; margin-top: 22px; }
.benefit-fieldset { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.benefit-fieldset legend { padding: 0 7px; color: var(--navy-dark); font-weight: 800; }
.benefit-input-table { min-width: 650px; margin-bottom: 18px; }
.benefit-input-table td:first-child { width: 42%; font-weight: 700; }
.benefit-input-table select { min-width: 220px; }
.compact-check { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.compact-check input { width: 18px; min-height: 18px; }
.benefit-overrides { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.benefit-overrides > summary { padding: 14px 16px; cursor: pointer; color: var(--navy-dark); font-weight: 800; }
.benefit-overrides > .form-grid { padding: 0 16px 4px; }
.benefit-calculation-table { min-width: 1120px; }
.number-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.payroll-value { color: var(--navy-dark); font-weight: 800; background: #eef3ff; }
.benefit-total-row td { border-top: 2px solid #aeb9d8; font-weight: 800; }
.group-benefit-filter { grid-template-columns: minmax(260px, 1fr) minmax(180px, 230px) minmax(360px, auto); }
.group-benefit-filter .employee-search-actions { flex-wrap: wrap; }
.payroll-toggle { min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.benefit-summary-grid { margin: 18px 0; }
@media (max-width: 1050px) {
    .group-benefit-filter { grid-template-columns: 1fr; }
    .benefit-master-groups { grid-template-columns: 1fr; }
}
.benefit-division-summary table { min-width: 780px; }
.benefit-division-summary td:first-child { font-weight: 700; }

/* Portal 0.16.4 Group Benefits display refinements. */
.benefit-calculation-assumptions {
    grid-template-columns: repeat(2, minmax(160px, 240px));
    justify-content: start;
    margin: 0 0 18px;
}
.benefit-rate-table th.number-cell,
.benefit-calculation-table th.number-cell,
.benefit-division-summary th.number-cell,
.wide-table th.number-cell {
    text-align: right;
}
