/*
 * File: hr-ui.css v1.0.0 - SmartMunic shared UI for the HR Core pages (loaded by includes/hr-ui-styles.php)
 * - Same design system as pw-api-styles.css (tokens, type scale, radii, breakpoints, components), with its own prefix
 *   (.hr-ui root, .hr-* components, --hr-* tokens) so the two plugins cannot clash when both load on one page
 * - Everything is scoped to .hr-ui (a block's root element), so the theme cannot restyle it and nothing leaks into the theme
 * - Brand palette: teal #4A8489, mid blue #2570AB, bright blue #0084E0, lime #88C82B, grey #96A5A8
 *   Headings + table headers = teal, primary buttons = mid blue (white text), focus / active / progress = bright blue
 * - White text only on backgrounds set here (buttons, table headers, active tabs / pills) - the site background is white
 * - Not covered (left to each page): warning / problem colours (red, orange, amber notices, status badges and row tints),
 *   chart values, series colours and legends, and the employee / manager calendar grids
 * - Font sizes 11 / 12 / 14 / 18 / 24px only (16px on mobile inputs, so iOS does not zoom)
 * - Breakpoints: 1100px (grids narrow) and 768px (stack, 44px controls, 16px input text)
 */

/* ---------- tokens + page root ---------- */
.hr-ui{
    --hr-primary:#2570AB; --hr-primary-hover:#1e5c8d; --hr-primary-tint:#eef5fb;
    --hr-accent:#0084E0; --hr-teal:#4A8489; --hr-lime:#88C82B; --hr-grey:#96A5A8;
    --hr-ink:#111827; --hr-text-2:#64748b; --hr-label:#334155; --hr-muted-label:#475569;
    --hr-border:#e2e8f0; --hr-border-input:#cbd5e1; --hr-border-hover:#94a3b8; --hr-row:#eef2f7;
    --hr-surface:#ffffff; --hr-tint:#f8fafc;
    --hr-font:Inter,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; --hr-mono:Consolas,Menlo,monospace;
    --hr-fs-xs:11px; --hr-fs-sm:12px; --hr-fs-md:14px; --hr-fs-lg:18px; --hr-fs-xl:24px;
    --hr-r-lg:12px; --hr-r-md:8px; --hr-r-sm:6px;
    --hr-ctrl-h:36px; --hr-th-h:28px;
    font-family:var(--hr-font); font-size:var(--hr-fs-md); line-height:1.4; color:var(--hr-ink);
    width:100%; max-width:1400px; margin:0 auto 20px auto; padding:0 15px; box-sizing:border-box;
}
.hr-ui *, .hr-ui *::before, .hr-ui *::after{box-sizing:border-box;}
.hr-ui.alignwide, .hr-ui.alignfull{max-width:1400px;}

