:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-color: #0284c7;
  --secondary-color: #475569;
  --success-color: #059669;
  --danger-color: #dc2626;
  --warning-color: #d97706;
  --light-color: #f1f5f9;
  --dark-color: #0f172a;
  --background-color: #f4f6fb;
  --surface-color: #ffffff;
  --surface-muted: #f8fafc;
  --border-color: #e2e8f0;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md:
    0 4px 10px -2px rgba(15, 23, 42, 0.09), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --border-radius: 0.625rem;
}

/* --- Utilidades Faltantes (Palette UX) --- */
.p-8 {
  padding: 2rem !important;
}

.rounded-lg {
  border-radius: 0.5rem !important;
}

.text-gray-300 {
  color: #d1d5db !important;
}

.mb-3 {
  margin-bottom: 0.75rem !important;
}

/* --- Base y Estructura --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* --- OPTIMIZACIONES MÓVILES RESPONSIVAS (Modo Ayuda, Sub-menús y Tablas) --- */
.help-mode-callout {
  max-width: 100%;
  word-break: break-word;
}

@media (max-width: 640px) {
  .help-mode-callout {
    padding: 0.625rem 0.75rem !important;
    font-size: 0.75rem !important;
  }

  .help-mode-callout button {
    min-width: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #admin-tabs-nav,
  #delivery-main-tabs,
  #customer-filter-pills,
  .reception-subtabs-nav {
    -webkit-overflow-scrolling: touch;
  }
}

.hidden {
  display: none !important;
}

/* --- UNIFIED HEADER STYLES (New) --- */
#app-header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  border-bottom: 1px solid var(--border-color);
}

.unified-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 56px;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

/* Rate Badges */
.rate-badge {
  background-color: var(--light-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.15rem 0.5rem;
  min-width: 0;
  min-height: 38px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.rate-badge:hover {
  background-color: white;
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-sm);
}

.rate-input {
  width: 80px;
  text-align: center;
  font-weight: bold;
  border: 2px solid var(--secondary-color) !important;
  border-radius: 0.5rem;
  padding: 0.25rem;
  font-size: 0.9rem;
  height: 38px;
  background: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

/* Store Selector Dropdown */
.store-selector select {
  background-color: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-color);
  cursor: pointer;
  padding-right: 1.5rem;
  outline: none;
  height: auto;
  /* Reset */
  padding-top: 0;
  padding-bottom: 0;
}

/* --- NAVIGATION PILLS (New) --- */
#main-menu {
  background-color: transparent;
  /* Remove white card style */
  box-shadow: none;
  /* Remove shadow */
  padding: 0.5rem 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 30;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Perfect alignment */
  gap: 0.35rem;
  /* Reduced gap */
  padding: 0.4rem 0.75rem;
  /* Reduced padding for more compact look */
  border-radius: 9999px;
  /* Pill shape */
  font-size: 0.8rem;
  /* Slightly smaller font */
  font-weight: 600;
  color: #4b5563;
  /* Updated to darker gray for better contrast */
  background-color: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  /* Smooth transition */
  white-space: nowrap;
  /* Soft Premium Navigation */
  box-shadow: none;
}

.nav-pill:hover {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-pill.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.nav-pill.warning {
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
}

.nav-pill.warning:hover {
  background-color: var(--warning-color);
  color: white;
}

/* --- Mobile Menu Styles --- */
#mobile-nav-menu {
  transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
  .unified-header {
    /* Padding handled by Tailwind utilities px-4 py-2 in JS */
  }

  #main-menu {
    padding: 0 1rem 0.5rem 1rem;
  }

  /* Mobile Grid Menu (v2.6 - Cuadrícula) - DEPRECATED for Bottom Bar
    #mobile-nav-menu {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
        background: white;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);

        overflow-x: visible;
        overflow-y: visible;
        white-space: normal;
        margin: 0;
        border-radius: 0;
        position: relative;
        z-index: 40;
    }

    #mobile-nav-menu li {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    */

  /* Grid Item Styling (Modern Cards v2.7) */
  #mobile-nav-menu .nav-pill {
    /*
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        min-height: 80px;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        gap: 0.4rem;
        text-align: center;
        border-radius: 1rem;
        white-space: normal;
        line-height: 1.2;
        background-color: var(--white);
        border: 1px solid var(--border-color);
        color: var(--text-color);
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        */
  }

  #mobile-nav-menu .nav-pill:active {
    transform: scale(0.96);
    background-color: var(--light-color);
  }

  #mobile-nav-menu .nav-pill.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(52, 73, 94, 0.3);
  }

  #mobile-nav-menu .nav-pill svg {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    color: var(--secondary-color);
    transition: color 0.2s;
  }

  #mobile-nav-menu .nav-pill.active svg {
    color: var(--white);
  }

  /* Ensure emojis are sized correctly */
  #mobile-nav-menu .nav-pill {
    font-size: 0.75rem;
  }
}

/* --- Mobile Action Sheet (Admin Menu & Vendedor Profile) --- */
@media (max-width: 767.98px) {

  /* Backdrop siempre por debajo del bottom sheet y por encima de header/nav */
  #admin-menu-overlay,
  #vendedor-profile-overlay {
    z-index: 100040 !important;
  }

  /* Transform Dropdown into Bottom Sheet (Portaled to document.body above #app-header) */
  #admin-menu-dropdown,
  #vendedor-profile-dropdown {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.28) !important;
    z-index: 100050 !important;
    padding-bottom: max(env(safe-area-inset-bottom, 16px), 16px) !important;
    border: none !important;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100dvh - 16px) !important;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Action Sheet Handle */
  #admin-menu-dropdown::before,
  #vendedor-profile-dropdown::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background-color: #cbd5e1;
    border-radius: 9999px;
    margin: 6px auto 4px auto;
  }

  /* Action Sheet Items (Updated v2.9) */
  #admin-menu-dropdown button,
  #admin-menu-dropdown a,
  #vendedor-profile-dropdown button {
    border-bottom: none !important;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  /* Backdrop for the sheet */
  #admin-menu-dropdown.hidden,
  #vendedor-profile-dropdown.hidden {
    display: none !important;
  }

  /* Ensure dropdown items have balanced padding in mobile without clipping */
  .admin-menu-item {
    padding: 0.68rem 1rem !important;
  }
}

/* Fix missing translation utility for absolute elements in desktop */
.translate-y-full {
  transform: translateY(100%);
}

@media (min-width: 768px) {
  .md\:transform-none {
    transform: none !important;
  }

  .md\:translate-y-0 {
    transform: translateY(0) !important;
  }

  .md\:left-0 {
    left: 0 !important;
  }

  /* Ensure the main menu container doesn't clip dropdowns */
  #main-menu {
    position: relative;
    z-index: 30;
  }
}

/* --- Admin Menu Redesign (v2.8) --- */
.admin-menu-item {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  /* Base font size */
  color: var(--text-color);
  background-color: transparent;
  border: none;
  border-radius: 0.5rem;
  /* Soft corners */
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
  /* No underlines */
  font-weight: 500;
}

.admin-menu-item:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.admin-menu-item.danger-action {
  color: var(--danger-color);
}

.admin-menu-item.danger-action:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}

.admin-icon-box {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  /* Neutral icon color */
  font-size: 1.1rem;
  /* For emoji icons if used */
}

.admin-menu-item:hover .admin-icon-box {
  color: var(--secondary-color);
}

.admin-menu-item.danger-action .admin-icon-box {
  color: var(--danger-color);
}

/* Section Dividers */
.admin-menu-divider {
  height: 1px;
  background-color: #f1f5f9;
  /* Extremely subtle gray */
  margin: 0.5rem 1rem;
}

/* Block Headers (Optional/Hidden on Mobile usually) */
.admin-block-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem 0.25rem;
  margin-top: 0.25rem;
}

/* --- Scrollbar Hide Utils --- */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- Animation Utils --- */
.animate-fade-in-down {
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visibility Override for Playwright Testing */
.hidden {
  display: none !important;
}

/* --- EXISTING GLOBAL UTILS (Kept) --- */
.app-main-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  /* Adjusted top padding */
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  overflow: visible;
}

.hidden {
  display: none !important;
}

.space-y-2>*+* {
  margin-top: 0.5rem;
}

.space-y-3>*+* {
  margin-top: 0.75rem;
}

.space-y-4>*+* {
  margin-top: 1rem;
}

.space-y-6>*+* {
  margin-top: 1.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.w-full {
  width: 100%;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.text-green-600 {
  color: var(--success-color);
}

.text-blue-600 {
  color: #2980b9;
}

.text-red-600 {
  color: var(--danger-color);
}

.text-gray-500 {
  color: var(--text-muted);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-mono {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-4 {
  padding: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.capitalize {
  text-transform: capitalize;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1 1 0%;
}

.min-w-0 {
  min-width: 0;
}

.max-w-full {
  max-width: 100%;
}

.flex-col {
  flex-direction: column;
}

.flex-grow {
  flex-grow: 1;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-2\.5 {
  gap: 0.625rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .lg\:col-span-3 {
    grid-column: span 3 / span 3;
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.animate-scale-in {
  animation: scale-in 0.15s ease-out;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* --- Vista de Carga y Login --- */
.view-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-color);
  z-index: 100;
  transition: opacity 0.2s;
}

#login-view,
#location-selector-view {
  background-color: rgba(44, 62, 80, 0.6);
  backdrop-filter: blur(4px);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--light-color);
  border-bottom-color: var(--secondary-color);
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
}

#loading-view p {
  margin-left: 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.spinner-small {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.auth-modal,
.location-selector-modal {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 450px;
  margin: 1rem;
  text-align: center;
}

.auth-modal h2,
.location-selector-modal h2 {
  font-size: 1.875rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.auth-modal p,
.location-selector-modal p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.demo-users {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

.demo-users .login-first-time-hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.login-trial-box {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.login-trial-box.hidden {
  display: none !important;
}

.login-trial-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid #10b981;
  background-color: rgba(16, 185, 129, 0.08);
  color: #047857;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.login-trial-btn:hover {
  background-color: rgba(16, 185, 129, 0.16);
  border-color: #059669;
}

.login-trial-btn:active {
  transform: scale(0.985);
}

.login-trial-btn span,
.login-legal-link span {
  font-family: inherit !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.login-legal-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.15rem;
}

.login-legal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.login-legal-link span:last-child {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-legal-link:hover {
  color: var(--primary-color);
}

body.dark-mode .login-trial-btn {
  background-color: rgba(16, 185, 129, 0.14);
  border-color: #34d399;
  color: #6ee7b7;
}

body.dark-mode .login-trial-btn:hover {
  background-color: rgba(16, 185, 129, 0.24);
}

.location-button {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.location-button:hover {
  transform: scale(1.05);
  background-color: var(--secondary-color);
  color: var(--white);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.location-button h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.location-button p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* ============================================
   FLOATING ACTION BUTTON (FAB)
   ============================================ */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #2563eb);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 999;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fab:active {
  transform: scale(0.95);
}

.fab svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

@media (max-width: 767.98px) {
  .fab {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
}

/* --- Formularios y Tooltips --- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  height: 40px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: var(--white);
  transition: all 0.15s ease-in-out;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

input:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: bold;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.tooltip-container:hover .tooltip-icon {
  background-color: var(--secondary-color);
  color: var(--white);
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 220px;
  background-color: var(--dark-color);
  color: var(--white);
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  transition: opacity 0.2s;
  font-size: 0.75rem;
  font-weight: normal;
  line-height: 1.4;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--dark-color) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

#add-product-view .form-group {
  margin-bottom: 0;
}

/* --- Botones (Sistema Táctil Moderno Universal - BodegaPro PC & Móvil) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  gap: 0.5rem;
  line-height: 1.4;
  min-height: 40px;
  height: auto;
  user-select: none;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.06);
  }
}

.btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
  transition-duration: 0.05s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.btn svg {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}

/* Modificadores de Tamaño */
.btn-sm {
  min-height: 32px;
  height: auto;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 0.5rem;
  gap: 0.35rem;
}

.btn-xs {
  min-height: 26px;
  height: auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 0.375rem;
  gap: 0.25rem;
}

.btn-lg {
  min-height: 48px;
  height: auto;
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 0.75rem;
  gap: 0.6rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Variantes de Color Principales con Gradientes y Sombras de Facturación */
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28), 0 1px 2px rgba(37, 99, 235, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  }
}

.btn-secondary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(51, 65, 85, 0.25), 0 1px 2px rgba(51, 65, 85, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 6px 16px rgba(51, 65, 85, 0.35);
  }
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.28), 0 1px 2px rgba(220, 38, 38, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
  }
}

.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.28), 0 1px 2px rgba(22, 163, 74, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-success:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
  }
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.28), 0 1px 2px rgba(245, 158, 11, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
  }
}

.btn-info {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.28), 0 1px 2px rgba(2, 132, 199, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-info:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
  }
}

.btn-ghost {
  background-color: transparent;
  color: #4b5563;
  border-color: transparent;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #111827;
    transform: none;
  }
}

.btn-outline {
  background-color: transparent;
  border-width: 1.5px;
  border-style: solid;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover {
    background-color: rgba(52, 152, 219, 0.06);
    border-color: #94a3b8;
  }
}

.btn-outline-primary {
  background-color: transparent;
  border: 1.5px solid #2563eb;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline-primary:hover {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: #1d4ed8;
  }
}

.btn-outline-warning {
  background-color: transparent;
  border: 1.5px solid #f59e0b;
  color: #d97706;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline-warning:hover {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: #d97706;
  }
}

.btn-outline-danger {
  background-color: transparent;
  border: 1.5px solid #dc2626;
  color: #dc2626;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline-danger:hover {
    background-color: rgba(220, 38, 38, 0.08);
    border-color: #b91c1c;
  }
}

.btn-outline-success {
  background-color: transparent;
  border: 1.5px solid #16a34a;
  color: #16a34a;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline-success:hover {
    background-color: rgba(22, 163, 74, 0.08);
    border-color: #15803d;
  }
}

/* Botón de Escáner Táctil Universal */
.scanner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(51, 65, 85, 0.25);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  font-size: 1.1rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .scanner-btn:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(51, 65, 85, 0.35);
  }
}

.scanner-btn:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 1px 2px rgba(51, 65, 85, 0.2);
}

/* Botones Tácticos Especializados */
.btn-export-excel {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .btn-export-excel:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.42);
  }
}

.btn-export-pdf {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .btn-export-pdf:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.42);
  }
}

.btn-print-pos {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .btn-print-pos:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.42);
  }
}

.btn-whatsapp {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .btn-whatsapp:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
  }
}

.btn-tactile {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (hover: hover) and (pointer: fine) {
  .btn-tactile:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
  }
}

/* Botones de acción en filas de tablas */
td .btn-ghost,
.table-action-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0.35rem;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) and (pointer: fine) {

  td .btn-ghost:hover,
  .table-action-btn:hover {
    background-color: rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
  }
}

.link-button {
  background: none;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.8rem;
}

/* --- Tarjetas (Card) y Cabeceras de Página --- */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--light-color);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-color);
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-header-container {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

/* --- Tablas --- */
.table-container {
  overflow-x: auto;
}

@media (min-width: 768px) {
  .table-container {
    padding-bottom: 0.5rem;
  }
}

.table-container thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #f8fafc;
}

body.dark-mode .table-container thead th {
  background-color: #1e293b;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background-color: #f8f9fa;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  vertical-align: middle;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

tbody tr:hover {
  background-color: #f1f3f5;
}

.low-stock-row {
  background-color: rgba(231, 76, 60, 0.05) !important;
}

.low-stock-row:hover {
  background-color: rgba(231, 76, 60, 0.15) !important;
}

.out-of-stock-row {
  background-color: rgba(239, 68, 68, 0.07) !important;
}

.out-of-stock-row:hover {
  background-color: rgba(239, 68, 68, 0.14) !important;
}

.need-restock-row {
  background-color: rgba(99, 102, 241, 0.05) !important;
}

.need-restock-row:hover {
  background-color: rgba(99, 102, 241, 0.12) !important;
}

.toggle-column {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.toggle-column:hover {
  background-color: #e3e8ed;
}

#product-table td:nth-child(n + 3),
#product-table th:nth-child(n + 3) {
  text-align: right;
}

#product-table td:nth-child(n + 4) {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--light-color);
}

.actions-header {
  text-align: right !important;
}

/* --- Formulario de Producto --- */
.product-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .product-form-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.min-w-0 {
  min-width: 0;
}

/* Selector Táctil de Categoría / Rubro (Móvil & PC) */
.category-field-group {
  position: relative;
  min-width: 0;
}

.category-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.category-input-wrap input {
  width: 100%;
  padding-right: 44px !important;
}

.category-picker-toggle-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: none;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-picker-toggle-btn:hover,
.category-picker-toggle-btn.active {
  background: #dbeafe;
  color: #1d4ed8;
}

.category-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.category-chip-btn {
  flex: 0 0 auto;
  min-height: 30px !important;
  height: auto !important;
  padding: 5px 11px !important;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-chip-btn.more-btn {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  font-weight: 700;
}

.category-chip-btn.selected {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.28);
}

.category-picker-panel {
  margin-top: 8px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.category-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 640px) {
  .category-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.category-picker-item {
  min-height: 38px !important;
  height: auto !important;
  padding: 7px 10px !important;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.category-picker-item.selected {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 700;
}

html.dark .category-picker-toggle-btn,
body.dark .category-picker-toggle-btn {
  background: #334155;
  color: #e2e8f0;
}

html.dark .category-chip-btn,
body.dark .category-chip-btn {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

html.dark .category-chip-btn.selected,
body.dark .category-chip-btn.selected {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

html.dark .category-picker-panel,
body.dark .category-picker-panel {
  background: #1e293b;
  border-color: #475569;
}

html.dark .category-picker-item,
body.dark .category-picker-item {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html.dark .category-picker-item.selected,
body.dark .category-picker-item.selected {
  background: rgba(37, 99, 235, 0.25);
  border-color: #60a5fa;
  color: #93c5fd;
}

#add-product-view .compact-inline-btn {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--light-color);
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .form-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.625rem;
  }

  .form-actions .btn {
    width: 100%;
    min-height: 46px;
  }
}

.price-preview-card {
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  height: fit-content;
}

.price-details p {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-details strong {
  font-family: monospace;
}

/* --- Utilities --- */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- Modales (Bottom Sheet en Móvil) --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  max-height: 90dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-up 0.3s ease-out;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .modal-backdrop {
    align-items: center;
  }

  .modal-content {
    border-radius: var(--border-radius);
    margin: 1rem;
    animation: scale-in 0.15s ease-out;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.modal-header button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-header svg {
  width: 1.25rem;
  height: 1.25rem;
}

.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: #f8f9fa;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  flex-shrink: 0;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 640px) {
  .modal-content {
    max-width: 100vw !important;
    min-width: 0;
  }

  .modal-body {
    padding: 0.9rem 0.95rem;
    min-width: 0;
    overflow-x: hidden;
  }

  .modal-footer {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.625rem;
    padding: 1rem;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 46px;
    font-size: 0.95rem;
  }
}

/* --- Notificaciones (Toaster) --- */
#toaster-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 1rem;
  min-width: 300px;
  max-width: 450px;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  color: var(--white);
  font-weight: 500;
  animation: toast-in 0.3s ease-out;
}

.toast.success {
  background-color: var(--success-color);
}

.toast.error {
  background-color: var(--danger-color);
}

.toast.info {
  background-color: var(--secondary-color);
}

.toast.warning {
  background-color: var(--warning-color);
}

@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- Facturación y Recepción de Mercancía --- */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.search-container input {
  padding-left: 2.5rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  margin-top: 0.25rem;
  max-height: 350px;
  overflow-y: auto;
}

.search-results .result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
}

.search-results .result-item:last-child {
  border-bottom: none;
}

.search-results .result-item:hover {
  background-color: #e8f4ff;
}

.search-results .result-item.low-stock {
  background-color: #fff5f5;
}

.search-results .result-item.low-stock:hover {
  background-color: #ffe0e0;
}

.invoice-totals {
  text-align: right;
  margin-top: 1rem;
}

.invoice-totals .total-usd {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
}

.invoice-actions {
  border-top: 1px solid var(--light-color);
  padding-top: 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 767.98px) {
  .invoice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
  }

  .invoice-actions #generate-invoice-btn,
  .invoice-actions [data-action="generate-invoice-btn"] {
    grid-column: span 2;
    order: -1;
    min-height: 52px;
    font-size: 1.1rem;
    width: 100%;
  }

  .invoice-actions [data-action="clear-invoice-btn"],
  .invoice-actions #hold-invoice-btn {
    min-height: 44px;
    width: 100%;
  }
}

#invoice-history-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
  min-height: 200px;
}

#invoice-history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.change-display {
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.change-display.positive {
  background-color: #eafaf1;
  color: var(--success-color);
}

.change-display.negative {
  background-color: #fdedec;
  color: var(--danger-color);
}

.change-display.neutral {
  background-color: var(--light-color);
  color: var(--text-muted);
}

.max-h-96 {
  max-height: 24rem;
}

.overflow-y-auto {
  overflow-y: auto;
}

#low-stock-list li {
  padding: 0.75rem;
  background-color: rgba(231, 76, 60, 0.05);
  border-left: 4px solid var(--danger-color);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

ul {
  list-style: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 0.5rem 0;
}

.divide-y>*+* {
  border-top: 1px solid var(--border-color);
}

/* --- Administración y Reportes --- */
.tabs-container {
  margin-top: 1.5rem;
}

.tabs-nav {
  border-bottom: 2px solid var(--border-color);
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-container {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1rem;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  background: none;
  border: none;
  padding: 0.75rem 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: var(--dark-color);
}

.tab-button.active {
  color: var(--secondary-color);
  border-bottom-color: var(--secondary-color);
}

#reports-time-range-filter button {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  background-color: var(--light-color);
  color: var(--text-muted);
}

#reports-time-range-filter button.active {
  background-color: var(--secondary-color);
  color: var(--white);
}

.top-product-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border-radius: 6px;
  transition: background-color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}

.top-product-item:hover {
  background-color: #f1f3f5;
}

.top-product-rank {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-muted);
  min-width: 20px;
}

.top-product-info {
  flex-grow: 1;
}

.top-product-info p {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.top-product-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.top-product-stats strong {
  color: var(--dark-color);
}

.top-product-stats .stat-profit {
  color: var(--success-color);
  font-weight: 600;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--light-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--secondary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.chart-container {
  height: 24rem;
  position: relative;
}

/* --- Mejoras de Accesibilidad --- */
.btn:focus,
input:focus,
select:focus,
button:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.toast {
  animation: toast-in 0.3s ease-out forwards;
}

.toast.removing {
  animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  height: 32px;
}

/* --- Responsive Tables --- */
@media screen and (max-width: 767.98px) {
  #product-table thead {
    display: none;
  }

  #product-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
  }

  #product-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    border-bottom: 1px dotted var(--light-color);
    padding: 0.75rem 0.5rem;
  }

  #product-table td:last-child {
    border-bottom: none;
  }

  #product-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: var(--text-color);
    text-align: left;
    padding-right: 1rem;
  }

  #product-table td:first-child {
    display: block;
    font-size: 1.1rem;
    padding-top: 0;
    text-align: left;
    padding-bottom: 1rem;
    font-weight: bold;
  }

  #product-table td:first-child::before {
    display: none;
  }

  #product-table .actions-cell {
    padding-top: 1rem;
    justify-content: flex-end;
  }

  #product-table .actions-cell::before {
    display: none;
  }

  #invoice-items-table thead,
  #reception-table thead,
  #reports-invoices-table thead {
    display: none;
  }

  #invoice-items-table tr,
  #reports-invoices-table tr {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
  }

  #invoice-items-table td,
  #reports-invoices-table td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border: none;
  }

  /* --- Reception Table Grid Layout (Mobile) --- */
  #reception-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 40px;
    grid-template-areas: "name name name name" "current input new delete";
    gap: 0.5rem;
    background: white;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    align-items: center;
  }

  #reception-table td {
    border: none;
    padding: 0;
  }

  #reception-table td:nth-child(1) {
    grid-area: name;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.25rem;
    white-space: normal;
  }

  #reception-table td:nth-child(2) {
    grid-area: current;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  #reception-table td:nth-child(2)::before {
    content: "Actual";
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
  }

  #reception-table td:nth-child(3) {
    grid-area: input;
    justify-content: center;
  }

  #reception-table td:nth-child(3) input {
    width: 100% !important;
    text-align: center;
  }

  #reception-table td:nth-child(4) {
    grid-area: new;
    flex-direction: column;
    align-items: center;
    font-weight: bold;
    color: var(--success-color);
  }

  #reception-table td:nth-child(4)::before {
    content: "Total";
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    color: var(--text-muted);
  }

  #reception-table td:nth-child(5) {
    grid-area: delete;
    justify-content: flex-end;
  }

  @media screen and (max-width: 640px) {
    .app-main-content {
      padding: 0.5rem;
    }

    .header-content {
      flex-direction: column;
      gap: 0.5rem;
    }

    .card {
      padding: 0.5rem;
    }

    .page-header {
      flex-direction: column;
      text-align: center;
    }

    .exchange-rates {
      flex-wrap: wrap;
      justify-content: center;
    }
  }
}

/* =========================================
   SUPERADMIN DASHBOARD STYLES (v2.0)
   ========================================= */
.sa-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.sa-sidebar {
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  transition: width 0.25s ease-in-out, padding 0.25s ease-in-out;
}

/* Mobile (< 768px): Hide Desktop Sidebar, Show Mobile Top Bar */
@media (max-width: 767px) {
  .sa-sidebar {
    display: none !important;
  }

  #sa-mobile-top-bar {
    display: block !important;
  }
}

/* Tablet & Desktop (>= 768px): Show Sidebar, Hide Mobile Top Bar */
@media (min-width: 768px) {
  .sa-sidebar {
    display: flex !important;
  }

  #sa-mobile-top-bar {
    display: none !important;
  }
}

/* Tablet Adaptive Icon-Rail (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .sa-sidebar:not(.force-expanded) {
    width: 5rem !important;
    /* 80px Icon-Rail */
    padding: 0.75rem 0.5rem !important;
  }

  .sa-sidebar:not(.force-expanded) .sa-nav-label,
  .sa-sidebar:not(.force-expanded) .sa-nav-group-title,
  .sa-sidebar:not(.force-expanded) .sa-sidebar-search-wrap,
  .sa-sidebar:not(.force-expanded) .sa-nav-badge {
    display: none !important;
  }

  .sa-sidebar:not(.force-expanded) .sa-nav-item {
    justify-content: center !important;
    padding: 0.75rem 0.5rem !important;
  }
}

/* Desktop Full Sidebar (>= 1024px) */
@media (min-width: 1024px) {
  .sa-sidebar:not(.force-collapsed) {
    width: 16.5rem !important;
    /* 264px */
  }

  .sa-sidebar:not(.force-collapsed) .sa-nav-label {
    display: inline !important;
  }
}

.sa-sidebar.force-expanded {
  width: 16.5rem !important;
}

.sa-sidebar.force-expanded .sa-nav-label {
  display: inline !important;
}

.sa-sidebar.force-collapsed {
  width: 5rem !important;
  padding: 0.75rem 0.5rem !important;
}

.sa-sidebar.force-collapsed .sa-nav-label,
.sa-sidebar.force-collapsed .sa-nav-group-title,
.sa-sidebar.force-collapsed .sa-sidebar-search-wrap,
.sa-sidebar.force-collapsed .sa-nav-badge {
  display: none !important;
}

.sa-sidebar.force-collapsed .sa-nav-item {
  justify-content: center !important;
  padding: 0.75rem 0.5rem !important;
}

.sa-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  min-height: 44px;
}

.sa-nav-item:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

.sa-nav-item.active {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.sa-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.sa-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.sa-kpi-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.sa-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sa-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--secondary-color);
}

.sa-kpi-card.alert::before {
  background: var(--danger-color);
}

.sa-kpi-card.success::before {
  background: var(--success-color);
}

.sa-kpi-card.warning::before {
  background: var(--warning-color);
}

.sa-kpi-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0.5rem 0;
  line-height: 1;
}

.sa-kpi-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sa-detail-header {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--secondary-color);
}

.sa-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sa-status-active {
  background-color: #dcfce7;
  color: #166534;
}

