/* HR module extras. Everything else comes from app.css. */

/* timesheet grid: one row per project, one column per day */
.hr-ts-wrap{max-height:70vh}
.hr-ts{font-size:.85rem;border-collapse:separate;border-spacing:0}
.hr-ts th,.hr-ts td{padding:4px 5px;vertical-align:middle;text-align:center}
.hr-ts thead th{position:sticky;top:0;z-index:2;background:var(--surface);white-space:nowrap;font-size:.74rem;line-height:1.2}
.hr-ts .hr-ts-proj{position:sticky;left:0;z-index:1;background:var(--surface);text-align:left;min-width:150px;max-width:220px;white-space:normal;font-weight:600;border-right:1px solid var(--line)}
.hr-ts thead .hr-ts-proj{z-index:3}
.hr-ts input.hr-h{width:44px;padding:4px 3px;text-align:center;min-height:32px}
.hr-ts .is-weekend{background:var(--surface-2)}
.hr-ts .is-holiday,.hr-ts .is-locked{background:var(--surface-3);color:var(--muted)}
.hr-ts tfoot th,.hr-ts tfoot td{font-variant-numeric:tabular-nums;background:var(--surface-2)}
.hr-ts tfoot .hr-ts-proj{background:var(--surface-2)}
.hr-ts [data-col-total].is-short,.hr-ts [data-col-total].is-zero{background:var(--warn-bg);color:var(--warn)}
.hr-ts [data-col-total].over{color:var(--bad)}
.hr-ts [data-row-total],.hr-ts [data-grand-total]{font-weight:700;font-variant-numeric:tabular-nums}
.hr-ts .hr-ts-leave td{color:var(--muted);font-size:.78rem}
.hr-ts tr.hr-clocked td,.hr-ts tr.hr-clocked th{color:var(--muted);font-weight:400;font-size:.78rem}

