/* Health workspace (see public/assets/health.js). Built on the Money design
   system: the .money-app shell and .m-* parts from money.css, the pl- sidebar
   pieces from pipeline.css, and the ht- pieces below. Designed in Figma, page
   "Health". Every colour is a money token, so the dark theme follows. */

.ht-app { grid-template-columns: 236px minmax(0, 1fr); }
.ht-navgap { height: 6px; }
.ht-logbtn { width: 100%; justify-content: center; margin-bottom: 2px; }
.ht-navright { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--m-faint); }
.m-nav.active .ht-navright { color: var(--m-accent); }

/* ---- sidebar sources ---- */
.ht-source { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: 7px; }
.ht-source:hover { background: var(--m-surface-2); }
.ht-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--m-faint); flex-shrink: 0; }
.ht-dot.pos { background: var(--m-pos); }
.ht-dot.accent { background: var(--m-accent); }
.ht-source .t { display: flex; flex-direction: column; min-width: 0; }
.ht-source .t b { font-size: 12px; font-weight: 500; color: var(--m-ink); }
.ht-source .t em { font-size: 10.5px; font-style: normal; color: var(--m-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-foot .m-nav { padding-left: 6px; }

/* ---- today: macros ---- */
.ht-macrobar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--m-surface-2); }
.ht-macrobar i { display: block; height: 100%; }
.ht-macrobar .p { background: var(--m-accent); }
.ht-macrobar .c { background: var(--m-warn); }
.ht-macrobar .f { background: var(--m-pos); }
.ht-macros { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.ht-macro { display: flex; align-items: center; gap: 7px; }
.ht-macro i { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.ht-macro:nth-child(1) i { background: var(--m-accent); }
.ht-macro:nth-child(2) i { background: var(--m-warn); }
.ht-macro:nth-child(3) i { background: var(--m-pos); }
.ht-macro b { display: block; font-size: 12.5px; font-weight: 600; }
.ht-macro em { display: block; font-size: 10.5px; font-style: normal; color: var(--m-faint); }

/* ---- today: meals ---- */
.ht-meals { margin-top: 14px; }
.ht-meal { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--m-line-soft); font-size: 12.5px; }
.ht-meal:first-child { border-top: 0; }
.ht-meal .n { width: 82px; flex-shrink: 0; font-weight: 600; }
.ht-meal .w { flex: 1; min-width: 0; color: var(--m-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-meal .m { font-size: 11.5px; color: var(--m-faint); white-space: nowrap; }
.ht-meal .k { min-width: 78px; flex-shrink: 0; text-align: right; font-weight: 600; white-space: nowrap; }
.ht-meal.empty .w { color: var(--m-faint); }

.ht-big { font-size: 25px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }

/* ---- activity rows ---- */
.ht-acts { margin-top: 10px; }
.ht-act { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--m-line-soft); font-size: 12.5px; }
.ht-act .t { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-act .s { color: var(--m-muted); white-space: nowrap; }
.ht-act .d { width: 46px; text-align: right; color: var(--m-faint); font-size: 11.5px; }
.ht-kind { min-width: 38px; justify-content: center; }

/* ---- stat strip ---- */
.ht-statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; margin-top: 14px; }
.ht-statrow.bordered { border-top: 1px solid var(--m-line); padding-top: 14px; }
.ht-stat { background: var(--m-surface-2); border-radius: 10px; padding: 10px 12px; }
.ht-statrow.bordered .ht-stat { background: transparent; padding: 0; }
.ht-stat .l { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--m-faint); }
.ht-stat .v { font-size: 15px; font-weight: 700; margin-top: 3px; }

/* ---- meters (targets, zones) ---- */
.ht-meter { margin-bottom: 12px; }
.ht-meter:last-child { margin-bottom: 0; }
.ht-meter .l { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; }
.ht-meter .l em { font-style: normal; font-weight: 400; color: var(--m-muted); white-space: nowrap; }

/* ---- day stepper ---- */
.ht-stepper { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border-radius: 9px; background: var(--m-surface-2); }
.ht-stepper span { font-size: 12.5px; font-weight: 600; padding: 0 6px; white-space: nowrap; }

/* ---- strength session list ---- */
.ht-sessions { display: flex; flex-direction: column; }
.ht-session { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 20px; border: 0; border-top: 1px solid var(--m-line-soft); background: none; font: inherit; color: var(--m-ink); text-align: left; cursor: pointer; }
.ht-session:first-child { border-top: 0; }
.ht-session:hover { background: var(--m-surface-2); }
.ht-session.on { background: var(--m-accent-soft); box-shadow: inset 3px 0 0 var(--m-accent); }
.ht-session .d { width: 52px; color: var(--m-faint); font-size: 11.5px; }
.ht-session .t { flex: 1; min-width: 0; font-weight: 500; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-session .s, .ht-session .v { color: var(--m-muted); font-size: 12px; white-space: nowrap; }
.ht-session .v { width: 78px; text-align: right; font-weight: 600; color: var(--m-ink); }

/* ---- forms ---- */
.ht-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; }
.ht-form.wide { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ht-form.addrow { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--m-line); }
.ht-form input, .ht-form select { font: inherit; font-size: 12.5px; padding: 8px 10px; border: 1px solid var(--m-line); border-radius: 8px; background: var(--m-surface); color: var(--m-ink); width: 100%; }
.ht-form input:focus, .ht-form select:focus { outline: none; border-color: var(--m-accent); box-shadow: 0 0 0 3px var(--m-accent-soft); }
.ht-fieldrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ht-token { flex: 1; min-width: 240px; padding: 9px 12px; border-radius: 8px; background: var(--m-surface-2); border: 1px solid var(--m-line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--m-ink); overflow-x: auto; white-space: nowrap; }

/* ---- connections ---- */
.ht-p { font-size: 12.5px; line-height: 1.55; color: var(--m-muted); margin: 0 0 12px; }
.ht-p.faint { color: var(--m-faint); font-size: 11.5px; }
.ht-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 4px; }
.ht-chips b { font-size: 12px; font-weight: 600; margin-right: 4px; }
.ht-stack { display: flex; flex-direction: column; gap: 18px; }
.ht-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--m-surface-2); font-size: 11px; font-weight: 600; color: var(--m-muted); white-space: nowrap; }
.ht-status i { width: 7px; height: 7px; border-radius: 999px; background: var(--m-faint); }
.ht-status.pos { color: var(--m-pos); }
.ht-status.pos i { background: var(--m-pos); }

/* ---- the log picker ---- */
.ht-picker { display: flex; flex-direction: column; gap: 8px; }
.ht-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--m-line); border-radius: 12px; background: var(--m-surface); font: inherit; color: var(--m-ink); text-align: left; cursor: pointer; }
.ht-pick:hover { border-color: var(--m-accent); background: var(--m-surface-2); }
.ht-pick > svg.i:first-child { color: var(--m-accent); width: 20px; height: 20px; }
.ht-pick span { flex: 1; min-width: 0; }
.ht-pick b { display: block; font-size: 13.5px; font-weight: 600; }
.ht-pick em { display: block; font-size: 11.5px; font-style: normal; color: var(--m-faint); margin-top: 2px; }
.ht-pick > svg.i:last-child { color: var(--m-faint); }

/* ---- phone ---- */
@media (max-width: 900px) {
  .ht-app { grid-template-columns: 1fr; }
  .ht-meal .m, .ht-act .s { display: none; }
  .ht-meal .n { width: 70px; }
  .ht-statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-token { min-width: 0; }
}