.sa-status-suspended {
  background-color: #fee2e2;
  color: #991b1b;
}

.sa-status-grace {
  background-color: #fef3c7;
  color: #92400e;
}

.sa-notes-area {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: inherit;
  resize: vertical;
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.sa-notes-area:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

@media (max-width: 767.98px) {
  .sa-layout {
    flex-direction: column;
  }

  .sa-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: white;
    z-index: 1000;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
  }

  .sa-sidebar.hidden {
    display: none !important;
  }

  .sa-sidebar.open {
    transform: translateX(0);
  }

  .sa-nav-item {
    white-space: normal;
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
  }

  .sa-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
  }

  .sa-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .sa-mobile-toggle {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    width: 100%;
  }
}

.sa-mobile-toggle {
  display: none;
}

/* --- UTILIDADES PERSONALIZADAS (Grid System Manual) --- */
.w-full {
  width: 100% !important;
}

.h-full {
  height: 100% !important;
}

.h-8 {
  height: 2rem !important;
}

.w-8 {
  width: 2rem !important;
}

.w-16 {
  width: 4rem !important;
}

.grid {
  display: grid;
  gap: 0.5rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-12 {
  grid-template-columns: repeat(12, 1fr);
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-5 {
  grid-column: span 5;
}

.col-span-7 {
  grid-column: span 7;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-12 {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .md\:col-span-5 {
    grid-column: span 5;
  }

  .md\:col-span-7 {
    grid-column: span 7;
  }

  .md\:col-span-12 {
    grid-column: span 12;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, 1fr);
  }

  /* Responsive Positioning (Menu Dropdown) */
  .md\:absolute {
    position: absolute !important;
  }

  .md\:relative {
    position: relative !important;
  }

  .md\:top-full {
    top: 100% !important;
  }

  .md\:right-0 {
    right: 0 !important;
  }

  .md\:w-64 {
    width: 16rem !important;
  }

  .md\:shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  }

  .md\:z-50 {
    z-index: 50 !important;
  }

  .md\:text-xs {
    font-size: 0.75rem !important;
  }
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.font-normal {
  font-weight: 400;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.text-gray-400 {
  color: #9ca3af;
}

.text-gray-500 {
  color: #6b7280;
}

.text-red-500 {
  color: #ef4444;
}

.text-purple-600 {
  color: #9333ea;
}

.text-purple-700 {
  color: #7e22ce;
}

.text-blue-800 {
  color: #1e40af;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-blue-50 {
  background-color: #eff6ff;
}

.bg-white {
  background-color: #ffffff;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.text-gray-600 {
  color: #4b5563;
}

.rounded-full {
  border-radius: 9999px;
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.font-medium {
  font-weight: 500;
}

.inline-flex {
  display: inline-flex;
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: #e5e7eb;
}

.border-blue-100 {
  border-color: #dbeafe;
}

.border-blue-200 {
  border-color: #bfdbfe;
}

.border-purple-300 {
  border-color: #d8b4fe;
}

.border-t {
  border-top-width: 1px;
}

.rounded {
  border-radius: 0.25rem;
}

.p-3 {
  padding: 0.75rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.my-2 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pt-4 {
  padding-top: 1rem;
}

.py-0 {
  padding-top: 0;
  padding-bottom: 0;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.block {
  display: block;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.max-w-\[150px\] {
  max-width: 150px;
}

.max-w-\[120px\] {
  max-width: 120px;
}

/* --- ANNOUNCEMENT BANNERS --- */
#announcement-banner-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.announcement-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.announcement-banner:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.announcement-banner.info {
  background: #ebf5fb;
  border-color: #3498db;
}

.announcement-banner.important {
  background: #fef5e7;
  border-color: #f39c12;
}

.announcement-banner.urgent {
  background: #fadbd8;
  border-color: #e74c3c;
}

.announcement-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.announcement-banner.info .announcement-icon {
  color: #3498db;
}

.announcement-banner.important .announcement-icon {
  color: #f39c12;
}

.announcement-banner.urgent .announcement-icon {
  color: #e74c3c;
}

.announcement-content {
  flex-grow: 1;
  min-width: 0;
}

.announcement-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: #2c3e50;
}

.announcement-summary {
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #6c757d;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.announcement-close:hover {
  color: #2c3e50;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.announcement-modal-body {
  white-space: pre-wrap;
  line-height: 1.6;
  color: #2c3e50;
  font-size: 0.95rem;
}

.announcement-meta {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid #dee2e6;
  font-size: 0.8rem;
  color: #6c757d;
}

/* --- OFFLINE MODE BANNER --- */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-100%);
  transition: transform 0.3s ease-out;
}

.offline-banner.visible {
  transform: translateY(0);
}

.offline-banner.hidden {
  transform: translateY(-100%);
}

.offline-icon {
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.offline-text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.offline-mode {
  padding-top: 48px;
}

/* Monitor Filter Buttons */
.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #219a52;
}

.monitor-date-filter {
  background-color: var(--light-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.monitor-date-filter:hover {
  background-color: var(--border-color);
}

.monitor-date-filter.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

#monitor-date-picker {
  max-width: 140px;
}

/* Dashboard Filter Pills */
.transition-colors {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.duration-200 {
  transition-duration: 200ms;
}

/* Botón Limpiar Búsqueda */
.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  line-height: 1;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.search-clear-btn:hover {
  background-color: #f3f4f6;
  color: #4b5563;
}

.search-clear-btn.hidden {
  display: none;
}

.search-results-dropdown {
  position: relative;
  z-index: 50;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-md);
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
  margin-bottom: 8px;
}

.search-results-dropdown .search-result-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s;
}

.search-results-dropdown .search-result-item:hover {
  background-color: #f0f9ff;
}

.search-results-dropdown .search-result-item:last-child {
  border-bottom: none;
}

#invoice-search-results,
#receive-stock-search-results {
  max-height: 180px !important;
  overflow-y: auto !important;
}

/* --- Ads Module Styles --- */
#splash-screen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-color: #000;
}

.splash-overlay {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 2rem;
}

#splash-skip-btn {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}

#splash-skip-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

#ad-interstitial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9000;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#dashboard-banner-container {
  margin-bottom: 1rem;
  text-align: center;
  background-color: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
}

.ad-banner-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  position: relative;
}

.ad-banner-dismiss-btn {
  min-height: 0 !important;
  height: auto !important;
  padding: 2px 6px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

@media (max-width: 767.98px) {
  .ad-banner-wrapper {
    padding: 0.25rem 0.5rem !important;
    gap: 2px;
  }

  .ad-banner-wrapper img {
    max-height: 52px !important;
  }
}

.text-xxs {
  font-size: 0.65rem;
}

/* --- ACCESIBILIDAD Y UX --- */
button:not(.btn-xs):not(.btn-sm):not(.nav-pill):not(#sa-sidebar-toggle-btn):not(#sync-indicator):not(#header-help-mode-btn):not(#bcv-badge-display):not(#header-rate-status-badge):not(.badge-display):not(.btn-ghost):not(.ad-banner-dismiss-btn):not([data-action="open-downloads-modal"]):not([data-action="open-legal-notice"]):not([data-action="open-subscription-modal"]):not(#theme-toggle-btn):not(#header-notification-btn):not(#mobile-location-btn):not(#btn-header-fullscreen):not(#btn-header-install):not(#header-store-link-btn),
.btn:not(.btn-xs):not(.btn-sm):not(.btn-ghost),
input:not(.sr-only):not([type="checkbox"]):not([type="radio"]):not(.rate-input),
select:not(#header-location-select):not(.select-sm),
.location-button,
.announcement-banner {
  min-height: 44px;
  touch-action: manipulation;
}

.btn:active,
button:active {
  transform: scale(0.96);
  filter: brightness(0.9);
}

.page-title,
.card-title {
  color: #000 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

input,
select {
  border-width: 2px !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  font-weight: 500;
}

body {
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: 2px;
}

/* --- PALETTE: PRODUCT LIST CARDS (MOBILE) --- */
.product-thumb-cell {
  width: 60px;
  padding: 0.5rem !important;
  vertical-align: middle;
}

.product-thumb-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.dark-mode .product-thumb-wrapper {
  background-color: #1e293b;
  border-color: #334155;
}

.product-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  box-sizing: border-box;
}

.product-thumb-placeholder svg {
  width: 20px;
  height: 20px;
  color: #9ca3af;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border: 1px solid #94a3b8;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

input:focus+.slider {
  box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.3);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

@media screen and (max-width: 640px) {

  #product-table,
  #product-table tbody,
  #product-table tr,
  #product-table td {
    display: block;
    width: 100%;
  }

  #product-table thead {
    display: none;
  }

  #product-table tr {
    display: grid !important;
    grid-template-columns: 60px 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 0.35rem 0.65rem !important;
    align-items: start !important;
    background: white;
    margin-bottom: 12px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    position: relative;
  }

  #product-table td.product-thumb-cell {
    display: flex !important;
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    padding: 0 !important;
    border: none;
    justify-content: center;
    align-items: flex-start;
  }

  #product-table td.product-thumb-cell .product-thumb-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
  }

  #product-table td[data-label="Producto"] {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    border: none;
    align-self: start;
    margin-bottom: 2px;
    text-align: left !important;
  }

  #product-table td[data-label="Producto"] .font-bold {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.25;
    display: block;
    gap: 4px;
    padding-right: 4px;
    white-space: normal !important;
    max-width: none !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  #product-table td[data-label="Producto"] .text-xs {
    white-space: normal !important;
    max-width: none !important;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-top: 2px;
  }

  #product-table td[data-label="Inventario"] {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    position: static !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 100% !important;
    font-size: 0.75rem;
    color: #334155;
    margin-top: 2px;
  }

  #product-table td[data-label="Inventario"]::before {
    display: none !important;
  }

  #product-table td[data-label="Venta ($)"] {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 8px !important;
    grid-column: 2 !important;
    grid-row: 3 !important;
    padding: 0 !important;
    border: none;
    text-align: left !important;
    align-self: center;
    margin-top: 2px;
  }

  #product-table td[data-label="Venta ($)"] .sale-usd-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
  }

  #product-table td[data-label="Venta ($)"] .sale-bs-val {
    font-size: 0.8rem;
    color: #64748b !important;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    margin-top: 0 !important;
  }

  #product-table td[data-label="Venta ($)"]::before {
    display: none;
  }

  #product-table td.product-toggle-cell {
    display: flex !important;
    grid-column: 1 !important;
    grid-row: 4 !important;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    border: none;
    padding-top: 4px !important;
  }

  #product-table td.product-toggle-cell::before {
    display: none;
  }

  #product-table td.actions-cell {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 4 !important;
    justify-content: flex-end;
    align-items: center;
    padding: 0 !important;
    border: none;
    gap: 8px;
    padding-top: 4px !important;
    border-top: 1px dashed #f1f5f9;
  }

  #product-table td.actions-cell button {
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #64748b;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
  }

  #product-table td.actions-cell button:hover {
    background: #e2e8f0;
    color: var(--secondary-color);
  }

  #product-table td.actions-cell::before {
    display: none;
  }

  #product-table td:not(.product-thumb-cell):not([data-label="Producto"]):not([data-label="Venta ($)"]):not(.product-toggle-cell):not(.actions-cell):not([data-label="Inventario"]) {
    display: none !important;
  }

  .low-stock-row {
    background-color: #fff1f2 !important;
    border-color: #fecaca !important;
  }

  .low-stock-row td[data-label="Inventario"] {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
  }

  .out-of-stock-row {
    background-color: #fef2f2 !important;
    border-color: #fca5a5 !important;
  }

  .out-of-stock-row td[data-label="Inventario"] {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #f87171;
  }

  .need-restock-row {
    background-color: #eef2ff !important;
    border-color: #c7d2fe !important;
  }

  .need-restock-row td[data-label="Inventario"] {
    background-color: #e0e7ff;
    color: #4338ca;
    border-color: #a5b4fc;
  }
}

/* --- PRINT STYLES --- */
@media print {
  .print\:hidden {
    display: none !important;
  }

  .print\:block {
    display: block !important;
  }

  .print\:w-full {
    width: 100% !important;
  }

  .print\:max-w-none {
    max-width: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .container,
  .grid,
  .md\:grid-cols-3,
  .md\:col-span-2 {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #admin-container {
    padding: 20px !important;
  }

  .card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  table {
    border-collapse: collapse !important;
    width: 100% !important;
    font-size: 12px !important;
  }

  th,
  td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
  }

  th {
    background-color: #f0f0f0 !important;
    color: black !important;
  }

  a[href]:after {
    content: none !important;
  }
}

/* --- Visual Polish --- */
.btn-xs:active {
  transform: scale(0.95);
  filter: brightness(0.9);
}

@media screen and (max-width: 360px) {
  #product-table tr {
    grid-template-columns: 50px 1fr;
    gap: 0 8px;
    padding: 10px;
  }

  #product-table td.product-thumb-cell .product-thumb-wrapper {
    width: 50px;
    height: 50px;
  }

  #product-table td[data-label="Producto"] .font-bold {
    font-size: 0.9rem;
  }
}

/* --- Mobile Invoicing Table --- */
@media (max-width: 767.98px) {
  #invoice-items-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    grid-template-areas: "name delete" "controls total" "prices prices";
    gap: 0.5rem;
    background: white;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  #invoice-items-table td {
    padding: 0;
    border: none;
  }

  #invoice-items-table td:nth-child(1) {
    grid-area: name;
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--primary-color);
    white-space: normal;
    line-height: 1.2;
  }

  #invoice-items-table td:nth-child(2) {
    grid-area: controls;
    justify-content: flex-start;
  }

  #invoice-items-table td:nth-child(3),
  #invoice-items-table td:nth-child(4) {
    grid-area: prices;
    display: none !important;
  }

  #invoice-items-table td:nth-child(5) {
    grid-area: total;
    justify-content: flex-end;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--secondary-color);
  }

  #invoice-items-table td:nth-child(6) {
    grid-area: prices;
    display: flex !important;
    font-size: 0.75rem;
    color: var(--text-muted);
    justify-content: flex-end;
    align-items: center;
  }

  #invoice-items-table td:nth-child(6)::before {
    content: "Bs: ";
    margin-right: 2px;
  }

  #invoice-items-table td:nth-child(7) {
    grid-area: delete;
    justify-content: flex-end;
    align-items: flex-start;
  }

  #invoice-items-table td:nth-child(7) button {
    color: var(--danger-color);
    padding: 4px;
    background: #fee2e2;
    border-radius: 4px;
  }

  #inventory-log-table tr {
    display: flex;
    flex-direction: column;
    background: white;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    gap: 0.25rem;
  }

  #inventory-log-table td {
    padding: 0;
    border: none;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
  }

  #inventory-log-table td:nth-child(1)::before {
    content: "Fecha:";
    font-weight: bold;
    color: var(--text-muted);
  }

  #inventory-log-table td:nth-child(2)::before {
    content: "Usuario:";
    font-weight: bold;
    color: var(--text-muted);
  }

  #inventory-log-table td:nth-child(3)::before {
    content: "Acción:";
    font-weight: bold;
    color: var(--text-muted);
  }

  #inventory-log-table td:nth-child(4) {
    order: -1;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    display: block;
  }

  #inventory-log-table td:nth-child(5)::before {
    content: "Cambio:";
    font-weight: bold;
    color: var(--text-muted);
  }

  #inventory-log-table td:nth-child(6)::before {
    content: "Nuevo Stock:";
    font-weight: bold;
    color: var(--text-muted);
  }
}

/* --- Tailwind-like Utility Classes (Polyfill) --- */
.flex-row {
  flex-direction: row;
}

.items-stretch {
  align-items: stretch;
}

.justify-start {
  justify-content: flex-start;
}

.p-2 {
  padding: 0.5rem;
}

.overflow-x-auto {
  overflow-x: auto;
}

@media (min-width: 768px) {
  .md\:hidden {
    display: none !important;
  }

  .md\:flex {
    display: flex !important;
  }

  .md\:block {
    display: block !important;
  }

  .md\:flex-row {
    flex-direction: row !important;
  }

  .md\:flex-col {
    flex-direction: column !important;
  }

  .md\:w-auto {
    width: auto !important;
  }

  .md\:items-center {
    align-items: center !important;
  }

  .md\:justify-center {
    justify-content: center !important;
  }

  .md\:gap-6 {
    gap: 1.5rem !important;
  }
}

@media (min-width: 640px) {
  .sm\:block {
    display: block !important;
  }
}

/* --- Mobile Header Optimization (v2.9 - Ultra-Compact Two Rows) --- */
@media (max-width: 767.98px) {
  .unified-header {
    flex-wrap: wrap !important;
    align-items: center !important;
    row-gap: 0.25rem !important;
    column-gap: 0.25rem !important;
    padding: 0.32rem 0.5rem !important;
    min-height: 0 !important;
  }

  .header-left {
    display: flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 42% !important;
    order: 1 !important;
  }

  .header-right {
    display: flex !important;
    flex: 0 1 auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    max-width: 58% !important;
    min-width: 0 !important;
    gap: 0.2rem !important;
    order: 2 !important;
  }

  .header-rates-container {
    width: 100% !important;
    order: 3 !important;
    margin-top: 0.15rem !important;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.22rem !important;
    gap: 0.2rem !important;
  }

  body.dark-mode .header-rates-container {
    border-top-color: #1e293b;
  }

  .store-selector {
    width: 100% !important;
    min-width: 0 !important;
  }

  .store-selector>div {
    padding: 0.18rem 0.4rem !important;
    min-height: 28px !important;
    height: 28px !important;
  }

  .store-selector select {
    max-width: 100% !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
    padding-right: 0.75rem;
    min-height: 0 !important;
  }

  .vitrina-controls {
    padding-right: 0.25rem !important;
    gap: 0.15rem !important;
    flex-shrink: 0 !important;
  }

  .vitrina-controls .switch {
    transform: scale(0.62) !important;
    margin: 0 -6px !important;
  }

  .exchange-rates {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }

  .rate-badge {
    flex: 1 1 50% !important;
    min-width: 0 !important;
    max-width: 50% !important;
    min-height: 28px !important;
    padding: 0.18rem 0.45rem !important;
    border-radius: 0.5rem !important;
  }

  .rate-badge .badge-display {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.25rem !important;
    min-height: 0 !important;
  }

  .rate-value {
    font-size: 0.76rem !important;
  }

  .timestamp-container {
    width: 100% !important;
    text-align: center !important;
    margin-top: 0 !important;
    display: flex !important;
    justify-content: center !important;
  }

  #header-rate-status-badge {
    padding: 1px 8px !important;
    font-size: 9px !important;
    min-height: 0 !important;
    line-height: 1.25 !important;
  }

  .header-right .user-controls {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0.2rem !important;
    max-width: 100% !important;
  }

  .header-right .user-controls::-webkit-scrollbar {
    display: none;
  }

  .header-right button,
  .header-right .btn {
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 0.42rem !important;
    flex-shrink: 0 !important;
    font-size: 10px !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  #theme-toggle-btn,
  #header-notification-btn,
  #header-store-link-btn,
  #btn-header-install {
    width: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
  }

  .payment-method-card {
    padding: 0.5rem !important;
    gap: 0.35rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* =========================================
   DARK MODE
   ========================================= */
body.dark-mode {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --accent-color: #38bdf8;
  --secondary-color: #94a3b8;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --light-color: #1e293b;
  --dark-color: #f8fafc;
  --background-color: #0b1120;
  --surface-color: #1e293b;
  --surface-muted: #0f172a;
  --border-color: #334155;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --white: #1e293b;

  /* Shadows softer for dark mode */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.45);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.45);
  --shadow-md:
    0 4px 10px -2px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
}

/* Overrides for hardcoded colors */
body.dark-mode .bg-gray-50 {
  background-color: #283141 !important;
}

body.dark-mode .bg-gray-100 {
  background-color: #4a5568 !important;
}

body.dark-mode .bg-blue-50 {
  background-color: #2c5282 !important;
  color: #ebf8ff !important;
}

body.dark-mode .bg-white {
  background-color: var(--white) !important;
  color: var(--text-color) !important;
}

body.dark-mode .text-gray-600,
body.dark-mode .text-gray-500 {
  color: var(--text-muted) !important;
}

body.dark-mode .text-gray-400 {
  color: #718096 !important;
}

body.dark-mode .border {
  border-color: var(--border-color) !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #1a202c;
  color: white !important;
  border-color: #4a5568;
}

body.dark-mode .card {
  background-color: var(--white);
  color: var(--text-color);
}

body.dark-mode #app-header {
  background-color: var(--white);
  border-bottom-color: var(--border-color);
}

body.dark-mode .nav-pill:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal-content {
  background-color: var(--white);
  color: var(--text-color);
}

body.dark-mode .modal-footer {
  background-color: #1a202c;
  border-top-color: var(--border-color);
}

body.dark-mode table th {
  background-color: #2d3748;
  color: var(--text-color);
  border-bottom-color: var(--border-color);
}

body.dark-mode table td {
  border-bottom-color: var(--border-color);
}

body.dark-mode tbody tr:hover {
  background-color: #283141;
}

body.dark-mode .btn-tactile {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .btn-tactile:hover {
  background-color: #334155;
  border-color: #475569;
  color: #ffffff;
}

body.dark-mode .btn-outline {
  border-color: #4b5563;
  color: #e5e7eb;
}

body.dark-mode .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #6b7280;
}

body.dark-mode .btn-ghost {
  color: #9ca3af;
}

body.dark-mode .btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
}

/* --- Missing Tailwind Polyfills --- */
.contents {
  display: contents !important;
}

.absolute {
  position: absolute !important;
}

.overflow-visible {
  overflow: visible !important;
}

.relative {
  position: relative !important;
}

.top-0 {
  top: 0 !important;
}

.top-full {
  top: 100% !important;
}

.right-0 {
  right: 0 !important;
}

.pr-8 {
  padding-right: 2rem !important;
}

.z-50 {
  z-index: 50 !important;
}

.w-px {
  width: 1px !important;
}

.w-64 {
  width: 16rem !important;
}

.h-6 {
  height: 1.5rem !important;
}

.mx-2 {
  margin-left: 0.5rem !important;
  margin-right: 0.5rem !important;
}

.self-center {
  align-self: center !important;
}

.bg-gray-300 {
  background-color: #d1d5db !important;
}

.rounded-xl {
  border-radius: 0.75rem !important;
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.border-gray-100 {
  border-color: #f3f4f6 !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

/* --- Responsive Utilities (Must be last) --- */
@media (min-width: 768px) {
  .md\:absolute {
    position: absolute !important;
  }

  .md\:relative {
    position: relative !important;
  }

  .md\:top-full {
    top: 100% !important;
  }

  .md\:top-0 {
    top: 0 !important;
  }

  .md\:right-0 {
    right: 0 !important;
  }

  .md\:w-64 {
    width: 16rem !important;
  }

  .md\:shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  }

  .md\:z-50 {
    z-index: 50 !important;
  }

  .md\:bottom-auto {
    bottom: auto !important;
  }

  .md\:mt-2 {
    margin-top: 0.5rem !important;
  }

  .md\:rounded-b-lg {
    border-bottom-left-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
  }

  .md\:rounded-lg {
    border-radius: 0.5rem !important;
  }

  .md\:border {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #e5e7eb !important;
  }

  .md\:bg-white {
    background-color: #ffffff !important;
  }

  .md\:max-h-\[70vh\] {
    max-height: 70vh !important;
  }

  .md\:overflow-y-auto {
    overflow-y: auto !important;
  }

  .md\:overflow-visible {
    overflow: visible !important;
  }

  .md\:\!overflow-visible {
    overflow: visible !important;
  }

  .md\:p-2 {
    padding: 0.5rem !important;
  }

  .md\:p-0 {
    padding: 0 !important;
  }

  .md\:transform-none {
    transform: none !important;
  }

  .md\:translate-y-0 {
    transform: translateY(0) !important;
  }

  .md\:left-0 {
    left: 0 !important;
  }
}

/* --- Missing Utility Classes for Audit View --- */
.border-none {
  border: none !important;
}

.shadow-none {
  box-shadow: none !important;
}

.bg-white {
  background-color: white !important;
}

.inset-y-0 {
  top: 0;
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.pl-3 {
  padding-left: 0.75rem !important;
}

.pl-10 {
  padding-left: 2.5rem !important;
}

.pr-3 {
  padding-right: 0.75rem !important;
}

.pr-10 {
  padding-right: 2.5rem !important;
}

.leading-tight {
  line-height: 1.25;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

.-mx-2 {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.border-gray-200 {
  border-color: #e5e7eb !important;
}

.border-gray-300 {
  border-color: #d1d5db !important;
}

.border-orange-200 {
  border-color: #fed7aa !important;
}

.bg-orange-100 {
  background-color: #ffedd5 !important;
}

.pb-2 {
  padding-bottom: 0.5rem !important;
}

.text-orange-800 {
  color: #9a3412 !important;
}

.text-blue-700 {
  color: #1d4ed8 !important;
}

.text-gray-700 {
  color: #374151 !important;
}

.text-gray-800 {
  color: #1f2937 !important;
}

.rounded-xl {
  border-radius: 0.75rem !important;
}

/* Focus Ring Polyfill */
.focus\:ring-2:focus {
  box-shadow:
    0 0 0 2px var(--white),
    0 0 0 4px var(--secondary-color) !important;
}

.focus\:ring-blue-500:focus {
  --secondary-color: #3b82f6;
}

/* --- Accessibility Utils (Palette) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 2000;
  transition: top 0.2s;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--secondary-color);
}

/* --- ADMIN PANEL OFF-CANVAS (Mobile) --- */
@media (max-width: 767.98px) {
  .admin-tabs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background-color: var(--white);
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
  }

  .admin-tabs-sidebar.open {
    transform: translateX(0);
  }

  .admin-tabs-sidebar .tab-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    border-radius: 0;
    margin: 0;
    color: var(--text-color);
  }

  .admin-tabs-sidebar .tab-button.active {
    background-color: var(--light-color);
    color: var(--primary-color);
    border-left: 4px solid var(--secondary-color);
    border-bottom-color: var(--border-color);
  }

  .admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  .admin-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .admin-sidebar-header {
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-color);
  }
}

/* Modern Select Styles for Admin Sidebar */
.modern-select {
  appearance: none;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.modern-select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* SA RESPONSIVE UTILS */
@media (max-width: 767.98px) {
  .sa-layout {
    flex-direction: column;
  }

  .sa-content {
    padding-bottom: 80px;
    /* Space for bottom nav */
  }
}

/* OFF-CANVAS / BOTTOM SHEET FIXES FOR SUPERADMIN */
@media (max-width: 767.98px) {
  .sa-sidebar.hidden {
    display: none !important;
  }

  .sa-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: auto;
    max-height: 80vh;
    width: 100%;
    border-right: none;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
  }

  .sa-sidebar.open {
    transform: translateY(0);
  }

  .sa-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .sa-sidebar-overlay.open {
    display: block;
    opacity: 1;
  }

  .sa-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    bottom: env(safe-area-inset-bottom, 1rem);
    right: 1rem;
    z-index: 30;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
}

#product-table td[data-label="Producto"]::before {
  display: none !important;
}


/* Dark Mode Enhancements for Universal Buttons */
body.dark-mode .btn-ghost {
  color: #cbd5e1;
}

body.dark-mode .btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.dark-mode .btn-outline {
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #64748b;
  color: #ffffff;
}

body.dark-mode .btn-outline-primary {
  border-color: #3b82f6;
  color: #60a5fa;
}

body.dark-mode .btn-outline-primary:hover {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: #60a5fa;
}

body.dark-mode .btn-outline-warning {
  border-color: #f59e0b;
  color: #fbbf24;
}

body.dark-mode .btn-outline-warning:hover {
  background-color: rgba(245, 158, 11, 0.15);
}

body.dark-mode .btn-outline-danger {
  border-color: #ef4444;
  color: #f87171;
}

body.dark-mode .btn-outline-danger:hover {
  background-color: rgba(239, 68, 68, 0.15);
}

body.dark-mode .btn-outline-success {
  border-color: #22c55e;
  color: #4ade80;
}

body.dark-mode .btn-outline-success:hover {
  background-color: rgba(34, 197, 94, 0.15);
}

