/* =========================
   agenda.css (SIN global)
   Requiere tus vars del global: --card, --text, --muted, --line, --primary, --danger, --focus, etc.
   ========================= */

#calendar { min-height: 720px; }
.container-fluid { position: relative; top: 30px; }

/* -------- Bootstrap: ajustes para dark glass -------- */
hr{ border-color: rgba(255,255,255,.10) !important; opacity: 1 !important; }
.text-muted{ color: var(--muted) !important; }

/* Inputs / selects */
.form-select,
.form-control{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(232,238,252,.92) !important;
  border-radius: 12px !important;
}
.form-select:focus,
.form-control:focus{
  border-color: rgba(59,130,246,.35) !important;
  box-shadow: var(--focus) !important;
}
.form-control::placeholder{ color: rgba(232,238,252,.55) !important; }

/* Botones Bootstrap */
.btn{
  border-radius: 12px !important;
}
.btn-primary{
  background: linear-gradient(180deg, var(--primary), var(--primary2)) !important;
  border: 1px solid rgba(59,130,246,.35) !important;
  box-shadow: 0 10px 22px rgba(59,130,246,.18);
}
.btn-primary:hover{ filter: brightness(1.05); }

.btn-outline-secondary{
  color: rgba(232,238,252,.82) !important;
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.05) !important;
}
.btn-outline-secondary:hover{
  background: rgba(255,255,255,.10) !important;
}

.btn-outline-danger{
  color: rgba(255,255,255,.92) !important;
  border-color: rgba(239,68,68,.35) !important;
  background: rgba(239,68,68,.10) !important;
}
.btn-outline-danger:hover{
  background: rgba(239,68,68,.16) !important;
}

/* Títulos dentro de cards */
h4, .fw-semibold{ color: rgba(232,238,252,.94); }

/* -------- Lista del día (lado izquierdo) -------- */
.daylist-item{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.05);
}
.daylist-item small{ color: rgba(232,238,252,.65); }

.chip{
  display:inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  background: var(--chip-bg);
  border: 1px solid rgba(59,130,246,.22);
  color: var(--chip-tx);
  font-weight: 800;
}

/* -------- Dropdown autocomplete pacientes (list-group) -------- */
#patientDropdown{
  background: rgba(20,27,45,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
}
#patientDropdown .list-group-item{
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: rgba(232,238,252,.90);
}
#patientDropdown .list-group-item:last-child{ border-bottom: 0; }
#patientDropdown .list-group-item-action:hover{
  background: rgba(59,130,246,.12);
}

/* -------- Modales (Bootstrap) para que no choquen con dark -------- */
.modal-content{
  background: rgba(20,27,45,.92) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 18px !important;
  color: rgba(232,238,252,.92) !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.65);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}
.modal-header, .modal-footer{
  border-color: rgba(255,255,255,.10) !important;
}
.btn-close{
  filter: invert(1);
  opacity: .8;
}
.form-text{ color: rgba(232,238,252,.60) !important; }

/* =========================
   FullCalendar v6 (fix lectura)
   ========================= */

/* Asegura que FC no se quede “lavado” */
#calendar .fc,
#calendar .fc *{
  color: rgba(232,238,252,.92);
}

/* Toolbar */
#calendar .fc .fc-toolbar-title{
  color: rgba(232,238,252,.95) !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

/* Botones FC */
#calendar .fc .fc-button{
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(232,238,252,.92) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
#calendar .fc .fc-button:hover{
  background: rgba(255,255,255,.12) !important;
}
#calendar .fc .fc-button:focus{
  box-shadow: var(--focus) !important;
}
#calendar .fc .fc-button-primary:not(:disabled).fc-button-active{
  background: rgba(59,130,246,.22) !important;
  border-color: rgba(59,130,246,.28) !important;
}

/* Header días (dom/lun/mar...) */
#calendar .fc .fc-col-header-cell{
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.12) !important;
}
#calendar .fc .fc-col-header-cell-cushion{
  color: rgba(232,238,252,.92) !important;
  font-weight: 900 !important;
  opacity: 1 !important;
  text-decoration: none !important;
}

/* Grid lines */
#calendar .fc .fc-scrollgrid,
#calendar .fc .fc-scrollgrid-section > *{
  border-color: rgba(255,255,255,.12) !important;
}
#calendar .fc .fc-timegrid-slot,
#calendar .fc .fc-daygrid-day{
  border-color: rgba(255,255,255,.10) !important;
}

