/* Homepage V2 analytical components. Scoped to live dashboard and inert layout previews. */
.custom-home .hv2-kpis{display:grid;grid-template-columns:repeat(var(--kpi-count,6),minmax(0,1fr));gap:12px}
.custom-home .hv2-kpi{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;min-width:0;min-height:126px;padding:12px;border:1px solid color-mix(in srgb,var(--metric-color) 28%,var(--border-subtle));border-radius:var(--home-radius,10px);background:linear-gradient(125deg,color-mix(in srgb,var(--metric-color) 7%,var(--surface)),var(--surface));color:var(--text);cursor:pointer}
.custom-home .hv2-kpi:hover{border-color:var(--metric-color);background:linear-gradient(125deg,color-mix(in srgb,var(--metric-color) 13%,var(--surface)),var(--surface))}
.custom-home .hv2-kpi-heading{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--secondary);line-height:1.2;min-height:30px}
.custom-home .hv2-kpi-heading i{display:grid;place-items:center;width:30px;height:30px;flex-shrink:0;color:var(--metric-color);background:color-mix(in srgb,var(--metric-color) 18%,transparent);border:1px solid color-mix(in srgb,var(--metric-color) 24%,transparent);border-radius:8px}
.custom-home .hv2-kpi-heading svg{width:20px;height:20px}
.custom-home .hv2-kpi-value{display:flex;flex-direction:column;gap:3px;max-width:100%;font-size:clamp(17px,1.5vw,23px);line-height:1.2;font-weight:700;letter-spacing:-.4px;overflow-wrap:anywhere}
.custom-home .hv2-kpi-value span+span{font-size:.78em;color:var(--secondary)}
.custom-home .hv2-kpi-change{font-size:12px;font-weight:600;color:var(--metric-color);max-width:100%;position:relative;z-index:1}
.custom-home .hv2-kpi-caption{font-size:11px;color:var(--muted);margin-top:auto;max-width:75%;line-height:1.3;position:relative;z-index:1}
.custom-home .hv2-kpi-spark{position:absolute;right:0;bottom:0;width:58%;height:44px;z-index:-1;opacity:.8;pointer-events:none}
.custom-home .hv2-state-mark{position:absolute;right:12px;bottom:14px;width:8px;height:8px;border-radius:50%;background:var(--metric-color);opacity:.65}
.custom-home .hv2-chart-widget{height:100%;min-width:0}
.custom-home .hv2-chart-widget>.panel{height:100%;min-width:0}
.custom-home .hv2-chart-widget .panel-heading{gap:8px;flex-wrap:wrap;align-items:center}
.custom-home .hv2-chart-widget .panel-heading h2{margin-right:auto}.custom-home .hv2-chart-widget .panel-heading .actions{gap:4px;flex-wrap:wrap;justify-content:flex-end}
.custom-home .hv2-chart-select select{font:inherit;font-size:11px;min-height:28px;max-width:112px;width:auto;padding:3px 20px 3px 7px;border:1px solid var(--border-subtle);border-radius:6px;background:var(--raised);color:var(--secondary)}
.custom-home .hv2-channels{display:grid;grid-template-columns:minmax(120px,.95fr) minmax(0,1.15fr);gap:14px;align-items:center;min-height:174px}
.custom-home .hv2-channels.is-list{grid-template-columns:minmax(0,1fr)}
.custom-home .hv2-donut{position:relative;max-width:178px;width:100%;aspect-ratio:1;justify-self:center}
.custom-home .hv2-donut svg{display:block;width:100%;height:100%}
.custom-home .hv2-donut>div{position:absolute;inset:25%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;pointer-events:none}
.custom-home .hv2-donut strong{font-size:28px;font-weight:700;line-height:1.1}
.custom-home .hv2-donut span{font-size:12px;color:var(--muted)}
.custom-home .hv2-channel-legend{display:flex;flex-direction:column;gap:6px;min-width:0}
.custom-home .hv2-channel-row{display:flex;align-items:center;gap:8px;min-width:0;width:100%;background:transparent;border:0;border-radius:5px;color:var(--text);font:inherit;font-size:12px;text-align:left;padding:4px 0;cursor:pointer}
.custom-home .hv2-channel-row:hover{background:var(--hover)}
.custom-home .hv2-channel-row>i{display:flex;align-items:center;justify-content:center;width:22px;height:22px;background:color-mix(in srgb,var(--channel-color) 20%,transparent);color:var(--channel-color);border-radius:5px;flex-shrink:0;font-style:normal}
.custom-home .hv2-channel-row>i>*{max-width:22px;max-height:22px}
.custom-home .hv2-channel-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.custom-home .hv2-channel-row>b{font-size:12px;font-weight:500;white-space:nowrap}
.custom-home .hv2-channel-row>small{font-size:11px;color:var(--muted);min-width:27px;text-align:right}
.custom-home .hv2-channel-bars{display:flex;flex-direction:column;gap:8px;min-width:0}
.custom-home .hv2-channel-bars button{display:grid;grid-template-columns:minmax(60px,1fr) 1fr;gap:6px;background:transparent;border:0;color:var(--secondary);font:inherit;font-size:11px;text-align:left;cursor:pointer}
.custom-home .hv2-channel-bars meter{width:100%;accent-color:var(--channel-color)}
.custom-home .hv2-chart-tabs{display:inline-flex;max-width:100%;border:1px solid var(--border-subtle);border-radius:8px;padding:3px;background:var(--raised);gap:3px;margin:1px 0 8px}
.custom-home .hv2-chart-tabs button{font:inherit;font-size:11px;color:var(--secondary);padding:5px 10px;border:0;border-radius:5px;background:transparent;cursor:pointer;min-width:0}
.custom-home .hv2-chart-tabs button.active{background:var(--primary,#3978e8);color:white}
.custom-home .hv2-area-chart{position:relative;min-width:0;width:100%}
.custom-home .hv2-area-chart>svg{display:block;width:100%;height:auto;min-height:150px;overflow:visible}
.custom-home .hv2-chart-axes line{stroke:var(--border-subtle);stroke-width:1}
.custom-home .hv2-chart-axes text{font-size:10px;fill:var(--muted);font-family:inherit}
.custom-home .hv2-chart-point{opacity:.02;stroke:var(--surface);stroke-width:2;cursor:crosshair;outline:none}
.custom-home .hv2-chart-point:hover,.custom-home .hv2-chart-point:focus{opacity:1;r:6}
.custom-home .hv2-chart-tooltip{display:block;font-size:11px;color:var(--secondary);min-height:18px;text-align:right;padding:2px 5px}
.custom-home .hv2-chart-note{display:flex;align-items:center;justify-content:center;gap:5px;color:var(--muted);font-size:10px;line-height:1.4;padding-top:3px}
.custom-home .hv2-chart-note i{width:6px;height:6px;border-radius:50%;background:#328df4}
.custom-home .hv2-chart-private{display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px;min-height:170px}
.custom-home[data-device="mobile"] .hv2-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.custom-home[data-device="mobile"] .hv2-kpi{min-height:106px;padding:9px;gap:5px}
.custom-home[data-device="mobile"] .hv2-kpi-heading{font-size:12px;gap:6px;min-height:26px}
.custom-home[data-device="mobile"] .hv2-kpi-heading i{width:24px;height:24px;border-radius:6px}
.custom-home[data-device="mobile"] .hv2-kpi-heading svg{width:17px;height:17px}
.custom-home[data-device="mobile"] .hv2-kpi-value{font-size:20px}
.custom-home[data-device="mobile"] .hv2-kpi-caption{font-size:11px;max-width:100%}
.custom-home[data-device="mobile"] .hv2-channels{grid-template-columns:minmax(105px,.9fr) minmax(0,1.2fr);gap:9px;min-height:150px}
.custom-home[data-device="mobile"] .hv2-donut strong{font-size:25px}
.custom-home[data-device="mobile"] .hv2-channel-row{font-size:12px;gap:6px;min-height:32px}
.custom-home[data-device="mobile"] .hv2-chart-tabs button{min-height:32px}
.custom-home[data-device="mobile"] .hv2-chart-select select{min-height:32px}
@container (max-width:1050px){.custom-home[data-device="desktop"] .hv2-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container (min-width:1500px){.custom-home .hv2-kpi{min-height:138px}.custom-home .hv2-kpi-value{font-size:25px}}

.custom-home .hv2-chart-select>.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.custom-home .hv2-chart-point[data-active],.custom-home .hv2-chart-point:only-of-type{opacity:1}.custom-home .hv2-channel-row{font-size:13px}.custom-home .hv2-channel-row>b{font-size:13px}.custom-home[data-device=mobile] .hv2-kpi-value{font-size:clamp(18px,5.2cqi,22px)}.custom-home[data-device=mobile] .hv2-kpi{min-height:132px}.custom-home[data-device=mobile] .hv2-kpi-caption{font-size:11px}.custom-home[data-device=mobile] .hv2-chart-tooltip{font-size:12px}.custom-home[data-device=mobile] .hv2-chart-tabs button,.custom-home[data-device=mobile] .hv2-chart-select select{min-height:38px;font-size:12px}

.custom-home .hv2-kpi-caption,.custom-home[data-device=mobile] .hv2-kpi-caption{max-width:48%;font-size:11px;min-height:29px}.custom-home .hv2-kpi-spark{width:48%;height:38px;right:0;bottom:0}.custom-home .hv2-kpi-change{font-size:11px;font-weight:500}.custom-home .hv2-channel-row>span{font-size:13px}.custom-home .hv2-channel-row>small{font-size:12px}

.custom-home .hv2-chart-axes text{font-size:12px}.custom-home[data-device=mobile] .hv2-chart-axes text{font-size:17px}