body.dark-mode .btn-tactile {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode .btn-tactile:hover {
  background-color: #334155;
  border-color: #475569;
  color: #ffffff;
}

body.dark-mode td .btn-ghost:hover,
body.dark-mode .table-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   DROPDOWN FLOTANTE Y FICHA CREDITICIA DE CLIENTES EN FACTURACIÓN
   ========================================================================== */
#customer-search-results {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18), 0 10px 10px rgba(0, 0, 0, 0.12);
  z-index: 70;
}

.customer-search-item {
  transition: background-color 0.15s ease-in-out;
  cursor: pointer;
}

.customer-search-item:hover,
.customer-search-item.active {
  background-color: #eff6ff;
}

body.dark-mode .customer-search-item:hover,
body.dark-mode .customer-search-item.active {
  background-color: rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   MOBILE SAFE AREA UTILITIES (iOS Notches & Android Gesture Bars)
   ========================================================================== */
.pb-safe-area {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px)) !important;
}

.pt-safe-area {
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px)) !important;
}

/* ==========================================================================
   PAGO MIXTO / DIVIDIDO Y FACTURACIÓN MÓVIL (ALTA LEGIBILIDAD Y CONSTRASTE)
   ========================================================================== */
.split-input-group {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  flex-shrink: 0 !important;
}

.split-input-wrapper {
  position: relative !important;
  width: 110px !important;
  min-width: 95px !important;
  max-width: 125px !important;
  flex-shrink: 0 !important;
}

@media (min-width: 640px) {
  .split-input-wrapper {
    width: 125px !important;
    min-width: 115px !important;
    max-width: 145px !important;
  }
}

.split-currency-symbol {
  position: absolute !important;
  left: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  pointer-events: none !important;
  z-index: 2 !important;
  user-select: none !important;
  line-height: 1 !important;
}

body.dark-mode .split-currency-symbol {
  color: #94a3b8 !important;
}

.split-amount-input {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 4px 6px 4px 28px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 16px !important;
  /* CRUCIAL: 16px en pantallas móviles previene el auto-zoom agresivo de iOS Safari y asegura legibilidad clara de los montos */
  font-weight: 700 !important;
  text-align: right !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  /* Texto negro-azulado visible siempre en modo claro */
  -webkit-text-fill-color: #0f172a !important;
  /* Previene inversión o transparencia en navegadores móviles con modo oscuro del sistema */
  caret-color: #2563eb !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

@media (min-width: 641px) {
  .split-amount-input {
    font-size: 13.5px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 3px 6px 3px 26px !important;
  }
}

/* Ocultar flechas / steppers nativos de WebKit y Firefox que tapan los números en móviles */
.split-amount-input::-webkit-outer-spin-button,
.split-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

.split-amount-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  background-color: #ffffff !important;
}

/* Soporte completo para Modo Oscuro en BodegaPro */
body.dark-mode .split-amount-input {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  border-color: #475569 !important;
  caret-color: #60a5fa !important;
}

body.dark-mode .split-amount-input:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3) !important;
  background-color: #0f172a !important;
}

/* Animación y feedback visual al completar con botón Max */
.split-amount-input.split-input-highlight {
  border-color: #2563eb !important;
  background-color: #dbeafe !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35) !important;
}

body.dark-mode .split-amount-input.split-input-highlight {
  border-color: #60a5fa !important;
  background-color: #1e3a8a !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.4) !important;
}

/* Estilo táctico del botón Max en Pago Mixto */
.split-max-btn {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.025em !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #bfdbfe !important;
  background-color: #eff6ff !important;
  color: #2563eb !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
  touch-action: manipulation !important;
  user-select: none !important;
}

.split-max-btn:active {
  transform: scale(0.95) !important;
  background-color: #dbeafe !important;
}

@media (min-width: 641px) {
  .split-max-btn {
    height: 34px !important;
    min-height: 34px !important;
  }
}

body.dark-mode .split-max-btn {
  background-color: rgba(30, 58, 138, 0.4) !important;
  border-color: #1e40af !important;
  color: #93c5fd !important;
}

body.dark-mode .split-max-btn:active {
  background-color: rgba(30, 58, 138, 0.7) !important;
}

/* Variación especial para Crédito (Fiado) */
.split-input-wrapper-credit .split-amount-input {
  border-color: #fcd34d !important;
}

.split-input-wrapper-credit .split-currency-symbol {
  color: #d97706 !important;
}

.split-max-btn-credit {
  background-color: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}

body.dark-mode .split-max-btn-credit {
  background-color: rgba(120, 53, 15, 0.4) !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

/* Clases de utilidad auxiliares */
.w-20 {
  width: 5rem !important;
}

.w-28 {
  width: 7rem !important;
}

.w-32 {
  width: 8rem !important;
}

.pl-4 {
  padding-left: 1rem !important;
}

.pl-5 {
  padding-left: 1.25rem !important;
}

.pl-6 {
  padding-left: 1.5rem !important;
}

.text-gray-900 {
  color: #0f172a !important;
}

.text-white {
  color: #ffffff !important;
}

/* ==========================================================================
   BODEGAPRO - DISEÑO PROFESIONAL PULIDO PARA DEPÓSITO & ALMACÉN
   ========================================================================== */

/* Sub-pestañas tácticas */
.deposito-tab-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.55rem 1rem !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  border-radius: 0.75rem 0.75rem 0 0 !important;
  border: 1px solid transparent !important;
  border-bottom: 2px solid transparent !important;
  background-color: transparent !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  white-space: nowrap !important;
}

.deposito-tab-pill:hover {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
}

.deposito-tab-pill.active-deposito {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border-bottom: 2px solid #2563eb !important;
}

.deposito-tab-pill.active-receive {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
  border-bottom: 2px solid #10b981 !important;
}

.deposito-tab-pill.active-transfers {
  background-color: #faf5ff !important;
  color: #6b21a8 !important;
  border-bottom: 2px solid #9333ea !important;
}

.deposito-tab-pill.active-history {
  background-color: #fffbeb !important;
  color: #b45309 !important;
  border-bottom: 2px solid #f59e0b !important;
}

/* Modo oscuro para sub-pestañas */
body.dark-mode .deposito-tab-pill {
  color: #94a3b8 !important;
}

body.dark-mode .deposito-tab-pill:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .deposito-tab-pill.active-deposito {
  background-color: rgba(30, 58, 138, 0.3) !important;
  color: #93c5fd !important;
  border-bottom-color: #3b82f6 !important;
}

body.dark-mode .deposito-tab-pill.active-receive {
  background-color: rgba(6, 78, 59, 0.3) !important;
  color: #6ee7b7 !important;
  border-bottom-color: #10b981 !important;
}

body.dark-mode .deposito-tab-pill.active-transfers {
  background-color: rgba(88, 28, 135, 0.3) !important;
  color: #d8b4fe !important;
  border-bottom-color: #a855f7 !important;
}

body.dark-mode .deposito-tab-pill.active-history {
  background-color: rgba(120, 53, 15, 0.3) !important;
  color: #fde68a !important;
  border-bottom-color: #f59e0b !important;
}

/* Tarjetas KPI de Depósito */
.deposito-kpi-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  padding: 0.85rem 1rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.deposito-kpi-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08) !important;
}

body.dark-mode .deposito-kpi-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Barra de Filtros y Búsqueda */
.deposito-toolbar-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  padding: 0.65rem 0.85rem !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04) !important;
}

body.dark-mode .deposito-toolbar-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.deposito-search-box {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  padding: 0.35rem 0.65rem !important;
  transition: all 0.15s ease !important;
}

.deposito-search-box input[type="text"],
.deposito-search-box input[type="search"] {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.2rem 0.25rem !important;
  margin: 0 !important;
  min-height: 28px !important;
  font-size: 0.8rem !important;
}

.deposito-search-box:focus-within {
  border-color: #2563eb !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

body.dark-mode .deposito-search-box {
  background: #0f172a !important;
  border-color: #475569 !important;
}

body.dark-mode .deposito-search-box:focus-within {
  border-color: #3b82f6 !important;
  background: #1e293b !important;
}

/* Píldoras de Filtro */
.deposito-filter-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.4rem 0.85rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.deposito-filter-pill.pill-inactive {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

.deposito-filter-pill.pill-inactive:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode .deposito-filter-pill.pill-inactive {
  background: #334155 !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

.deposito-filter-pill.pill-active-blue {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3) !important;
}

.deposito-filter-pill.pill-active-amber {
  background: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3) !important;
}

.deposito-filter-pill.pill-active-dark {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.3) !important;
}

body.dark-mode .deposito-filter-pill.pill-active-dark {
  background: #f8fafc !important;
  color: #0f172a !important;
}

/* Selectores y Botones de Barra */
.deposito-select {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  cursor: pointer !important;
  outline: none !important;
}

.deposito-select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}

body.dark-mode .deposito-select {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

.deposito-btn-action {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 0.75rem !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.deposito-btn-action:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

body.dark-mode .deposito-btn-action {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .deposito-btn-action:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* Tabla de Inventario de Depósito */
.deposito-table-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
}

body.dark-mode .deposito-table-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.deposito-table thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.75rem 0.85rem !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
}

body.dark-mode .deposito-table thead th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-bottom-color: #334155 !important;
}

