/**
 * remote.css - Consola Virtual Stream Deck Estilo Elgato
 * Cuadrícula de 15, 21 y 30 teclas con slots cóncavos, arrastrar y soltar (Drag & Drop)
 * y modo En Vivo con respuesta táctil física.
 */

:root {
  --deck-bg: #090c14;
  --deck-chassis-bg: #131722;
  --deck-chassis-border: #232a3b;
  --deck-slot-empty: #0c0f17;
  --deck-cyan: #06b6d4;
  --deck-cyan-glow: rgba(6, 182, 212, 0.4);
  --deck-amber: #f59e0b;
  --deck-green: #10b981;
  --deck-red: #ef4444;
  --deck-purple: #8b5cf6;
  --deck-pink: #ec4899;
}

body.deck-body {
  background: var(--deck-bg) !important;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* 1. BARRA SUPERIOR */
.deck-topbar {
  background: rgba(13, 17, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  gap: 0.75rem;
}

body.has-active-context-banner .deck-topbar {
  top: 38px !important;
}

.deck-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deck-app-logo-badge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
  overflow: hidden;
  padding: 2px;
}

.deck-brand {
  display: flex;
  flex-direction: column;
}

.deck-brand-title {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #fff, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.deck-badge-remote {
  font-size: 0.6rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.08em;
}

/* Controles Centrales */
.deck-topbar-center {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.deck-control-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(19, 24, 38, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
}

.deck-control-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deck-control-select {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.deck-control-select option {
  background: #0f172a;
  color: #f8fafc;
  padding: 6px 10px;
}

/* Controles Derechos */
.deck-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.deck-topbar-pill-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  font-family: inherit;
}

.deck-topbar-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.deck-topbar-pill-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.deck-topbar-pill-btn.highlight {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c084fc;
}

.deck-topbar-pill-btn.highlight:hover {
  background: rgba(139, 92, 246, 0.35);
}

.deck-topbar-pill-btn.warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.deck-topbar-pill-btn.warning:hover {
  background: rgba(245, 158, 11, 0.3);
}

.deck-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.15s ease;
}

.deck-icon-btn:active {
  transform: scale(0.92);
}

/* 2. BARRA DE NOTIFICACIÓN DE MODO EDICIÓN */
.deck-edit-notice {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.55rem 1.25rem;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.notice-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.notice-done-btn {
  background: #10b981;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  white-space: nowrap;
}

.notice-done-btn:hover {
  background: #059669;
}

/* 3. CONTENEDOR PRINCIPAL Y CHASIS ELGATO */
.deck-main-layout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  position: relative;
  overflow: hidden;
}

.deck-console-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1150px;
}

/* El Chasis Físico de la Consola */
.deck-console-chassis {
  background: linear-gradient(145deg, #181d2c, #0e121b);
  border: 3px solid #232b3d;
  border-radius: 28px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(6, 182, 212, 0.12),
    inset 0 2px 3px rgba(255, 255, 255, 0.15),
    inset 0 -3px 10px rgba(0, 0, 0, 0.8);
  padding: 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: all 0.3s ease;
}

.deck-chassis-bezel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
}

.deck-chassis-logo-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.deck-chassis-logo {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #475569;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.08);
}

.deck-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.crumb-back-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.crumb-back-btn:hover {
  background: #38bdf8;
  color: #000;
}

.crumb-trail {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.crumb-link {
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s ease;
}

.crumb-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.crumb-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.65rem;
}

.crumb-curr {
  color: #38bdf8;
  font-weight: 800;
}

.deck-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 4. MATRIZ DE TECLAS / CSS GRID */
.deck-grid {
  display: grid;
  gap: 14px;
  width: 100%;
}

/* FORMATO 15 TECLAS: 5 Columnas × 3 Filas (Clásico Elgato) */
.format-15 .deck-grid {
  grid-template-columns: repeat(5, 1fr);
  max-width: 850px;
  margin: 0 auto;
}

/* FORMATO 21 TECLAS: 7 Columnas × 3 Filas */
.format-21 .deck-grid {
  grid-template-columns: repeat(7, 1fr);
  max-width: 1050px;
  margin: 0 auto;
}

/* FORMATO 30 TECLAS: 6 Columnas × 5 Filas (Stream Deck XL) */
.format-30 .deck-grid {
  grid-template-columns: repeat(6, 1fr);
  max-width: 950px;
  margin: 0 auto;
}

