/* ============================================================
   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; }

/* ── 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)); }
}
