/* Contenedor base */
.iam-shell {
  border: 1px solid #d8dee4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* Barra superior (título + controles) */
.iam-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7f9fb;
  border-bottom: 1px solid #e0e6ed;
  padding: 10px 12px;
}

.iam-left { display:flex; align-items:center; gap:10px; }
.iam-title { font-weight:600; color:#334155; }

.iam-actions { display:flex; align-items:center; gap:10px; }
.iam-date {
  border: 1px solid #ccd6dd;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: .9rem;
}
.iam-expand {
  background: #007bff;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:6px 10px;
  font-size:.85rem;
  cursor:pointer;
}
.iam-expand:hover { background:#005fba; }

/* Calendario */
.iam-calendar { padding: 10px; }

/* Línea roja global */
.iam-nowline{
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background: #e11d48; /* rojo suave */
  pointer-events:none;
  z-index: 5;
}

/* Modal básico */
.iam-modal[hidden]{ display:none; }
.iam-modal{
  position:fixed; inset:0; background:rgba(0,0,0,.3);
  display:flex; justify-content:center; align-items:center;
}
.iam-modal__box{
  background:#fff; padding:16px; border-radius:10px; width:min(420px, 92vw);
}
.iam-modal__actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.iam-btn.primary{ background:#007bff; color:#fff; }
.iam-btn{ border:none; border-radius:6px; padding:6px 10px; cursor:pointer; }

/* Responsive */
@media (max-width: 768px){
  .iam-bar{ flex-direction: column; align-items: stretch; gap:8px; }
  .iam-actions{ justify-content: space-between; }
}

/* ===== Fila superior dentro del recuadro ===== */
.iam-toprow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f7f9fb;
  border-bottom: 1px solid #e0e6ed;
}

.iam-toprow-left,
.iam-toprow-right { display: flex; align-items: center; }

.iam-toprow-left { justify-content: flex-start; }
.iam-toprow-right { justify-content: flex-end; }

.iam-toprow-center {
  display: flex; justify-content: center; align-items: center;
}

/* Logo + título (gris profesional) */
.iam-logo-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.iam-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.iam-logo-text {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151; /* gris oscuro profesional */
  letter-spacing: 0.2px;
}

/* Botones de la fila superior */
.iam-home-btn {
  text-decoration: none;
  font-size: 1.35rem;
  line-height: 1;
}

.iam-menu-toggle {
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}

/* ===== Barra de acciones (debajo) ===== */
.iam-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e0e6ed;
  background: #f9fafb;
}

.iam-actions { display: flex; gap: 10px; align-items: center; }

/* ===== Panel lateral ===== */
.iam-sidepanel {
  position: fixed;
  top: 0; right: -320px; bottom: 0;
  width: 300px;
  background: #ffffff;
  box-shadow: -8px 0 18px rgba(0,0,0,0.12);
  border-left: 1px solid #e5e7eb;
  transition: right .25s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}
.iam-sidepanel.open { right: 0; }

.iam-sidepanel__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #111827;
}
.iam-sidepanel__head .close {
  background: none; border: none; font-size: 1.1rem; cursor: pointer;
}

.iam-sidepanel__nav {
  display: grid; gap: 8px;
  padding: 14px;
}
.iam-sidepanel__nav a {
  text-decoration: none;
  color: #1f2937;
  padding: 8px 10px;
  border-radius: 6px;
}
.iam-sidepanel__nav a:hover {
  background: #f3f4f6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .iam-toprow {
    grid-template-columns: auto 1fr auto;
  }
  .iam-logo-text { font-size: 1.1rem; }
  .iam-logo-img { height: 34px; }
  .iam-bar { padding-top: 8px; padding-bottom: 8px; }
}

/* --- Encabezado y acciones ------------------------------------------------ */
.iam-inner-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 8px 12px;
}
.iam-home-btn{ font-size:26px; line-height:1; text-decoration:none; }
.iam-menu-toggle{ font-size:26px; line-height:1; border:0; background:transparent; cursor:pointer; }

.iam-titlewrap{
  display:flex; align-items:center; gap:.5rem;
}
.iam-logo-img{ height:28px; width:auto; object-fit:contain; }
.iam-logo-text{
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight:700;
  font-size:20px;
  color:#b30000;                 /* rojo profesional */
  text-shadow: 0 0 0.5px #fff;   /* fino filo blanco para contraste sutil */
}

.iam-bar{ padding: 6px 12px; }
.iam-actions{ display:flex; gap:.5rem; align-items:center; }

/* --- Calendario: compresión visual de las tarjetas ----------------------- */
.fc .fc-timegrid-event { padding:0 2px; }
.fc .fc-timegrid-event .fc-event-main { padding:2px 4px; font-size:12px; }
.fc .fc-timegrid-event .fc-event-time { font-weight:700; margin-right:4px; }
.fc .fc-timegrid-event .fc-event-title {
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Línea roja a lo ancho (si ya usas la clase, la mantenemos) */
.iam-nowline{
  position:absolute; left:0; right:0; height:2px; background:#d00; pointer-events:none;
}

/* Responsive pequeño */
@media (max-width: 640px){
  .iam-logo-img{ height:24px; }
  .iam-logo-text{ font-size:18px; }
  .iam-home-btn, .iam-menu-toggle{ font-size:24px; }
}

/* --- Estilos del encabezado y logo --- */
.iam-titlewrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 6px;
}

.iam-logo-img {
  width: 48px;        /* tamaño del corazón */
  height: auto;
  vertical-align: middle;
}

.iam-logo-text {
  font-family: "Open Sans", sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #b30000;     /* rojo profesional */
  text-shadow: 0 0 1px #fff;
}

/* Botón del menú y casita */
.iam-home-btn img,
.iam-menu-toggle {
  transform: scale(1.3);
}

.iam-menu-toggle {
  font-size: 1.6rem;
}

/* --- Encabezado centrado y profesional --- */
.iam-inner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.iam-titlewrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

.iam-logo-img {
  width: 42px;
  height: auto;
  margin-right: 10px;
}

.iam-logo-text {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #b30000;
}

/* Forzar visibilidad y tamaño del eje horario en FullCalendar */
.fc-timegrid-slot-label {
  color: #222 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding-right: 4px !important;
}

.fc-timegrid-axis {
  width: 55px !important;
}

.fc-timegrid-slot {
  height: 28px !important;
}

.fc-col-header-cell-cushion {
  font-size: 14px !important;
  font-weight: 600;
  color: #222;
}

/* Eje horario visible y legible */
.fc-timegrid-slot-label {
  color: #222 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding-right: 4px !important;
}
.fc-timegrid-axis { width: 55px !important; }
.fc-timegrid-slot { height: 28px !important; }
.fc-col-header-cell-cushion { font-size: 14px !important; font-weight: 600; color: #222; }

/* Modo compact: sin textos de eventos; sólo “manchas” de ocupación */
.iam-shell[data-mode="compact"] .fc-event-title,
.iam-shell[data-mode="compact"] .fc-event-time {
  display: none !important;
}

/* Opcional: si quieres que la cabecera de días esté más discreta en compact */
.iam-shell[data-mode="compact"] .fc-col-header {
  opacity: .9;
}
