/* ==========================================================================
   RECREOPAY - SISTEMA DE DISEÑO UNIFICADO (MODO CLARO + MODO OSCURO)
   ========================================================================== */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
}

/* Modo Oscuro (activable con el botón de luna 🌙) */
body.dark-mode {
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --secondary: #34d399;
  --accent: #fbbf24;
  --danger: #f87171;
  --bg-main: #0b1120;
  --card-bg: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 14px;
  --shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Contenedor móvil centrado para PWA */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: calc(90px + var(--safe-bottom));
  box-sizing: border-box;
}

/* Top App Bar */
.top-bar {
  background: var(--card-bg);
  padding: calc(12px + var(--safe-top)) 16px 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .top-bar {
    padding: calc(10px + var(--safe-top)) 12px 10px 12px;
  }
  .brand-badge {
    font-size: 1.05rem;
    gap: 6px;
  }
  .brand-badge .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }
  .top-actions {
    gap: 5px;
  }
  .theme-toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }
  .logout-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.brand-badge .logo-icon {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Botones de acción en la cabecera */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  background: var(--bg-main);
  border: 1.5px solid var(--border);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  border-color: var(--primary);
}

.logout-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark-mode .logout-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
  background: #fecaca;
  transform: scale(1.02);
}

/* Tarjeta de Saldo y Carné Digital */
.wallet-card {
  margin: 16px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.35);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
  .wallet-card {
    margin: 12px 10px;
    padding: 16px 14px;
  }
}

body.dark-mode .wallet-card:not([class*="theme-"]) {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5);
}

.wallet-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.student-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.student-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
  overflow: hidden;
}

.student-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.transfer-target-avatar-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.admin-selected-avatar-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2.5px solid #0284c7;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.3);
}

.link-preview-avatar-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2.5px solid #0284c7;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

.student-meta h2 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}

.student-grade {
  font-size: 0.85rem;
  opacity: 0.9;
  display: inline-block;
  margin-top: 2px;
}

.wallet-logout-pill {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.wallet-logout-pill:hover,
.wallet-logout-pill:active {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(0.96);
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 14px;
}

.balance-col .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.balance-col .amount {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kids-coin-icon {
  font-size: 1.6rem;
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.qr-toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 8px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.qr-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.02);
}

/* Modal del Código QR Escolar */
.modal-qr-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)) 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-qr-card {
  background: var(--card-bg, #ffffff);
  color: var(--text-main, #0f172a);
  border-radius: 24px;
  padding: 24px 18px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  position: relative;
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  max-height: calc(100vh - 36px - var(--safe-top) - var(--safe-bottom));
  overflow-y: auto;
}

@media (max-width: 480px) {
  .modal-qr-card {
    padding: 18px 14px;
    border-radius: 20px;
  }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.qr-code-img {
  width: 220px;
  height: 220px;
  margin: 14px auto;
  display: block;
  border-radius: 12px;
  border: 2px dashed #0284c7;
  padding: 6px;
}

/* ==========================================================================
   MODAL QR INMERSIVO SIBOPAY (DISEÑO MÓVIL EXACTO A LA REFERENCIA)
   ========================================================================== */
.modal-qr-sibopay-immersive {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)) 20px;
  box-sizing: border-box;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

body.dark-mode .modal-qr-sibopay-immersive {
  background: #0b1120;
}

.qr-immersive-bg-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44%;
  min-height: 230px;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  border-bottom-left-radius: 36px;
  border-bottom-right-radius: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(34px + var(--safe-top));
  box-sizing: border-box;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25);
  pointer-events: none;
}

.qr-immersive-brand-title {
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.qr-immersive-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 325px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: calc(56px + var(--safe-top));
  animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-immersive-card {
  width: 100%;
  background: #ffffff;
  border-radius: 26px;
  padding: 24px 20px 22px 20px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-sizing: border-box;
}

body.dark-mode .qr-immersive-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.qr-card-header-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

body.dark-mode .qr-card-header-title {
  color: #f1f5f9;
}

.qr-scanner-frame-wrapper {
  position: relative;
  width: 224px;
  height: 224px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px;
}

.qr-frame-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #94a3b8;
  border-style: solid;
}

body.dark-mode .qr-frame-corner {
  border-color: #64748b;
}

.qr-frame-corner.top-left {
  top: 0;
  left: 0;
  border-width: 3.5px 0 0 3.5px;
  border-top-left-radius: 8px;
}

.qr-frame-corner.top-right {
  top: 0;
  right: 0;
  border-width: 3.5px 3.5px 0 0;
  border-top-right-radius: 8px;
}

.qr-frame-corner.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 3.5px 3.5px;
  border-bottom-left-radius: 8px;
}

.qr-frame-corner.bottom-right {
  bottom: 0;
  right: 0;
  border-width: 0 3.5px 3.5px 0;
  border-bottom-right-radius: 8px;
}

.qr-immersive-code-img {
  width: 196px;
  height: 196px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: #ffffff;
}

.qr-card-token-text {
  margin-top: 18px;
  font-family: monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.6px;
  word-break: break-all;
}

body.dark-mode .qr-card-token-text {
  color: #94a3b8;
}