.deposito-table tbody tr {
  transition: background-color 0.12s ease !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.deposito-table tbody tr:hover {
  background-color: #f0f7ff !important;
}

body.dark-mode .deposito-table tbody tr {
  border-bottom-color: #334155 !important;
}

body.dark-mode .deposito-table tbody tr:hover {
  background-color: rgba(30, 58, 138, 0.15) !important;
}

.deposito-table td {
  padding: 0.65rem 0.85rem !important;
  vertical-align: middle !important;
}

/* Badges de Existencia */
.badge-deposito {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.3rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  font-family: monospace !important;
  border-radius: 0.5rem !important;
  background: #eff6ff !important;
  color: #1e40af !important;
  border: 1px solid #bfdbfe !important;
}

body.dark-mode .badge-deposito {
  background: rgba(30, 58, 138, 0.4) !important;
  color: #bfdbfe !important;
  border-color: #1e40af !important;
}

.badge-piso-ok {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.3rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  font-family: monospace !important;
  border-radius: 0.5rem !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

body.dark-mode .badge-piso-ok {
  background: rgba(6, 78, 59, 0.4) !important;
  color: #6ee7b7 !important;
  border-color: #047857 !important;
}

.badge-piso-empty {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.3rem 0.75rem !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  font-family: monospace !important;
  border-radius: 0.5rem !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

body.dark-mode .badge-piso-empty {
  background: rgba(153, 27, 27, 0.4) !important;
  color: #fca5a5 !important;
  border-color: #991b1b !important;
}

/* ==========================================================================
   BODEGAPRO - SUB-PESTAÑAS DEPÓSITO & CONSOLA TRASPASOS DEPÓSITO ⇄ PISO
   Diseño responsive garantizado para PC (1366+), Tablet (768-1024) y Móvil (360+)
   ========================================================================== */

.deposito-view-root {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
}

.deposito-tabs-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  min-width: 0;
}

body.dark-mode .deposito-tabs-bar {
  border-bottom-color: #334155;
}

.deposito-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  border-radius: 0.75rem;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.deposito-tab-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.deposito-tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

body.dark-mode .deposito-tab-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-mode .deposito-tab-btn:hover {
  background: #334155;
  color: #f8fafc;
}

.deposito-tab-btn.is-active-deposito {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.deposito-tab-btn.is-active-receive {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.12);
}

.deposito-tab-btn.is-active-transfers {
  background: #f5f3ff;
  border-color: #7c3aed;
  color: #6d28d9;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.14);
}

.deposito-tab-btn.is-active-history {
  background: #fffbeb;
  border-color: #d97706;
  color: #b45309;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.12);
}

body.dark-mode .deposito-tab-btn.is-active-deposito {
  background: rgba(37, 99, 235, 0.22);
  border-color: #3b82f6;
  color: #93c5fd;
}

body.dark-mode .deposito-tab-btn.is-active-receive {
  background: rgba(5, 150, 105, 0.22);
  border-color: #10b981;
  color: #6ee7b7;
}

body.dark-mode .deposito-tab-btn.is-active-transfers {
  background: rgba(124, 58, 237, 0.24);
  border-color: #a78bfa;
  color: #ddd6fe;
}

body.dark-mode .deposito-tab-btn.is-active-history {
  background: rgba(217, 119, 6, 0.22);
  border-color: #f59e0b;
  color: #fde68a;
}

@media (min-width: 720px) {
  .deposito-tabs-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

@media (min-width: 1024px) {
  .deposito-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.6rem;
  }

  .deposito-tab-btn {
    min-height: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
  }
}

/* KPI Strip de Traspasos */
.deposito-transfers-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  min-width: 0;
}

.deposito-transfers-kpis .deposito-transfer-kpi-wide {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .deposito-transfers-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .deposito-transfers-kpis .deposito-transfer-kpi-wide {
    grid-column: auto;
  }
}

.deposito-transfer-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.deposito-transfer-kpi.kpi-alert {
  background: #fffbeb;
  border-color: #fcd34d;
}

body.dark-mode .deposito-transfer-kpi {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .deposito-transfer-kpi.kpi-alert {
  background: rgba(120, 53, 15, 0.25);
  border-color: #b45309;
}

/* Workspace Principal de Traspasos */
.deposito-transfers-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  min-width: 0;
  width: 100%;
}

@media (min-width: 1180px) {
  .deposito-transfers-workspace {
    grid-template-columns: minmax(345px, 395px) minmax(0, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 1280px) {
  .deposito-transfers-workspace {
    grid-template-columns: minmax(365px, 420px) minmax(0, 1fr);
    gap: 1.25rem;
  }
}

.deposito-transfer-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  scroll-margin-top: 110px;
}

body.dark-mode .deposito-transfer-panel {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .deposito-transfer-panel {
    padding: 1.15rem;
  }
}

/* Selector Segmentado de Dirección (Depósito ⇄ Piso) */
.transfer-direction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.transfer-dir-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 54px;
  padding: 0.5rem 0.55rem;
  border-radius: 0.85rem;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.transfer-dir-btn:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.transfer-dir-btn .dir-main {
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.transfer-dir-btn .dir-sub {
  font-size: 0.66rem;
  font-weight: 600;
  opacity: 0.8;
  line-height: 1.15;
}

.transfer-dir-btn.is-active-dep-to-piso {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1e40af;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.transfer-dir-btn.is-active-piso-to-dep {
  background: #f5f3ff;
  border-color: #7c3aed;
  color: #5b21b6;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.16);
}

body.dark-mode .transfer-dir-btn {
  background: #0f172a;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .transfer-dir-btn:hover {
  background: #1e293b;
  border-color: #64748b;
}

body.dark-mode .transfer-dir-btn.is-active-dep-to-piso {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3b82f6;
  color: #bfdbfe;
}

body.dark-mode .transfer-dir-btn.is-active-piso-to-dep {
  background: rgba(124, 58, 237, 0.28);
  border-color: #a78bfa;
  color: #ede9fe;
}

/* Stepper de Cantidad & Chips Rápidos */
.transfer-qty-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 0.45rem;
  align-items: stretch;
}

.transfer-stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.12s ease;
}

.transfer-stepper-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

body.dark-mode .transfer-stepper-btn {
  background: #0f172a;
  border-color: #475569;
  color: #f8fafc;
}

body.dark-mode .transfer-stepper-btn:hover {
  background: #334155;
}

.transfer-qty-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  padding: 0.4rem 0.5rem;
  outline: none;
}

.transfer-qty-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

body.dark-mode .transfer-qty-input {
  background: #0f172a;
  border-color: #475569;
  color: #ffffff;
}

.transfer-qty-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.transfer-qty-chip {
  min-height: 36px;
  padding: 0.35rem 0.3rem;
  border-radius: 0.65rem;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-qty-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.transfer-qty-chip.chip-accent {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #5b21b6;
}

.transfer-qty-chip.chip-accent:hover {
  background: #ddd6fe;
}

body.dark-mode .transfer-qty-chip {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .transfer-qty-chip:hover {
  background: #475569;
  color: #ffffff;
}

body.dark-mode .transfer-qty-chip.chip-accent {
  background: rgba(124, 58, 237, 0.28);
  border-color: #7c3aed;
  color: #ddd6fe;
}

/* Tarjeta de Producto Seleccionado + Previsualización de Saldo */
.transfer-selected-card {
  border-radius: 0.9rem;
  border: 1.5px solid #93c5fd;
  background: #eff6ff;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

body.dark-mode .transfer-selected-card {
  background: rgba(30, 58, 138, 0.25);
  border-color: #2563eb;
}

.transfer-stock-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.transfer-stock-box {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 0.7rem;
  padding: 0.45rem 0.55rem;
  text-align: center;
}

body.dark-mode .transfer-stock-box {
  background: #0f172a;
  border-color: #334155;
}

.transfer-preview-banner {
  border-radius: 0.65rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px dashed #93c5fd;
  color: #1e3a8a;
}

.transfer-preview-banner.is-invalid {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

body.dark-mode .transfer-preview-banner {
  background: rgba(15, 23, 42, 0.7);
  border-color: #3b82f6;
  color: #bfdbfe;
}

body.dark-mode .transfer-preview-banner.is-invalid {
  background: rgba(153, 27, 27, 0.35);
  border-color: #ef4444;
  color: #fecaca;
}

.transfer-execute-cta {
  width: 100%;
  min-height: 46px;
  border-radius: 0.85rem;
  border: none;
  background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.transfer-execute-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.36);
}

.transfer-execute-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Panel Derecho: Sugeridos de Reposición (Tabla PC/Tablet + Tarjetas Móvil) */
.transfer-suggestions-table-wrap {
  display: none;
}

.transfer-suggestions-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .transfer-suggestions-table-wrap {
    display: block;
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(62vh, 560px);
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
  }

  body.dark-mode .transfer-suggestions-table-wrap {
    border-color: #334155;
  }

  .transfer-suggestions-table-wrap .deposito-table th,
  .transfer-suggestions-table-wrap .deposito-table td {
    padding: 0.55rem 0.6rem !important;
  }

  .transfer-suggestions-cards {
    display: none;
  }
}

@media (min-width: 1280px) {

  .transfer-suggestions-table-wrap .deposito-table th,
  .transfer-suggestions-table-wrap .deposito-table td {
    padding: 0.65rem 0.85rem !important;
  }
}

.transfer-suggestion-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

body.dark-mode .transfer-suggestion-card {
  background: #0f172a;
  border-color: #334155;
}

.transfer-suggestion-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.transfer-suggestion-metric-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.4rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  font-size: 0.74rem;
}

body.dark-mode .transfer-suggestion-metric-box {
  background: #1e293b;
  border-color: #334155;
}

.transfer-suggestion-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.transfer-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: 0.7rem;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease;
}

.transfer-quick-btn:hover {
  background: #1d4ed8;
}

.transfer-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 36px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.7rem;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.transfer-edit-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

body.dark-mode .transfer-edit-btn {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .transfer-edit-btn:hover {
  background: #334155;
  color: #ffffff;
}

.transfer-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

body.dark-mode .transfer-search-dropdown {
  background: #0f172a;
  border-color: #475569;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   BODEGAPRO - DISEÑO PROFESIONAL PARA CIERRE DE CAJA & FINANZAS
   ========================================================================== */

/* Contenedor de Cabecera Limpia */
.cc-header-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  padding: 1.25rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

body.dark-mode .cc-header-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Badges de Cabecera */
.cc-badge-blue {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

body.dark-mode .cc-badge-blue {
  background: rgba(30, 58, 138, 0.35) !important;
  color: #93c5fd !important;
  border-color: #1e40af !important;
}

.cc-badge-emerald {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

body.dark-mode .cc-badge-emerald {
  background: rgba(6, 78, 59, 0.35) !important;
  color: #6ee7b7 !important;
  border-color: #065f46 !important;
}

.cc-badge-neutral {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}

body.dark-mode .cc-badge-neutral {
  background: #334155 !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

/* Tarjetas KPI Ejecutivas de Cierre de Caja */
.cc-kpi-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.85rem !important;
  padding: 0.85rem 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.cc-kpi-card:hover {
  background: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06) !important;
}

body.dark-mode .cc-kpi-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

.cc-kpi-sales {
  border-left: 4px solid #2563eb !important;
}

.cc-kpi-profit {
  border-left: 4px solid #10b981 !important;
}

.cc-kpi-expenses {
  border-left: 4px solid #f59e0b !important;
}

.cc-kpi-credit {
  border-left: 4px solid #06b6d4 !important;
}

.cc-kpi-liquid {
  border-left: 4px solid #7c3aed !important;
}

/* Paneles de Paso 1 y Paso 2 */
.cc-step-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem !important;
  padding: 1.25rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

body.dark-mode .cc-step-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.cc-step-number {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 9999px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

/* Cajas de Entrada de Conteo Físico */
.cc-channel-box {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 0.85rem !important;
  padding: 0.85rem 1rem !important;
  transition: border-color 0.15s ease !important;
}

.cc-channel-box:focus-within {
  border-color: #2563eb !important;
  background: #ffffff !important;
}

body.dark-mode .cc-channel-box {
  background: #0f172a !important;
  border-color: #334155 !important;
}

.cc-amount-input {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0.5rem 0.75rem 0.5rem 2.35rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.65rem !important;
}

.cc-amount-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

body.dark-mode .cc-amount-input {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

/* Banner de Estado del Cuadre (Exacta / Faltante / Sobrante) */
.cc-status-banner {
  border-radius: 1rem !important;
  padding: 1.25rem !important;
  text-align: center !important;
  border-width: 2px !important;
  border-style: solid !important;
  margin-bottom: 1rem !important;
  transition: all 0.2s ease !important;
}

.cc-status-exact {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

body.dark-mode .cc-status-exact {
  background: rgba(6, 78, 59, 0.35) !important;
  border-color: #059669 !important;
  color: #6ee7b7 !important;
}

.cc-status-shortage {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

body.dark-mode .cc-status-shortage {
  background: rgba(153, 27, 27, 0.35) !important;
  border-color: #dc2626 !important;
  color: #fca5a5 !important;
}

.cc-status-surplus {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1e40af !important;
}

body.dark-mode .cc-status-surplus {
  background: rgba(30, 58, 138, 0.35) !important;
  border-color: #2563eb !important;
  color: #93c5fd !important;
}

/* Badges de Métodos de Pago en Tabla */
.cc-method-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.65rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  border: 1px solid transparent !important;
}

.cc-method-usd {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}

.cc-method-bs {
  background: #f0fdfa !important;
  color: #0f766e !important;
  border-color: #99f6e4 !important;
}

.cc-method-pm {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.cc-method-bp {
  background: #faf5ff !important;
  color: #6b21a8 !important;
  border-color: #e9d5ff !important;
}

.cc-method-credit {
  background: #fffbeb !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

/* Dropdown de Impresión / Exportación */
.cc-export-dropdown {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  width: 270px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.85rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  padding: 0.5rem !important;
  z-index: 80 !important;
}

body.dark-mode .cc-export-dropdown {
  background: #1e293b !important;
  border-color: #475569 !important;
}

.cc-export-item {
  width: 100% !important;
  min-height: 40px !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 0.5rem !important;
  border: none !important;
  background: transparent !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  cursor: pointer !important;
  color: #1e293b !important;
  transition: background-color 0.15s ease !important;
}

.cc-export-item:hover {
  background: #f1f5f9 !important;
}

body.dark-mode .cc-export-item {
  color: #f1f5f9 !important;
}

body.dark-mode .cc-export-item:hover {
  background: #334155 !important;
}

/* Utilidades de color faltantes en todo el sistema */
.text-emerald-600 {
  color: #059669 !important;
}

.text-emerald-700 {
  color: #047857 !important;
}

.text-emerald-800 {
  color: #065f46 !important;
}

.text-amber-600 {
  color: #d97706 !important;
}

.text-amber-700 {
  color: #b45309 !important;
}

.text-amber-800 {
  color: #92400e !important;
}

.text-indigo-600 {
  color: #4f46e5 !important;
}

.text-indigo-700 {
  color: #4338ca !important;
}

.text-cyan-600 {
  color: #0891b2 !important;
}

.text-red-700 {
  color: #b91c1c !important;
}

.text-green-700 {
  color: #15803d !important;
}

.text-green-800 {
  color: #166534 !important;
}

.text-teal-700 {
  color: #0f766e !important;
}

.text-teal-800 {
  color: #115e59 !important;
}

.bg-emerald-50 {
  background-color: #ecfdf5 !important;
}

.bg-emerald-100 {
  background-color: #d1fae5 !important;
}

.bg-amber-50 {
  background-color: #fffbeb !important;
}

.bg-amber-100 {
  background-color: #fef3c7 !important;
}

.bg-red-50 {
  background-color: #fef2f2 !important;
}

.bg-red-100 {
  background-color: #fee2e2 !important;
}

.bg-green-50 {
  background-color: #f0fdf4 !important;
}

.bg-green-100 {
  background-color: #dcfce7 !important;
}

.bg-teal-50 {
  background-color: #f0fdfa !important;
}

.bg-teal-100 {
  background-color: #ccfbf1 !important;
}

.bg-indigo-50 {
  background-color: #eef2ff !important;
}

.bg-purple-50 {
  background-color: #faf5ff !important;
}

.bg-blue-600 {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

.bg-blue-700,
.bg-blue-600:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
}

.bg-emerald-600 {
  background-color: #059669 !important;
  color: #ffffff !important;
}

.bg-emerald-700,
.bg-emerald-600:hover {
  background-color: #047857 !important;
  color: #ffffff !important;
}

.bg-amber-600 {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

.bg-amber-700,
.bg-amber-600:hover {
  background-color: #b45309 !important;
  color: #ffffff !important;
}

.bg-teal-600 {
  background-color: #0d9488 !important;
  color: #ffffff !important;
}

.bg-teal-700,
.bg-teal-600:hover {
  background-color: #0f766e !important;
  color: #ffffff !important;
}

.bg-green-600 {
  background-color: #16a34a !important;
  color: #ffffff !important;
}

.bg-green-700,
.bg-green-600:hover {
  background-color: #15803d !important;
  color: #ffffff !important;
}

.bg-gray-700 {
  background-color: #334155 !important;
  color: #ffffff !important;
}

.bg-gray-700:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.bg-purple-700 {
  background-color: #7e22ce !important;
  color: #ffffff !important;
}

.border-emerald-200 {
  border-color: #a7f3d0 !important;
}

.border-amber-200 {
  border-color: #fde68a !important;
}

.border-red-200 {
  border-color: #fecaca !important;
}

.border-green-200 {
  border-color: #bbf7d0 !important;
}

.font-black {
  font-weight: 800 !important;
}

.font-extrabold {
  font-weight: 800 !important;
}

.rounded-2xl {
  border-radius: 1rem !important;
}

.rounded-3xl {
  border-radius: 1.25rem !important;
}

/* Botones compactos y enlaces tácticos dentro de Cierre de Caja */
.cc-btn-compact,
.deposito-filter-pill {
  min-height: 32px !important;
  height: auto !important;
}

.cc-inline-link {
  min-height: 24px !important;
  height: auto !important;
  padding: 0.15rem 0.5rem !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  color: #2563eb !important;
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 0.4rem !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 0.15s ease !important;
}

.cc-inline-link:hover {
  background: #dbeafe !important;
  color: #1e40af !important;
}

body.dark-mode .cc-inline-link {
  background: rgba(30, 58, 138, 0.35) !important;
  color: #93c5fd !important;
  border-color: #1e40af !important;
}

.cc-action-btn {
  min-height: 38px !important;
  height: auto !important;
  padding: 0.5rem 0.9rem !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  border-radius: 0.75rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  border: 1px solid transparent !important;
}

.cc-action-amber {
  background: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25) !important;
}

.cc-action-amber:hover {
  background: #b45309 !important;
}

.cc-action-slate {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

.cc-action-slate:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.dark-mode .cc-action-slate {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

.cc-action-blue {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25) !important;
}

.cc-action-blue:hover {
  background: #1d4ed8 !important;
}

.cc-action-emerald {
  background: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25) !important;
}

.cc-action-emerald:hover {
  background: #047857 !important;
}

.cc-action-teal {
  background: #0d9488 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.25) !important;
}

.cc-action-teal:hover {
  background: #0f766e !important;
}

.cc-action-whatsapp {
  background: #16a34a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25) !important;
}

.cc-action-whatsapp:hover {
  background: #15803d !important;
}

.cc-small-input {
  width: 100% !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0.4rem 0.65rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.6rem !important;
}

.cc-small-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

body.dark-mode .cc-small-input {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

/* Grids y layouts responsivos para Cierre de Caja */
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.gap-1\.5 {
  gap: 0.375rem !important;
}

.gap-2\.5 {
  gap: 0.625rem !important;
}

.col-span-2 {
  grid-column: span 2 / span 2 !important;
}

@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row !important;
  }

  .sm\:items-center {
    align-items: center !important;
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .sm\:col-span-1 {
    grid-column: span 1 / span 1 !important;
  }

  .sm\:col-span-3 {
    grid-column: span 3 / span 3 !important;
  }

  .sm\:col-span-4 {
    grid-column: span 4 / span 4 !important;
  }

  .sm\:col-span-5 {
    grid-column: span 5 / span 5 !important;
  }

  .sm\:col-span-7 {
    grid-column: span 7 / span 7 !important;
  }

  .sm\:w-64 {
    width: 16rem !important;
  }

  .sm\:w-auto {
    width: auto !important;
  }
}

@media (min-width: 1024px) {
  .lg\:flex-row {
    flex-direction: row !important;
  }

  .lg\:items-center {
    align-items: center !important;
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}




/* ========================================================================= */
/* 🏷️ ESTILOS DE ETIQUETAS Y CÓDIGOS DE BARRAS / QR (PRINT ENGINE)           */
/* ========================================================================= */
.bp-label {
  background: #ffffff;
  color: #000000 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
  line-height: 1.15;
}

.bp-label-50x30 {
  width: 50mm;
  height: 30mm;
  padding: 1.8mm 2mm;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bp-label-40x25 {
  width: 40mm;
  height: 25mm;
  padding: 1.2mm 1.5mm;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bp-label-gondola {
  width: 80mm;
  min-height: 38mm;
  padding: 3mm;
  border: 1px dashed #94a3b8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.lbl-store-name {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}

.lbl-prod-name {
  font-size: 11px;
  font-weight: 900;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.lbl-prod-name-sm {
  font-size: 9px;
  font-weight: 900;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lbl-prod-name-lg {
  font-size: 13px;
  font-weight: 900;
  color: #000000;
  line-height: 1.2;
  margin: 2px 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lbl-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1px 0;
}

.lbl-graphic svg {
  max-width: 100%;
}

.lbl-graphic-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5px 0;
}

.lbl-code-text {
  font-size: 8px;
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 1px;
  color: #334155;
}

.lbl-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 1px;
  border-top: 0.5px solid #cbd5e1;
  padding-top: 1px;
}

.lbl-price-row-sm {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.lbl-price-usd {
  font-size: 13px;
  font-weight: 900;
  color: #000000;
}

.lbl-price-bs {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
}

.lbl-gondola-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  border-bottom: 0.5px solid #cbd5e1;
  padding-bottom: 2px;
}

.lbl-gondola-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
}

.lbl-gondola-pricing {
  display: flex;
  flex-direction: column;
}

.lbl-gondola-usd {
  font-size: 20px;
  font-weight: 900;
  color: #000000;
  line-height: 1;
}

.lbl-gondola-bs {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  margin-top: 2px;
}

.lbl-gondola-code-box {
  text-align: right;
  flex-shrink: 0;
}

@media print {
  body.bp-printing-labels * {
    visibility: hidden !important;
  }

  body.bp-printing-labels #bp-label-print-sheet,
  body.bp-printing-labels #bp-label-print-sheet * {
    visibility: visible !important;
  }

  body.bp-printing-labels #bp-label-print-sheet {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
    gap: 0 !important;
  }

  body.bp-printing-labels .bp-label {
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* ==========================================================================
   BODEGAPRO LIVE COMMERCE STUDIO (ADMIN & SUPERADMIN ADVANCED STUDIO)
   ========================================================================== */

/* Dual-Pane Studio Layout */
.live-studio-root {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip !important;
}

.live-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
}

.live-studio-grid>* {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 1024px) {
  .live-studio-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
    align-items: start;
  }
}

/* Custom Pill Toggle (works deterministically without Tailwind peer compiler) */
.live-toggle-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.live-toggle-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.live-toggle-track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border-radius: 9999px;
  background-color: #d1d5db;
  transition: background-color 0.2s ease;
}

body.dark-mode .live-toggle-track {
  background-color: #374151;
}

.live-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.live-toggle-input:checked+.live-toggle-track {
  background-color: #db2777;
}

.live-toggle-input:checked+.live-toggle-track::after {
  transform: translateX(18px);
}

.live-toggle-input:focus-visible+.live-toggle-track {
  outline: 2px solid #ec4899;
  outline-offset: 2px;
}

/* Live Studio Responsive Mobile Tabs */
@media (max-width: 1023px) {
  .hidden-mobile-tab {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .hidden-mobile-tab {
    display: block !important;
  }
}

#live-studio-mobile-nav {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}

@media (max-width: 1023px) {
  #live-studio-mobile-nav {
    position: sticky;
    top: -0.9rem;
    z-index: 25;
    border: 1px solid rgba(148, 163, 184, 0.22);
  }
}

.live-modal-tab-btn {
  min-height: 34px;
  touch-action: manipulation;
  cursor: pointer;
  white-space: nowrap;
  flex: 1 1 auto;
  font-size: 11px;
  padding: 0.35rem 0.45rem;
}

/* Preset Pills */
.live-preset-pill {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.live-preset-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.25);
}

.live-preset-pill.is-active-preset {
  outline: 2px solid #db2777;
  outline-offset: 1px;
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.32);
}

/* Simulator Phone Mockup (9:16 Vertical & 16:9 Landscape) */
.live-phone-mockup {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 36px;
  background: #090d16;
  border: 7px solid #1e293b;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(236, 72, 153, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: aspect-ratio 0.25s ease, border-radius 0.25s ease, max-width 0.25s ease;
}

.live-phone-mockup.is-landscape {
  aspect-ratio: 16 / 10;
  max-width: 100%;
  border-radius: 18px;
  border-width: 5px;
}

.live-phone-mockup.is-landscape .live-sim-notch {
  display: none;
}

@media (max-width: 640px) {
  .live-phone-mockup {
    max-width: 290px;
    border-width: 5px;
    border-radius: 28px;
  }
}

.live-sim-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 12px;
  background: #1e293b;
  border-radius: 8px;
  z-index: 30;
}

.live-sim-screen {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 1.25rem 0.75rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  user-select: none;
  transition: background 0.3s ease;
}

/* Template Screen Backgrounds */
.live-sim-screen.bg-template-overlay {
  background-color: #0b1120;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 18px 18px;
}

.live-sim-screen.bg-template-showcase {
  background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 65%, #030712 100%);
}

.live-sim-screen.bg-template-chroma_green {
  background: #00FF00 !important;
}

.live-sim-screen.bg-template-minimal {
  background: #020617;
}

/* Typography Previews */
.font-impact-preview {
  font-family: 'Impact', 'Arial Black', sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
  text-shadow: 2px 2px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000, 0 4px 8px rgba(0, 0, 0, 0.9) !important;
}

.font-neon-preview {
  font-family: system-ui, -apple-system, sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  color: #00ffff !important;
  text-shadow: 0 0 5px #00ffff, 0 0 12px #00ffff, 0 0 20px #0284c7 !important;
}

.font-fire-preview {
  font-family: 'Impact', 'Arial Black', sans-serif !important;
  text-transform: uppercase !important;
  color: #fef08a !important;
  text-shadow: 0 0 4px #facc15, 0 -2px 6px #f97316, 0 -4px 12px #dc2626 !important;
}

.font-glass-preview {
  font-family: Georgia, serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(251, 191, 36, 0.7) !important;
}

/* Soundboard Button Grid & Hover */
.live-soundboard-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem;
  width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .live-soundboard-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
}

.live-sound-btn {
  transition: all 0.15s ease;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
}

.live-sound-btn:hover {
  transform: scale(1.03);
}

.live-sound-btn:active {
  transform: scale(0.97);
}

/* Sticky Modal Footer para Live Studio (Móvil, Tablet & Desktop sin recortes) */
.live-sim-orient-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: auto !important;
  min-width: auto !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  cursor: pointer;
  white-space: nowrap !important;
  opacity: 1 !important;
  transition: all 0.15s ease;
}

body.dark-mode .live-sim-orient-btn {
  border-color: #475569 !important;
  background: #1e293b !important;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
}

.live-sim-orient-btn.is-active-sim-mode {
  background: linear-gradient(135deg, #db2777, #4f46e5) !important;
  border-color: #ec4899 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.35);
}

.live-studio-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.65rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.live-studio-footer-primary-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
  max-width: 100%;
  min-width: 0;
}

.live-studio-footer-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.live-studio-launch-btn {
  background: linear-gradient(90deg, #db2777 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 800 !important;
  padding: 0.45rem 1rem !important;
  min-height: 38px !important;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.32) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.live-studio-launch-btn:hover {
  background: linear-gradient(90deg, #ec4899 0%, #6366f1 100%) !important;
  box-shadow: 0 6px 18px rgba(219, 39, 119, 0.42) !important;
}

@media (max-width: 767px) {
  .live-studio-footer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "toggles toggles"
      "launch launch"
      "guide close";
    gap: 0.5rem;
    width: 100%;
  }

  .live-studio-footer-primary-group {
    display: contents;
    margin-left: 0;
  }

  .live-studio-footer-toggles {
    grid-area: toggles;
    justify-content: center;
    width: 100%;
  }

  .modal-footer .live-studio-launch-btn {
    grid-area: launch;
    width: 100% !important;
    min-height: 44px !important;
    font-size: 0.9rem !important;
    white-space: normal !important;
  }

  .modal-footer .live-studio-guide-btn {
    grid-area: guide;
    width: 100% !important;
    min-height: 40px !important;
    font-size: 0.76rem !important;
    white-space: normal !important;
    line-height: 1.15;
    text-align: center;
    padding: 0.35rem 0.6rem !important;
  }

  .modal-footer .live-studio-close-btn {
    grid-area: close;
    width: auto !important;
    min-width: 78px;
    min-height: 40px !important;
    font-size: 0.82rem !important;
    padding: 0.35rem 0.85rem !important;
  }
}

/* Stream Deck Trigger Pill */
.live-deck-btn {
  transition: all 0.15s ease;
  user-select: none;
}

.live-deck-btn:hover {
  transform: translateY(-1px);
}

.live-deck-btn:active {
  transform: translateY(1px);
}

/* SuperAdmin Live Radar & Operación en Vivo Telemetry */
.sa-live-radar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.bg-rose-50 {
  background-color: #fff1f2;
}

.bg-rose-100 {
  background-color: #ffe4e6;
}

.bg-rose-600 {
  background-color: #e11d48;
  color: #ffffff;
}

.hover\:bg-rose-700:hover {
  background-color: #be123c;
  color: #ffffff;
}

.border-rose-200 {
  border-color: #fecdd3;
}

.text-rose-800 {
  color: #9f1239;
}

.text-rose-900 {
  color: #881337;
}

.bg-red-50\/40 {
  background-color: rgba(254, 242, 242, 0.45);
}

.bg-red-100 {
  background-color: #fee2e2;
}

.text-red-800 {
  color: #991b1b;
}

.hover\:bg-red-100:hover {
  background-color: #fee2e2;
}

.hover\:text-red-700:hover {
  color: #b91c1c;
}

.bg-amber-100 {
  background-color: #fef3c7;
}

.bg-amber-400 {
  background-color: #fbbf24;
}

.bg-amber-50\/30 {
  background-color: rgba(255, 251, 235, 0.4);
}

.text-amber-500 {
  color: #f59e0b;
}

.text-amber-800 {
  color: #92400e;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.hover\:bg-blue-700:hover {
  background-color: #1d4ed8;
}

.bg-emerald-400 {
  background-color: #34d399;
}

.bg-emerald-500 {
  background-color: #10b981;
}

.bg-indigo-50 {
  background-color: #eef2ff;
}

.bg-indigo-600 {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

.hover\:bg-indigo-100:hover {
  background-color: #e0e7ff;
}

.hover\:bg-indigo-700:hover {
  background-color: #4338ca !important;
  color: #ffffff !important;
}

.text-indigo-800 {
  color: #3730a3;
}

.border-indigo-200 {
  border-color: #c7d2fe;
}

.border-indigo-500 {
  border-color: #6366f1;
}

.border-purple-200 {
  border-color: #e9d5ff;
}

.hover\:bg-purple-100:hover {
  background-color: #f3e8ff;
}

.border-emerald-300 {
  border-color: #6ee7b7;
}

.border-emerald-500 {
  border-color: #10b981;
}

.border-emerald-600 {
  border-color: #059669;
}

.border-amber-300 {
  border-color: #fcd34d;
}

.border-amber-400 {
  border-color: #fbbf24;
}

.border-amber-500 {
  border-color: #f59e0b;
}

.border-blue-500 {
  border-color: #3b82f6;
}

.border-red-300 {
  border-color: #fca5a5;
}

.border-red-500 {
  border-color: #ef4444;
}

.border-l-4 {
  border-left-width: 4px;
  border-left-style: solid;
}

.border-b {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.border-t-transparent {
  border-top-color: transparent;
}

.divide-y> :not([hidden])~ :not([hidden]) {
  border-top-width: 1px;
  border-top-style: solid;
}

.divide-gray-100> :not([hidden])~ :not([hidden]) {
  border-color: #f3f4f6;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.hover\:bg-gray-200:hover {
  background-color: #e5e7eb;
}

.hover\:bg-gray-50:hover {
  background-color: #f9fafb;
}

.hover\:bg-slate-50\/70:hover {
  background-color: rgba(248, 250, 252, 0.7);
}

.bg-gray-50\/60 {
  background-color: rgba(249, 250, 251, 0.6);
}

.bg-gray-50\/70 {
  background-color: rgba(249, 250, 251, 0.7);
}

.bg-gray-50\/80 {
  background-color: rgba(249, 250, 251, 0.8);
}

.focus\:bg-white:focus {
  background-color: #ffffff;
}

.shadow-xs {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

.pointer-events-none {
  pointer-events: none;
}

.shrink-0 {
  flex-shrink: 0;
}

.ml-auto {
  margin-left: auto;
}

.pl-9 {
  padding-left: 2.25rem !important;
}

.px-1\.5 {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-2\.5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-3\.5 {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-3\.5 {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.p-2\.5 {
  padding: 0.625rem;
}

.p-3\.5 {
  padding: 0.875rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-12 {
  padding: 3rem;
}

.pt-1 {
  padding-top: 0.25rem;
}

.pt-3 {
  padding-top: 0.75rem;
}

.mb-0\.5 {
  margin-bottom: 0.125rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mt-0\.5 {
  margin-top: 0.125rem;
}

.mt-4 {
  margin-top: 1rem;
}

.gap-0\.5 {
  gap: 0.125rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2\.5 {
  gap: 0.625rem;
}

.space-y-2> :not([hidden])~ :not([hidden]) {
  margin-top: 0.5rem;
}

.space-y-3> :not([hidden])~ :not([hidden]) {
  margin-top: 0.75rem;
}

.space-y-5> :not([hidden])~ :not([hidden]) {
  margin-top: 1.25rem;
}

.w-2 {
  width: 0.5rem;
}

.h-2 {
  height: 0.5rem;
}

.w-3 {
  width: 0.75rem;
}

.h-3 {
  height: 0.75rem;
}

.w-7 {
  width: 1.75rem;
}

.h-7 {
  height: 1.75rem;
}

.w-9 {
  width: 2.25rem;
}

.h-9 {
  height: 2.25rem;
}

.w-fit {
  width: fit-content;
}

.inline-block {
  display: inline-block;
}

.items-start {
  align-items: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.text-left {
  text-align: left;
}

.leading-none {
  line-height: 1;
}

.leading-snug {
  line-height: 1.375;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.italic {
  font-style: italic;
}

.opacity-30 {
  opacity: 0.3;
}

.opacity-75 {
  opacity: 0.75;
}

.text-\[10px\] {
  font-size: 10px;
}

.text-\[11px\] {
  font-size: 11px;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-6xl {
  font-size: 3.75rem;
  line-height: 1;
}

.min-w-\[180px\] {
  min-width: 150px;
}

.max-w-\[230px\] {
  max-width: 220px;
}

.max-w-\[200px\] {
  max-width: 200px;
}

.max-w-\[140px\] {
  max-width: 140px;
}

.min-h-\[36px\] {
  min-height: 36px;
}

.min-h-\[40px\] {
  min-height: 40px;
}

.min-w-\[1000px\] {
  min-width: 960px;
}

.min-w-\[1050px\] {
  min-width: 960px;
}

.border-4 {
  border-width: 4px;
}

@keyframes ping {

  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-ping {
  animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sm\:col-span-1 {
    grid-column: span 1 / span 1;
  }

  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:items-center {
    align-items: center;
  }
}

@media (min-width: 768px) {
  .md\:block {
    display: block;
  }

  .md\:hidden {
    display: none;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .md\:col-span-3 {
    grid-column: span 3 / span 3;
  }

  .md\:col-span-4 {
    grid-column: span 4 / span 4;
  }

  .md\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .lg\:flex-row {
    flex-direction: row;
  }

  .lg\:items-center {
    align-items: center;
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Filter bars & tables inside SuperAdmin Operación en Vivo */
.sa-online-filters-grid,
.sa-history-filters-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.sa-online-filters-grid>*,
.sa-history-filters-grid>* {
  min-width: 0;
}

@media (min-width: 640px) and (max-width: 1279.98px) {

  .sa-online-filters-grid,
  .sa-history-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sa-online-filters-grid> :first-child,
  .sa-history-filters-grid> :first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1280px) {
  .sa-online-filters-grid {
    grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(110px, 1fr));
  }

  .sa-history-filters-grid {
    grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(125px, 1fr));
  }
}

.live-sim-screen.is-mobile-camera-preview {
  background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.25) 0%, #0f172a 55%, #020617 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.45);
}

/* ============================================================================
 * COMPLETE UTILITY, SWITCH, GRADIENT, RESPONSIVE & DARK MODE ENGINE
 * ============================================================================ */

/* --- 1. Screen-reader & Peer Toggle Switch Engine --- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 1px !important;
  max-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

label.relative>input.sr-only.peer {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  clip: auto !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}

.btn-xs {
  min-height: 28px !important;
}

.btn-sm {
  min-height: 32px !important;
}

input[type="checkbox"]:not(.sr-only),
input[type="radio"]:not(.sr-only) {
  min-height: 0 !important;
  min-width: 0 !important;
}

input.sr-only.peer+div.rounded-full {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

input.sr-only.peer+div.rounded-full::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

input.sr-only.peer+div.rounded-full.w-9.h-5::after,
input.sr-only.peer+div.rounded-full.w-10.h-5::after,
input.sr-only.peer+div.rounded-full[class*="after:h-4"]::after {
  width: 1rem;
  height: 1rem;
}

input.sr-only.peer:checked+div.rounded-full::after {
  transform: translateX(100%);
  border-color: #ffffff;
}

input.sr-only.peer:checked+div.rounded-full.w-10.h-5::after {
  transform: translateX(20px);
}

input.sr-only.peer:focus+div.rounded-full,
input.sr-only.peer:focus-visible+div.rounded-full {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

input.sr-only.peer:checked+div.rounded-full {
  background-color: #2563eb;
}

.peer:checked~.peer-checked\:bg-blue-600 {
  background-color: #2563eb !important;
}

.peer:checked~.peer-checked\:bg-emerald-600 {
  background-color: #059669 !important;
}

.peer:checked~.peer-checked\:bg-green-500 {
  background-color: #22c55e !important;
}

.peer:checked~.peer-checked\:bg-green-600 {
  background-color: #16a34a !important;
}

.peer:checked~.peer-checked\:bg-purple-600 {
  background-color: #9333ea !important;
}

.peer:checked~.peer-checked\:bg-amber-500 {
  background-color: #f59e0b !important;
}

.peer:checked~.peer-checked\:bg-red-600 {
  background-color: #dc2626 !important;
}

.peer:checked~.peer-checked\:bg-pink-600 {
  background-color: #db2777 !important;
}

.peer:checked~.peer-checked\:bg-indigo-600 {
  background-color: #4f46e5 !important;
}

/* Segmented radio pills using peer-checked (no toggle knob) */
.peer:checked~.peer-checked\:bg-white {
  background-color: #ffffff !important;
}

.peer:checked~.peer-checked\:text-primary {
  color: var(--primary-color) !important;
}

.peer:checked~.peer-checked\:shadow-sm {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* --- 2. Gradient Engine (Light, Hover & Dark Stops) --- */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops, var(--tw-gradient-from, transparent), var(--tw-gradient-to, transparent)));
}

.bg-gradient-to-l {
  background-image: linear-gradient(to left, var(--tw-gradient-stops, var(--tw-gradient-from, transparent), var(--tw-gradient-to, transparent)));
}

.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops, var(--tw-gradient-from, transparent), var(--tw-gradient-to, transparent)));
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops, var(--tw-gradient-from, transparent), var(--tw-gradient-to, transparent)));
}

.from-white {
  --tw-gradient-from: #ffffff;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0));
}

.from-gray-50 {
  --tw-gradient-from: #f9fafb;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0));
}

.from-slate-900 {
  --tw-gradient-from: #0f172a;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(15, 23, 42, 0));
}

.from-amber-50 {
  --tw-gradient-from: #fffbeb;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 251, 235, 0));
}

.from-amber-200 {
  --tw-gradient-from: #fde68a;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(253, 230, 138, 0));
}

.from-amber-500\/10 {
  --tw-gradient-from: rgba(245, 158, 11, 0.1);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-blue-50 {
  --tw-gradient-from: #eff6ff;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.from-blue-100 {
  --tw-gradient-from: #dbeafe;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(219, 234, 254, 0));
}

.from-blue-500 {
  --tw-gradient-from: #3b82f6;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0));
}

.from-blue-500\/10 {
  --tw-gradient-from: rgba(59, 130, 246, 0.1);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-emerald-50 {
  --tw-gradient-from: #ecfdf5;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(236, 253, 245, 0));
}

.from-emerald-50\/90 {
  --tw-gradient-from: rgba(236, 253, 245, 0.9);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-emerald-100 {
  --tw-gradient-from: #d1fae5;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(209, 250, 229, 0));
}

.from-emerald-500 {
  --tw-gradient-from: #10b981;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(16, 185, 129, 0));
}

.from-emerald-500\/10 {
  --tw-gradient-from: rgba(16, 185, 129, 0.1);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-indigo-50\/50 {
  --tw-gradient-from: rgba(238, 242, 255, 0.5);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-indigo-50\/70 {
  --tw-gradient-from: rgba(238, 242, 255, 0.7);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-pink-50 {
  --tw-gradient-from: #fdf2f8;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(253, 242, 248, 0));
}

.from-pink-500 {
  --tw-gradient-from: #ec4899;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(236, 72, 153, 0));
}

.from-pink-500\/10 {
  --tw-gradient-from: rgba(236, 72, 153, 0.1);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-pink-600 {
  --tw-gradient-from: #db2777;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(219, 39, 119, 0));
}

.from-purple-500\/10 {
  --tw-gradient-from: rgba(168, 85, 247, 0.1);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-purple-900 {
  --tw-gradient-from: #581c87;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(88, 28, 135, 0));
}

.from-purple-950 {
  --tw-gradient-from: #3b0764;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 7, 100, 0));
}

.from-sky-50 {
  --tw-gradient-from: #f0f9ff;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240, 249, 255, 0));
}

.from-black\/70 {
  --tw-gradient-from: rgba(0, 0, 0, 0.7);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.from-black\/80 {
  --tw-gradient-from: rgba(0, 0, 0, 0.8);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.via-white {
  --tw-gradient-stops: var(--tw-gradient-from), #ffffff, var(--tw-gradient-to, transparent);
}

.via-white\/80 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(255, 255, 255, 0.8), var(--tw-gradient-to, transparent);
}

.via-amber-300 {
  --tw-gradient-stops: var(--tw-gradient-from), #fcd34d, var(--tw-gradient-to, transparent);
}

.via-amber-500\/5 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(245, 158, 11, 0.05), var(--tw-gradient-to, transparent);
}

.via-blue-500\/5 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(59, 130, 246, 0.05), var(--tw-gradient-to, transparent);
}

.via-blue-950 {
  --tw-gradient-stops: var(--tw-gradient-from), #172554, var(--tw-gradient-to, transparent);
}

.via-emerald-500\/5 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(16, 185, 129, 0.05), var(--tw-gradient-to, transparent);
}

.via-fuchsia-950 {
  --tw-gradient-stops: var(--tw-gradient-from), #4a044e, var(--tw-gradient-to, transparent);
}

.via-indigo-600 {
  --tw-gradient-stops: var(--tw-gradient-from), #4f46e5, var(--tw-gradient-to, transparent);
}

.via-indigo-950 {
  --tw-gradient-stops: var(--tw-gradient-from), #1e1b4b, var(--tw-gradient-to, transparent);
}

.via-orange-500\/10 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(249, 115, 22, 0.1), var(--tw-gradient-to, transparent);
}

.via-pink-900 {
  --tw-gradient-stops: var(--tw-gradient-from), #831843, var(--tw-gradient-to, transparent);
}

.via-purple-500\/5 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(168, 85, 247, 0.05), var(--tw-gradient-to, transparent);
}

.via-purple-500\/10 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(168, 85, 247, 0.1), var(--tw-gradient-to, transparent);
}

.via-teal-50 {
  --tw-gradient-stops: var(--tw-gradient-from), #f0fdfa, var(--tw-gradient-to, transparent);
}

.via-teal-50\/60 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(240, 253, 250, 0.6), var(--tw-gradient-to, transparent);
}

.via-teal-500\/10 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(20, 184, 166, 0.1), var(--tw-gradient-to, transparent);
}

.via-yellow-50 {
  --tw-gradient-stops: var(--tw-gradient-from), #fefce8, var(--tw-gradient-to, transparent);
}

.via-black\/15 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.15), var(--tw-gradient-to, transparent);
}

.via-black\/30 {
  --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.3), var(--tw-gradient-to, transparent);
}

.to-transparent {
  --tw-gradient-to: transparent;
}

.to-white {
  --tw-gradient-to: #ffffff;
}

.to-amber-200 {
  --tw-gradient-to: #fde68a;
}

.to-amber-100 {
  --tw-gradient-to: #fef3c7;
}

.to-amber-100\/90 {
  --tw-gradient-to: rgba(254, 243, 199, 0.9);
}

.to-amber-400 {
  --tw-gradient-to: #fbbf24;
}

.to-blue-50 {
  --tw-gradient-to: #eff6ff;
}

.to-blue-50\/40 {
  --tw-gradient-to: rgba(239, 246, 255, 0.4);
}

.to-blue-100 {
  --tw-gradient-to: #dbeafe;
}

.to-blue-500\/10 {
  --tw-gradient-to: rgba(59, 130, 246, 0.1);
}

.to-indigo-50 {
  --tw-gradient-to: #eef2ff;
}

.to-indigo-500\/10 {
  --tw-gradient-to: rgba(99, 102, 241, 0.1);
}

.to-indigo-600 {
  --tw-gradient-to: #4f46e5;
}

.to-orange-50 {
  --tw-gradient-to: #fff7ed;
}

.to-pink-500\/10 {
  --tw-gradient-to: rgba(236, 72, 153, 0.1);
}

.to-purple-50 {
  --tw-gradient-to: #faf5ff;
}

.to-purple-50\/50 {
  --tw-gradient-to: rgba(250, 245, 255, 0.5);
}

.to-purple-600 {
  --tw-gradient-to: #9333ea;
}

.to-slate-900 {
  --tw-gradient-to: #0f172a;
}

.to-slate-950 {
  --tw-gradient-to: #020617;
}

.to-teal-50 {
  --tw-gradient-to: #f0fdfa;
}

.to-teal-100 {
  --tw-gradient-to: #ccfbf1;
}

.to-teal-500\/10 {
  --tw-gradient-to: rgba(20, 184, 166, 0.1);
}

.to-yellow-50 {
  --tw-gradient-to: #fefce8;
}

.hover\:from-amber-100:hover {
  --tw-gradient-from: #fef3c7;
}

.hover\:from-blue-200:hover {
  --tw-gradient-from: #bfdbfe;
}

.hover\:from-emerald-200:hover {
  --tw-gradient-from: #a7f3d0;
}

.hover\:from-pink-500:hover {
  --tw-gradient-from: #ec4899;
}

.hover\:to-amber-200:hover {
  --tw-gradient-to: #fde68a;
}

.hover\:to-blue-100:hover {
  --tw-gradient-to: #dbeafe;
}

.hover\:to-indigo-500:hover {
  --tw-gradient-to: #6366f1;
}

.hover\:to-teal-100:hover {
  --tw-gradient-to: #ccfbf1;
}

/* Explicit CTA gradient reliability */
#btn-header-live-studio {
  background: linear-gradient(135deg, #db2777 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

#btn-header-live-studio:hover {
  background: linear-gradient(135deg, #ec4899 0%, #6366f1 100%) !important;
  color: #ffffff !important;
}

/* --- 3. Missing Sizing, Spacing, Colors, Borders, Buttons & Utilities --- */
.cursor-pointer {
  cursor: pointer;
}

.cursor-help {
  cursor: help;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

.select-all {
  user-select: all;
}

.select-none {
  user-select: none;
}

.appearance-none {
  -webkit-appearance: none;
  appearance: none;
}

.outline-none {
  outline: none;
}

.break-all {
  word-break: break-all;
}

.break-words {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.underline {
  text-decoration: underline;
}

.list-disc {
  list-style-type: disc;
}

.list-inside {
  list-style-position: inside;
}

.leading-normal {
  line-height: 1.5;
}

.leading-relaxed {
  line-height: 1.625;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sticky {
  position: sticky;
}

.fixed {
  position: fixed;
}

.inset-0 {
  inset: 0;
}

.inset-x-0 {
  left: 0;
  right: 0;
}

.top-2 {
  top: 0.5rem;
}

.top-2\.5 {
  top: 0.625rem;
}

.top-3 {
  top: 0.75rem;
}

.top-4 {
  top: 1rem;
}

.bottom-0 {
  bottom: 0;
}

.bottom-2\.5 {
  bottom: 0.625rem;
}

.left-2\.5 {
  left: 0.625rem;
}

.left-3 {
  left: 0.75rem;
}

.right-2\.5 {
  right: 0.625rem;
}

.right-3 {
  right: 0.75rem;
}

.right-16 {
  right: 4rem;
}

.z-30 {
  z-index: 30;
}

.z-\[9998\] {
  z-index: 9998;
}

.z-\[9999\] {
  z-index: 9999;
}

.z-\[99998\] {
  z-index: 99998;
}

.z-\[99999\] {
  z-index: 99999;
}

.flex-none {
  flex: none;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-shrink {
  flex-shrink: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.items-baseline {
  align-items: baseline;
}

.self-start {
  align-self: flex-start;
}

.self-end {
  align-self: flex-end;
}

.order-1 {
  order: 1;
}

.order-2 {
  order: 2;
}

.order-3 {
  order: 3;
}

.order-last {
  order: 9999;
}

.col-span-full {
  grid-column: 1 / -1;
}

.col-span-1 {
  grid-column: span 1 / span 1;
}

.origin-right {
  transform-origin: right;
}

.origin-top {
  transform-origin: top;
}

.object-contain {
  object-fit: contain;
}

.object-cover {
  object-fit: cover;
}

.overflow-x-hidden {
  overflow-x: hidden;
}

.scroll-smooth {
  scroll-behavior: smooth;
}

.touch-pan-x {
  touch-action: pan-x;
}

.snap-x {
  scroll-snap-type: x mandatory;
}

.snap-center {
  scroll-snap-align: center;
}

.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.will-change-transform {
  will-change: transform;
}

.w-1\.5 {
  width: 0.375rem;
}

.h-1\.5 {
  height: 0.375rem;
}

.w-2\.5 {
  width: 0.625rem;
}

.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-9 {
  width: 2.25rem;
}

.h-5 {
  height: 1.25rem;
}

.w-10 {
  width: 2.5rem;
}

.h-10 {
  height: 2.5rem;
}

.w-11 {
  width: 2.75rem;
}

.h-6 {
  height: 1.5rem;
}

.w-12 {
  width: 3rem;
}

.w-24 {
  width: 6rem;
}

.w-56 {
  width: 14rem;
}

.w-auto {
  width: auto;
}

.w-1\/2 {
  width: 50%;
}

.w-1\/3 {
  width: 33.333333%;
}

.w-1\/4 {
  width: 25%;
}

.w-1\/6 {
  width: 16.666667%;
}

.w-3\/4 {
  width: 75%;
}

.max-w-xs {
  max-width: 20rem;
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-\[90px\] {
  max-width: 90px;
}

.max-w-\[120px\] {
  max-width: 120px;
}

.max-w-\[130px\] {
  max-width: 130px;
}

.max-w-\[140px\] {
  max-width: 140px;
}

.max-w-\[150px\] {
  max-width: 150px;
}

.max-w-\[155px\] {
  max-width: 155px;
}

.max-w-\[160px\] {
  max-width: 160px;
}

.max-w-\[180px\] {
  max-width: 180px;
}

.max-w-\[190px\] {
  max-width: 190px;
}

.max-w-\[200px\] {
  max-width: 200px;
}

.max-w-\[230px\] {
  max-width: 230px;
}

.max-w-\[260px\] {
  max-width: 260px;
}

.max-w-\[340px\] {
  max-width: 340px;
}

.max-w-\[1600px\] {
  max-width: 1600px;
}

.min-w-\[14px\] {
  min-width: 14px;
}

.min-w-\[28px\] {
  min-width: 28px;
}

.min-w-\[36px\] {
  min-width: 36px;
}

.min-w-\[38px\] {
  min-width: 38px;
}

.min-w-\[44px\] {
  min-width: 44px;
}

.min-w-\[70px\] {
  min-width: 70px;
}

.min-w-\[80px\] {
  min-width: 80px;
}

.min-w-\[105px\] {
  min-width: 105px;
}

.min-w-\[120px\] {
  min-width: 120px;
}

.min-w-\[140px\] {
  min-width: 140px;
}

.min-w-\[180px\] {
  min-width: 180px;
}

.min-w-\[220px\] {
  min-width: 220px;
}

.min-w-\[500px\] {
  min-width: 500px;
}

.min-w-\[650px\] {
  min-width: 650px;
}

.min-w-\[700px\] {
  min-width: 700px;
}

.min-w-\[760px\] {
  min-width: 760px;
}

.min-h-screen {
  min-height: 100vh;
}

.min-h-\[28px\] {
  min-height: 28px;
}

.min-h-\[32px\] {
  min-height: 32px;
}

.min-h-\[34px\] {
  min-height: 34px;
}

.min-h-\[36px\] {
  min-height: 36px;
}

.min-h-\[38px\] {
  min-height: 38px;
}

.min-h-\[40px\] {
  min-height: 40px;
}

.min-h-\[44px\] {
  min-height: 44px;
}

.min-h-\[46px\] {
  min-height: 46px;
}

.min-h-\[58px\] {
  min-height: 58px;
}

.min-h-\[350px\] {
  min-height: 350px;
}

.max-h-28 {
  max-height: 7rem;
}

.max-h-36 {
  max-height: 9rem;
}

.max-h-48 {
  max-height: 12rem;
}

.max-h-52 {
  max-height: 13rem;
}

.max-h-56 {
  max-height: 14rem;
}

.max-h-60 {
  max-height: 15rem;
}

.max-h-\[400px\] {
  max-height: 400px;
}

.max-h-\[500px\] {
  max-height: 500px;
}

.max-h-\[600px\] {
  max-height: 600px;
}

.max-h-\[60vh\] {
  max-height: 60vh;
}

.max-h-\[65vh\] {
  max-height: 65vh;
}

.max-h-\[72vh\] {
  max-height: 72vh;
}

.max-h-\[75vh\] {
  max-height: 75vh;
}

.max-h-\[80vh\] {
  max-height: 80vh;
}

.max-h-\[84vh\] {
  max-height: 84vh;
}

.p-0 {
  padding: 0;
}

.p-0\.5 {
  padding: 0.125rem;
}

.p-1\.5 {
  padding: 0.375rem;
}

.p-2\.5 {
  padding: 0.625rem;
}

.p-3\.5 {
  padding: 0.875rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-14 {
  padding: 3.5rem;
}

.px-1\.5 {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

.px-2\.5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

.px-3\.5 {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-0\.2 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-5 {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.pt-0\.5 {
  padding-top: 0.125rem;
}

.pt-2\.5 {
  padding-top: 0.625rem;
}

.pb-1 {
  padding-bottom: 0.25rem;
}

.pb-3 {
  padding-bottom: 0.75rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

.pb-5 {
  padding-bottom: 1.25rem;
}

.pb-16 {
  padding-bottom: 4rem;
}

.pb-20 {
  padding-bottom: 5rem;
}

.pb-\[15rem\] {
  padding-bottom: 15rem;
}

.pl-0\.5 {
  padding-left: 0.125rem;
}

.pl-2 {
  padding-left: 0.5rem;
}

.pl-2\.5 {
  padding-left: 0.625rem;
}

.pl-7 {
  padding-left: 1.75rem;
}

.pl-8 {
  padding-left: 2rem;
}

.pr-0\.5 {
  padding-right: 0.125rem;
}

.pr-2 {
  padding-right: 0.5rem;
}

.pr-4 {
  padding-right: 1rem;
}

.m-0 {
  margin: 0;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.my-1 {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.my-auto {
  margin-top: auto;
  margin-bottom: auto;
}

.mt-0\.5 {
  margin-top: 0.125rem;
}

.mt-1\.5 {
  margin-top: 0.375rem;
}

.mt-2\.5 {
  margin-top: 0.625rem;
}

.mt-auto {
  margin-top: auto;
}

.mb-0\.5 {
  margin-bottom: 0.125rem;
}

.mb-1\.5 {
  margin-bottom: 0.375rem;
}

.mb-2\.5 {
  margin-bottom: 0.625rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.ml-1 {
  margin-left: 0.25rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.ml-4 {
  margin-left: 1rem;
}

.mr-1 {
  margin-right: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mr-auto {
  margin-right: auto;
}

.ms-3 {
  margin-inline-start: 0.75rem;
}

.gap-0\.5 {
  gap: 0.125rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2\.5 {
  gap: 0.625rem;
}

.gap-3\.5 {
  gap: 0.875rem;
}

.gap-5 {
  gap: 1.25rem;
}

.space-y-0\.5>*+* {
  margin-top: 0.125rem;
}

.space-y-1>*+* {
  margin-top: 0.25rem;
}

.space-y-1\.5>*+* {
  margin-top: 0.375rem;
}

.space-y-2\.5>*+* {
  margin-top: 0.625rem;
}

.space-y-3\.5>*+* {
  margin-top: 0.875rem;
}

.-space-x-1\.5>*+* {
  margin-left: -0.375rem;
}

.text-\[7px\] {
  font-size: 7px;
}

.text-\[8px\] {
  font-size: 8px;
}

.text-\[9px\] {
  font-size: 9px;
}

.text-\[10px\] {
  font-size: 10px;
}

.text-\[11px\] {
  font-size: 11px;
}

.text-\[12px\] {
  font-size: 12px;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-black {
  color: #000000;
}

.text-white\/70 {
  color: rgba(255, 255, 255, 0.7);
}

.text-white\/80 {
  color: rgba(255, 255, 255, 0.8);
}

.text-white\/90 {
  color: rgba(255, 255, 255, 0.9);
}

.text-white\/95 {
  color: rgba(255, 255, 255, 0.95);
}

.text-gray-100 {
  color: #f3f4f6;
}

.text-gray-200 {
  color: #e5e7eb;
}

.text-gray-400\/80 {
  color: rgba(156, 163, 175, 0.8);
}

.text-slate-300 {
  color: #cbd5e1;
}

.text-slate-400 {
  color: #94a3b8;
}

.text-slate-700 {
  color: #334155;
}

.text-slate-800 {
  color: #1e293b;
}

.text-slate-950 {
  color: #020617;
}

.text-amber-200\/90 {
  color: rgba(253, 230, 138, 0.9);
}

.text-amber-300 {
  color: #fcd34d;
}

.text-amber-400 {
  color: #fbbf24;
}

.text-amber-500\/80 {
  color: rgba(245, 158, 11, 0.8);
}

.text-amber-900 {
  color: #78350f;
}

.text-amber-950 {
  color: #451a03;
}

.text-blue-300 {
  color: #93c5fd;
}

.text-blue-500 {
  color: #3b82f6;
}

.text-blue-700\/80 {
  color: rgba(29, 78, 216, 0.8);
}

.text-blue-800\/90 {
  color: rgba(30, 64, 175, 0.9);
}

.text-blue-900 {
  color: #1e3a8a;
}

.text-blue-950 {
  color: #172554;
}

.text-cyan-700 {
  color: #0e7490;
}

.text-emerald-50 {
  color: #ecfdf5;
}

.text-emerald-100 {
  color: #d1fae5;
}

.text-emerald-300\/90 {
  color: rgba(110, 231, 183, 0.9);
}

.text-emerald-400 {
  color: #34d399;
}

.text-emerald-500 {
  color: #10b981;
}

.text-emerald-700\/90 {
  color: rgba(4, 120, 87, 0.9);
}

.text-emerald-800\/80 {
  color: rgba(6, 95, 70, 0.8);
}

.text-emerald-900 {
  color: #064e3b;
}

.text-emerald-950 {
  color: #022c22;
}

.text-indigo-300 {
  color: #a5b4fc;
}

.text-indigo-900 {
  color: #312e81;
}

.text-indigo-950 {
  color: #1e1b4b;
}

.text-orange-500 {
  color: #f97316;
}

.text-pink-200 {
  color: #fbcfe8;
}

.text-pink-300 {
  color: #f9a8d4;
}

.text-pink-400 {
  color: #f472b6;
}

.text-pink-600 {
  color: #db2777;
}

.text-pink-800 {
  color: #9d174d;
}

.text-pink-900 {
  color: #831843;
}

.text-purple-200 {
  color: #e9d5ff;
}

.text-purple-300 {
  color: #d8b4fe;
}

.text-purple-400 {
  color: #c084fc;
}

.text-purple-500 {
  color: #a855f7;
}

.text-purple-500\/80 {
  color: rgba(168, 85, 247, 0.8);
}

.text-purple-800 {
  color: #6b21a8;
}

.text-purple-900 {
  color: #581c87;
}

.text-purple-950 {
  color: #3b0764;
}

.text-red-300 {
  color: #fca5a5;
}

.text-red-400 {
  color: #f87171;
}

.text-red-500\/80 {
  color: rgba(239, 68, 68, 0.8);
}

.text-red-900 {
  color: #7f1d1d;
}

.text-rose-700 {
  color: #be123c;
}

.text-rose-950 {
  color: #4c0519;
}

.text-sky-300 {
  color: #7dd3fc;
}

.text-sky-400 {
  color: #38bdf8;
}

.text-sky-600 {
  color: #0284c7;
}

.text-sky-700 {
  color: #0369a1;
}

.text-sky-800 {
  color: #075985;
}

.text-sky-900 {
  color: #0c4a6e;
}

.text-teal-600 {
  color: #0d9488;
}

.text-teal-900 {
  color: #134e4a;
}

.text-teal-950 {
  color: #042f2e;
}

.text-yellow-600 {
  color: #ca8a04;
}

.text-yellow-700 {
  color: #a16207;
}

.text-yellow-800 {
  color: #854d0e;
}

.bg-transparent {
  background-color: transparent;
}

.bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05);
}

.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1);
}

.bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.2);
}

.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8);
}

.bg-white\/90 {
  background-color: rgba(255, 255, 255, 0.9);
}

.bg-white\/95 {
  background-color: rgba(255, 255, 255, 0.95);
}

.bg-black\/15 {
  background-color: rgba(0, 0, 0, 0.15);
}

.bg-black\/20 {
  background-color: rgba(0, 0, 0, 0.2);
}

.bg-black\/40 {
  background-color: rgba(0, 0, 0, 0.4);
}

.bg-black\/50 {
  background-color: rgba(0, 0, 0, 0.5);
}

.bg-black\/60 {
  background-color: rgba(0, 0, 0, 0.6);
}

.bg-black\/65 {
  background-color: rgba(0, 0, 0, 0.65);
}

.bg-black\/70 {
  background-color: rgba(0, 0, 0, 0.7);
}

.bg-gray-50\/50 {
  background-color: rgba(249, 250, 251, 0.5);
}

.bg-gray-50\/60 {
  background-color: rgba(249, 250, 251, 0.6);
}

.bg-gray-50\/70 {
  background-color: rgba(249, 250, 251, 0.7);
}

.bg-gray-50\/80 {
  background-color: rgba(249, 250, 251, 0.8);
}

.bg-gray-200\/60 {
  background-color: rgba(229, 231, 235, 0.6);
}

.bg-gray-200\/70 {
  background-color: rgba(229, 231, 235, 0.7);
}

.bg-gray-400 {
  background-color: #9ca3af;
}

.bg-gray-900 {
  background-color: #111827;
}

.bg-gray-950 {
  background-color: #030712;
}

.bg-slate-50 {
  background-color: #f8fafc;
}

.bg-slate-50\/40 {
  background-color: rgba(248, 250, 252, 0.4);
}

.bg-slate-50\/80 {
  background-color: rgba(248, 250, 252, 0.8);
}

.bg-slate-100 {
  background-color: #f1f5f9;
}

.bg-slate-900 {
  background-color: #0f172a;
}

.bg-slate-900\/95 {
  background-color: rgba(15, 23, 42, 0.95);
}

.bg-amber-200 {
  background-color: #fde68a;
}

.bg-amber-50\/60 {
  background-color: rgba(255, 251, 235, 0.6);
}

.bg-amber-50\/70 {
  background-color: rgba(255, 251, 235, 0.7);
}

.bg-amber-50\/90 {
  background-color: rgba(255, 251, 235, 0.9);
}

.bg-amber-500 {
  background-color: #f59e0b;
}

.bg-blue-50\/50 {
  background-color: rgba(239, 246, 255, 0.5);
}

.bg-blue-50\/60 {
  background-color: rgba(239, 246, 255, 0.6);
}

.bg-blue-50\/70 {
  background-color: rgba(239, 246, 255, 0.7);
}

.bg-blue-100\/60 {
  background-color: rgba(219, 234, 254, 0.6);
}

.bg-blue-200 {
  background-color: #bfdbfe;
}

.bg-blue-200\/80 {
  background-color: rgba(191, 219, 254, 0.8);
}

.bg-blue-500 {
  background-color: #3b82f6;
}

.bg-blue-500\/20 {
  background-color: rgba(59, 130, 246, 0.2);
}

.bg-blue-600\/90 {
  background-color: rgba(37, 99, 235, 0.9);
}

.bg-cyan-50 {
  background-color: #ecfeff;
}

.bg-emerald-50\/40 {
  background-color: rgba(236, 253, 245, 0.4);
}

.bg-emerald-50\/50 {
  background-color: rgba(236, 253, 245, 0.5);
}

.bg-emerald-50\/60 {
  background-color: rgba(236, 253, 245, 0.6);
}

.bg-emerald-50\/70 {
  background-color: rgba(236, 253, 245, 0.7);
}

.bg-emerald-400\/30 {
  background-color: rgba(52, 211, 153, 0.3);
}

.bg-emerald-500\/20 {
  background-color: rgba(16, 185, 129, 0.2);
}

.bg-emerald-600\/90 {
  background-color: rgba(5, 150, 105, 0.9);
}

.bg-emerald-950 {
  background-color: #022c22;
}

.bg-green-500 {
  background-color: #22c55e;
}

.bg-indigo-50\/50 {
  background-color: rgba(238, 242, 255, 0.5);
}

.bg-indigo-50\/60 {
  background-color: rgba(238, 242, 255, 0.6);
}

.bg-indigo-50\/70 {
  background-color: rgba(238, 242, 255, 0.7);
}

.bg-indigo-100 {
  background-color: #e0e7ff;
}

.bg-indigo-500\/20 {
  background-color: rgba(99, 102, 241, 0.2);
}

.bg-pink-50 {
  background-color: #fdf2f8;
}

.bg-pink-500 {
  background-color: #ec4899;
}

.bg-pink-600 {
  background-color: #db2777;
}

.bg-purple-50\/50 {
  background-color: rgba(250, 245, 255, 0.5);
}

.bg-purple-50\/60 {
  background-color: rgba(250, 245, 255, 0.6);
}

.bg-purple-50\/70 {
  background-color: rgba(250, 245, 255, 0.7);
}

.bg-purple-100 {
  background-color: #f3e8ff;
}

.bg-purple-500 {
  background-color: #a855f7;
}

.bg-purple-600 {
  background-color: #9333ea;
}

.bg-purple-900\/80 {
  background-color: rgba(88, 28, 135, 0.8);
}

.bg-red-50\/60 {
  background-color: rgba(254, 242, 242, 0.6);
}

.bg-red-200 {
  background-color: #fecaca;
}

.bg-red-500 {
  background-color: #ef4444;
}

.bg-red-600 {
  background-color: #dc2626;
}

.bg-rose-50\/50 {
  background-color: rgba(255, 241, 242, 0.5);
}

.bg-sky-50 {
  background-color: #f0f9ff;
}

.bg-sky-500 {
  background-color: #0ea5e9;
}

.bg-teal-50\/50 {
  background-color: rgba(240, 253, 250, 0.5);
}

.bg-yellow-50 {
  background-color: #fefce8;
}

.bg-yellow-100 {
  background-color: #fef9c3;
}

.bg-yellow-600 {
  background-color: #ca8a04;
}

.border-2 {
  border-width: 2px;
  border-style: solid;
}

.border-3 {
  border-width: 3px;
  border-style: solid;
}

.border-b-2 {
  border-bottom-width: 2px;
  border-bottom-style: solid;
}

.border-x {
  border-left-width: 1px;
  border-right-width: 1px;
  border-style: solid;
}

.border-y {
  border-top-width: 1px;
  border-bottom-width: 1px;
  border-style: solid;
}

.border-dashed {
  border-style: dashed;
}

.border-collapse {
  border-collapse: collapse;
}

.border-transparent {
  border-color: transparent;
}

.border-primary {
  border-color: var(--primary-color);
}

.border-white {
  border-color: #ffffff;
}

.border-white\/10 {
  border-color: rgba(255, 255, 255, 0.1);
}

.border-white\/15 {
  border-color: rgba(255, 255, 255, 0.15);
}

.border-white\/20 {
  border-color: rgba(255, 255, 255, 0.2);
}

.border-white\/30 {
  border-color: rgba(255, 255, 255, 0.3);
}

.border-gray-50 {
  border-color: #f9fafb;
}

.border-gray-200\/60 {
  border-color: rgba(229, 231, 235, 0.6);
}

.border-gray-200\/80 {
  border-color: rgba(229, 231, 235, 0.8);
}

.border-gray-300\/50 {
  border-color: rgba(209, 213, 219, 0.5);
}

.border-gray-400 {
  border-color: #9ca3af;
}

.border-gray-800 {
  border-color: #1f2937;
}

.border-slate-100 {
  border-color: #f1f5f9;
}

.border-slate-200 {
  border-color: #e2e8f0;
}

.border-slate-200\/80 {
  border-color: rgba(226, 232, 240, 0.8);
}

.border-slate-300 {
  border-color: #cbd5e1;
}

.border-slate-800 {
  border-color: #1e293b;
}

.border-amber-100 {
  border-color: #fef3c7;
}

.border-blue-300 {
  border-color: #93c5fd;
}

.border-blue-400\/30 {
  border-color: rgba(96, 165, 250, 0.3);
}

.border-blue-400\/40 {
  border-color: rgba(96, 165, 250, 0.4);
}

.border-blue-700\/40 {
  border-color: rgba(29, 78, 216, 0.4);
}

.border-cyan-200 {
  border-color: #a5f3fc;
}

.border-emerald-100 {
  border-color: #d1fae5;
}

.border-emerald-300\/30 {
  border-color: rgba(110, 231, 183, 0.3);
}

.border-emerald-400 {
  border-color: #34d399;
}

.border-emerald-500\/40 {
  border-color: rgba(16, 185, 129, 0.4);
}

.border-emerald-800 {
  border-color: #065f46;
}

.border-green-100 {
  border-color: #dcfce7;
}

.border-green-500 {
  border-color: #22c55e;
}

.border-indigo-100 {
  border-color: #e0e7ff;
}

.border-indigo-300 {
  border-color: #a5b4fc;
}

.border-indigo-400\/30 {
  border-color: rgba(129, 140, 248, 0.3);
}

.border-indigo-600 {
  border-color: #4f46e5;
}

.border-indigo-800\/40 {
  border-color: rgba(55, 48, 163, 0.4);
}

.border-pink-100 {
  border-color: #fce7f3;
}

.border-pink-200 {
  border-color: #fbcfe8;
}

.border-pink-300 {
  border-color: #f9a8d4;
}

.border-pink-400 {
  border-color: #f472b6;
}

.border-purple-100 {
  border-color: #f3e8ff;
}

.border-purple-200\/60 {
  border-color: rgba(233, 213, 255, 0.6);
}

.border-purple-400\/30 {
  border-color: rgba(192, 132, 252, 0.3);
}

.border-purple-500 {
  border-color: #a855f7;
}

.border-purple-500\/40 {
  border-color: rgba(168, 85, 247, 0.4);
}

.border-rose-300 {
  border-color: #fda4af;
}

.border-sky-200 {
  border-color: #bae6fd;
}

.border-sky-200\/60 {
  border-color: rgba(186, 230, 253, 0.6);
}

.border-teal-200 {
  border-color: #99f6e4;
}

.border-teal-300 {
  border-color: #5eead4;
}

.border-yellow-200 {
  border-color: #fef08a;
}

.border-yellow-500 {
  border-color: #eab308;
}

.rounded-sm {
  border-radius: 0.125rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-t-xl {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.rounded-t-2xl {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.rounded-b-xl {
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

.shadow-2xs {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.shadow-inner {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.shadow-blue-500\/20 {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.backdrop-blur-xs {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.backdrop-blur-sm {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.backdrop-blur-md {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.transition-all {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-opacity {
  transition: opacity 0.2s ease;
}

.transition-shadow {
  transition: box-shadow 0.2s ease;
}

.transition-transform {
  transition: transform 0.2s ease;
}

.duration-300 {
  transition-duration: 300ms;
}

.duration-500 {
  transition-duration: 500ms;
}

.duration-700 {
  transition-duration: 700ms;
}

.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.transform {
  will-change: transform;
}

.scale-75 {
  transform: scale(0.75);
}

.scale-\[0\.65\] {
  transform: scale(0.65);
}

.hover\:scale-101:hover {
  transform: scale(1.01);
}

.hover\:scale-105:hover {
  transform: scale(1.05);
}

.active\:scale-95:active {
  transform: scale(0.95);
}

.active\:scale-98:active {
  transform: scale(0.98);
}

.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

.group:hover .group-hover\:opacity-40 {
  opacity: 0.4;
}

.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.opacity-0 {
  opacity: 0;
}

.opacity-20 {
  opacity: 0.2;
}

.opacity-40 {
  opacity: 0.4;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-80 {
  opacity: 0.8;
}

.opacity-90 {
  opacity: 0.9;
}

.opacity-100 {
  opacity: 1;
}

@keyframes bp-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes bp-bounce {

  0%,
  100% {
    transform: translateY(-18%);
  }

  50% {
    transform: translateY(0);
  }
}

@keyframes bp-scale-up {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-pulse {
  animation: bp-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
  animation: bp-bounce 1s infinite;
}

.animate-scale-up {
  animation: bp-scale-up 0.2s ease-out forwards;
}

.hover\:bg-white:hover {
  background-color: #ffffff;
}

.hover\:bg-gray-50:hover {
  background-color: #f9fafb;
}

.hover\:bg-gray-50\/80:hover {
  background-color: rgba(249, 250, 251, 0.8);
}

.hover\:bg-slate-50\/70:hover {
  background-color: rgba(248, 250, 252, 0.7);
}

.hover\:bg-slate-200:hover {
  background-color: #e2e8f0;
}

.hover\:bg-blue-50:hover {
  background-color: #eff6ff;
}

.hover\:bg-green-50:hover {
  background-color: #f0fdf4;
}

.hover\:bg-green-100:hover {
  background-color: #dcfce7;
}

.hover\:bg-green-600:hover {
  background-color: #16a34a;
}

.hover\:bg-green-700:hover {
  background-color: #15803d;
}

.hover\:bg-indigo-50:hover {
  background-color: #eef2ff;
}

.hover\:bg-indigo-100:hover {
  background-color: #e0e7ff;
}

.hover\:bg-indigo-500:hover {
  background-color: #6366f1;
}

.hover\:bg-indigo-700:hover {
  background-color: #4338ca;
}

.hover\:bg-orange-50:hover {
  background-color: #fff7ed;
}

.hover\:bg-pink-50:hover {
  background-color: #fdf2f8;
}

.hover\:bg-purple-50:hover {
  background-color: #faf5ff;
}

.hover\:bg-purple-100:hover {
  background-color: #f3e8ff;
}

.hover\:bg-purple-200:hover {
  background-color: #e9d5ff;
}

.hover\:bg-purple-700:hover {
  background-color: #7e22ce;
}

.hover\:bg-red-50:hover {
  background-color: #fef2f2;
}

.hover\:bg-red-100:hover {
  background-color: #fee2e2;
}

.hover\:bg-red-600:hover {
  background-color: #dc2626;
}

.hover\:bg-red-700:hover {
  background-color: #b91c1c;
}

.hover\:bg-rose-700:hover {
  background-color: #be123c;
}

.hover\:bg-sky-400:hover {
  background-color: #38bdf8;
}

.hover\:bg-teal-50:hover {
  background-color: #f0fdfa;
}

.hover\:bg-teal-100:hover {
  background-color: #ccfbf1;
}

.hover\:bg-yellow-50:hover {
  background-color: #fefce8;
}

.hover\:bg-yellow-100:hover {
  background-color: #fef9c3;
}

.hover\:bg-yellow-700:hover {
  background-color: #a16207;
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:text-white:hover {
  color: #ffffff;
}

.hover\:text-primary:hover {
  color: var(--primary-color);
}

.hover\:text-gray-600:hover {
  color: #4b5563;
}

.hover\:text-gray-700:hover {
  color: #374151;
}

.hover\:text-gray-900:hover {
  color: #111827;
}

.hover\:text-blue-600:hover {
  color: #2563eb;
}

.hover\:text-amber-800:hover {
  color: #92400e;
}

.hover\:text-indigo-800:hover {
  color: #3730a3;
}

.hover\:text-pink-600:hover {
  color: #db2777;
}

.hover\:text-purple-600:hover {
  color: #9333ea;
}

.hover\:text-red-500:hover {
  color: #ef4444;
}

.hover\:text-red-600:hover {
  color: #dc2626;
}

.hover\:text-red-700:hover {
  color: #b91c1c;
}

.hover\:border-primary:hover {
  border-color: var(--primary-color);
}

.hover\:border-amber-300:hover {
  border-color: #fcd34d;
}

.hover\:border-blue-300:hover {
  border-color: #93c5fd;
}

.hover\:border-blue-400:hover {
  border-color: #60a5fa;
}

.hover\:border-emerald-300:hover {
  border-color: #6ee7b7;
}

.hover\:border-indigo-500:hover {
  border-color: #6366f1;
}

.hover\:border-pink-300:hover {
  border-color: #f9a8d4;
}

.hover\:border-pink-400:hover {
  border-color: #f472b6;
}

.hover\:border-purple-300:hover {
  border-color: #d8b4fe;
}

.hover\:border-red-200:hover {
  border-color: #fecaca;
}

.focus\:outline-none:focus {
  outline: none;
}

.focus\:bg-white:focus {
  background-color: #ffffff;
}

.focus\:border-primary:focus {
  border-color: var(--primary-color);
}

.focus\:border-blue-500:focus {
  border-color: #3b82f6;
}

.focus\:ring-0:focus {
  box-shadow: none;
}

.focus\:ring-1:focus,
.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.focus\:ring-pink-500:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.25);
}

.focus\:ring-purple-500:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.focus\:ring-emerald-500:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.focus\:ring-amber-500:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.btn-outline-secondary {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-outline-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-error {
  background: #dc2626;
  color: #ffffff;
  border: 1px solid #b91c1c;
}

.btn-error:hover {
  background: #b91c1c;
}

/* Fixed square/pill proportions for header & sidebar toggle buttons */
#sa-sidebar-toggle-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
}

#sync-indicator,
#header-help-mode-btn,
#header-rate-status-badge {
  min-height: 26px;
  max-height: 34px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- 4. Responsive Breakpoint Engine (beats .hidden { display:none !important }) --- */
@media (min-width: 640px) {
  .sm\:hidden {
    display: none !important;
  }

  .sm\:inline {
    display: inline !important;
  }

  .sm\:inline-block {
    display: inline-block !important;
  }

  .sm\:flex {
    display: flex !important;
  }

  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:flex-nowrap {
    flex-wrap: nowrap;
  }

  .sm\:flex-grow {
    flex-grow: 1;
  }

  .sm\:flex-initial {
    flex: 0 1 auto;
  }

  .sm\:flex-none {
    flex: none;
  }

  .sm\:items-center {
    align-items: center;
  }

  .sm\:justify-start {
    justify-content: flex-start;
  }

  .sm\:self-auto {
    align-self: auto;
  }

  .sm\:self-center {
    align-self: center;
  }

  .sm\:ml-auto {
    margin-left: auto;
  }

  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sm\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sm\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .sm\:col-span-1 {
    grid-column: span 1 / span 1;
  }

  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .sm\:col-span-3 {
    grid-column: span 3 / span 3;
  }

  .sm\:col-span-4 {
    grid-column: span 4 / span 4;
  }

  .sm\:col-span-6 {
    grid-column: span 6 / span 6;
  }

  .sm\:gap-2 {
    gap: 0.5rem;
  }

  .sm\:gap-3 {
    gap: 0.75rem;
  }

  .sm\:p-3 {
    padding: 0.75rem;
  }

  .sm\:p-4 {
    padding: 1rem;
  }

  .sm\:px-2\.5 {
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }

  .sm\:px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .sm\:py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
  }

  .sm\:mr-2 {
    margin-right: 0.5rem;
  }

  .sm\:w-auto {
    width: auto;
  }

  .sm\:w-24 {
    width: 6rem;
  }

  .sm\:w-48 {
    width: 12rem;
  }

  .sm\:w-56 {
    width: 14rem;
  }

  .sm\:w-60 {
    width: 15rem;
  }

  .sm\:text-\[10px\] {
    font-size: 10px;
  }

  .sm\:text-xs {
    font-size: 0.75rem;
  }

  .sm\:text-sm {
    font-size: 0.875rem;
  }

  .sm\:text-base {
    font-size: 1rem;
  }

  .sm\:text-2xl {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .unified-header {
    flex-wrap: wrap !important;
    gap: 0.45rem 0.85rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
  }

  .unified-header .header-left {
    flex: 0 1 auto !important;
    overflow: visible !important;
    max-width: 100%;
  }

  .unified-header .header-rates-container {
    flex: 0 1 auto !important;
  }

  .unified-header .header-right {
    flex: 1 1 auto !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
  }

  .unified-header .user-controls {
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }

  #app-header button,
  #app-header select {
    min-height: 0 !important;
  }

  #main-menu {
    max-width: 100%;
  }

  #main-menu ul,
  #main-menu>div,
  #main-menu>nav {
    flex-wrap: wrap !important;
    row-gap: 0.35rem;
    column-gap: 0.2rem;
    max-width: 100%;
  }

  #main-menu .nav-pill {
    padding: 0.32rem 0.5rem !important;
    font-size: 0.78rem !important;
    gap: 0.28rem !important;
    white-space: nowrap !important;
    min-height: 0 !important;
  }

  .md\:hidden {
    display: none !important;
  }

  .md\:block {
    display: block !important;
  }

  .md\:inline {
    display: inline !important;
  }

  .md\:inline-block {
    display: inline-block !important;
  }

  .md\:flex {
    display: flex !important;
  }

  .md\:table {
    display: table !important;
  }

  .md\:table-header-group {
    display: table-header-group !important;
  }

  .md\:table-row-group {
    display: table-row-group !important;
  }

  .md\:table-row {
    display: table-row !important;
  }

  .md\:table-cell {
    display: table-cell !important;
  }

  .md\:static {
    position: static;
  }

  .md\:relative {
    position: relative;
  }

  .md\:absolute {
    position: absolute;
  }

  .md\:right-0 {
    right: 0;
  }

  .md\:top-full {
    top: 100%;
  }

  .md\:left-auto {
    left: auto;
  }

  .md\:bottom-auto {
    bottom: auto;
  }

  .md\:transform-none {
    transform: none;
  }

  .md\:translate-y-0 {
    transform: translateY(0);
  }

  .md\:origin-top-right {
    transform-origin: top right;
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:flex-1 {
    flex: 1 1 0%;
  }

  .md\:flex-none {
    flex: none;
  }

  .md\:flex-grow-0 {
    flex-grow: 0;
  }

  .md\:flex-shrink {
    flex-shrink: 1;
  }

  .md\:flex-shrink-0 {
    flex-shrink: 0;
  }

  .md\:flex-wrap {
    flex-wrap: wrap;
  }

  .md\:flex-nowrap {
    flex-wrap: nowrap;
  }

  .md\:items-center {
    align-items: center;
  }

  .md\:justify-center {
    justify-content: center;
  }

  .md\:justify-start {
    justify-content: flex-start;
  }

  .md\:justify-end {
    justify-content: flex-end;
  }

  .md\:justify-between {
    justify-content: space-between;
  }

  .md\:self-auto {
    align-self: auto;
  }

  .md\:order-2 {
    order: 2;
  }

  .md\:order-3 {
    order: 3;
  }

  .md\:order-none {
    order: 0;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .md\:col-span-1 {
    grid-column: span 1 / span 1;
  }

  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .md\:col-span-4 {
    grid-column: span 4 / span 4;
  }

  .md\:gap-2 {
    gap: 0.5rem;
  }

  .md\:gap-3 {
    gap: 0.75rem;
  }

  .md\:gap-4 {
    gap: 1rem;
  }

  .md\:space-y-2>*+* {
    margin-top: 0.5rem;
  }

  .md\:p-0 {
    padding: 0;
  }

  .md\:p-2 {
    padding: 0.5rem;
  }

  .md\:p-3 {
    padding: 0.75rem;
  }

  .md\:p-4 {
    padding: 1rem;
  }

  .md\:p-5 {
    padding: 1.25rem;
  }

  .md\:p-6 {
    padding: 1.5rem;
  }

  .md\:px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .md\:px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .md\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .md\:py-0 {
    padding-top: 0;
    padding-bottom: 0;
  }

  .md\:py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .md\:pt-0 {
    padding-top: 0;
  }

  .md\:pb-0 {
    padding-bottom: 0;
  }

  .md\:pr-2 {
    padding-right: 0.5rem;
  }

  .md\:mt-0 {
    margin-top: 0;
  }

  .md\:mt-2 {
    margin-top: 0.5rem;
  }

  .md\:mb-0 {
    margin-bottom: 0;
  }

  .md\:mr-0 {
    margin-right: 0;
  }

  .md\:w-auto {
    width: auto;
  }

  .md\:w-8 {
    width: 2rem;
  }

  .md\:h-8 {
    height: 2rem;
  }

  .md\:w-20 {
    width: 5rem;
  }

  .md\:w-32 {
    width: 8rem;
  }

  .md\:w-64 {
    width: 16rem;
  }

  .md\:w-72 {
    width: 18rem;
  }

  .md\:w-96 {
    width: 24rem;
  }

  .md\:w-1\/3 {
    width: 33.333333%;
  }

  .md\:w-1\/4 {
    width: 25%;
  }

  .md\:w-1\/6 {
    width: 16.666667%;
  }

  .md\:min-w-0 {
    min-width: 0;
  }

  .md\:min-w-\[220px\] {
    min-width: 220px;
  }

  .md\:min-w-\[700px\] {
    min-width: 700px;
  }

  .md\:min-h-0 {
    min-height: 0;
  }

  .md\:max-w-none {
    max-width: none;
  }

  .md\:max-w-\[120px\] {
    max-width: 120px;
  }

  .md\:max-w-\[150px\] {
    max-width: 150px;
  }

  .md\:max-h-\[70vh\] {
    max-height: 70vh;
  }

  .md\:bg-white {
    background-color: #ffffff;
  }

  .md\:bg-transparent {
    background-color: transparent;
  }

  .md\:border {
    border: 1px solid #e2e8f0;
  }

  .md\:border-none {
    border: none;
  }

  .md\:border-t-0 {
    border-top-width: 0;
  }

  .md\:border-gray-100 {
    border-color: #f3f4f6;
  }

  .md\:rounded-lg {
    border-radius: 0.5rem;
  }

  .md\:rounded-none {
    border-radius: 0;
  }

  .md\:shadow-none {
    box-shadow: none;
  }

  .md\:shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .md\:overflow-visible {
    overflow: visible;
  }

  .md\:overflow-y-auto {
    overflow-y: auto;
  }

  .md\:whitespace-normal {
    white-space: normal;
  }

  .md\:text-left {
    text-align: left;
  }

  .md\:text-right {
    text-align: right;
  }

  .md\:text-\[10px\] {
    font-size: 10px;
  }

  .md\:text-xs {
    font-size: 0.75rem;
  }

  .md\:text-sm {
    font-size: 0.875rem;
  }

  .md\:text-base {
    font-size: 1rem;
  }

  .md\:text-xl {
    font-size: 1.25rem;
  }

  .md\:text-3xl {
    font-size: 1.875rem;
  }

  .md\:scale-90 {
    transform: scale(0.9);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  main.app-main-content {
    padding: 0.5rem !important;
  }

  .sa-layout {
    gap: 0.5rem !important;
  }

  .sa-main-content {
    padding: 0.85rem !important;
  }
}

@media (min-width: 1024px) {
  .lg\:hidden {
    display: none !important;
  }

  .lg\:inline {
    display: inline !important;
  }

  .lg\:flex-row {
    flex-direction: row;
  }

  .lg\:items-center {
    align-items: center;
  }

  .lg\:justify-start {
    justify-content: flex-start;
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lg\:grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .lg\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .lg\:col-span-1 {
    grid-column: span 1 / span 1;
  }

  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .lg\:col-span-5 {
    grid-column: span 5 / span 5;
  }

  .lg\:col-span-7 {
    grid-column: span 7 / span 7;
  }

  .lg\:w-64 {
    width: 16rem;
  }

  .lg\:w-auto {
    width: auto;
  }

  .lg\:max-w-full {
    max-width: 100%;
  }

  .lg\:p-4 {
    padding: 1rem;
  }

  .lg\:px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .lg\:py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .lg\:text-xl {
    font-size: 1.25rem;
  }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .xl\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* --- 5. Mobile (< 768px) Viewport & Overflow Prevention --- */
html,
body {
  overflow-x: clip !important;
  max-width: 100vw !important;
}

#app-root,
main.app-main-content,
.sa-layout,
.sa-main-content,
#sa-tab-content,
#sa-content-area,
#superadmin-dashboard-view,
#sa-mobile-top-bar {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: clip !important;
}

@media (max-width: 767px) {
  .header-container {
    flex-wrap: wrap !important;
    gap: 0.2rem !important;
    padding: 0.3rem 0.45rem !important;
    max-width: 100% !important;
  }

  .header-right {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    max-width: 58% !important;
    gap: 0.2rem !important;
    margin-left: auto;
  }

  .header-right.w-full {
    max-width: 100% !important;
    width: 100% !important;
    justify-content: space-between !important;
  }

  .header-right .user-controls {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 0.2rem !important;
    max-width: 100% !important;
  }

  .header-right.w-full .user-controls {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .header-right button,
  .header-right a {
    max-width: 100%;
  }

  #btn-header-fullscreen {
    display: none !important;
  }

  .sa-main-content {
    padding: 0.65rem !important;
  }

  .sa-main-content .card,
  .app-main-content .card {
    max-width: 100%;
    min-width: 0;
  }

  /* Barra superior móvil SuperAdmin compacta de una fila + accesos directos */
  #sa-mobile-top-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    max-width: 100% !important;
  }

  #sa-mobile-nav-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
  }

  .sa-mobile-pill,
  .sa-mobile-pill.sa-nav-item,
  #sa-mobile-resources-btn {
    min-height: 38px !important;
    padding: 0.375rem 0.625rem !important;
    font-size: 11px !important;
    width: auto !important;
    white-space: nowrap !important;
    border-radius: 0.75rem !important;
  }

  /* Contención total de tarjetas, submenús, formularios y botones en < 768px */
  :where(#sa-content-area [class*="grid"] > *, #sa-content-area .flex:not(.overflow-x-auto) > *) {
    min-width: 0;
  }

  #sa-content-area .flex.overflow-x-auto>* {
    min-width: auto !important;
    flex-shrink: 0 !important;
  }

  #sa-content-area .card,
  #sa-content-area .sa-section-header,
  #sa-content-area form,
  #sa-content-area input:not([type="checkbox"]):not([type="radio"]),
  #sa-content-area select,
  #sa-content-area textarea {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #sa-content-area .card>.p-5,
  #sa-content-area .card>.p-6 {
    padding: 0.875rem !important;
  }

  #sa-content-area .btn-xs,
  #sa-content-area .btn-sm,
  #sa-online-subtabs button,
  #sa-ads-channel-pills .sa-ad-pill,
  #sa-content-area .audit-tab-btn {
    min-height: 36px !important;
  }

  #sa-content-area .btn-xs,
  #sa-content-area .btn-sm {
    min-width: 36px !important;
  }

  #sa-online-subtabs,
  #sa-ads-channel-pills {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .modal-footer {
    flex-wrap: wrap !important;
  }
}

/* --- 6. Comprehensive Dark Mode Engine (body.dark-mode + dark:* utilities) --- */
body.dark-mode {
  background-color: #0b1120 !important;
  color: #e2e8f0 !important;
}

body.dark-mode #app-header {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-mode .text-gray-900,
body.dark-mode .text-slate-900,
body.dark-mode .text-slate-950 {
  color: #f8fafc !important;
}

body.dark-mode .text-gray-800,
body.dark-mode .text-slate-800 {
  color: #f1f5f9 !important;
}

body.dark-mode .text-gray-700,
body.dark-mode .text-slate-700 {
  color: #cbd5e1 !important;
}

body.dark-mode .text-gray-600 {
  color: #94a3b8 !important;
}

body.dark-mode .text-gray-500 {
  color: #94a3b8 !important;
}

body.dark-mode .bg-white,
body.dark-mode .md\:bg-white {
  background-color: #1e293b !important;
  color: #e2e8f0;
}

body.dark-mode .bg-gray-50,
body.dark-mode .bg-slate-50,
body.dark-mode .bg-slate-100 {
  background-color: #131c31 !important;
}

body.dark-mode .bg-gray-100,
body.dark-mode .bg-gray-200 {
  background-color: #1e293b !important;
}

body.dark-mode .bg-gray-300 {
  background-color: #334155 !important;
}

/* Dark mode pastel containers & section headers */
body.dark-mode .bg-blue-50,
body.dark-mode .bg-blue-50\/50,
body.dark-mode .bg-blue-50\/60,
body.dark-mode .bg-blue-50\/70 {
  background-color: rgba(30, 58, 138, 0.25) !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
}

body.dark-mode .bg-red-50,
body.dark-mode .bg-red-50\/60 {
  background-color: rgba(127, 29, 29, 0.26) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

body.dark-mode .bg-green-50,
body.dark-mode .bg-emerald-50,
body.dark-mode .bg-emerald-50\/40,
body.dark-mode .bg-emerald-50\/50,
body.dark-mode .bg-emerald-50\/60,
body.dark-mode .bg-emerald-50\/70 {
  background-color: rgba(6, 78, 59, 0.28) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

body.dark-mode .bg-amber-50,
body.dark-mode .bg-amber-50\/60,
body.dark-mode .bg-amber-50\/70,
body.dark-mode .bg-yellow-50 {
  background-color: rgba(120, 53, 15, 0.28) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

body.dark-mode .bg-purple-50,
body.dark-mode .bg-purple-50\/50,
body.dark-mode .bg-purple-50\/60,
body.dark-mode .bg-purple-50\/70 {
  background-color: rgba(88, 28, 135, 0.28) !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
}

body.dark-mode .bg-indigo-50,
body.dark-mode .bg-indigo-50\/50,
body.dark-mode .bg-indigo-50\/60,
body.dark-mode .bg-indigo-50\/70 {
  background-color: rgba(49, 46, 129, 0.28) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
}

body.dark-mode .bg-pink-50 {
  background-color: rgba(131, 24, 67, 0.26) !important;
  border-color: rgba(236, 72, 153, 0.35) !important;
}

body.dark-mode .bg-sky-50,
body.dark-mode .bg-cyan-50 {
  background-color: rgba(12, 74, 110, 0.28) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

body.dark-mode .text-blue-800,
body.dark-mode .text-blue-900,
body.dark-mode .text-blue-950 {
  color: #93c5fd !important;
}

body.dark-mode .text-red-800,
body.dark-mode .text-red-900 {
  color: #fca5a5 !important;
}

body.dark-mode .text-green-800,
body.dark-mode .text-emerald-800,
body.dark-mode .text-emerald-900,
body.dark-mode .text-emerald-950 {
  color: #6ee7b7 !important;
}

body.dark-mode .text-amber-800,
body.dark-mode .text-amber-900,
body.dark-mode .text-amber-950,
body.dark-mode .text-yellow-800 {
  color: #fcd34d !important;
}

body.dark-mode .text-purple-800,
body.dark-mode .text-purple-900,
body.dark-mode .text-purple-950 {
  color: #d8b4fe !important;
}

body.dark-mode .text-indigo-800,
body.dark-mode .text-indigo-900,
body.dark-mode .text-indigo-950 {
  color: #a5b4fc !important;
}

body.dark-mode .text-pink-800,
body.dark-mode .text-pink-900 {
  color: #f9a8d4 !important;
}

body.dark-mode .text-sky-800,
body.dark-mode .text-sky-900 {
  color: #7dd3fc !important;
}

body.dark-mode .text-teal-900,
body.dark-mode .text-teal-950 {
  color: #5eead4 !important;
}

/* Explicit dark:* Tailwind polyfills */
body.dark-mode .dark\:bg-gray-600 {
  background-color: #4b5563 !important;
}

body.dark-mode .dark\:bg-gray-700 {
  background-color: #334155 !important;
}

body.dark-mode .dark\:bg-gray-700\/50 {
  background-color: rgba(51, 65, 85, 0.5) !important;
}

body.dark-mode .dark\:bg-gray-700\/60 {
  background-color: rgba(51, 65, 85, 0.6) !important;
}

body.dark-mode .dark\:bg-gray-800 {
  background-color: #1e293b !important;
}

body.dark-mode .dark\:bg-gray-800\/30 {
  background-color: rgba(30, 41, 59, 0.3) !important;
}

body.dark-mode .dark\:bg-gray-800\/40 {
  background-color: rgba(30, 41, 59, 0.4) !important;
}

body.dark-mode .dark\:bg-gray-800\/50 {
  background-color: rgba(30, 41, 59, 0.5) !important;
}

body.dark-mode .dark\:bg-gray-800\/60 {
  background-color: rgba(30, 41, 59, 0.6) !important;
}

body.dark-mode .dark\:bg-gray-800\/80 {
  background-color: rgba(30, 41, 59, 0.8) !important;
}

body.dark-mode .dark\:bg-gray-900 {
  background-color: #0f172a !important;
}

body.dark-mode .dark\:bg-gray-900\/20 {
  background-color: rgba(15, 23, 42, 0.2) !important;
}

body.dark-mode .dark\:bg-gray-900\/30 {
  background-color: rgba(15, 23, 42, 0.3) !important;
}

body.dark-mode .dark\:bg-gray-900\/40 {
  background-color: rgba(15, 23, 42, 0.4) !important;
}

body.dark-mode .dark\:bg-gray-900\/50 {
  background-color: rgba(15, 23, 42, 0.5) !important;
}

body.dark-mode .dark\:bg-gray-900\/60 {
  background-color: rgba(15, 23, 42, 0.6) !important;
}

body.dark-mode .dark\:bg-gray-900\/70 {
  background-color: rgba(15, 23, 42, 0.7) !important;
}

body.dark-mode .dark\:bg-gray-900\/80 {
  background-color: rgba(15, 23, 42, 0.8) !important;
}

body.dark-mode .dark\:bg-gray-900\/90 {
  background-color: rgba(15, 23, 42, 0.9) !important;
}

body.dark-mode .dark\:bg-slate-800 {
  background-color: #1e293b !important;
}

body.dark-mode .dark\:bg-slate-900\/50 {
  background-color: rgba(15, 23, 42, 0.5) !important;
}

body.dark-mode .dark\:bg-amber-900\/20,
body.dark-mode .dark\:bg-amber-900\/30,
body.dark-mode .dark\:bg-amber-900\/80,
body.dark-mode .dark\:bg-amber-950\/30,
body.dark-mode .dark\:bg-amber-950\/40 {
  background-color: rgba(120, 53, 15, 0.45) !important;
}

body.dark-mode .dark\:bg-blue-900\/30,
body.dark-mode .dark\:bg-blue-900\/40,
body.dark-mode .dark\:bg-blue-950\/30,
body.dark-mode .dark\:bg-blue-950\/40 {
  background-color: rgba(30, 58, 138, 0.34) !important;
}

body.dark-mode .dark\:bg-emerald-900\/30,
body.dark-mode .dark\:bg-emerald-900\/40,
body.dark-mode .dark\:bg-emerald-950\/40,
body.dark-mode .dark\:bg-emerald-950\/50 {
  background-color: rgba(6, 78, 59, 0.35) !important;
}

body.dark-mode .dark\:bg-indigo-900\/30,
body.dark-mode .dark\:bg-indigo-950\/40,
body.dark-mode .dark\:bg-indigo-950\/50 {
  background-color: rgba(49, 46, 129, 0.35) !important;
}

body.dark-mode .dark\:bg-purple-900\/30,
body.dark-mode .dark\:bg-purple-950\/30,
body.dark-mode .dark\:bg-purple-950\/40 {
  background-color: rgba(88, 28, 135, 0.35) !important;
}

body.dark-mode .dark\:bg-red-900\/30,
body.dark-mode .dark\:bg-red-950\/30,
body.dark-mode .dark\:bg-red-950\/40 {
  background-color: rgba(127, 29, 29, 0.35) !important;
}

body.dark-mode .dark\:bg-pink-950\/40 {
  background-color: rgba(131, 24, 67, 0.35) !important;
}

body.dark-mode .dark\:bg-sky-900\/30 {
  background-color: rgba(12, 74, 110, 0.35) !important;
}

body.dark-mode .dark\:border-gray-600 {
  border-color: #475569 !important;
}

body.dark-mode .dark\:border-gray-700,
body.dark-mode .dark\:border-slate-700 {
  border-color: #334155 !important;
}

body.dark-mode .dark\:border-gray-800,
body.dark-mode .dark\:border-slate-800 {
  border-color: #1e293b !important;
}

body.dark-mode .dark\:text-white {
  color: #ffffff !important;
}

body.dark-mode .dark\:text-gray-100 {
  color: #f3f4f6 !important;
}

body.dark-mode .dark\:text-gray-200 {
  color: #e5e7eb !important;
}

body.dark-mode .dark\:text-gray-300 {
  color: #cbd5e1 !important;
}

body.dark-mode .dark\:text-gray-400 {
  color: #94a3b8 !important;
}

body.dark-mode .dark\:text-amber-200 {
  color: #fde68a !important;
}

body.dark-mode .dark\:text-amber-300 {
  color: #fcd34d !important;
}

body.dark-mode .dark\:text-blue-200 {
  color: #bfdbfe !important;
}

body.dark-mode .dark\:text-blue-300 {
  color: #93c5fd !important;
}

body.dark-mode .dark\:text-emerald-200 {
  color: #a7f3d0 !important;
}

body.dark-mode .dark\:text-emerald-300 {
  color: #6ee7b7 !important;
}

body.dark-mode .dark\:text-indigo-200 {
  color: #c7d2fe !important;
}

body.dark-mode .dark\:text-indigo-300 {
  color: #a5b4fc !important;
}

body.dark-mode .dark\:text-pink-200,
body.dark-mode .dark\:text-pink-300 {
  color: #f9a8d4 !important;
}

body.dark-mode .dark\:text-purple-300 {
  color: #d8b4fe !important;
}

body.dark-mode .dark\:text-red-300 {
  color: #fca5a5 !important;
}

body.dark-mode .dark\:text-sky-200,
body.dark-mode .dark\:text-sky-300 {
  color: #7dd3fc !important;
}

body.dark-mode .dark\:from-amber-950\/40 {
  --tw-gradient-from: rgba(69, 26, 3, 0.5);
}

body.dark-mode .dark\:to-amber-900 {
  --tw-gradient-to: #78350f;
}

body.dark-mode .dark\:from-blue-950\/40 {
  --tw-gradient-from: rgba(23, 37, 84, 0.55);
}

body.dark-mode .dark\:to-blue-900\/30 {
  --tw-gradient-to: rgba(30, 58, 138, 0.35);
}

body.dark-mode .dark\:from-emerald-950\/40 {
  --tw-gradient-from: rgba(2, 44, 34, 0.55);
}

body.dark-mode .dark\:to-teal-900\/30 {
  --tw-gradient-to: rgba(19, 78, 74, 0.35);
}

body.dark-mode .dark\:from-gray-800 {
  --tw-gradient-from: #1e293b;
}

body.dark-mode .dark\:from-gray-900,
body.dark-mode .dark\:to-gray-900 {
  --tw-gradient-from: #0f172a;
  --tw-gradient-to: #0f172a;
}

/* Navigation, Sidebar, KPIs & Header Badges in Dark Mode */
body.dark-mode .nav-pill {
  color: #cbd5e1;
}

body.dark-mode .nav-pill:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-mode .nav-pill.active {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}

body.dark-mode #admin-menu-dropdown {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode #bcv-badge-display {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

body.dark-mode #sa-sidebar,
body.dark-mode #sa-mobile-top-bar {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-mode .sa-nav-item,
body.dark-mode .sa-mobile-pill {
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-mode .sa-nav-item:hover,
body.dark-mode .sa-mobile-pill:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

body.dark-mode .sa-nav-item.active,
body.dark-mode .sa-mobile-pill.active {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}

body.dark-mode .sa-kpi-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .sa-kpi-label {
  color: #94a3b8 !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

body.dark-mode .btn-outline-secondary {
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .btn-outline-secondary:hover {
  background-color: #334155;
  color: #ffffff;
}

/* Prevent select filters inside horizontal toolbars from crushing adjacent flex-1 search bars */
.flex:not(.flex-col)>select:not(.w-full):not(.flex-1),
.md\:flex-row>select:not(.w-full):not(.flex-1),
.sm\:flex-row>select:not(.w-full):not(.flex-1) {
  width: auto !important;
  max-width: 100%;
  flex-shrink: 0;
}

/* Fit all SuperAdmin Users columns comfortably at 1366px desktop without clipping Actions */
@media (min-width: 768px) and (max-width: 1439px) {

  .card:has(#sa-users-tbody) th,
  .card:has(#sa-users-tbody) td {
    padding: 0.5rem 0.35rem !important;
    font-size: 0.78rem;
  }

  .card:has(#sa-users-tbody) td:nth-child(2) {
    max-width: 215px;
    overflow-wrap: anywhere;
  }

  .card:has(#sa-users-tbody) td:nth-child(4) {
    max-width: 150px;
    white-space: normal;
  }
}

/* SuperAdmin Subscription Benefits Matrix (5 columns: Demo, Gratis, Estándar, Pro, VIP) */
.sa-plan-matrix-table {
  width: 100%;
  min-width: 580px;
  border-collapse: separate;
  border-spacing: 0;
}

#sa-plan-matrix-card .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

.sa-plan-matrix-table th.sticky,
.sa-plan-matrix-table td.sticky {
  position: sticky;
  left: 0;
  background-clip: padding-box;
}

#sa-plan-matrix-card {
  scroll-margin-top: 96px;
}

.sa-matrix-sticky-col {
  position: relative;
  z-index: 2;
  width: 128px;
  min-width: 128px;
  max-width: 140px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.sa-matrix-tier-col {
  min-width: 90px;
}

.sa-matrix-quota-input {
  width: 3.75rem;
  max-width: 100%;
}

@media (max-width: 639px) {

  .sa-plan-matrix-table th.sticky,
  .sa-plan-matrix-table td.sticky {
    position: static !important;
  }

  #sa-content-area:has(#sa-plan-matrix-card) {
    padding: 0.5rem !important;
  }

  #sa-monetization-settings-card>.p-5 {
    padding: 0.65rem !important;
  }

  #sa-plan-matrix-card {
    padding: 0.55rem !important;
  }

  .sa-plan-matrix-table th,
  .sa-plan-matrix-table td {
    padding: 0.45rem 0.35rem !important;
  }
}

@media (min-width: 640px) {
  .sa-plan-matrix-table {
    min-width: 760px;
  }

  .sa-matrix-sticky-col {
    width: auto;
    min-width: 210px;
    max-width: 265px;
  }

  .sa-matrix-tier-col {
    min-width: 110px;
  }

  .sa-matrix-quota-input {
    width: 4.75rem;
  }
}

/* Live Commerce Studio v60: Barra rápida de secciones en escritorio */
.live-studio-desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .live-studio-desktop-nav {
    display: flex;
  }
}

/* ============================================================================
 * RESPONSIVE INTEGRAL ENGINE (MÓVIL 360/390 · TABLET 768/1024 · LAPTOP 1366 · PC 1920)
 * ============================================================================ */
.min-w-\[200px\] {
  min-width: 200px;
}

/* Prevenir que inputs .sr-only dentro de toggles en tablas scrolleables generen overflow horizontal en <html> */
label:has(> .sr-only) {
  position: relative;
}

@media (min-width: 640px) {
  .sm\:w-fit {
    width: fit-content;
  }

  .sm\:w-auto {
    width: auto;
  }

  .sm\:inline-flex {
    display: inline-flex;
  }

  .sm\:w-44 {
    width: 11rem;
  }

  .sm\:w-56 {
    width: 14rem;
  }

  .sm\:w-72 {
    width: 18rem;
  }

  .sm\:flex-nowrap {
    flex-wrap: nowrap;
  }

  .sm\:flex-wrap {
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  .md\:w-fit {
    width: fit-content;
  }

  .md\:w-40 {
    width: 10rem;
  }

  .md\:w-80 {
    width: 20rem;
  }

  .md\:w-full {
    width: 100%;
  }

  .md\:w-auto {
    width: auto;
  }

  .md\:w-1\/4 {
    width: 25%;
  }

  .md\:w-1\/3 {
    width: 33.333333%;
  }

  .md\:w-1\/6 {
    width: 16.666667%;
  }

  .md\:flex-wrap {
    flex-wrap: wrap;
  }

  .md\:flex-shrink-0 {
    flex-shrink: 0;
  }

  .md\:flex-none {
    flex: none;
  }

  .md\:min-w-0 {
    min-width: 0;
  }

  /* Blindaje de layout SuperAdmin (evita overflow horizontal por tablas en Tablet/Laptop/PC) */
  .sa-layout {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .sa-content,
  #sa-content-area {
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .b2b-license-row>div {
    min-width: 0;
  }
}

@media (min-width: 1024px) {
  .lg\:w-fit {
    width: fit-content;
  }

  .lg\:w-auto {
    width: auto;
  }

  .lg\:flex-wrap {
    flex-wrap: wrap;
  }
}

@media (min-width: 1280px) {
  .xl\:block {
    display: block;
  }

  .xl\:flex-row {
    flex-direction: row;
  }

  .xl\:flex-nowrap {
    flex-wrap: nowrap;
  }

  .xl\:items-center {
    align-items: center;
  }

  .xl\:w-auto {
    width: auto;
  }

  .xl\:flex-1 {
    flex: 1 1 0%;
  }

  .xl\:order-2 {
    order: 2;
  }

  .xl\:order-3 {
    order: 3;
  }

  .xl\:border-none {
    border-style: none;
  }

  .xl\:pt-0 {
    padding-top: 0;
  }

  .xl\:mt-0 {
    margin-top: 0;
  }
}

/* Tablet Portrait & Landscape (768px - 1279.98px): Header limpio en 2 filas sin aplastar Tasas ni Controles */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .unified-header {
    flex-wrap: wrap !important;
    row-gap: 0.45rem !important;
    column-gap: 0.5rem !important;
    padding: 0.45rem 0.9rem !important;
  }

  .unified-header .header-left {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .unified-header .header-right {
    order: 2 !important;
    flex: 0 1 auto !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
  }

  .unified-header .header-rates-container {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 0.1rem !important;
    padding-top: 0.35rem !important;
    border-top: 1px solid rgba(226, 232, 240, 0.85) !important;
  }

  body.dark-mode .unified-header .header-rates-container {
    border-top-color: rgba(51, 65, 85, 0.75) !important;
  }
}

/* ============================================================================
 * PALETA GLOBAL UNIFICADA v65 (LIGHT & DARK MODE) + POLISH RESPONSIVE ADMIN / SUPERADMIN
 * ============================================================================ */

/* Cohesión de superficies, bordes y foco en Admin & SuperAdmin */
.sa-layout,
#admin-view {
  --bp-surface: var(--surface-color, #ffffff);
  --bp-surface-muted: var(--surface-muted, #f8fafc);
  --bp-border: var(--border-color, #e2e8f0);
  --bp-accent: var(--primary-color, #2563eb);
  --bp-accent-hover: var(--primary-hover, #1d4ed8);
  --bp-text: var(--text-color, #0f172a);
  --bp-text-muted: var(--text-muted, #64748b);
}

body.dark-mode .sa-layout,
body.dark-mode #admin-view {
  --bp-surface: #1e293b;
  --bp-surface-muted: #0f172a;
  --bp-border: #334155;
  --bp-accent: #3b82f6;
  --bp-accent-hover: #60a5fa;
  --bp-text: #f1f5f9;
  --bp-text-muted: #94a3b8;
}

/* Barra de Cuotas Demo (Admin Header) */
#bp-demo-quota-bar {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 50%, #fff7ed 100%);
  border-bottom: 1px solid #fcd34d;
  color: #78350f;
  max-width: 100%;
  overflow-x: clip;
}

body.dark-mode #bp-demo-quota-bar {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.42) 0%, rgba(146, 64, 14, 0.32) 100%);
  border-bottom-color: rgba(245, 158, 11, 0.38);
  color: #fef3c7;
}

/* Tarjeta Política Global de Demo (#sa-demo-policy-card) */
#sa-demo-policy-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--bp-border);
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.06);
  max-width: 100%;
  overflow-x: clip;
}

body.dark-mode #sa-demo-policy-card {
  background: linear-gradient(180deg, #1e293b 0%, #162032 100%);
  border-color: #334155;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.45);
}

#sa-demo-policy-card input[type="number"],
#sa-demo-policy-card input[type="text"],
#sa-qdemo-form input,
#sa-qdemo-form select,
#sa-loc-limits-form input,
#sa-loc-limits-form select {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#sa-demo-policy-card input:focus,
#sa-qdemo-form input:focus,
#sa-qdemo-form select:focus,
#sa-loc-limits-form input:focus,
#sa-loc-limits-form select:focus {
  border-color: var(--bp-accent) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16) !important;
  outline: none;
}

body.dark-mode #sa-demo-policy-card input,
body.dark-mode #sa-qdemo-form input,
body.dark-mode #sa-qdemo-form select,
body.dark-mode #sa-loc-limits-form input,
body.dark-mode #sa-loc-limits-form select {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

/* Strip de consumo en tiempo real dentro del Modal de Límites Individuales */
#sa-loc-limits-usage-strip {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.dark-mode #sa-loc-limits-usage-strip {
  background-color: #0f172a;
  border-color: #334155;
}

/* Tarjetas de Locales y Licencias B2B en SuperAdmin */
.sa-location-card,
.b2b-license-row {
  max-width: 100%;
  min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.sa-location-card:hover,
.b2b-license-row:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

body.dark-mode .sa-location-card:hover,
body.dark-mode .b2b-license-row:hover {
  border-color: rgba(96, 165, 250, 0.45);
}

/* Matriz de Planes 5 columnas: contraste homogéneo en modo claro y oscuro */
#sa-plan-matrix-card {
  border-color: var(--bp-border);
}

.sa-plan-matrix-table thead th {
  border-bottom: 2px solid var(--bp-border);
}

body.dark-mode .sa-plan-matrix-table thead th {
  border-bottom-color: #334155;
}

body.dark-mode .sa-plan-matrix-table tbody tr:hover {
  background-color: rgba(51, 65, 85, 0.35);
}

/* Submenús y pills de navegación táctiles en Móvil y Tablet (sin desbordes) */
#sa-nav-container,
.admin-tabs-bar,
.pos-tabs-bar {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 767.98px) {

  #sa-demo-policy-card .grid,
  #sa-qdemo-form .grid,
  #sa-loc-limits-form .grid {
    gap: 0.65rem;
  }

  #sa-demo-policy-card button,
  #sa-qdemo-form button,
  #sa-loc-limits-form button {
    min-height: 40px;
  }

  #bp-demo-quota-bar {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
    font-size: 11px !important;
  }
}

/* SuperAdmin 11 Módulos — Consistencia Dark Mode unificada */
body.dark-mode #sa-content-area .card,
body.dark-mode #sa-content-area .bg-white {
  background-color: #0f172a;
  border-color: #1e293b;
  color: #e2e8f0;
}

body.dark-mode #sa-content-area .bg-gray-50,
body.dark-mode #sa-content-area .bg-slate-50 {
  background-color: #1e293b;
  border-color: #334155;
}

body.dark-mode #sa-content-area input:not([type="checkbox"]):not([type="radio"]),
body.dark-mode #sa-content-area select,
body.dark-mode #sa-content-area textarea {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode #sa-content-area table thead {
  background-color: #1e293b;
  color: #cbd5e1;
}

body.dark-mode #sa-content-area table tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.75);
}

body.dark-mode #sa-content-area .text-gray-800,
body.dark-mode #sa-content-area .text-gray-900,
body.dark-mode #sa-content-area .text-slate-900 {
  color: #f1f5f9;
}

body.dark-mode #sa-content-area .text-gray-700,
body.dark-mode #sa-content-area .text-gray-600 {
  color: #cbd5e1;
}

body.dark-mode #sa-settings-sticky-bar {
  background-color: rgba(15, 23, 42, 0.94);
  border-color: #334155;
}

/* ============================================================================
 * ADAPTACIÓN INTEGRAL PC & ESCRITORIO ELECTRON v72 (950px – 1920px+)
 * ============================================================================ */

/* 1. Modales globales y Live Studio: cero desborde horizontal/vertical en PC y Electron */
@media (min-width: 768px) {
  .modal-content {
    max-width: min(900px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
  }

  .modal-footer {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .live-studio-footer-actions,
  .live-studio-footer-primary-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    min-width: 0;
  }

  .live-studio-footer-actions {
    width: 100%;
    justify-content: space-between;
  }

  #sa-sidebar {
    height: calc(100vh - 64px);
    max-height: calc(100vh - 58px);
  }
}

/* 2. Escritorio Compacto & Electron Mínimo (950px – 1279.98px): Header en 2 filas limpias <= 105px */
@media (min-width: 900px) and (max-width: 1279.98px) {
  .unified-header {
    row-gap: 0.25rem !important;
    column-gap: 0.35rem !important;
    padding: 0.28rem 0.7rem !important;
  }

  .unified-header .header-left {
    flex: 0 1 auto !important;
    gap: 0.35rem !important;
  }

  .unified-header .brand {
    min-width: 0 !important;
  }

  .unified-header #brand-name-display {
    font-size: 0.9rem !important;
    max-width: 108px !important;
  }

  .unified-header #header-location-select {
    max-width: 125px !important;
    font-size: 0.75rem !important;
  }

  .unified-header .header-right {
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 0.22rem !important;
  }

  .unified-header .user-controls {
    flex-wrap: nowrap !important;
    gap: 0.2rem !important;
  }

  .unified-header #header-help-mode-btn,
  .unified-header [data-action="open-downloads-modal"],
  .unified-header [data-action="open-legal-notice"] {
    padding: 0.2rem 0.42rem !important;
    font-size: 10.5px !important;
  }

  .unified-header #header-help-mode-btn .rounded-full,
  .unified-header [data-action="open-downloads-modal"] span:not(:first-child),
  .unified-header [data-action="open-legal-notice"] span:not(:first-child) {
    display: none !important;
  }

  .unified-header .user-profile {
    min-width: 0 !important;
    padding-left: 0.35rem !important;
    gap: 0.25rem !important;
  }

  .unified-header .user-profile p {
    max-width: 78px !important;
  }

  .unified-header .header-rates-container {
    padding-top: 0.2rem !important;
    margin-top: 0 !important;
  }

  .unified-header .rate-badge {
    min-height: 32px !important;
    padding: 0.16rem 0.5rem !important;
    flex-direction: row !important;
    gap: 0.32rem !important;
  }

  .unified-header .rate-badge .badge-display {
    flex-direction: row !important;
    gap: 0.32rem !important;
  }

  .unified-header .rate-badge .rate-value {
    font-size: 0.84rem !important;
  }

  #main-menu {
    padding: 0.25rem 0.7rem !important;
  }

  #main-menu ul {
    row-gap: 0.2rem !important;
    column-gap: 0.18rem !important;
  }

  #main-menu .menu-group {
    gap: 0.18rem !important;
  }

  #main-menu .nav-pill {
    padding: 0.24rem 0.44rem !important;
    font-size: 0.74rem !important;
    gap: 0.2rem !important;
    line-height: 1.15 !important;
  }
}

/* 3. PC Estándar, Electron Default 1280px, Laptops 1366px y Monitores 1920px: Header + Menú en 1 sola fila cada uno */
@media (min-width: 1280px) {
  .unified-header {
    flex-wrap: nowrap !important;
    gap: 0.45rem !important;
    padding: 0.32rem 0.9rem !important;
    min-height: 54px !important;
  }

  .unified-header .header-left {
    flex: 0 1 auto !important;
    flex-wrap: nowrap !important;
    gap: 0.45rem !important;
  }

  .unified-header .brand {
    min-width: 0 !important;
  }

  .unified-header #brand-name-display {
    max-width: 135px !important;
    font-size: 1rem !important;
  }

  .unified-header #header-location-select {
    max-width: 150px !important;
    font-size: 0.8rem !important;
  }

  .unified-header .header-rates-container {
    flex: 0 1 auto !important;
    gap: 0.45rem !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .unified-header .rate-badge {
    min-width: 92px !important;
    min-height: 40px !important;
    padding: 0.22rem 0.55rem !important;
  }

  .unified-header .rate-badge .rate-value {
    font-size: 0.9rem !important;
  }

  .unified-header .header-right {
    flex: 0 1 auto !important;
    flex-wrap: nowrap !important;
    gap: 0.3rem !important;
  }

  .unified-header .user-controls {
    flex-wrap: nowrap !important;
    gap: 0.25rem !important;
  }

  .unified-header #header-help-mode-btn,
  .unified-header [data-action="open-downloads-modal"],
  .unified-header [data-action="open-legal-notice"] {
    padding: 0.25rem 0.55rem !important;
    font-size: 11px !important;
  }

  .unified-header .user-profile {
    min-width: 0 !important;
    padding-left: 0.4rem !important;
    gap: 0.35rem !important;
  }

  .unified-header .user-profile p {
    max-width: 95px !important;
  }

  #main-menu {
    padding: 0.35rem 0.9rem !important;
  }

  #main-menu #mobile-nav-menu {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    column-gap: 0.2rem !important;
    row-gap: 0.2rem !important;
  }

  #main-menu .menu-group {
    gap: 0.2rem !important;
  }

  #main-menu .nav-pill {
    padding: 0.32rem 0.5rem !important;
    font-size: 0.77rem !important;
    gap: 0.24rem !important;
  }
}

/* 4. Pantallas PC Amplias (>= 1440px / 1920px): respiración visual extra sin perder 1 fila */
@media (min-width: 1440px) {
  .unified-header {
    gap: 0.75rem !important;
    padding: 0.38rem 1.4rem !important;
  }

  .unified-header #brand-name-display {
    max-width: 175px !important;
    font-size: 1.08rem !important;
  }

  .unified-header #header-location-select {
    max-width: 210px !important;
  }

  #main-menu {
    padding: 0.42rem 1.4rem !important;
  }

  #main-menu .menu-group {
    gap: 0.4rem !important;
  }

  #main-menu .nav-pill {
    padding: 0.38rem 0.72rem !important;
    font-size: 0.82rem !important;
    gap: 0.35rem !important;
  }
}

/* 5. Compactar texto decorativo de cabecera solo en 1280px–1399px para garantizar 0 overflow en 1 fila */
@media (min-width: 1280px) and (max-width: 1399.98px) {
  .unified-header .timestamp-container {
    display: none !important;
  }

  .unified-header #header-help-mode-btn .rounded-full {
    display: none !important;
  }
}

/* 6. Dark Mode completo para Sidebar SuperAdmin y Dropdown Más en PC */
@media (min-width: 768px) {
  #admin-menu-dropdown {
    position: absolute !important;
    top: 100% !important;
    bottom: auto !important;
    width: 19rem !important;
    min-width: 18rem !important;
    max-width: min(20rem, calc(100vw - 1.5rem)) !important;
    margin-top: 0.45rem !important;
    padding: 0.35rem !important;
    border-radius: 0.875rem !important;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.22), 0 8px 16px -6px rgba(15, 23, 42, 0.1) !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
  }

  #admin-menu-dropdown .admin-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    width: 100% !important;
    padding: 0.48rem 0.65rem !important;
    border-radius: 0.625rem !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  #admin-menu-dropdown .admin-menu-item>.flex-grow {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  #admin-menu-dropdown .admin-icon-box {
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.5rem !important;
  }
}

