﻿/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   REGISTRO DE PAGOS â€” Claymorphism (solo esta pÃ¡gina)
   Modo claro por defecto (primera visita). Modo oscuro: usuario elige con toggle. Clase .theme-light
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Cambio de tema: sin animaciones pesadas (excepto el switch) â”€â”€ */
.clay-page.theme-switching .sidebar,
.clay-page.theme-switching .sidebar-nav,
.clay-page.theme-switching .sidebar-footer,
.clay-page.theme-switching .registro-card,
.clay-page.theme-switching .registro-card *,
.clay-page.theme-switching .table-wrapper,
.clay-page.theme-switching .table-wrapper *,
.clay-page.theme-switching .filter-bar,
.clay-page.theme-switching .filter-bar *,
.clay-page.theme-switching .bulk-bar,
.clay-page.theme-switching .bulk-bar *,
.clay-page.theme-switching .main-content,
.clay-page.theme-switching .main-content * {
  transition: none !important;
}

/* â”€â”€ Tokens clay â€” modo oscuro (rojo + negro) â”€â”€ */
.clay-page {
  --clay-bg:           #080808;
  --clay-bg-soft:      #0f0f0f;
  --clay-surface:      #141414;
  --clay-surface-2:    #1a1a1a;
  --clay-surface-in:   #101010;
  --clay-accent:       #e03535;
  --clay-accent-deep:  #b82828;
  --clay-accent-glow:  rgba(224, 53, 53, 0.28);
  --clay-text:         #f2f2f2;
  --clay-text-soft:    #9a9a9a;
  --clay-text-muted:   #5c5c5c;
  --clay-border:       rgba(255, 255, 255, 0.04);
  --clay-sh-out:       10px 10px 22px rgba(0, 0, 0, 0.72);
  --clay-sh-out-sm:    5px 5px 14px rgba(0, 0, 0, 0.55);
  --clay-sh-in:        inset 4px 4px 10px rgba(0, 0, 0, 0.55);
  --clay-sh-in-sm:     inset 2px 2px 6px rgba(0, 0, 0, 0.45);
  --clay-sh-hi:        inset -3px -3px 8px rgba(255, 255, 255, 0.035);
  --clay-sh-hi-sm:     inset -1px -1px 4px rgba(255, 255, 255, 0.04);
  --clay-radius:       22px;
  --clay-radius-sm:    16px;
  --clay-radius-pill:  999px;
  --clay-color-usd:    #60a5fa;
  --clay-color-other:  #4ade80;
  --green:             var(--clay-color-other);

  /* Override variables globales solo en esta pÃ¡gina */
  --bg-body:       var(--clay-bg);
  --bg-sidebar:    var(--clay-surface);
  --bg-card:       var(--clay-surface-2);
  --bg-modal:      var(--clay-surface-2);
  --bg-input:      var(--clay-surface-in);
  --bg-hover:      var(--clay-surface);
  --border:        var(--clay-border);
  --border-light:  rgba(255, 255, 255, 0.08);
  --text-primary:  var(--clay-text);
  --text-secondary: var(--clay-text-soft);
  --text-muted:    var(--clay-text-muted);
  --accent:        var(--clay-accent);
  --accent-hover:  var(--clay-accent-deep);
  --blue:          #ff6b6b;
  --shadow:        var(--clay-sh-out-sm);
}

/* ── Tokens clay — modo claro (rojito + blanco moradito) — default primera visita ── */
.clay-page.theme-light {
  --clay-bg:           #ebe8f3;
  --clay-bg-soft:      #f3f0f9;
  --clay-surface:      #f7f5fc;
  --clay-surface-2:    #fdfcff;
  --clay-surface-in:   #e8e4f0;
  --clay-accent:       #d63d3d;
  --clay-accent-deep:  #b83030;
  --clay-accent-glow:  rgba(214, 61, 61, 0.22);
  --clay-text:         #2a2438;
  --clay-text-soft:    #6b6280;
  --clay-text-muted:   #9a93ad;
  --clay-border:       rgba(120, 100, 160, 0.12);
  --clay-sh-out:       10px 10px 24px rgba(160, 140, 190, 0.28);
  --clay-sh-out-sm:    5px 5px 14px rgba(160, 140, 190, 0.22);
  --clay-sh-in:        inset 4px 4px 10px rgba(160, 140, 190, 0.18);
  --clay-sh-in-sm:     inset 2px 2px 6px rgba(160, 140, 190, 0.14);
  --clay-sh-hi:        inset -3px -3px 8px rgba(255, 255, 255, 0.85);
  --clay-sh-hi-sm:     inset -1px -1px 4px rgba(255, 255, 255, 0.7);
  --clay-color-usd:    #4788d4;
  --clay-color-other:  #2eb86a;
  --green:             var(--clay-color-other);
  --blue:              #d63d3d;
}

