/* PowerAdmin — cursos-hud.css — Estilos específicos del HUD de cursos.html. (Relocado desde assets/cursos-hud.css, sin cambios de contenido.) */

/**
 * Cursos · HUD cyberpunk catalog (solo presentación)
 * negro / zinc / #FF3B30
 */

/* —— Terminal search —— */
.cursos-terminal {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid #27272a;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #121214 0%, #09090b 100%);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.cursos-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.06), transparent 40%);
  opacity: 0.8;
}
.cursos-terminal:focus-within {
  border-color: rgba(255, 59, 48, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 59, 48, 0.15),
    0 0 20px rgba(255, 59, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.cursos-terminal-prefix {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.85rem 0 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #FF3B30;
  border-right: 1px solid #27272a;
  flex-shrink: 0;
  background: rgba(255, 59, 48, 0.04);
  z-index: 1;
}
.cursos-terminal-prefix .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF3B30;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.7);
}
.cursos-terminal input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: #e4e4e7;
  z-index: 1;
}
.cursos-terminal input::placeholder {
  color: #52525b;
  letter-spacing: 0.06em;
}
.cursos-terminal-hint {
  display: none;
  align-items: center;
  padding-right: 0.85rem;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3f3f46;
  flex-shrink: 0;
  z-index: 1;
}
@media (min-width: 640px) {
  .cursos-terminal-hint { display: flex; }
}

/* —— Sector / day headers —— */
.curso-sector {
  margin-bottom: 2rem;
}
.curso-sector-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #27272a;
  position: relative;
}
.curso-sector-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 4.5rem;
  height: 2px;
  background: linear-gradient(90deg, #FF3B30, transparent);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
}
.curso-sector-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.45rem;
  border-radius: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #FF3B30;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.35);
  flex-shrink: 0;
}
.curso-sector-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4f4f5;
}
.curso-sector-meta {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
  flex-shrink: 0;
}

/* —— Course cards —— */
.curso-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  border-radius: 1.1rem;
  border: 1px solid #27272a;
  background:
    linear-gradient(165deg, rgba(24, 24, 27, 0.98) 0%, rgba(9, 9, 11, 0.99) 100%);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.25s ease;
  animation: curso-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform;
}
.curso-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(#FF3B30, #FF3B30) top left / 12px 2px no-repeat,
    linear-gradient(#FF3B30, #FF3B30) top left / 2px 12px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)) bottom right / 10px 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)) bottom right / 1px 10px no-repeat;
  opacity: 0.45;
  z-index: 0;
}
.curso-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 59, 48, 0.45);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(255, 59, 48, 0.12),
    inset 0 0 0 1px rgba(255, 59, 48, 0.08);
}
.curso-card:hover::before {
  opacity: 0.85;
}
.curso-card:active {
  transform: translateY(-1px) scale(0.99);
}

.curso-card-top {
  height: 3px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #FF3B30, rgba(255, 59, 48, 0.2));
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.45);
  position: relative;
  z-index: 1;
}
.curso-card.is-offline .curso-card-top {
  background: #3f3f46;
  box-shadow: none;
  opacity: 0.5;
}

.curso-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.15rem 1.15rem;
  min-height: 0;
}

.curso-card-name {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  color: #fafafa;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tech panel rows: día / hora / profe */
.curso-tech {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #27272a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.curso-tech-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 10px;
  line-height: 1.35;
  min-width: 0;
}
.curso-tech-key {
  flex-shrink: 0;
  width: 2.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #52525b;
}
.curso-tech-val {
  color: #a1a1aa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Big HUD count */
.curso-hud-count {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 0.75rem;
}
.curso-hud-num {
  font-size: 2.65rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: #FF3B30;
  text-shadow: 0 0 24px rgba(255, 59, 48, 0.35);
}
.curso-hud-label {
  margin-top: 0.35rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #71717a;
}
.curso-energy {
  width: 100%;
  height: 3px;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: #18181b;
  overflow: hidden;
  border: 1px solid #27272a;
}
.curso-energy > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b91c1c, #FF3B30 60%, #ff6b63);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.5);
  transition: width 0.4s ease;
}

/* Offline / vacío */
.curso-card.is-offline {
  opacity: 0.72;
  background:
    linear-gradient(165deg, rgba(18, 18, 20, 0.9) 0%, rgba(9, 9, 11, 0.95) 100%);
  border-color: #1f1f22;
  filter: saturate(0.55);
}
.curso-card.is-offline:hover {
  opacity: 0.88;
  filter: saturate(0.75);
  border-color: #3f3f46;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.curso-card.is-offline .curso-card-name {
  color: #71717a;
}
.curso-card.is-offline .curso-hud-num {
  color: #3f3f46;
  text-shadow: none;
}
.curso-card.is-offline .curso-tech {
  background: rgba(0, 0, 0, 0.2);
  border-color: #1f1f22;
}
.curso-card.is-offline .curso-tech-val {
  color: #52525b;
}
.curso-card.is-offline .curso-energy > i {
  background: #3f3f46;
  box-shadow: none;
  width: 0 !important;
}
.curso-offline-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.25rem 0.45rem;
  border-radius: 0.35rem;
  color: #52525b;
  background: #18181b;
  border: 1px solid #27272a;
}

