.portal-admin-row { padding:14px 0; border-bottom:1px solid #e1e7e3; display:flex; justify-content:space-between; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.portal-admin-row strong,.portal-admin-row span { display:block; }
.portal-admin-row span { font-size:14px; margin-top:6px; }
.portal-admin-row p,.portal-document p { white-space:pre-wrap; overflow-wrap:anywhere; }
.portal-admin-actions { display:flex; gap:8px; flex-wrap:wrap; }
.portal-check input { width:24px; height:24px; min-height:24px; accent-color:#ad3682; }
.portal-document { padding:16px 0; border-bottom:1px solid #e1e7e3; }
.portal-document .meta { display:block; margin:6px 0; }
.portal-access-dialog { width:min(460px,calc(100% - 30px)); border:1px solid #ddd; border-radius:8px; padding:24px; color:#25343c; }
.portal-access-dialog::backdrop { background:rgb(20 35 30 / .45); }
.portal-access-dialog .button { margin-top:18px; }
.staff-section-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.staff-section-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.staff-section-tab { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:10px 14px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--text); font:inherit; font-weight:700; cursor:pointer; }
.staff-section-tab.is-active { background:var(--primary); border-color:var(--primary); color:white; }
.staff-section-tab:focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
.staff-request-count { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 6px; border-radius:4px; background:#fff2d7; color:#8a5100; font-size:12px; }
.staff-section-pane[hidden],#staffRequestsSync[hidden],.staff-request-count[hidden] { display:none; }
#staffRequestsPane .portal-leave-section { margin:0; }
.portal-leave-section { margin:26px 0; }
.portal-leave-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding-bottom:12px; }
.portal-leave-heading h3 { display:flex; align-items:center; gap:9px; margin:0; font-size:17px; color:#25343c; }
.portal-leave-heading h3 svg { color:#ad3682; flex-shrink:0; }
.portal-leave-count { display:inline-flex; align-items:center; justify-content:center; min-width:25px; height:25px; padding:0 6px; background:#edf0f2; border-radius:4px; font-size:13px; }
.portal-leave-pending-count { color:#8a5100; font-size:13px; font-weight:700; }
.portal-leave-list { border-top:1px solid #d9e0e4; }
.portal-leave-row { display:grid; grid-template-columns:minmax(0,1fr) 65px 130px 20px; align-items:center; gap:14px; width:100%; min-height:80px; text-align:left; padding:16px 10px; background:#fff; border:0; border-bottom:1px solid #d9e0e4; color:#25343c; font:inherit; cursor:pointer; }
.portal-leave-row:hover { background:#f7f4f8; }
.portal-leave-row:focus-visible,.portal-leave-close:focus-visible { outline:3px solid #ad3682; outline-offset:2px; }
.portal-leave-main { display:grid; gap:5px; min-width:0; }
.portal-leave-main strong { font-size:15px; overflow-wrap:anywhere; }
.portal-leave-until { font-weight:400; color:#697881; }
.portal-leave-main small { font-size:12px; color:#697881; }
.portal-leave-preview { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; color:#697881; }
.portal-leave-days { font-size:14px; font-weight:700; text-align:right; white-space:nowrap; }
.portal-leave-badge { display:inline-flex; align-items:center; justify-content:center; gap:6px; width:fit-content; max-width:100%; padding:6px 9px; border-radius:4px; font-size:12px; font-weight:700; line-height:1.4; }
.portal-leave-badge::before { content:''; width:7px; height:7px; border-radius:50%; background:currentColor; flex-shrink:0; }
.portal-leave-pending { color:#8a5100; background:#fff2d7; }
.portal-leave-approved { color:#206345; background:#e4f4eb; }
.portal-leave-rejected { color:#a42639; background:#fce8ec; }
.portal-leave-withdrawn { color:#596671; background:#edf0f2; }
.portal-leave-chevron { display:flex; color:#7b8790; }
.portal-leave-empty { display:flex; align-items:center; gap:10px; padding:22px 10px; color:#697881; font-size:14px; border-bottom:1px solid #d9e0e4; }
.portal-leave-dialog { width:min(720px,calc(100% - 28px)); max-height:calc(100dvh - 28px); margin:auto; padding:0; overflow:auto; border:1px solid #d9e0e4; border-radius:8px; background:white; color:#25343c; box-shadow:0 20px 80px rgb(20 35 30 / .22); }
.portal-leave-dialog::backdrop { background:rgb(20 35 30 / .45); }
.portal-leave-dialog[open] { display:flex; flex-direction:column; }
.portal-leave-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 24px; border-bottom:1px solid #d9e0e4; }
.portal-leave-dialog-head,.portal-leave-dialog-actions { flex-shrink:0; }
.portal-leave-dialog-head h2 { margin:0; font-size:21px; }
.portal-leave-dialog-head p { margin:5px 0 0; font-size:15px; color:#697881; overflow-wrap:anywhere; }
.portal-leave-close { display:flex; align-items:center; justify-content:center; width:44px; height:44px; flex:0 0 44px; background:#f2f4f5; border:1px solid #d9e0e4; border-radius:6px; color:inherit; cursor:pointer; }
.portal-leave-dialog-body { padding:22px 24px; min-height:0; overflow-y:auto; }
.portal-leave-overview { display:grid; justify-items:start; gap:10px; padding-bottom:20px; border-bottom:1px solid #d9e0e4; }
.portal-leave-overview strong { font-size:19px; overflow-wrap:anywhere; }
.portal-leave-overview > span:last-child { font-size:14px; color:#697881; }
.portal-leave-facts { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:20px 0; }
.portal-leave-facts div { min-width:0; }
.portal-leave-facts dt { font-size:12px; color:#697881; margin-bottom:5px; }
.portal-leave-facts dd { margin:0; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.portal-leave-dialog h3 { margin:0 0 8px; font-size:14px; }
.portal-leave-note,.portal-leave-history { padding:16px 0; border-top:1px solid #d9e0e4; }
.portal-leave-note p,.portal-leave-history p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.6; }
.portal-leave-history ol { display:grid; gap:14px; padding:0 0 0 18px; margin:14px 0 0; }
.portal-leave-history li { padding-left:3px; font-size:13px; }
.portal-leave-history time { display:block; margin:4px 0; font-size:12px; color:#697881; }
.portal-leave-dialog .field { margin-top:14px; }
.portal-leave-dialog textarea { width:100%; min-width:0; resize:vertical; font-size:16px; }
.portal-leave-error { margin:16px 0 0; color:#a42639; font-size:14px; overflow-wrap:anywhere; }
.portal-leave-confirm { margin-top:18px; padding:16px; background:#fff5e5; border-left:3px solid #bb7b17; }
.portal-leave-confirm p { margin:0 0 12px; font-size:14px; line-height:1.6; }
.portal-leave-confirm > div,.portal-leave-dialog-actions > div { display:flex; flex-wrap:wrap; gap:8px; }
.portal-leave-dialog-actions { display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; padding:18px 24px; background:#f7f9fa; border-top:1px solid #d9e0e4; }
.portal-leave-dialog .button { border-radius:6px; font-size:13px; min-height:44px; white-space:normal; }
.portal-leave-dialog .button svg { width:18px; height:18px; flex:0 0 18px; }
.portal-leave-delete { color:#a42639; }
.portal-leave-dialog button:disabled { opacity:.5; cursor:wait; }
.portal-check-label { display:flex; align-items:center; gap:12px; }
.portal-check-label input { width:22px; height:22px; min-height:22px; flex-shrink:0; accent-color:#ad3682; }
.portal-work-balance { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; border-block:1px solid #d9e0e4; padding:20px 0; }
.portal-work-balance span { color:#697881; font-size:13px; }
.portal-work-balance strong { display:block; font-size:25px; margin-top:6px; }
.portal-work-positive { color:#206345; }
.portal-work-negative { color:#a42639; }
.portal-work-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:20px; margin:22px 0 0; }
.portal-work-facts dt { color:#697881; font-size:12px; margin-bottom:6px; }
.portal-work-facts dd { margin:0; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.portal-work-warning { color:#8a5100; font-size:14px; }
#contractDailyFields[hidden],#contractWorkdays[hidden] { display:none; }
.staff-files-panel { margin-top:28px; padding-top:22px; border-top:1px solid #d9e0e4; }
.staff-files-panel h3 { margin:0 0 8px; font-size:17px; }
.staff-files-upload { display:grid; gap:12px; margin:16px 0 18px; }
.staff-files-error { margin:0; color:#a42639; font-size:14px; }
.staff-files-list { display:grid; gap:0; border-top:1px solid #d9e0e4; }
.staff-file-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 0; border-bottom:1px solid #d9e0e4; }
.staff-file-row strong, .staff-file-row .meta { display:block; }
.staff-file-actions { display:flex; flex-wrap:wrap; gap:8px; }
.staff-file-archived { opacity:.85; }
.staff-files-archive { margin-top:16px; }
.staff-files-archive summary { cursor:pointer; font-weight:700; }

@media(max-width:600px) {
  .portal-leave-row { grid-template-columns:minmax(0,1fr) auto 20px; gap:8px; padding:14px 4px; }
  .portal-leave-main { grid-column:1 / 3; grid-row:1; }
  .portal-leave-chevron { grid-column:3; grid-row:1 / 3; }
  .portal-leave-days { grid-column:2; grid-row:2; }
  .portal-leave-row .portal-leave-badge { grid-column:1; grid-row:2; }
  .portal-leave-dialog-head,.portal-leave-dialog-body,.portal-leave-dialog-actions { padding:18px 16px; }
  .portal-leave-facts { grid-template-columns:1fr; gap:14px; }
  .portal-leave-dialog-actions > div { width:100%; }
  .portal-leave-dialog-actions > div > .button { flex:1 1 140px; }
  .portal-leave-dialog-actions > .portal-leave-delete { width:100%; }
}