.qr-immersive-btn-close {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.qr-immersive-btn-close:hover {
  background: #0369a1;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.48);
}

.qr-immersive-btn-close:active {
  transform: scale(0.98);
}

/* Banner de Límite Diario / Alerta */
.daily-limit-badge {
  background: var(--card-bg);
  border: 1px solid var(--border);
  margin: 0 16px 16px 16px;
  padding: 10px 14px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.daily-limit-badge strong {
  color: var(--secondary);
}

/* Navegación por Categorías */
/* =================================================== */
/* BUSCADOR INTELIGENTE DEL MENÚ (ESTUDIANTES Y PADRES) */
/* =================================================== */
.menu-smart-search-section {
  padding: 0 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-smart-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 14px;
  padding: 0 14px;
  height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.menu-smart-search-box:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15), 0 3px 10px rgba(0, 0, 0, 0.05);
}

.menu-smart-search-icon {
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.menu-smart-search-box:focus-within .menu-smart-search-icon {
  color: #0284c7;
}

.menu-smart-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-main, #0f172a);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0;
  height: 100%;
  outline: none;
}

.menu-smart-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.menu-smart-search-clear-btn {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.menu-smart-search-clear-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

.menu-smart-search-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.menu-smart-search-chips::-webkit-scrollbar {
  display: none;
}

.search-chip {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.search-chip:hover, .search-chip.active {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
  transform: translateY(-1px);
}

.menu-smart-search-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  padding: 0 4px;
}

.menu-smart-search-stats strong {
  color: var(--text-main, #0f172a);
}

.menu-smart-search-reset-link {
  background: none;
  border: none;
  color: #0284c7;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.menu-smart-search-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  background: var(--card-bg, #ffffff);
  border: 1.5px dashed var(--border, #cbd5e1);
  border-radius: 16px;
  margin: 6px 0;
}

.menu-smart-search-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  display: inline-block;
}

.menu-smart-search-empty h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0 0 6px 0;
}

.menu-smart-search-empty p {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  margin: 0 0 14px 0;
}

.menu-smart-search-suggestions {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

body.dark-mode .menu-smart-search-box {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .menu-smart-search-clear-btn {
  background: #334155;
  color: #94a3b8;
}
body.dark-mode .search-chip {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
body.dark-mode .search-chip:hover, body.dark-mode .search-chip.active {
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border-color: #0284c7;
}
body.dark-mode .menu-smart-search-empty {
  background: #1e293b;
  border-color: #334155;
}

.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 4px 16px 12px 16px;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.cat-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Grilla de Productos */
.section-title {
  padding: 0 16px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-icon-wrap {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 8px;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-mep {
  font-size: 0.68rem;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--primary);
}

.add-btn {
  background: var(--primary);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
  transition: transform 0.15s;
}

.add-btn:active {
  transform: scale(0.9);
}

/* Barra Flotante de Carrito / Pre-orden */
.floating-cart-bar {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 448px;
  margin: 0 auto;
  background: #0f172a;
  color: white;
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  z-index: 50;
  cursor: pointer;
}

@media (max-width: 640px) {
  .floating-cart-bar {
    bottom: calc(72px + var(--safe-bottom));
    left: 12px;
    right: 12px;
    padding: 10px 14px;
  }
}

body.dark-mode .floating-cart-bar {
  background: #0284c7;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cart-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-count-badge {
  background: var(--accent);
  color: #0f172a;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.cart-total-text {
  font-size: 1.1rem;
  font-weight: 800;
}

.cart-action-btn {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ==========================================================================
   TERMINAL POS SODA (pos.html) - TEMA SAAS PROFESIONAL CLARO (ADMIN-MATCH)
   ========================================================================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  height: 100vh;
  overflow: hidden;
  background: #f8fafc;
  color: #0f172a;
}

.pos-catalog-pane {
  background: #f8fafc;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  box-sizing: border-box;
}

.pos-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  gap: 10px;
}

.pos-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pos-tab-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pos-tab-btn .tab-label-short {
  display: none;
}

.pos-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.pos-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.15);
}

@media (max-width: 900px) {
  .pos-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    padding-bottom: 8px !important;
    overflow-x: hidden !important;
  }

  .pos-tab-btn {
    padding: 7px 4px !important;
    font-size: 0.74rem !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 2px !important;
    min-width: 0 !important;
    width: 100% !important;
    line-height: 1.15 !important;
    border-radius: 10px !important;
  }

  .pos-tab-btn .tab-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .pos-tab-btn .tab-label-full {
    display: none !important;
  }

  .pos-tab-btn .tab-label-short {
    display: inline-block !important;
  }
}

/* ==========================================================================
   BUSCADOR INTELIGENTE DE PRODUCTOS EN MOSTRADOR (POS)
   ========================================================================== */
.pos-search-bar-wrap {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.pos-search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 14px;
  height: 42px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
  position: relative;
}

.pos-search-input-box:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pos-search-icon {
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.pos-search-input-box:focus-within .pos-search-icon {
  color: #0284c7;
}

.pos-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  height: 100%;
  outline: none;
}

.pos-search-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.pos-search-clear-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pos-search-clear-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

.pos-search-shortcut-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.pos-search-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #64748b;
  padding: 0 4px;
}

.pos-search-stats strong {
  color: #0f172a;
}

.pos-search-reset-link {
  background: none;
  border: none;
  color: #0284c7;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}

.pos-search-reset-link:hover {
  color: #0369a1;
}

.pos-search-empty-state {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  color: #64748b;
  margin: 10px 0;
}

.pos-search-empty-state h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 8px 0 4px 0;
}

.pos-search-empty-state p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 14px 0;
}

.pos-prod-card.search-match-first {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

@media (max-width: 640px) {
  .pos-search-shortcut-pill {
    display: none;
  }
  .pos-search-input {
    font-size: 0.85rem;
  }
}

/* Toolbar de categorías y botón + Rápido */
.pos-category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
}

.pos-category-scroll-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding: 2px 2px 6px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pos-cat-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pos-cat-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.pos-cat-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.pos-btn-quick-prod {
  flex-shrink: 0;
  white-space: nowrap;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .pos-category-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pos-btn-quick-prod {
    width: 100%;
    height: 38px;
    order: -1;
  }
}

/* Tarjetas de producto POS */
.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.pos-prod-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: all 0.15s ease;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
}

.pos-prod-card:hover {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.12);
}

.pos-prod-card .prod-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.pos-prod-card .prod-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0284c7;
  margin-top: 6px;
}

.pos-prod-card.out-of-stock-pos {
  opacity: 0.55 !important;
  filter: grayscale(85%) !important;
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
  cursor: not-allowed !important;
}

/* Tarjetas de Pre-órdenes */
.pos-preorder-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s ease;
}

.pos-preorder-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pos-preorder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pos-preorder-student {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pos-preorder-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #0284c7;
  background: #f1f5f9;
  flex-shrink: 0;
  object-fit: cover;
}

.pos-preorder-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pos-preorder-name {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
}

.pos-preorder-grade {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

.pos-preorder-ticket-info {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
}

.pos-preorder-items-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #0369a1;
  font-weight: 700;
}

.pos-preorder-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
  margin-top: 2px;
}

.pos-preorder-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pos-preorder-total-label {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.pos-preorder-total-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.pos-btn-entregar {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
  font-weight: 800 !important;
  height: 34px !important;
  padding: 0 16px !important;
}

.pos-btn-entregar:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

@media (max-width: 640px) {
  .pos-preorder-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pos-btn-entregar {
    width: 100% !important;
    height: 38px !important;
  }
}

/* Panel Checkout Derecho */
.pos-checkout-pane {
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  min-width: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.03);
}

.pos-qty-btn {
  width: 28px;
  height: 28px;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.pos-qty-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0284c7;
}

.pos-qty-btn:active {
  transform: scale(0.92);
}

.scanner-feed-card {
  background: #0f172a;
  border: 2px dashed #0284c7;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.camera-preview {
  width: 100%;
  height: 180px;
  background: #000000;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.laser-scan-line {
  position: absolute;
  top: 20px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: scanMove 2s infinite ease-in-out;
}

@keyframes scanMove {
  0% { top: 20px; opacity: 0.8; }
  50% { top: 180px; opacity: 1; }
  100% { top: 20px; opacity: 0.8; }
}

.pos-cart-list {
  flex-grow: 1;
  overflow-y: auto;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
}

.pos-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.pos-cart-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Elementos móviles ocultos por defecto en pantallas grandes */
.pos-mobile-nav {
  display: none;
}

.pos-mobile-back-bar {
  display: none;
}