/* onboarding */
.hr-task .hr-check{display:inline-grid;place-items:center;width:20px;height:20px;border:1.5px solid var(--line-2);border-radius:5px;margin-right:6px;font-size:.8rem;vertical-align:-4px}
.hr-task.done .hr-check{background:var(--ok);border-color:var(--ok);color:#fff}
.hr-task.done b{color:var(--muted);text-decoration:line-through}
.hr-task form input[type=file]{max-width:220px}
.hr-onb td{padding:6px 8px}

/* recruitment */
.hr-stars{color:#c99400;letter-spacing:1px}
select.hr-mini{padding:3px 6px;font-size:.78rem;width:100%}
.hr-fieldset{border:0;padding:0;margin:0;gap:8px}

/* letters */
.hr-editable{outline:1px dashed transparent;outline-offset:4px;border-radius:2px}
.hr-editable[contenteditable=true]:hover{outline-color:var(--line-2)}
.hr-editable[contenteditable=true]:focus{outline:2px dashed var(--brand)}
.hr-template-letter{min-height:auto;width:100%;padding:14px 18px;box-shadow:none;border:1px solid var(--line)}
.hr-template-letter .lh-body{padding:0;min-height:300px}
.hr-code{font-family:var(--f-mono);font-size:.82rem;min-height:70px}
.hr-ph{list-style:none;margin:0;padding:0;columns:2;font-size:.82rem;line-height:1.9}
.letter .sig{page-break-inside:avoid}

/* attendance */
.hr-clock .hr-clock-hours{margin:.2rem 0 .6rem;font-size:1.05rem}
.hr-clock .hr-clock-hours b{font-size:1.6rem;font-variant-numeric:tabular-nums}
.hr-clock.is-in{border-top:3px solid var(--ok)}
.hr-clock-btn{font-size:1.05rem;padding:12px}
.hr-att th,.hr-att td{vertical-align:top}
.hr-att tr.is-weekend td,.hr-att tr.is-weekend th,.hr-att th.is-weekend{background:var(--surface-2)}
.hr-att tr.is-holiday td,.hr-att tr.is-holiday th,.hr-att th.is-holiday{background:var(--warn-bg)}

/* leave calendar */
.hr-cal{font-size:.8rem}
.hr-cal th,.hr-cal td{padding:4px 5px;text-align:center;min-width:24px}
.hr-cal tbody th{text-align:left;position:sticky;left:0;background:var(--surface);z-index:1}
.hr-cal .is-weekend{background:var(--surface-2)}
.hr-cal .is-holiday{background:var(--warn-bg)}
.hr-cal td.on-leave{color:var(--brand);font-weight:700}
.hr-cal td.on-leave.pending{opacity:.45}

/* CTC table (also printed inside letters) */
.hr-ctc{width:100%;border-collapse:collapse;font-size:.92rem;margin:10px 0}
.hr-ctc th,.hr-ctc td{padding:6px 10px;border-bottom:1px solid var(--line, #dde1ea);text-align:left}
.hr-ctc .num{text-align:right;font-variant-numeric:tabular-nums}
.hr-ctc tr.sub td{font-weight:600;background:rgba(0,0,0,.03)}
.hr-ctc tr.total td{font-weight:700;border-top:2px solid currentColor}

/* public careers page */
body.hr-careers{--brand:#1d2341;--gold:#c99a2e;background:#f6f4ee}
.hr-group-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#1d2341;color:#fff;padding:12px 18px;border-radius:10px;border-bottom:3px solid #c99a2e}
.hr-group-mark{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}
.hr-group-mark small{display:block;color:#c99a2e;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}
.hr-group-logo{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#c99a2e;color:#1d2341;font-weight:800}
.hr-group-site{color:#e9dcc0;font-size:.85rem}
.hr-careers-hero h1{color:#1d2341;margin-bottom:.3rem}
.hr-careers-hero p{color:var(--muted);margin:0}
.hr-careers-filter select{max-width:320px}
.hr-job-company{font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#a07a1f}
body.hr-careers .btn-primary{background:#1d2341;border-color:#1d2341}
body.hr-careers .plain-wrap{justify-content:flex-start;padding-top:40px}
body.hr-careers .plain-wrap>.flash{max-width:820px}
.hr-careers-wrap{width:100%;max-width:820px;display:flex;flex-direction:column;gap:20px}
.hr-careers-head{display:flex;gap:18px;align-items:center;padding-bottom:16px;border-bottom:3px solid #c99a2e}
.hr-careers-head h1{color:var(--brand)}
.hr-careers-logo{max-height:64px;max-width:160px;object-fit:contain}
.hr-job-card{display:flex;flex-direction:column;gap:4px;text-decoration:none;color:var(--ink);border-left:4px solid #c99a2e}
.hr-job-card:hover{box-shadow:var(--shadow)}
.hr-job-card strong{font-size:1.08rem;color:var(--brand)}
.hr-job-cta{font-size:.85rem;color:var(--brand);font-weight:600;margin-top:4px}
.hr-hp{position:absolute!important;left:-10000px;width:1px;height:1px;overflow:hidden}
.rich ul{margin:0 0 .6rem;padding-left:1.3rem}

@media (max-width:760px){
  .hr-careers-head{flex-direction:column;align-items:flex-start}
  .hr-ph{columns:1}
  .hr-group-site{display:none}
}
@media print{.no-print{display:none!important}}

/* ---------------- shared bits */
.hr-pad{padding:16px 20px 0}
.card-head.hr-pad{margin-bottom:8px}
p.hr-pad{padding:0 20px 8px;margin:0}
.hr-overdue{color:var(--bad)}
.hr-cb{width:34px;text-align:center}
.hr-bulkbar{margin:0 0 10px;align-items:center}
.hr-sticky{max-height:75vh}
.hr-sticky thead th{position:sticky;top:0;z-index:1;background:var(--surface)}
.hr-addrow td{background:var(--surface-2)}
.hr-ul{margin:0;padding-left:1.1rem;display:flex;flex-direction:column;gap:6px}
img.avatar.hr-photo{object-fit:cover;padding:0;background:var(--surface-2)}
kbd{font-family:var(--f-mono);font-size:.8em;border:1px solid var(--line-2);border-bottom-width:2px;border-radius:4px;padding:0 4px}

/* ---------------- home */
.hr-banner{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink)}
.hr-banner > span:nth-child(2){flex:1}
.hr-quick{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.hr-quick a,.hr-quick button{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:84px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);
  color:var(--ink);text-decoration:none;font:600 .9rem var(--f);cursor:pointer;box-shadow:var(--shadow-sm);text-align:left}
.hr-quick a:hover,.hr-quick button:hover{border-color:var(--accent);box-shadow:var(--shadow)}
.hr-quick .ico{color:var(--accent)}
.hr-todo > a{align-items:center}
.hr-todo-ico{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--accent);flex:none}
.hr-bal{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
.hr-bal > div{border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;background:var(--surface)}
.hr-bal b{font-size:1.4rem;font-variant-numeric:tabular-nums;line-height:1.1}
.hr-bal span{font-size:.82rem;font-weight:600}
.hr-bal small{color:var(--muted);font-size:.75rem}
.hr-bal-lg > div{padding:14px 16px;box-shadow:var(--shadow-sm)}
.hr-setup .card-head h2{display:flex;align-items:center;gap:8px}
.hr-setup-list{margin-top:12px}
.hr-setup-list li{align-items:flex-start}
.hr-setup-list li.is-done{color:var(--muted)}
.hr-tick{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--line-2);flex:none;margin-top:1px}
.hr-setup-list li.is-done .hr-tick{background:var(--ok);border-color:var(--ok);color:#fff}
.hr-stats{margin-bottom:0}
.hr-cel .ico{vertical-align:-2px}

/* ---------------- approvals inbox */
.hr-inbox{display:flex;flex-direction:column;gap:10px}
.hr-req{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;padding:16px 18px}
.hr-req-main{display:flex;gap:12px;align-items:flex-start;flex:1;min-width:0}
.hr-req-main > input[type=checkbox]{margin-top:8px}
.hr-req-title{font-weight:600;margin:2px 0}
.hr-req-actions{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;justify-content:flex-end}
.hr-req-actions form{flex-wrap:nowrap;align-items:flex-end}
.hr-req-actions .field.compact input{width:150px}

/* ---------------- profile */
.hr-profile-head{display:flex;gap:20px;align-items:flex-start;margin-bottom:16px}
.hr-profile-head h1{margin:2px 0}
.hr-photo-wrap{position:relative;flex:none}
.hr-photo-edit{position:absolute;right:-4px;bottom:-4px;width:28px;height:28px;border-radius:50%;border:2px solid var(--surface);background:var(--accent);color:#fff;display:grid;place-items:center;cursor:pointer}
.hr-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px 18px;margin:14px 0 0}
.hr-facts dt{font-size:.74rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:650}
.hr-facts dd{margin:2px 0 0;overflow-wrap:anywhere}
.hr-profile-actions{flex-direction:column;align-items:stretch}
.hr-tabs{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap}
.hr-change-box{border-top:1px dashed var(--line-2);padding-top:14px;margin-top:6px}
.hr-task-edit summary{cursor:pointer;color:var(--muted);margin-top:6px}
.hr-personal .card-head{margin-bottom:8px}

/* ---------------- attendance month */
.hr-legend{display:flex;flex-wrap:wrap;gap:6px 12px;color:var(--muted)}
.hr-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.hr-month-h{font-size:.72rem;font-weight:650;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);text-align:center;padding:2px 0}
.hr-day{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:76px;padding:6px 7px;border:1px solid var(--line);border-radius:9px;
  background:var(--surface);font:inherit;text-align:left;color:var(--ink);overflow:hidden}
.hr-day.is-blank{border:0;background:none}
.hr-day.is-empty{background:var(--surface-2)}
.hr-day.is-today{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
button.hr-day.can-fix{cursor:pointer}
button.hr-day.can-fix:hover{border-color:var(--accent)}
.hr-day-n{font-size:.78rem;font-weight:700;color:var(--muted)}
.hr-day-h{font-size:.74rem;color:var(--muted);line-height:1.2;overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap}
.hr-day-req{font-size:.68rem;color:var(--warn);font-weight:600}
.hr-day-edit{font-size:.7rem}
.hr-day .pill{font-size:.68rem;padding:1px 6px}
.hr-pin{margin-left:4px;color:var(--muted)}

/* ---------------- leave */
.hr-quote{min-height:1.2em}
.hr-lt input,.hr-lt select{min-height:32px;padding:4px 6px;font-size:.84rem}
.hr-lt td{padding:5px 6px;white-space:nowrap}
.hr-cal .is-today{box-shadow:inset 0 -2px 0 var(--accent)}

/* ---------------- directory and org chart */
.hr-dir{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.hr-person{display:flex;flex-direction:column;gap:10px;padding:16px}
.hr-contact{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;color:var(--ink-2)}
.hr-contact li{display:flex;gap:6px;align-items:center;min-width:0;overflow-wrap:anywhere}
.hr-contact .ico{color:var(--muted)}
.hr-org,.hr-org ul{list-style:none;margin:0;padding:0}
.hr-org ul{padding-left:26px;border-left:2px solid var(--line);margin-left:16px}
.hr-org li{margin:8px 0}
.hr-org summary{list-style:none;cursor:pointer;display:inline-block}
.hr-org summary::-webkit-details-marker{display:none}
.hr-org details > summary .hr-node::before{content:"▸";color:var(--muted);margin-right:2px}
.hr-org details[open] > summary .hr-node::before{content:"▾"}
.hr-node{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-sm);max-width:100%}
.hr-node.is-me{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 25%,transparent)}
.hr-node-n{min-width:22px;height:22px;border-radius:11px;background:var(--surface-2);color:var(--muted);font-size:.72rem;font-weight:700;display:grid;place-items:center;padding:0 6px}
.hr-node-more{margin-left:4px}
.hr-flat{display:flex;flex-wrap:wrap;gap:8px}
.hr-flat li{margin:0}
.hr-org-card{overflow-x:auto}

/* ---------------- settings */
.hr-rules{display:grid;grid-template-columns:1fr;gap:16px}
.hr-rules select,.hr-rules input{min-height:32px;padding:4px 6px;font-size:.84rem}
.hr-rules td{white-space:nowrap;vertical-align:top}
.hr-rules td select{display:block;width:100%;min-width:170px}
.hr-rules td select+select{margin-top:6px}
.hr-rules td input:not([type=checkbox]){width:auto}
.hr-rules .check-inline{display:flex;margin-top:6px}
.hr-rules .cell-sub{display:block;margin-top:4px}

/* ---------------- recruitment */
.hr-board .ticket-card .pill{font-size:.68rem;padding:1px 6px}
.hr-board-empty{margin:4px}
.hr-week td{vertical-align:top;min-width:120px}
.hr-week th.is-today{color:var(--accent)}
.hr-slot{display:block;padding:6px 8px;margin-bottom:6px;border-radius:8px;background:color-mix(in srgb,var(--accent) 8%,var(--surface));text-decoration:none;color:var(--ink);font-size:.82rem}

/* ---------------- phones */
@media (max-width:640px){
  .hr-req{flex-direction:column}
  .hr-req-actions{justify-content:flex-start;width:100%}
  .hr-req-actions .btn{min-height:44px}
  .hr-quick{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hr-profile-head{flex-direction:column}
  .hr-profile-actions{flex-direction:row;flex-wrap:wrap}
  .hr-month{gap:3px}
  .hr-day{min-height:58px;padding:4px}
  .hr-day-h,.hr-day-req,.hr-day-edit{display:none}
  .hr-month-h{font-size:.62rem}
  .hr-rules{grid-template-columns:1fr}
  .hr-legend{font-size:.72rem}
  .btn{min-height:40px}
  .hr-ts .hr-ts-proj{min-width:110px}
}

/* grid children must be allowed to shrink so wide tables scroll inside their card instead of widening the page */
.split > *, .grid-2 > *, .stack-lg > * { min-width: 0; }

/* payroll and performance */
.hr-indent{margin-left:26px}
.hr-scroll{max-height:280px;overflow:auto}
pre.hr-code{white-space:pre-wrap;margin:0;min-height:0;background:transparent;border:0;padding:0}
.rows .progress{display:block;max-width:260px;margin-top:4px;height:6px}
#pay-lines tbody tr.muted td{color:var(--muted)}
/* View-only access (Perms: area set to View): hide every change control; the server refuses changes anyway */
.hr-readonly form[method=post],.hr-readonly form[method="POST"],.hr-readonly button[data-dialog],.hr-readonly a[data-dialog],.hr-readonly [data-edit-only]{display:none!important}
