/* ============================================================
   ProfeAcademī · App Horarios — Soft UI claro
   ============================================================ */

.pa-h-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.6rem 1rem 4rem;
}

.pa-h-card {
  background: var(--inicio-card-bg, #fff);
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
  border-radius: 20px;
  padding: 2rem 2.2rem;
  box-shadow: 0 18px 50px var(--inicio-shadow, rgba(0,0,0,.08));
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}
.pa-h-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 70px;
  background: linear-gradient(180deg, transparent, rgba(99,179,237,.06));
  pointer-events: none;
  border-radius: 0 0 20px 20px;
}
.pa-h-card > * { position: relative; z-index: 1; }

.pa-h-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
}
.pa-h-title {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--inicio-text-primary, #1f2937);
}
.pa-h-title .icon { font-size: 2rem; filter: drop-shadow(0 4px 8px rgba(99,179,237,.35)); }

.pa-h-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}
.pa-h-select, .pa-h-input {
  background: white;
  color: var(--inicio-text-primary, #1f2937);
  border: 1.5px solid var(--inicio-card-border, rgba(0,0,0,.12));
  border-radius: 10px;
  padding: .55rem .9rem;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.pa-h-select:focus, .pa-h-input:focus {
  outline: none;
  border-color: var(--inicio-primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* ── Botones ── */
.pa-h-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  background: var(--inicio-primary, #4f46e5);
  color: white;
  border: 0;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 4px 12px rgba(79,70,229,.25);
  text-decoration: none;
}
.pa-h-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,70,229,.35); filter: brightness(1.05); }
.pa-h-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.pa-h-btn-ghost {
  background: transparent;
  color: var(--inicio-text-secondary, #6b7280);
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.1));
  box-shadow: none;
}
.pa-h-btn-ghost:hover { background: rgba(99,179,237,.08); color: var(--inicio-primary, #4f46e5); box-shadow: none; }
.pa-h-btn-success { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.pa-h-btn-danger  { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 12px rgba(239,68,68,.3); }
.pa-h-btn-sm { padding: .4rem .85rem; font-size: .8rem; }

/* ── Cuadrícula semanal ── */
.pa-h-grid-wrap {
  overflow-x: auto;
  margin: 0 -.5rem;
  padding: 0 .5rem;
}
.pa-h-grid {
  display: grid;
  /* hora + 5 días */
  grid-template-columns: 110px repeat(5, minmax(140px, 1fr));
  gap: .35rem;
  min-width: 720px;
}
.pa-h-grid .head {
  background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(167,139,250,.1));
  border: 1px solid rgba(79,70,229,.15);
  border-radius: 10px;
  padding: .6rem .4rem;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--inicio-primary, #4f46e5);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.pa-h-grid .timehead {
  background: rgba(99,179,237,.05);
  border-radius: 10px;
  padding: .55rem .4rem;
  text-align: center;
  font-size: .78rem;
  color: var(--inicio-text-secondary, #6b7280);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .15rem;
  border: 1px dashed rgba(0,0,0,.06);
}
.pa-h-grid .timehead .name { font-weight: 700; color: var(--inicio-text-primary, #1f2937); font-size: .82rem; }
.pa-h-grid .timehead .hr { font-size: .72rem; color: var(--inicio-text-secondary, #9ca3af); }

.pa-h-cell {
  min-height: 56px;
  padding: .45rem .55rem;
  border-radius: 10px;
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.08));
  background: var(--inicio-card-bg, #fff);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .15rem;
  font-size: .78rem;
  transition: transform .12s, box-shadow .15s, border-color .15s;
  position: relative;
}
.pa-h-cell:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.06); border-color: rgba(79,70,229,.4); }

.pa-h-cell.recreo {
  background: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,.025),
    rgba(0,0,0,.025) 6px,
    transparent 6px,
    transparent 12px
  );
  cursor: not-allowed;
  color: #9ca3af;
  font-style: italic;
  text-align: center;
  align-items: center;
}

.pa-h-cell.empty { color: #c7c7d1; }
.pa-h-cell.empty::before { content: '+'; font-size: 1.3rem; color: rgba(0,0,0,.15); align-self: center; }
.pa-h-cell.empty:hover::before { color: var(--inicio-primary, #4f46e5); }

.pa-h-cell.pendiente {
  background: linear-gradient(135deg, rgba(251,191,36,.18), rgba(251,191,36,.08));
  border-color: rgba(251,191,36,.5);
  color: #92400e;
}
.pa-h-cell.aprobado {
  background: linear-gradient(135deg, rgba(16,185,129,.18), rgba(16,185,129,.08));
  border-color: rgba(16,185,129,.5);
  color: #047857;
}
.pa-h-cell.aprobado.foreign,
.pa-h-cell.pendiente.foreign { cursor: default; }

.pa-h-cell .badge {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.pa-h-cell .info { font-weight: 600; line-height: 1.25; }
.pa-h-cell .sub  { font-size: .68rem; opacity: .85; }
.pa-h-cell .x {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: .82rem;
  background: rgba(0,0,0,.05);
  border: 0;
  border-radius: 4px;
  width: 18px;
  height: 18px;
  display: none;
  cursor: pointer;
  color: #6b7280;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.pa-h-cell:hover .x { display: flex; }
.pa-h-cell .x:hover { background: rgba(239,68,68,.18); color: #b91c1c; }

/* ── Leyenda ── */
.pa-h-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--inicio-text-secondary, #6b7280);
}
.pa-h-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.pa-h-legend .dot {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,.1);
}
.pa-h-legend .dot.pendiente { background: rgba(251,191,36,.4); border-color: rgba(251,191,36,.6); }
.pa-h-legend .dot.aprobado  { background: rgba(16,185,129,.4); border-color: rgba(16,185,129,.6); }
.pa-h-legend .dot.empty     { background: white; }

/* ── Fase 3: celdas editables por admin en Vista Global ── */
.pa-h-cell.admin-editable { cursor: pointer; }
.pa-h-cell.admin-editable.empty::after {
  content: '+ asignar';
  font-size: .62rem;
  color: rgba(79,70,229,.4);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}
.pa-h-cell.admin-editable.empty:hover::after { color: var(--inicio-primary, #4f46e5); }
.pa-h-cell.admin-editable.aprobado:hover,
.pa-h-cell.admin-editable.pendiente:hover {
  outline: 2px dashed rgba(79,70,229,.5);
  outline-offset: -2px;
}

/* ── Tabs (Admin) ── */
.pa-h-tabs {
  display: flex;
  gap: .4rem;
  border-bottom: 2px solid var(--inicio-card-border, rgba(0,0,0,.06));
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.pa-h-tab {
  padding: .65rem 1.2rem;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--inicio-text-secondary, #6b7280);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 8px 8px 0 0;
  transition: color .2s, background .2s, border-color .2s;
}
.pa-h-tab:hover { color: var(--inicio-primary, #4f46e5); background: rgba(99,179,237,.06); }
.pa-h-tab.active { color: var(--inicio-primary, #4f46e5); border-bottom-color: var(--inicio-primary, #4f46e5); }
.pa-h-tab .count {
  display: inline-flex; min-width: 22px; height: 22px; padding: 0 7px;
  align-items: center; justify-content: center; border-radius: 11px;
  background: linear-gradient(135deg, #ef4444, #dc2626); color: white;
  font-size: .7rem; font-weight: 700;
}

/* ── Tabla (CRUD bloques + aprobaciones) ── */
.pa-h-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .45rem;
  font-size: .88rem;
}
.pa-h-table thead th {
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--inicio-text-secondary, #6b7280);
  padding: .4rem .9rem;
  font-weight: 700;
}
.pa-h-table tbody tr {
  background: white;
  transition: transform .15s, box-shadow .15s;
}
.pa-h-table tbody tr:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.pa-h-table tbody td {
  padding: .8rem .9rem;
  color: var(--inicio-text-primary, #1f2937);
  border-top: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
  border-bottom: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
  background: white;
}
.pa-h-table tbody td:first-child { border-left: 1px solid var(--inicio-card-border, rgba(0,0,0,.06)); border-radius: 12px 0 0 12px; }
.pa-h-table tbody td:last-child  { border-right: 1px solid var(--inicio-card-border, rgba(0,0,0,.06)); border-radius: 0 12px 12px 0; }

.pa-h-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ── Buscador en vivo (Asistente/UTP) ── */
.pa-h-now-box {
  background: linear-gradient(135deg, rgba(99,179,237,.08), rgba(167,139,250,.08));
  border: 1px solid rgba(79,70,229,.2);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
}
.pa-h-now-time {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}
.pa-h-now-block {
  margin-top: .35rem;
  font-size: 1.05rem;
  color: var(--inicio-text-primary, #1f2937);
  font-weight: 600;
}
.pa-h-now-day { color: var(--inicio-text-secondary, #6b7280); font-weight: 500; font-size: .9rem; }

.pa-h-prof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .7rem;
  margin-top: 1rem;
}
.pa-h-prof-item {
  background: white;
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.07));
  border-radius: 12px;
  padding: .8rem 1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  transition: transform .15s, box-shadow .15s;
}
.pa-h-prof-item:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.pa-h-prof-item.libre { border-left: 4px solid #10b981; }
.pa-h-prof-item.ocupado { border-left: 4px solid #ef4444; opacity: .85; }
.pa-h-prof-item .nm { font-weight: 600; color: var(--inicio-text-primary, #1f2937); flex: 1; }
.pa-h-prof-item .st { font-size: .72rem; padding: 3px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.pa-h-prof-item.libre .st { background: rgba(16,185,129,.15); color: #047857; }
.pa-h-prof-item.ocupado .st { background: rgba(239,68,68,.15); color: #b91c1c; }
.pa-h-prof-item .where { font-size: .78rem; color: var(--inicio-text-secondary, #6b7280); }

/* ── Modal ── */
.pa-h-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  padding: 1rem;
}
.pa-h-modal.open { display: flex; }
.pa-h-modal-card {
  background: white;
  border-radius: 18px;
  padding: 1.8rem 1.8rem 1.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  position: relative;
}
.pa-h-modal-card h3 {
  margin: 0 0 1.2rem;
  font-size: 1.2rem;
  color: var(--inicio-text-primary, #1f2937);
  display: flex; align-items: center; gap: .5rem;
}
.pa-h-modal-card .field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.pa-h-modal-card .field label { font-size: .82rem; font-weight: 600; color: var(--inicio-text-secondary, #6b7280); }
.pa-h-modal-card .field input,
.pa-h-modal-card .field select {
  width: 100%;
  padding: .55rem .85rem;
  border-radius: 10px;
  border: 1.5px solid var(--inicio-card-border, rgba(0,0,0,.12));
  font-size: .9rem;
  background: white;
  color: var(--inicio-text-primary, #1f2937);
  box-sizing: border-box;
}
.pa-h-modal-card .field input:focus,
.pa-h-modal-card .field select:focus { outline: none; border-color: var(--inicio-primary, #4f46e5); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.pa-h-modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .8rem; }
.pa-h-modal-close {
  position: absolute; top: .8rem; right: .8rem;
  background: transparent; border: 0; font-size: 1.4rem; color: #9ca3af; cursor: pointer; line-height: 1;
}
.pa-h-modal-close:hover { color: #1f2937; }

/* ── Drop zone (admin carga masiva) ── */
.pa-h-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .7rem; padding: 2.6rem 1.2rem;
  border: 2px dashed rgba(79,70,229,.35);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,179,237,.05), rgba(167,139,250,.05));
  cursor: pointer; text-align: center;
  color: var(--inicio-text-secondary, #6b7280);
  transition: all .25s ease;
}
.pa-h-dropzone:hover, .pa-h-dropzone.dragover {
  background: linear-gradient(135deg, rgba(99,179,237,.12), rgba(167,139,250,.12));
  border-color: var(--inicio-primary, #4f46e5);
}
.pa-h-dropzone .ic { font-size: 2.6rem; }
.pa-h-dropzone strong { color: var(--inicio-primary, #4f46e5); }

/* ── Estado vacío y mensajes ── */
.pa-h-empty {
  text-align: center; padding: 2.5rem 1rem;
  color: var(--inicio-text-secondary, #6b7280);
  font-size: .95rem;
}
.pa-h-empty .ic { font-size: 3rem; margin-bottom: .6rem; }

/* ── Toasts ── (reusa estilo de pa-inicio-cloud) */
.pa-h-toast-container {
  position: fixed; top: 1.2rem; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: .55rem;
  pointer-events: none; max-width: 95vw;
}
.pa-h-toast {
  pointer-events: auto;
  padding: .85rem 1.4rem;
  border-radius: 12px;
  background: white;
  border: 1px solid rgba(0,0,0,.08);
  border-left: 4px solid var(--inicio-primary, #4f46e5);
  color: #1f2937; font-size: .9rem; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  max-width: 420px;
  animation: paHToastIn .25s ease;
}
.pa-h-toast.success { border-left-color: #10b981; }
.pa-h-toast.error   { border-left-color: #ef4444; }
.pa-h-toast.info    { border-left-color: #4f46e5; }
@keyframes paHToastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 720px) {
  .pa-h-card { padding: 1.4rem 1rem; }
  .pa-h-title { font-size: 1.4rem; }
  .pa-h-grid { grid-template-columns: 90px repeat(5, minmax(110px, 1fr)); }
}

/* ══════════════════════════════════════════════
   REQUERIMIENTO 1 — Vista Global Profesor
   ══════════════════════════════════════════════ */

/* Tab switcher Por nivel ↔ Vista global */
.pa-h-view-toggle {
  display: inline-flex;
  background: rgba(0,0,0,.05);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.pa-h-view-btn {
  padding: .42rem .95rem;
  border: 0;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--inicio-text-secondary, #6b7280);
  background: transparent;
  transition: all .18s;
  white-space: nowrap;
}
.pa-h-view-btn.active {
  background: white;
  color: var(--inicio-primary, #4f46e5);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.pa-h-view-btn:not(.active):hover { color: var(--inicio-primary, #4f46e5); }

/* Badges de nivel dentro de la grilla global */
.pa-h-nivel-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  padding: 1px 5px;
  margin-bottom: 2px;
  line-height: 1.4;
}
.pa-h-nivel-badge.basica    { background: rgba(59,130,246,.18);  color: #1d4ed8; }
.pa-h-nivel-badge.media     { background: rgba(139,92,246,.18);  color: #6d28d9; }
.pa-h-nivel-badge.prebasica { background: rgba(249,115,22,.18);  color: #c2410c; }

/* Celdas del grid global */
.pa-h-cell.global-empty {
  background: rgba(0,0,0,.015);
  color: #d1d5db;
  cursor: default;
}
.pa-h-cell.global-empty:hover { transform: none; box-shadow: none; border-color: var(--inicio-card-border, rgba(0,0,0,.08)); }
.pa-h-cell.global-filled {
  cursor: default;
  padding: .5rem .55rem;
  gap: .18rem;
  align-items: flex-start;
}
.pa-h-cell.global-filled:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,.05); }

/* Celda con conflicto */
.pa-h-cell.conflicto {
  background: linear-gradient(135deg, rgba(239,68,68,.14), rgba(239,68,68,.07)) !important;
  border-color: rgba(239,68,68,.55) !important;
  animation: paHConflictPulse 2s ease-in-out infinite;
}
@keyframes paHConflictPulse {
  0%, 100% { border-color: rgba(239,68,68,.55); }
  50%       { border-color: rgba(239,68,68,.9); }
}
.pa-h-global-divider {
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: .25rem 0;
  width: 100%;
}
.pa-h-conflict-chip {
  font-size: .58rem;
  font-weight: 700;
  color: #b91c1c;
  margin-top: .2rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Banner de alerta de conflictos (encima de la grilla) */
.pa-h-conflict-banner {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.28);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  color: #7f1d1d;
  font-size: .9rem;
  line-height: 1.55;
}
.pa-h-conflict-banner .ic { font-size: 1.35rem; flex-shrink: 0; margin-top: .05rem; }

/* Leyenda — puntos extra para niveles y conflicto */
.pa-h-legend .dot.nivel-basica    { background: rgba(59,130,246,.35);  border-color: rgba(59,130,246,.6); }
.pa-h-legend .dot.nivel-media     { background: rgba(139,92,246,.35);  border-color: rgba(139,92,246,.6); }
.pa-h-legend .dot.nivel-prebasica { background: rgba(249,115,22,.35);  border-color: rgba(249,115,22,.6); }
.pa-h-legend .dot.conflicto       { background: rgba(239,68,68,.35);   border-color: rgba(239,68,68,.6); }

/* ══════════════════════════════════════════════
   REQUERIMIENTO 2 — Dashboard UTP / Asistente
   ══════════════════════════════════════════════ */

/* Barra de filtros (día + bloque + buscador) */
.pa-h-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin-bottom: 1.4rem;
  background: rgba(99,179,237,.05);
  border: 1px solid rgba(79,70,229,.1);
  border-radius: 14px;
  padding: .85rem 1rem;
}
.pa-h-filter-group {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.pa-h-filter-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--inicio-text-secondary, #6b7280);
  white-space: nowrap;
}

/* Layout dos paneles */
.pa-h-disponibilidad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 768px) {
  .pa-h-disponibilidad-grid { grid-template-columns: 1fr; }
  .pa-h-filter-bar { flex-direction: column; align-items: stretch; }
}

.pa-h-dispon-panel {
  border-radius: 16px;
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.08));
  overflow: hidden;
  background: white;
}
.pa-h-dispon-panel.libres  { border-color: rgba(16,185,129,.25); }
.pa-h-dispon-panel.ocupados { border-color: rgba(239,68,68,.2); }

.pa-h-panel-hdr {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
}
.pa-h-dispon-panel.libres   .pa-h-panel-hdr { background: rgba(16,185,129,.07);  border-bottom-color: rgba(16,185,129,.2); }
.pa-h-dispon-panel.ocupados .pa-h-panel-hdr { background: rgba(239,68,68,.06);   border-bottom-color: rgba(239,68,68,.15); }

.pa-h-panel-icon { font-size: 1.5rem; line-height: 1; }
.pa-h-panel-title { font-size: .95rem; font-weight: 700; color: var(--inicio-text-primary, #1f2937); }
.pa-h-panel-count { font-size: .78rem; color: var(--inicio-text-secondary, #6b7280); margin-top: .1rem; }

.pa-h-dispon-list {
  padding: .6rem .5rem;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.pa-h-dispon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: var(--inicio-card-bg, #fff);
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
  font-size: .88rem;
  transition: transform .12s, box-shadow .15s;
}
.pa-h-dispon-row:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.pa-h-dispon-row.libre  { border-left: 3px solid #10b981; }
.pa-h-dispon-row.ocupado { border-left: 3px solid #ef4444; }
.pa-h-dispon-row .nm   { font-weight: 600; color: var(--inicio-text-primary, #1f2937); flex: 1; min-width: 0; }
.pa-h-dispon-row .where {
  font-size: .73rem;
  color: var(--inicio-text-secondary, #6b7280);
  margin-top: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa-h-libre-badge, .pa-h-ocupado-badge {
  font-size: .65rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.pa-h-libre-badge   { background: rgba(16,185,129,.14); color: #047857; }
.pa-h-ocupado-badge { background: rgba(239,68,68,.12);  color: #b91c1c; }

.pa-h-empty-sm {
  padding: 1.4rem 1rem;
  text-align: center;
  color: var(--inicio-text-secondary, #6b7280);
  font-size: .85rem;
}

/* ── Celda puente (gap) en Vista Global Profesor ── */
.pa-h-cell.global-gap {
  cursor: default;
  padding: .3rem .4rem;
  gap: 0;
  align-items: stretch;
  background: repeating-linear-gradient(
    -45deg,
    rgba(99,179,237,.03),
    rgba(99,179,237,.03) 4px,
    transparent 4px,
    transparent 8px
  );
  border-style: dashed;
  border-color: rgba(99,179,237,.25);
}
.pa-h-cell.global-gap:hover { transform: none; box-shadow: none; }

.pa-h-gap-half {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .2rem .1rem;
  opacity: .62;
  flex: 1;
}
.pa-h-gap-dir {
  font-size: .65rem;
  color: var(--inicio-text-secondary, #9ca3af);
  font-weight: 700;
  line-height: 1;
  margin-bottom: .1rem;
}
.pa-h-gap-sep {
  height: 1px;
  background: rgba(99,179,237,.3);
  margin: .15rem 0;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   Vista Global Profesor — Estilo Google Calendar
   ══════════════════════════════════════════════ */

.pa-h-gcal-wrap {
  overflow-x: auto;
  border: 1px solid var(--inicio-card-border, rgba(0,0,0,.08));
  border-radius: 14px;
  background: white;
}

/* Cabecera días */
.pa-h-gcal-header {
  display: grid;
  grid-template-columns: 52px repeat(5, 1fr);
  border-bottom: 2px solid var(--inicio-card-border, rgba(0,0,0,.08));
  position: sticky;
  top: 0;
  background: white;
  z-index: 3;
  min-width: 600px;
}
.pa-h-gcal-gutter {
  border-right: 1px solid var(--inicio-card-border, rgba(0,0,0,.08));
}
.pa-h-gcal-dayhdr {
  text-align: center;
  padding: .6rem .3rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--inicio-primary, #4f46e5);
  border-right: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
}
.pa-h-gcal-dayhdr:last-child { border-right: 0; }

/* Cuerpo */
.pa-h-gcal-body {
  display: grid;
  grid-template-columns: 52px repeat(5, 1fr);
  min-width: 600px;
}

/* Gutter de horas */
.pa-h-gcal-gutter-body {
  position: relative;
  border-right: 1px solid var(--inicio-card-border, rgba(0,0,0,.08));
  flex-shrink: 0;
}
.pa-h-gcal-hlabel {
  position: absolute;
  right: 6px;
  font-size: .65rem;
  color: #9ca3af;
  font-weight: 600;
  transform: translateY(-50%);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

/* Columna de día */
.pa-h-gcal-daycol {
  position: relative;
  border-right: 1px solid var(--inicio-card-border, rgba(0,0,0,.06));
}
.pa-h-gcal-daycol:last-child { border-right: 0; }

/* Líneas de hora */
.pa-h-gcal-hline {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px solid rgba(0,0,0,.07);
  pointer-events: none;
}
.pa-h-gcal-hline.half {
  border-top-style: dashed;
  border-top-color: rgba(0,0,0,.04);
}

/* Evento (bloque de clase) */
.pa-h-gcal-ev {
  position: absolute;
  border-radius: 6px;
  padding: .28rem .45rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  box-sizing: border-box;
  border-left: 3px solid transparent;
  cursor: default;
  transition: filter .15s, box-shadow .15s;
}
.pa-h-gcal-ev:hover {
  filter: brightness(.93);
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  z-index: 2;
}

/* Colores por nivel */
.pa-h-gcal-ev.basica {
  background: rgba(59,130,246,.13);
  border-left-color: #3b82f6;
  color: #1e40af;
}
.pa-h-gcal-ev.media {
  background: rgba(139,92,246,.13);
  border-left-color: #8b5cf6;
  color: #5b21b6;
}
.pa-h-gcal-ev.prebasica {
  background: rgba(249,115,22,.13);
  border-left-color: #f97316;
  color: #9a3412;
}
.pa-h-gcal-ev.conflict {
  background: rgba(239,68,68,.14) !important;
  border-left-color: #ef4444 !important;
  color: #991b1b !important;
  animation: paHConflictPulse 2s ease-in-out infinite;
}

/* Textos del evento */
.pa-h-gcal-ev-lvl {
  font-size: .56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .8;
  line-height: 1;
  display: block;
}
.pa-h-gcal-ev-curso {
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pa-h-gcal-ev-asig {
  font-size: .68rem;
  opacity: .85;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pa-h-gcal-ev-time {
  font-size: .6rem;
  opacity: .7;
  margin-top: auto;
  line-height: 1;
}
.pa-h-gcal-ev-warn { font-size: .68rem; line-height: 1; }

@media (max-width: 640px) {
  .pa-h-gcal-header,
  .pa-h-gcal-body { grid-template-columns: 40px repeat(5, minmax(90px, 1fr)); }
  .pa-h-gcal-ev-curso { font-size: .7rem; }
  .pa-h-gcal-ev-asig  { display: none; }
}

/* ============================================================
   Multi-select admin — toggle button, floating bar, cell style
   ============================================================ */

/* Toggle button */
.pa-h-ms-toggle {
  border: 1.5px dashed #9ca3af;
  color: #374151;
  background: #f9fafb;
  font-size: .82rem;
  padding: .35rem .8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.pa-h-ms-toggle:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
}
.pa-h-ms-toggle.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
  border-style: solid;
  font-weight: 700;
}

/* Grid cursor in multi-select mode */
.pa-h-grid--ms .pa-h-cell.empty {
  cursor: crosshair;
}
.pa-h-grid--ms .pa-h-cell.empty:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

/* Selected cell highlight */
.pa-h-cell.multi-selected {
  background: #dbeafe !important;
  border: 2px solid #3b82f6 !important;
  box-shadow: inset 0 0 0 2px #93c5fd;
  position: relative;
}
.pa-h-cell.multi-selected::after {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: .75rem;
  color: #2563eb;
  font-weight: 800;
  line-height: 1;
}

/* Floating action bar */
.pa-h-multibar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 12px;
  padding: .6rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  transition: opacity .2s, transform .2s;
}
.pa-h-multibar--hidden {
  display: none;
}
.pa-h-multibar-count {
  font-size: .85rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

/* Smaller button variant for the bar */
.pa-h-btn-sm {
  padding: .3rem .75rem;
  font-size: .8rem;
  border-radius: 8px;
}

/* Mode hint strip */
.pa-h-ms-hint {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .8rem;
  color: #1d4ed8;
  margin-bottom: .75rem;
}

/* Bulk assign modal — cell summary list */
.pa-h-ms-summary {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: .4rem .5rem;
  margin-bottom: .9rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.pa-h-ms-summary-row {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  font-size: .82rem;
  padding: .18rem .3rem;
  border-radius: 5px;
}
.pa-h-ms-summary-row:nth-child(odd) { background: #f3f4f6; }
.pa-h-ms-summary-day {
  font-weight: 700;
  min-width: 80px;
  color: #374151;
}

