/* VIAVIVA Core V2 — Екран 2 „ViaViva Health“: зелена гама на метаболитните модули */
.health-page{
  --hv-green:#0f6b45;--hv-green-strong:#0a5536;--hv-green-mid:#1f9a63;--hv-green-soft:#e3f4ea;--hv-line:#cfe5d8;
  background:radial-gradient(circle at 15% 0,rgba(31,154,99,.10),transparent 32rem),linear-gradient(180deg,#f6fbf8 0,#eef7f2 100%);
}
.health-page .brand h1{color:var(--hv-green-strong)}
.health-page .bar-btn{color:var(--hv-green)}
.health-page .bar-btn:hover{background:var(--hv-green-soft)}
.health-page .bar-btn-out{background:var(--hv-green);border-color:var(--hv-green);color:#fff}
.health-page .bar-btn-out:hover{background:var(--hv-green-strong)}
.health-page :focus-visible{outline-color:var(--hv-green-mid)}

.screen-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.switch-core{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:8px 14px;border-radius:12px;background:var(--vv-navy);color:#fff;font-weight:700;text-decoration:none}
.switch-core .ico{transform:rotate(180deg)}
.switch-core:hover{background:var(--vv-navy-strong)}
.switch-badge{display:inline-block;padding:4px 10px;border-radius:999px;background:var(--hv-green-soft);color:var(--hv-green-strong);font-size:13px;font-weight:700}

.health-profile{margin-bottom:10px}
.health-grid{display:grid;gap:10px;align-items:start}
.health-page .card{border-color:var(--hv-line)}
.health-page .mod-ico{background:var(--hv-green-soft);color:var(--hv-green)}
.health-page .mod h2{color:var(--hv-green-strong)}
.health-page .mod-dev{background:#fbfdfc;border-color:#bcd9c8}
.health-page .mod-dev .mod-ico{background:#eef4f0;color:#567566}
.health-page .btn-primary{background:var(--hv-green)}
.health-page .btn-primary:hover{background:var(--hv-green-strong)}
.health-page .btn-secondary{background:var(--hv-green-soft);border-color:var(--hv-line);color:var(--hv-green-strong)}
.health-page .btn-ghost{color:var(--hv-green-strong);border-color:#a9cdb8}
.health-page .badge-preview,.health-page .badge-live{background:#d3efdf;color:#0a5536}
.health-page .m2-group{background:#f0f6f2}
.health-page .mod-live .m2-group-head .ico{color:var(--hv-green)}
.health-off{display:grid;gap:10px;justify-items:start}

@media (min-width:768px){
  .health-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .health-profile{max-width:520px}
}
@media (min-width:1100px){
  .health-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ---------- Core V2 UX-FIX01 (CV2-03): компактен Health ---------- */
.hv-bar{position:sticky;top:0;z-index:20;background:rgba(246,251,248,.96);border-bottom:1px solid var(--hv-line);backdrop-filter:saturate(1.2) blur(6px)}
.hv-bar-in{max-width:960px;margin:0 auto;display:flex;align-items:center;gap:8px;padding:8px max(12px,env(safe-area-inset-left)) 8px max(12px,env(safe-area-inset-right))}
.hv-back{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px 12px;border-radius:12px;background:var(--vv-navy);color:#fff;font-weight:700;font-size:15px;text-decoration:none;white-space:nowrap;flex:none}
.hv-back .ico{transform:rotate(180deg);width:18px;height:18px}
.hv-back:hover{background:var(--vv-navy-strong)}
.hv-title{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:6px;margin:0;font-size:17px;font-weight:800;color:var(--hv-green-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hv-title .ico{width:18px;height:18px;color:var(--hv-green-mid);flex:none}
.hv-out{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;border:1px solid var(--hv-line);background:#fff;color:var(--hv-green);flex:none;cursor:pointer}
.hv-out:not([hidden]){display:grid}
.hv-out[hidden]{display:none}
.hv-out:hover{background:var(--hv-green-soft)}

main.hv{max-width:960px;padding-top:10px}
.hv-profile{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;margin:0 0 10px;font-size:15px;color:#33473d}
.hv-profile strong{color:#10251a;min-width:0;overflow-wrap:anywhere}
.hv-profile-lbl{color:#567566}
.hv-test{margin-left:auto;padding:2px 8px;border-radius:999px;background:var(--hv-green-soft);color:var(--hv-green-strong);font-size:12px;font-weight:700}

.hv-grid{display:grid;gap:10px}
.health-page .hv-mod{padding:12px 14px;display:grid;gap:10px}
.hv-row{display:flex;align-items:center;gap:10px;min-width:0}
.hv-row h2{margin:0;font-size:17px;line-height:1.2;flex:1;min-width:0}
.hv-row .mod-ico{width:36px;height:36px;flex:none}
.hv-row .badge{flex:none;font-size:12px}
.hv-btn{width:100%;justify-content:center;min-height:46px}
.hv-m2-text{margin:0;font-size:14px}
.mod-m2[data-module-status="in-development"] .hv-m2-text{display:none}
.hv-m2-text:empty{display:none}
.hv-actions{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.hv-action{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 10px;border-radius:12px;background:#f0f6f2;border:1px solid #dcebe2}
.hv-action>.ico{width:20px;height:20px;color:#567566;flex:none}
.hv-action h3{margin:0;flex:1;min-width:0;font-size:15px;font-weight:700;color:#24382d}
.hv-action .m2-slot{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;flex:none;max-width:60%}
.hv-action .soon{font-size:12px;padding:3px 8px;border-radius:999px;background:#e4ebe6;color:#4f6357;font-weight:700;white-space:nowrap}
.mod-live .hv-action>.ico{color:var(--hv-green)}

.hv-more-btn{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;margin-top:10px;padding:8px 14px;border-radius:14px;border:1px dashed #a9cdb8;background:#fff;color:var(--hv-green-strong);font:inherit;font-weight:700;cursor:pointer;text-align:left}
.hv-more-btn .ico{width:18px;height:18px}
.hv-more-btn::after{content:"";margin-left:auto;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-3px);transition:transform .15s}
.hv-more-btn[aria-expanded="true"]::after{transform:rotate(-135deg) translateY(-2px)}
.hv-more-count{padding:1px 8px;border-radius:999px;background:var(--hv-green-soft);font-size:12px}
.hv-more{display:grid;gap:8px;margin-top:8px}
.hv-more[hidden]{display:none}
.hv-note{margin:2px 0 0;font-size:13px;color:#567566}

@media (max-width:359px){
  .hv-back{padding:6px 10px;font-size:14px}
  .hv-title{font-size:15px}
  .hv-row .badge{font-size:11px;padding:2px 7px}
  .hv-row h2{font-size:16px}
}
@media (min-width:768px){
  .hv-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);align-items:start;gap:14px}
  .hv-more{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hv-more .hv-note{grid-column:1/-1}
  .hv-more-btn{width:auto}
}
body.vv.health-page{background:radial-gradient(circle at 15% 0,rgba(31,154,99,.10),transparent 32rem),linear-gradient(180deg,#f6fbf8 0,#eef7f2 100%)}
html:has(body.health-page){background:#eef7f2}
@media (max-width:420px){
  .hv-title .ico{display:none}
  .hv-title{font-size:16px}
  .hv-back{padding:6px 10px;font-size:14px}
}
@media (max-width:359px){
  .hv-title-brand{display:none}
}
@media (max-width:359px){ .hv-test{display:none} }