.pos-floating-checkout-bar {
  display: none;
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVE POS PARA MÓVILES Y PANTALLAS ANGOSTAS (<= 900px)
   ========================================================================== */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
  }

  .pos-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  /* BARRA DE PESTAÑAS MÓVIL EN LA CABECERA */
  .pos-mobile-nav {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 8px 10px;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
  }

  .pos-mobile-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .pos-mobile-nav-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  }

  .pos-mobile-nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1;
  }

  /* CONTROL DE VISIBILIDAD ENTRE CATÁLOGO Y CAJA EN MÓVIL */
  body.pos-mobile-view-catalog .pos-catalog-pane {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px;
    padding-bottom: 95px; /* Espacio para barra flotante */
    box-sizing: border-box;
    overflow-x: hidden !important;
  }

  body.pos-mobile-view-catalog .pos-checkout-pane {
    display: none !important;
  }

  body.pos-mobile-view-checkout .pos-catalog-pane {
    display: none !important;
  }

  body.pos-mobile-view-checkout .pos-checkout-pane {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    border-left: none;
    border-top: none;
    padding: 14px;
    box-sizing: border-box;
    min-height: calc(100vh - 65px);
  }

  /* BOTÓN REGRESAR AL CATÁLOGO */
  .pos-mobile-back-bar {
    display: block;
    margin-bottom: 12px;
    width: 100%;
  }

  .pos-mobile-back-btn {
    width: 100%;
    padding: 11px 14px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    transition: all 0.15s ease;
  }

  .pos-mobile-back-btn:active {
    background: #f1f5f9;
  }

  /* BARRA FLOTANTE INFERIOR DE ACCESO RÁPIDO */
  .pos-floating-checkout-bar {
    position: fixed;
    bottom: 14px;
    left: 12px;
    right: 12px;
    background: #0f172a;
    border: 1px solid #0f172a;
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    z-index: 99;
    cursor: pointer;
    box-sizing: border-box;
    animation: popUpFloat 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
  }

  @keyframes popUpFloat {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* AJUSTE DE CUADRÍCULA DE PRODUCTOS EN PANTALLAS PEQUEÑAS */
  .pos-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 10px !important;
  }

  .pos-prod-card {
    padding: 12px !important;
    min-height: 115px !important;
  }

  .pos-cart-item {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
}

/* ==========================================================================
   CARNÉ ESCOLAR FÍSICO IMPRIMIBLE (carnet.html)
   ========================================================================== */
.carnets-sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15mm;
  padding: 10mm;
}

.carnet-card {
  width: 85.6mm;
  height: 54mm;
  border: 1.5px solid #cbd5e1;
  border-radius: 3.5mm;
  padding: 3mm 4mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
  color: #0f172a;
  position: relative;
  box-sizing: border-box;
  page-break-inside: avoid;
}

.carnet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0284c7;
  padding-bottom: 1.5mm;
}

.carnet-school-name {
  font-size: 7.5pt;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
}

.carnet-body {
  display: flex;
  gap: 3mm;
  align-items: center;
  margin: 2mm 0;
}

.carnet-photo {
  width: 22mm;
  height: 22mm;
  border-radius: 2mm;
  border: 1px solid #cbd5e1;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-weight: 900;
  font-size: 13pt;
  letter-spacing: 0.5px;
}

.carnet-details {
  flex: 1;
}

.carnet-name {
  font-size: 9pt;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1mm;
}

.carnet-meta-item {
  font-size: 6.8pt;
  color: #475569;
}

.carnet-qr {
  width: 20mm;
  height: 20mm;
  border: 1px solid #e2e8f0;
}

.carnet-footer {
  font-size: 5.5pt;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  padding-top: 1mm;
  display: flex;
  justify-content: space-between;
}

@media print {
  body {
    background: white !important;
    padding: 0 !important;
  }
  .no-print {
    display: none !important;
  }
  .carnet-card {
    border: 1px solid #94a3b8;
    box-shadow: none;
  }
}

/* ==========================================================================
   VISTA DE LOGIN Y AUTENTICACIÓN
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 10%, #0284c7 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  overflow-y: auto;
}

.login-card {
  background: var(--card-bg, #ffffff);
  color: var(--text-main, #0f172a);
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: fadeIn 0.25s ease-out;
}

.login-brand {
  text-align: center;
  margin-bottom: 22px;
}

.login-logo {
  font-size: 3rem;
  display: inline-block;
  background: #e0f2fe;
  padding: 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin: 0;
}

.login-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
  font-weight: 600;
}

.login-form-group {
  margin-bottom: 14px;
}

.login-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: #334155;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.95rem;
  font-weight: 700;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.login-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: transform 0.1s;
}

.login-submit-btn:active {
  transform: scale(0.98);
}

.login-demo-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed #e2e8f0;
  text-align: center;
}

.login-demo-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.login-demo-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .login-demo-btns {
    grid-template-columns: repeat(2, 1fr);
  }
}

.login-demo-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.login-demo-btn:hover {
  background: #e2e8f0;
  border-color: #0284c7;
}

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN DE LA SODA (#viewAdmin)
   ========================================================================== */
.admin-container {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-main, #f8fafc);
  padding: calc(16px + var(--safe-top)) 16px calc(60px + var(--safe-bottom)) 16px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-header-actions .theme-toggle-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-sizing: border-box;
  margin: 0;
  border: 1.5px solid var(--border);
}

.admin-action-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
  line-height: 1;
}

.admin-action-btn:active {
  transform: scale(0.96);
}

