/* ========================================================
   TERMINAL POS DOCENTE RÁPIDO (DATÁFONO ESCOLAR DE AULA)
   ======================================================== */

.pos-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .pos-wrapper {
    grid-template-columns: 1fr;
  }
}

/* PANEL IZQUIERDO: RADAR NFC Y DATOS DEL ESTUDIANTE */
.pos-scanner-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* Radar NFC interactivo */
.nfc-radar-zone {
  background: rgba(15, 23, 42, 0.7);
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-normal);
}

.nfc-radar-zone:hover {
  border-color: var(--brand-gold);
  background: rgba(15, 23, 42, 0.9);
}

.nfc-radar-zone.scanning {
  border-color: var(--brand-emerald);
  background: rgba(16, 185, 129, 0.05);
}

.radar-waves-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  font-size: 2rem;
  position: relative;
}

.nfc-radar-zone.scanning .radar-waves-circle {
  background: rgba(16, 185, 129, 0.2);
  color: var(--brand-emerald);
}

.radar-waves-circle::before,
.radar-waves-circle::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: radarPulse 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.radar-waves-circle::after {
  animation-delay: 1s;
}

@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.nfc-radar-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.nfc-radar-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 280px;
}

/* Selector manual rápido de alumno si no hay tarjeta a mano */
.quick-student-select-row {
  display: flex;
  gap: 0.5rem;
}

.pos-select-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.pos-select-input:focus {
  border-color: var(--brand-gold);
}

/* PANEL DERECHO: CONSOLA DE ACCIONES RÁPIDAS (DATÁFONO) */
.pos-actions-console {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}

/* Tarjeta del estudiante activo en el POS */
.pos-active-student-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pos-student-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pos-student-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 2px solid var(--brand-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand-gold);
}

.pos-student-details h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.pos-student-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pos-student-balances-grid {
  display: flex;
  gap: 0.75rem;
  text-align: right;
}

.pos-bal-mini {
  display: flex;
  flex-direction: column;
}

.pos-bal-mini span.num {
  font-weight: 800;
  font-size: 1.1rem;
}

.pos-bal-mini span.label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Pestañas de variable a operar: DÉCIMAS, CLP o PUNTOS */
.pos-currency-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.pos-currency-tab {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pos-currency-tab:hover {
  background: rgba(30, 41, 59, 0.8);
}

.pos-currency-tab.active-decimas {
  border-color: var(--color-decimas);
  background: var(--color-decimas-bg);
  color: var(--color-decimas);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.pos-currency-tab.active-clp {
  border-color: var(--color-clp);
  background: var(--color-clp-bg);
  color: var(--color-clp);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.pos-currency-tab.active-puntos {
  border-color: var(--color-puntos);
  background: var(--color-puntos-bg);
  color: var(--color-puntos);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
}

.pos-currency-tab-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* BOTONES TÁCTILES RÁPIDOS (1-TOQUE) */
.pos-quick-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.pos-quick-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  color: var(--text-primary);
  user-select: none;
}

.pos-quick-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.pos-quick-btn:active {
  transform: scale(0.96);
}

.pos-quick-btn.positive {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}
.pos-quick-btn.positive:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--brand-emerald);
}

.pos-quick-btn.negative {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.3);
}
.pos-quick-btn.negative:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: var(--brand-rose);
}

.pos-quick-btn .val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.pos-quick-btn .subtext {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* MOTIVOS PEDAGÓGICOS RÁPIDOS */
.pos-reasons-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pos-reason-chip {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pos-reason-chip:hover,
.pos-reason-chip.selected {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #0f172a;
}

/* ANIMACIÓN DE TRANSACCIÓN EXITOSA */
.pos-success-splash {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pos-success-splash.show {
  opacity: 1;
  pointer-events: auto;
}

.pos-success-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-emerald);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
