/* =========================
   Base y fondo
   ========================= */
body {
  margin: 0;
  min-height: 100vh;
  background: url('fondo_nuevo_agenda.jpeg') no-repeat center center fixed;
  background-size: cover;
  background-color: #ffffff;
  color: #0b1220;
}

@media (max-width: 600px) {
  body {
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center;
  }
}

/* Botones en rojo */
.btn,
.btn-floating,
.btn-large,
.btn-small,
.btn-flat {
  background-color: #d32f2f;
  color: #fff;
}

.btn:hover,
.btn-floating:hover,
.btn-large:hover,
.btn-small:hover,
.btn-flat:hover {
  background-color: #b71c1c;
  color: #fff;
}

/* Botones morados para usuarios especificos */
body.botones-morados .btn,
body.botones-morados .btn-floating,
body.botones-morados .btn-large,
body.botones-morados .btn-small,
body.botones-morados .btn-flat {
  background-color: #7b1fa2 !important;
  color: #fff !important;
}

body.botones-morados .btn:hover,
body.botones-morados .btn-floating:hover,
body.botones-morados .btn-large:hover,
body.botones-morados .btn-small:hover,
body.botones-morados .btn-flat:hover {
  background-color: #6a1b9a !important;
  color: #fff !important;
}


.container { padding: 28px 12px; }

/* Sidebar lateral */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sidebar-header h5 {
  margin: 0;
  font-weight: 700;
}

.sidebar-content {
  padding: 20px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .sidebar {
    width: 85vw;
    max-width: 320px;
    left: -85vw;
  }
  
  .sidebar.open {
    left: 0;
  }
  
  .sidebar-content {
    padding: 15px;
  }
  
  .sidebar-header {
    padding: 15px;
  }
  
  .sidebar-header h5 {
    font-size: 18px;
  }
  
  .sidebar-content .btn {
    font-size: 13px;
    padding: 0 12px;
    height: 40px;
    line-height: 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .sidebar-content .switch {
    font-size: 14px;
    margin-bottom: 16px !important;
  }
  
  .sidebar-content .switch label {
    font-size: 14px;
  }
  
  #userLabel {
    font-size: 14px;
    word-break: break-word;
  }
  
  .brand {
    flex-wrap: wrap;
  }
  
  #menuToggle {
    margin-right: 8px !important;
  }
}


.card-panel {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(2px);
}


.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, #60a5fa, #7dd3fc);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #04263b;
}

/* Top bar */
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* =========================
   Calendario
   ========================= */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.calendar.week-numbers {
  
  grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr);
}

/* Cabecera semana */
.header-day {
  text-align: center;
  color: #475569;
  font-weight: 700;
  padding: 6px 4px;
  font-size: clamp(12px, 1.3vw, 14px);
}

/* Día */
.day {
  height: clamp(54px, 9.5vw, 100px);
  padding: clamp(6px, 1vw, 10px);
  border-radius: 0;
  background: #ffffff;       /* blanco por defecto */
  border: 1px solid black;  
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.day:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }

/* Número de día */
.day .num {
  font-weight: 800;
  margin-bottom: 6px;
  color: #000;
  font-size: clamp(12px, 1.6vw, 16px);
  line-height: 1;
}

/* Nota dentro del día */
.noteBadge {
  margin-top: auto;
  font-size: clamp(10px, 1.3vw, 12px);
  padding: 6px 8px;
  border-radius: 0;
  background: rgba(2, 6, 23, 0.06);
  color: #111827;
  white-space: pre-wrap;     
  word-break: break-word;    
  overflow-wrap: break-word;
}

/* Mantener flechas y mes en línea */
.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; 
  gap: 8px;
}

/*flechas + texto siempre en una línea */
.top-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:nowrap;       /* evita que salten */
  gap:8px;
}

/* Flechas no crecen ni encogen */
.top-actions .btn-floating{
  flex:0 0 auto;
}

/* El mes ocupa el espacio central y puede encoger */
#monthYear{
  flex:1 1 auto;
  text-align:center;
  font-weight:800;
  min-width:0;            
  font-size:clamp(14px,4.2vw,20px);
}

/* En anchos muy pequeños, hacemos más compactas las flechas */
@media (max-width:360px){
  .top-actions .btn-floating{
    width:34px;height:34px;line-height:34px;
  }
  .top-actions .btn-floating i{
    font-size:20px;line-height:34px;
  }
}