/* ---------- page title + section heads (teal) ---------- */
.hr-ui h1.hr-title, .hr-ui h2.hr-title{font-family:var(--hr-font); font-size:var(--hr-fs-xl); font-weight:700; line-height:1.25; color:var(--hr-teal); margin:0; padding:0; letter-spacing:normal; text-transform:none; background:none; border:0;}
.hr-ui .hr-heading{font-family:var(--hr-font); font-size:var(--hr-fs-lg); font-weight:700; line-height:1.3; color:var(--hr-teal); margin:0 0 12px 0; padding:0; letter-spacing:normal; text-transform:none; background:none; border:0;}
.hr-ui .hr-card-head{font-family:var(--hr-font); font-size:var(--hr-fs-sm); font-weight:800; line-height:1.3; letter-spacing:0.06em; text-transform:uppercase; color:var(--hr-teal); margin:0 0 12px 0; padding:0; background:none; border:0;}
.hr-ui .hr-card-bar{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px;}
.hr-ui .hr-card-bar > .hr-card-head, .hr-ui .hr-card-bar > .hr-heading, .hr-ui .hr-card-bar > .hr-title{margin:0;}
.hr-ui .hr-card-bar-actions{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.hr-ui .hr-note{font-size:var(--hr-fs-sm); line-height:1.5; color:var(--hr-text-2);}
.hr-ui p.hr-note{margin:0 0 12px 0;}
.hr-ui .hr-mono{font-family:var(--hr-mono);}
.hr-ui .hr-muted{color:var(--hr-text-2);}

/* ---------- page header: title on the left, actions / collapse button on the right ---------- */
.hr-ui .hr-page-head{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 16px 0;}
.hr-ui .hr-page-head-actions{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.hr-ui button.hr-page-toggle{display:inline-flex; align-items:center; gap:10px; margin:0; padding:0; border:0; background:none; box-shadow:none; color:inherit; font:inherit; text-align:left; cursor:pointer; appearance:none;}
.hr-ui button.hr-page-toggle:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px; border-radius:var(--hr-r-sm);}

/* ---------- cards + tiles ---------- */
.hr-ui .hr-card{background:var(--hr-surface); border:1px solid var(--hr-border); border-radius:var(--hr-r-lg); padding:16px; margin-bottom:16px;}
.hr-ui .hr-card > :last-child{margin-bottom:0;}
.hr-ui .hr-card--tint{background:var(--hr-tint);}
.hr-ui .hr-tile{display:flex; flex-direction:column; justify-content:space-between; min-width:0; padding:10px 12px; border:1px solid var(--hr-border); border-radius:var(--hr-r-md); background:var(--hr-tint);}
.hr-ui .hr-tile-label{display:block; font-size:var(--hr-fs-xs); font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--hr-muted-label);}
.hr-ui .hr-tile-value{display:block; font-size:var(--hr-fs-xl); font-weight:700; line-height:1.2; margin-top:2px; font-variant-numeric:tabular-nums; color:var(--hr-ink);}
.hr-ui .hr-section + .hr-section{margin-top:16px;}

/* ---------- layout helpers ---------- */
.hr-ui .hr-grid{display:grid; gap:12px;}
.hr-ui .hr-grid-2{display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr));}
.hr-ui .hr-grid-tiles{display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(220px,1fr));}
.hr-ui .hr-span-2{grid-column:1 / -1;}
.hr-ui .hr-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}

/* ---------- form fields ---------- */
.hr-ui .hr-form{display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end;}
.hr-ui .hr-form--stack{flex-direction:column; align-items:stretch;}
.hr-ui .hr-field{display:flex; flex-direction:column; gap:6px; min-width:0;}
.hr-ui .hr-field > label, .hr-ui .hr-label{font-size:var(--hr-fs-sm); font-weight:600; color:var(--hr-label); margin:0;}
.hr-ui .hr-field-help{font-size:var(--hr-fs-xs); line-height:1.4; color:var(--hr-text-2); margin:0;}
.hr-ui .hr-input{width:auto; height:var(--hr-ctrl-h); min-height:0; max-width:100%; margin:0; padding:0 10px; border:1px solid var(--hr-border-input); border-radius:var(--hr-r-md); background-color:var(--hr-surface); color:var(--hr-ink); font-family:var(--hr-font); font-size:var(--hr-fs-md); line-height:1.2; box-shadow:none;}
.hr-ui .hr-input--full{width:100%;}
.hr-ui textarea.hr-input{height:auto; min-height:90px; padding:8px 10px; line-height:1.4; resize:vertical;}
.hr-ui select.hr-input[multiple]{height:auto; min-height:90px; padding:6px;}
.hr-ui input[type="file"].hr-input{height:auto; min-height:var(--hr-ctrl-h); padding:6px 10px; font-size:var(--hr-fs-sm);}
.hr-ui .hr-input:hover{border-color:var(--hr-border-hover);}
.hr-ui .hr-input:focus{border-color:var(--hr-accent); outline:2px solid var(--hr-accent); outline-offset:0;}
.hr-ui .hr-input--sm{height:30px; padding:0 8px; font-size:var(--hr-fs-sm);}
.hr-ui .hr-input:disabled, .hr-ui .hr-input[readonly]{background-color:var(--hr-tint); color:var(--hr-text-2);}
.hr-ui .hr-input:disabled{cursor:not-allowed;}
/* checkbox / radio rows */
.hr-ui .hr-check{display:inline-flex; align-items:center; gap:8px; margin:0; font-size:var(--hr-fs-md); font-weight:400; color:var(--hr-ink); cursor:pointer;}
.hr-ui .hr-check-list{display:flex; flex-direction:column; gap:8px; margin:0; padding:0; list-style:none;}
.hr-ui .hr-check-grid{display:grid; gap:8px 16px; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); margin:0; padding:0; list-style:none;}