.admin-action-btn-recarga {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.admin-action-btn-recarga:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.admin-action-btn-caja {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.admin-action-btn-caja:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
}

.admin-action-btn-salir {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.admin-action-btn-salir:hover {
  background: #fecaca;
}

body.dark-mode .admin-action-btn-salir {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-icon {
  font-size: 1.8rem;
  background: #e0f2fe;
  padding: 8px;
  border-radius: 12px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.admin-stat-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.admin-stat-card .val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0284c7;
}

.admin-stat-card .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  color: var(--text-muted, #64748b);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.admin-tab-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.admin-tab-btn:hover {
  color: var(--text-main, #0f172a);
  border-color: #94a3b8;
  background: var(--bg-main, #f8fafc);
}

.admin-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2);
}

body.dark-mode .admin-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.admin-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

/* Tabla / Lista de Inventario Admin Responsive */
.inventory-item-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  transition: background 0.15s;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .inventory-item-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.inventory-item-row:last-child {
  border-bottom: none;
}

.inventory-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.inventory-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 640px) {
  .inventory-item-bottom {
    width: auto;
    justify-content: flex-end;
    gap: 12px;
  }
}

.inventory-stock-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stock-btn-quick {
  padding: 6px 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  color: #1e293b;
}

.stock-btn-quick:hover {
  background: #e2e8f0;
}

.admin-student-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (max-width: 600px) {
  .admin-container {
    padding: calc(12px + var(--safe-top)) 10px calc(80px + var(--safe-bottom)) 10px;
  }
  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }
  .admin-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 6px;
    align-items: center;
  }
  .admin-action-btn {
    height: 38px;
    padding: 0 4px;
    font-size: 0.74rem;
    gap: 3px;
  }
  @media (max-width: 380px) {
    .admin-action-btn {
      font-size: 0.67rem;
      padding: 0 2px;
    }
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .admin-stat-card {
    padding: 10px 8px;
  }
  .admin-stat-card .val {
    font-size: 1.25rem;
  }
  .admin-tab-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  .admin-card {
    padding: 14px 12px;
    border-radius: 14px;
  }
}

/* ==========================================================================
   PRODUCTO AGOTADO (GREYED OUT) Y TARJETA BLOQUEADA
   ========================================================================== */
.product-card.out-of-stock {
  opacity: 0.52 !important;
  filter: grayscale(85%) !important;
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
  position: relative;
}

body.dark-mode .product-card.out-of-stock {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.badge-out-of-stock {
  display: inline-block;
  background: #ef4444;
  color: white;
  font-weight: 900;
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.pos-prod-card.out-of-stock-pos {
  opacity: 0.45 !important;
  filter: grayscale(85%) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  cursor: not-allowed !important;
  position: relative !important;
}

.banner-card-blocked {
  background: #fee2e2;
  border: 2px solid #ef4444;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 14px;
  margin: 10px 16px 14px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.dark-mode .banner-card-blocked {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: #ef4444;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN INFERIOR PWA (MÓVILES)
   ========================================================================== */
.pwa-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card-bg, #ffffff);
  border-top: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 641px) {
  .pwa-bottom-nav {
    display: none !important;
  }
}

body.dark-mode .pwa-bottom-nav {
  background: rgba(30, 41, 59, 0.95);
  border-color: #334155;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

.pwa-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 6px 0;
  color: var(--text-muted, #64748b);
  transition: all 0.15s ease;
  min-width: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pwa-nav-item:active {
  transform: scale(0.92);
}

.pwa-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1;
  display: block;
  white-space: nowrap;
}

.pwa-nav-item.active {
  color: var(--primary, #0284c7);
}

.pwa-nav-item.active .pwa-nav-icon {
  transform: scale(1.1);
  transition: transform 0.15s ease;
}

.pwa-nav-logout {
  color: #ef4444 !important;
}

.pwa-nav-logout:active {
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
}

/* ==========================================================================
   PESTAÑAS DE LOGIN / REGISTRO
   ========================================================================== */
.login-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 18px;
  gap: 4px;
}

body.dark-mode .login-tabs {
  background: #0f172a;
}

.login-tab-btn {
  flex: 1;
  padding: 9px 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.login-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.dark-mode .login-tab-btn.active {
  background: #1e293b;
  color: #38bdf8;
}

/* ==========================================================================
   PORTAL DEDICADO DE PADRES (#viewPadres)
   ========================================================================== */
.parent-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  width: 100%;
  padding: calc(14px + var(--safe-top)) 16px calc(90px + var(--safe-bottom)) 16px;
  box-sizing: border-box;
}

.parent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  gap: 10px;
}

.parent-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.parent-icon {
  font-size: 1.8rem;
  background: #f0fdf4;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}

.parent-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.parent-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

/* Tarjetas de Hijos Vinculados */
.parent-children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.parent-child-card {
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--card-bg, #ffffff);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.parent-child-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.parent-child-card.active,
.parent-child-card.selected {
  border: 2.5px solid #0284c7 !important;
  background: #f0f9ff !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25), 0 6px 16px rgba(2, 132, 199, 0.16) !important;
}

body.dark-mode .parent-child-card.active,
body.dark-mode .parent-child-card.selected {
  background: rgba(2, 132, 199, 0.18) !important;
  border: 2.5px solid #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28), 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

.child-initials-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.parent-child-card.active .child-initials-badge,
.parent-child-card.selected .child-initials-badge {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35);
}

.parent-active-child-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
  border: 2px solid #ffffff;
}

.parentSubViewChildAvatarBadge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Buscador Inteligente en Admin Carga */
.admin-search-container {
  position: relative;
  margin-bottom: 14px;
}

.admin-search-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-search-input {
  width: 100%;
  display: block;
  padding: 11px 36px 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border, #cbd5e1);
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--card-bg, #ffffff);
  color: var(--text-main, #0f172a);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.admin-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.admin-scan-btn {
  padding: 11px 14px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transition: transform 0.1s;
}

.admin-scan-btn:active {
  transform: scale(0.97);
}

.admin-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg, #ffffff);
  border: 2px solid #0284c7;
  border-radius: 14px;
  max-height: 290px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  margin-top: 6px;
}

.admin-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  cursor: pointer;
  transition: background 0.15s;
}

.admin-search-item:last-child {
  border-bottom: none;
}

.admin-search-item:hover, .admin-search-item:active, .admin-search-item.selected {
  background: #f0f9ff;
}

body.dark-mode .admin-search-item:hover, body.dark-mode .admin-search-item.selected {
  background: rgba(2, 132, 199, 0.15);
}

.selected-student-banner {
  background: #f8fafc;
  border: 2px solid #0284c7;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

body.dark-mode .selected-student-banner {
  background: rgba(30, 41, 59, 0.6);
  border-color: #38bdf8;
}

/* Animación de actualización de saldo y disponible en tiempo real */
@keyframes balancePulseHighlight {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); }
  35% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9)); color: #0284c7; }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); }
}

.balance-updated {
  animation: balancePulseHighlight 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
}

/* ==========================================================================
   BOTONES DE MONTO RÁPIDO (TRANSFERENCIAS P2P)
   ========================================================================== */
.mode-btn,
.transfer-amount-btn {
  padding: 10px 8px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main, #1e293b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mode-btn:hover,
.transfer-amount-btn:hover {
  border-color: #0284c7;
  transform: translateY(-1px);
}

.mode-btn.active,
.transfer-amount-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
  transform: scale(1.03);
}

body.dark-mode .mode-btn,
body.dark-mode .transfer-amount-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

/* ==========================================================================
   GESTIÓN DE PERSONAL (TARJETAS DE EMPLEADOS)
   ========================================================================== */
.admin-staff-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.admin-staff-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

body.dark-mode .admin-staff-card:hover {
  border-color: #475569;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.admin-staff-card.blocked {
  background: #fffafa;
  border-color: #fecaca;
  opacity: 0.9;
}

body.dark-mode .admin-staff-card.blocked {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.25);
}

.staff-initials-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
body.dark-mode .staff-initials-avatar {
  background: #0284c7;
  color: #ffffff;
}

.staff-role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.staff-role-admin {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.25);
}
body.dark-mode .staff-role-admin {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.3);
}

