/*
 * MeteoSensor Local — sistema visual mestre v0.12.024
 * Configuració fixa el patró validat. Gràfiques n'és la primera aplicació
 * completa; les altres pantalles s'hi incorporaran una a una.
 */

:root{
  --ui-space-1:4px;
  --ui-space-2:8px;
  --ui-space-3:12px;
  --ui-space-4:16px;
  --ui-space-5:24px;
  --ui-gap-same-element:4px;
  --ui-gap-label:6px;
  --ui-gap-related-controls:8px;
  --ui-gap-content-groups:12px;
  --ui-radius-field:16px;
  --ui-radius-panel:20px;
  --ui-control-height:50px;
  --ui-section-title-size:clamp(20px,5.1vw,23px);
  --ui-item-title-size:18px;
  --ui-field-size:16px;
  --ui-control-size:clamp(15px,3.9vw,16px);
  --ui-body-size:14px;
}

:root[data-theme="dark"]{
  --ui-control-bg:var(--ms-dark-control,#1e5b49);
  --ui-control-border:var(--ms-dark-control-border,#568a76);
  --ui-primary-bg:#7bd19a;
  --ui-primary-border:#66b784;
  --ui-primary-text:#07140e;
  --ui-selected-bg:#d7e5de;
  --ui-selected-border:#8fae9f;
  --ui-selected-text:#07140e;
  --ui-context-bg:var(--ms-dark-context,#174537);
  --ui-helper:#b9c9c1;
  --ui-pending:#ff8f99;
  --ui-pending-bg:rgba(255,143,153,.10);
  --ui-pending-border:rgba(255,143,153,.48);
}

:root[data-theme="light"]{
  --ui-control-bg:var(--ms-light-control,#bdd1c8);
  --ui-control-border:var(--ms-light-control-border,#7f9f90);
  --ui-primary-bg:#75c98f;
  --ui-primary-border:var(--ms-light-active-border,#5eae7a);
  --ui-primary-text:#07140e;
  --ui-selected-bg:#e3ece7;
  --ui-selected-border:#8fae9f;
  --ui-selected-text:#07140e;
  --ui-context-bg:var(--ms-light-context,#b9cec4);
  --ui-helper:#566a61;
  --ui-pending:#a93440;
  --ui-pending-bg:rgba(169,52,64,.07);
  --ui-pending-border:rgba(169,52,64,.38);
}

/* El dibuix de les ones ocupa la meitat baixa del seu viewBox. */
.now-page>.v19-screen-heading .signal-icon{
  transform:translateY(-3px)!important;
}

/*
 * Regla de proximitat de Configuració:
 * 4 px dins del mateix element; 6 px entre etiqueta, camp i aclariment;
 * 8 px entre controls relacionats; 12 px entre grups i entre targetes.
 * Tot el contingut funcional o explicatiu viu dins d'una targeta negra.
 * El peu legal és l'única excepció deliberada fora de les targetes.
 */
:root[data-theme] .config-page.ui-system-master>.v19-screen-heading{
  margin-bottom:var(--ui-space-4)!important;
}
:root[data-theme] .config-page.ui-system-master>.config-section{
  margin:0 0 var(--ui-space-3)!important;
  padding:var(--ui-space-3)!important;
  border-radius:var(--ui-radius-panel)!important;
}

/* Jerarquia tipogràfica. */
:root[data-theme] .config-page.ui-system-master .config-section h2{
  margin:0 0 var(--ui-space-3)!important;
  color:var(--green)!important;
  font-size:var(--ui-section-title-size)!important;
  font-weight:900!important;
  line-height:1.05!important;
}
:root[data-theme] .config-page.ui-system-master .saved-copy strong,
:root[data-theme] .config-page.ui-system-master .install-preview strong,
:root[data-theme] .config-page.ui-system-master .widget-name{
  font-size:var(--ui-item-title-size)!important;
  font-weight:850!important;
  line-height:1.15!important;
}
:root[data-theme] .config-page.ui-system-master .field label,
:root[data-theme] .config-page.ui-system-master .version-row span{
  margin:0 0 6px!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:750!important;
  line-height:1.25!important;
}
:root[data-theme] .config-page.ui-system-master .field-help,
:root[data-theme] .config-page.ui-system-master .saved-copy span,
:root[data-theme] .config-page.ui-system-master .install-preview span,
:root[data-theme] .config-page.ui-system-master .release-notes,
:root[data-theme] .config-page.ui-system-master .config-footer{
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:500!important;
  line-height:1.35!important;
}

/* Capçalera de secció amb acció, sense marges negatius. */
:root[data-theme] .config-page.ui-system-master .current-station-section .config-section-title-row{
  min-height:var(--ui-control-height)!important;
  margin:0!important;
  align-items:center!important;
  gap:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .current-station-section .config-section-title-row h2{
  margin:0!important;
  padding:0!important;
}
:root[data-theme] .config-page.ui-system-master .current-station-section .save-station-top{
  width:calc(50% - 6px)!important;
  max-width:calc(50% - 6px)!important;
  flex:0 0 calc(50% - 6px)!important;
  margin:0 0 0 auto!important;
  transform:none!important;
}
:root[data-theme] .config-page.ui-system-master .current-station-section .config-grid>.field:first-child{
  margin-top:0!important;
}

/* Camps i agrupacions. */
:root[data-theme] .config-page.ui-system-master .config-grid{
  gap:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .field input,
:root[data-theme] .config-page.ui-system-master .field select{
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
  box-sizing:border-box!important;
  padding:0 14px!important;
  border-radius:var(--ui-radius-field)!important;
  font-size:var(--ui-field-size)!important;
  font-weight:850!important;
  line-height:1.10!important;
}
:root[data-theme] .config-page.ui-system-master .field-help{
  margin:var(--ui-gap-label) 0 0!important;
}
:root[data-theme] .config-page.ui-system-master .input-action{
  gap:10px!important;
}
:root[data-theme] .config-page.ui-system-master .map-button,
:root[data-theme] .config-page.ui-system-master .config-secondary{
  margin-top:0!important;
}
:root[data-theme] .config-page.ui-system-master .map-button{
  gap:var(--ui-gap-related-controls)!important;
}
:root[data-theme] .config-page.ui-system-master .map-target-icon{
  display:inline-grid!important;
  place-items:center!important;
  width:24px!important;
  height:24px!important;
  flex:0 0 24px!important;
  font-size:24px!important;
  font-weight:900!important;
  line-height:1!important;
}
:root[data-theme] .config-page.ui-system-master details.advanced-sensors{
  width:100%!important;
  height:auto!important;
  min-height:var(--ui-control-height)!important;
  margin:0!important;
  padding:0!important;
  border-radius:var(--ui-radius-field)!important;
}
:root[data-theme] .config-page.ui-system-master details.advanced-sensors summary{
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
}
:root[data-theme] .config-page.ui-system-master details.advanced-sensors .inner{
  gap:var(--ui-space-3)!important;
  margin:0!important;
  padding:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master details.advanced-sensors .inner .field:first-child{
  margin-top:0!important;
}

/* Família única de controls. */
:root[data-theme] .config-page.ui-system-master .save-station-top,
:root[data-theme] .config-page.ui-system-master .share-main,
:root[data-theme] .config-page.ui-system-master .mini-button,
:root[data-theme] .config-page.ui-system-master .config-secondary,
:root[data-theme] .config-page.ui-system-master .input-action button,
:root[data-theme] .config-page.ui-system-master .saved-actions button,
:root[data-theme] .config-page.ui-system-master .language-buttons button,
:root[data-theme] .config-page.ui-system-master .advanced-sensors summary{
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
  box-sizing:border-box!important;
  padding:0 14px!important;
  border:1px solid var(--ui-control-border)!important;
  border-radius:var(--ui-radius-field)!important;
  background:var(--ui-control-bg)!important;
  background-image:none!important;
  color:var(--text)!important;
  font-size:var(--ui-control-size)!important;
  font-weight:850!important;
  line-height:1.10!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
:root[data-theme] .config-page.ui-system-master .save-station-top,
:root[data-theme] .config-page.ui-system-master .share-main{
  background:var(--ui-primary-bg)!important;
  border-color:var(--ui-primary-border)!important;
  color:var(--ui-primary-text)!important;
}
:root[data-theme] .config-page.ui-system-master .input-action button{
  background:var(--ui-context-bg)!important;
}
:root[data-theme] .config-page.ui-system-master .language-buttons button.active,
:root[data-theme] .config-page.ui-system-master .theme-buttons button.active{
  background:var(--ui-selected-bg)!important;
  border-color:var(--ui-selected-border)!important;
  color:var(--ui-selected-text)!important;
}
:root[data-theme] .config-page.ui-system-master .saved-actions .danger{
  background:var(--ui-control-bg)!important;
  border-color:var(--ui-control-border)!important;
  color:#ff7f8a!important;
}
:root[data-theme="light"] .config-page.ui-system-master .saved-actions .danger{
  color:#b3262e!important;
}

/* Targetes interiors i relacions de proximitat. */
:root[data-theme] .config-page.ui-system-master .saved-list{
  gap:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .saved-row{
  padding:var(--ui-space-3)!important;
  border-radius:var(--ui-radius-field)!important;
}
:root[data-theme] .config-page.ui-system-master .saved-copy{
  gap:var(--ui-gap-same-element)!important;
}
:root[data-theme] .config-page.ui-system-master .saved-actions{
  gap:10px!important;
  margin-top:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .version-row{
  padding:var(--ui-gap-related-controls) 0!important;
}
:root[data-theme] .config-page.ui-system-master h2+.version-row{
  padding-top:0!important;
}
:root[data-theme] .config-page.ui-system-master .version-row span{
  margin:0!important;
}
:root[data-theme] .config-page.ui-system-master [data-action="checkupdate"]{
  margin-top:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .release-notes{
  margin-top:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .release-notes-title{
  margin:0 0 var(--ui-gap-label)!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:750!important;
  line-height:1.25!important;
  text-decoration:none!important;
}
:root[data-theme] .config-page.ui-system-master .release-notes ul{
  margin:0!important;
  padding-left:20px!important;
}
:root[data-theme] .config-page.ui-system-master .release-notes li{
  margin:var(--ui-gap-same-element) 0!important;
}

/* Compartir, selectors, widgets i Ajuda. */
:root[data-theme] .config-page.ui-system-master .install-preview-text{
  margin:0 0 var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .install-preview-text>div{
  gap:var(--ui-gap-same-element)!important;
}
:root[data-theme] .config-page.ui-system-master .share-main,
:root[data-theme] .config-page.ui-system-master .share-secondary{
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
  border-radius:var(--ui-radius-field)!important;
  font-size:var(--ui-control-size)!important;
  font-weight:850!important;
}
:root[data-theme] .config-page.ui-system-master .share-secondary{
  margin-top:var(--ui-gap-related-controls)!important;
}
:root[data-theme] .config-page.ui-system-master .install-button-with-icon{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  padding:0 14px!important;
}
:root[data-theme] .config-page.ui-system-master .install-button-with-icon img{
  position:static!important;
  inset:auto!important;
  width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  margin:0!important;
  border-radius:9px!important;
}
:root[data-theme] .config-page.ui-system-master .install-button-with-icon span{
  min-width:0!important;
  text-align:left!important;
  white-space:nowrap!important;
}
:root[data-theme] .config-page.ui-system-master .language-buttons{
  gap:var(--ui-gap-related-controls)!important;
}
:root[data-theme] .config-page.ui-system-master .language-buttons+.field-help{
  margin-top:var(--ui-gap-related-controls)!important;
}
:root[data-theme] .config-page.ui-system-master .widget-roadmap>.section-row{
  margin-bottom:var(--ui-space-3)!important;
}
:root[data-theme] .config-page.ui-system-master .widget-roadmap>.section-row h2{
  margin:0!important;
}
:root[data-theme] .config-page.ui-system-master .widget-preview.widget-stack{
  gap:var(--ui-space-4)!important;
}
:root[data-theme] .config-page.ui-system-master .widget-block{
  gap:var(--ui-space-2)!important;
}
:root[data-theme] .config-page.ui-system-master .widget-block-head{
  align-items:flex-start!important;
  gap:var(--ui-space-2)!important;
  margin:0!important;
}
:root[data-theme] .config-page.ui-system-master .widget-future{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  max-width:58%!important;
  min-height:36px!important;
  height:36px!important;
  margin:0!important;
  padding:0 14px!important;
  box-sizing:border-box!important;
  border:1px solid var(--ui-pending-border)!important;
  border-radius:999px!important;
  background:var(--ui-pending-bg)!important;
  background-image:none!important;
  color:var(--ui-pending)!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.10!important;
  text-align:center!important;
  box-shadow:none!important;
  cursor:default!important;
}

/* El peu segueix l'eix del text interior de les targetes. */
:root[data-theme] .config-page.ui-system-master>.config-footer{
  margin:var(--ui-space-2) var(--ui-space-3) var(--ui-space-4)!important;
  gap:var(--ui-space-1)!important;
}
:root[data-theme] .config-page.ui-system-master>.config-footer strong{
  font-size:var(--ui-body-size)!important;
  font-weight:850!important;
}

/*
 * Gràfiques aplica la mateixa jerarquia i el mateix ritme que Configuració.
 * Els accents de cada magnitud i la mida dels eixos es conserven perquè són
 * informació, no decoració.
 */
:root[data-theme] .charts-v012005.ui-system-master>.v19-screen-heading{
  margin-bottom:var(--ui-space-4)!important;
}

/* Selector de període: targeta, controls i aclariments. */
:root[data-theme] .charts-v012005.ui-system-master>.v3-period-panel{
  margin:0 0 var(--ui-gap-content-groups)!important;
  padding:var(--ui-gap-content-groups)!important;
  border:1px solid var(--border)!important;
  border-radius:var(--ui-radius-panel)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-period-panel .periods{
  gap:var(--ui-gap-related-controls)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-period-panel .period{
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
  margin:0!important;
  padding:0 8px!important;
  border:1px solid var(--ui-control-border)!important;
  border-radius:var(--ui-radius-field)!important;
  background:var(--ui-control-bg)!important;
  background-image:none!important;
  color:var(--text)!important;
  font-size:var(--ui-control-size)!important;
  font-weight:850!important;
  line-height:1.10!important;
  box-shadow:none!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-period-panel .period.active{
  background:var(--ui-selected-bg)!important;
  border-color:var(--ui-selected-border)!important;
  color:var(--ui-selected-text)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v5-period-notes{
  gap:var(--ui-gap-same-element)!important;
  margin:var(--ui-gap-content-groups) 0 0!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:500!important;
  line-height:1.35!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v5-period-notes p{
  margin:0!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-datebox{
  gap:var(--ui-gap-related-controls)!important;
  margin-top:var(--ui-gap-content-groups)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-datebox label{
  gap:var(--ui-gap-label)!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:750!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-datebox input,
:root[data-theme] .charts-v012005.ui-system-master .v3-datebox .btn{
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
  border-radius:var(--ui-radius-field)!important;
  font-size:var(--ui-field-size)!important;
  font-weight:850!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-datebox .btn{
  background:var(--ui-primary-bg)!important;
  background-image:none!important;
  border:1px solid var(--ui-primary-border)!important;
  color:var(--ui-primary-text)!important;
}

/* Estat de càrrega: el mateix component visual de Dades actualitzades. */
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:3px!important;
  min-height:0!important;
  margin:0 0 var(--ui-gap-content-groups)!important;
  padding:11px 14px!important;
  box-sizing:border-box!important;
  border:1px solid var(--border)!important;
  border-radius:18px!important;
  background:var(--panel-gradient)!important;
  color:var(--text)!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.loading::before{
  display:none!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .connection-state{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  padding:0!important;
  font-size:clamp(13px,3.4vw,16px)!important;
  font-weight:950!important;
  line-height:1.15!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .connection-stamp{
  display:flex!important;
  align-items:baseline!important;
  gap:5px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  white-space:normal!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .connection-label,
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .connection-stamp strong{
  font-size:clamp(12px,3.1vw,14px)!important;
  line-height:1.2!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .connection-label{
  color:var(--ui-helper)!important;
  font-weight:750!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .connection-stamp strong{
  color:var(--text)!important;
  font-weight:850!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card .state-dot{
  width:9px!important;
  height:9px!important;
  flex:0 0 9px!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.ok{
  border-color:var(--state-green,var(--green))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.ok .connection-state{
  color:var(--state-green,var(--green))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.ok .state-dot{
  background:var(--state-green,var(--green))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.warn{
  border-color:var(--state-orange,var(--status-warn,#f2a43b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.warn .connection-state{
  color:var(--state-orange,var(--status-warn,#f2a43b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.warn .state-dot{
  background:var(--state-orange,var(--status-warn,#f2a43b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.error{
  border-color:var(--state-red,var(--riseX,#d94b4b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.error .connection-state{
  color:var(--state-red,var(--riseX,#d94b4b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.error .state-dot{
  background:var(--state-red,var(--riseX,#d94b4b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.history-status-card.loading .connection-state{
  color:var(--ui-helper)!important;
}

/* Cada gràfica equival a una secció de Configuració. */
:root[data-theme] .charts-v012005.ui-system-master>.v4-chart-card,
:root[data-theme] .charts-v012005.ui-system-master>.v3-noise-empty{
  margin:0 0 var(--ui-gap-content-groups)!important;
  padding:var(--ui-gap-content-groups) var(--ui-gap-content-groups) 0!important;
  border:1px solid var(--border)!important;
  border-radius:var(--ui-radius-panel)!important;
  overflow:hidden!important;
}
:root[data-theme="dark"] .charts-v012005.ui-system-master>.v3-period-panel,
:root[data-theme="dark"] .charts-v012005.ui-system-master>.chart-load-status,
:root[data-theme="dark"] .charts-v012005.ui-system-master>.v4-chart-card,
:root[data-theme="dark"] .charts-v012005.ui-system-master>.v3-noise-empty{
  background:linear-gradient(145deg,var(--ms-dark-panel),var(--ms-dark-panel-deep))!important;
  border-color:#6E897F!important;
  box-shadow:0 8px 20px rgba(0,0,0,.31),inset 0 1px 0 rgba(255,255,255,.06)!important;
}
:root[data-theme="light"] .charts-v012005.ui-system-master>.v3-period-panel,
:root[data-theme="light"] .charts-v012005.ui-system-master>.chart-load-status,
:root[data-theme="light"] .charts-v012005.ui-system-master>.v4-chart-card,
:root[data-theme="light"] .charts-v012005.ui-system-master>.v3-noise-empty{
  background:linear-gradient(145deg,var(--ms-light-panel),var(--ms-light-panel-soft))!important;
  border-color:#8FAE9F!important;
  box-shadow:0 8px 20px rgba(23,56,43,.11),inset 0 1px 0 rgba(255,255,255,.98)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-title,
:root[data-theme] .charts-v012005.ui-system-master .v3-chart-title{
  align-items:center!important;
  gap:var(--ui-gap-content-groups)!important;
  padding:0!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-title .title-icon,
:root[data-theme] .charts-v012005.ui-system-master .v3-chart-title .title-icon{
  width:40px!important;
  height:40px!important;
  flex:0 0 40px!important;
  overflow:visible!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-title h2,
:root[data-theme] .charts-v012005.ui-system-master .v3-chart-title h2{
  margin:0!important;
  color:var(--accent)!important;
  font-size:var(--ui-section-title-size)!important;
  font-weight:900!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats{
  gap:var(--ui-gap-related-controls)!important;
  margin:var(--ui-gap-content-groups) 0 var(--ui-gap-related-controls)!important;
  border:0!important;
  border-radius:0!important;
  overflow:visible!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats>div{
  display:flex!important;
  flex-direction:column!important;
  gap:var(--ui-gap-label)!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  text-align:left!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats>div>span:first-child{
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:750!important;
  line-height:1.15!important;
  text-transform:none!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats .v4-measure{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:var(--ui-control-height)!important;
  min-height:var(--ui-control-height)!important;
  box-sizing:border-box!important;
  padding:0 6px!important;
  border:1px solid var(--ui-control-border)!important;
  border-radius:var(--ui-radius-field)!important;
  background:var(--ui-control-bg)!important;
  color:var(--text)!important;
  font-size:var(--ui-field-size)!important;
  font-weight:900!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  margin-top:auto!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats .v4-measure small{
  color:inherit!important;
  font-size:.7em!important;
  font-weight:850!important;
  line-height:1!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats .v4-measure-line,
:root[data-theme] .charts-v012005.ui-system-master .v4-stats .v4-measure-line>b,
:root[data-theme] .charts-v012005.ui-system-master .v4-stats .v4-measure-line>small{
  color:var(--text)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stats .v4-measure-line{
  align-items:baseline!important;
}
:root[data-theme] .charts-v012005.ui-system-master .chart-pressure-art{
  display:block!important;
  background-repeat:no-repeat!important;
  background-color:transparent!important;
  border-radius:0!important;
  filter:drop-shadow(0 1px 2px color-mix(in srgb,var(--press) 72%,transparent))!important;
}
:root[data-theme="dark"] .charts-v012005.ui-system-master .chart-pressure-art{
  background-image:url("assets/pressure_dark_v10904.png")!important;
  background-size:92px auto!important;
  background-position:-52px -84px!important;
}
:root[data-theme="light"] .charts-v012005.ui-system-master .chart-pressure-art{
  background-image:url("assets/pressure_light_v11037.png")!important;
  background-size:94px auto!important;
  background-position:-54px -92px!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-yunit,
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-xunit{
  fill:var(--text)!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:900!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-point{
  fill:var(--accent)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-ytext,
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-xtext{
  font-size:13px!important;
  font-weight:800!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-axis-tick{
  stroke:color-mix(in srgb,var(--text) 62%,transparent)!important;
  stroke-width:1.15!important;
  vector-effect:non-scaling-stroke!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-svg .v4-axis-tick-minor{
  stroke-width:.75!important;
  opacity:.72!important;
}

/* Ara i Gràfiques comparteixen exactament la intensitat cromàtica dels estats. */
:root[data-theme] .now-page .connection-card.ok{
  border-color:var(--state-green,var(--green))!important;
}
:root[data-theme] .now-page .connection-card.warn{
  border-color:var(--state-orange,var(--status-warn,#f2a43b))!important;
}
:root[data-theme] .now-page .connection-card.error{
  border-color:var(--state-red,var(--riseX,#d94b4b))!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-meta,
:root[data-theme] .charts-v012005.ui-system-master .v4-multi-legend{
  margin-top:var(--ui-gap-same-element)!important;
  padding:0!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:500!important;
  line-height:1.35!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-chart-card>footer{
  margin:var(--ui-gap-label) 0 0!important;
  padding:0 0 var(--ui-gap-content-groups)!important;
  border:0!important;
  background:transparent!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:500!important;
  line-height:1.35!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v31-model-point{
  margin-top:var(--ui-gap-same-element)!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v3-noise-empty>footer{
  margin:var(--ui-gap-related-controls) 0 0!important;
  padding:var(--ui-gap-related-controls) 0 var(--ui-gap-content-groups)!important;
  border:0!important;
  background:transparent!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:500!important;
  line-height:1.35!important;
}
:root[data-theme] .charts-v012005.ui-system-master .v4-stat-empty,
:root[data-theme] .charts-v012005.ui-system-master .v3-noise-empty>p{
  margin:var(--ui-gap-content-groups) 0!important;
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:500!important;
  line-height:1.35!important;
}

/* Canvi de família de dades: títol de secció + descriptor. */
:root[data-theme] .charts-v012005.ui-system-master>.v4-group-title{
  gap:var(--ui-gap-same-element)!important;
  margin:var(--ui-space-4) 4px var(--ui-gap-content-groups)!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.v4-group-title strong{
  color:var(--green)!important;
  font-size:var(--ui-section-title-size)!important;
  font-weight:900!important;
  line-height:1.05!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.v4-group-title span{
  color:var(--ui-helper)!important;
  font-size:var(--ui-body-size)!important;
  font-weight:750!important;
  line-height:1.25!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.ui-source-group strong{
  color:var(--text)!important;
  font-size:clamp(25px,6.6vw,29px)!important;
  font-weight:900!important;
  line-height:1.05!important;
}
:root[data-theme] .charts-v012005.ui-system-master>.ui-source-group span{
  color:var(--green)!important;
  font-size:clamp(17px,4.6vw,19px)!important;
  font-weight:950!important;
  line-height:1.05!important;
}

/* El darrer quadre conserva el mateix interval visual que hi ha entre quadres. */
.app:has(>.charts-v012005.ui-system-master){
  padding-bottom:var(--app-bar-height)!important;
}
:root[data-theme] .content.charts-v012005.ui-system-master{
  padding-bottom:0!important;
}

/* Regla comuna valor/unitat: unitat al 70% i alineada per la base inferior. */
:root[data-theme] .now-page .metric-value,
:root[data-theme] .now-page .data-value.reading-ink,
:root[data-theme] .now-page .trend-value,
:root[data-theme] .noise-live-main>strong,
:root[data-theme] .widget-live-value,
:root[data-theme] .widget-number{
  align-items:flex-end!important;
}
:root[data-theme] .now-page .metric-value,
:root[data-theme] .now-page .data-value.reading-ink,
:root[data-theme] .now-page .trend-value{
  display:flex!important;
}
:root[data-theme] .v4-measure{
  align-items:center!important;
}
:root[data-theme] .v4-measure-line{
  display:inline-flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  gap:3px!important;
  font:inherit!important;
  font-size:inherit!important;
  line-height:1!important;
}
:root[data-theme] .v4-measure-line>b{
  font:inherit!important;
  font-size:inherit!important;
  line-height:1!important;
}
:root[data-theme] .now-page .metric-value .unit,
:root[data-theme] .now-page .data-value .data-unit,
:root[data-theme] .v4-measure-line>small,
:root[data-theme] .noise-live-main small,
:root[data-theme] .widget-live-value .widget-unit,
:root[data-theme] .detail-current .detail-unit,
:root[data-theme] .history-val .detail-unit{
  font-size:.70em!important;
  line-height:1!important;
  align-self:flex-end!important;
  vertical-align:bottom!important;
}
:root[data-theme] .noise-live-main>strong,
:root[data-theme] .widget-number{
  display:inline-flex!important;
}

@media(max-width:390px){
  :root[data-theme] .config-page.ui-system-master .current-station-section .config-section-title-row{
    gap:var(--ui-space-2)!important;
  }
  :root[data-theme] .config-page.ui-system-master .widget-future{
    padding-inline:10px!important;
    font-size:13px!important;
  }
}