/* Línea “ahora” */
#calendar .fc .fc-timegrid-now-indicator-line{
  border-color: rgba(59,130,246,.85) !important;
}
#calendar .fc .fc-timegrid-now-indicator-arrow{
  border-color: rgba(59,130,246,.85) !important;
}

/* Ajustes de altura de slots/eventos (tu preferencia) */
#calendar .fc .fc-timegrid-slot{ height: 36px; }
#calendar .fc .fc-timegrid-event{ min-height: 44px; }

/* Eventos base */
#calendar .fc .fc-event{
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.07) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  overflow: hidden;
}
#calendar .fc .fc-event .fc-event-main{
  padding: 6px 8px !important;
}
#calendar .fc .fc-event .fc-event-time,
#calendar .fc .fc-event .fc-event-title{
  color: rgba(232,238,252,.94) !important;
  opacity: 1 !important;
  line-height: 1.2;
  font-size: 12px;
}
#calendar .fc .fc-timegrid-event .fc-event-title{ white-space: normal; }

/* Accent bar izquierda */
#calendar .fc .fc-event::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width: 4px;
  background: rgba(59,130,246,.75);
}

/* Hover evento */
#calendar .fc .fc-event:hover{ filter: brightness(1.06); }

/* ===== Estados por clase (usa classNames: ['st-CONFIRMADA'] etc) ===== */
#calendar .fc .st-PROGRAMADA{
  background: var(--st-prog) !important;
  border-color: rgba(59,130,246,.30) !important;
}
#calendar .fc .st-PROGRAMADA::before{ background: rgba(59,130,246,.85); }

#calendar .fc .st-CONFIRMADA{
  background: var(--st-conf) !important;
  border-color: rgba(99,102,241,.30) !important;
}
#calendar .fc .st-CONFIRMADA .fc-event-title{ font-weight: 900; }
#calendar .fc .st-CONFIRMADA::before{ background: rgba(99,102,241,.85); }

#calendar .fc .st-EN_CURSO{
  background: var(--st-curso) !important;
  border-color: rgba(34,197,94,.28) !important;
}
#calendar .fc .st-EN_CURSO .fc-event-title{ font-weight: 900; }
#calendar .fc .st-EN_CURSO::before{ background: rgba(34,197,94,.85); }

#calendar .fc .st-COMPLETADA{
  background: var(--st-comp) !important;
  border-color: rgba(148,163,184,.25) !important;
  opacity: .95;
}
#calendar .fc .st-COMPLETADA::before{ background: rgba(148,163,184,.75); }

#calendar .fc .st-NO_ASISTIO{
  background: var(--st-noas) !important;
  border-color: rgba(251,113,133,.32) !important;
  opacity: .95;
}
#calendar .fc .st-NO_ASISTIO .fc-event-title{ text-decoration: line-through; }
#calendar .fc .st-NO_ASISTIO::before{ background: rgba(251,113,133,.85); }

#calendar .fc .st-CANCELADA{
  background: var(--st-canc) !important;
  border-color: rgba(148,163,184,.22) !important;
  opacity: .70;
}
#calendar .fc .st-CANCELADA .fc-event-title{ text-decoration: line-through; }
#calendar .fc .st-CANCELADA::before{ background: rgba(148,163,184,.65); }

/* Bloqueos */
#calendar .fc .st-block{
  background: var(--st-block) !important;
  border: 1px dashed rgba(245,158,11,.45) !important;
  opacity: .95;
  font-weight: 900;
}
#calendar .fc .st-block::before{ background: rgba(245,158,11,.90); }

/* Numeritos del día en month/daygrid */
.fc .fc-daygrid-day-number{
  color: rgba(232,238,252,.88) !important;
  opacity: 1 !important;
}

/* Etiquetas/horas del eje izquierdo */
.fc .fc-timegrid-axis-cushion,
.fc .fc-timegrid-slot-label-cushion{
  color: rgba(232,238,252,.75) !important;
  opacity: 1 !important;
}

.fc .fc-day-today{
  background: rgba(59,130,246,.06) !important;
}

.fc .fc-toolbar-title{
  color: rgba(232,238,252,.95);
  font-weight: 900;
  letter-spacing: .2px;
}

.fc .fc-view-harness{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;

  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);

  position: relative;
}