body.dark-mode #sa-sidebar {
  background-color: #0f172a;
  border-right-color: #1e293b;
}

body.dark-mode #sa-sidebar .sa-nav-item:not(.active) {
  color: #cbd5e1;
}

body.dark-mode #sa-sidebar .sa-nav-item:not(.active):hover {
  background-color: #1e293b;
  color: #ffffff;
}

body.dark-mode #sa-sidebar-toggle-btn:hover {
  background-color: #1e293b;
  color: #f8fafc;
}

body.dark-mode #sa-sidebar-resources-btn {
  background-color: rgba(30, 58, 138, 0.35);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

body.dark-mode #admin-menu-dropdown {
  background-color: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode #admin-menu-dropdown .admin-menu-item:hover {
  background-color: #1e293b;
}

/* =================================================================================
   PANEL DE ADMINISTRACIÓN (#admin-panel-root) — SISTEMA RESPONSIVO PC / TABLET / MÓVIL
   Normaliza botones nativos, inputs con ícono de búsqueda, cupones y Dark Mode
   ================================================================================= */
#admin-panel-root {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#admin-panel-root *,
#admin-panel-root *::before,
#admin-panel-root *::after {
  box-sizing: border-box;
}

#admin-panel-root button:not(.btn) {
  border-style: solid;
  border-width: 1px;
  border-color: transparent;
  background-image: none;
  font-family: inherit;
  cursor: pointer;
}