/* 5. SLOTS / TECLAS FÍSICAS LCD */
.deck-slot {
  position: relative;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
  box-sizing: border-box;
}

/* FORMA: CUADRADOS (1:1 SQUIRCLE) */
.shape-square .deck-slot {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
}

/* FORMA: RECTÁNGULOS (HORIZONTAL) */
.shape-rectangle .deck-slot {
  aspect-ratio: 1.3 / 1;
  border-radius: 16px;
  padding: 0.5rem;
}

/* CASILLA VACÍA (HUECO RECESO FÍSICO) */
.deck-slot-empty {
  background: var(--deck-slot-empty);
  border: 2px dashed rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-slot-empty:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: #0f131d;
}

.empty-plus {
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
  transition: color 0.15s ease, transform 0.15s ease;
}

.deck-slot-empty:hover .empty-plus {
  color: #38bdf8;
  transform: scale(1.15);
}

.empty-index-badge {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.62rem;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.2);
}

/* CASILLA ACTIVA (TECLA LCD ILUMINADA) */
.deck-slot-active {
  background: linear-gradient(145deg, #1e2538, #131724);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 18px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -2px 5px rgba(0, 0, 0, 0.6);
}

.deck-slot-active:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

/* PULSACIÓN FÍSICA EN VIVO */
.deck-slot-active:active {
  transform: scale(0.91) !important;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.8),
    inset 0 3px 8px rgba(0, 0, 0, 0.7) !important;
}

/* Contenido de Tecla Activa */
.slot-icon-box {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.15s ease;
}

.shape-rectangle .slot-icon-box {
  font-size: 1.8rem;
}

.slot-label-text {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: auto;
}