/* â”€â”€ Fondo general â”€â”€ */
.clay-page {
  background:
    radial-gradient(ellipse 90% 60% at 15% 0%, rgba(224, 53, 53, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(80, 60, 120, 0.04), transparent 50%),
    var(--clay-bg);
}

.clay-page.theme-light {
  background:
    radial-gradient(ellipse 90% 60% at 15% 0%, rgba(214, 61, 61, 0.06), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(140, 120, 180, 0.08), transparent 50%),
    var(--clay-bg);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LAYOUT â€” Grid estable (sidebar siempre en flujo)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.clay-page .app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.clay-page .sidebar {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  top: auto;
  left: auto;
  transform: none;
  visibility: visible;
  opacity: 1;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 0;
  background: var(--clay-surface) !important;
  border-right: none;
  box-shadow:
    var(--clay-sh-out),
    var(--clay-sh-hi);
  transition: background 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
  z-index: 100;
}

@media (min-width: 769px) {
  .clay-page .sidebar {
    position: sticky !important;
    top: 12px !important;
    width: calc(var(--sidebar-width) - 22px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    margin: 12px 10px 12px 12px;
    border-radius: var(--clay-radius);
    transform: none !important;
  }

  .clay-page .mobile-menu-btn,
  .clay-page .sidebar-backdrop {
    display: none !important;
  }
}

.clay-page .main-content {
  grid-column: 2;
  grid-row: 1;
  margin-left: 0 !important;
  min-width: 0;
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

/* Historial / registro: el scroll lo maneja su propio CSS de página */
.page-historial-pedidos .main-content,
.page-registro-pagos .main-content,
.page-saldo-total .main-content,
.page-saldo-vendedor .main-content {
  max-height: none;
  overflow: visible;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SIDEBAR â€” Clay (solo registro-pagos)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.clay-page .sidebar-logo {
  border-bottom: none;
  padding: 20px 18px 16px;
}

.clay-page .sidebar-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.clay-page .logo-theme-light {
  display: none;
}

.clay-page.theme-light .logo-theme-dark {
  display: none;
}

.clay-page.theme-light .logo-theme-light {
  display: block;
}

.clay-page .sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 10px;
  -webkit-overflow-scrolling: touch;
}

.clay-page .nav-section-label {
  color: var(--clay-text-muted);
  padding: 12px 18px 5px;
  letter-spacing: 1px;
}

.clay-page .nav-item {
  margin: 3px 12px;
  padding: 9px 14px;
  border-radius: var(--clay-radius-sm);
  color: var(--clay-text-soft);
  background: transparent;
  box-shadow: none;
  transition: box-shadow 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.clay-page .nav-item:hover {
  color: var(--clay-text);
  background: var(--clay-surface-in);
  box-shadow: var(--clay-sh-in-sm), var(--clay-sh-hi-sm);
}

.clay-page .nav-item.active {
  color: var(--clay-text);
  font-weight: 600;
  background: linear-gradient(145deg, var(--clay-surface-2), var(--clay-surface-in));
  box-shadow:
    var(--clay-sh-out-sm),
    0 0 0 1px rgba(224, 53, 53, 0.12),
    inset 0 0 20px var(--clay-accent-glow);
}

.clay-page .nav-item.active i {
  color: var(--clay-accent);
}

.clay-page .sidebar-footer {
  border-top: none;
  padding: 14px 14px 18px;
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clay-page .sidebar-footer-toggles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  --rp-toggle-w: 48px;
  --rp-footer-btn-h: 34px;
  --rp-thumb: 22px;
}

/* Switch alertas — mismo visual que tema */
.clay-page .sidebar-footer-toggles .btn-alertas-web {
  flex: 1 1 0;
  min-width: 0;
  max-width: var(--rp-toggle-w);
  width: var(--rp-toggle-w);
  height: var(--rp-footer-btn-h);
  min-height: var(--rp-footer-btn-h);
  padding: 3px;
  border: none;
  border-radius: var(--clay-radius-pill);
  background: var(--clay-surface-2);
  box-shadow: var(--clay-sh-out-sm), var(--clay-sh-hi-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: box-shadow 0.25s ease;
}
.clay-page .sidebar-footer-toggles .btn-alertas-web:hover {
  box-shadow:
    var(--clay-sh-out-sm),
    0 0 0 1px rgba(34, 197, 94, 0.2),
    var(--clay-sh-hi-sm);
}
.clay-page .sidebar-footer-toggles .alertas-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--clay-radius-pill);
  background: var(--clay-surface-in);
  box-shadow: var(--clay-sh-in-sm);
  flex-shrink: 0;
}
.clay-page .sidebar-footer-toggles .alertas-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: var(--rp-thumb);
  height: var(--rp-thumb);
  margin-top: calc(var(--rp-thumb) / -2);
  border-radius: 50%;
  background: linear-gradient(145deg, #64748b, #475569);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  transition:
    left 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.38s ease,
    box-shadow 0.38s ease,
    transform 0.22s ease;
}
.clay-page .sidebar-footer-toggles .btn-alertas-web:active .alertas-toggle-thumb {
  transform: scale(0.94);
}
.clay-page .sidebar-footer-toggles .alertas-toggle-thumb i {
  position: absolute;
  line-height: 1;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.clay-page .sidebar-footer-toggles .alertas-icon-off {
  opacity: 1;
  transform: scale(1);
}
.clay-page .sidebar-footer-toggles .alertas-icon-on {
  opacity: 0;
  transform: scale(0.5);
}
.clay-page .sidebar-footer-toggles .btn-alertas-web.is-active .alertas-toggle-thumb {
  left: calc(100% - var(--rp-thumb) - 2px);
  background: linear-gradient(145deg, #22c55e, #16a34a);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.25);
}
.clay-page .sidebar-footer-toggles .btn-alertas-web.is-active .alertas-icon-off {
  opacity: 0;
  transform: scale(0.5);
}
.clay-page .sidebar-footer-toggles .btn-alertas-web.is-active .alertas-icon-on {
  opacity: 1;
  transform: scale(1);
}

/* Switch AutoBot — mismo estilo, acento cyan */
.clay-page .sidebar-footer-toggles .btn-autobot-mode {
  flex: 1 1 0;
  min-width: 0;
  max-width: var(--rp-toggle-w);
  width: var(--rp-toggle-w);
  height: var(--rp-footer-btn-h);
  min-height: var(--rp-footer-btn-h);
  padding: 3px;
  border: none;
  border-radius: var(--clay-radius-pill);
  background: var(--clay-surface-2);
  box-shadow: var(--clay-sh-out-sm), var(--clay-sh-hi-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: box-shadow 0.25s ease;
}
.clay-page .sidebar-footer-toggles .btn-autobot-mode:hover {
  box-shadow:
    var(--clay-sh-out-sm),
    0 0 0 1px rgba(56, 189, 248, 0.25),
    var(--clay-sh-hi-sm);
}
.clay-page .sidebar-footer-toggles .btn-autobot-mode:disabled {
  opacity: 0.55;
  cursor: wait;
}
.clay-page .sidebar-footer-toggles .autobot-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--clay-radius-pill);
  background: var(--clay-surface-in);
  box-shadow: var(--clay-sh-in-sm);
  flex-shrink: 0;
}
.clay-page .sidebar-footer-toggles .autobot-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: var(--rp-thumb);
  height: var(--rp-thumb);
  margin-top: calc(var(--rp-thumb) / -2);
  border-radius: 50%;
  background: linear-gradient(145deg, #64748b, #475569);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  transition:
    left 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.38s ease,
    box-shadow 0.38s ease,
    transform 0.22s ease;
}
.clay-page .sidebar-footer-toggles .btn-autobot-mode:active .autobot-toggle-thumb {
  transform: scale(0.94);
}
.clay-page .sidebar-footer-toggles .autobot-toggle-thumb i {
  position: absolute;
  line-height: 1;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.clay-page .sidebar-footer-toggles .autobot-icon-off {
  opacity: 1;
  transform: scale(1);
}
.clay-page .sidebar-footer-toggles .autobot-icon-on {
  opacity: 0;
  transform: scale(0.5);
}
.clay-page .sidebar-footer-toggles .btn-autobot-mode.is-active .autobot-toggle-thumb {
  left: calc(100% - var(--rp-thumb) - 2px);
  background: linear-gradient(145deg, #38bdf8, #0284c7);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.25);
}
.clay-page .sidebar-footer-toggles .btn-autobot-mode.is-active .autobot-icon-off {
  opacity: 0;
  transform: scale(0.5);
}
.clay-page .sidebar-footer-toggles .btn-autobot-mode.is-active .autobot-icon-on {
  opacity: 1;
  transform: scale(1);
}

/* Cerrar sesión — ancho completo debajo de los switches */
.clay-page .sidebar-footer > .btn-logout {
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  white-space: nowrap;
  background: var(--clay-surface-2);
  border: none;
  border-radius: var(--clay-radius-pill);
  box-shadow: var(--clay-sh-out-sm), var(--clay-sh-hi-sm);
  color: var(--clay-text-soft);
  cursor: pointer;
  transition: color 0.25s ease, box-shadow 0.25s ease;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  min-height: var(--rp-footer-btn-h, 40px);
  height: var(--rp-footer-btn-h, 40px);
  box-sizing: border-box;
}

.clay-page .sidebar-footer > .btn-logout i {
  font-size: 12px;
  flex-shrink: 0;
}

.clay-page .sidebar-footer > .btn-logout:hover {
  color: var(--clay-accent);
  background: var(--clay-surface-2);
  box-shadow:
    var(--clay-sh-out-sm),
    0 0 0 1px rgba(224, 53, 53, 0.15),
    var(--clay-sh-hi-sm);
}

/* Toggle tema — al lado del switch de alertas */
.clay-page .sidebar-footer-toggles .btn-theme-toggle {
  flex: 1 1 0;
  min-width: 0;
  max-width: var(--rp-toggle-w);
  width: var(--rp-toggle-w);
  height: var(--rp-footer-btn-h);
  min-height: var(--rp-footer-btn-h);
  padding: 3px;
  border: none;
  border-radius: var(--clay-radius-pill);
  background: var(--clay-surface-2);
  box-shadow: var(--clay-sh-out-sm), var(--clay-sh-hi-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: box-shadow 0.25s ease;
}

.clay-page .sidebar-footer-toggles .btn-theme-toggle:hover {
  box-shadow:
    var(--clay-sh-out-sm),
    0 0 0 1px rgba(224, 53, 53, 0.12),
    var(--clay-sh-hi-sm);
}

.clay-page .sidebar-footer-toggles .btn-theme-toggle:disabled {
  opacity: 0.55;
  cursor: wait;
}

.clay-page .sidebar-footer-toggles .theme-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--clay-radius-pill);
  background: var(--clay-surface-in);
  box-shadow: var(--clay-sh-in-sm);
  flex-shrink: 0;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.clay-page.theme-light .sidebar-footer-toggles .theme-toggle-track {
  background: var(--clay-surface-in);
  box-shadow: var(--clay-sh-in-sm);
}

.clay-page .sidebar-footer-toggles .theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: var(--rp-thumb);
  height: var(--rp-thumb);
  margin-top: calc(var(--rp-thumb) / -2);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--clay-accent), var(--clay-accent-deep));
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  transition:
    left 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.38s ease,
    box-shadow 0.38s ease,
    transform 0.22s ease;
}

.clay-page .sidebar-footer-toggles .btn-theme-toggle:active .theme-toggle-thumb {
  transform: scale(0.94);
}

.clay-page .sidebar-footer-toggles .theme-toggle-thumb i {
  position: absolute;
  line-height: 1;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.clay-page .sidebar-footer-toggles .theme-icon-dark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.clay-page .sidebar-footer-toggles .theme-icon-light {
  opacity: 0;
  transform: scale(0.5) rotate(-40deg);
}

.clay-page.theme-light .sidebar-footer-toggles .theme-toggle-thumb {
  left: calc(100% - var(--rp-thumb) - 2px);
  background: linear-gradient(145deg, #f5d76e, #e8b923);
  box-shadow: 2px 2px 6px rgba(160, 140, 190, 0.35), inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  color: #5a4a20;
}

.clay-page.theme-light .sidebar-footer-toggles .theme-icon-dark {
  opacity: 0;
  transform: scale(0.5) rotate(40deg);
}

.clay-page.theme-light .sidebar-footer-toggles .theme-icon-light {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.clay-page .btn-logout {
  background: var(--clay-surface-2);
  border: none;
  border-radius: var(--clay-radius-pill);
  box-shadow: var(--clay-sh-out-sm), var(--clay-sh-hi-sm);
  color: var(--clay-text-soft);
  padding: 11px;
}

.clay-page .btn-logout:hover {
  color: var(--clay-accent);
  background: var(--clay-surface-2);
  box-shadow:
    var(--clay-sh-out-sm),
    0 0 0 1px rgba(224, 53, 53, 0.15),
    var(--clay-sh-hi-sm);
}

/* â”€â”€ MÃ³vil sidebar clay â”€â”€ */
@media (max-width: 768px) {
  .clay-page .app-layout {
    grid-template-columns: 1fr !important;
  }

  .clay-page .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    transform: translateX(-100%) !important;
    transition: transform 0.25s ease;
    z-index: 210 !important;
    width: min(var(--sidebar-width), 85vw) !important;
    max-width: 85vw !important;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0 var(--clay-radius) var(--clay-radius) 0;
    background: var(--clay-surface) !important;
  }

  .clay-page.sidebar-open .sidebar {
    transform: translateX(0) !important;
    box-shadow: var(--clay-sh-out), var(--clay-sh-hi);
  }

  .clay-page .main-content {
    grid-column: 1 !important;
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
  }

  .clay-page .sidebar-backdrop {
    z-index: 180 !important;
  }

  .clay-page .mobile-menu-btn {
    background: var(--clay-surface-2);
    border: none;
    border-radius: var(--clay-radius-sm);
    box-shadow: var(--clay-sh-out-sm);
    z-index: 220 !important;
    left: 10px;
    transition:
      left 0.25s ease,
      background 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
  }

  .clay-page.sidebar-open .mobile-menu-btn {
    left: calc(min(var(--sidebar-width), 85vw) - 52px);
  }

  .clay-page .nav-section-label {
    font-size: 11.5px;
    padding: 14px 18px 6px;
  }

  .clay-page .nav-section-label i {
    font-size: 11px;
  }

  .clay-page .nav-item {
    font-size: 15.5px;
    padding: 12px 14px;
    min-height: 44px;
  }

  .clay-page .nav-item i {
    font-size: 15px;
    width: 18px;
  }

  .clay-page .sidebar-footer > .btn-logout {
    font-size: 14px;
    min-height: 44px;
    height: 44px;
  }

  .clay-page .sidebar-footer-toggles {
    --rp-toggle-w: 52px;
    --rp-footer-btn-h: 40px;
    --rp-thumb: 24px;
    gap: 8px;
  }

  .clay-page .sidebar-footer-toggles .btn-alertas-web,
  .clay-page .sidebar-footer-toggles .btn-autobot-mode {
    width: var(--rp-toggle-w);
    max-width: var(--rp-toggle-w);
    min-width: 0;
    height: var(--rp-footer-btn-h);
    min-height: var(--rp-footer-btn-h);
  }

  /* Footer fijo abajo: nav scrollea, toggle de tema siempre visible */
  .clay-page .sidebar {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  .clay-page .sidebar-logo {
    flex-shrink: 0;
  }

  .clay-page .sidebar-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .clay-page .sidebar-footer {
    flex-shrink: 0 !important;
    margin-top: auto;
    padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
  }

  .clay-page .sidebar-footer-toggles {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .clay-page .sidebar-footer-toggles .btn-theme-toggle {
    display: flex !important;
    visibility: visible !important;
    flex-shrink: 0;
    width: var(--rp-toggle-w);
    max-width: var(--rp-toggle-w);
    min-width: 0;
    height: var(--rp-footer-btn-h);
    min-height: var(--rp-footer-btn-h);
  }
}

/* Páginas clay sin sidebar (pedido individual) */
.clay-page.layout-no-sidebar .app-layout {
  display: block !important;
  grid-template-columns: none !important;
  min-height: 100vh;
}

.clay-page.layout-no-sidebar .main-content {
  margin-left: 0 !important;
  padding: 0 !important;
  grid-column: 1 / -1 !important;
  width: 100%;
  min-height: 100vh;
  overflow-x: auto;
}

.clay-page.layout-no-sidebar .sidebar {
  display: none !important;
}

.clay-page.page-pedido.layout-no-sidebar .main-content,
.clay-page.page-pedido .main-content {
  overflow-x: hidden;
}

.clay-page.theme-switching .pd-box,
.clay-page.theme-switching .pd-box *,
.clay-page.theme-switching .pd-topbar,
.clay-page.theme-switching .pd-topbar * {
  transition: none !important;
}
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   OVERLAYS â€” Boot (BD) + cambio de tema
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.clay-page.clay-boot-active,
.clay-page.theme-transition-active {
  overflow: hidden;
}

.rp-overlay,
.theme-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.page-boot-overlay {
  z-index: 100000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.clay-page:not(.theme-light) .page-boot-overlay {
  background: #080808;
}

.clay-page.theme-light .page-boot-overlay {
  background: #ebe8f3;
}

.theme-transition-overlay.to-dark {
  background: rgba(6, 6, 6, 0.94);
}

.theme-transition-overlay.to-light {
  background: rgba(235, 232, 243, 0.96);
}

.rp-overlay.is-visible,
.theme-transition-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rp-overlay.is-hiding,
.theme-transition-overlay.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.rp-overlay-panel,
.theme-transition-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: rp-overlay-panel-in 0.38s cubic-bezier(0.34, 1.15, 0.64, 1) both;
}

.rp-overlay.is-hiding .rp-overlay-panel,
.theme-transition-overlay.is-hiding .theme-transition-panel {
  animation: rp-overlay-panel-out 0.28s ease forwards;
}

@keyframes rp-overlay-panel-in {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes rp-overlay-panel-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.96); }
}

.rp-overlay-spinner,
.theme-transition-spinner {
  position: relative;
  width: 72px;
  height: 72px;
}

.rp-overlay-ring,
.theme-transition-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--clay-accent, #e03535);
  border-right-color: rgba(224, 53, 53, 0.25);
  animation: rp-overlay-ring-spin 0.85s linear infinite;
}

.clay-page.theme-light .rp-overlay-ring,
.theme-transition-overlay.to-light .theme-transition-ring {
  border-top-color: #d63d3d;
  border-right-color: rgba(214, 61, 61, 0.22);
}

@keyframes rp-overlay-ring-spin {
  to { transform: rotate(360deg); }
}

.rp-overlay-core,
.theme-transition-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.rp-overlay-core i {
  color: var(--clay-accent, #e03535);
}

.clay-page.theme-light .rp-overlay-core i {
  color: #d63d3d;
}

.theme-transition-core i {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.theme-transition-overlay.to-dark .theme-transition-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  color: #c9c9c9;
}

.theme-transition-overlay.to-dark .theme-transition-icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(30deg);
  color: #f5d76e;
}

.theme-transition-overlay.to-light .theme-transition-icon-moon {
  opacity: 0;
  transform: scale(0.5) rotate(-30deg);
  color: #c9c9c9;
}

.theme-transition-overlay.to-light .theme-transition-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  color: #e8b923;
}

.rp-overlay-text,
.theme-transition-text {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
  animation: rp-overlay-text-pulse 1.2s ease-in-out infinite;
}

.clay-page:not(.theme-light) .rp-overlay-text,
.theme-transition-overlay.to-dark .theme-transition-text {
  color: rgba(255, 255, 255, 0.72);
}

.clay-page.theme-light .rp-overlay-text,
.theme-transition-overlay.to-light .theme-transition-text {
  color: rgba(42, 36, 56, 0.65);
}

@keyframes rp-overlay-text-pulse {
  0%, 100% { opacity: 0.65; }
  50%       { opacity: 1; }
}

/* ── Scrollbars — oscuro: negro suave; claro: gris leve ── */
.clay-page ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}

.clay-page ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

.clay-page.theme-light ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
}

.clay-page.theme-light ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* ── Selectores circulares — modales “elegir cuentas” (vacío visible en claro y oscuro) ── */
.clay-page .gr-cfg-check,
.clay-page .vc-item input[type="checkbox"]:not(:checked) {
  background: var(--clay-surface-in);
  border: none;
  box-shadow: var(--clay-sh-in-sm), var(--clay-sh-hi-sm);
}

.clay-page .gr-cfg-item input:checked ~ .gr-cfg-check,
.clay-page .vc-item input[type="checkbox"]:checked {
  background: var(--green);
  border: none;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.22), inset 1px 1px 2px rgba(255, 255, 255, 0.22);
}

/* ── Transición al volver del pedido al historial ── */
.pd-nav-leave {
  position: fixed;
  inset: 0;
  z-index: 200000;
  overflow: hidden;
  pointer-events: none;
  background: var(--clay-bg, #080808);
  will-change: transform;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.pd-nav-leave.is-out {
  transform: translateX(100%);
}
.pd-nav-leave.is-out-left {
  transform: translateX(-100%);
}

@media (prefers-reduced-motion: reduce) {
  .pd-nav-leave {
    transition: none;
  }
}

/* Staff/operadores: no configuran cuentas visibles (lo asigna el admin) */
body.role-staff .js-gear-cuentas {
  display: none !important;
}

