*{
  box-sizing: border-box;
  font-family: "Inter", system-ui, sans-serif;
}

body{
  margin: 0;
  background: #eef2f7;
  color: #0f172a;
}

.header{
  background: linear-gradient(135deg, #0e2a3f, #163a55);
  color: white;
  padding: 48px 16px;
  text-align: center;
}

.subtitle{
  opacity: .85;
}

.container{
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px;
}

.date-selector{
  margin-bottom: 24px;
}

.date-selector label{
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="date"]{
  padding: 10px;
  font-size: 16px;
}

.day-agenda textarea{
  width: 100%;
  min-height: 200px;
  padding: 14px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  resize: vertical;
}

.privacy{
  margin-top: 20px;
  font-size: 14px;
  color: #475569;
}

.footer{
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: #64748b;
}

/* ===== Pulido final UX ===== */

.date-selector label{
  display:block;
  margin: 10px 0 6px;
  font-weight: 600;
}

.date-selector input[type="date"],
.date-selector input[type="time"]{
  width: 100%;
  max-width: 320px;
}

#notes{
  min-height: 140px;
}

/* Botonera */
.agenda-controls{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 12px;
  align-items:center;
}

.agenda-controls button{
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

#btn-save{
  background:#0e2a3f;
  color:#fff;
}

#btn-delete, #btn-clear, #btn-pdf-day, #btn-pdf-week{
  background:#fff;
  border: 1px solid rgba(15,23,42,.18);
  color:#0f172a;
}

#status{
  margin-left:auto;
  font-size: 13px;
  opacity: .85;
}

/* En móvil, que los botones ocupen el ancho */
@media (max-width: 520px){
  .agenda-controls button{
    width: 100%;
  }
  #status{
    width:100%;
    margin-left:0;
  }
}

/* Lista del día */
.day-list{
  margin-top: 18px;
}

.day-list h3{
  margin: 0 0 10px 0;
}

#day-items{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

#day-items li{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .08s ease;
}

#day-items li:hover{
  transform: translateY(-1px);
}

#day-items li.empty{
  cursor: default;
  color: rgba(15,23,42,.65);
  background: transparent;
  border-style: dashed;
}

/* Privacidad bien visible */
.privacy{
  margin-top: 18px;
  border-left: 4px solid rgba(0,247,255,.6);
  background: rgba(0,247,255,.08);
  padding: 12px 12px;
  border-radius: 14px;
}

.privacy strong{
  font-weight: 800;
}

/* ===== Botones más redondeados ===== */

.agenda-controls button{
  border-radius: 999px;      /* ← redondeado tipo “pill” */
  padding: 12px 18px;
  font-weight: 700;
}

/* Botón principal */
#btn-save{
  background:#0e2a3f;
  color:#fff;
}

/* Botones secundarios */
#btn-delete,
#btn-clear,
#btn-pdf-day,
#btn-pdf-week{
  background:#fff;
  border: 1px solid rgba(15,23,42,.18);
  color:#0f172a;
}

/* En móvil siguen ocupando ancho completo */
@media (max-width: 520px){
  .agenda-controls button{
    width: 100%;
  }
}

/* ===== Hover sutil en botones ===== */

.agenda-controls button{
  transition: background-color .15s ease,
              box-shadow .15s ease,
              transform .12s ease;
}

.agenda-controls button:hover{
  transform: translateY(-1px);
}

/* Botón principal */
#btn-save:hover{
  background: #163a55; /* apenas más claro */
}

/* Botones secundarios */
#btn-delete:hover,
#btn-clear:hover,
#btn-pdf-day:hover,
#btn-pdf-week:hover{
  background: rgba(15,23,42,.04);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* ===== Calendario Modal (Opción B) ===== */

.date-row{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn.ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.btn.ghost:hover{ background: rgba(255,255,255,.12); }

/* Overlay */
.cal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}
.cal-overlay.open{ display: flex; }

/* Modal */
.cal-modal{
  width: min(520px, 96vw);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  overflow: hidden;
}

.cal-header{
  display: grid;
  grid-template-columns: 44px 1fr 44px 44px;
  align-items: center;
  gap: 6px;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,.10);
}

.cal-title{
  font-weight: 800;
  text-align: center;
}

.cal-nav, .cal-close{
  width: 44px;
  height: 40px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
}
.cal-nav:hover, .cal-close:hover{
  filter: brightness(0.98);
}

.cal-weekdays{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px 12px 0;
  color: rgba(15,23,42,.70);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

.cal-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 10px 12px 14px;
}

.cal-day{
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  border-radius: 12px;
  height: 46px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}
.cal-day:hover{ filter: brightness(0.98); }

.cal-day.muted{
  opacity: .35;
  cursor: default;
}

.cal-day.selected{
  outline: 2px solid rgba(0,247,255,.65);
  box-shadow: 0 0 0 6px rgba(0,247,255,.18);
}

.cal-footer{
  padding: 12px;
  border-top: 1px solid rgba(15,23,42,.10);
  display: flex;
  justify-content: flex-end;
}

/* ===== Calendario: Feriados y tareas ===== */

.cal-day.holiday{
  background: rgba(255, 90, 90, 0.15);
  border: 1px solid rgba(255, 90, 90, 0.6);
}

.cal-day.has-task::after{
  content: "";
  width: 7px;
  height: 7px;
  background: #0ea5e9;
  border-radius: 50%;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

/* Feriados: resaltado suave */
.cal-day.holiday{
  background: rgba(255, 193, 7, .18);
  border-color: rgba(255, 193, 7, .55);
}

/* Días con tareas: puntito */
.cal-day.has-task{
  position: relative;
}
.cal-day.has-task::after{
  content: "";
  position: absolute;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 247, 255, .95);
  box-shadow: 0 0 0 4px rgba(0,247,255,.18);
}

/* ===== Puntito fijo para días con tareas ===== */
.cal-day.has-task{
  position: relative;           /* base para el ::after */
}

.cal-day.has-task::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 247, 255, .95);
  box-shadow: 0 0 0 4px rgba(0,247,255,.18);
  opacity: 1;                   /* SIEMPRE visible */
  pointer-events: none;         /* no interfiere con clicks */
}

/* Asegura que el hover NO lo oculte ni lo cambie */
.cal-day.has-task:hover::after{
  opacity: 1;
}

/* Botón Calendario: texto oscuro para fondo claro */
#openCalendar{
  color: #0f172a; /* negro suave */
  border-color: rgba(15,23,42,.35);
}

#openCalendar:hover{
  background: rgba(15,23,42,.06);
}

/* Info debajo del calendario (feriados / actividades) */
.cal-info{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
  font-size: 14px;
  line-height: 1.35;
}
.cal-info b{ color:#fff; }

/* Día de hoy (fecha actual) */
.cal-day.today{
  background: rgba(46, 204, 113, 0.22); /* verde claro */
  border: 2px solid rgba(46, 204, 113, 0.65);
  color: #0f172a;
}

/* Si hoy también es feriado, manda el feriado pero se nota */
.cal-day.today.holiday{
  background: rgba(255, 193, 7, 0.22);
  border-color: rgba(255, 193, 7, 0.7);
}





