/* Fenología · Mes completo sin desplazamiento horizontal.
   Las columnas de fecha son flexibles: 28, 29, 30 o 31 entran en el ancho visible.
   Mantener independiente de estilos legacy y de la vista anual. */
#phenologyMonitoring .phenology-calendar-panel.phenology-month-fitted {
  --phenology-fit-potrero: 90px;
  --phenology-fit-block: 48px;
  min-width: 0 !important;
  max-width: 100% !important;
}
#phenologyMonitoring .phenology-month-fitted > .phenology-table-scroll {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-x: none;
}
#phenologyMonitoring .phenology-calendar-table.is-month {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-spacing: 0 !important;
  font-variant-numeric: tabular-nums;
}
#phenologyMonitoring .phenology-calendar-table.is-month col.phenology-fit-potrero-col {
  width: var(--phenology-fit-potrero) !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month col.phenology-fit-block-col {
  width: var(--phenology-fit-block) !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month col.phenology-fit-day-col {
  width: auto !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month
:is(.phenology-potrero-corner,.phenology-potrero-row-label) {
  left: 0 !important;
  width: var(--phenology-fit-potrero) !important;
  min-width: 0 !important;
  max-width: var(--phenology-fit-potrero) !important;
  padding: 4px 3px !important;
  overflow-wrap: anywhere;
}
#phenologyMonitoring .phenology-calendar-table.is-month
:is(.phenology-block-corner,.phenology-block-row-label) {
  left: var(--phenology-fit-potrero) !important;
  width: var(--phenology-fit-block) !important;
  min-width: 0 !important;
  max-width: var(--phenology-fit-block) !important;
  padding: 3px 2px !important;
  overflow-wrap: anywhere;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-day-head,
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-day-head.phenology-day-active-col,
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-day-head.phenology-day-empty-col {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 27px !important;
  padding: 2px 0 !important;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-day-head strong {
  display: block;
  font-size: clamp(6px, .8vw, 10px) !important;
  letter-spacing: -0.035em;
  font-weight: 850;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.15 !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month
:is(.phenology-calendar-cell,.phenology-gantt-cell,.phenology-gantt-empty) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: hidden;
  padding: 1px !important;
  box-sizing: border-box;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-calendar-records {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 27px;
  box-sizing: border-box;
  padding: 3px 4px !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-left-width: 2px !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event strong,
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event small {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  line-height: 1.08 !important;
  -webkit-line-clamp: unset !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event strong {
  font-size: .63rem !important;
}
#phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event small {
  font-size: .52rem !important;
}
@media(max-width:980px){
  #phenologyMonitoring .phenology-month-fitted {
    --phenology-fit-potrero: 68px;
    --phenology-fit-block: 39px;
  }
}
@media(max-width:560px){
  #phenologyMonitoring .phenology-month-fitted {
    --phenology-fit-potrero: 48px;
    --phenology-fit-block: 30px;
  }
  #phenologyMonitoring .phenology-calendar-table.is-month
  :is(.phenology-potrero-row-label,.phenology-block-row-label) {
    font-size: .51rem !important;
    line-height: 1.05 !important;
  }
  #phenologyMonitoring .phenology-calendar-table.is-month .phenology-day-head {
    height: 24px !important;
  }
  #phenologyMonitoring .phenology-calendar-table.is-month .phenology-day-head strong {
    font-size: 6px !important;
  }
  #phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event {
    min-height: 21px !important;
    padding: 2px 1px !important;
    border-left-width: 1px !important;
  }
  #phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event strong {
    font-size: .53rem !important;
  }
  #phenologyMonitoring .phenology-calendar-table.is-month .phenology-gantt-event small {
    font-size: .44rem !important;
  }
}
@media(max-width:360px){
  #phenologyMonitoring .phenology-month-fitted {
    --phenology-fit-potrero: 41px;
    --phenology-fit-block: 25px;
  }
}

/* Filtro de fechas del mapa fenológico: compacto y adaptado a terreno. */
#phenologyMonitoring .phenology-toolbar-filters .phenology-date-filter { min-width: 130px; }
#phenologyMonitoring .phenology-toolbar-filters .phenology-date-filter input {
  width: 148px;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid #bcd4c8;
  border-radius: 6px;
  background: #fff;
  color: #18352b;
  font: inherit;
  font-size: .82rem;
}
#phenologyMonitoring .phenology-toolbar-filters .phenology-date-clear {
  min-height: 38px;
  padding: 0 10px;
}
#phenologyMonitoring .phenology-toolbar-filters .phenology-date-error {
  flex-basis: 100%;
  color: #9d2b2b;
  font-size: .78rem;
  font-weight: 700;
}
@media (max-width: 680px) {
  #phenologyMonitoring .phenology-toolbar-filters .phenology-date-filter { flex: 1 1 145px; }
  #phenologyMonitoring .phenology-toolbar-filters .phenology-date-filter input { width: 100%; }
}
