/* My HR (public/myhr.html, public/myhr.js): an employee's own pages. Built on styles.css's tokens, so light and dark follow it. */
.mh-tabs { position: sticky; top: 0; z-index: 5; }
.myhr-page { padding-top: var(--s5); padding-bottom: var(--s7); }
.mh-tab[hidden] { display: none; }
.mh-h3 { margin: 0; font-size: 15px; font-weight: 600; }
.mh-more { font-size: 13px; }
.mh-gap { margin-top: var(--s4); }
.mh-inline { display: flex; flex-wrap: wrap; gap: var(--s2); }
.mh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.mh-stat { display: grid; gap: 2px; padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); }
.mh-stat:hover { border-color: var(--field-line); }
.mh-stat b { font-size: 28px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mh-stat span { font-size: 14px; }
.mh-stat small { font-size: 12.5px; }
.mh-quick { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.mh-quick a.btn { text-decoration: none; }
.mh-mini, .mh-alerts, .mh-ids { list-style: none; margin: 0; padding: 0; }
.mh-mini > li, .mh-ids > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--s3); padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mh-mini > li:first-child, .mh-ids > li:first-child, .mh-alerts > li:first-child { border-top: 0; padding-top: 0; }
.mh-ids > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.mh-ids > li > b { grid-column: 1; font-weight: 600; }
.mh-ids > li > .muted { grid-column: 1; font-size: 13px; }
.mh-ids > li > .mh-pill { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.mh-alerts > li { padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mh-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: var(--r-pill); background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.mh-pill.ok { background: var(--ok-bg); color: var(--ok); } .mh-pill.warn { background: var(--warn-bg); color: var(--warn); } .mh-pill.bad { background: var(--bad-bg); color: var(--bad); }
/* apply */
.mh-group { margin-bottom: var(--s5); }
.mh-group-h { margin: 0 0 var(--s2); font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.mh-type { display: grid; gap: 4px; padding: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); min-height: 84px; }
.mh-type:hover { border-color: var(--accent); }
.mh-type b { font-weight: 600; }
.mh-type .muted { font-size: 13px; }
.mh-form { max-width: 720px; }
.mh-route { margin: -8px 0 var(--s4); font-size: 13px; }
.mh-field { display: grid; gap: 4px; margin-bottom: var(--s3); min-width: 0; }
.mh-field[hidden], .mh-noc-travel[hidden], .mh-noc-other[hidden] { display: none; }
.mh-field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mh-field input:not([type=checkbox]), .mh-field select, .mh-field textarea { width: 100%; }
.mh-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 var(--s3); }
.mh-help { margin: 2px 0 0; font-size: 12.5px; }
.mh-calc { margin: -4px 0 var(--s3); font-size: 13px; min-height: 1em; }
.mh-box { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); background: var(--accent-soft); border-radius: var(--r-md); font-size: 14px; }
.mh-err { color: var(--bad); font-size: 13.5px; margin: var(--s2) 0 0; min-height: 0; }
.mh-err:empty { display: none; }
/* requests */
.mh-req { margin-bottom: var(--s3); }
.mh-req.mh-flash { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mh-req-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.mh-req-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.mh-sub { margin: 2px 0 0; font-size: 12.5px; }
.mh-who { margin: var(--s2) 0 0; font-size: 14px; }
.mh-kv { margin-top: var(--s3); }
.mh-files { margin: var(--s2) 0 0; font-size: 13px; }
.mh-steps { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 0; }
.mh-steps > li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: var(--s2); position: relative; padding-bottom: var(--s2); font-size: 13.5px; }
.mh-steps > li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.mh-steps > li > span:last-child { display: grid; }
.mh-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; background: var(--panel); border: 2px solid var(--line); box-sizing: border-box; }
.mh-steps .approved .mh-dot { background: var(--ok); border-color: var(--ok); }
.mh-steps .rejected .mh-dot { background: var(--bad); border-color: var(--bad); }
.mh-steps .waiting .mh-dot { border-color: var(--warn); background: var(--warn-bg); }
.mh-note { font-size: 13px; color: var(--ink-2); }
.mh-note.bad { color: var(--bad); font-weight: 500; }
.mh-note.warn { color: var(--warn); }
.mh-result { margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-radius: var(--r-md); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.mh-result.ok { background: var(--ok-bg); } .mh-result.bad { background: var(--bad-bg); color: var(--bad); }
.mh-result a.btn { text-decoration: none; }
/* documents */
.mh-search { width: 100%; max-width: 420px; margin-bottom: var(--s4); }
.mh-docsec { margin-bottom: var(--s3); }
.myhr .myhr-acts { margin-top: 0; }
/* dialogs */
.mh-dlg { display: grid; gap: var(--s2); padding: var(--s5); }
.mh-dlg h3 { margin: 0; font-size: 16px; }
.mh-dlg label { font-size: 13px; font-weight: 600; }
@media (max-width: 760px) {
  .mh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mh-stat b { font-size: 24px; }
  .mh-req-head { flex-direction: column; }
}
#erType { width: auto; max-width: 220px; }