#admin-panel-root .admin-tab-pill {
  min-height: 40px !important;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

#admin-panel-root .admin-tab-pill:not(.bg-blue-600) {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

#admin-panel-root .admin-tab-pill:not(.bg-blue-600):hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

#admin-panel-root .admin-tab-pill.bg-blue-600 {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

#admin-panel-root .admin-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px !important;
  min-width: 28px !important;
  width: 28px;
  height: 34px;
  padding: 0;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  border-color: #cbd5e1 !important;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

#admin-panel-root #admin-scroll-left {
  left: 2px;
  right: auto;
}

#admin-panel-root #admin-scroll-right {
  right: 2px;
  left: auto;
}

#admin-panel-root .admin-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

#admin-panel-root .admin-filter-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 0.75rem;
  background-color: #f1f5f9;
  min-width: 0;
}

#admin-panel-root .admin-search-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

#admin-panel-root .admin-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 1;
  font-size: 0.78rem;
  color: #94a3b8;
  z-index: 2;
}

#admin-panel-root .admin-rif-phone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

#admin-panel-root .admin-url-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

#admin-panel-root .admin-url-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  flex-shrink: 0;
}

#admin-panel-root .admin-split-users,
#admin-panel-root .admin-split-drivers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
}

#admin-panel-root .admin-dual-audit-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