.staff-role-cajero {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
body.dark-mode .staff-role-cajero {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.staff-role-vendedor {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
body.dark-mode .staff-role-vendedor {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

@media (max-width: 768px) {
  .admin-staff-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
}

/* Botones de acción de inventario y personal */
.btn-action-edit {
  padding: 6px 12px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-action-edit:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-action-block {
  padding: 6px 10px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-action-block:hover {
  background: #ffedd5;
}

.btn-action-delete {
  padding: 6px 10px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-action-delete:hover {
  background: #fee2e2;
}

/* ==========================================================================
   CHIP Y ELEMENTOS INTELIGENTES DE LA TARJETA VIRTUAL
   ========================================================================== */
.card-chip-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.card-emv-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
  border: 1px solid rgba(161, 98, 7, 0.4);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.7), 0 2px 5px rgba(0,0,0,0.15);
}

.chip-inner-circuit {
  width: 100%;
  height: 100%;
  position: relative;
}

.chip-inner-circuit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(161, 98, 7, 0.45);
}

.chip-inner-circuit::after {
  content: "";
  position: absolute;
  left: 45%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(161, 98, 7, 0.45);
}

.card-contactless-wave {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -2px;
  opacity: 0.8;
  transform: rotate(90deg);
  display: flex;
  user-select: none;
}

/* ==========================================================================
   TEMAS PERSONALIZADOS PARA LA TARJETA VIRTUAL (15 DISEÑOS)
   ========================================================================== */

/* 1. Azul RecreoPay Clásico */
.wallet-card.theme-classic-blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.35) !important;
}

/* 2. Classic Premium (Navy & Oro) */
.wallet-card.theme-classic-premium {
  background: linear-gradient(135deg, #090e1a 0%, #151e33 60%, #060913 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 12px 30px -4px rgba(245, 158, 11, 0.25), 0 0 15px rgba(245, 158, 11, 0.1) !important;
}
.wallet-card.theme-classic-premium .amount span,
.wallet-card.theme-classic-premium #walletBalance {
  color: #fbbf24 !important;
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}
.wallet-card.theme-classic-premium .student-avatar {
  border-color: #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}
.wallet-card.theme-classic-premium .student-grade,
.wallet-card.theme-classic-premium .label {
  color: #fef3c7 !important;
  opacity: 0.9;
}

/* 3. Technological Metal (Titanio Negro Cepillado) */
.wallet-card.theme-tech-metal {
  background: linear-gradient(135deg, #18181b 0%, #27272a 50%, #09090b 100%) !important;
  color: #f4f4f5 !important;
  border: 1.5px solid #71717a !important;
  box-shadow: 0 12px 25px -4px rgba(0, 0, 0, 0.6) !important;
}
.wallet-card.theme-tech-metal .card-emv-chip {
  background: linear-gradient(135deg, #f4f4f5 0%, #d4d4d8 50%, #a1a1aa 100%) !important;
  border-color: #71717a !important;
}
.wallet-card.theme-tech-metal .amount span,
.wallet-card.theme-tech-metal #walletBalance {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* 4. Eco-Aventura (Bosques y Montañas) */
.wallet-card.theme-eco-aventura {
  background: linear-gradient(180deg, #064e3b 0%, #065f46 45%, #047857 75%, #022c22 100%) !important;
  color: #ecfdf5 !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 12px 25px -4px rgba(5, 150, 105, 0.35) !important;
}
.wallet-card.theme-eco-aventura .amount span,
.wallet-card.theme-eco-aventura #walletBalance {
  color: #a7f3d0 !important;
  text-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* 5. Robo-Lab Cyber (Circuitos y Neón Cian) */
.wallet-card.theme-robo-lab {
  background: linear-gradient(135deg, #030712 0%, #082f49 50%, #0c4a6e 100%) !important;
  color: #e0f2fe !important;
  border: 1.5px solid #06b6d4 !important;
  box-shadow: 0 12px 25px -4px rgba(6, 182, 212, 0.4) !important;
}
.wallet-card.theme-robo-lab .amount span,
.wallet-card.theme-robo-lab #walletBalance {
  color: #22d3ee !important;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}
.wallet-card.theme-robo-lab .student-avatar {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4) !important;
}

/* 6. Mundo de Arte (Acuarela Multicolor) */
.wallet-card.theme-mundo-arte {
  background: linear-gradient(135deg, #ffffff 0%, #fdf4ff 40%, #f0fdf4 70%, #eff6ff 100%) !important;
  color: #0f172a !important;
  border: 2px solid transparent !important;
  border-image: linear-gradient(135deg, #ec4899, #8b5cf6, #06b6d4, #10b981, #f59e0b) 1 !important;
  box-shadow: 0 12px 25px -4px rgba(236, 72, 153, 0.25) !important;
}
.wallet-card.theme-mundo-arte h2,
.wallet-card.theme-mundo-arte #walletName {
  color: #0f172a !important;
}
.wallet-card.theme-mundo-arte .student-grade,
.wallet-card.theme-mundo-arte .label {
  color: #475569 !important;
}
.wallet-card.theme-mundo-arte .amount span,
.wallet-card.theme-mundo-arte #walletBalance {
  color: #9333ea !important;
  font-weight: 900 !important;
}
.wallet-card.theme-mundo-arte .student-avatar {
  border-color: #ec4899 !important;
}
.wallet-card.theme-mundo-arte .qr-toggle-btn {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

/* 7. Estrellas del Campo (Fútbol Verde) */
.wallet-card.theme-futbol {
  background: repeating-linear-gradient(90deg, #15803d, #15803d 45px, #166534 45px, #166534 90px) !important;
  color: #ffffff !important;
  border: 1.5px solid #86efac !important;
  box-shadow: 0 12px 25px -4px rgba(22, 101, 52, 0.4) !important;
}
.wallet-card.theme-futbol .amount span,
.wallet-card.theme-futbol #walletBalance {
  color: #fef08a !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* 8. Club de Mascotas (Golden Retriever y Ámbar Suave) */
.wallet-card.theme-mascotas {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 60%, #f59e0b 100%) !important;
  color: #78350f !important;
  border: 1.5px solid #d97706 !important;
  box-shadow: 0 12px 25px -4px rgba(217, 119, 6, 0.3) !important;
}
.wallet-card.theme-mascotas h2,
.wallet-card.theme-mascotas #walletName {
  color: #78350f !important;
}
.wallet-card.theme-mascotas .student-grade,
.wallet-card.theme-mascotas .label {
  color: #92400e !important;
}
.wallet-card.theme-mascotas .amount span,
.wallet-card.theme-mascotas #walletBalance {
  color: #b45309 !important;
  font-weight: 900 !important;
}
.wallet-card.theme-mascotas .student-avatar {
  border-color: #d97706 !important;
}
.wallet-card.theme-mascotas .qr-toggle-btn {
  background: rgba(255, 255, 255, 0.7) !important;
  color: #78350f !important;
  border: 1px solid #fcd34d !important;
}

/* 9. Exploración Galáctica (Cosmos y Nebulosa) */
.wallet-card.theme-galactica {
  background: linear-gradient(135deg, #09090b 0%, #311042 45%, #1e1b4b 100%) !important;
  color: #f5d0fe !important;
  border: 1.5px solid #a855f7 !important;
  box-shadow: 0 12px 25px -4px rgba(168, 85, 247, 0.4) !important;
}
.wallet-card.theme-galactica .amount span,
.wallet-card.theme-galactica #walletBalance {
  color: #f0abfc !important;
  text-shadow: 0 0 12px rgba(240, 171, 252, 0.6);
}
.wallet-card.theme-galactica .student-avatar {
  border-color: #c084fc !important;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.4) !important;
}

/* 10. Pixel Quest (Videojuegos Retro 8-Bit) */
.wallet-card.theme-pixel-quest {
  background: linear-gradient(180deg, #38bdf8 0%, #60a5fa 62%, #15803d 62%, #166534 100%) !important;
  color: #ffffff !important;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 12px 25px -4px rgba(56, 189, 248, 0.4) !important;
}
.wallet-card.theme-pixel-quest .amount span,
.wallet-card.theme-pixel-quest #walletBalance {
  color: #fef08a !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-family: monospace, sans-serif !important;
  letter-spacing: 1px;
}

/* 11. Ritmo y DJ Neón (Synthwave) */
.wallet-card.theme-ritmo-dj {
  background: linear-gradient(135deg, #09090b 0%, #1a0826 50%, #030712 100%) !important;
  color: #fdf2f8 !important;
  border: 1.5px solid #ec4899 !important;
  box-shadow: 0 12px 25px -4px rgba(236, 72, 153, 0.4), 0 0 15px rgba(6, 182, 212, 0.2) !important;
}
.wallet-card.theme-ritmo-dj .amount span,
.wallet-card.theme-ritmo-dj #walletBalance {
  color: #06b6d4 !important;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
}
.wallet-card.theme-ritmo-dj .student-avatar {
  border-color: #ec4899 !important;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5) !important;
}

/* 12. Skate Park (Street Art Graffiti) */
.wallet-card.theme-skate-park {
  background: linear-gradient(135deg, #78350f 0%, #c2410c 50%, #18181b 100%) !important;
  color: #fff7ed !important;
  border: 1.5px solid #ea580c !important;
  box-shadow: 0 12px 25px -4px rgba(234, 88, 12, 0.35) !important;
}
.wallet-card.theme-skate-park .amount span,
.wallet-card.theme-skate-park #walletBalance {
  color: #fed7aa !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* 13. Tecno Cómic (Superhéroe Pop-Art) */
.wallet-card.theme-tecno-comic {
  background: linear-gradient(125deg, #0284c7 0%, #0284c7 48%, #ea580c 52%, #ea580c 100%) !important;
  color: #ffffff !important;
  border: 2px solid #fde047 !important;
  box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.4) !important;
}
.wallet-card.theme-tecno-comic .amount span,
.wallet-card.theme-tecno-comic #walletBalance {
  color: #fef08a !important;
  text-shadow: 2px 2px 0 #000000;
}

/* 14. Ecológica Kraft (Texturizada Sostenible) */
.wallet-card.theme-ecologica {
  background: linear-gradient(135deg, #b08968 0%, #7f5539 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #a3b18a !important;
  box-shadow: 0 12px 25px -4px rgba(127, 85, 57, 0.35) !important;
}
.wallet-card.theme-ecologica .amount span,
.wallet-card.theme-ecologica #walletBalance {
  color: #fefae0 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 15. Lúdica Ilustrada (Fantasía Infantil) */
.wallet-card.theme-ludica {
  background: linear-gradient(180deg, #38bdf8 0%, #bae6fd 60%, #fed7aa 100%) !important;
  color: #0369a1 !important;
  border: 1.5px solid #38bdf8 !important;
  box-shadow: 0 12px 25px -4px rgba(56, 189, 248, 0.35) !important;
}
.wallet-card.theme-ludica h2,
.wallet-card.theme-ludica #walletName {
  color: #0c4a6e !important;
}
.wallet-card.theme-ludica .student-grade,
.wallet-card.theme-ludica .label {
  color: #0369a1 !important;
}
.wallet-card.theme-ludica .amount span,
.wallet-card.theme-ludica #walletBalance {
  color: #0284c7 !important;
  font-weight: 900 !important;
}
.wallet-card.theme-ludica .qr-toggle-btn {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #0369a1 !important;
  border: 1px solid #7dd3fc !important;
}

/* ==========================================================================
   MODAL DE CARRUSEL DE DISEÑOS DE TARJETA
   ========================================================================== */
.card-carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 10px 0;
}

.card-carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 14px;
  padding: 8px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.card-carousel-container::-webkit-scrollbar {
  display: none;
}

.card-carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
  scroll-snap-align: center;
  box-sizing: border-box;
}

.carousel-nav-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  color: var(--text-main);
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

body.dark-mode .carousel-nav-btn {
  background: rgba(30, 41, 59, 0.9);
  border-color: #334155;
  color: #ffffff;
}

.carousel-nav-btn:hover {
  background: var(--card-bg);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev {
  left: -10px;
}

.carousel-nav-btn.next {
  right: -10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 6px 0;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dot.active {
  width: 20px;
  border-radius: 10px;
  background: #0284c7;
}

.theme-quick-strip {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 8px 2px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  scrollbar-width: none;
}

.theme-quick-strip::-webkit-scrollbar {
  display: none;
}

.theme-pill-btn {
  padding: 5px 11px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.theme-pill-btn:hover {
  border-color: #0284c7;
}

.theme-pill-btn.active {
  background: #0284c7;
  color: white;
  border-color: #0284c7;
}

.preview-card-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   DEVELOPER MASTER SUITE (#viewDeveloper) - TEMA SIBOPAY LIMPIO
   ========================================================================== */
.dev-container {
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-main, #f8fafc);
  padding: calc(18px + var(--safe-top)) 18px calc(60px + var(--safe-bottom)) 18px;
  box-sizing: border-box;
  width: 100%;
}

.dev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.dev-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dev-icon {
  font-size: 1.4rem;
  background: #f0f9ff;
  color: #0284c7;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.dev-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dev-action-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dev-action-btn:hover {
  transform: translateY(-1px);
  border-color: #0284c7;
  color: #0284c7;
  background: #f8fafc;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.12);
}

.dev-action-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.dev-action-btn-primary {
  background: #0284c7;
  color: #ffffff;
  border: 1.5px solid #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.dev-action-btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.dev-action-btn-danger {
  background: var(--card-bg, #ffffff);
  color: #ef4444;
  border: 1.5px solid #fecaca;
}

.dev-action-btn-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #dc2626;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.dev-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 22px;
  padding-bottom: 4px;
}

.dev-tab-btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dev-tab-btn:hover {
  color: #0284c7;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.dev-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.25);
}

.dev-card-uploader-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.dev-card-uploader-box:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

.dev-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.role-developer {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.role-admin {
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.role-cajero {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.role-vendedor {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.role-padre {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.role-estudiante {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Soporte de contraste dinámico para fondos de tarjetas en vivo */
.wallet-card.has-custom-bg {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.wallet-card.card-text-light-bg,
.wallet-card.card-style-light {
  color: #0f172a !important;
}

.wallet-card.card-text-light-bg h2,
.wallet-card.card-style-light h2,
.wallet-card.card-text-light-bg #walletName,
.wallet-card.card-style-light #walletName {
  color: #0f172a !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9) !important;
}

.wallet-card.card-text-light-bg .student-grade,
.wallet-card.card-style-light .student-grade,
.wallet-card.card-text-light-bg .label,
.wallet-card.card-style-light .label {
  color: #334155 !important;
  font-weight: 700 !important;
}

.wallet-card.card-text-light-bg .amount span,
.wallet-card.card-style-light .amount span,
.wallet-card.card-text-light-bg #walletBalance,
.wallet-card.card-style-light #walletBalance {
  color: #047857 !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.wallet-card.card-text-light-bg .qr-toggle-btn,
.wallet-card.card-style-light .qr-toggle-btn {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

.wallet-card.card-text-dark-bg,
.wallet-card.card-style-dark {
  color: #ffffff !important;
}

.wallet-card.card-text-dark-bg h2,
.wallet-card.card-style-dark h2,
.wallet-card.card-text-dark-bg #walletName,
.wallet-card.card-style-dark #walletName {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
}

.wallet-card.card-text-dark-bg .student-grade,
.wallet-card.card-style-dark .student-grade,
.wallet-card.card-text-dark-bg .label,
.wallet-card.card-style-dark .label {
  color: #cbd5e1 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}

.wallet-card.card-text-dark-bg .amount span,
.wallet-card.card-style-dark .amount span,
.wallet-card.card-text-dark-bg #walletBalance,
.wallet-card.card-style-dark #walletBalance {
  color: #4ade80 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95) !important;
}

.wallet-card.card-text-dark-bg .qr-toggle-btn,
.wallet-card.card-style-dark .qr-toggle-btn {
  background: rgba(0, 0, 0, 0.6) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(6px) !important;
}

@media (max-width: 650px) {
  .dev-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .dev-header-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   SISTEMA DE DISEÑO SAAS PROFESIONAL PARA PC (ADMINISTRACIÓN)
   ========================================================================== */

/* Botón base SaaS */
.btn-saas {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
}

.btn-saas svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-saas:hover svg {
  transform: translateY(-0.5px);
}

.btn-saas:active {
  transform: scale(0.98);
}

/* Botón Primario SaaS (Abonar / Recargar) */
.btn-saas-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.btn-saas-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2);
}
body.dark-mode .btn-saas-primary {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
body.dark-mode .btn-saas-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
}

/* Botón Contorno / Neutro SaaS (Carné QR / Documentos) */
.btn-saas-outline {
  background: var(--card-bg, #ffffff);
  color: var(--text-main, #334155);
  border-color: var(--border, #cbd5e1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn-saas-outline:hover {
  background: var(--bg-main, #f8fafc);
  border-color: #94a3b8;
  color: var(--text-main, #0f172a);
}

/* Botón de Alerta / Bloqueo (Acción Destructiva Suave / Warning) */
.btn-saas-danger-subtle {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.btn-saas-danger-subtle:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #7f1d1d;
}
body.dark-mode .btn-saas-danger-subtle {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}
body.dark-mode .btn-saas-danger-subtle:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Botón de Seguridad / Desbloqueo (Success Suave) */
.btn-saas-success-subtle {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}
.btn-saas-success-subtle:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}
body.dark-mode .btn-saas-success-subtle {
  background: rgba(16, 185, 129, 0.12);
  color: #86efac;
  border-color: rgba(16, 185, 129, 0.3);
}
body.dark-mode .btn-saas-success-subtle:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
}

/* Badges de estado modernos con punto indicador (Status Dot) */
.saas-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1;
  white-space: nowrap;
}

.saas-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.saas-status-active {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.saas-status-active .saas-dot {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}
body.dark-mode .saas-status-active {
  background: rgba(22, 163, 74, 0.15);
  color: #86efac;
  border-color: rgba(22, 163, 74, 0.3);
}
body.dark-mode .saas-status-active .saas-dot {
  background: #4ade80;
}

.saas-status-blocked {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.saas-status-blocked .saas-dot {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}
body.dark-mode .saas-status-blocked {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.3);
}
body.dark-mode .saas-status-blocked .saas-dot {
  background: #f87171;
}

.saas-status-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.saas-status-pending .saas-dot {
  background: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}
body.dark-mode .saas-status-pending {
  background: rgba(217, 119, 6, 0.15);
  color: #fcd34d;
  border-color: rgba(217, 119, 6, 0.3);
}
body.dark-mode .saas-status-pending .saas-dot {
  background: #fbbf24;
}

/* Fila de Estudiante Moderna para PC */
.admin-student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.admin-student-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

body.dark-mode .admin-student-row:hover {
  border-color: #475569;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.admin-student-row.is-blocked {
  background: #fffafa;
  border-color: #fecaca;
}
body.dark-mode .admin-student-row.is-blocked {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.25);
}

.admin-student-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* En pantallas pequeñas se adapta ordenadamente */
@media (max-width: 768px) {
  .admin-student-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .admin-student-actions {
    justify-content: flex-end;
    border-top: 1px dashed var(--border, #e2e8f0);
    padding-top: 10px;
    width: 100%;
  }
}

/* Botón de transferir en gris claro / gray out cuando los padres lo desactivan */
.qr-toggle-btn.transfer-btn-disabled {
  background: rgba(241, 245, 249, 0.85) !important;
  color: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  opacity: 0.65 !important;
  filter: grayscale(1) !important;
  cursor: pointer !important;
}

.qr-toggle-btn.transfer-btn-disabled svg {
  stroke: #94a3b8 !important;
}

.pwa-nav-item.transfer-nav-disabled {
  opacity: 0.45 !important;
  filter: grayscale(1) !important;
  color: #94a3b8 !important;
}

.pwa-nav-item.transfer-nav-disabled svg {
  stroke: #94a3b8 !important;
}

/* ==========================================
   REDISEÑO MODERNO (SIBOPAY STYLE - CELESTE EDITION)
   ========================================== */

/* 1. Selector de Roles Superfinos */
.login-role-selector-wrap {
  margin-bottom: 18px;
}

.login-role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.login-role-card {
  border: 2px solid var(--border, #f1f5f9);
  background: var(--bg-main, #f8fafc);
  border-radius: 18px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.login-role-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.login-role-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.login-role-name {
  font-size: 0.78rem;
  font-weight: 900;
  color: #334155;
  line-height: 1.2;
}

.login-role-desc {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 2px;
}

.login-role-card.selected {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.14);
}

.login-role-card.selected .login-role-icon {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

.login-role-card.selected .login-role-name {
  color: #0284c7;
}

.login-role-card.selected .login-role-desc {
  color: #0369a1;
}

/* 2. Tarjeta de Saldo Elegante (Estilo SiboPay) */
.parent-balance-card-refined {
  background: #ffffff;
  border-radius: 26px;
  border: 1px solid var(--border, #e2e8f0);
  padding: 22px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(226, 232, 240, 0.8);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(circle at 100% 0%, rgba(2, 132, 199, 0.06) 0%, transparent 60%),
                    radial-gradient(circle at 0% 100%, rgba(2, 132, 199, 0.03) 0%, transparent 50%);
}

.parent-balance-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.parent-balance-tag-title {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
}

.parent-balance-child-pill {
  font-size: 0.74rem;
  font-weight: 800;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
  padding: 2px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.parent-balance-grade-pill {
  font-size: 0.70rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
}

.parent-balance-amount-display {
  font-size: 2.3rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.6px;
  margin: 4px 0 12px 0;
  display: flex;
  align-items: baseline;
}

.parent-balance-amount-display span.decimals {
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
  margin-left: 2px;
}

.parent-balance-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  gap: 12px;
}

.parent-balance-limit-info {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.parent-balance-btn-recharge {
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 10px 20px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.32);
  transition: all 0.2s ease;
}

.parent-balance-btn-recharge:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.38);
}

.parent-balance-btn-recharge:active {
  transform: scale(0.97);
}

/* 3. Selector de Sede Escolar Pill */
.parent-school-selector-pill {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* 4. Menú de Opciones Superfinas Estilo SiboPay */
.parent-refined-menu-card {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
}

.parent-refined-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f8fafc;
}

.parent-refined-menu-item:last-child {
  border-bottom: none;
}

.parent-refined-menu-item:hover {
  background: #f8fafc;
}

.parent-refined-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.parent-refined-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f0f9ff;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.parent-refined-icon-box.rose-halo {
  background: #fff1f2;
  color: #e11d48;
  box-shadow: 0 0 0 4px #ffe4e6;
}

.parent-refined-icon-box.gray-box {
  background: #f1f5f9;
  color: #64748b;
}

.parent-refined-item-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
}

.parent-refined-item-desc {
  font-size: 0.70rem;
  color: #64748b;
  font-weight: 600;
  display: block;
}

.parent-refined-arrow {
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 800;
}

.allergy-tag-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #fecdd3;
  color: #e11d48;
  cursor: pointer;
  transition: all 0.15s ease;
}

.allergy-tag-pill:hover {
  background: #ffe4e6;
  transform: translateY(-1px);
}

body.dark-mode .parent-balance-card-refined,
body.dark-mode .parent-school-selector-pill,
body.dark-mode .parent-refined-menu-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .parent-balance-amount-display {
  color: #f8fafc;
}

body.dark-mode .parent-refined-menu-item:hover {
  background: #0f172a;
}

body.dark-mode .parent-refined-item-title {
  color: #f1f5f9;
}

/* ==========================================================================
   NOTIFICACIÓN FLOTANTE EN TIEMPO REAL (IN-APP PUSH NOTIFICATION)
   ========================================================================== */
.recreopay-inapp-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  left: 16px;
  max-width: 450px;
  margin-left: auto;
  z-index: 999999;
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid #10b981;
  box-shadow: 0 16px 40px -6px rgba(16, 185, 129, 0.28), 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDownInApp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
}

@keyframes slideDownInApp {
  from {
    transform: translateY(-40px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.recreopay-inapp-toast.closing {
  animation: slideUpInApp 0.25s ease forwards;
}

@keyframes slideUpInApp {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
}

.recreopay-inapp-toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.recreopay-inapp-toast-content {
  flex: 1;
  min-width: 0;
}

.recreopay-inapp-toast-title {
  font-size: 0.88rem;
  font-weight: 900;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recreopay-inapp-toast-body {
  font-size: 0.76rem;
  color: #374151;
  margin-top: 2px;
  line-height: 1.25;
}

.recreopay-inapp-toast-btn {
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.recreopay-inapp-toast-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.recreopay-inapp-toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

body.dark-mode .recreopay-inapp-toast {
  background: #1e293b;
  border-color: #10b981;
}

body.dark-mode .recreopay-inapp-toast-title {
  color: #34d399;
}

body.dark-mode .recreopay-inapp-toast-body {
  color: #cbd5e1;
}

/* ==========================================
   SUB-PANTALLAS DEDICADAS DEL PORTAL DE PADRES
   ========================================== */
.parent-subview {
  animation: fadeInSubView 0.2s ease-out;
}

@keyframes fadeInSubView {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.parent-subview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 4px 2px;
}

.parent-subview-back-btn {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border, #e2e8f0);
  color: var(--text-main, #0f172a);
  font-size: 0.84rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.parent-subview-back-btn:hover {
  background: var(--bg-hover, #f1f5f9);
  border-color: #0284c7;
  color: #0284c7;
  transform: translateX(-2px);
}

.parent-subview-child-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 800;
}

.parent-subview-child-tag img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #0284c7;
  background: white;
}

body.dark-mode .parent-subview-back-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .parent-subview-back-btn:hover {
  background: #334155;
  color: #38bdf8;
  border-color: #38bdf8;
}

/* ========================================================
   MODAL DE VALIDACIÓN Y ESTADO SINPE EN TIEMPO REAL
   ======================================================== */
.modal-sinpe-backdrop {
  z-index: 9999 !important;
}

.modal-sinpe-card {
  max-width: 420px !important;
  width: 92% !important;
  border-radius: 24px !important;
  padding: 26px 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45) !important;
  position: relative !important;
  text-align: center !important;
  overflow: hidden !important;
}

.modal-sinpe-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(100, 116, 139, 0.12);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.modal-sinpe-close-btn:hover {
  background: rgba(100, 116, 139, 0.25);
  color: #0f172a;
}

.sinpe-spinner-container {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sinpe-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  opacity: 0.8;
  animation: sinpePulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes sinpePulseRing {
  0% { transform: scale(0.85); opacity: 0.9; }
  50% { transform: scale(1.18); opacity: 0.3; }
  100% { transform: scale(1.35); opacity: 0; }
}

.sinpe-icon-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.sinpe-icon-badge.loading {
  background: #f0f9ff;
  border: 2px solid #38bdf8;
}

.sinpe-icon-badge.loading .sinpe-spin-svg {
  position: absolute;
}

.sinpe-center-s-circle {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  pointer-events: none;
  z-index: 3;
}

.sinpe-center-s-circle span {
  color: #ffffff;
  font-family: 'Poppins', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-0.5px);
}


.sinpe-icon-badge.timeout {
  background: #f0f9ff;
  border: 2.5px solid #38bdf8;
  animation: sinpePopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sinpe-icon-badge.success {
  background: #dcfce7;
  border: 2.5px solid #86efac;
  animation: sinpePopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sinpe-icon-badge.pending {
  background: #fef3c7;
  border: 2.5px solid #fde68a;
  animation: sinpePopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sinpe-icon-badge.error {
  background: #fee2e2;
  border: 2.5px solid #fca5a5;
  animation: sinpePopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sinpe-spin-svg {
  animation: sinpeSpin 1.1s linear infinite;
}

@keyframes sinpeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sinpePopIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sinpe-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
}

.sinpe-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 99px;
  transition: width 0.15s linear;
}

.sinpe-info-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 14px;
  text-align: left;
}

.sinpe-card-receipt {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 14px 0 16px 0;
  text-align: left;
}

.sinpe-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 5px;
  color: #334155;
}

.sinpe-info-row:last-child {
  margin-bottom: 0;
}

.btn-sinpe-action {
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-sinpe-action:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-sinpe-action:active {
  transform: translateY(1px);
}

.btn-sinpe-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-sinpe-pending {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.btn-sinpe-error {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.btn-sinpe-sky {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-sinpe-subtle {
  background: #f1f5f9;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-sinpe-subtle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.dark-mode .modal-sinpe-card {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
}

body.dark-mode .modal-sinpe-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

body.dark-mode .modal-sinpe-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

body.dark-mode .sinpe-info-summary {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .sinpe-info-row {
  color: #cbd5e1;
}

body.dark-mode .sinpe-card-receipt {
  background: #064e3b;
  border-color: #059669;
}

/* Filtros de Historial de Movimientos */
.mov-filter-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.mov-filter-btn.active {
  background: #ffffff !important;
  color: #0284c7 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
  font-weight: 800 !important;
}

body.dark-mode .mov-filter-btn {
  color: #94a3b8;
}

body.dark-mode .mov-filter-btn.active {
  background: #1e293b !important;
  color: #38bdf8 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}


