/* AllUs Home Health. Colors, type and the shared pieces (panel, pill, chip, btn, seg, note, kv) come from coder.css, so the chart and the coder read as one program.
   Layout idea: a chart room. A slim agency bar on top, the census as ruled rows, each chart behind four tabs. State is always a labeled pill, never color alone. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type="date"], input[type="tel"] { width: 100%; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 16px; min-height: 42px; }
select:disabled, input:disabled { opacity: 0.75; cursor: default; }
.btn.primary { justify-content: center; }

/* bar */
.hh-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.hh-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.hh-brand strong { font: 700 17px/1.2 var(--font-display); }
.hh-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; flex: none; }
.hh-mark::before, .hh-mark::after { content: ""; position: absolute; background: var(--accent-ink); border-radius: 1px; }
.hh-mark::before { left: 10px; top: 5px; width: 2.5px; height: 12px; }
.hh-mark::after { left: 5px; top: 10px; width: 12px; height: 2.5px; }
.hh-agency { color: var(--muted); font-size: 13.5px; }
.hh-nav { display: flex; gap: 4px; flex: 1 1 auto; }
.hh-nav button { border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 38px; }
.hh-nav button:hover { color: var(--ink); }
.hh-nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.hh-right { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-left: auto; }
.hh-right select { width: auto; max-width: 240px; font-size: 14px; padding: 7px 28px 7px 10px; }
.hh-who { font-size: 13px; color: var(--muted); }
.hh-demo { background: var(--warn-soft); color: var(--warn); font-size: 13px; padding: 7px 16px; border-bottom: 1px solid var(--line); }

/* page */
.hh-main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 16px; }
#coder-host { padding-top: 8px; padding-bottom: 40px; }
#coder-host #oasis-box, #coder-host #add-batch, #coder-host #p-batch { display: none !important; }
.hh-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.hh-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hh-tools input { max-width: 320px; }

/* census rows */
.hh-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hh-row { display: grid; grid-template-columns: minmax(160px, 2fr) 104px minmax(120px, 1.2fr) minmax(170px, 2.4fr) 72px 118px 132px; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent; padding: 11px 14px; font: inherit; color: inherit; }
.hh-row:first-child { border-top: 0; }
.hh-row.head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--sunk); padding-top: 8px; padding-bottom: 8px; }
.hh-row.work { grid-template-columns: minmax(170px, 2fr) minmax(150px, 2fr) 150px; }
.hh-row.ag { grid-template-columns: minmax(180px, 3fr) 90px minmax(120px, 1.5fr) 100px; }
button.hh-row:hover { background: var(--sunk); }
button.hh-row:focus-visible { outline-offset: -2px; }
.hh-row .c { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.hh-row .sub { font-size: 12.5px; color: var(--muted); }
.hh-row .sub.late { color: var(--crit); font-weight: 600; }
.hh-row code, .hh-dx code, .hh-used code, .hh-time code { font: 600 13.5px/1.3 var(--font-code); }
@media (max-width: 880px) {
  .hh-row.head { display: none; }
  .hh-row, .hh-row.work, .hh-row.ag { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  .hh-row .c:first-child { grid-column: 1 / -1; }
  .hh-row .c[data-label]::before { content: attr(data-label); font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
  .hh-row .c:first-child::before { content: none; }
  .hh-row + button.hh-row, .hh-row.head + .hh-row { border-top: 1px solid var(--line); }
  .hh-list > .hh-row.head + .hh-row { border-top: 0; }
}

/* chart */
.hh-facts { grid-template-columns: repeat(auto-fit, minmax(90px, max-content) minmax(120px, 1fr)); font-size: 14px; }
.hh-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.hh-tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: 42px; }
.hh-tabs button:hover { color: var(--ink); }
.hh-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.hh-time { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 8px 0; }
.hh-time div { min-height: 36px; border-radius: 6px; background: var(--accent-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.hh-time .now { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); border-radius: 1px; }
.hh-steps { display: flex; flex-direction: column; gap: 8px; }
.hh-step { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--sunk); }
.hh-step.todo { border-style: dashed; color: var(--muted); background: transparent; font-size: 14px; }

/* forms */
.hh-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; }
.hh-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hh-field > label, .hh-field > .lab { font-weight: 600; font-size: 13px; }
.hh-field.wide { grid-column: 1 / -1; }
.hh-field.narrow { max-width: 340px; }
.hh-two { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 880px) { .hh-two { grid-template-columns: minmax(0, 1fr); } }
.hh-asmt { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 9px 11px; width: 100%; font: inherit; color: inherit; }
.hh-asmt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.hh-sec { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.hh-dx { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 6px; background: var(--sunk); font-size: 13.5px; }
.hh-pick { display: flex; flex-direction: column; gap: 4px; }
.hh-pick .seg { flex-wrap: wrap; }
.hh-pick .seg button { min-height: 38px; }
.hh-used { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); padding: 10px 12px; }
.hh-used code { overflow-wrap: anywhere; font-weight: 500; }

/* sign-in */
.hh-sign { display: flex; justify-content: center; padding-top: min(8vh, 60px); }
.hh-sign .panel { width: 100%; max-width: 460px; gap: 16px; padding: 24px; }
.hh-sign .seg { align-self: flex-start; }

/* sign-in, account, agencies */
input[type="email"], input[type="password"] { width: 100%; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 16px; min-height: 42px; }
.hh-gap { gap: 14px; }
.hh-code { max-width: 200px; font: 600 22px/1.2 var(--font-code); letter-spacing: 0.18em; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; align-self: flex-start; }
.hh-steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.hh-save { color: var(--muted); }
.hh-save.bad { color: var(--crit); font-weight: 600; }
.hh-right .btn.ghost { max-width: 220px; overflow-wrap: anywhere; text-align: left; }
.hh-right .btn.ghost:disabled { color: var(--muted); opacity: 1; }
.hh-row.mem { grid-template-columns: minmax(180px, 3fr) 170px minmax(200px, auto); }
div.hh-row.mem + div.hh-row.mem { border-top: 1px solid var(--line); }
.hh-pass { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font: 600 15px/1.4 var(--font-code); user-select: all; overflow-wrap: anywhere; }
.btn.danger { border-color: var(--crit); color: var(--crit); }
#notice { align-items: center; }
ul.plain { margin: 0; padding-left: 18px; font-size: 13.5px; }
@media (max-width: 880px) { .hh-row.mem { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