#admin-panel-root .admin-dual-audit-table {
  display: none;
}

@media (min-width: 640px) and (max-width: 1023.98px) {
  #admin-panel-root .admin-rif-phone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #admin-panel-root .admin-url-row {
    flex-direction: row;
    align-items: center;
  }

  #admin-panel-root .admin-url-actions {
    display: flex;
    align-items: center;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  #admin-panel-root .admin-dual-audit-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (min-width: 1024px) {
  #admin-panel-root .admin-dual-audit-cards {
    display: none;
  }

  #admin-panel-root .admin-dual-audit-table {
    display: block;
  }
}

@media (min-width: 1120px) {
  #admin-panel-root .admin-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  #admin-panel-root .admin-toolbar .admin-search-wrap {
    width: 17.5rem;
    flex-shrink: 0;
  }
}

@media (min-width: 1200px) {
  #admin-panel-root .admin-rif-phone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #admin-panel-root .admin-url-row {
    flex-direction: row;
    align-items: center;
  }

  #admin-panel-root .admin-url-actions {
    display: flex;
    align-items: center;
  }

  #admin-panel-root .admin-split-users {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  #admin-panel-root .admin-split-drivers {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: start;
  }
}

body.dark-mode #admin-panel-root .admin-filter-group {
  background-color: rgba(15, 23, 42, 0.72);
}

#admin-panel-root .admin-filter-pill {
  min-height: 34px !important;
  padding: 0.35rem 0.7rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-color: transparent !important;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#admin-panel-root .admin-filter-pill.is-idle {
  background-color: transparent;
  color: #64748b;
}

#admin-panel-root .admin-filter-pill.is-idle:hover {
  background-color: rgba(148, 163, 184, 0.16);
  color: #0f172a;
}

#admin-panel-root .admin-filter-pill.is-active {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

#admin-panel-root .admin-inline-btn {
  min-height: 32px !important;
  padding: 0.25rem 0.55rem;
  border-radius: 0.5rem;
  background: transparent;
  border-color: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

#admin-panel-root .admin-inline-btn:hover {
  background-color: rgba(59, 130, 246, 0.08);
}

#admin-panel-root .admin-icon-action-btn {
  min-height: 36px !important;
  min-width: 36px !important;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  background-color: #ffffff;
  border-color: #e2e8f0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  line-height: 1;
}

#admin-panel-root .admin-icon-action-btn:hover {
  border-color: #94a3b8 !important;
  background-color: #f8fafc;
}

#admin-panel-root .admin-pw-eye-btn {
  min-height: 30px !important;
  min-width: 30px !important;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none !important;
  background: transparent !important;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#admin-panel-root .admin-pw-eye-btn:hover {
  background: rgba(148, 163, 184, 0.16) !important;
}

#admin-panel-root input:not([type="checkbox"]):not([type="radio"]):not(.sr-only),
#admin-panel-root select,
#admin-panel-root textarea {
  border-width: 1px !important;
  border-color: #cbd5e1 !important;
  font-size: 0.875rem !important;
  color: #0f172a !important;
  background-color: #f8fafc;
  max-width: 100%;
  min-width: 0;
}

#admin-panel-root input:not([type="checkbox"]):not([type="radio"]):not(.sr-only),
#admin-panel-root select {
  min-height: 40px !important;
  height: 40px;
}

#admin-panel-root input.admin-search-input {
  padding-left: 2.25rem !important;
  padding-right: 0.75rem !important;
  font-size: 0.8125rem !important;
  min-height: 38px !important;
  height: 38px !important;
}

