.nav-parent { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-caret { transition: transform .18s ease; }
.nav-parent[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-submenu { display: grid; gap: 3px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .22s ease, opacity .18s ease; }
.nav-submenu.open { max-height: 320px; opacity: 1; margin: 2px 0 5px; }
.nav-submenu button { border: 0; background: transparent; color: #8eaaa2; text-align: left; border-radius: 8px; padding: 9px 14px 9px 28px; font-size: .77rem; font-weight: 650; cursor: pointer; }
.nav-submenu button:hover, .nav-submenu button.active { background: #0b566a; color: #d8f1f5; }
.maintain-page > .section-head { margin-bottom: 22px; }
.pay-rule-heading-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.pay-rule-heading-actions .check { padding:10px 12px; }
.maintain-page > .panel { margin-bottom: 18px; }
.maintain-page > .table-wrap.panel { padding: 0; }
.leave-policy-editor { border: 1px solid #bdd7cf; background: #f8fbfa; }
.leave-policy-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.leave-policy-editor fieldset { display: grid; align-content: start; gap: 13px; min-width: 0; margin: 0; padding: 18px; border: 1px solid #d5e3de; border-radius: 13px; background: #fff; }
.leave-policy-editor legend { padding: 0 7px; color: #0b4b43; font-size: .9rem; font-weight: 800; }
.leave-policy-editor label { display: grid; gap: 6px; color: #183f37; font-size: .79rem; font-weight: 750; }
.leave-policy-editor label small { color: #71837d; font-size: .71rem; font-weight: 500; }
.leave-policy-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.leave-policy-editor-actions p { margin: 0; color: #536f67; font-size: .79rem; }
.leave-policy-control { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 180px; }
.leave-policy-change { min-height: 0; padding: 7px 10px; white-space: nowrap; }
.table-wrap a { color: #246f59; font-weight: 700; }
.state.Pending { background: #fff0d5; color: #956419; }
.state.Approved { background: #e1f4e9; color: #24734f; }
.state.Included { background: #e7eef6; color: #355e86; }
button[data-approve-claim] { border: 0; background: #073f50; color: white; border-radius: 8px; padding: 8px 11px; font-weight: 750; cursor: pointer; }
.report-actions { display: flex; gap: 10px; }
.report-filters { margin-bottom: 18px; }
.report-notice { border-left: 4px solid #d8f1f5; padding: 18px 22px; color: #365148; }
.report-notice p { margin: 5px 0 0; color: #71837d; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: #dce5e1; border-bottom: 1px solid #dce5e1; }
.report-summary div { background: #f8fbfa; padding: 18px; }
.report-summary small { display: block; color: #72857e; margin-bottom: 6px; }
.report-summary strong { font-size: 1.05rem; color: #073f50; }
.report-validation-errors, .report-validation-ready { margin: 18px; padding: 16px 18px; border-radius: 12px; }
.report-validation-errors { background: #fff0ee; border: 1px solid #e8aaa2; color: #8d2f27; }
.report-validation-errors ul { margin: 8px 0 0; padding-left: 22px; }
.report-validation-ready { background: #edf8f3; border: 1px solid #a9d7c4; color: #096b50; }
.report-validation-ready p { margin: 6px 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.fnpf-payment-total { margin: 18px; padding: 20px 24px; border: 2px solid #168366; border-radius: 14px; background: #eef9f5; }
.fnpf-payment-total span, .fnpf-payment-total small { display: block; color: #496b61; }
.fnpf-payment-total strong { display: block; margin: 4px 0; color: #075945; font-size: 2rem; }
.report-subhead { padding: 24px 22px 8px; margin: 0; }
.report-table th { white-space: nowrap; }

.pay-rule-template-list { padding: 0; overflow: hidden; }
.pay-rule-template { padding: 22px 24px; }
.pay-rule-template + .pay-rule-template { border-top: 1px solid #e5ebe8; }
.pay-rule-template.expired { background:#f6f7f6; opacity:.82; }
.pay-rule-template > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.pay-rule-template > summary::-webkit-details-marker { display: none; }
.pay-rule-template > summary:focus-visible { outline: 2px solid #2474bd; outline-offset: 5px; }
.pay-rule-template > summary strong, .pay-rule-template > summary small { display: block; }
.pay-rule-template > summary strong { font-size: 1rem; }
.pay-rule-template > summary small { margin-top: 5px; color: #73837d; font-size: .75rem; }
.pay-rule-summary-controls { display: flex; align-items: center; gap: 18px; }
.pay-rule-quick-action { white-space: nowrap; }
.pay-rule-chevron { flex: 0 0 8px; height: 8px; border-right: 2px solid #6d817b; border-bottom: 2px solid #6d817b; transform: rotate(45deg); margin-right: 4px; }
.pay-rule-template[open] .pay-rule-chevron { transform: rotate(225deg); }
.pay-rule-template > .actions { margin-top: 18px; justify-content: flex-end; }
.pay-rule-members { display: grid; gap: 8px; margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #edf6f3; }
.pay-rule-members > strong { font-size: .78rem; color: #31564f; }
.pay-rule-members > div { display: flex; flex-wrap: wrap; gap: 7px; }
.pay-rule-members > small { color: #627a74; }
.pay-rule-member { min-height: 0; padding: 6px 9px; border: 1px solid #bdd5ce; border-radius: 999px; background: #fff; color: #13564e; font-size: .76rem; font-weight: 750; }
.pay-rule-member:hover { border-color: #078676; background: #e4f5ef; }
.pay-rule-template dl { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; margin: 20px 0 0; }
.pay-rule-template dl div { min-width: 0; padding: 12px 14px; border-radius: 10px; background: #f6f9f7; }
.pay-rule-template dt { color: #788a83; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.pay-rule-template dd { margin: 5px 0 0; color: #173b31; font-size: .84rem; font-weight: 750; }
.pay-rule-employee-heading { margin-top: 26px; }
.pay-rule-overview-table td small { display: block; margin-top: 4px; color: #7a8a84; white-space: nowrap; }

@page { size: A4 landscape; margin: 8mm; }

@media print {
  .sidebar, .topbar, #report-form, #report-notice, .report-actions, .toast { display: none !important; }
  html, body { width: 100%; min-width: 0; margin: 0; padding: 0; background: #fff; }
  main { width: 100%; max-width: none; margin: 0; padding: 0; }
  #reports { display: block !important; width: 100%; max-width: none; }
  #report-output { width: 100%; max-width: none; box-sizing: border-box; box-shadow: none; border: 0; overflow: visible; }
  .report-summary { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .report-summary div { min-width: 0; padding: 7px 6px; }
  .report-summary small { margin-bottom: 2px; font-size: 6pt; }
  .report-summary strong { font-size: 8pt; overflow-wrap: anywhere; }
  .fnpf-payment-total { margin: 6px 0 10px; padding: 10px 12px; }
  .fnpf-payment-total strong { font-size: 18pt; }
  .report-table { width: 100% !important; max-width: 100%; table-layout: fixed; font-size: 6.5pt; }
  .report-table th, .report-table td { padding: 5px 4px; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
  .report-table th { font-size: 5.8pt; line-height: 1.15; }
}

@media (max-width: 720px) {
  .sidebar nav { grid-template-columns: 1fr; }
  .nav-submenu.open { max-height: 320px; }
  .nav-submenu button { text-align: center; padding: 8px; }
  .maintain-page > .section-head { align-items: flex-start; flex-direction: column; }
  .pay-rule-heading-actions { width:100%; align-items:stretch; flex-direction:column; }
  .maintain-page > .section-head button { width: 100%; }
  .leave-policy-editor-grid { grid-template-columns: 1fr; }
  .leave-policy-editor-actions { align-items: stretch; flex-direction: column; }
  .leave-policy-editor-actions button { width: 100%; }
  .pay-rule-template { padding: 18px; }
  .pay-rule-template > summary { align-items: flex-start; }
  .pay-rule-summary-controls { gap: 12px; }
  .pay-rule-quick-action { padding: 8px 10px; font-size: .72rem; }
  .pay-rule-template > header { flex-direction: column; }
  .pay-rule-template dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bulk-rate-dialog{border:0;border-radius:20px;padding:0;width:min(920px,calc(100vw - 32px));max-height:90vh;box-shadow:0 24px 80px rgba(5,53,66,.28)}
.bulk-rate-dialog::backdrop{background:rgba(4,38,48,.48)}
.bulk-rate-shell{padding:24px;display:grid;gap:20px}
.bulk-rate-employees{display:grid;gap:8px;max-height:46vh;overflow:auto;padding-right:4px}
.bulk-rate-employee{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.bulk-rate-employee span{display:grid;gap:2px}.bulk-rate-employee small{color:var(--muted)}
.bulk-rate-employee .current-rate{font-weight:700;text-align:right}.bulk-rate-actions{display:flex;justify-content:flex-end}
@media(max-width:700px){.bulk-rate-employee{grid-template-columns:auto 1fr}.bulk-rate-employee .current-rate{grid-column:2;text-align:left}}

#report-fnu-review { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 18px; border: 1px solid #cbdcd6; border-radius: 12px; }
#report-fnu-review:not(.hidden) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
#report-fnu-review legend { padding: 0 6px; font-weight: 700; }
#report-fnu-review p { grid-column: 1 / -1; margin: 0; color: #496b61; }
