/* Panoramica, design v2 (public/studio/home.js). Built on the shell's v2 blocks (.v2-card .v2-kpi .v2-row .v2-chip .v2-btn);
   only the layout, the charts and the dark card live here. The grid follows the width of the content, not of the window
   (container queries), so it is the same with the menu open, closed or as a drawer. */
.h-home{container-type:inline-size;display:flex;flex-direction:column;gap:20px}
.h-home p{margin:0}
.h-home ul{list-style:none;margin:0;padding:0}

/* hero */
.h-hero{display:flex;align-items:center;gap:var(--gap);flex-wrap:wrap;padding:8px 8px 0}
.h-hello{flex:1 1 360px;min-width:0;display:flex;flex-direction:column;gap:6px}
.h-hello p{color:var(--mut);font-size:16px;line-height:24px}
.h-hero-acts{display:flex;gap:16px;flex-wrap:wrap}

/* KPI row: four, then two, then one */
.h-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--gap)}
.h-kpi h2{margin:0;font-size:16px;line-height:24px;font-weight:600}
.h-kpi .v2-metric{overflow-wrap:anywhere}
.h-kpi .v2-metric.h-word{font-size:var(--fs-hero);line-height:1.22;letter-spacing:-1px}
.h-kpi .v2-kpi-foot{align-items:flex-start}

/* rows of cards (column widths from the design at 1112 px of content) */
.h-row{display:grid;gap:var(--gap);align-items:stretch}
.h-row.op2{grid-template-columns:minmax(0,1fr) 300px 380px}
.h-row.op3,.h-row.ad3{grid-template-columns:minmax(0,1fr) 300px 300px}
.h-row.ad2,.h-row.su2{grid-template-columns:minmax(0,1fr) 400px}
.h-row.su3{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 260px}
.h-row.ad3.noold{grid-template-columns:minmax(0,1fr) 300px}
.h-card{display:flex;flex-direction:column;gap:16px;min-width:0;position:relative;overflow:hidden}
.h-head{display:flex;align-items:center;gap:12px;min-height:26px}
.h-head h2{flex:1;min-width:0}
.h-acts{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:auto;position:relative}
.h-grow{flex:1}
.h-empty{display:flex;flex-direction:column;gap:4px;color:var(--mut);font-size:16px;line-height:24px}
.h-empty b{color:var(--ink);font-weight:600}

/* list rows: the whole row is one button (≥ 44 px), its chip says the status in words */
.h-list{display:flex;flex-direction:column;gap:0}
.h-link{width:100%;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--r-tile);padding:10px 8px;margin:0 -8px;width:calc(100% + 16px)}
.h-link:hover{background:var(--surface-2)}
.h-link:hover .v2-text b{color:var(--green)}

/* progress bars */
.h-progress{height:10px;border-radius:var(--r-pill);background:var(--surface-2);overflow:hidden}
.h-progress i{display:block;height:100%;border-radius:var(--r-pill);background:var(--green)}
.h-progress.dark{background:rgba(255,255,255,.18)}
.h-progress.dark i{background:var(--green-300)}

/* «Continua da dove eri rimasta» */
.h-product{font-size:var(--fs-title);line-height:1.33;font-weight:700;letter-spacing:-.5px;color:var(--green-900);overflow-wrap:anywhere}
.h-where{color:var(--mut);font-size:16px;line-height:24px}