/* VARIANTES DE COLOR TEMÁTICO PARA TECLAS (ESTILO FOTO 2) */
.deck-slot-active.theme-green {
  background: linear-gradient(145deg, #10b981, #059669);
  border-color: #34d399;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-orange {
  background: linear-gradient(145deg, #f97316, #ea580c);
  border-color: #fb923c;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-blue {
  background: linear-gradient(145deg, #06b6d4, #0284c7);
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-purple {
  background: linear-gradient(145deg, #8b5cf6, #6d28d9);
  border-color: #a78bfa;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-pink {
  background: linear-gradient(145deg, #ec4899, #be185d);
  border-color: #f472b6;
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-red {
  background: linear-gradient(145deg, #ef4444, #b91c1c);
  border-color: #f87171;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-gold {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  border-color: #fbbf24;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.deck-slot-active.theme-slate {
  background: linear-gradient(145deg, #334155, #1e293b);
  border-color: #64748b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

/* Tecla Tipo Carpeta */
.deck-slot.is-folder {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

.slot-folder-indicator {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.62rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fbbf24;
  font-weight: 800;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.04em;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Tecla Especial de Retroceso / Volver Atrás */
.deck-slot.is-back-key {
  background: linear-gradient(145deg, #1e293b, #0f172a) !important;
  border: 2px solid rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(56, 189, 248, 0.2) !important;
}

.deck-slot.is-back-key:hover {
  border-color: #38bdf8 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.4), inset 0 0 18px rgba(56, 189, 248, 0.35) !important;
}

.deck-slot.is-back-key .slot-icon-box {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
}

/* Indicadores y Botón de Edición en Casilla */
.slot-edit-trigger {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

body.mode-edit .deck-slot-active:hover .slot-edit-trigger {
  opacity: 1;
}

.slot-edit-trigger:hover {
  background: #38bdf8;
  color: #000;
  transform: scale(1.1);
}

/* DRAG & DROP ESTADOS */
.deck-slot.drag-over {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.8), inset 0 0 15px rgba(56, 189, 248, 0.4) !important;
  transform: scale(1.05);
}

.deck-slot.is-dragging {
  opacity: 0.4;
  transform: scale(0.92);
}

/* 6. CAJÓN DESPLEGABLE: BIBLIOTECA DE ACCIONES */
.deck-actions-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: rgba(13, 17, 26, 0.96);
  border-left: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-actions-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem 1rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title-box h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
}

.drawer-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  display: block;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.drawer-search-box {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-search-input {
  width: 100%;
  background: #080b12;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  box-sizing: border-box;
}

.drawer-search-input:focus {
  border-color: #38bdf8;
}

.drawer-actions-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-category-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drawer-category-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.drawer-action-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: grab;
  transition: all 0.15s ease;
}

.drawer-action-chip:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(3px);
}

.drawer-action-chip:active {
  cursor: grabbing;
}

.chip-icon {
  font-size: 1.4rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chip-info {
  flex: 1;
  min-width: 0;
}

.chip-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-drag-indicator {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
}

/* 7. MODAL DE CONFIGURACIÓN DE TECLA INDIVIDUAL */
.deck-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 14, 0.82);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
  box-sizing: border-box;
}

.deck-modal-container {
  background: #0d121e;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.15);
  border-radius: 20px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.deck-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.deck-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.deck-modal-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.deck-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.deck-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.deck-modal-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.deck-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 0 20px 20px;
}

.deck-modal-footer-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.deck-slot-modal-window {
  max-width: 480px;
}

.slot-edit-preview-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
}

.slot-preview-badge {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(145deg, #10b981, #059669);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 0.3rem;
  box-sizing: border-box;
}

.slot-preview-icon {
  font-size: 1.8rem;
}

.slot-preview-label {
  font-size: 0.58rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.preview-info-title {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 700;
  display: block;
}

.preview-info-meta {
  font-size: 0.85rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  display: block;
  margin-top: 0.2rem;
}

.deck-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deck-form-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #cbd5e1;
}

.deck-form-input {
  background: #080b12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.deck-form-input:focus {
  border-color: #38bdf8;
}

.emoji-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.emoji-input {
  width: 60px;
  text-align: center;
  font-size: 1.3rem;
}

.quick-emojis {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.quick-emoji-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.quick-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

.slot-color-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.slot-color-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.slot-color-pill:hover {
  transform: scale(1.15);
}

.slot-color-pill.selected {
  border-color: #fff;
  box-shadow: 0 0 12px currentColor;
  transform: scale(1.2);
}

/* Campos de Navegador Web / URL */
.slot-url-target-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.45rem;
}

.deck-form-sublabel {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}

.deck-form-select {
  background: #080b12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
}

.deck-form-select:focus {
  border-color: #38bdf8;
}

/* Tarjeta informativa de Carpeta en modal */
.slot-folder-info-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.folder-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fbbf24;
  font-size: 0.82rem;
}

.btn-folder-enter-action {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-folder-enter-action:hover {
  background: #f59e0b;
  color: #000;
}

.folder-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Bloc de Notas Flotante del Streamer */
.notepad-modal-window {
  max-width: 620px;
  height: 520px;
}

.deck-form-textarea {
  width: 100%;
  height: 320px;
  background: #080b12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: none;
  box-sizing: border-box;
  outline: none;
}

.deck-form-textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.deck-btn-modal-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.deck-btn-modal-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.deck-btn-modal-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.deck-btn-modal-primary:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.deck-modal-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 0 20px 20px;
}

/* 8. TOAST NOTIFICACIÓN */
.deck-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #38bdf8;
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.4);
  border-radius: 99px;
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.deck-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 8.5. BADGE DE SINCRONIZACIÓN Y PWA INSTALL */
.deck-sync-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 99px;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deck-sync-badge:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  transform: translateY(-1px);
}

.deck-sync-badge.sync-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.deck-sync-badge.sync-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.sync-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.8s infinite;
}

.deck-sync-badge.sync-warning .sync-dot-live {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.deck-sync-badge.sync-error .sync-dot-live {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.deck-topbar-pill-btn.pwa-install {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: #a78bfa;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.35);
}

.deck-topbar-pill-btn.pwa-install:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.55);
}

/* Pulsación física remota reflejada en vivo */
.deck-slot.remote-pressed {
  animation: remotePushPulse 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes remotePushPulse {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(0.90); filter: brightness(1.6); box-shadow: 0 0 30px #38bdf8; }
  100% { transform: scale(1); filter: brightness(1); }
}

/* CENTRO DE SINCRONIZACIÓN & ACTUALIZACIONES */
.sync-center-modal-window {
  max-width: 680px;
}

.sync-modal-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 1.25rem 0 1.25rem;
  gap: 0.5rem;
  overflow-x: auto;
}

.sync-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sync-tab-btn:hover {
  color: #fff;
}

.sync-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.sync-tab-content {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.sync-tab-content.active {
  display: flex;
}

/* Pestaña 1: Métricas */
.sync-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sync-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.metric-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-val-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metric-value-text {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.metric-value-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: #34d399;
  font-family: 'JetBrains Mono', monospace;
}

.metric-value-mono {
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
}

.sync-badge-quality {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  border-radius: 6px;
  padding: 2px 6px;
}

.metric-subtext {
  font-size: 0.68rem;
  color: #64748b;
}

.sync-feature-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #cbd5e1;
}

/* Pestaña 2: Comprobador de Actualizaciones */
.update-checker-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.update-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.update-version-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.version-badge-label {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}

.version-badge-num {
  font-size: 1.05rem;
  font-weight: 900;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}

.badge-status-uptodate {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
}

.badge-status-outdated {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
}

.update-actions-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.deck-btn-modal-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.deck-btn-modal-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}

.update-notes-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
}

.update-notes-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #cbd5e1;
  display: block;
  margin-bottom: 0.5rem;
}

.update-notes-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Pestaña 3: Instalación y Código QR */
.install-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.install-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.install-card-icon {
  font-size: 2rem;
}

.install-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.install-card-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.install-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.install-btn:hover {
  background: #38bdf8;
  color: #000;
  transform: translateY(-1px);
}

.qr-connect-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.qr-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.qr-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.qr-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.45;
}

.qr-url-link {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  word-break: break-all;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  margin-top: 0.3rem;
}

.qr-canvas-wrapper {
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

/* 9. RESPONSIVE / MÓVIL Y TABLET */
@media (max-width: 900px) {
  .deck-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .deck-topbar-center, .deck-topbar-right {
    justify-content: center;
  }
  .deck-actions-drawer {
    width: 100%;
    max-width: 320px;
  }
  .deck-grid {
    gap: 8px;
  }
  .deck-slot {
    border-radius: 14px;
    padding: 0.35rem;
  }
  .slot-icon-box {
    font-size: 1.6rem;
  }
  .slot-label-text {
    font-size: 0.62rem;
  }
}

/* ========================================================
   10. DESCARGAS (.EXE & .APK) Y ESCÁNER QR MÓVIL
   ======================================================== */
.install-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.install-btn.highlight {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  border: none;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.install-btn.highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.install-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.install-btn.test-mobile-btn {
  margin-top: 0.75rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  font-weight: 700;
}

.qr-pin-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  margin: 0.4rem 0;
}

.pin-badge-title {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
}

.pin-badge-digits {
  font-size: 1.15rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.1em;
}

.pin-refresh-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.pin-refresh-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

/* Modal de Vinculación Móvil */
.mobile-pairing-window {
  max-width: 480px;
  width: 95%;
}

.mobile-pair-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-pair-logo-icon {
  font-size: 1.8rem;
}

.mobile-pair-tab-content {
  display: none;
  padding: 1rem 0 0.5rem;
}

.mobile-pair-tab-content.active {
  display: block;
}

/* Visor de Cámara para Escaneo QR */
.camera-scanner-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.camera-scanner-box {
  position: relative;
  width: 260px;
  height: 260px;
  background: #020617;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-scanner-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-crosshairs {
  position: absolute;
  inset: 15px;
  pointer-events: none;
}

.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
  box-shadow: 0 0 12px #38bdf8;
  animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% { top: 0%; opacity: 0.3; }
  50% { top: 96%; opacity: 1; }
  100% { top: 0%; opacity: 0.3; }
}

.scanner-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #38bdf8;
  border-style: solid;
}

.scanner-corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.scanner-corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.scanner-corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.scanner-corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

.camera-scanner-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.scanner-status-note {
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
  max-width: 320px;
}

/* Panel de Vinculación por PIN */
.pin-pairing-panel, .account-login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
  gap: 0.8rem;
}

.pin-instruction-icon, .account-instruction-icon {
  font-size: 2.5rem;
  margin-bottom: 0.2rem;
}

.pin-instruction-title {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 800;
  margin: 0;
}

.pin-instruction-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  max-width: 340px;
  margin: 0;
  line-height: 1.4;
}

.pin-big-input {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 12px;
  color: #fff;
  font-size: 1.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.18em;
  padding: 0.5rem 1rem;
  width: 220px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.pin-big-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.account-input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  width: 100%;
  max-width: 320px;
}

.account-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 700;
}

.account-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-size: 0.95rem;
}

.account-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.pin-feedback-msg {
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  margin-top: 0.3rem;
}