#monthYear {
  flex: 1;
  text-align: center;
  font-weight: 800;
  min-width: auto; 
  font-size: clamp(14px, 4vw, 18px); /* Escala el tamaño según pantalla */
}
/* Paleta de colores del modal */
.color-swatch {
  width: 34px; height: 34px; border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.color-swatch.selected {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

/* Utils */
.hide { display: none; }

/* =========================
   Ajustes móviles
   ========================= */
@media (max-width: 600px) {

  .container { padding: 0 !important; }
  .row { margin-left: 0 !important; margin-right: 0 !important; }
  .row .col { padding-left: 0 !important; padding-right: 0 !important; }
  .card-panel { border-radius: 0; margin: 0; box-shadow: none; }

  /* Calendario más compacto y horizontal */
  .calendar { 
    gap: 0px; 
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .day { 
    height: clamp(60px, 13vw, 82px);
    padding: 2px !important;
  }
  .day .num {font-size: clamp(10px, 3.5vw, 13px); }
  .noteBadge { -webkit-line-clamp: 2; line-clamp: 2; }
  
  /* Asegurar que las horas semanales se vean */
  .calendar.week-hours {
    grid-template-columns: repeat(7, 1fr) minmax(45px, 60px) !important;
    min-width: 100%;
  }
  
  .calendar.week-numbers.week-hours {
    grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr) minmax(45px, 60px) !important;
    min-width: 100%;
  }
  
  .calendar-head.week-hours {
    grid-template-columns: repeat(7, 1fr) minmax(45px, 60px) !important;
  }
  
  .calendar-head.week-numbers.week-hours {
    grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr) minmax(45px, 60px) !important;
  }
  
  .week-hours-cell {
    min-width: 45px;
    width: 100%;
  }

  /* Select nativo visible y cómodo */
  .input-field select {
    display: block !important;
    width: 100%;
    height: 44px;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 8px;
    background-color: #fff;
    color: #111827;
    appearance: auto;            
  }

  /* Mejora de label de Materialize para selects nativos */
  .input-field > label {
    transform: translateY(-8px) scale(0.9);
    transform-origin: left top;
    color: #757575 !important;
    pointer-events: none;
  }
}

/* =========================
   Responsive fino desktop/tablet
   ========================= */
@media (max-width: 760px) {
  .calendar { gap: 6px; }
}

@media (max-width: 480px) {
  #monthYear { font-size: 16px; }
  .top-actions a.btn-floating { transform: scale(0.9); }
}


@media (max-width: 600px) {
  .modal.mobile-full {
    position: fixed !important;
    z-index: 1003 !important;   /* por encima del overlay (1002) */
    width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    top: 0 !important; left: 0 !important;
    border-radius: 0 !important;
    transform: translateY(0) !important;
  }
  .modal.mobile-full .modal-content {
    height: calc(100vh - 56px);
    overflow: auto;
    padding-bottom: 8px;
  }
  .modal.mobile-full .modal-footer {
    position: sticky; bottom: 0;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
    z-index: 1;
  }
  .modal-overlay { z-index: 1002 !important; }
}

@media (max-width: 360px) {
  .top-actions a.btn-floating {
    transform: scale(0.8); /* Botones un poco más pequeños en pantallas muy estrechas */
  }
}

#editModal .modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#editModal .input-field { margin-top: 6px; margin-bottom: 8px; }

/* Centrar y ocupar todo el ancho las filas de campos */
#editModal .row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#editModal .row .col {
  flex: 1 1 auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Título y botón de cierre alineados */
#editModal .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
#editModal .modal-header h5 { margin: 0; }

/* Rejilla de colores */
#colorOptions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 10px;
}

/* Asegurar que el textarea crece y muestra saltos */
#noteText.materialize-textarea {
  min-height: 96px;
  white-space: pre-wrap;    /* respeta \n */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Móvil: el modal ocupa toda la pantalla */
/* Modal a página completa */
.fullscreen-modal {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  top: 0 !important;
  left: 0 !important;
  border-radius: 0 !important;
  transform: translateY(0) !important;
}

.fullscreen-modal .modal-content {
  height: calc(100vh - 56px);
  overflow-y: auto;
}

@media (max-width: 600px) {
  #editModal.modal {
    position: fixed !important;
    width: 100vw !important; height: 100vh !important; max-height: 100vh !important;
    top: 0 !important; left: 0 !important; border-radius: 0 !important; transform: translateY(0) !important;
  }
/* Contenedor de contenido con scroll */
#editModal .modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}
/* Footer siempre fijo */
#editModal .modal-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
  z-index: 2;
}
}

.week-number-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: red;
}

.calendar.week-numbers {
  grid-template-columns: 30px repeat(7, 1fr);
}

.calendar.week-numbers {
  grid-template-columns: 30px repeat(7, 1fr); /* 8 columnas: nº semana + 7 días */
}

.calendar.week-hours {
  grid-template-columns: repeat(7, 1fr) minmax(50px, 80px); /* 7 días + columna de horas */
}

.calendar.week-numbers.week-hours {
  grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr) minmax(50px, 80px); /* nº semana + 7 días + horas */
}

.calendar-head.week-hours {
  grid-template-columns: repeat(7, 1fr) minmax(50px, 80px);
}