#admin-panel-root input.admin-rate-input {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  min-height: 44px !important;
  height: 44px !important;
}

#admin-panel-root input.admin-pw-input {
  padding-right: 2.6rem !important;
}

#admin-panel-root input.admin-zone-price-input {
  padding-left: 1.6rem !important;
  padding-right: 0.5rem !important;
}

#admin-panel-root .admin-header-live-btn {
  min-height: 38px !important;
  padding: 0.45rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff !important;
  border-color: transparent !important;
  background: linear-gradient(90deg, #db2777 0%, #4f46e5 100%) !important;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

#admin-panel-root .admin-header-live-btn:hover {
  filter: brightness(1.06);
}

#admin-panel-root .admin-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 639.98px) {
  #admin-panel-root .btn {
    white-space: normal !important;
    text-align: center;
    line-height: 1.25;
  }

  #admin-panel-root .admin-tab-pill {
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Dark Mode integral para Panel de Administración */
body.dark-mode #admin-panel-root .admin-tab-pill:not(.bg-blue-600) {
  background-color: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

body.dark-mode #admin-panel-root .admin-tab-pill:not(.bg-blue-600):hover {
  background-color: #334155;
  color: #ffffff;
}

body.dark-mode #admin-panel-root .admin-scroll-btn {
  background: rgba(15, 23, 42, 0.94);
  border-color: #334155 !important;
  color: #cbd5e1;
}

body.dark-mode #admin-panel-root .admin-filter-pill.is-idle {
  color: #94a3b8;
}

body.dark-mode #admin-panel-root .admin-filter-pill.is-idle:hover {
  background-color: rgba(51, 65, 85, 0.55);
  color: #f8fafc;
}

body.dark-mode #admin-panel-root .admin-filter-pill.is-active {
  background-color: #334155;
  color: #ffffff;
  border-color: #475569 !important;
}

body.dark-mode #admin-panel-root .admin-icon-action-btn {
  background-color: #0f172a;
  border-color: #334155 !important;
}

body.dark-mode #admin-panel-root .admin-icon-action-btn:hover {
  background-color: #1e293b;
  border-color: #475569 !important;
}

body.dark-mode #admin-panel-root input:not([type="checkbox"]):not([type="radio"]):not(.sr-only),
body.dark-mode #admin-panel-root select,
body.dark-mode #admin-panel-root textarea {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-mode #admin-panel-root input:disabled {
  background-color: #1e293b !important;
  opacity: 0.6;
}

/* ============================================================================
   v81: MODAL ESCÁNER INALÁMBRICO, VISOR CLIENTE Y CONTINGENCIA LAN
   Estrictamente encapsulado en #pos-companion-modal-root (PC / Tablet / Móvil)
   ============================================================================ */
#pos-companion-modal-root {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#pos-companion-modal-root * {
  box-sizing: border-box;
}

#pos-companion-modal-root .pos-comp-nav-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

@media (max-width: 560px) {
  #pos-companion-modal-root .pos-comp-nav-strip {
    grid-template-columns: 1fr;
  }
}

#pos-companion-modal-root .pos-comp-nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  min-height: 36px !important;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#pos-companion-modal-root .pos-comp-nav-pill:hover {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

#pos-companion-modal-root .pos-comp-nav-pill.is-online {
  border-color: #34d399 !important;
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}

#pos-companion-modal-root .pos-comp-card {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

#pos-companion-modal-root .pos-comp-card-emerald {
  border-color: #a7f3d0;
  background-color: rgba(236, 253, 245, 0.75);
}

#pos-companion-modal-root .pos-comp-card-indigo {
  border-color: #c7d2fe;
  background-color: rgba(238, 242, 255, 0.75);
}

#pos-companion-modal-root .pos-comp-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

#pos-companion-modal-root .pos-comp-card-title {
  font-size: 0.875rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
}

#pos-companion-modal-root .pos-comp-card-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
  line-height: 1.35;
}

#pos-companion-modal-root .pos-comp-qr-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 0.65rem;
  background-color: #e2e8f0;
}

#pos-companion-modal-root .pos-comp-qr-tab {
  min-height: 30px !important;
  padding: 0.3rem 0.65rem !important;
  border-radius: 0.5rem !important;
  border: none !important;
  background: transparent !important;
  color: #475569 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  cursor: pointer;
  white-space: nowrap;
}

#pos-companion-modal-root .pos-comp-qr-tab.is-active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.28);
}

#pos-companion-modal-root .pos-comp-pair-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
}

@media (min-width: 600px) {
  #pos-companion-modal-root .pos-comp-pair-grid {
    flex-direction: row;
    align-items: stretch;
  }
}

#pos-companion-modal-root .pos-comp-qr-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pos-companion-modal-root .pos-comp-qr-box {
  background-color: #ffffff;
  padding: 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pos-companion-modal-root .pos-comp-qr-box svg {
  display: block;
  max-width: 196px;
  height: auto;
}

#pos-companion-modal-root .pos-comp-info-col {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
}

#pos-companion-modal-root .pos-comp-pin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#pos-companion-modal-root .pos-comp-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

#pos-companion-modal-root .pos-comp-pin-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #2563eb;
  line-height: 1.1;
}

#pos-companion-modal-root .pos-comp-sec-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

#pos-companion-modal-root .pos-comp-sec-badge.is-https {
  background-color: #d1fae5;
  color: #065f46;
}

#pos-companion-modal-root .pos-comp-sec-badge.is-lan {
  background-color: #fef3c7;
  color: #92400e;
}

#pos-companion-modal-root .pos-comp-hint {
  margin: 0;
  font-size: 0.74rem;
  color: #475569;
  line-height: 1.4;
}

#pos-companion-modal-root .pos-comp-url-row {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
}

#pos-companion-modal-root .pos-comp-url-input {
  flex: 1;
  min-width: 0;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0.35rem 0.6rem !important;
  font-size: 0.72rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  border-radius: 0.55rem !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

#pos-companion-modal-root .pos-comp-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

#pos-companion-modal-root .pos-comp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 34px !important;
  padding: 0.38rem 0.75rem !important;
  border-radius: 0.6rem !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent !important;
  white-space: nowrap;
  transition: filter 0.15s ease, background-color 0.15s ease;
}

#pos-companion-modal-root .pos-comp-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

#pos-companion-modal-root .pos-comp-btn-xs {
  min-height: 28px !important;
  padding: 0.25rem 0.55rem !important;
  font-size: 0.7rem !important;
}

#pos-companion-modal-root .pos-comp-btn-primary {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

#pos-companion-modal-root .pos-comp-btn-whatsapp,
#pos-companion-modal-root .pos-comp-btn-emerald {
  background-color: #059669 !important;
  color: #ffffff !important;
}

#pos-companion-modal-root .pos-comp-btn-outline {
  background-color: #ffffff !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}

#pos-companion-modal-root .pos-comp-btn-subtle {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

#pos-companion-modal-root .pos-comp-btn-danger-ghost {
  background-color: transparent !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
}

#pos-companion-modal-root .pos-comp-peers-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#pos-companion-modal-root .pos-comp-peers-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#pos-companion-modal-root .pos-comp-empty-peers {
  font-size: 0.74rem;
  color: #64748b;
  text-align: center;
  padding: 0.65rem 0.75rem;
  border-radius: 0.7rem;
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px dashed #cbd5e1;
}

#pos-companion-modal-root .pos-comp-peer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background-color: #ffffff;
  border: 1px solid #a7f3d0;
}

#pos-companion-modal-root .pos-comp-peer-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

#pos-companion-modal-root .pos-comp-peer-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

#pos-companion-modal-root .pos-comp-peer-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #064e3b;
  word-break: break-word;
}

#pos-companion-modal-root .pos-comp-peer-sub {
  font-size: 0.69rem;
  color: #059669;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#pos-companion-modal-root .pos-comp-kick-btn {
  min-height: 28px !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 0.5rem !important;
  border: 1px solid #fecdd3 !important;
  background-color: #fff1f2 !important;
  color: #be123c !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  cursor: pointer;
}

#pos-companion-modal-root .pos-comp-udp-status {
  font-size: 0.74rem;
  color: #065f46;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

#pos-companion-modal-root .pos-comp-code-pill {
  padding: 0.15rem 0.45rem;
  border-radius: 0.45rem;
  background-color: #ffffff;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 800;
  color: #047857;
}

#pos-companion-modal-root .pos-comp-hmac-pill {
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background-color: #d1fae5;
  color: #047857;
}

#pos-companion-modal-root .pos-comp-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

#pos-companion-modal-root .pos-comp-summary::-webkit-details-marker {
  display: none;
}

#pos-companion-modal-root .pos-comp-mesh-badge {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background-color: #e0e7ff;
  color: #3730a3;
  white-space: nowrap;
}

#pos-companion-modal-root .pos-comp-mesh-badge.is-active {
  background-color: #059669;
  color: #ffffff;
}

#pos-companion-modal-root .pos-comp-mesh-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

#pos-companion-modal-root .pos-comp-health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#pos-companion-modal-root .pos-comp-chip {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.22rem 0.55rem;
  border-radius: 0.5rem;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

#pos-companion-modal-root .pos-comp-wizard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 600px) {
  #pos-companion-modal-root .pos-comp-wizard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

#pos-companion-modal-root .pos-comp-step-card {
  background-color: #ffffff;
  border: 1px solid #c7d2fe;
  border-radius: 0.8rem;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#pos-companion-modal-root .pos-comp-step-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #1e1b4b;
}

#pos-companion-modal-root .pos-comp-step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background-color: #4f46e5;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#pos-companion-modal-root .pos-comp-step-desc {
  margin: 0;
  font-size: 0.71rem;
  color: #475569;
  line-height: 1.35;
}

#pos-companion-modal-root .pos-comp-io-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#pos-companion-modal-root .pos-comp-io-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

#pos-companion-modal-root .pos-comp-io-tools {
  display: flex;
  gap: 0.3rem;
}

#pos-companion-modal-root .pos-comp-mini-btn {
  min-height: 26px !important;
  padding: 0.18rem 0.5rem !important;
  border-radius: 0.45rem !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #334155 !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  cursor: pointer;
}

#pos-companion-modal-root .pos-comp-textarea {
  width: 100%;
  padding: 0.55rem 0.65rem !important;
  font-size: 0.72rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  border-radius: 0.7rem !important;
  border: 1px solid #a5b4fc !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  resize: vertical;
}

#pos-companion-modal-root .pos-lan-qr-card {
  margin-top: 0.45rem;
  padding: 0.7rem;
  border-radius: 0.8rem;
  background-color: #ffffff;
  border: 1px solid #c7d2fe;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#pos-companion-modal-root .pos-comp-mesh-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

#pos-companion-modal-root .pos-comp-mesh-footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#pos-companion-modal-root .pos-comp-mesh-status {
  font-size: 0.73rem;
  font-weight: 800;
  color: #3730a3;
}

#pos-companion-modal-root .pos-lan-log-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.7rem;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #e0e7ff;
  max-height: 120px;
  overflow-y: auto;
}

#pos-companion-modal-root .pos-lan-log-empty {
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
}

#pos-companion-modal-root .pos-lan-log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.69rem;
  color: #334155;
}

#pos-companion-modal-root .pos-lan-log-row.is-sec {
  color: #be123c;
  font-weight: 700;
}

/* Dark Mode para Modal Escáner / Visor / Contingencia LAN */
body.dark-mode #pos-companion-modal-root .pos-comp-nav-pill {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-mode #pos-companion-modal-root .pos-comp-nav-pill.is-online {
  background-color: rgba(6, 78, 59, 0.5) !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}

body.dark-mode #pos-companion-modal-root .pos-comp-card {
  background-color: #0f172a;
  border-color: #334155;
}

body.dark-mode #pos-companion-modal-root .pos-comp-card-emerald {
  background-color: rgba(6, 78, 59, 0.24);
  border-color: rgba(16, 185, 129, 0.45);
}

body.dark-mode #pos-companion-modal-root .pos-comp-card-indigo {
  background-color: rgba(49, 46, 129, 0.26);
  border-color: rgba(99, 102, 241, 0.45);
}

body.dark-mode #pos-companion-modal-root .pos-comp-card-title {
  color: #f8fafc;
}

body.dark-mode #pos-companion-modal-root .pos-comp-card-sub,
body.dark-mode #pos-companion-modal-root .pos-comp-hint,
body.dark-mode #pos-companion-modal-root .pos-comp-step-desc {
  color: #94a3b8;
}

body.dark-mode #pos-companion-modal-root .pos-comp-qr-toggle {
  background-color: #1e293b;
}

body.dark-mode #pos-companion-modal-root .pos-comp-qr-tab {
  color: #cbd5e1 !important;
}

body.dark-mode #pos-companion-modal-root .pos-comp-pair-grid,
body.dark-mode #pos-companion-modal-root .pos-comp-step-card,
body.dark-mode #pos-companion-modal-root .pos-comp-peer-row,
body.dark-mode #pos-companion-modal-root .pos-comp-chip,
body.dark-mode #pos-companion-modal-root .pos-lan-log-box {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-mode #pos-companion-modal-root .pos-comp-pin-val {
  color: #60a5fa;
}

body.dark-mode #pos-companion-modal-root .pos-comp-url-input,
body.dark-mode #pos-companion-modal-root .pos-comp-textarea,
body.dark-mode #pos-companion-modal-root .pos-comp-code-pill,
body.dark-mode #pos-companion-modal-root .pos-comp-mini-btn,
body.dark-mode #pos-companion-modal-root .pos-comp-btn-subtle,
body.dark-mode #pos-companion-modal-root .pos-comp-btn-outline {
  background-color: #0f172a !important;
  border-color: #475569 !important;
  color: #f1f5f9 !important;
}

body.dark-mode #pos-companion-modal-root .pos-comp-peer-title,
body.dark-mode #pos-companion-modal-root .pos-comp-udp-status {
  color: #a7f3d0;
}

body.dark-mode #pos-companion-modal-root .pos-comp-step-head,
body.dark-mode #pos-companion-modal-root .pos-comp-mesh-status {
  color: #c7d2fe;
}

body.dark-mode #pos-companion-modal-root .pos-comp-empty-peers {
  background-color: rgba(15, 23, 42, 0.6);
  border-color: #334155;
  color: #94a3b8;
}

body.dark-mode #pos-companion-modal-root .pos-lan-log-row {
  color: #cbd5e1;
}

/* ==========================================================================
   BODEGAPRO v83 - MOTOR DE PALETA ÚNICA EJECUTIVA (ROYAL BLUE + SLATE)
   Unifica todos los menús, submenús, pestañas, botones y KPIs en Claro y Oscuro
   ========================================================================== */

/* 1. Anillo de foco limpio (sin bordes negros bruscos al hacer clic en pestañas) */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
}

/* 2. Acentos de bordes laterales KPI garantizados (evita bordes negros no compilados) */
.border-l-blue-600 {
  border-left-color: #2563eb !important;
}

.border-l-emerald-500,
.border-emerald-500 {
  border-left-color: #10b981 !important;
}

.border-l-amber-500 {
  border-left-color: #f59e0b !important;
}

.border-l-red-500,
.border-red-500 {
  border-left-color: #ef4444 !important;
}

/* 3. Unificación de sub-pestañas Depósito y controles Traspasos -> Royal Blue único */
.deposito-tab-btn.is-active-deposito,
.deposito-tab-btn.is-active-receive,
.deposito-tab-btn.is-active-transfers,
.deposito-tab-btn.is-active-history {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.14) !important;
}

body.dark-mode .deposito-tab-btn.is-active-deposito,
body.dark-mode .deposito-tab-btn.is-active-receive,
body.dark-mode .deposito-tab-btn.is-active-transfers,
body.dark-mode .deposito-tab-btn.is-active-history {
  background: rgba(37, 99, 235, 0.24) !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}

.transfer-dir-btn.is-active-dep-to-piso,
.transfer-dir-btn.is-active-piso-to-dep {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  color: #1e40af !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16) !important;
}

body.dark-mode .transfer-dir-btn.is-active-dep-to-piso,
body.dark-mode .transfer-dir-btn.is-active-piso-to-dep {
  background: rgba(37, 99, 235, 0.26) !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}

.transfer-qty-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.transfer-qty-chip.chip-accent {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.transfer-qty-chip.chip-accent:hover {
  background: #dbeafe !important;
}

body.dark-mode .transfer-qty-chip.chip-accent {
  background: rgba(37, 99, 235, 0.28) !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}

.transfer-execute-cta {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
}

.transfer-execute-cta:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.38) !important;
}

/* 4. Unificación Botón Live Commerce Studio (Admin) -> Royal Blue sobrio */
#admin-panel-root .admin-header-live-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.26) !important;
}

/* 5. Unificación Tasa Reposición (Header) -> Slate neutral coherente con BCV Royal Blue */
.rate-badge-parallel {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

body.dark-mode .rate-badge-parallel {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

/* 6. Unificación Cierre de Caja (Liquidez -> Royal Blue; botón Gasto -> Slate limpio con acento ámbar) */
.cc-kpi-liquid,
.cc-kpi-liquidity {
  border-left-color: #2563eb !important;
}

.cc-kpi-liquid .text-purple-600,
.cc-kpi-liquid .text-purple-700,
.cc-kpi-liquidity .text-purple-600,
.cc-kpi-liquidity .text-purple-700 {
  color: #2563eb !important;
}

body.dark-mode .cc-kpi-liquid .text-purple-600,
body.dark-mode .cc-kpi-liquid .text-purple-700,
body.dark-mode .cc-kpi-liquidity .text-purple-600,
body.dark-mode .cc-kpi-liquidity .text-purple-700 {
  color: #60a5fa !important;
}

.cc-action-amber {
  background: #fffbeb !important;
  color: #b45309 !important;
  border-color: #fcd34d !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

.cc-action-amber:hover {
  background: #fef3c7 !important;
  color: #92400e !important;
}

body.dark-mode .cc-action-amber {
  background: rgba(217, 119, 6, 0.2) !important;
  color: #fde68a !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

/* 7. SuperAdmin: Acciones Secundarias Unificadas + Radar en Vivo Modo Oscuro */
.sa-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}

.sa-action-secondary:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

body.dark-mode .sa-action-secondary {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

body.dark-mode .sa-action-secondary:hover {
  background: rgba(37, 99, 235, 0.24) !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}

body.dark-mode #sa-sidebar {
  background-color: #0f172a !important;
  border-right-color: #1e293b !important;
}

body.dark-mode #sa-sidebar .sa-nav-item:not(.active) {
  color: #cbd5e1 !important;
}

body.dark-mode #sa-sidebar .sa-nav-item:not(.active):hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

body.dark-mode #tab-btn-directory:not(.border-blue-600),
body.dark-mode #tab-btn-receivables:not(.border-blue-600) {
  background-color: transparent !important;
  color: #94a3b8 !important;
}

body.dark-mode #tab-btn-directory.border-blue-600,
body.dark-mode #tab-btn-receivables.border-blue-600 {
  background-color: rgba(37, 99, 235, 0.2) !important;
  color: #93c5fd !important;
}

.sa-live-radar-header {
  background: linear-gradient(90deg, #f0fdf4 0%, #f8fafc 65%, #ffffff 100%);
}

body.dark-mode .sa-live-radar-header {
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.32) 0%, #1e293b 70%, #1e293b 100%) !important;
}

body.dark-mode .sa-live-radar-header h3,
body.dark-mode .sa-live-radar-header p {
  color: #e2e8f0 !important;
}

/* 8. Header Móvil (< 640px): Modo Ayuda en cápsula compacta de ícono sin recortes */
@media (max-width: 639.98px) {
  .unified-header #header-help-mode-btn {
    padding: 0.25rem 0.42rem !important;
    min-width: 30px !important;
    width: auto !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  .unified-header #header-help-mode-btn>*:not(:first-child) {
    display: none !important;
  }
}

/* 9. Superficie Modo Oscuro unificada para Menú Inferior Móvil y Título Driver */
body.dark-mode #mobile-nav-menu {
  background-color: #0f172a !important;
  border-top-color: #1e293b !important;
}

body.dark-mode #driver-view .page-title,
body.dark-mode .page-title {
  color: #f8fafc !important;
}

body.dark-mode #driver-view .page-subtitle,
body.dark-mode .page-subtitle {
  color: #94a3b8 !important;
}

/* ==========================================================================
   BODEGAPRO v84 - MOTOR INTEGRAL DE CONTRASTE, DARK MODE Y UTILIDADES BASE
   Garantiza legibilidad WCAG AA+ en todos los menús, submenús, badges y modales
   ========================================================================== */

/* 1. Red de seguridad para utilidades Tailwind no compiladas (evita botones blancos/invisibles) */
.bg-sky-600 {
  background-color: #2563eb !important;
}

.bg-sky-600:hover,
.hover\:bg-sky-700:hover {
  background-color: #1d4ed8 !important;
}

.bg-slate-800 {
  background-color: #1e293b !important;
}

.bg-slate-700 {
  background-color: #334155 !important;
}

.bg-rose-500 {
  background-color: #ef4444 !important;
}

.bg-rose-600 {
  background-color: #dc2626 !important;
}

.bg-amber-600 {
  background-color: #d97706 !important;
}

.bg-amber-600:hover,
.hover\:bg-amber-700:hover {
  background-color: #b45309 !important;
}

.bg-black\/65 {
  background-color: rgba(15, 23, 42, 0.84) !important;
}

/* 2. Admin Panel: Botón Ojo de Contraseña siempre alineado a la derecha sin pisar texto */
#admin-panel-root .admin-pw-input {
  padding-right: 2.6rem !important;
}

#admin-panel-root .admin-pw-eye-btn {
  position: absolute !important;
  right: 0.4rem !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.5rem !important;
}

/* 3. Lista de Productos Desktop (>= 1024px): ajuste compacto para que ACCIONES nunca se recorte */
@media (min-width: 1024px) {

  #product-table th,
  #product-table td {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* 4. Agregar Producto - Tarjeta "Precio (Tiempo Real)" en Modo Oscuro */
body.dark-mode .price-preview-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-mode .price-preview-card h3,
body.dark-mode .price-preview-card strong {
  color: #f8fafc !important;
}

body.dark-mode .price-preview-card span {
  color: #cbd5e1 !important;
}

body.dark-mode .price-preview-card hr {
  border-color: #334155 !important;
}

body.dark-mode .price-preview-card #preview-sale-price-bs {
  color: #60a5fa !important;
}

body.dark-mode .price-preview-card #preview-profit-usd,
body.dark-mode .price-preview-card #preview-margin-percent {
  color: #34d399 !important;
}

/* 5. Depósito - Entrada de Proveedores: Stock Bajo en Anaquel (Modo Oscuro) */
body.dark-mode .card-title {
  color: #f8fafc !important;
}

body.dark-mode .card-title.text-red-600 {
  color: #f87171 !important;
}

body.dark-mode .low-stock-item {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #f1f5f9 !important;
}

body.dark-mode .low-stock-item:hover {
  background-color: #1e293b !important;
  border-color: #475569 !important;
}

/* 6. Monitor de Envíos: pestañas Rastreo / Liquidación en Modo Oscuro */
body.dark-mode #tab-delivery-tracking:not(.text-blue-600),
body.dark-mode #tab-driver-checkout:not(.text-blue-600) {
  background-color: transparent !important;
  color: #94a3b8 !important;
}

body.dark-mode #tab-delivery-tracking.text-blue-600,
body.dark-mode #tab-driver-checkout.text-blue-600 {
  background-color: rgba(37, 99, 235, 0.24) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

/* 7. SuperAdmin Auditoría: pestañas tácticas (.audit-tab-btn) en Claro y Oscuro */
.audit-tab-btn {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
}

.audit-tab-btn.active {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

body.dark-mode .audit-tab-btn {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-mode .audit-tab-btn:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-mode .audit-tab-btn.active {
  background-color: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* 8. Motor Global de Badges, Píldoras y Superficies Pastel en Modo Oscuro (WCAG AA+) */
body.dark-mode .bg-blue-100,
body.dark-mode .bg-blue-50 {
  background-color: rgba(30, 58, 138, 0.42) !important;
  border-color: rgba(59, 130, 246, 0.42) !important;
}

body.dark-mode .bg-indigo-100,
body.dark-mode .bg-indigo-50 {
  background-color: rgba(30, 58, 138, 0.42) !important;
  border-color: rgba(96, 165, 250, 0.42) !important;
}

body.dark-mode .bg-purple-100,
body.dark-mode .bg-purple-50 {
  background-color: rgba(51, 65, 85, 0.72) !important;
  border-color: rgba(148, 163, 184, 0.38) !important;
}

body.dark-mode .bg-emerald-100,
body.dark-mode .bg-emerald-50,
body.dark-mode .bg-green-100,
body.dark-mode .bg-green-50 {
  background-color: rgba(6, 78, 59, 0.48) !important;
  border-color: rgba(16, 185, 129, 0.42) !important;
}

body.dark-mode .bg-amber-100,
body.dark-mode .bg-amber-50,
body.dark-mode .bg-yellow-100,
body.dark-mode .bg-yellow-50 {
  background-color: rgba(120, 53, 15, 0.48) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

body.dark-mode .bg-red-100,
body.dark-mode .bg-red-50,
body.dark-mode .bg-rose-100,
body.dark-mode .bg-rose-50 {
  background-color: rgba(127, 29, 29, 0.5) !important;
  border-color: rgba(239, 68, 68, 0.42) !important;
}

body.dark-mode .bg-sky-100,
body.dark-mode .bg-sky-50,
body.dark-mode .bg-cyan-100,
body.dark-mode .bg-cyan-50 {
  background-color: rgba(30, 58, 138, 0.42) !important;
  border-color: rgba(56, 189, 248, 0.42) !important;
}

body.dark-mode .bg-slate-50,
body.dark-mode .bg-slate-50\/80,
body.dark-mode .bg-slate-100 {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .bg-white\/95 {
  background-color: rgba(15, 23, 42, 0.92) !important;
  color: #f8fafc !important;
}

/* Textos oscuros sobre superficies oscuras -> elevar luminosidad en Modo Oscuro */
body.dark-mode .text-blue-700,
body.dark-mode .text-blue-800,
body.dark-mode .text-indigo-700,
body.dark-mode .text-indigo-800,
body.dark-mode .text-cyan-700,
body.dark-mode .text-cyan-800,
body.dark-mode .text-sky-700,
body.dark-mode .text-sky-800 {
  color: #93c5fd !important;
}

body.dark-mode .text-purple-700,
body.dark-mode .text-purple-800 {
  color: #cbd5e1 !important;
}

body.dark-mode .text-emerald-700,
body.dark-mode .text-emerald-800,
body.dark-mode .text-green-700,
body.dark-mode .text-green-800 {
  color: #6ee7b7 !important;
}

body.dark-mode .text-amber-700,
body.dark-mode .text-amber-800,
body.dark-mode .text-amber-900,
body.dark-mode .text-yellow-700,
body.dark-mode .text-yellow-800 {
  color: #fde68a !important;
}

body.dark-mode .text-red-700,
body.dark-mode .text-red-800,
body.dark-mode .text-rose-700,
body.dark-mode .text-rose-800 {
  color: #fca5a5 !important;
}

body.dark-mode .text-slate-700,
body.dark-mode .text-slate-800 {
  color: #e2e8f0 !important;
}

/* 9. SuperAdmin: Tarjetas KPI con gradiente claro -> superficie oscura limpia (sin esquina blanca) */
body.dark-mode #sa-content-area .bg-gradient-to-br,
body.dark-mode #sa-content-area .bg-gradient-to-r {
  background-image: none !important;
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

/* 10. Cabecera Global en Modo Oscuro: píldoras Modo Ayuda, DESCARGAS y LEER legibles */
body.dark-mode #header-help-mode-btn {
  background: rgba(120, 53, 15, 0.42) !important;
  border-color: rgba(245, 158, 11, 0.55) !important;
  color: #fde68a !important;
}

body.dark-mode #header-downloads-btn,
body.dark-mode #header-pwa-install-btn {
  background: rgba(6, 78, 59, 0.45) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #a7f3d0 !important;
}

body.dark-mode #header-legal-btn {
  background: rgba(30, 58, 138, 0.45) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: #bfdbfe !important;
}