/* ---------- buttons: primary (mid blue), secondary (white), danger ---------- */
.hr-ui .hr-btn{display:inline-flex; align-items:center; justify-content:center; gap:6px; height:var(--hr-ctrl-h); min-height:0; margin:0; padding:0 16px;
    border:1px solid var(--hr-primary); border-radius:var(--hr-r-md); background:var(--hr-primary); color:#fff;
    font-family:var(--hr-font); font-size:var(--hr-fs-md); font-weight:600; line-height:1; letter-spacing:normal; text-transform:none; text-decoration:none; white-space:nowrap;
    box-shadow:none; text-shadow:none; appearance:none; cursor:pointer; transition:background-color .15s, border-color .15s, color .15s;}
.hr-ui a.hr-btn, .hr-ui a.hr-btn:visited{color:#fff;}
.hr-ui .hr-btn:hover{background:var(--hr-primary-hover); border-color:var(--hr-primary-hover); color:#fff;}
.hr-ui .hr-btn:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px;}
.hr-ui .hr-btn--secondary, .hr-ui a.hr-btn--secondary, .hr-ui a.hr-btn--secondary:visited{background:var(--hr-surface); border-color:var(--hr-border-input); color:var(--hr-primary);}
.hr-ui .hr-btn--secondary:hover, .hr-ui a.hr-btn--secondary:hover{background:var(--hr-primary-tint); border-color:var(--hr-primary); color:var(--hr-primary-hover);}
.hr-ui .hr-btn--danger, .hr-ui a.hr-btn--danger, .hr-ui a.hr-btn--danger:visited{background:#dc2626; border-color:#dc2626; color:#fff;}
.hr-ui .hr-btn--danger:hover, .hr-ui a.hr-btn--danger:hover{background:#b91c1c; border-color:#b91c1c; color:#fff;}
.hr-ui .hr-btn--link{height:auto; padding:0; border:0; background:none; color:var(--hr-primary); font-weight:600;}
.hr-ui .hr-btn--link:hover{background:none; border:0; color:var(--hr-primary-hover); text-decoration:underline;}
.hr-ui .hr-btn--link.hr-btn--danger, .hr-ui .hr-btn--link.hr-btn--danger:hover{background:none; color:#dc2626;}
.hr-ui .hr-btn--sm{height:30px; padding:0 12px; font-size:var(--hr-fs-sm);}
.hr-ui .hr-btn--block{display:flex; width:100%;}
.hr-ui .hr-btn--stack{flex-direction:column; gap:2px; height:auto; min-height:30px; padding:4px 12px; line-height:1.2; text-align:center; white-space:normal;} /* 2-line button */
.hr-ui .hr-btn:disabled, .hr-ui .hr-btn[disabled]{opacity:.5; cursor:not-allowed; pointer-events:none;}
/* small round icon button (close, +, remove) */
.hr-ui .hr-icon-btn{display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; min-height:0; margin:0; padding:0; border:1px solid var(--hr-border-input); border-radius:var(--hr-r-sm); background:var(--hr-surface); color:var(--hr-label); font-family:var(--hr-font); font-size:var(--hr-fs-lg); line-height:1; box-shadow:none; appearance:none; cursor:pointer;}
.hr-ui .hr-icon-btn:hover{border-color:var(--hr-primary); background:var(--hr-primary-tint); color:var(--hr-primary);}
.hr-ui .hr-icon-btn:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px;}

/* ---------- tabs + pills (active = mid blue) ---------- */
.hr-ui .hr-tabs{display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin:0 0 16px 0; padding:0; border:0; background:none;}
.hr-ui .hr-tab, .hr-ui .hr-pill{display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:0; margin:0;
    border:1px solid var(--hr-border); background:var(--hr-surface); color:var(--hr-label);
    font-family:var(--hr-font); font-size:var(--hr-fs-sm); font-weight:600; line-height:1; letter-spacing:normal; text-transform:none; text-decoration:none; white-space:nowrap;
    box-shadow:none; text-shadow:none; appearance:none; cursor:pointer; transition:background-color .15s, border-color .15s, color .15s;}
.hr-ui .hr-tab{height:32px; padding:0 14px; border-radius:var(--hr-r-md);}
.hr-ui .hr-pill{height:26px; padding:0 12px; border-radius:999px; background:var(--hr-tint);}
.hr-ui .hr-tab:hover, .hr-ui .hr-pill:hover{border-color:var(--hr-primary); color:var(--hr-primary); background:var(--hr-primary-tint);}
.hr-ui .hr-tab:focus-visible, .hr-ui .hr-pill:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px;}
.hr-ui .hr-tab.active, .hr-ui .hr-pill.active, .hr-ui .hr-tab[aria-selected="true"], .hr-ui .hr-pill[aria-selected="true"]{background:var(--hr-primary); border-color:var(--hr-primary); color:#fff;}
/* count inside a tab / pill */
.hr-ui .hr-count{display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:999px; background:var(--hr-border); color:var(--hr-label); font-size:var(--hr-fs-xs); font-weight:700; line-height:1;}
.hr-ui .hr-tab.active .hr-count, .hr-ui .hr-pill.active .hr-count, .hr-ui [aria-selected="true"] .hr-count{background:rgba(255,255,255,0.25); color:#fff;}

/* ---------- tables: teal header, white text ---------- */
.hr-ui .hr-table-wrap{max-height:480px; overflow:auto; border:1px solid var(--hr-border); border-radius:var(--hr-r-md); background:var(--hr-surface); margin:0 0 12px 0;}
.hr-ui .hr-table-wrap--full{max-height:none;}
.hr-ui table.hr-table{width:100%; margin:0; border:0; border-collapse:collapse; border-spacing:0; background:var(--hr-surface); font-size:var(--hr-fs-sm); table-layout:auto;}
.hr-ui table.hr-table th{position:sticky; top:0; z-index:1; padding:6px 10px; border:0; background:var(--hr-teal); color:#fff; font-size:var(--hr-fs-sm); font-weight:700; line-height:16px; letter-spacing:0.02em; text-transform:none; text-align:left; vertical-align:bottom;}
.hr-ui table.hr-table td{padding:7px 10px; border:0; border-bottom:1px solid var(--hr-row); background:var(--hr-surface); color:var(--hr-ink); font-size:var(--hr-fs-sm); vertical-align:top;}
.hr-ui table.hr-table tr:last-child td{border-bottom:0;}
.hr-ui table.hr-table td.hr-middle, .hr-ui table.hr-table th.hr-middle{vertical-align:middle;}
.hr-ui table.hr-table th.n, .hr-ui table.hr-table td.n{text-align:right; font-variant-numeric:tabular-nums;}
.hr-ui table.hr-table th.c, .hr-ui table.hr-table td.c{text-align:center;}
.hr-ui table.hr-table td.n{white-space:nowrap;}
.hr-ui table.hr-table td small{display:block; margin-top:1px; color:var(--hr-text-2); font-size:var(--hr-fs-xs);}
.hr-ui table.hr-table tfoot td{font-weight:700; background:var(--hr-tint); border-top:2px solid var(--hr-border-input);}
.hr-ui table.hr-table td.hr-empty-cell{color:var(--hr-text-2); text-align:center; padding:16px 10px;}
/* sticky first column (wide tables): opaque background so scrolled cells do not show through */
.hr-ui table.hr-table th.hr-sticky-col, .hr-ui table.hr-table td.hr-sticky-col{position:sticky; left:0;}
.hr-ui table.hr-table th.hr-sticky-col{z-index:3;}
.hr-ui table.hr-table td.hr-sticky-col{z-index:2; background:var(--hr-surface); box-shadow:1px 0 0 var(--hr-border);}
.hr-ui table.hr-table tbody tr:hover td{background:var(--hr-tint);}
.hr-ui a.hr-link, .hr-ui table.hr-table td a:not(.hr-btn){color:var(--hr-primary); font-weight:600; text-decoration:none;}
.hr-ui a.hr-link:hover, .hr-ui table.hr-table td a:not(.hr-btn):hover{color:var(--hr-primary-hover); text-decoration:underline;}
.hr-ui .hr-table-actions{display:flex; gap:6px; flex-wrap:wrap; align-items:center;}
.hr-ui .hr-table-actions form{margin:0; display:inline-flex;}

/* ---------- badges: neutral shape; status colours stay page-specific (set as inline / page classes) ---------- */
.hr-ui .hr-badge{display:inline-flex; align-items:center; gap:4px; padding:1px 8px; border-radius:999px; background:var(--hr-border); color:var(--hr-label); font-size:var(--hr-fs-xs); font-weight:600; line-height:16px; white-space:nowrap; vertical-align:middle;}

/* ---------- notices: shape from the system, problem colours kept as before ---------- */
.hr-ui .hr-notice{margin:0 0 12px 0; padding:10px 12px; border:1px solid var(--hr-border); border-left:4px solid var(--hr-accent); border-radius:var(--hr-r-md); background:var(--hr-primary-tint); color:var(--hr-ink); font-size:var(--hr-fs-md); line-height:1.4;}
.hr-ui .hr-notice p{margin:0;}
.hr-ui .hr-notice p + p{margin-top:6px;}
.hr-ui .hr-notice--ok{border-color:#b8e6c4; border-left-color:#00a32a; background:#edfaef; color:#0f5132;}
.hr-ui .hr-notice--error{border-color:#f5c2c7; border-left-color:#d63638; background:#fcf0f1; color:#721c24;}
.hr-ui .hr-notice--warn{border-color:#f5e3a3; border-left-color:#dba617; background:#fcf9e8; color:#5c4400;}

/* ---------- progress bar (fill = bright blue; .marq = running bar when the length is unknown) ---------- */
.hr-ui .hr-progress{position:relative; height:16px; overflow:hidden; border-radius:999px; background:var(--hr-border);}
.hr-ui .hr-progress-fill{height:100%; width:0; background:var(--hr-accent); transition:width .4s ease;}
.hr-ui .hr-progress-fill.marq{position:absolute; top:0; left:-30%; width:30% !important; transition:none; animation:hr-marq 1.3s ease-in-out infinite;}
.hr-ui .hr-progress-label{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:var(--hr-fs-xs); font-weight:700; color:var(--hr-ink); text-shadow:0 1px 0 rgba(255,255,255,0.8);}
@keyframes hr-marq{0%{left:-30%;} 100%{left:100%;}}

/* ---------- collapsible sections: <details class="hr-details"> with a chevron button that turns when open ---------- */
.hr-ui details.hr-details{margin-top:12px; padding:0 12px; border:1px solid var(--hr-border); border-radius:var(--hr-r-md); background:var(--hr-tint);}
.hr-ui details.hr-details[open]{padding-bottom:12px;}
.hr-ui details.hr-details > summary{display:flex; align-items:center; gap:10px; padding:10px 0; list-style:none; cursor:pointer; user-select:none;
    font-size:var(--hr-fs-sm); font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:var(--hr-ink);}
.hr-ui details.hr-details > summary::-webkit-details-marker{display:none;}
.hr-ui details.hr-details > summary::marker{content:'';}
.hr-ui details.hr-details > summary::before, .hr-ui .hr-collapse{content:''; flex:0 0 auto; display:inline-block; width:26px; height:26px; border:1px solid var(--hr-border-input); border-radius:var(--hr-r-sm);
    background:var(--hr-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232570AB' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5.5l6.5 6.5L9 18.5'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
    transition:transform .15s, border-color .15s, background-color .15s;}
.hr-ui details.hr-details[open] > summary::before{transform:rotate(90deg);}
.hr-ui details.hr-details > summary:hover::before{border-color:var(--hr-primary); background-color:var(--hr-primary-tint);}
.hr-ui details.hr-details > summary:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px; border-radius:var(--hr-r-sm);}
/* stand-alone collapse / expand button: <button class="hr-collapse" aria-expanded="false" aria-label="..."></button> */
.hr-ui button.hr-collapse{margin:0; padding:0; min-height:0; box-shadow:none; appearance:none; cursor:pointer; font-size:0; color:transparent;}
.hr-ui button.hr-collapse[aria-expanded="true"], .hr-ui [aria-expanded="true"] > .hr-collapse{transform:rotate(90deg);}
/* chevron inside a clickable header (<button aria-expanded> ... <span class="hr-collapse"></span>) */
.hr-ui span.hr-collapse{vertical-align:middle;}
.hr-ui button.hr-collapse:hover, .hr-ui button:hover > .hr-collapse{border-color:var(--hr-primary); background-color:var(--hr-primary-tint);}
.hr-ui button.hr-collapse:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px;}

/* ---------- modal: overlay + box (shown / hidden by each page's script) ---------- */
.hr-ui .hr-modal{position:fixed; inset:0; z-index:100000; overflow-y:auto; padding:40px 16px; background:rgba(17,24,39,0.5);}
.hr-ui .hr-modal-box{position:relative; width:100%; max-width:560px; margin:0 auto; padding:20px; border:1px solid var(--hr-border); border-radius:var(--hr-r-lg); background:var(--hr-surface); color:var(--hr-ink); font-family:var(--hr-font); font-size:var(--hr-fs-md); text-align:left;}
.hr-ui .hr-modal-box--wide{max-width:760px;}
.hr-ui .hr-modal-box .hr-heading, .hr-ui .hr-modal-box > h2, .hr-ui .hr-modal-box > h3{margin:0 40px 16px 0;}
.hr-ui .hr-modal-close{position:absolute; top:12px; right:12px; display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; margin:0; padding:0; border:1px solid var(--hr-border-input); border-radius:var(--hr-r-sm); background:var(--hr-surface); color:var(--hr-label); font-size:var(--hr-fs-lg); font-weight:400; line-height:1; cursor:pointer; box-shadow:none; appearance:none;}
.hr-ui .hr-modal-close:hover{border-color:var(--hr-primary); background:var(--hr-primary-tint); color:var(--hr-primary);}
.hr-ui .hr-modal-close:focus-visible{outline:2px solid var(--hr-accent); outline-offset:2px;}
.hr-ui .hr-modal-actions{display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin:16px 0 0 0;}

/* ---------- toast (bottom centre, role="status") ---------- */
.hr-ui .hr-toast{position:fixed; left:50%; bottom:24px; z-index:100001; transform:translateX(-50%); max-width:calc(100% - 32px); padding:10px 16px; border:1px solid var(--hr-border); border-left:4px solid var(--hr-accent); border-radius:var(--hr-r-md); background:var(--hr-surface); color:var(--hr-ink); font-family:var(--hr-font); font-size:var(--hr-fs-md); line-height:1.4;}
.hr-ui .hr-toast--ok{border-left-color:#00a32a;}
.hr-ui .hr-toast--error{border-left-color:#d63638;}

/* ---------- drop zone (file upload) ---------- */
.hr-ui .hr-drop{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:20px 16px; border:1px dashed var(--hr-border-input); border-radius:var(--hr-r-md); background:var(--hr-tint); color:var(--hr-text-2); font-size:var(--hr-fs-sm); text-align:center; cursor:pointer; transition:border-color .15s, background-color .15s;}
.hr-ui .hr-drop:hover, .hr-ui .hr-drop.over{border-color:var(--hr-accent); background:var(--hr-primary-tint);}

/* ---------- avatar ---------- */
.hr-ui .hr-avatar{display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:40px; height:40px; overflow:hidden; border:1px solid var(--hr-border); border-radius:50%; background:var(--hr-teal); color:#fff; font-size:var(--hr-fs-md); font-weight:700; object-fit:cover;}
.hr-ui .hr-avatar--lg{width:72px; height:72px; font-size:var(--hr-fs-xl);}

/* ---------- toggle switch: <label class="hr-switch"><input type="checkbox" role="switch"><span></span></label> ---------- */
.hr-ui .hr-switch{position:relative; display:inline-flex; align-items:center; flex:0 0 auto; width:36px; height:20px; margin:0; vertical-align:middle; cursor:pointer;}
.hr-ui .hr-switch input{position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer;}
.hr-ui .hr-switch span{position:absolute; inset:0; border-radius:999px; background:var(--hr-border-input); transition:background-color .15s; pointer-events:none;}
.hr-ui .hr-switch span::before{content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition:transform .15s;}
.hr-ui .hr-switch input:checked + span{background:var(--hr-primary);}
.hr-ui .hr-switch input:checked + span::before{transform:translateX(16px);}
.hr-ui .hr-switch input:focus-visible + span{outline:2px solid var(--hr-accent); outline-offset:2px;}

/* ---------- empty state ---------- */
.hr-ui .hr-empty{padding:24px 16px; color:var(--hr-text-2); font-size:var(--hr-fs-sm); text-align:center;}

/* checkboxes / radios in the brand blue; screen-reader-only text */
.hr-ui input[type="checkbox"], .hr-ui input[type="radio"]{accent-color:var(--hr-primary);}
.hr-ui .hr-sr{position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}

/* button group in a form row */
.hr-ui .hr-btn-row{display:flex; gap:8px; flex-wrap:wrap; align-items:center;}

/* no chevron / bar animation for people who ask for less motion */
@media (prefers-reduced-motion:reduce){
    .hr-ui details.hr-details > summary::before, .hr-ui .hr-collapse, .hr-ui .hr-btn, .hr-ui .hr-tab, .hr-ui .hr-pill, .hr-ui .hr-progress-fill, .hr-ui .hr-switch span, .hr-ui .hr-switch span::before, .hr-ui .hr-drop{transition:none;}
}

/* ---------- narrower screens ---------- */
@media (max-width:1100px){
    .hr-ui .hr-grid-tiles{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));}
}

/* ---------- mobile ---------- */
@media (max-width:768px){
    .hr-ui{--hr-ctrl-h:44px;}
    .hr-ui .hr-card{padding:12px;}
    .hr-ui .hr-form{flex-direction:column; align-items:stretch;}
    .hr-ui .hr-grid-2{grid-template-columns:minmax(0,1fr);}
    .hr-ui .hr-input{width:100%; font-size:16px;} /* 16px: no iOS zoom on focus */
    .hr-ui .hr-btn{font-size:16px;}
    .hr-ui .hr-btn--sm{height:44px; font-size:14px;}
    .hr-ui .hr-btn--link{height:auto;}
    .hr-ui .hr-input--sm{height:44px; font-size:16px;}
    .hr-ui .hr-btn--stack{height:auto; min-height:44px;}
    .hr-ui .hr-tab{height:44px; font-size:14px;}
    .hr-ui .hr-pill{height:44px; padding:0 14px; font-size:14px;}
    .hr-ui details.hr-details{padding:0 8px;} /* less nested padding: more room for the tables inside */
    .hr-ui details.hr-details[open]{padding-bottom:8px;}
    .hr-ui details.hr-details > summary{padding:12px 0;}
    .hr-ui input[type="checkbox"], .hr-ui input[type="radio"]{width:20px; height:20px;}
    .hr-ui .hr-btn-row{flex-direction:column; align-items:stretch;} /* form buttons full width */
    .hr-ui .hr-btn-row .hr-btn{width:100%;}
    .hr-ui details.hr-details > summary::before, .hr-ui .hr-collapse{width:32px; height:32px;}
    .hr-ui button.hr-collapse{width:44px; height:44px;}
    .hr-ui .hr-icon-btn, .hr-ui .hr-modal-close{width:44px; height:44px;}
    .hr-ui .hr-modal{padding:12px 8px;}
    .hr-ui .hr-modal-box{padding:16px;}
    .hr-ui .hr-modal-actions{flex-direction:column-reverse; align-items:stretch;}
    .hr-ui .hr-modal-actions .hr-btn{width:100%;}
    .hr-ui .hr-switch{width:44px; height:24px;}
    .hr-ui .hr-switch span::before{width:20px; height:20px;}
    .hr-ui .hr-switch input:checked + span::before{transform:translateX(20px);}
}