.calendar-head.week-numbers.week-hours {
  grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr) minmax(50px, 80px);
}

.week-number-cell {
  height: clamp(54px, 9.5vw, 100px);   
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: red;
  border-radius: 12px;  
}

.week-hours-cell {
  height: clamp(54px, 9.5vw, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #d32f2f;
  border-radius: 0;
}

@media (max-width: 600px) {
  .week-number-cell { font-size: 11px; }
  .week-hours-cell { 
    font-size: 9px; 
    padding: 2px;
    word-break: break-word;
    line-height: 1.2;
    text-align: center;
  }
  
  .calendar.week-hours {
    grid-template-columns: repeat(7, 1fr) minmax(40px, 55px);
  }
  
  .calendar.week-numbers.week-hours {
    grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr) minmax(40px, 55px);
  }
  
  .calendar-head.week-hours {
    grid-template-columns: repeat(7, 1fr) minmax(40px, 55px);
  }
  
  .calendar-head.week-numbers.week-hours {
    grid-template-columns: minmax(28px, 9vw) repeat(7, 1fr) minmax(40px, 55px);
  }
}

#calendarBanner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}

/* Botón mostrar año completo - mejoras para móvil */
#showFullYearBtn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto !important;
}

#showFullYearBtn:active {
  opacity: 0.8;
  transform: scale(0.98);
}

/* Banner de texto */
#calendarBanner h5 {
  background-color: #d32f2f;
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(14px, 2.2vw, 20px);
  width: 100%;
}

/* Banner morado para usuarios específicos */
body.botones-morados #calendarBanner h5 {
  background-color: #7b1fa2 !important;
  color: #fff !important;
}

/* Banner de imagen */
#calendarBanner img {
  display: block;
  width: 100%;
  max-width: 600px;
  max-height: 200px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

#calendarBanner a:hover img {
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.today {
  border: 3px solid rgb(55, 233, 177);
  animation: pulseBorder 1.4s infinite;
}

.today:not(.day) {
  /* Para días pequeños en el modal del año completo */
  border: 2px solid rgb(55, 233, 177);
}

@keyframes pulseBorder {
  0%   { box-shadow: 0 0 0 0 rgba(128, 128, 0, 0.6); }
  50%  { box-shadow: 0 0 8px 4px rgba(128, 128, 0, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(128, 128, 0, 0.6); }
}

@media (max-width: 600px) {
  .today {
    border: 2px solid rgb(55, 233, 177);
  }
}

#colorOptions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Fila clicable */
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  cursor: pointer;
}
.color-row.selected {
  outline: 2px solid #111827;
}


.color-swatch {
  width: 34px; height: 34px; border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  flex: 0 0 34px;
}
.color-desc {
  font-size: 14px;
  color: #111827;
}

.day .num span {
  margin-left: 4px; 
  display: inline-block;
  vertical-align: middle;
}


@media (max-width: 480px) {
  .day .num span {
    font-size: clamp(10px, 3.5vw, 13px);   
    line-height: 1.1;
    display: block;       
    margin-top: 2px; 
    margin-left: 0px;       
  }
}

.miniMeta{
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.miniMeta .mm{
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.75); 
  color: #111827;
  line-height: 1.2;
}


@media (max-width: 480px){
  .miniMeta .mm{
    font-size: 9px;
    padding: 2px 5px;
  }
}


.file-choice{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
@media (max-width:600px){
  .file-choice .btn{
    flex:1 1 calc(50% - 8px);
  }
}
.photo-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(80px,1fr));
  gap:8px;
  margin-top:12px;
}
.photo-gallery img{
  width:100%;
  height:80px;
  object-fit:cover;
  border-radius:6px;
  cursor:pointer;
  transition:transform .2s ease;
}
.photo-gallery img:hover{ transform: scale(1.05); }

.thumb{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.thumb img{
  width:100%;
  height:80px;
  object-fit:cover;
  border-radius:6px;
  cursor:pointer;
}
.thumb-actions{
  display:flex;
  gap:6px;
}
.btn-flat.tiny{
  padding:2px 6px;
  font-size:12px;
  line-height:18px;
}
/* ==== Galería de fotos ==== */
.photo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;            
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  overflow: hidden;
  background: #f7f7f7;
}

.thumb-img{
  width: 100%;
  height: 100%;
  object-fit: cover;              
  display: block;
}

.thumb-actions{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 4px 6px;
  display: flex;
  justify-content: center;
  background: linear-gradient( to top, rgba(0,0,0,.35), rgba(0,0,0,0) );
}

