/* HSEQ Hazara — clean, flat, Roboto only */

.hz, .hz-modal {
  --green: #1F7A4D;
  --green-d: #155B39;
  --green-50: #EDF6F0;
  --green-100: #D5EADD;
  --orange: #E8892B;
  --ink: #1B2420;
  --muted: #5F6B66;
  --line: #E3E8E5;
  --bg: #F6F8F7;
  --danger: #C4372C;
  --warn: #D99A1E;
  --info: #2F6FB2;
  --r: 10px;
  --font: "Roboto", Arial, sans-serif;
  font-family: var(--font);
  color: var(--ink);
}
.hz { font-size: 15px; line-height: 1.55; max-width: 1040px; margin: 28px auto 64px; box-sizing: border-box; }
.hz *, .hz *::before, .hz *::after, .hz-modal *, .hz-modal *::before, .hz-modal *::after { box-sizing: border-box; font-family: var(--font); }
.hz [hidden], .hz-modal [hidden] { display: none !important; }
.hz-loading { color: var(--muted); padding: 32px 0; }
.hz-muted { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- header ---------- */
.hz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.hz-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.hz .hz-title { font-family: var(--font); font-weight: 700; font-size: clamp(26px, 3.6vw, 34px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 6px; color: var(--ink); text-transform: none; }
.hz-intro { margin: 0; color: var(--muted); max-width: 62ch; }
.hz .hz-h3 { font-family: var(--font); font-size: 20px; font-weight: 700; margin: 0 0 2px; color: var(--ink); }
.hz-session { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; padding-top: 4px; }
.hz-session b { color: var(--ink); font-weight: 500; }
.hz-pill { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--green-50); color: var(--green-d); }

/* ---------- form ---------- */
.hz-sec { padding: 22px 0 8px; border-bottom: 1px solid var(--line); }
.hz-sec:last-of-type { border-bottom: 0; }
.hz .hz-sec-title { font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin: 0 0 14px; }
.hz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.hz-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hz-field.is-wide { grid-column: 1 / -1; }
.hz-label { font-weight: 500; font-size: 14px; color: var(--ink); margin: 0; }
.hz-req { color: var(--danger); }
.hz input[type=text], .hz input[type=date], .hz input[type=time], .hz input[type=number], .hz input[type=password], .hz input[type=search], .hz input[type=month], .hz select, .hz textarea,
.hz-modal input[type=text], .hz-modal input[type=password], .hz-modal textarea, .hz-modal select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid #CFD8D3; border-radius: var(--r); padding: 10px 12px; min-height: 44px; margin: 0;
  box-shadow: none; transition: border-color .15s, box-shadow .15s; line-height: 1.4;
}
.hz textarea, .hz-modal textarea { resize: vertical; min-height: 92px; }
.hz input:focus, .hz select:focus, .hz textarea:focus, .hz-modal input:focus, .hz-modal textarea:focus, .hz-modal select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 122, 77, .16); }
.hz input[readonly] { background: var(--bg); }
.hz-help { color: var(--muted); font-size: 12.5px; }
.hz-err { color: var(--danger); font-size: 12.5px; font-weight: 500; }
.hz-err:empty { display: none; }
.hz-field.has-err > input, .hz-field.has-err > select, .hz-field.has-err > textarea, .hz-field.has-err .hz-drop, .hz-field.has-err .hz-choices { border-color: var(--danger); }
.hz-field.has-err .hz-choices { border: 1px solid var(--danger); border-radius: var(--r); padding: 6px; }

.hz-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.hz-choice { position: relative; cursor: pointer; margin: 0; }
.hz-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hz-choice span { display: inline-block; padding: 9px 14px; border: 1px solid #CFD8D3; border-radius: 999px; font-size: 14px; background: #fff; transition: all .12s; user-select: none; }
.hz-choice input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.hz-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31, 122, 77, .25); }
.hz-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14px; margin: 0; }
.hz-switch input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }

.hz-drop { position: relative; border: 1.5px dashed #C6D1CB; border-radius: var(--r); padding: 18px; background: var(--bg); text-align: center; color: var(--muted); font-size: 14px; }
.hz-drop.is-over { border-color: var(--green); background: var(--green-50); }
.hz-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.hz-drop u { color: var(--green); }
.hz-files { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hz-files li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px 5px 10px; max-width: 100%; }
.hz-files li a { color: var(--green-d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.hz-files li button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; }
.hz-files li.is-new { background: var(--green-50); border-color: var(--green-100); }

/* repeatable rows */
.hz-rowset { display: flex; flex-direction: column; gap: 10px; }
.hz-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding: 14px 44px 14px 14px; background: var(--bg); border-radius: var(--r); }
.hz-row .hz-field.is-wide { grid-column: 1 / -1; }
.hz-row .hz-label { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.hz-row-no { position: absolute; left: -2px; top: -8px; font-size: 11px; font-weight: 500; color: var(--green-d); background: var(--green-50); border-radius: 999px; padding: 1px 7px; }
.hz-row-del { position: absolute; right: 8px; top: 8px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.hz-row-del:hover { background: #fff; color: var(--danger); }
.hz-add { align-self: flex-start; border: 1px dashed var(--green); color: var(--green-d); background: #fff; border-radius: var(--r); padding: 8px 14px; font-size: 14px; font-weight: 500; cursor: pointer; }
.hz-add:hover { background: var(--green-50); }

/* scores */
.hz-scoretable { width: 100%; border-collapse: collapse; font-size: 14px; }
.hz-scoretable td, .hz-scoretable th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.hz-scoretable th { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hz-scoretable input { max-width: 90px; min-height: 38px !important; padding: 6px 10px !important; }
.hz-scoretable tfoot td { font-weight: 700; border-bottom: 0; }

.hz-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 22px; }
.hz-btn {
  font-family: var(--font); font-weight: 500; font-size: 15px; letter-spacing: .01em; text-transform: none;
  background: var(--green); color: #fff; border: 0; border-radius: var(--r); padding: 11px 22px; min-height: 44px; cursor: pointer;
  transition: background .15s, transform .05s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2;
}
.hz-btn:hover { background: var(--green-d); color: #fff; }
.hz-btn:active { transform: translateY(1px); }
.hz-btn:focus-visible, .hz button:focus-visible, .hz a:focus-visible, .hz-modal button:focus-visible { outline: 3px solid rgba(31, 122, 77, .35); outline-offset: 2px; }
.hz-btn[disabled] { opacity: .55; cursor: progress; }
.hz-btn-ghost { background: #fff; color: var(--green-d); box-shadow: inset 0 0 0 1px #C6D1CB; }
.hz-btn-ghost:hover { background: var(--green-50); color: var(--green-d); }
.hz-btn-danger { background: var(--danger); }
.hz-btn-danger:hover { background: #9F2A21; }
.hz-btn-sm { font-size: 13.5px; padding: 7px 12px; min-height: 36px; }
.hz-link { background: none; border: 0; padding: 2px 0; color: var(--green-d); font: inherit; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hz-formmsg { margin: 0; font-weight: 500; font-size: 14px; }
.hz-formmsg.is-err { color: var(--danger); }
.hz-formmsg.is-ok { color: var(--green-d); }

.hz-editbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 14px; background: #FFF6E8; border: 1px solid #F3D9AE; border-radius: var(--r); font-size: 14px; }
.hz-lock { margin: 20px 0; padding: 20px; background: var(--bg); border-radius: var(--r); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hz-lock p { margin: 0; }
.hz-page.is-locked .hz-form { opacity: .35; pointer-events: none; user-select: none; }

.hz-done { padding: 36px 0; border-bottom: 1px solid var(--line); }
.hz-done-label { font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin: 0; }
.hz-ref { font-size: clamp(24px, 4vw, 34px); font-weight: 700; margin: 6px 0; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.hz-done-note { color: var(--muted); margin: 0 0 18px; }

/* ---------- records / report ---------- */
.hz-report, .hz-records { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.hz-report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hz-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hz-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 0; }
.hz-inline input, .hz-tools input[type=search], .hz-tools select { min-height: 36px !important; padding: 6px 10px !important; width: auto !important; font-size: 14px !important; }
.hz-tools input[type=search] { min-width: 220px; }

.hz-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 4px 0 18px; }
.hz-kpi { padding: 4px 18px 4px 0; }
.hz-kpi + .hz-kpi { padding-left: 18px; border-left: 1px solid var(--line); }
.hz-kpi .k { font-size: 12.5px; color: var(--muted); }
.hz-kpi .v { font-size: 30px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hz-kpi .v small { font-size: 14px; font-weight: 400; color: var(--muted); }

.hz-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hz-table th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 10px; white-space: nowrap; background: var(--bg); }
.hz-table td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
.hz-table tbody tr.is-click { cursor: pointer; }
.hz-table tbody tr.is-click:hover td { background: var(--green-50); }
.hz-table .nw { white-space: nowrap; }
.hz-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hz-table .ref { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hz-table .sum { color: var(--muted); max-width: 360px; }
.hz-table .sum b { color: var(--ink); font-weight: 500; display: block; }
.hz-table .acts { white-space: nowrap; text-align: right; }
.hz-table .acts button { margin-left: 6px; }
.hz-bar { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.hz-bar i { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; display: block; }
.hz-bar i b { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.hz-bar.lo i b { background: var(--danger); }
.hz-bar.mid i b { background: var(--warn); }
.hz-bar span { font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; font-weight: 500; }
.hz-chart { position: relative; height: 300px; margin: 6px 0 18px; }
.hz-chart.tall { height: 340px; }
.hz-empty { padding: 32px 0; color: var(--muted); text-align: left; }
.hz-empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }
.hz-pager { display: flex; gap: 14px; align-items: center; padding-top: 12px; color: var(--muted); font-size: 13px; }

.hz-st { font-size: 12.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.hz-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.hz-st.s-pending::before { background: var(--warn); }
.hz-st.s-closed::before { background: var(--green); }
.hz-st.s-progress::before { background: var(--info); }
.hz-st.s-info::before { background: #B8C2BD; }
.hz-late { color: var(--danger); font-weight: 500; }

/* ---------- modal ---------- */
.hz-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 30, 26, .45); font-size: 15px; line-height: 1.5; }
.hz-modal-in { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 14px; padding: 22px 22px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.2); animation: hzPop .16s ease-out; }
.hz-modal.is-wide .hz-modal-in { width: min(860px, 100%); }
.hz-modal.is-side { justify-content: flex-end; padding: 0; align-items: stretch; }
.hz-modal.is-side .hz-modal-in { width: min(580px, 100%); max-height: none; height: 100%; border-radius: 0; animation: hzSide .2s ease-out; }
@keyframes hzPop { from { transform: scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hzSide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hz-modal-in { animation: none !important; } }
.hz-modal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.hz-modal h3 { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.25; color: var(--ink); font-family: var(--font); }
.hz-modal .sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.hz-x { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; border-radius: 8px; }
.hz-x:hover { background: var(--bg); color: var(--ink); }
.hz-modal form { display: flex; flex-direction: column; gap: 12px; }
.hz-modal label { font-weight: 500; font-size: 14px; display: block; margin-bottom: 6px; }
.hz-modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.hz-listedit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.hz-listedit li { display: flex; gap: 6px; align-items: center; }
.hz-listedit li input { min-height: 38px !important; padding: 6px 10px !important; }
.hz-listedit li button { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-width: 34px; height: 36px; cursor: pointer; color: var(--muted); font-size: 15px; }
.hz-listedit li button:hover { color: var(--ink); background: var(--bg); }
.hz-listedit li button.del:hover { color: var(--danger); }
.hz-dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0 0 6px; font-size: 14px; }
.hz-dl dt { color: var(--muted); }
.hz-dl dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.hz-panel { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.hz-panel h4 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--green); font-family: var(--font); }
.hz-panel .hz-grid { gap: 12px 14px; }
.hz-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hz-thumbs a { display: flex; align-items: center; justify-content: center; width: 86px; height: 86px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px; color: var(--green-d); text-align: center; }
.hz-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.hz-log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.hz-log li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; }
.hz-log li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.hz-log time { font-size: 12px; color: var(--muted); display: block; }

/* ---------- portal ---------- */
.hz-portal { max-width: 1200px; }
.hz-login { max-width: 420px; }
.hz-login form { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.hz-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hz-who { font-size: 14px; color: var(--muted); }
.hz-who b { color: var(--ink); font-weight: 500; }
.hz-app { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; padding-top: 18px; }
.hz-tabs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hz-tabs li { margin: 0; }
.hz-tabs button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left;
  background: none; border: 0; border-radius: var(--r); padding: 10px 12px; cursor: pointer; color: var(--ink); font: inherit; font-size: 14.5px;
}
.hz-tabs button:hover { background: var(--bg); }
.hz-tabs button[aria-selected=true] { background: var(--green-50); color: var(--green-d); font-weight: 500; }
.hz-count { font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; min-width: 24px; text-align: center; }
.hz-count.has-late { color: #fff; background: var(--danger); border-color: var(--danger); }
.hz-tabs .hz-sep { height: 1px; background: var(--line); margin: 8px 4px; }
.hz-chips { display: inline-flex; background: var(--bg); border-radius: var(--r); padding: 3px; gap: 2px; }
.hz-chips button { background: transparent; border: 0; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.hz-chips button[aria-pressed=true] { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.hz-mh-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; align-items: end; padding: 6px 0 20px; border-bottom: 1px solid var(--line); }
.hz-mh-form .hz-wf { grid-column: 1 / -1; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin: 6px 0 -6px; }

/* ---------- dashboard ---------- */
.hz-dash { max-width: 1200px; }
.hz-period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hz-period select { width: auto !important; min-height: 38px !important; padding: 6px 10px !important; }
.hz-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 8px; }
.hz-tile { background: var(--bg); border-radius: 12px; padding: 16px 16px 14px; min-width: 0; }
.hz-tile .k { font-size: 13px; color: var(--muted); }
.hz-tile .v { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.hz-tile .s { font-size: 12.5px; color: var(--muted); }
.hz-tile.is-key { background: var(--green); color: #fff; }
.hz-tile.is-key .k, .hz-tile.is-key .s { color: rgba(255,255,255,.8); }
.hz .hz-block-title { font-size: 16px; font-weight: 700; margin: 30px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--font); color: var(--ink); }
.hz-block-title small { font-weight: 400; color: var(--muted); font-size: 13px; }
.hz-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hz-wfcol { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.hz-wfcol h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; font-family: var(--font); }
.hz-wfgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.hz-wfgrid .k { font-size: 12px; color: var(--muted); }
.hz-wfgrid .v { font-weight: 700; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hz-wfgrid .v.good { color: var(--green); }
.hz-charts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; }
.hz-hbars { list-style: none; margin: 0; padding: 0; }
.hz-hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 7px 0; font-size: 14px; }
.hz-hbars .bar { grid-column: 1 / -1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.hz-hbars .bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.hz-hbars li:first-child .bar i { background: var(--orange); }
.hz-actions-table td.num b { color: var(--danger); font-weight: 500; }
.hz-note { font-size: 12.5px; color: var(--muted); margin-top: 18px; }

/* ---------- print ---------- */
@media print {
  body * { visibility: hidden !important; }
  .hz-print, .hz-print * { visibility: visible !important; }
  .hz-print { position: absolute; left: 0; top: 0; width: 100%; margin: 0; }
  .hz-print .hz-tools, .hz-print .acts { display: none !important; }
  .hz-chart canvas { max-width: 100% !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hz-app { grid-template-columns: 1fr; }
  .hz-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .hz-tabs button { white-space: nowrap; }
  .hz-tabs .hz-sep { display: none; }
  .hz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hz-charts, .hz-split { grid-template-columns: 1fr; }
  .hz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .hz-kpi:nth-child(3) { padding-left: 0; border-left: 0; }
  .hz-table .hide-sm { display: none; }
  .hz-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hz { margin-top: 16px; }
  .hz-head { flex-direction: column; }
  .hz-grid, .hz-mh-form, .hz-row { grid-template-columns: 1fr; }
  .hz-dl { grid-template-columns: 1fr; gap: 2px; }
  .hz-dl dd { margin-bottom: 8px; }
  .hz-actions .hz-btn { width: 100%; }
  .hz-actions { flex-direction: column; align-items: stretch; }
  .hz-tools input[type=search] { min-width: 0; width: 100% !important; }
}

/* ================= v0.3 components ================= */
.hz-page.is-quiet[hidden] { display: none !important; }
.hz-x { max-width: 1200px; }
.hz-btn-light { background: #fff; color: var(--green-d); border-color: #fff; }
.hz-btn-light:hover { background: var(--green-50); color: var(--green-d); }
.hz-prose p { margin: 0 0 10px; }
.hz-tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.hz-tag.ok { background: var(--green-50); color: var(--green-d); }
.hz-tag.bad { background: #FBE9E7; color: var(--danger); }
.hz-table tr.is-click { cursor: pointer; }
.hz-table tr.is-click:hover td { background: var(--green-50); }

/* stat buttons (benchmark, work permit results) */
.hz-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.hz-stat { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 12px; background: var(--bg); border: 2px solid transparent; font-family: var(--font); }
.hz-stat .v { font-size: 32px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.hz-stat .k { font-size: 13px; color: var(--muted); }
.hz-stat.s-all .v { color: var(--ink); }
.hz-stat.s-done .v { color: var(--green); }
.hz-stat.s-prog .v { color: var(--info); }
.hz-stat.s-pend .v { color: var(--warn); }
.hz-stat.s-fail .v { color: var(--danger); }
.hz-stat:hover { border-color: var(--line); }
.hz-stat.is-on { border-color: var(--green); background: #fff; }
.hz-stat:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* event calendar */
.hz-caltools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; background: var(--bg); border-radius: 10px; margin: 10px 0; }
.hz-caltools input[type=text] { min-width: 220px; }
.hz-caltools .sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; padding: 0; margin-left: 4px; }
.hz-cal-year { text-align: center; font-size: 18px; font-weight: 700; margin: 14px 0 8px; }
.hz-cal { border-collapse: collapse; width: 100%; min-width: 1100px; font-size: 12.5px; table-layout: fixed; }
.hz-cal th, .hz-cal td { border: 1px solid #CFD8D3; padding: 6px 5px; text-align: center; vertical-align: middle; height: 34px; overflow-wrap: anywhere; }
.hz-cal thead th { background: var(--green); color: #fff; font-weight: 500; }
.hz-cal th.q { background: var(--green-50); color: var(--green-d); font-weight: 700; width: 70px; }
.hz-cal td[tabindex] { cursor: pointer; }
.hz-cal td.is-sel { outline: 2px solid var(--orange); outline-offset: -2px; }

/* work permit test */
.hz-choice-lg span { padding: 14px 22px; font-size: 16px; font-weight: 500; }
.hz-wpbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 3; }
.hz-wptime { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green-d); background: var(--green-50); padding: 4px 14px; border-radius: 10px; }
.hz-wptime.is-low { color: #fff; background: var(--danger); }
.hz-progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0 20px; }
.hz-progress i { display: block; height: 100%; background: var(--green); transition: width .2s; }
.hz-q { border: 0; padding: 0; margin: 0; }
.hz-q legend { font-size: 19px; font-weight: 500; line-height: 1.45; margin-bottom: 16px; padding: 0; }
.hz-opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.hz-opt:hover { border-color: var(--green); }
.hz-opt input { position: absolute; opacity: 0; pointer-events: none; }
.hz-opt .l { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-weight: 700; color: var(--muted); }
.hz-opt.is-on { border-color: var(--green); background: var(--green-50); }
.hz-opt.is-on .l { background: var(--green); color: #fff; }
.hz-opt:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.hz-wpnav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; }
.hz-qmap { display: flex; flex-wrap: wrap; gap: 6px; }
.hz-qmap button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; color: var(--muted); font-family: var(--font); }
.hz-qmap button.is-done { background: var(--green-50); border-color: var(--green-100); color: var(--green-d); }
.hz-qmap button.is-cur { border: 2px solid var(--green); color: var(--ink); font-weight: 700; }
.hz-wpres { text-align: center; padding: 40px 20px; margin-top: 18px; border-radius: 14px; background: var(--green-50); }
.hz-wpres.is-fail { background: #FBE9E7; }
.hz-wpres .hz-ref { font-size: 56px; font-weight: 700; margin: 6px 0; color: var(--green-d); }
.hz-wpres.is-fail .hz-ref, .hz-wpres.is-fail .hz-done-label { color: var(--danger); }

/* document libraries */
.hz-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 14px 0 24px; }
.hz-doc { position: relative; }
.hz-doc a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14.5px; line-height: 1.35; background: #fff; transition: border-color .15s, box-shadow .15s; }
.hz-doc a:hover { border-color: var(--green); box-shadow: 0 4px 14px rgba(21,91,57,.1); }
.hz-doc svg { flex: none; color: var(--green); }
.hz-doc.k-pdf svg { color: var(--danger); }
.hz-doc.k-doc svg { color: var(--info); }
.hz-doc.k-xls svg { color: var(--green-d); }
.hz-doc.k-ppt svg, .hz-doc.k-video svg { color: var(--orange); }
.hz-doc-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--bg); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.hz-doc-del:hover { background: var(--danger); color: #fff; }

/* galleries */
.hz-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.hz-gallery figure { margin: 0; }
.hz-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.hz-gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hz-medialist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.hz-medialist li { display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 8px; align-items: center; font-size: 13px; }
.hz-medialist img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.hz-medialist button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.hz-medialist button.del:hover { background: var(--danger); color: #fff; }

/* home */
.hz-x-home { max-width: 1200px; margin-top: 0; }
.hz-hero { position: relative; overflow: hidden; border-radius: 0 0 20px 20px; min-height: 440px; display: flex; align-items: flex-end; color: #fff; background: var(--t-hero1, #0F3B28) center / cover no-repeat; }
.hz-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hz-hero.has-photo .hz-hero-art { display: none; }
.hz-hero-in { position: relative; padding: 56px clamp(20px, 5vw, 60px); max-width: 720px; }
.hz-hero .hz-eyebrow { color: #BFE3CB; }
.hz .hz-hero h1 { font-family: var(--font); font-size: clamp(32px, 5vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.015em; color: #fff; margin: 0 0 14px; }
.hz-hero p { font-size: 17px; color: rgba(255,255,255,.88); margin: 0 0 22px; max-width: 52ch; }
.hz-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hz-hero-cta .hz-btn { padding: 13px 22px; font-size: 15px; }
.hz-hero-edit { margin: 16px 0 0 !important; }
.hz-hero-edit .hz-link { color: #fff; }
.hz-homekpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: -36px clamp(12px, 3vw, 40px) 36px; position: relative; box-shadow: 0 10px 30px rgba(11,46,31,.10); }
.hz-homekpi > div { padding: 18px 18px 16px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hz-homekpi > div:first-child { border-left: 0; }
.hz-homekpi > div:first-child .v { color: var(--green); }
.hz-homekpi .v { font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hz-homekpi .k { font-size: 12.5px; color: var(--muted); }
.hz-homekpi .hz-loading { grid-column: 1 / -1; padding: 18px; }
.hz-quicks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0 36px; }
.hz-quick { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; border-radius: 12px; background: var(--bg); text-decoration: none !important; color: var(--ink) !important; border: 1px solid transparent; transition: border-color .15s, background .15s; }
.hz-quick b { font-weight: 700; font-size: 15.5px; }
.hz-quick span { font-size: 13px; color: var(--muted); }
.hz-quick:hover { background: #fff; border-color: var(--green); }
.hz-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 36px; }
.hz-pillar { position: relative; overflow: hidden; display: block; padding: 26px 24px 24px; min-height: 170px; border-radius: 16px; color: #fff !important; text-decoration: none !important; }
.hz-pillar span { font-size: 22px; font-weight: 700; display: block; margin-bottom: 8px; }
.hz-pillar p { margin: 0; color: rgba(255,255,255,.88); font-size: 14.5px; max-width: 32ch; }
.hz-pillar::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 150px; height: 150px; border-radius: 50%; border: 22px solid rgba(255,255,255,.12); }
.hz-pillar.p-hs { background: linear-gradient(135deg, var(--t-pill1, #1F7A4D), color-mix(in srgb, var(--t-pill1, #1F7A4D) 70%, #000)); }
.hz-pillar.p-env { background: linear-gradient(135deg, var(--t-pill2, #2B7F8E), color-mix(in srgb, var(--t-pill2, #2B7F8E) 70%, #000)); }
.hz-pillar.p-q { background: linear-gradient(135deg, var(--t-pill3, #2F5E9E), color-mix(in srgb, var(--t-pill3, #2F5E9E) 70%, #000)); }
.hz-pillar:hover { filter: brightness(1.07); }
.hz-homegrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.hz-policy img { width: 100%; border-radius: 12px; border: 1px solid var(--line); margin-top: 10px; display: block; }

/* section page band */
.hz-band { padding: 40px clamp(20px, 4vw, 44px); border-radius: 16px; color: #fff; margin-bottom: 20px; background: linear-gradient(135deg, var(--t-pill1, #1F7A4D), var(--t-pd, #155B39)); }
.hz-band.b-env { background: linear-gradient(135deg, var(--t-pill2, #2B7F8E), color-mix(in srgb, var(--t-pill2, #2B7F8E) 60%, #000)); }
.hz-band.b-quality { background: linear-gradient(135deg, var(--t-pill3, #2F5E9E), color-mix(in srgb, var(--t-pill3, #2F5E9E) 60%, #000)); }
.hz-band .hz-eyebrow { color: rgba(255,255,255,.75); }
.hz .hz-band h2 { color: #fff; font-family: var(--font); font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin: 0 0 8px; }
.hz-band p { margin: 0; color: rgba(255,255,255,.88); }

@media (max-width: 900px) {
  .hz-homekpi { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -30px 12px 28px; }
  .hz-homekpi > div { border-left: 0; border-top: 1px solid var(--line); }
  .hz-homekpi > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .hz-quicks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hz-pillars, .hz-homegrid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hz-hero { min-height: 400px; border-radius: 0; }
  .hz-hero-in { padding: 40px 18px 64px; }
  .hz-wpbar { flex-wrap: wrap; }
  .hz-q legend { font-size: 17px; }
}
@media print {
  .hz-caltools, .hz-x .hz-tools, .hz-session, .hz-doc-del { display: none !important; }
  .hz-cal { min-width: 0; font-size: 9px; }
}

/* dashboard drill-down */
.hz-tiles-sm .hz-tile .v { font-size: clamp(22px, 2.6vw, 30px); }
.hz-tile.is-btn { all: unset; box-sizing: border-box; cursor: pointer; display: block; background: var(--bg); border-radius: 12px; padding: 16px 16px 14px; min-width: 0; border: 2px solid transparent; font-family: var(--font); }
.hz-tile.is-btn .v { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; line-height: 1.15; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.hz-tiles-sm .hz-tile.is-btn .v { font-size: clamp(22px, 2.6vw, 30px); }
.hz-tile.is-btn:hover { border-color: var(--green); background: #fff; }
.hz-tile.is-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.hz-tile .hz-bar { margin: 6px 0 4px; }
.hz-wfbtn { all: unset; box-sizing: border-box; cursor: pointer; border-radius: 8px; padding: 2px 6px; margin: -2px -6px; font-family: var(--font); }
.hz-wfbtn:hover { background: var(--green-50); }
.hz-wfbtn .v { text-decoration: underline dotted var(--green-100); text-underline-offset: 4px; }
.hz-hbars li.is-btn { cursor: pointer; border-radius: 6px; padding-left: 6px; padding-right: 6px; }
.hz-hbars li.is-btn:hover, .hz-hbars li.is-btn:focus-visible { background: var(--green-50); outline: none; }
.hz-chart-tall { height: 300px; }
.hz-chart-sm { height: 220px; }
.hz-charts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.hz-drill { list-style: none; margin: 0; padding: 0; }
.hz-drill li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hz-drill li .t { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hz-drill li .t span { font-size: 12.5px; color: var(--muted); }
.hz-drill li .m { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.hz-drill li p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) { .hz-charts-3 { grid-template-columns: 1fr !important; } }
.hz p, .hz li, .hz td { font-weight: 400; letter-spacing: normal; }
.hz .hz-empty { font-size: 14px; line-height: 1.5; color: var(--muted); }
.hz .hz-hero p { font-size: 17px; line-height: 1.5; }
.hz-charts-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) !important; }
.hz-tile .hz-bar { max-width: 100%; }
.hz-tile .hz-bar i { width: 100%; }
.hz-tile .hz-bar { min-width: 0; }
.hz .hz-intro { font-size: 15px; line-height: 1.55; }
.hz .hz-opt, .hz .hz-opt span { font-size: 16px; font-weight: 400; line-height: 1.4; }
.hz .hz-opt .l { font-weight: 700; font-size: 14px; }
.hz .hz-wpbar b { font-size: 18px; font-weight: 700; }
.hz .hz-wpbar .hz-eyebrow { font-size: 12px; }
.hz .hz-stat .k, .hz .hz-homekpi .k, .hz .hz-quick span { font-weight: 400; }

/* live polish */
.hz a.hz-btn, .hz a.hz-btn:hover, .hz a.hz-quick, .hz a.hz-pillar, .hz .hz-doc a { text-decoration: none !important; }
.hz.hz-x-home { max-width: none; margin: 0 0 56px; }
.hz-x-home > *:not(.hz-hero) { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.hz-x-home > .hz-homekpi { max-width: 1120px; margin-top: -36px; margin-bottom: 40px; padding: 0; }
.hz-x-home .hz-hero { border-radius: 0; min-height: 480px; }
.hz-x-home .hz-hero-in { margin-left: max(0px, calc((100vw - 1200px) / 2)); }
.hz .hz-hero .hz-eyebrow { color: #BFE3CB; font-weight: 500; }
.hz-x-section, .hz.hz-dash, .hz-x-calendar { padding-left: 20px; padding-right: 20px; }
@media (max-width: 900px) { .hz-x-home > .hz-homekpi { margin: -30px 12px 28px; } }

/* =====================================================================
   v0.4 — one-window forms, 3D fields, theme-aware, responsive
   ===================================================================== */
.hz, .hz-modal {
  --ring: color-mix(in srgb, var(--green) 22%, transparent);
  --lift: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(12, 32, 24, .06), 0 6px 14px -6px rgba(12, 32, 24, .22);
  --lift-hi: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(12, 32, 24, .08), 0 12px 24px -10px rgba(12, 32, 24, .30);
  --press: inset 0 2px 5px rgba(12, 32, 24, .10), inset 0 1px 1px rgba(12, 32, 24, .08);
  --card: 0 1px 2px rgba(12, 32, 24, .05), 0 18px 48px -18px rgba(12, 32, 24, .28);
}

/* the window */
.hz.hz-page { max-width: 1180px; background: #fff; border-radius: 24px; box-shadow: var(--card); padding: 0 32px 30px; overflow: clip; border: 1px solid color-mix(in srgb, var(--green) 10%, #e6ebe8); }
.hz-page > .hz-head {
  margin: 0 -32px 6px; padding: 26px 32px 24px; border-bottom: 0; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--green-d) 0%, var(--green) 70%, color-mix(in srgb, var(--green) 70%, var(--orange)) 130%);
}
.hz-page > .hz-head::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255,255,255,.07); pointer-events: none; }
.hz-page > .hz-head .hz-eyebrow { color: color-mix(in srgb, var(--orange) 70%, #fff); }
.hz.hz-page > .hz-head .hz-title { color: #fff; }
.hz-page > .hz-head .hz-intro { color: rgba(255,255,255,.85); }
.hz-page > .hz-head .hz-session, .hz-page > .hz-head .hz-session b { color: #fff; position: relative; z-index: 1; }
.hz-page > .hz-head .hz-link { color: #fff; }

/* sections: numbered, compact */
.hz-page .hz-sec { padding: 22px 0 10px; border-bottom: 1px dashed var(--line); scroll-margin-top: 90px; }
.hz .hz-sec-title { display: flex; align-items: center; gap: 10px; color: var(--green-d); font-weight: 700; letter-spacing: .08em; }
.hz-sec-title .n { font-style: normal; width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 13px; letter-spacing: 0; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-d)); box-shadow: 0 4px 10px -3px var(--ring); }
.hz-page .hz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }

/* section quick-nav */
.hz-secnav { position: sticky; top: 0; z-index: 4; display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin: 0 0 4px; background: linear-gradient(#fff 80%, rgba(255,255,255,0)); scrollbar-width: none; }
.hz-secnav::-webkit-scrollbar { display: none; }
.hz-secnav button { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px 6px 6px; font: 500 13px/1.2 var(--font); color: var(--muted); cursor: pointer; box-shadow: var(--lift); text-transform: capitalize; }
.hz-secnav button i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green-50); color: var(--green-d); font-size: 12px; font-weight: 700; }
.hz-secnav button.is-on { color: var(--green-d); border-color: var(--green); }
.hz-secnav button.is-on i { background: var(--green); color: #fff; }

/* 3D fields */
.hz-page .hz-label { font-size: 13px; font-weight: 500; color: #34413B; }
.hz input[type=text], .hz input[type=date], .hz input[type=time], .hz input[type=number], .hz input[type=password], .hz input[type=search], .hz input[type=month], .hz select, .hz textarea,
.hz-modal input[type=text], .hz-modal input[type=password], .hz-modal textarea, .hz-modal select {
  background: linear-gradient(#fff, #FBFCFB); border: 1px solid #D9E1DC; border-radius: 12px; box-shadow: var(--lift);
  transition: box-shadow .18s, border-color .18s, transform .18s, background .18s;
}
.hz input:hover, .hz select:hover, .hz textarea:hover { box-shadow: var(--lift-hi); border-color: #C9D4CE; }
.hz input:focus, .hz select:focus, .hz textarea:focus, .hz-modal input:focus, .hz-modal textarea:focus, .hz-modal select:focus {
  background: #fff; border-color: var(--green); box-shadow: var(--press), 0 0 0 4px var(--ring);
}
.hz select, .hz-modal select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235F6B66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px, linear-gradient(#fff, #FBFCFB); }
.hz select:focus, .hz-modal select:focus { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235F6B66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px, #fff; }
.hz .hz-tools select, .hz .hz-inline select { padding-right: 32px !important; background-position: right 10px center, 0 0; }
.hz input[readonly] { background: var(--bg); box-shadow: var(--press); }
.hz-field.has-err > input, .hz-field.has-err > select, .hz-field.has-err > textarea { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent), var(--lift); }

/* chips & radios in 3D */
.hz-choice span { border-color: #D9E1DC; box-shadow: var(--lift); background: linear-gradient(#fff, #F8FAF9); font-weight: 500; }
.hz-choice:hover span { box-shadow: var(--lift-hi); transform: translateY(-1px); }
.hz-choice input:checked + span { background: linear-gradient(135deg, var(--green), var(--green-d)); border-color: transparent; box-shadow: 0 8px 18px -8px var(--green), inset 0 1px 0 rgba(255,255,255,.25); }
.hz-drop { border-radius: 14px; background: linear-gradient(#FBFCFB, var(--bg)); box-shadow: var(--press); }
.hz-row { background: linear-gradient(#fff, #FAFBFA); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift); }
.hz-add { border-radius: 12px; box-shadow: var(--lift); }

/* buttons */
.hz-btn { border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--green) 88%, #fff), var(--green-d)); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 20px -10px var(--green-d); }
.hz-btn:hover { background: linear-gradient(180deg, var(--green), var(--green-d)); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 26px -10px var(--green-d); }
.hz-btn-ghost, .hz-btn-ghost:hover { background: #fff; box-shadow: var(--lift); color: var(--green-d); }
.hz-btn-ghost:hover { box-shadow: var(--lift-hi); }
.hz-btn-danger { background: linear-gradient(180deg, #D4473B, #A92E24); }
.hz-btn-acc, .hz-btn-acc:hover { background: var(--orange); color: var(--acc-ink, #1b1400) !important; box-shadow: 0 12px 26px -10px var(--orange); }
.hz-btn-acc:hover { filter: brightness(1.06); }

/* sticky submit bar with progress */
.hz-page .hz-actions { position: sticky; bottom: 0; z-index: 5; margin: 10px -32px -30px; padding: 14px 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -18px rgba(12,32,24,.35); }
.hz-prog { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; font-size: 13px; color: var(--muted); }
.hz-prog i { flex: 1; max-width: 240px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; display: block; box-shadow: var(--press); }
.hz-prog b { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--green)); transition: width .25s ease; }
.hz-actions.is-ready .hz-prog span { color: var(--green-d); font-weight: 500; }
.hz-page .hz-actions .hz-btn { order: 2; min-width: 170px; }
.hz-page .hz-actions .hz-formmsg { order: 3; flex-basis: 100%; }
.hz-page .hz-actions .hz-formmsg:empty { display: none; }
.hz-page .hz-done { border-bottom: 0; text-align: center; padding: 48px 0 36px; }
.hz-page .hz-ref { display: inline-block; padding: 10px 22px; border-radius: 14px; background: var(--green-50); color: var(--green-d); box-shadow: var(--press); }
.hz-page .hz-records, .hz-page .hz-report { margin-top: 30px; }
.hz-page .hz-lock { border-radius: 16px; box-shadow: var(--press); }

/* ---------- document tiles ---------- */
.hz-docs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.hz-doc { --k: var(--green); }
.hz-doc.k-pdf { --k: #D9443A; } .hz-doc.k-doc { --k: #2F6FB2; } .hz-doc.k-xls { --k: #1E8A50; }
.hz-doc.k-ppt { --k: #E0782A; } .hz-doc.k-video { --k: #7C4DCC; } .hz-doc.k-img { --k: #0E9AA7; }
.hz-doc.t1 { --k: var(--orange); } .hz-doc.t2 { --k: #2F6FB2; } .hz-doc.t3 { --k: #0E9AA7; }
.hz .hz-doc a {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; min-height: 176px; padding: 18px 18px 14px;
  border: 1px solid #E3E9E5; border-radius: 18px; background: linear-gradient(170deg, #fff 55%, color-mix(in srgb, var(--k) 7%, #fff));
  box-shadow: var(--lift); color: var(--ink); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.hz .hz-doc a::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--k); }
.hz .hz-doc a:hover { transform: translateY(-4px); box-shadow: var(--lift-hi), 0 20px 34px -18px color-mix(in srgb, var(--k) 60%, transparent); border-color: color-mix(in srgb, var(--k) 40%, #E3E9E5); }
.hz-doc-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--k) 80%, #fff), var(--k)); box-shadow: 0 10px 18px -8px var(--k), inset 0 1px 0 rgba(255,255,255,.35); }
.hz .hz-doc svg { color: #fff !important; width: 26px; height: 26px; }
.hz-doc-code { font: 500 11px/1.3 var(--font); letter-spacing: .04em; color: var(--k); background: color-mix(in srgb, var(--k) 10%, #fff); border-radius: 6px; padding: 3px 7px; }
.hz-doc-t { font-weight: 500; font-size: 15px; line-height: 1.35; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hz-doc-f { display: flex; justify-content: space-between; align-items: center; width: 100%; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.hz-doc-f b { font-weight: 500; color: var(--k); }
.hz-doc-f span { font-weight: 500; color: var(--ink); opacity: 0; transform: translateX(-4px); transition: all .2s; }
.hz-doc a:hover .hz-doc-f span, .hz-doc a:focus-visible .hz-doc-f span { opacity: 1; transform: none; }
.hz-doc-del { top: 10px; right: 10px; z-index: 2; box-shadow: var(--lift); background: #fff; }
@media (hover: none) { .hz-doc-f span { opacity: 1; transform: none; } }

/* stat tiles, quick tiles, KPIs pick up the 3D feel */
.hz-stat, .hz-quick, .hz-tile, .hz-tile.is-btn { box-shadow: var(--lift); background: linear-gradient(#fff, #F7F9F8); border: 1px solid #E6ECE8; }
.hz-stat:hover, .hz-quick:hover, .hz-tile.is-btn:hover { box-shadow: var(--lift-hi); transform: translateY(-2px); }
.hz-tile.is-key { background: linear-gradient(135deg, var(--green), var(--green-d)); border-color: transparent; box-shadow: 0 16px 30px -16px var(--green-d); }
.hz-homekpi { box-shadow: var(--card); }
.hz-x { color: var(--ink); }
.hz-x > .hz-head { border-bottom-color: var(--line); }

/* ---------- theme picker ---------- */
.hz-themefab { position: fixed; left: 18px; bottom: 18px; z-index: 9990; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px 10px 12px; cursor: pointer;
  font: 500 14px/1 "Roboto", Arial, sans-serif; color: #fff; background: linear-gradient(135deg, var(--t-p, #1F7A4D), var(--t-pd, #155B39)); box-shadow: 0 12px 28px -10px rgba(0,0,0,.45); }
.hz-themefab:hover { filter: brightness(1.08); }
.hz-themefab[hidden] { display: none; }
.hz-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 6px 0 12px; }
.hz-themecard { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; border: 2px solid var(--line); background: #fff; box-shadow: var(--lift); font-family: var(--font); }
.hz-themecard:hover { box-shadow: var(--lift-hi); transform: translateY(-2px); }
.hz-themecard.is-on { border-color: var(--green); }
.hz-themecard .sw { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; height: 64px; border-radius: 10px; overflow: hidden; }
.hz-themecard b { font-size: 14.5px; color: var(--ink); }
.hz-themecard small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.hz-themecard:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------- tablet & mobile ---------- */
@media (max-width: 1024px) {
  .hz-page .hz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hz-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hz.hz-page { border-radius: 18px; padding: 0 16px 20px; margin-left: 0; margin-right: 0; }
  .hz-page > .hz-head { margin: 0 -16px 4px; padding: 20px 16px; }
  .hz-page .hz-grid, .hz-row { grid-template-columns: 1fr; }
  .hz input[type=text], .hz input[type=date], .hz input[type=time], .hz input[type=number], .hz input[type=password], .hz input[type=month], .hz select, .hz textarea { font-size: 16px; min-height: 48px; }
  .hz-page .hz-actions { margin: 10px -16px -20px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; gap: 8px; }
  .hz-page .hz-actions .hz-btn { width: 100%; order: 1; }
  .hz-prog { order: 2; justify-content: center; }
  .hz-prog i { max-width: none; }
  .hz-themes { grid-template-columns: 1fr; }
  .hz-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hz .hz-doc a { min-height: 150px; padding: 14px 12px 10px; }
  .hz-doc-ic { width: 40px; height: 40px; border-radius: 12px; }
  .hz-doc-t { font-size: 14px; }
  .hz-themefab span { display: none; }
  .hz-themefab { padding: 12px; }
}
@media (max-width: 380px) { .hz-docs { grid-template-columns: 1fr; } }
@media print {
  .hz.hz-page { box-shadow: none; border: 0; }
  .hz-secnav, .hz-prog, .hz-themefab { display: none !important; }
  .hz-page .hz-actions { position: static; box-shadow: none; }
}
.hz-doc { --k-ink: color-mix(in srgb, var(--k) 72%, #000); }
.hz-doc-code { color: var(--k-ink); background: color-mix(in srgb, var(--k) 14%, #fff); }
.hz-doc-f b { color: var(--k-ink); }
@media (max-width: 640px) {
  .hz-page .hz-actions { padding-top: 14px; }
  .hz-prog { position: absolute; left: 0; right: 0; top: 0; gap: 0; }
  .hz-prog i { height: 4px; border-radius: 0; box-shadow: none; }
  .hz-prog span { display: none; }
}
.hz-themecard .sw i:first-child { box-shadow: inset 0 0 0 1px #E3E8E5; }

/* =====================================================================
   v0.5 — live dashboard, drill-down window, task cycle
   ===================================================================== */
.hz, .hz-modal { --c-total: #2F6FB2; --c-done: var(--green); --c-prog: #E0A21B; --c-late: #D9443A; }

/* header + filters */
.hz.hz-dash { max-width: 1280px; }
.hz-dhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 18px; border-radius: 18px; background: #fff; box-shadow: var(--card); border: 1px solid #E6ECE8; }
.hz-dhead .t { display: flex; align-items: center; gap: 14px; }
.hz .hz-dhead h2 { margin: 0; font: 700 24px/1.15 var(--font); color: var(--ink); }
.hz-dhead p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.hz-dhead p b { color: var(--ink); font-weight: 500; }
.hz-dhead .live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-d); background: var(--green-50); padding: 6px 10px; border-radius: 999px; }
.hz-dhead .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--ring); animation: hzPulse 2s infinite; }
@keyframes hzPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 50%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hz-dfilters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hz-dfilters select { width: auto !important; min-height: 38px !important; padding: 6px 34px 6px 12px !important; font-size: 14px !important; background-position: right 12px center, 0 0 !important; }
.hz-seg, .hz-msb { font: 500 14px/1 var(--font); border: 1px solid #D9E1DC; background: linear-gradient(#fff, #FBFCFB); color: var(--ink); border-radius: 12px; padding: 11px 14px; cursor: pointer; box-shadow: var(--lift); white-space: nowrap; }
.hz-seg[aria-pressed="true"] { background: linear-gradient(135deg, var(--green), var(--green-d)); color: #fff; border-color: transparent; }
.hz-ms { position: relative; }
.hz-ms.is-on .hz-msb { border-color: var(--green); color: var(--green-d); }
.hz-ms.is-off { opacity: .45; pointer-events: none; }
.hz-msp { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(12,32,24,.2); border: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.hz-msp.is-grid { display: grid; grid-template-columns: repeat(3, 1fr); min-width: 240px; }
.hz-msp label { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 6px 8px; border-radius: 8px; cursor: pointer; margin: 0; }
.hz-msp label:hover { background: var(--green-50); }
.hz-msp input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.hz-msp .hz-link { grid-column: 1 / -1; justify-self: start; font-size: 13px; margin-top: 4px; }
.hz-icon { padding: 7px 9px !important; }
[data-review] b:not(:empty) { background: var(--c-late); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 12px; }

/* grid of cards */
.hz-dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.hz-dgrid > .hz-loading, .hz-dgrid > .hz-formmsg { grid-column: 1 / -1; }
.hz-dcard { grid-column: span 4; background: #fff; border-radius: 18px; box-shadow: var(--card); border: 1px solid #E6ECE8; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.hz-dcard > h3 { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; font: 700 12.5px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: linear-gradient(110deg, var(--green-d), color-mix(in srgb, var(--green-d) 70%, var(--green))); }
.hz-dcard > h3 small { font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .8; }
.hz-dcard > .b { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.hz-dempty { color: var(--muted); font-size: 14px; text-align: center; padding: 24px 0; }

/* horizontal bars */
.hz-hb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hz-hb button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-family: var(--font); }
.hz-hb button:hover, .hz-hb button:focus-visible { background: var(--green-50); }
.hz-hb .l { font-size: 13.5px; color: #34413B; text-align: right; }
.hz-hb b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hz-hb .bar { height: 16px; border-radius: 999px; background: #EEF1EF; overflow: hidden; box-shadow: var(--press); }
.hz-hb .bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.is-in .hz-hb .bar i { width: var(--w); }
.c-total i, .hz-vb .c-total i { background: linear-gradient(90deg, color-mix(in srgb, var(--c-total) 70%, #fff), var(--c-total)); }
.c-done i, .hz-vb .c-done i { background: linear-gradient(90deg, color-mix(in srgb, var(--c-done) 70%, #fff), var(--c-done)); }
.c-prog i, .hz-vb .c-prog i { background: linear-gradient(90deg, color-mix(in srgb, var(--c-prog) 70%, #fff), var(--c-prog)); }
.c-late i, .hz-vb .c-late i { background: linear-gradient(90deg, color-mix(in srgb, var(--c-late) 70%, #fff), var(--c-late)); }

/* vertical bars */
.hz-vb { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 220px; }
.hz-vb button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; cursor: pointer; border-radius: 12px; padding: 6px 0; font-family: var(--font); }
.hz-vb button:hover { background: var(--green-50); }
.hz-vb b { font-size: 18px; font-weight: 700; }
.hz-vb .col { width: 44px; flex: 1; max-height: 150px; display: flex; align-items: flex-end; border-radius: 10px 10px 4px 4px; background: #F1F4F2; overflow: hidden; }
.hz-vb .col i { display: block; width: 100%; height: 0; border-radius: 10px 10px 4px 4px; transition: height 1s cubic-bezier(.2,.8,.2,1); background-image: linear-gradient(180deg, var(--x1, #fff), var(--x2, #000)) !important; }
.hz-vb .c-total i { --x1: color-mix(in srgb, var(--c-total) 65%, #fff); --x2: var(--c-total); }
.hz-vb .c-done i { --x1: color-mix(in srgb, var(--c-done) 65%, #fff); --x2: var(--c-done); }
.hz-vb .c-prog i { --x1: color-mix(in srgb, var(--c-prog) 65%, #fff); --x2: var(--c-prog); }
.hz-vb .c-late i { --x1: color-mix(in srgb, var(--c-late) 65%, #fff); --x2: var(--c-late); }
.is-in .hz-vb .col i { height: max(var(--h), 3px); }
.hz-vb .l { font-size: 12.5px; color: var(--muted); text-align: center; }

/* rings */
.hz-rings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hz-ring { all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 4px; border-radius: 14px; cursor: pointer; font-family: var(--font); }
.hz-ring:hover, .hz-ring:focus-visible { background: var(--green-50); }
.hz-ring svg { width: 96px; height: 96px; transform: rotate(-90deg); filter: drop-shadow(0 4px 8px rgba(12,32,24,.12)); }
.hz-ring .tr { fill: none; stroke: #EEF1EF; stroke-width: 9; }
.hz-ring .va { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.2,.8,.2,1); }
.is-in .hz-ring .va { stroke-dashoffset: var(--off) !important; }
.hz-ring.t-ink .va { stroke: #23313A; } .hz-ring.t-blue .va { stroke: #2F6FB2; } .hz-ring.t-amber .va { stroke: #E0782A; } .hz-ring.t-green .va { stroke: var(--green); }
.hz-ring .c { position: absolute; top: 8px; left: 0; right: 0; height: 96px; display: grid; place-items: center; pointer-events: none; }
.hz-ring .c b { font-size: 21px; font-weight: 700; color: var(--ink); }
.hz-ring .lab { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #34413B; margin-top: 4px; }
.hz-ring small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

/* safe man-hours */
.is-feature > .b { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--green) 5%, #fff)); }
.hz-safe .tot { margin: 0 0 12px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.hz-safe .tot span { font-size: 13px; color: var(--muted); }
.hz-safe .tot b { font-size: clamp(28px, 3vw, 38px); font-weight: 700; color: var(--green-d); letter-spacing: -.01em; }
.hz-safe .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hz-wf { border: 1px solid #E3E9E5; border-radius: 14px; padding: 12px; background: #fff; box-shadow: var(--lift); }
.hz .hz-wf h4 { margin: 0 0 8px; text-align: center; font: 700 11.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--green-d); background: var(--green-50); padding: 7px; border-radius: 8px; }
.hz-wf dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; margin: 0; font-size: 13px; }
.hz-wf dt { color: var(--muted); }
.hz-wf dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hz-wf dd.big { color: var(--green-d); }
.hz-wf .lti { color: var(--c-late); font-weight: 700; }
.hz-wf p { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); text-align: right; }

/* incident tiles */
.hz-incf { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hz-incf select { min-height: 38px !important; padding: 6px 30px 6px 10px !important; font-size: 13.5px !important; }
.hz-itiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.hz-itiles button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; border-radius: 10px; background: #fff; border: 1px solid #E6ECE8; border-top: 3px solid var(--tc, #23313A); box-shadow: var(--lift); text-align: center; font-family: var(--font); min-width: 0; }
.hz-itiles button:hover { transform: translateY(-2px); box-shadow: var(--lift-hi); }
.hz-itiles b { font-size: 17px; font-weight: 700; }
.hz-itiles span { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); line-height: 1.2; overflow-wrap: anywhere; }
.hz-itiles .it0 { --tc: #23313A; } .hz-itiles .it1 { --tc: var(--c-late); } .hz-itiles .it2 { --tc: #0E9AA7; } .hz-itiles .it3 { --tc: #2F6FB2; } .hz-itiles .it4 { --tc: #8E5BD8; }
.hz-itiles .is-total { background: linear-gradient(180deg, #fff, var(--green-50)); }

/* top 5 */
.hz-top5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-items: end; height: 210px; }
.hz-top5 button { all: unset; box-sizing: border-box; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; cursor: pointer; border-radius: 10px; padding: 4px 2px; font-family: var(--font); min-width: 0; }
.hz-top5 button:hover { background: var(--green-50); }
.hz-top5 .cols { display: flex; align-items: flex-end; gap: 4px; height: 150px; }
.hz-top5 .cols i { position: relative; width: 16px; height: 0; border-radius: 5px 5px 2px 2px; transition: height 1s cubic-bezier(.2,.8,.2,1); }
.is-in .hz-top5 .cols i { height: max(var(--h), 2px); }
.hz-top5 .cols i.m { background: var(--green); } .hz-top5 .cols i.y { background: var(--orange); }
.hz-top5 .cols i b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; font-style: normal; padding-bottom: 2px; }
.hz-top5 .l { font-size: 11.5px; text-align: center; color: #34413B; line-height: 1.25; height: 2.5em; overflow: hidden; }
.hz-legend { margin: 4px 0 0; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; justify-content: center; }
.hz-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; } .hz-legend i.m { background: var(--green); } .hz-legend i.y { background: var(--orange); }

.hz-tchips { display: flex; gap: 8px; flex-wrap: wrap; }
.hz-tchips button, .hz-tchips span { all: unset; font: 400 13px/1.2 var(--font); padding: 8px 12px; border-radius: 10px; background: var(--bg); box-shadow: var(--press); }
.hz-tchips button { cursor: pointer; background: #FFF4E5; }
.hz-tchips b { font-weight: 700; }
.hz-dcard .hz-chart { height: 230px; margin: 0; }

/* drill-down window */
.hz-modal.is-xwide .hz-modal-in { width: min(1100px, 100%); }
.hz-modal-top .hz-back { border: 0; background: var(--green-50); color: var(--green-d); width: 34px; height: 34px; border-radius: 10px; font-size: 22px; line-height: 1; cursor: pointer; margin-right: 10px; flex: none; }
.hz-modal-top { display: flex; align-items: flex-start; gap: 6px; }
.hz-modal-top > div { flex: 1; min-width: 0; }
.hz-backbar { border: 0; background: none; color: var(--green-d); font: 500 14px var(--font); cursor: pointer; padding: 0 0 10px; }
.hz-utab th.c-total { color: var(--c-total); } .hz-utab th.c-done { color: var(--c-done); } .hz-utab th.c-prog { color: #B07A0B; } .hz-utab th.c-late { color: var(--c-late); }
.hz-utab .is-hl { background: color-mix(in srgb, var(--green) 6%, #fff); }
.hz-utab tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.hz-cn { all: unset; cursor: pointer; display: inline-block; min-width: 34px; text-align: center; padding: 4px 8px; border-radius: 8px; font: 700 14px var(--font); font-variant-numeric: tabular-nums; }
.hz-cn.c-total { background: color-mix(in srgb, var(--c-total) 12%, #fff); color: var(--c-total); }
.hz-cn.c-done { background: color-mix(in srgb, var(--c-done) 12%, #fff); color: var(--green-d); }
.hz-cn.c-prog { background: color-mix(in srgb, var(--c-prog) 16%, #fff); color: #8A5F06; }
.hz-cn.c-late { background: color-mix(in srgb, var(--c-late) 12%, #fff); color: var(--c-late); }
.hz-cn:hover { filter: brightness(.95); box-shadow: var(--lift); }
.hz-cn.is-zero { cursor: default; color: #B8C2BD; font-weight: 400; }
.hz-ltab .ref small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.hz-who { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; margin: 0 4px 4px 0; background: var(--bg); white-space: nowrap; }
.hz-who.s-assigned { background: #FFF4E0; color: #8A5F06; } .hz-who.s-submitted { background: #E8F0FB; color: #24578F; }
.hz-who.s-returned { background: #FDECEA; color: var(--c-late); } .hz-who.s-accepted { background: var(--green-50); color: var(--green-d); }
.hz-mhgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hz-mhcol { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(#fff, #FAFBFA); }
.hz-mhcol legend { font: 700 13px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--green-d); padding: 0 6px; }
.hz-mhcol label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }

/* status pills */
.hz-dp { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--font); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.hz-dp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hz-dp.is-done { background: var(--green-50); color: var(--green-d); }
.hz-dp.is-prog { background: #FFF4E0; color: #8A5F06; }
.hz-dp.is-late { background: #FDECEA; color: var(--c-late); }
.hz-sp { display: inline-block; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.hz-sp.s-submitted { background: #E8F0FB; color: #24578F; } .hz-sp.s-returned { background: #FDECEA; color: var(--c-late); }
.hz-sp.s-accepted { background: var(--green-50); color: var(--green-d); } .hz-sp.s-recalled { text-decoration: line-through; }

/* record window: assignments */
.hz-modal .hz-panel { border: 1px solid #E6ECE8; border-radius: 16px; padding: 14px 16px; background: #fff; box-shadow: var(--lift); margin-top: 14px; }
.hz-modal details.hz-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.hz-modal details.hz-panel > summary::-webkit-details-marker { display: none; }
.hz-modal details.hz-panel > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.hz-modal details[open].hz-panel > summary::after { content: "▴"; }
.hz-modal details.hz-panel > summary small { color: var(--muted); font-size: 12px; }
.hz-modal details.hz-panel > *:not(summary) { margin-top: 12px; }
.hz-panel-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hz-panel h4 small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 6px; }
.hz-alist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hz-alist li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px; border-radius: 12px; background: linear-gradient(#fff, #FAFBFA); border: 1px solid #E6ECE8; }
.hz-alist li.is-off { opacity: .55; }
.hz-alist .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hz-alist .av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--green), var(--green-d)); }
.hz-alist .who b { display: block; font-size: 14.5px; }
.hz-alist .who small { color: var(--muted); font-size: 12px; }
.hz-alist .st { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hz-alist .fb, .hz-alist .note, .hz-alist .acts { grid-column: 1 / -1; }
.hz-alist .fb { background: #F4F8FD; border-radius: 10px; padding: 8px 10px; }
.hz-alist .note { background: #FFF6EC; border-radius: 10px; padding: 8px 10px; }
.hz-alist .fb p, .hz-alist .note p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; }
.hz-alist small { color: var(--muted); font-size: 12px; }
.hz-alist .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hz-myfb { border-color: color-mix(in srgb, var(--green) 40%, #E6ECE8) !important; background: linear-gradient(180deg, var(--green-50), #fff) !important; }
.hz-rec { margin: 0; font-size: 14px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.hz-rec.is-ret { border-color: #F3C9C4; background: #FFF5F4; }
.hz-row-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hz-upick { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.hz-upick label { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; box-shadow: var(--lift); }
.hz-upick label:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.hz-upick input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; flex: none; }
.hz-upick b { display: block; font-size: 14px; } .hz-upick small { color: var(--muted); font-size: 12px; }
.hz-modal-actions [data-n] { margin-right: auto; }

/* My tasks cards */
.hz-tcards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hz-tcards li { position: relative; padding: 14px 14px 12px 18px; border-radius: 16px; background: #fff; border: 1px solid #E6ECE8; box-shadow: var(--lift); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, box-shadow .15s; overflow: hidden; }
.hz-tcards li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c-prog); }
.hz-tcards li.d-done::before { background: var(--c-done); } .hz-tcards li.d-late::before { background: var(--c-late); }
.hz-tcards li:hover, .hz-tcards li:focus-visible { transform: translateY(-2px); box-shadow: var(--lift-hi); outline: none; }
.hz-tcards .top { display: flex; align-items: center; gap: 8px; }
.hz-tcards .src { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green-d); }
.hz-tcards .ref { font-size: 12px; color: var(--muted); margin-right: auto; }
.hz-tcards .t { font-size: 15px; }
.hz-tcards p { margin: 0; font-size: 13.5px; color: #4A5751; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hz-tcards .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.hz-tcards .ret { background: #FFF5F4; border-radius: 8px; padding: 6px 8px; -webkit-line-clamp: 2; }
.hz-tcards .fbk { font-style: italic; background: #F4F8FD; border-radius: 8px; padding: 6px 8px; }
.hz-tabs .is-task { font-weight: 500; }
.hz-tabs .is-task[aria-selected="true"] { background: linear-gradient(135deg, var(--green), var(--green-d)); color: #fff; }

@media (max-width: 1100px) { .hz-dcard { grid-column: span 6; } }
@media (max-width: 700px) {
  .hz-dcard { grid-column: 1 / -1; }
  .hz-dhead { padding: 14px; }
  .hz-safe .two, .hz-mhgrid { grid-template-columns: 1fr; }
  .hz-itiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hz-itiles span { font-size: 8.5px; }
  .hz-hb button { grid-template-columns: 82px 1fr 36px; }
  .hz-alist li { grid-template-columns: 1fr; }
  .hz-alist .st { flex-direction: row; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .hz-hb .bar i, .hz-vb .col i, .hz-ring .va, .hz-top5 .cols i { transition: none; } .hz-dhead .live i { animation: none; } }
