* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #222;
  background: #fff;
}
#container {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 300pt 1fr;
  grid-template-rows: 24pt 1fr 1fr 18pt;
  grid-template-areas:
    "header header"
    "selectionPanel multivariateVis"
    "selectionPanel multivariateVis"
    "footer footer";
}
#header { grid-area: header; padding: 0 8px; }
#selectionPanel { grid-area: selectionPanel; overflow-y: auto; padding: 6px 8px; }
#multivariateVis { grid-area: multivariateVis; overflow: hidden; padding: 0; min-height: 0; }
#geoVis { display: none; } /* Task 2 */
#clusterVis { display: none; } /* Task 3 */
#footer { grid-area: footer; padding: 0 8px; font-size: 11px; color: #555; }

.outline { border: 1px solid #ccc; }
.centerTextVertical { display: flex; align-items: center; }
.boldText { font-weight: bold; }

/* ---- pannello di selezione ---- */
.panel-section { margin-bottom: 12px; }
.panel-section h3 { font-size: 13px; margin: 4px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-header button { font-size: 11px; padding: 1px 6px; }
#referenceSelect, .panel-section input[type="search"] { width: 100%; padding: 3px; margin: 2px 0 4px; }
.check-list { max-height: 260px; overflow-y: auto; border: 1px solid #ddd; padding: 2px 4px; }
.check-group-title { font-weight: 600; color: #555; margin-top: 4px; font-size: 12px; }
.check-item { display: flex; gap: 4px; align-items: baseline; padding: 1px 0 1px 6px; cursor: pointer; }
.check-item input:disabled + span { color: #aaa; }
.missing-note { color: #999; font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0; }
.chip { font-size: 11px; padding: 1px 6px; border: 1px solid #bbb; border-radius: 10px; background: #f3f3f3; cursor: pointer; }

/* ---- vista multivariata (Task 1): dot chart ---- */
#multivariateVis { overflow-y: auto; }
.mv-svg { display: block; font-size: 12px; }
.legend text { font-size: 12px; }
.legend-hint { fill: #666; font-style: italic; font-size: 11px; }
.row-label { font-size: 12.5px; font-weight: 600; fill: #222; cursor: help; }
.row-unit { font-size: 11px; fill: #666; }
.dot-axis text { fill: #555; font-size: 10.5px; }
.dot-axis path, .dot-axis line { stroke: #999; }
.dot-axis .max-tick text { font-weight: 700; fill: #333; }
.dot-segment { stroke-width: 5; stroke-linecap: round; opacity: 0.85; }
.ref-mark { cursor: help; }
.mean-mark { fill: white; stroke: #1f2a44; stroke-width: 2.5; cursor: pointer; }
.mean-mark:hover { stroke-width: 3.5; }
.ref-label { font-size: 11px; font-weight: 700; fill: #1f2a44; pointer-events: none; }
.mean-label { font-size: 11px; fill: #1f2a44; pointer-events: none; }
.lane { stroke: #e2e2e2; }
.lane-label { font-size: 10.5px; fill: #555; }
.province-mark { cursor: help; }
.row-bg { fill: #f4f6fa; }
.row-bg.hover { fill: #f4f6fa; stroke: #c9d3e3; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15)); }
.hover-overlay { pointer-events: none; }
.row-bg.pinned { fill: #eaf0f8; stroke: #9db4d4; stroke-dasharray: 4,3; }
.na-label { font-size: 11px; font-weight: 700; }
.hint { color: #666; padding: 12px; }

#tooltip {
  display: none;
  position: absolute;
  z-index: 1070;
  background-color: white;
  border: 1px solid #888;
  border-radius: 4px;
  padding: 5px;
  pointer-events: none;
}