@keyframes curso-card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Modal roster —— */
#curso-modal .pw-panel {
  border-color: #27272a;
  background: linear-gradient(165deg, #18181b, #0c0c0e);
}
.curso-modal-head-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #FF3B30;
  margin: 0 0 0.25rem;
  font-weight: 600;
}
#modal-curso-nombre {
  letter-spacing: 0.04em;
}
#modal-curso-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.curso-roster-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(9, 9, 11, 0.75);
  border: 1px solid #27272a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.curso-roster-row:hover {
  border-color: rgba(255, 59, 48, 0.3);
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.06);
}
.curso-roster-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e4e4e7;
  background: linear-gradient(145deg, #27272a, #18181b);
  border: 1px solid #3f3f46;
}
.curso-roster-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f4f4f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.curso-roster-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: #71717a;
  letter-spacing: 0.04em;
}
.curso-roster-tel {
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 0.15rem;
}

/* Empty catalog */
.cursos-empty-hud {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border: 1px dashed #27272a;
  border-radius: 1rem;
  background: rgba(9, 9, 11, 0.6);
  color: #71717a;
  font-size: 0.875rem;
}
.cursos-empty-hud .tag {
  display: block;
  margin-top: 0.4rem;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 59, 48, 0.55);
}

/* Grid */
.cursos-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 640px) {
  .cursos-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .cursos-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .cursos-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .curso-card {
    animation: none;
  }
  .curso-card:hover {
    transform: none;
  }
}

/* —— Selector de Días Estilo Torneo (Bloque 6 / consolidado en Bloque 1) —— */
.cursos-dia-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.4rem;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cursos-dia-tabs::-webkit-scrollbar { display: none; }
.curso-dia-tab {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #27272a;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.curso-dia-tab:hover { color: #e4e4e7; border-color: #3f3f46; }
.curso-dia-tab:active { transform: scale(0.96); }
.curso-dia-tab.is-active {
  color: #fff;
  background: rgba(255, 59, 48, 0.14);
  border-color: rgba(255, 59, 48, 0.55);
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.3);
}
#cursos-grid {
  transition: opacity 0.16s ease;
}
#cursos-grid.is-switching { opacity: 0.35; }

/* ══════════════════════════════════════════════════════════════════════════
 * RONDA 188 · ui-engine — CURSOS: búsqueda por alumna, roster de UNA línea y
 * ficha de la alumna. Cristal obsidiana, borde neón 1px, halo 14px, sin tramas.
 * Solo transform / opacity / filter con las curvas oficiales. 44 px en la base.
 * ════════════════════════════════════════════════════════════════════════ */
.curso-card-match {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  margin: 0.55rem 0 0;
  padding: 0.3rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.4);
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.15);
}
.curso-card-match-k {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f5c542;
}
.curso-card-match-v {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: #fef3c7;
}

/* —— Fila del roster: nombre · estado · WhatsApp · ficha, en UNA línea —— */
.curso-roster-row.cr-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  min-height: 52px;
  padding: 0.25rem 0.3rem 0.25rem 0.75rem;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)), #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), opacity 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.curso-roster-row.cr-row.is-excluida { opacity: 0.55; }
.cr-row .cr-nombre {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f4f4f5;
}
.cr-row .cr-dup { color: #fbbf24; font-size: 11px; }
.cr-row .cr-estado {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid rgba(161, 161, 170, 0.4);
  color: #a1a1aa;
  background: rgba(39, 39, 42, 0.6);
}
.cr-row .cr-estado--ok   { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.5); background: rgba(6, 78, 59, 0.45); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
.cr-row .cr-estado--warn { color: #fcd34d; border-color: rgba(245, 158, 11, 0.5); background: rgba(120, 53, 15, 0.45); }
.cr-row .cr-estado--late,
.cr-row .cr-estado--risk { color: #fca5a5; border-color: rgba(239, 68, 68, 0.55); background: rgba(127, 29, 29, 0.45); box-shadow: 0 0 10px rgba(239, 68, 68, 0.25); }
.cr-row .power-wa-btn,
.cr-row .cr-ficha {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.cr-row .cr-ficha {
  border-radius: 0.8rem;
  color: #f5c542;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 197, 66, 0.5);
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), filter 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cr-row .cr-ficha:hover { filter: brightness(1.2); }
.cr-row .cr-ficha:active { transform: scale(0.95); }

/* —— Ficha de la alumna —— */
#curso-ficha-modal .cf-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 30%), rgba(13, 13, 18, 0.96);
  border: 1px solid rgba(245, 197, 66, 0.45) !important;
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.25), 0 24px 60px rgba(0, 0, 0, 0.75);
}
#curso-ficha-modal:not(.hidden) .cf-panel { animation: cf-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
#curso-ficha-modal .cf-pet {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
#curso-ficha-modal .cf-nombre { overflow-wrap: anywhere; }
#curso-ficha-modal [hidden] { display: none !important; }
.cf-datos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.cf-dato {
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.cf-dato-k {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a1a1aa;
}
.cf-dato-v {
  display: block;
  min-width: 0;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #f4f4f5;
}
.cf-incluir {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: 0.85rem;
  color: #d4d4d8;
  cursor: pointer;
}
.cf-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1), filter 120ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cf-btn:hover { filter: brightness(1.2); }
.cf-btn:active { transform: scale(0.95); }
.cf-btn--wa {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(6, 78, 59, 0.35);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}
@keyframes cf-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  #curso-ficha-modal:not(.hidden) .cf-panel { animation: none; }
}
