/* Maggiore gerarchia visiva, contrasto e leggibilità per la dashboard. */
:root{
  --ink:#17213d;
  --muted:#59647d;
  --line:#dfe4ef;
  --paper:#f2f5fb;
  --blue:#3658dc;
  --blue-dark:#2444c5;
  --violet:#8053d7;
  --coral:#e9564e;
  --yellow:#d99410;
  --green:#168864;
}
body{font-size:15px;color:#17213d;background:#f2f5fb}
.sidebar{border-right-color:#dfe4ef}
.brand-name small,.workspace-meta span,.user-meta span{color:#606b83}
.nav-label{color:#68738b}
.nav-item{font-size:13px;color:#505b74}
.nav-item.active{background:#e7ebff;color:#2948d1;box-shadow:inset 3px 0 #4059e8}
.main-area{background:#f2f5fb}
.topbar{border-bottom-color:#dfe4ef}
.breadcrumbs{color:#58647c}
.page-content{padding-top:38px}
.eyebrow{font-size:10px;color:#53607b;letter-spacing:1.35px}
h1{color:#17213d;letter-spacing:-1.7px}
.page-subtitle{font-size:14px;color:#58647c;line-height:1.55}
.button{font-size:12px}
.button-quiet{border-color:#cbd3e2;color:#35425f}
.button-primary{background:#3e58df;box-shadow:0 6px 16px #3e58df33}
.filter-strip{height:53px;border-color:#d6ddeb;box-shadow:0 3px 10px #293a5d0b}
.filter-group select{font-size:12px;color:#293653}
.filter-note{font-size:10px;color:#606b82}
.panel{border-color:#dce2ee;border-radius:14px;box-shadow:0 4px 14px #26365a0c}
.panel h2{font-size:16px;color:#1d2946}
.panel-header p{font-size:11px;color:#596680;line-height:1.4}
.text-link{font-size:11px;color:#304fce}
.kpi-card{border-color:#d7deeb;box-shadow:0 4px 12px #26365a0d}
.kpi-card:before{content:"";position:absolute;inset:0 0 auto;height:5px;border-radius:12px 12px 0 0}
.kpi-card:nth-child(1){background:linear-gradient(135deg,#e8edff 0%,#fff 78%)}
.kpi-card:nth-child(1):before{background:#4763e6}
.kpi-card:nth-child(2){background:linear-gradient(135deg,#f0eaff 0%,#fff 78%)}
.kpi-card:nth-child(2):before{background:#895bd7}
.kpi-card:nth-child(3){background:linear-gradient(135deg,#fff0eb 0%,#fff 78%)}
.kpi-card:nth-child(3):before{background:#ed6759}
.kpi-card:nth-child(4){background:linear-gradient(135deg,#e6f7ef 0%,#fff 78%)}
.kpi-card:nth-child(4):before{background:#21a47a}
.kpi-blue .kpi-icon{background:#dce4ff;color:#304fd1}
.kpi-violet .kpi-icon{background:#e9ddff;color:#7040c7}
.kpi-coral .kpi-icon{background:#ffddd5;color:#c94d42}
.kpi-green .kpi-icon{background:#d4f1e4;color:#147b5a}
.kpi-label{font-size:9px;letter-spacing:.9px;color:#495673}
.kpi-value{color:#1a2746}
.kpi-foot{font-size:9px;color:#5c6880}
.chart-legend{font-size:10px;color:#4f5b75}
.x-labels{font-size:9px;color:#58647b}
.trend-panel{border-top:5px solid #4d63e4;background:linear-gradient(180deg,#f4f6ff 0,#fff 92px)}
.topics-panel{border-top:5px solid #ec755f;background:linear-gradient(180deg,#fff7f2 0,#fff 92px)}
.priority-panel{border-top:5px solid #e5a52d;background:linear-gradient(180deg,#fff9ed 0,#fff 92px)}
.insight-panel{border-top:5px solid #28a982;background:linear-gradient(180deg,#effaf5 0,#fff 92px)}
.municipalities-panel{border-top:5px solid #885bd8;background:linear-gradient(180deg,#f7f2ff 0,#fff 92px)}
.collection-panel{border-top:5px solid #258fc3;background:linear-gradient(180deg,#eff8ff 0,#fff 92px)}
.topic-list{gap:17px}
.topic-name{font-size:11px;color:#34415d}
.topic-name b{font-size:11px;color:#1d2a49}
.topic-emoji{height:24px;width:24px;border-radius:8px;font-size:13px}
.topic-track{height:8px;margin-left:32px;background:#e7ebf3}
.bar-blue{background:#4865e8}.bar-coral{background:#ed6659}.bar-yellow{background:#e7a626}.bar-violet{background:#8d5bd9}.bar-green{background:#22a77c}
.panel-footnote{font-size:10px;color:#5c6881;border-color:#e1e6ef}
.topic-list,.topic-row{color:#26324d}
.table-wrap th{font-size:10px;color:#53607a}
.table-wrap td{font-size:11px;color:#34415d}
.page-footer{font-size:9px;color:#66718a}
.profile-analysis{margin-top:25px}
.profile-section-heading{padding:17px 19px;margin:0 0 14px;border-radius:15px;background:linear-gradient(105deg,#e6ebff 0%,#f3eaff 48%,#fff0e8 100%);border:1px solid #d9dff1}
.profile-section-heading h2{font-size:27px;color:#182443;margin-top:10px}
.profile-section-heading h2 span{color:#e9564e}
.profile-section-heading p{font-size:12px;color:#4f5d79;margin-top:5px}
.sample-chip{background:#fff;border:1px solid #cbd5e7;color:#465371;font-size:10px;padding:9px 12px;box-shadow:0 2px 6px #293a5d0c}
.sample-chip strong{font-size:12px;color:#24365d}
.profile-chart-grid{gap:15px}
.profile-chart-card{position:relative;overflow:hidden;min-height:280px;padding:19px 20px;border-color:#d6deec}
.profile-chart-card:before{content:"";position:absolute;inset:0 0 auto;height:5px;background:linear-gradient(90deg,#4564e8,#945cdd,#f26b68,#efad3c,#27a982)}
.profile-chart-card:nth-child(1){background:linear-gradient(180deg,#faf8ff 0,#fff 112px)}
.profile-chart-card:nth-child(2){background:linear-gradient(180deg,#f4f7ff 0,#fff 112px)}
.profile-chart-card:nth-child(3){background:linear-gradient(180deg,#fff6f3 0,#fff 112px)}
.profile-chart-card:nth-child(4){background:linear-gradient(180deg,#f1fbf7 0,#fff 112px)}
.profile-chart-card:nth-child(5){background:linear-gradient(180deg,#fff9ed 0,#fff 112px)}
.profile-chart-card h3,.crosstab-panel h3{font-size:16px;color:#1b2745}
.profile-chart-card .panel-header p{font-size:11px;color:#5b6680}
.profile-mini-icon{height:34px;width:34px;border-radius:11px;font-size:16px}
.gender-mini{background:#e9e1ff;color:#7041ca}
.age-mini{background:#e2e8ff;color:#3e54cc}
.education-mini{background:#ffe5df;color:#c64f44}
.work-mini{background:#d9f4e9;color:#147c5e}
.sector-mini{background:#ffedc9;color:#9a6505}
.profile-bars{gap:12px;margin-top:20px}
.profile-row{grid-template-columns:minmax(0,1fr) 37%;gap:13px}
.profile-label{gap:3px 9px}
.profile-label span{font-size:11px;color:#35425e}
.profile-label b{font-size:12px;color:#1d2a4b}
.profile-label small{font-size:9px;color:#68748c}
.profile-row>i{height:10px;background:#e7ebf3;border-radius:6px}
.profile-fill{border-radius:6px}
.fill-blue{background:#4564e8}
.fill-violet{background:#8758d5}
.fill-coral{background:#ed655b}
.fill-yellow{background:#e7a728}
.fill-green{background:#23a77d}
.profile-card-foot{font-size:10px;color:#586680;border-color:#e0e5ee}
.profile-card-foot strong{color:#293958}
.crosstab-panel{margin-top:15px;padding:20px;border-top:5px solid #5c63df}
.cross-filters label{font-size:10px;color:#4f5c76}
.cross-filters select{height:34px;border-color:#cbd4e5;color:#263451;font-size:11px}
.cross-chart{row-gap:15px;column-gap:38px;margin-top:20px}
.cross-row{grid-template-columns:minmax(120px,190px) minmax(60px,1fr) 42px;gap:12px}
.cross-category strong{font-size:11px;color:#33415f}
.cross-category small{font-size:9px;color:#64708a}
.cross-track{height:10px;background:#e6eaf3}
.cross-track i{background:linear-gradient(90deg,#3e5fe2,#945bd6,#e96969)}
.cross-value{font-size:11px;color:#223253}
.cross-row.suppressed .cross-track{background:repeating-linear-gradient(135deg,#edf0f5,#edf0f5 5px,#dce2ed 5px,#dce2ed 10px)}
@media(max-width:980px){
  .page-content{padding-left:24px;padding-right:24px}
  .profile-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .page-content{padding:24px 14px 18px}
  h1{font-size:36px;letter-spacing:-1.4px}
  .page-subtitle{font-size:13px}
  .filter-strip{min-height:50px}
  .filter-group select{font-size:11px}
  .kpi-label{font-size:8px}
  .kpi-foot{font-size:8px}
  .topic-name,.topic-name b{font-size:10px}
  .topic-emoji{width:23px;height:23px}
  .panel{padding:16px 14px}
  .panel h2{font-size:15px}
  .panel-header p{font-size:10px}
  .profile-section-heading{padding:15px 14px}
  .profile-section-heading h2{font-size:23px}
  .profile-section-heading p{font-size:11px;line-height:1.45}
  .sample-chip{font-size:10px}
  .profile-chart-grid{grid-template-columns:1fr;gap:11px}
  .profile-chart-card{padding:18px 16px;min-height:unset}
  .profile-row{grid-template-columns:minmax(0,1fr) 35%;gap:10px}
  .profile-label span{font-size:12px}
  .profile-label b{font-size:12px}
  .profile-label small{font-size:10px}
  .profile-row>i{height:11px}
  .cross-filters{gap:7px}
  .cross-filters label{font-size:10px}
  .cross-filters select{height:36px;font-size:11px}
  .cross-row{grid-template-columns:minmax(115px,150px) minmax(45px,1fr) 38px;gap:8px}
  .cross-category strong{font-size:10px}
  .cross-category small{font-size:8px}
  .cross-value{font-size:10px}
  .profile-card-foot{font-size:9px;line-height:1.5}
}