/* bar charts (week, monthly spend): bars of 36 px, value above, day below */
.h-chart{display:flex;align-items:flex-end;justify-content:space-between;gap:6px;min-height:236px}
.h-spend{min-height:216px}
.h-col{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;flex:0 1 36px}
.h-col.today{flex:0 0 auto}
.h-col .h-bar{display:block;width:36px;max-width:100%;border-radius:18px;background:var(--green)}
.h-col.today .h-bar{background:var(--green-900)}
.h-col.future .h-bar{background:repeating-linear-gradient(135deg,var(--green-300) 0 2px,#fff 2px 6px);box-shadow:inset 0 0 0 1.5px var(--green-300)}
.h-val,.h-day{font-size:15px;line-height:22px;font-weight:500;color:var(--mut);white-space:nowrap}
.h-col.today .h-day{font-weight:700;color:var(--ink)}
.h-tip{padding:3px 10px;border-radius:var(--r-pill);background:var(--green-900);color:#fff;font-size:15px;line-height:22px;font-weight:500;white-space:nowrap}
.h-legend{display:flex;flex-wrap:wrap;gap:8px 18px;color:var(--mut);font-size:15px;line-height:22px;font-weight:500}
.h-legend li{display:flex;align-items:center;gap:8px}
.h-dot{width:14px;height:14px;border-radius:50%;background:var(--green);flex:none}
.h-dot.dark{background:var(--green-900)}
.h-dot.mid{background:var(--brand)}
.h-hatch{width:14px;height:14px;border-radius:50%;flex:none;background:repeating-linear-gradient(135deg,var(--green-300) 0 2px,#fff 2px 4.5px);box-shadow:inset 0 0 0 1.5px var(--green-300)}
.h-credit.h-videos{justify-content:flex-start}
.h-videos .ic{width:20px;height:20px;flex:none;color:var(--green-700)}
.h-credit{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:12px 16px;border-radius:var(--r-tile);background:var(--surface-2);font-size:15px;line-height:22px;font-weight:500}

/* the catalogue gauge: a half circle in three parts, the percentage under it */
.h-gauge{position:relative;display:flex;flex-direction:column;align-items:center}
.h-gauge svg{width:100%;max-width:280px;height:auto;display:block}
.h-gauge path{fill:none;stroke-width:40}
.h-g-track{stroke:var(--surface-2)}
.h-g-with{stroke:var(--green-900)}
.h-g-wip{stroke:var(--brand)}
.h-g-without{stroke:url(#h-hatchp)}
.h-gauge b{margin-top:-46px;font-size:var(--fs-num);line-height:1.19;font-weight:700;letter-spacing:-1px}
.h-gauge span{color:var(--mut);font-size:15px;line-height:22px;font-weight:500;text-align:center}
.h-catlegend{display:flex;flex-direction:column;gap:8px;font-size:15px;line-height:22px;font-weight:500}
.h-catlegend li{display:flex;align-items:center;gap:10px}
.h-catlegend li span:not([class]){flex:1}
.h-catlegend b{font-weight:700}

/* the dark card (job running, old archive, environment) and its decorative rings */
.h-dark{background:linear-gradient(125deg,#0A2E1C 14%,#0E5C33 86%);color:#fff}
.h-dark .v2-cardtitle,.h-dark .v2-metric{color:#fff}
.h-darkp{position:relative;color:rgba(255,255,255,.85);font-size:16px;line-height:24px}
.h-darkp.small{font-size:15px;line-height:22px}
.h-darkbig{position:relative;font-size:var(--fs-hero);line-height:1.22;font-weight:700;letter-spacing:-1px;overflow-wrap:anywhere}
.h-dark.idle .h-darkbig{font-size:clamp(24px,.5vw + 22.4px,28px);line-height:1.29}
.h-rings{position:absolute;right:0;bottom:0;width:300px;height:300px;pointer-events:none}   /* circles centred on the corner: always bottom right */
.h-rings circle{fill:none;stroke:rgba(255,255,255,.06);stroke-width:14}
.h-dark .v2-btn.ondark:focus-visible{outline-color:#fff}

/* loading: blocks of the final size; failing: plain words and «Riprova» */
.h-skel{border-radius:var(--r-panel);background:linear-gradient(90deg,var(--surface) 0%,var(--surface-2) 50%,var(--surface) 100%);background-size:200% 100%;animation:h-shine 1.4s linear infinite}
.h-hello .h-skel{max-width:360px;border-radius:12px}
.h-skel-line{height:24px;max-width:420px;border-radius:12px}
@keyframes h-shine{to{background-position:-200% 0}}
.h-fail{max-width:640px}
.h-fail .v2-btn{margin-top:14px}

/* medium: two KPIs a row; the first card of a row takes the full width, the others share it */
@container (max-width:1000px){
  .h-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .h-row.op2,.h-row.op3,.h-row.ad3,.h-row.su3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .h-row.op2>:first-child,.h-row.op3>:first-child,.h-row.ad3>:first-child,.h-row.su3>:first-child{grid-column:1/-1}
  .h-row.two{grid-template-columns:minmax(0,1fr)}
}
/* phone (design 30:4514): one column; what the operator does next comes first, the shortcut buttons last */
@container (max-width:640px){
  .h-kpis,.h-row.op2,.h-row.op3,.h-row.ad3,.h-row.su3{grid-template-columns:minmax(0,1fr)}
  .h-hero{display:contents}
  .h-hello{flex:none;padding:0 4px}
  .h-hero-acts{order:99;flex-direction:column}
  .h-hero-acts .v2-btn{width:100%}
  .h-row{display:contents}
  .h-kpis{order:1}
  .h-resume{order:2}.h-todo{order:3}.h-dark{order:4}.h-cat{order:5}.h-weekcard{order:6}.h-recent{order:7}
  .h-approve,.h-errors{order:2}.h-spendcard,.h-today{order:3}.h-team,.h-devices{order:5}.h-wf{order:6}
  .h-head{flex-wrap:wrap}
}

/* an Operator's pictures waiting and refused (review.js draws the list inside): no card in the card */
.h-mine{scroll-margin-top:96px}                                   /* clear of the sticky top bar when it opens */
.h-mine .m-review>.s-card{background:none;border:0;box-shadow:none;padding:0;margin:0}
.h-mine .s-h2{font-size:18px;line-height:26px;font-weight:600;margin-top:8px}
@container (max-width:640px){ .h-mine{order:1} }
