/* DOVYR HEALTH · Hábitos */
.hb-today { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.6fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hb-prog { padding: 26px 32px 26px 0; border-right: 1px solid var(--rule); }
.hb-prog .nu-big small { font: 500 20px var(--font); color: var(--ink-3); letter-spacing: 0; }
.hb-list { padding: 14px 0 18px 32px; min-width: 0; }
.hb-grp + .hb-grp { margin-top: 10px; }
.hb-gl { margin: 12px 0 2px; font-size: 12px; color: var(--ink-4); }
.hb-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 130px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
.hb-row:last-child { border-bottom: 0; }
.hb-chk { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: transparent; transition: all .25s var(--ease); }
.hb-chk svg { width: 17px; height: 17px; }
.hb-chk:hover { border-color: var(--acid-line); color: var(--ink-4); }
.hb-row.done .hb-chk { background: var(--acid); border-color: var(--acid); color: var(--on-acid); }
.hb-chk.qty { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.hb-chk.qty span { color: var(--ink-2); }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.hb-mi { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hb-mi b { font-weight: 550; font-size: 14.5px; transition: color .2s; }
.hb-row.done .hb-mi b { color: var(--ink-2); }
.hb-mi small { font-size: 12px; color: var(--ink-4); }
.hb-auto { color: var(--acid-text); }
.hb-auto.off { color: var(--ink-4); }
.hb-qbtns { display: flex; gap: 2px; }
.hb-qbtns .btn { width: 34px; padding: 0; font-size: 16px; }
.hb-st { font-size: 12px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.hb-others { margin-top: 14px; }
.hb-others summary { cursor: pointer; font-size: 12.5px; color: var(--ink-3); padding: 8px 0; list-style: none; }
.hb-others summary::-webkit-details-marker { display: none; }
.hb-others summary::before { content: "+ "; color: var(--ink-4); }
.hb-others[open] summary::before { content: "− "; }
.hb-others .hb-row { opacity: .8; }
.hb-wknav { display: flex; gap: 4px; }
.hb-wknav .btn svg { width: 15px; height: 15px; }
.hb-week { width: 100%; border-collapse: collapse; }
.hb-week th { font-weight: 500; font-size: 12px; color: var(--ink-4); padding: 0 0 10px; text-align: center; border-bottom: 1px solid var(--rule); }
.hb-week th.now { color: var(--ink); }
.hb-week thead th:first-child, .hb-week tbody th { text-align: left; }
.hb-week tbody th { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule-2); font-weight: 400; }
.hb-week tbody th b { display: block; font-weight: 550; font-size: 13.5px; color: var(--ink); }
.hb-week tbody th small { font-size: 11.5px; color: var(--ink-4); }
.hb-week td { text-align: center; border-bottom: 1px solid var(--rule-2); padding: 6px 0; }
.hb-week .r { text-align: right; }
.hb-wr { font-size: 13px; color: var(--ink-2); padding-left: 10px !important; }
.hb-cell { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink-4); transition: all .2s var(--ease); font-size: 13px; }
.hb-cell svg { width: 15px; height: 15px; }
.hb-cell.ok { background: var(--acid); color: var(--on-acid); }
.hb-cell.miss { box-shadow: inset 0 0 0 1px var(--line); }
.hb-cell.open { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.hb-cell.fut { box-shadow: inset 0 0 0 1px var(--rule); cursor: default; }
.hb-cell.na { color: var(--ink-4); opacity: .6; }
.hb-cell:not(:disabled):hover { box-shadow: inset 0 0 0 1.5px var(--acid-line); }
.hb-cons { border-top: 1px solid var(--rule); }
.hb-crow { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(260px, auto); gap: 32px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.hb-cn b { display: block; font-weight: 550; font-size: 14.5px; }
.hb-cn small { font-size: 12px; color: var(--ink-4); }
.hb-mini { display: grid; grid-template-columns: repeat(12, 11px); gap: 3px; }
.hb-mc { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; }
.hb-mc i { border-radius: 2px; background: var(--rule-2); }
.hb-mc i.on { background: var(--acid); }
html[data-theme="light"] .hb-mc i.on, html[data-theme="light"] .hb-cell.ok { background: #b5d82a; }
.hb-mc i.miss { background: var(--rule); box-shadow: inset 0 0 0 1px var(--line); }
.hb-mc i.fut { background: transparent; }
.hb-crow dl { display: grid; grid-template-columns: 80px 70px 110px; gap: 16px; margin: 0; }
.hb-crow dt { font-size: 11.5px; color: var(--ink-4); }
.hb-crow dd { margin: 4px 0 0; font: 600 22px/1 var(--display); letter-spacing: -.02em; }
.hb-crow dd.good { color: var(--acid-text); }
.hb-crow dl small { display: block; font-size: 11px; color: var(--ink-4); margin-top: 4px; }
.ch-svg .bar.mid2 { fill: color-mix(in srgb, var(--acid) 45%, transparent); }
html[data-theme="light"] .ch-svg .bar.mid2 { fill: color-mix(in srgb, #b5d82a 55%, transparent); }
.hb-manage { border-top: 1px solid var(--rule); }
.hb-mrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 160px 220px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background .2s, opacity .2s; }
.hb-mrow:hover { background: linear-gradient(90deg, transparent, var(--hover) 20%, var(--hover) 80%, transparent); }
.hb-mrow.drag { opacity: .4; } .hb-mrow.over { box-shadow: inset 0 2px 0 var(--acid); }
.hb-mrow .grip { color: var(--ink-4); cursor: grab; font-size: 13px; letter-spacing: -2px; text-align: center; }
.hb-mrow b { display: block; font-weight: 550; }
.hb-mrow small { font-size: 12px; color: var(--ink-4); }
.hb-mrow.arch { cursor: default; opacity: .7; }
@media (max-width: 1260px) {
  .hb-today { grid-template-columns: 1fr; }
  .hb-prog { border-right: 0; border-bottom: 1px solid var(--rule); padding-right: 0; }
  .hb-list { padding-left: 0; }
  .hb-row { grid-template-columns: 44px minmax(0, 1fr) auto 110px; }
  .hb-crow { grid-template-columns: minmax(0, 1fr) auto; }
  .hb-crow dl { grid-column: 1 / -1; }
  .hb-mrow { grid-template-columns: 22px minmax(0, 1fr) 130px 180px; }
}
.modal.hbm { width: min(640px, calc(100vw - 48px)); }

/* ================= 0.14 · Hábitos em painéis ================= */
.hb2-top { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.5fr); align-items: start; }
.hb2-ringw { position: relative; width: 168px; height: 168px; margin: 6px auto 0; align-self: start; }
.hb2-ringc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hb2-ringc b { font: 650 44px/1 var(--display); letter-spacing: -.035em; }
.hb2-ringc small { margin-top: 4px; font-size: 12px; color: var(--ink-4); }
.hb2-msg { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.hb2-kpi { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0 0; border-top: 1px solid var(--panel-line); }
.hb2-kpi > div { padding: 14px 10px 4px 0; }
.hb2-kpi > div + div { padding-left: 16px; border-left: 1px solid var(--panel-line); }
.hb2-kpi dt { font-size: 12px; color: var(--ink-3); }
.hb2-kpi dd { margin: 6px 0 0; font: 600 24px/1 var(--display); letter-spacing: -.02em; }
.hb2-kpi p { margin: 5px 0 0; font-size: 11.5px; color: var(--ink-4); }
.hb2-areas { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--panel-line); display: flex; flex-direction: column; gap: 9px; }
.hb2-ar { display: grid; grid-template-columns: 78px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.hb2-ar span { display: inline-flex; align-items: center; gap: 7px; }
.hb2-ar span i { width: 7px; height: 7px; border-radius: 50%; background: var(--gc); }
.hb2-ar > div { height: 6px; border-radius: 3px; background: var(--rule-2); overflow: hidden; }
.hb2-ar > div b { display: block; height: 100%; border-radius: 3px; background: var(--gc); }
.hb2-ar em { font-style: normal; text-align: right; font: 600 12.5px var(--display); }
.g0 { --gc: var(--acid-fill); } .g1 { --gc: var(--tone-a); } .g2 { --gc: var(--tone-b); }
.g3 { --gc: color-mix(in srgb, var(--acid-fill) 50%, transparent); } .g4 { --gc: color-mix(in srgb, var(--tone-a) 50%, transparent); } .g5 { --gc: var(--ink-4); }
.hb2-listpn .hb-gl { margin: 14px 0 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); }
.hb2-listpn .hb-grp:first-child .hb-gl { margin-top: 0; }
.hb2-listpn .hb-row { padding: 11px 12px; margin: 0 -12px; border-radius: 12px; border-bottom: 0; transition: background .2s; }
.hb2-listpn .hb-row:hover { background: var(--hover); }
.hb2-listpn .hb-row.done { background: color-mix(in srgb, var(--acid-fill) 7%, transparent); }
.hb-row.done .hb-chk { background: var(--acid-fill); border-color: var(--acid-fill); }
.hb-cell.ok { background: var(--acid-fill); }
html[data-theme="light"] .hb-cell.ok, html[data-theme="light"] .hb-mc i.on { background: var(--acid-fill); }
.hb-mc i.on { background: var(--acid-fill); }
.hb-cell.miss { background: repeating-linear-gradient(135deg, var(--rule-2) 0 2px, transparent 2px 5px); }
.pn .hb-week th, .pn .hb-week td, .pn .hb-week tbody th { border-bottom-color: var(--panel-line); }
.pn .hb-cons { border-top: 0; }
.pn .hb-crow { border-bottom-color: var(--panel-line); padding: 14px 0; }
.pn .hb-crow:last-child { border-bottom: 0; }
.hb2-rate { display: flex; align-items: center; gap: 10px; }
.hb2-rate small { margin: 0 !important; }
.hb2-rate .mring-l { font-size: 11px; }
.hb-crow dl { grid-template-columns: 80px 70px 150px; align-items: center; }
.ch-svg .hb2-ma { stroke: var(--ink); stroke-width: 2; opacity: .75; }
html[data-theme="light"] .ch-svg .hb2-ma { stroke: var(--ink-2); }
.lg-ln.hb2-lgl { background: var(--ink-2); }
.pn .hb-manage { border-top: 0; }
@media (max-width: 1260px) {
  .hb2-top { grid-template-columns: 1fr; }
  .hb2-sum { display: grid; grid-template-columns: 180px minmax(0, 1fr); column-gap: 24px; }
  .hb2-sum .pn-h { grid-column: 1 / -1; }
  .hb2-sum .hb2-ringw { grid-row: 2 / 5; }
  .hb2-sum .hb2-kpi { margin-top: 0; border-top: 0; }
}

/* ===== 0.24 · Acompanhar: a grade da semana é onde se marca; constância abre em modal ===== */
.pn-grid.hb3-top { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); align-items: start; }
.hb3-weekpn { min-width: 0; }
.hb3-weekpn .hb-week { margin-top: 6px; }
.hb-week .hb3-c { width: 1%; padding-left: 10px; white-space: nowrap; }
.hb3-cbtn { gap: 6px; height: 30px; padding: 0 10px; font-size: 12.5px; color: var(--ink-3); }
.hb3-cbtn svg { width: 14px; height: 14px; }
.hb3-cbtn:hover { color: var(--ink); }
.hb-week tbody tr:hover th b { color: var(--ink); }
.hb-cell.part { box-shadow: inset 0 0 0 1.5px var(--tone-a); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.hb3-note { margin-top: 14px; }
@media (max-width: 1360px) {
  .pn-grid.hb3-top { grid-template-columns: 1fr; }
  .hb3-weekpn { order: -1; }
  .hb2-sum { display: grid; grid-template-columns: auto 1fr; column-gap: 28px; align-items: center; }
  .hb2-sum > .pn-h, .hb2-sum > .hb2-areas { grid-column: 1 / -1; }
  .hb2-sum > .hb2-ringw { grid-row: span 2; }
}
@media (max-width: 1100px) { .hb3-cbtn span { display: none; } }

/* modal de constância */
.modal.hb3-modal { width: min(620px, calc(100vw - 48px)); }
.hb3-cm { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; margin: 22px 0 6px; }
.hb3-ring { position: relative; width: 116px; height: 116px; }
.hb3-ring .hb2-ringc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hb3-ring .hb2-ringc b { font: 650 26px/1 var(--display); letter-spacing: -.02em; }
.hb3-ring .hb2-ringc small { font-size: 11.5px; color: var(--ink-4); margin-top: 4px; }
.hb3-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; }
.hb3-kpi dt { font-size: 11.5px; color: var(--ink-4); }
.hb3-kpi dd { margin: 6px 0 2px; font: 650 24px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.hb3-kpi p { margin: 0; font-size: 11.5px; color: var(--ink-4); line-height: 1.35; }
.hb3-cap { margin: 0 0 10px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.hb3-map { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.hb3-heat { display: flex; gap: 8px; }
.hb3-wd { display: grid; grid-template-rows: repeat(7, 16px); row-gap: 4px; padding-top: 22px; font-size: 10.5px; line-height: 16px; color: var(--ink-4); }
.hb3-months { display: grid; grid-template-columns: repeat(12, 16px); gap: 4px; height: 18px; margin-bottom: 4px; font-size: 10.5px; color: var(--ink-4); white-space: nowrap; }
.hb-mini.hb3-mini { grid-template-columns: repeat(12, 16px); gap: 4px; }
.hb3-mini .hb-mc { grid-template-rows: repeat(7, 16px); gap: 4px; }
.hb3-mini .hb-mc i { border-radius: 4px; }
.hb3-leg { margin-top: 12px; }
.hb3-sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; background: var(--rule-2); vertical-align: -1px; }
.hb3-sw.on { background: var(--acid); }
.hb3-sw.miss { background: var(--rule); box-shadow: inset 0 0 0 1px var(--line); }
.hb3-wdr { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.hb3-wrow { display: grid; grid-template-columns: 44px 1fr 44px; gap: 12px; align-items: center; height: 24px; font-size: 12.5px; color: var(--ink-3); }
.hb3-wrow > div { height: 6px; border-radius: 3px; background: var(--rule-2); overflow: hidden; }
.hb3-wrow b { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--tone-b)); }
.hb3-wrow em { font-style: normal; text-align: right; color: var(--ink-2); font-size: 12px; }

.hb3-top .hb2-ringw { width: 150px; height: 150px; }