.thumb-actions a{
  font-size: 11px !important;
  padding: 2px 8px !important;
  border-radius: 999px;
  background: white;
  color: #c62828 !important;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.thumb.pending{ outline: 2px solid rgba(211,47,47,.35); } 

/* Indicador de que hay fotos en el día */
.photoDots {
  margin-top: 4px;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.photoDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: rgba(35, 95, 7);
}
.day.today .photoDot { background: rgb(35, 95, 7); display:inline-block; width:6px; height:6px; border-radius:50%; }
.day .num .photoDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.modal h5 {
  font-weight: bold;
}
.modal p {
  font-size: 0.95em;
  line-height: 1.4em;
}
.day {
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
}

/* Estilos para labels de switches */
#rsnSwitchLabel,
#correturnosSwitchLabel {
  color: #d32f2f !important;
  font-weight: bold !important;
}

.switch label input[type="checkbox"]:checked + .lever + span {
  color: #d32f2f !important;
  font-weight: bold !important;
}

/* ==== Vista año completo ==== */
#fullYearModal .full-year-title {
  text-align: center;
  margin: 0 0 16px;
  font-size: 22px !important;
  font-weight: 800;
}

#fullYearModal .full-year-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
  gap: 12px !important;
}

#fullYearModal .full-year-month-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px !important;
  background: #fff;
  max-width: 100% !important;
}

#fullYearModal .full-year-month-title {
  margin: 0 0 6px !important;
  font-size: 14px !important;
  font-weight: 800;
  text-align: center;
}

#fullYearModal .full-year-month-calendar {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 3px !important;
  font-size: 10px !important;
}

#fullYearModal .full-year-weekday {
  text-align: center;
  font-weight: 800;
  padding: 2px 0 !important;
  font-size: 10px !important;
}

#fullYearModal .full-year-day {
  text-align: center !important;
  padding: 3px 0 !important;
  border-radius: 4px;
  min-height: 20px !important;
  max-height: 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1 !important;
}

/* Holiday pulse solo en modal de año completo */
#fullYearModal .holiday-pulse {
  border: 2px solid rgba(220, 20, 60, 0.9) !important;
  animation: holiday-pulse 1.6s infinite;
}

@keyframes holiday-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.8); }
  50% { box-shadow: 0 0 0 8px rgba(220, 20, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0); }
}

@media (max-width: 600px) {
  #fullYearModal .full-year-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr)) !important;
    gap: 8px !important;
  }
  #fullYearModal .full-year-month-card {
    padding: 8px !important;
  }
  #fullYearModal .full-year-month-title {
    font-size: 12px !important;
  }
  #fullYearModal .full-year-month-calendar {
    gap: 2px !important;
    font-size: 9px !important;
  }
  #fullYearModal .full-year-weekday {
    font-size: 9px !important;
    padding: 2px 0 !important;
  }
  #fullYearModal .full-year-day {
    min-height: 18px !important;
    max-height: 18px !important;
    font-size: 9px !important;
    padding: 2px 0 !important;
  }
  
  /* Holiday pulse más visible en móvil */
  #fullYearModal .holiday-pulse {
    border: 3px solid rgba(220, 20, 60, 1) !important;
    animation: holiday-pulse-mobile 1.4s infinite;
  }
  
  @keyframes holiday-pulse-mobile {
    0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.9); }
    50% { box-shadow: 0 0 0 6px rgba(220, 20, 60, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.9); }
  }
  
  /* Modal edit - filas ocupen todo el ancho */
  #editModal .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  
  #editModal .row .col {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 420px) {
  #fullYearModal .full-year-grid {
    grid-template-columns: repeat(2, minmax(100px, 1fr)) !important;
  }
}

/* ===== Botón Importante (abajo, ancho completo, flash) ===== */
.importante-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background-color: #d32f2f;
  border: none;
  cursor: pointer;
  z-index: 998;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  animation: importante-flash 1.5s ease-in-out infinite;
}

.importante-btn:hover {
  background-color: #b71c1c;
  color: #fff;
}

@keyframes importante-flash {
  0%, 100% {
    opacity: 1;
    background-color: #d32f2f;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  }
  50% {
    opacity: 1;
    background-color: #ff5722;
    box-shadow: 0 -4px 28px rgba(255,87,34,0.8);
  }
}

/* Aviso destacado en modal Importante (letras rojas sobre fondo amarillo) */
.importante-aviso-destacado {
  background-color: #ffeb3b !important;
  color: #d32f2f !important;
  font-weight: 800 !important;
  padding: 12px 16px !important;
  margin: 16px 0 !important;
  border-left: 4px solid #d32f2f !important;
  border-radius: 4px;
  text-align: center;
  font-size: 16px !important;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .importante-aviso-destacado {
    font-size: 14px !important;
    padding: 10px 12px !important;
  }
}

/* Evitar que el contenido quede tapado por el botón fijo */
body { padding-bottom: 56px; }
@media (max-width: 600px) {
  body { padding-bottom: 60px; }
  .importante-btn { padding: 16px; font-size: 16px; }
}
