@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  /* Stitch - The Midnight Sommelier Palette (Dark Mode) */
  --bg-app: #0e0e0e; /* Absolute Deep Black */
  --bg-card: rgba(26, 26, 26, 0.4);
  --bg-sidebar: rgba(19, 19, 19, 0.6);
  
  /* Text - High Contrast for Dark Mode */
  --text-primary: #ffffff;
  --text-secondary: #adaaaa;
  --text-muted: #767575;
  
  /* Brand Colors - Neon Nocturnal */
  --primary: #d095ff; /* Electric Purple */
  --primary-glow: rgba(208, 149, 255, 0.4);
  
  --secondary: #00e3fd; /* Radiant Cyan */
  --secondary-glow: rgba(0, 227, 253, 0.4);
  
  --accent: #ffbd5c; /* Neon Amber */
  --accent-glow: rgba(255, 189, 92, 0.4);
  
  /* Functional */
  --success: #00e3fd; /* Cyan used for success in the new system */
  --danger: #ff6e84;
  --warning: #ffbd5c;
  --info: #00e3fd;
  
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-light: rgba(255, 255, 255, 0.05);
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Manrope', 'Inter', sans-serif;
  
  --glass-bg: rgba(26, 26, 26, 0.4);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);
  --glass-blur: blur(20px);
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(208, 149, 255, 0.05);
}

/* White Mode (Opcional) - Refined */
body.light-mode {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --primary: #7c3aed; /* Vibrant Purple */
  --primary-glow: rgba(124, 58, 237, 0.15);
  
  --secondary: #0ea5e9;
  --secondary-glow: rgba(14, 165, 233, 0.15);
  
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.15);
  
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: 1px solid rgba(0, 0, 0, 0.05);
  --glass-blur: blur(10px);
  --border-light: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.1);
}

body.light-mode h1, body.light-mode h2, body.light-mode h3, body.light-mode h4, body.light-mode h5, body.light-mode h6 {
  color: #1e293b;
}

body.light-mode .text-white:not(.btn-modern), 
body.light-mode .text-white:not(.btn) {
  color: #1e293b !important;
}

body.light-mode .sidebar {
  background: white;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.02);
}

body.light-mode .nav-item {
  color: #64748b;
}

body.light-mode .nav-item:hover {
  background: rgba(124, 58, 237, 0.05);
  color: var(--primary);
}

body.light-mode .nav-item.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--primary);
  box-shadow: none;
}

body.light-mode .user-profile {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .user-profile #userInfo {
  color: #1e293b !important;
}

body.light-mode .brand-text {
  color: var(--primary);
  text-shadow: none;
}

body.light-mode .input-modern, 
body.light-mode .input-group .form-control {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}


body.light-mode .input-modern:focus {
  background: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1) !important;
}

/* Fix for Table appearance in Light Mode */
body.light-mode .table-premium thead th {
  background: #f1f5f9;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}

body.light-mode .table-premium tbody tr {
  background: #ffffff;
  border-bottom: 1px solid #f8fafc;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

body.light-mode .table-premium tbody tr:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

body.light-mode #tablesMapContainer {
  background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
}

body.light-mode #tableDetailPanel {
  background: #ffffff;
  border-left: 1px solid #e2e8f0 !important;
  box-shadow: -10px 0 30px rgba(0,0,0,0.05);
}

body.light-mode .bg-blob {
  opacity: 0.08;
}

body.light-mode .product-card {
  background: white;
  border-color: #e2e8f0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

body.light-mode .product-card:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

body.light-mode .pos-cart {
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
}

body.light-mode .cart-header, 
body.light-mode .cart-footer {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .cart-item {
  background: #ffffff;
  border-color: #f1f5f9;
}

body.light-mode .cart-total {
  color: #1e293b;
  text-shadow: none;
}

body.light-mode #inventario > div:first-child {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

body.light-mode .uppercase-tracking {
  color: #64748b !important;
}

body.light-mode .product-img-mini {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

body.light-mode .badge.bg-glass {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-mode #productDrawer {
  background: #ffffff !important;
  border-left: 1px solid #e2e8f0 !important;
}

* {
  box-sizing: border-box;
  outline: none;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-main);
  margin: 0;
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.2s ease;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 25%), 
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08) 0%, transparent 25%);
}

/* Background Animation */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  z-index: -1;
  animation: pulse-glow 10s infinite alternate;
  transition: opacity 0.5s ease;
}

.blob-1 {
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--primary), transparent 70%);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--secondary), transparent 70%);
}

@keyframes pulse-glow {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.4; transform: scale(1.1); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color 0.3s ease;
}
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hover-opacity-100:hover {
  opacity: 1 !important;
}

.text-accent {
  color: var(--accent) !important;
}

.text-primary { color: var(--primary) !important; }

/* Glassmorphism Components */
.glass-panel, .card-modern, .modal-content {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--card-shadow);
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Luminous edge highlight */
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width, 248px);
  min-width: var(--sidebar-width, 248px);
  flex-shrink: 0; /* Prevents sidebar from shrinking */
  height: 100vh;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
  z-index: 50;
  position: relative;
  transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0 0.2rem;
  position: relative;
  min-width: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
  text-transform: uppercase;
}

.sidebar-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.sidebar-select-wrap {
  transition: opacity 0.2s ease, transform 0.2s ease, margin 0.2s ease;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.nav-menu::-webkit-scrollbar {
  width: 4px;
}
.nav-menu::-webkit-scrollbar-track {
  background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.nav-item {
  padding: 0.65rem 1rem;
  border-radius: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 500;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0 4px 4px 0;
}

.nav-item i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
  transition: none !important;
  position: relative;
  z-index: 2;
}

.nav-item span {
  position: relative;
  z-index: 2;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  padding-left: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-item:hover i {
  color: var(--primary);
  transform: scale(1.1);
  text-shadow: 0 0 10px var(--primary-glow);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(208, 149, 255, 0.15), rgba(208, 149, 255, 0.05));
  border: 1px solid rgba(208, 149, 255, 0.3);
  color: #fff;
  box-shadow: 0 0 30px rgba(208, 149, 255, 0.1), inset 0 0 20px rgba(208, 149, 255, 0.05);
}

.nav-item.active::before {
  opacity: 1;
  box-shadow: 0 0 10px var(--primary);
}

.nav-item.active i {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
  transform: scale(1.1);
}

.user-profile {
  background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 0.5rem;
    border-radius: 16px;
    border: var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.sidebar.is-collapsed {
  padding: 1.5rem 0.85rem;
}

.sidebar.is-collapsed .sidebar-top {
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sidebar.is-collapsed .brand {
  margin-bottom: 0;
  padding: 0;
  justify-content: center;
}

.sidebar.is-collapsed .brand-text,
.sidebar.is-collapsed .sidebar-select-wrap,
.sidebar.is-collapsed .user-profile-details,
.sidebar.is-collapsed #djMenuBadge {
  display: none;
}

.sidebar.is-collapsed .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

.sidebar.is-collapsed .nav-item {
  justify-content: center;
  gap: 0;
  padding: 1rem 0.85rem;
}

.sidebar.is-collapsed .nav-item span {
  width: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
}

.sidebar.is-collapsed .nav-item:hover {
  padding-left: 0.85rem;
}

.sidebar.is-collapsed .nav-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  font-size: 0.78rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.sidebar.is-collapsed .nav-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.sidebar.is-collapsed .user-profile {
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 0.5rem;
}

.sidebar.is-collapsed #themeToggle {
  margin-right: 0 !important;
}

/* Main Layout */
.app-shell {
  --sidebar-width: 275px;
  --sidebar-mobile-width: min(74vw, 286px);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  width: 100%;
  min-width: 0;
  overflow: hidden; /* Prevent body scroll if contents expand */
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--bg-app);
  min-width: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.32s ease, box-shadow 0.32s ease;
}

.sidebar-mobile-toggle,
.sidebar-overlay,
.sidebar-swipe-zone {
  display: none;
}

.sidebar-mobile-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  left: 1rem;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1190;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-mobile-toggle:hover {
  transform: translateY(-1px);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(2, 6, 23, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 1180;
  transition: opacity 0.28s ease;
}

.sidebar-swipe-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 100dvh;
  z-index: 1170;
  background: transparent;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

.module-section {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 0; /* Updated to 0 to manage padding internally */
  animation: fadeIn 0.4s ease-out;
  min-width: 0;
}

.module-centered {
  display: block;
  padding-inline: clamp(1rem, 2vw, 2rem) !important;
}

.module-centered > * {
  width: 100%;
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
}

#hub.module-centered > * {
  max-width: 1220px;
}

.module-centered .row {
  margin-left: 0;
  margin-right: 0;
}

.module-centered .row > * {
  padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}

.pos-product-container {
  padding: 4rem 2rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Visual Effects */
@keyframes flashSuccess {
  0% { background-color: transparent; transform: scale(1); }
  50% { background-color: rgba(40, 167, 69, 0.3); transform: scale(1.02); }
  100% { background-color: transparent; transform: scale(1); }
}

@keyframes flashDanger {
  0% { background-color: transparent; transform: scale(1); }
  50% { background-color: rgba(220, 53, 69, 0.3); transform: scale(0.98); }
  100% { background-color: transparent; transform: scale(1); }
}

.effect-flash-success {
  animation: flashSuccess 0.4s ease-out;
}

.effect-flash-danger {
  animation: flashDanger 0.4s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE MODE)
   ========================================= */

@media (max-width: 899px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  
  .sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    flex-direction: row;
    padding: 1rem 0.75rem 0.2rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow: visible;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    z-index: 1050;
  }

  .sidebar-top {
    align-items: center;
    flex: 1 1 auto;
    min-width: auto;
  }

  .sidebar-toggle-btn {
    display: none;
  }

  .sidebar-select-wrap {
    width: auto;
    min-width: auto;
    max-width: 50%;
    margin-bottom: 0 !important;
    flex-shrink: 0;
    max-width: 150px;
  }
  
  .sidebar-select-wrap .btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem !important;
    border-radius: 12px !important;
  }
  .sidebar-select-wrap .btn .fa-chevron-down {
    font-size: 0.7rem !important;
  }

  .sidebar .brand {
    padding: 0;
    margin-right: 0.5rem;
    border-bottom: none;
  }

  .sidebar .brand-text {
    display: block;
    max-width: none;
    font-size: 0.65rem !important;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.6rem;
  }
  
  .nav-item {
    margin-top: 0;
    padding: 0.5rem 0.75rem;
    min-width: unset;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
  }
  
  .nav-item span {
    display: block;
    font-size: 0.65rem;
    text-align: center;
    white-space: nowrap;
  }
  
  .sidebar::-webkit-scrollbar {
    height: 4px;
  }
  
  .sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
  }
  
  .user-profile {
    display: none;
  }

  .main-content {
    overflow: visible;
    min-height: 0;
  }
  
  .module-section {
    height: auto;
    min-height: calc(100dvh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .module-centered {
    display: block;
    padding-inline: 1rem !important;
  }

  .module-centered > * {
    width: 100%;
  }
  
  .d-flex.h-100 {
    flex-direction: column;
  }
  
  .pos-cart {
    width: 100%;
    height: 400px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  .table-map-item {
    transform: scale(0.8) translate(-50%, -50%);
  }
  
  #tableDetailPanel {
    width: 100%;
  }

  /* Reposition top-center-stack to bottom in mobile to prevent overlap */
  .top-center-stack {
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1070 !important;
  }

  /* Make notification dropdown open upward in mobile */
  .notification-dropdown {
    top: auto !important;
    bottom: calc(100% + 15px) !important;
  }
}

/* Cards */
.card-modern {
  border-radius: var(--border-radius);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.card-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Premium Inputs & Autofill Fix */
.input-modern, .input-group .form-control, input[type="text"], input[type="password"], input[type="email"], input[type="number"] {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  width: 100%;
  font-family: var(--font-main);
  transition: all 0.2s ease !important;
  font-size: 0.95rem;
}

/* Chrome/Safari Autofill Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 100px #0f172a inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-modern:focus, .input-group .form-control:focus, input:focus {
  border-color: var(--primary) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2), 0 0 20px rgba(139, 92, 246, 0.1) !important;
  outline: none !important;
  color: #fff !important;
}

.input-modern::placeholder, input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Buttons */
.btn-modern {
  padding: 0.875rem 1.75rem;
  border-radius: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

/* Custom Switch Toggle Style (Consistente y Profesional) */
#productTrackStock.form-check-input {
  width: 3rem !important;
  height: 1.5rem !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  cursor: pointer;
  background-image: none !important; /* Desactivar forzado previo */
  position: relative;
  transition: all 0.2s ease;
}

#productTrackStock.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

#productTrackStock.form-check-input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 1.1rem;
  height: 1.1rem;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#productTrackStock.form-check-input:checked::after {
  transform: translateX(1.4rem);
}

.form-switch .form-check-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255,255,255,0.6)'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-modern::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-modern:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(124, 58, 237, 0.5);
}

.btn-primary:hover {
  box-shadow: 0 15px 30px -5px rgba(124, 58, 237, 0.6);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #047857);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.5);
}

.btn-success:hover {
  box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.6);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.5);
}

.btn-danger:hover {
  box-shadow: 0 15px 30px -5px rgba(239, 68, 68, 0.6);
}

/* Toast Notifications */
.toast-modern {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 2rem;
  border-radius: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  border-top: 1px solid rgba(255,255,255,0.2);
  min-width: 320px;
  justify-content: center;
  font-weight: 600;
}

.toast-modern.success {
  border-bottom: 3px solid #10b981;
}

.toast-modern.error {
  border-bottom: 3px solid #ef4444;
}

.toast-modern.info {
  border-bottom: 3px solid #3b82f6;
}

.toast-modern.warning {
  border-bottom: 3px solid #f59e0b;
}

.animate-slide-up {
  animation: slideUpToast 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideUpToast {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.btn-modern:hover {
  transform: translateY(-4px);
  filter: brightness(1.1);
}

.btn-modern:active {
  transform: translateY(-1px);
}

/* Category Filter (POS) */
.category-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin-bottom: 2rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  min-height: 50px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 0.6rem 1.25rem;
  background: rgba(45, 45, 45, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #fff;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.category-actions {
  transition: opacity 0.2s;
  pointer-events: all;
}

.category-pill:hover .category-actions {
  opacity: 1 !important;
}

.category-actions i {
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer !important;
}

.category-actions i:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  transition: none !important;
}

.btn-glass:hover, .btn-glass.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 20px var(--primary-glow);
  transform: none;
}

.category-pill:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.3);
  transform: none;
}

.category-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Product Grid (POS) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.product-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.5), 
    0 8px 10px -6px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(139, 92, 246, 0.1); /* Subtle violet glow */
}

.product-card:hover::before {
  opacity: 1;
}

.product-img-container {
  height: 140px; /* Un poco mÃ¡s de altura para botellas */
  overflow: hidden;
  background: rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Mostrar la imagen completa sin recortar */
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: 5px; /* PequeÃ±o margen interno */
}

.product-img-mini {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}

.status-indicator-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
}
.status-indicator-pill.ok { background: rgba(0, 227, 253, 0.1); color: var(--secondary); }
.status-indicator-pill.low { background: rgba(255, 189, 92, 0.1); color: var(--accent); }

.btn-icon-glass {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.03);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none !important;
}
.btn-icon-glass:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: none;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.z-max { z-index: 99999; }

#productDrawer {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-image {
  height: 140px;
  width: 100%;
  object-fit: contain !important;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
  transition: transform 0.4s ease;
}

.product-image.d-flex {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.product-card:hover .product-image {
  transform: scale(1.15) rotate(3deg);
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

.product-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.product-price {
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  display: inline-block;
  transition: none !important;
}

.product-card:hover .product-price {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  transform: scale(1.05);
}

.inventory-cards {
  display: grid;
  gap: 1rem;
}

.inventory-view-list {
  grid-template-columns: 1fr;
}

.inventory-view-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  min-width: 0;
}

.inventory-card-media {
  width: 84px;
  min-width: 84px;
  height: 84px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.inventory-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.inventory-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.inventory-card-title {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.inventory-card-subtitle {
  color: rgba(148, 163, 184, 0.9);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.inventory-stock-badge {
  font-size: 0.72rem;
  flex-shrink: 0;
}

.inventory-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.inventory-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.inventory-meta-label {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inventory-meta-value {
  color: rgba(226, 232, 240, 0.95);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: auto;
}

#inventoryViewListBtn.active,
#inventoryViewGridBtn.active {
  background: rgba(124, 58, 237, 0.18) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

@media (max-width: 1199px) {
  .inventory-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .inventory-view-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-card {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .inventory-card-media {
    width: 100%;
    min-width: 0;
    height: 100px;
  }

  .inventory-card-body {
    gap: 0.6rem;
  }

  .inventory-card-head {
    gap: 0.5rem;
  }

  .inventory-card-title {
    font-size: 0.9rem;
  }

  .inventory-card-subtitle {
    font-size: 0.7rem;
  }

  .inventory-card-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .inventory-meta-label {
    font-size: 0.65rem;
  }

  .inventory-meta-value {
    font-size: 0.8rem;
  }

  .inventory-card-actions {
    justify-content: flex-start;
  }
}

/* POS Cart */
.pos-cart {
  width: 400px;
  background: rgba(10, 10, 15, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(30px);
  box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  z-index: 40;
}

.cart-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cart-items {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  min-height: 180px;
}

.cart-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 0.5rem;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}

.pos-cart-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.pos-cart-summary-item {
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pos-cart-summary-item strong {
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.25;
}

.pos-checkout-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(8, 12, 24, 0.96);
  backdrop-filter: blur(24px);
  padding: 1rem;
}

.pos-checkout-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pos-checkout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pos-checkout-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pos-checkout-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.pos-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pos-checkout-change {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-checkout-change span:last-child {
  font-size: 1.5rem;
}

.pos-checkout-actions {
  display: flex;
  gap: 0.75rem;
}

.table-detail-workspace {
  min-height: 0;
}

.table-order-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
}

.table-order-toolbar-copy {
  min-width: 0;
}

.table-product-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.table-product-drawer {
  position: absolute;
  top: 14px;
  bottom: 14px;
  right: calc(var(--table-panel-width, 600px) + 14px);
  width: min(420px, 34vw);
  z-index: 115;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-product-drawer.d-none {
  display: none !important;
}

/* New Layout Styles */
.table-main-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.table-order-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.table-product-drawer {
  width: 0;
  flex: 0 0 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(15, 23, 42, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.table-product-drawer-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  min-width: 450px; /* Ensure content doesn't squish during transition */
}

/* ============================================================
   Mesa v2 — layout estilo POS (productos izquierda, ticket derecha)
   ============================================================ */
@media (min-width: 992px) {
  #tableDetailPanel {
    width: 100% !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #tableDetailPanel .table-main-layout {
    flex-direction: row-reverse; /* Order va a la derecha, productos a la izquierda */
  }
  #tableDetailPanel .table-order-section {
    flex: 0 0 440px;
    border-left: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.18);
  }
  #tableDetailPanel .table-product-drawer,
  #tableDetailPanel .table-product-drawer.d-none {
    position: static !important;
    display: flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
    border-left: 0;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    padding: 0;
  }
  #tableDetailPanel .table-product-drawer-shell {
    padding: 1.25rem 1.5rem;
    min-width: 0 !important;
  }
  /* Oculta el botón "Productos" y el pin "Mantener abierto" porque ya no aplican */
  #tableDetailPanel #btnToggleProductDrawer,
  #tableDetailPanel .table-drawer-preference { display: none !important; }
}

@media (max-width: 991px) {
  #tableDetailPanel {
    width: 100% !important;
  }
  
  .table-product-drawer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    background: var(--bg-dark);
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
  
  #tableDetailPanel.expanded .table-product-drawer {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
    visibility: visible;
  }

  .table-product-drawer-shell {
    min-width: 100%;
    padding: 1.25rem;
  }
}

.table-product-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.table-product-picker-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
}


.table-product-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.table-product-drawer-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(10,16,30,0.96), rgba(5,10,20,0.92));
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  pointer-events: auto;
}

.table-product-picker-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(10,16,30,0.98), rgba(10,16,30,0.92));
  padding-bottom: 0.35rem;
}

.table-drawer-preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.table-drawer-pin {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  font-weight: 600;
}

.table-drawer-pin input {
  accent-color: #8b5cf6;
}

.table-product-drawer #tableProductGrid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: flex-start;
  padding-right: 0.15rem;
}

/* ============================================================
   HISTORIAL v2 — nueva interfaz
   ============================================================ */
.historial-v2 {
  padding: 20px clamp(14px, 2.5vw, 32px);
  display: flex; flex-direction: column; gap: 16px;
}
.historial-v2 .historial-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px 22px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(14,165,233,0.10));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  flex-wrap: wrap;
}
.historial-hero-title { display: flex; align-items: center; gap: 16px; }
.historial-hero-title > i {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139,92,246,0.3); color: #fff; font-size: 1.3rem;
  box-shadow: 0 10px 26px rgba(139,92,246,0.3);
}
.historial-hero-title h2 { margin: 0; color: #fff; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.5px; }
.historial-hero-title p { margin: 2px 0 0; color: rgba(255,255,255,0.6); font-size: 0.82rem; }
.historial-hero-actions { display: flex; gap: 10px; align-items: center; flex: 1; justify-content: flex-end; min-width: 280px; }
.historial-search {
  position: relative; flex: 1; max-width: 360px;
}
.historial-search > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.45); pointer-events: none;
}
.historial-search input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px 10px 40px;
  font-size: 0.93rem;
}
.historial-search input:focus { outline: 0; border-color: rgba(139,92,246,0.6); background: rgba(255,255,255,0.1); }

.historial-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border: 0; border-radius: 12px;
  font-weight: 700; font-size: 0.9rem;
  cursor: pointer; transition: transform 0.15s, opacity 0.2s;
}
.historial-btn:hover:not(:disabled) { transform: translateY(-1px); }
.historial-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.historial-btn-excel { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.historial-btn-outline { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.15); padding: 8px 14px; font-size: 0.85rem; }
.historial-btn-outline:hover { background: rgba(255,255,255,0.1); }
.historial-btn-danger {
  background: rgba(239,68,68,0.12); color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.35);
  padding: 8px 14px; font-size: 0.85rem;
}
.historial-btn-danger:hover { background: rgba(239,68,68,0.22); color: #fff; border-color: rgba(239,68,68,0.6); }
.historial-cancelled-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5; font-size: 0.78rem; font-weight: 700;
}
.historial-sale[data-status="cancelled"] { opacity: 0.55; }
.historial-sale[data-status="cancelled"] .historial-sale-total { text-decoration: line-through; color: #fca5a5; }
.historial-btn-ghost {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.historial-btn-ghost:hover { background: rgba(139,92,246,0.15); color: #fff; }

/* Layout */
.historial-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 16px;
  flex: 1; min-height: 0;
}
.historial-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column; min-height: 0;
  overflow: hidden;
}
.historial-calendar-panel { padding: 18px; }
.historial-calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.historial-calendar-nav h5 { margin: 0; color: #fff; font-weight: 700; font-size: 1rem; }
.historial-calendar-legend {
  display: flex; gap: 12px; margin-top: 12px;
  font-size: 0.7rem; color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
}
.historial-calendar-legend em { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.historial-calendar-legend .dot-sales { background: var(--primary, #8b5cf6); box-shadow: 0 0 8px rgba(139,92,246,0.6); }
.historial-calendar-legend .dot-today { background: #f59e0b; }
.historial-calendar-legend .dot-selected { background: #fff; }

/* Details panel */
.historial-details-panel { padding: 0; }
.historial-details-head {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}
.historial-details-head h5 {
  margin: 0; color: #fff; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; gap: 10px;
}
.historial-details-head h5 > i { color: #a78bfa; }

/* KPIs */
.historial-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px 0;
}
.historial-kpi-grid:empty { display: none; }
.historial-kpi {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
}
.historial-kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: currentColor;
}
.historial-kpi-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: currentColor; flex-shrink: 0;
}
.historial-kpi-icon i { color: #fff; font-size: 0.95rem; }
.historial-kpi > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.historial-kpi-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.55); font-weight: 700; }
.historial-kpi-value { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.historial-kpi--sales { color: #8b5cf6; }
.historial-kpi--total { color: #10b981; }
.historial-kpi--avg { color: #0ea5e9; }
.historial-kpi--items { color: #f59e0b; }

/* Filters */
.historial-filters {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 20px 0; flex-wrap: wrap;
}
.historial-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.historial-chip {
  --pm-color: #8b5cf6;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.historial-chip i { font-size: 0.72rem; color: var(--pm-color); }
.historial-chip:hover { background: rgba(255,255,255,0.08); color: #fff; }
.historial-chip.is-active {
  background: color-mix(in srgb, var(--pm-color) 18%, transparent);
  border-color: var(--pm-color);
  color: #fff;
}
.historial-chip-count { opacity: 0.7; font-size: 0.7rem; font-weight: 700; }
.historial-sort { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.5); }
.historial-sort select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 6px 28px 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
/* Opciones oscuras (evita fondo blanco del browser por defecto) */
.historial-sort select option,
.gastos-input option,
.caja-input option { background: #1a1a2e; color: #fff; }

/* Modal buscador de imágenes — responsivo y alto completo */
.image-search-modal-body { height: min(70vh, 620px); }
@media (max-width: 767px) {
  .image-search-modal-wrap .modal-content { border-radius: 0 !important; height: 100dvh; }
  .image-search-modal-body { height: calc(100dvh - 58px) !important; }
}

/* Sales list */
.historial-sales-list {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px 20px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.historial-sales-list::-webkit-scrollbar { width: 6px; }
.historial-sales-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

.historial-sale {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.historial-sale:hover { border-color: rgba(139,92,246,0.3); }
.historial-sale-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer; gap: 16px;
}
.historial-sale-left { flex: 1; min-width: 0; }
.historial-sale-id {
  color: #fff; font-weight: 800; font-size: 0.92rem;
  display: flex; align-items: center; gap: 8px;
}
.historial-sale-time {
  font-size: 0.68rem; font-weight: 600;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px; border-radius: 99px;
  letter-spacing: 0.5px;
}
.historial-sale-customer { color: #a78bfa; font-size: 0.78rem; font-weight: 600; margin-top: 2px; }
.historial-sale-customer i { margin-right: 4px; opacity: 0.8; }
.historial-sale-preview {
  margin-top: 4px;
  color: rgba(255,255,255,0.6); font-size: 0.8rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.historial-sale-preview em { color: rgba(255,255,255,0.4); font-style: normal; }

.historial-sale-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.historial-sale-pms { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.historial-pm-badge {
  --pm-color: #8b5cf6;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--pm-color) 16%, transparent);
  color: color-mix(in srgb, var(--pm-color) 85%, white);
  font-size: 0.72rem; font-weight: 700;
}
.historial-pm-badge i { font-size: 0.7rem; }
.historial-sale-total { color: #10b981; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.3px; }
.historial-sale-caret {
  color: rgba(255,255,255,0.4); transition: transform 0.2s;
  font-size: 0.8rem;
}
.historial-sale.is-open .historial-sale-caret { transform: rotate(180deg); color: #a78bfa; }

.historial-sale-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 16px;
  border-top: 1px solid transparent;
}
.historial-sale.is-open .historial-sale-body {
  max-height: 600px;
  border-top-color: rgba(255,255,255,0.06);
  padding: 12px 16px 14px;
}
.historial-sale-items {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.historial-sale-items li {
  display: grid; grid-template-columns: 38px 1fr auto;
  gap: 10px; align-items: center;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.03);
  font-size: 0.85rem;
}
.historial-sale-items .qty { color: #a78bfa; font-weight: 700; text-align: center; }
.historial-sale-items .nm { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.historial-sale-items .pr { color: #10b981; font-weight: 700; }
.historial-sale-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.06);
}

/* Empty */
.historial-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 24px; gap: 8px; text-align: center;
  color: rgba(255,255,255,0.5);
}
.historial-empty i { font-size: 2.5rem; color: rgba(255,255,255,0.2); margin-bottom: 8px; }
.historial-empty h5 { color: #fff; margin: 0; font-weight: 700; }
.historial-empty p { margin: 0; font-size: 0.85rem; max-width: 320px; }

/* Mobile */
@media (max-width: 899px) {
  .historial-v2 { padding: 12px; gap: 12px; }
  .historial-v2 .historial-hero { padding: 14px; gap: 12px; }
  .historial-hero-title h2 { font-size: 1.2rem; }
  .historial-hero-actions { min-width: 0; width: 100%; }
  .historial-search { max-width: none; }
  .historial-grid { grid-template-columns: 1fr; gap: 12px; }
  .historial-calendar-panel { padding: 14px; }
  .historial-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 14px 0; }
  .historial-filters { padding: 12px 14px 0; }
  .historial-sort { width: 100%; }
  .historial-sort select { flex: 1; }
  .historial-sales-list { padding: 12px 14px 16px; }
  .historial-details-head { padding: 14px; }
  .historial-sale-head { padding: 12px; gap: 10px; }
  .historial-sale-right { gap: 8px; }
  .historial-sale-total { font-size: 0.95rem; }
  .historial-pm-badge { font-size: 0.68rem; padding: 2px 7px; }
}

/* ============================================================
   GASTOS v2 — nueva interfaz
   ============================================================ */
.gastos-v2 { padding: 24px clamp(16px, 3vw, 40px) 80px; }

.gastos-hero-v2 {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 26px; margin-bottom: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(245,158,11,0.10));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
}
.gastos-hero-v2-title { display: flex; align-items: center; gap: 18px; }
.gastos-hero-v2-title > i {
  width: 56px; height: 56px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(239,68,68,0.28); color: #fff; font-size: 1.4rem;
  box-shadow: 0 10px 30px rgba(239,68,68,0.30);
}
.gastos-hero-v2-title h2 { margin: 0; color: #fff; font-weight: 800; letter-spacing: -0.5px; font-size: 1.7rem; }
.gastos-hero-v2-title p { margin: 2px 0 0; color: rgba(255,255,255,0.6); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.2px; }
.gastos-hero-v2-side { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

/* Fields */
.gastos-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gastos-field > span {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.6); font-weight: 700;
}
.gastos-field > span small { opacity: 0.5; font-weight: 500; text-transform: none; letter-spacing: 0; }
.gastos-field--full { grid-column: 1 / -1; }

.gastos-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 1rem;
  font-weight: 500;
  width: 100%;
  transition: border-color 0.2s, background 0.2s;
}
.gastos-input:focus { outline: 0; border-color: rgba(239,68,68,0.55); background: rgba(255,255,255,0.08); }
.gastos-input-with-icon {
  position: relative;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding-left: 42px;
  transition: border-color 0.2s, background 0.2s;
}
.gastos-input-with-icon:focus-within { border-color: rgba(239,68,68,0.55); background: rgba(255,255,255,0.08); }
.gastos-input-with-icon > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.45); font-size: 0.95rem; pointer-events: none;
}
.gastos-input-with-icon .gastos-input { background: transparent; border: 0; padding: 11px 14px 11px 0; }
.gastos-input-with-icon .gastos-input:focus { background: transparent; }
.gastos-input-money-lg .gastos-input { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.3px; padding: 10px 14px 10px 0; }

/* Amount preview badge */
.gastos-amount-preview {
  text-align: right;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  min-width: 120px;
}
.gastos-amount-preview span { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.55); font-weight: 700; display: block; }
.gastos-amount-preview strong { display: block; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.3px; }

/* Layout grid */
.gastos-v2-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px;
}
.gastos-form-card { position: sticky; top: 1rem; align-self: start; }
.gastos-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gastos-card-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gastos-card-head h3 { margin: 0; color: #fff; font-weight: 800; font-size: 1.05rem; }
.gastos-card-head small { color: rgba(255,255,255,0.5); font-size: 0.75rem; }
.gastos-card-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(239,68,68,0.18); color: #f87171; flex-shrink: 0;
}

/* Preset chips */
.gastos-preset-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.gastos-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.gastos-chip i { font-size: 0.75rem; opacity: 0.7; }
.gastos-chip:hover { background: rgba(239,68,68,0.12); color: #fff; border-color: rgba(239,68,68,0.4); }
.gastos-chip.is-active {
  background: linear-gradient(135deg, rgba(239,68,68,0.3), rgba(245,158,11,0.2));
  color: #fff; border-color: rgba(239,68,68,0.5);
}

/* File upload */
.gastos-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gastos-upload-box {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.2s;
}
.gastos-upload-box:hover { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.06); }
.gastos-upload-box.has-file { border-style: solid; border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.08); }
.gastos-upload-box > i {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.gastos-upload-box.has-file > i { background: rgba(16,185,129,0.2); color: #10b981; }
.gastos-upload-text { color: rgba(255,255,255,0.75); font-size: 0.9rem; font-weight: 600; }
.gastos-upload-file { color: rgba(16,185,129,0.9); font-size: 0.8rem; margin-left: auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }

/* Tip */
.gastos-tip {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
}
.gastos-tip > i { color: #fbbf24; flex-shrink: 0; margin-top: 2px; }

/* Buttons */
.gastos-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border: 0; border-radius: 12px;
  font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.2s;
}
.gastos-btn:hover { transform: translateY(-1px); }
.gastos-btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 10px 24px rgba(239,68,68,0.3); padding: 14px 20px; font-size: 1rem; }
.gastos-btn-excel { background: linear-gradient(135deg, #10b981, #059669); color: #fff; padding: 10px 16px; height: 42px; align-self: flex-end; }
.gastos-btn-ghost {
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.08);
  width: 42px; height: 42px; padding: 0;
}
.gastos-btn-ghost:hover { background: rgba(239,68,68,0.12); color: #fff; border-color: rgba(239,68,68,0.4); }

/* Toolbar */
.gastos-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: nowrap;
  margin-bottom: 14px;
}
.gastos-toolbar-search { flex: 1 1 auto; min-width: 0; }
.gastos-toolbar-select { max-width: 200px; flex: 0 0 auto; }

/* Mobile */
@media (max-width: 899px) {
  .gastos-v2 { padding: 16px 12px 100px; }
  .gastos-hero-v2 {
    flex-direction: column; align-items: stretch; gap: 14px;
    padding: 16px;
  }
  .gastos-hero-v2-side { gap: 10px; align-items: stretch; }
  .gastos-hero-v2-side .gastos-field { flex: 1; }
  .gastos-hero-v2-title h2 { font-size: 1.3rem; }
  .gastos-v2-grid { grid-template-columns: 1fr; gap: 14px; }
  .gastos-form-card { position: static; }
  .gastos-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .gastos-toolbar { flex-wrap: wrap; }
  .gastos-toolbar-search { flex: 1 1 100%; }
  .gastos-toolbar-select { flex: 1; max-width: none; }
  .gastos-card-head { flex-wrap: wrap; }
  .gastos-amount-preview { width: 100%; text-align: left; margin-left: 0 !important; }
}

/* Shared wrapper (formulario + historial) */
.gastos-v2 .gastos-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 22px;
  backdrop-filter: blur(16px);
}
@media (max-width: 899px) {
  .gastos-v2 .gastos-panel { padding: 16px; border-radius: 16px; }
}

/* ============================================================
   CAJA v2 — nueva interfaz
   ============================================================ */
.caja-v2 { padding: 24px clamp(16px, 3vw, 40px) 80px; }

.caja-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  margin-bottom: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(14,165,233,0.12));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
}
.caja-hero-title { display: flex; align-items: center; gap: 18px; }
.caja-hero-title i {
  width: 56px; height: 56px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139,92,246,0.25); color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(139,92,246,0.35);
}
.caja-hero-title h2 {
  margin: 0; color: #fff; font-weight: 800; letter-spacing: -0.5px; font-size: 1.7rem;
}
.caja-hero-title p { margin: 2px 0 0; color: rgba(255,255,255,0.6); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.2px; }
.caja-hero-right { display: flex; gap: 14px; flex-wrap: wrap; }

.caja-field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.caja-field > span {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.55); font-weight: 700;
}
.caja-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  transition: border-color 0.2s, background 0.2s;
}
.caja-input:focus { outline: 0; border-color: rgba(139,92,246,0.6); background: rgba(255,255,255,0.08); }
.caja-input-money {
  position: relative;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0 10px 0 14px;
}
.caja-input-money i { color: rgba(255,255,255,0.5); font-size: 0.95rem; margin-right: 8px; }
.caja-input-money .caja-input { background: transparent; border: 0; padding: 10px 0; }
.caja-input-lg { padding: 4px 12px 4px 18px; }
.caja-input-lg i { font-size: 1.1rem; }
.caja-input-lg .caja-input { padding: 14px 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }

/* KPIs */
.caja-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.caja-kpi {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.caja-kpi:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.15); }
.caja-kpi::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: currentColor;
}
.caja-kpi-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: currentColor; opacity: 1; flex-shrink: 0;
  font-size: 1.2rem;
}
.caja-kpi-icon i { color: #fff; }
.caja-kpi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.caja-kpi-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.55); font-weight: 700; }
.caja-kpi-value { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; line-height: 1.1; word-break: break-word; }
.caja-kpi-sub { font-size: 0.7rem; color: rgba(255,255,255,0.4); }

.caja-kpi--sales { color: #10b981; }
.caja-kpi--expenses { color: #ef4444; }
.caja-kpi--expected { color: #0ea5e9; }
.caja-kpi--cash { color: #f59e0b; }

/* Grid arqueo + resumen */
.caja-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px;
  margin-bottom: 22px;
}
.caja-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 22px;
  backdrop-filter: blur(16px);
}
.caja-card-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.caja-card-head h3 { margin: 0; color: #fff; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.2px; }
.caja-card-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139,92,246,0.18); color: #a78bfa; flex-shrink: 0;
}

/* Steps */
.caja-step {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.caja-step:last-child { border-bottom: 0; padding-bottom: 0; }
.caja-step-num {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff; font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 6px 16px rgba(139,92,246,0.35);
}
.caja-step-body { flex: 1; min-width: 0; }
.caja-step-body strong { color: #fff; font-size: 0.98rem; display: block; margin-bottom: 2px; }
.caja-step-body p { color: rgba(255,255,255,0.55); font-size: 0.82rem; margin: 0 0 10px; }

.caja-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border: 0; border-radius: 14px;
  font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  width: 100%;
}
.caja-btn:hover { transform: translateY(-1px); }
.caja-btn-outline { background: rgba(255,255,255,0.04); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.caja-btn-outline:hover { background: rgba(255,255,255,0.08); }
.caja-btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 10px 24px rgba(16,185,129,0.3); }
.caja-btn-ghost {
  background: transparent; border: 0; color: rgba(255,255,255,0.6);
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.caja-btn-ghost:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Diferencia */
.caja-diff {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  transition: all 0.2s;
}
.caja-diff-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.caja-diff-value { margin-left: auto; font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.caja-diff--ok { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.4); color: #10b981; }
.caja-diff--ok .caja-diff-value { color: #10b981; }
.caja-diff--bad { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); color: #ef4444; }
.caja-diff--bad .caja-diff-value { color: #ef4444; }
.caja-diff--warn { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.4); color: #f59e0b; }
.caja-diff--warn .caja-diff-value { color: #f59e0b; }

/* Empty / summary */
.caja-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px; gap: 8px;
}
.caja-empty i { font-size: 2.2rem; color: rgba(255,255,255,0.2); margin-bottom: 6px; }
.caja-empty h5 { color: #fff; margin: 0; font-weight: 700; }
.caja-empty p { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin: 0; max-width: 320px; }
.caja-summary { min-height: 240px; }
.caja-history { margin-bottom: 22px; }

/* Mobile */
@media (max-width: 899px) {
  .caja-v2 { padding: 16px 12px 100px; }
  .caja-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .caja-hero-right { gap: 10px; }
  .caja-field { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .caja-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .caja-kpi { padding: 14px; gap: 12px; }
  .caja-kpi-icon { width: 40px; height: 40px; font-size: 1rem; }
  .caja-kpi-value { font-size: 1.1rem; }
  .caja-grid { grid-template-columns: 1fr; gap: 14px; }
  .caja-card { padding: 16px; border-radius: 16px; }
  .caja-hero-title h2 { font-size: 1.3rem; }
}

/* ===== Mobile POS bottom-sheet cart pattern ===== */
.mobile-cart-bar { display: none; }

@media (max-width: 899px) {
  /* Hide legacy mobile overrides on .pos-cart: we use fixed sheet instead */
  #ventas .pos-cart {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    border-left: 0 !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.55);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(.4,.0,.2,1), height 0.28s cubic-bezier(.4,.0,.2,1), max-height 0.28s cubic-bezier(.4,.0,.2,1);
    z-index: 1080;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  #ventas .pos-cart.cart-sheet-open {
    height: 92dvh !important;
    max-height: 92dvh !important;
    min-height: 0 !important;
    transform: translateY(0);
  }
  #ventas .cart-sheet-handle {
    display: block !important;
    width: 42px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255,255,255,0.2);
    margin: 8px auto 2px;
    flex-shrink: 0;
  }
  #ventas .cart-close-btn { display: inline-flex !important; }
  /* Summary bar visible only in ventas */
  #ventas .mobile-cart-bar { display: flex !important; }
  body .mobile-cart-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem 0.6rem 0.6rem;
    background: linear-gradient(135deg, rgba(16,185,129,0.95), rgba(5,150,105,0.95));
    color: #fff;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
    z-index: 1070;
    transition: transform 0.25s, opacity 0.25s;
  }
  body .mobile-cart-bar:disabled,
  body .mobile-cart-bar.is-empty {
    background: rgba(30,41,59,0.9);
    color: rgba(255,255,255,0.6);
  }
  .mobile-cart-bar-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }
  .mobile-cart-bar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.25);
    font-weight: 800;
    font-size: 0.95rem;
  }
  .mobile-cart-bar-label { font-weight: 600; font-size: 0.92rem; }
  .mobile-cart-bar-total {
    margin-left: auto;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.3px;
  }
  .mobile-cart-bar-cta {
    font-weight: 800;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.25);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
  }
  /* Hide bar while sheet is open */
  #ventas.cart-open-state .mobile-cart-bar {
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
  }
  /* Backdrop */
  #ventas .cart-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 1075;
  }
  #ventas.cart-open-state .cart-sheet-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  /* Ensure cart internal layout works inside sheet */
  #ventas .pos-cart .cart-items { min-height: 0; flex: 1 1 auto; }
  /* Leave room above the floating bar so last products aren't hidden */
  #ventas .pos-product-container {
    padding-bottom: 88px !important;
  }
}

/* Lista de items en mesas: scroll propio para no empujar el grid/cobrar */
#tableOrderItems {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(-2px);
}

.cart-footer {
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.9rem 1.25rem 1rem;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.cart-footer .mb-2 { margin-bottom: 0.35rem !important; }
.cart-footer .mb-3 { margin-bottom: 0.5rem !important; }
.cart-footer .mb-4 { margin-bottom: 0.6rem !important; }
.cart-footer .btn.py-3 { padding-top: 0.6rem !important; padding-bottom: 0.6rem !important; }
.cart-footer .btn.py-2 { padding-top: 0.45rem !important; padding-bottom: 0.45rem !important; }

.cart-total {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  text-align: right;
  margin: 0.35rem 0 0.6rem;
  text-shadow: 0 0 20px rgba(255,255,255,0.1);
  letter-spacing: -0.5px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.cart-total > span:first-child { font-size: 1rem; font-weight: 600; opacity: 0.75; }

/* Brand Logo */
.brand-logo {
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 10px rgba(236, 72, 153, 0.3); /* Neon glow */
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
  object-fit: cover;
}

.brand-logo:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5), 0 0 15px rgba(236, 72, 153, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.brand-logo-sm {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
  object-fit: cover;
}

/* Premium Tables */
.table-premium {
  --bs-table-bg: transparent;
  --bs-table-color: #e2e8f0;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.table-premium thead th {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem;
  border: none;
}

.table-premium thead th:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.table-premium thead th:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

.table-premium tbody tr {
  background: rgba(30, 41, 59, 0.4);
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-premium tbody tr:hover {
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.table-premium td {
  border: none;
  padding: 1rem;
  vertical-align: middle;
}

.table-premium td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.table-premium td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

.badge-stock {
  padding: 0.35em 0.8em;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-stock.low {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.badge-stock.ok {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.product-img-cell {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Animations */




/* Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
  background: rgba(208, 149, 255, 0.2); 
  border-radius: 10px; 
  border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover { background: rgba(208, 149, 205, 0.4); }



/* Utilities & Overrides */
.text-success { color: #34d399 !important; text-shadow: 0 0 10px rgba(52, 211, 153, 0.3); }
.text-danger { color: #f87171 !important; text-shadow: 0 0 10px rgba(248, 113, 113, 0.3); }
.bg-dark { background-color: rgba(0,0,0,0.3) !important; }

/* Custom Form Styles for Glass Theme */
.card-title-icon-glass {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.premium-summary-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent 70%);
  filter: blur(40px);
}

.dj-toolbar {
  background: rgba(255, 255, 255, 0.02);
}

#dj.module-section {
  overflow-x: hidden;
  overflow-y: auto;
}

.dj-workspace {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  min-height: 720px;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 24%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(1, 6, 18, 0.98), rgba(3, 7, 18, 1));
}

.dj-workspace.dj-console-shell {
  overflow: visible !important;
}

.dj-workspace-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(7, 11, 24, 0.98), rgba(5, 10, 22, 0.9));
}

.dj-workspace-brand {
  max-width: 720px;
}

.dj-workspace-brand h5 {
  font-size: 1.55rem;
}

.dj-workspace-brand p {
  max-width: 540px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.dj-workspace-actions {
  min-width: 0;
}

.dj-action-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.dj-action-strip::-webkit-scrollbar {
  display: none;
}

.dj-workspace-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.dj-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.dj-meta-badge-primary {
  color: #7dd3fc;
  border-color: rgba(59, 130, 246, 0.26);
  background: rgba(37, 99, 235, 0.12);
}

.dj-meta-live {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.12);
}

.dj-meta-live i {
  font-size: 0.5rem;
}

.dj-workspace-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(760px, 1.6fr) minmax(300px, 0.88fr);
  grid-template-areas: "queue stage tools";
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.dj-column-queue { grid-area: queue; }
.dj-column-stage { grid-area: stage; }
.dj-column-tools { grid-area: tools; }

.dj-workspace-column {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.dj-column-queue,
.dj-column-stage {
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.dj-panel-card,
.dj-stage-shell,
.dj-tool-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.dj-panel-card,
.dj-tool-card {
  background: rgba(255, 255, 255, 0.02);
}

.dj-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dj-panel-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem;
}

.dj-cockpit {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.92));
}

.dj-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dj-quick-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dj-quick-chip:hover,
.dj-quick-chip.active {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.14);
  color: #fff;
}

.dj-deck-card {
  height: 100%;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dj-deck-card.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(8, 47, 73, 0.5));
  border-color: rgba(59, 130, 246, 0.35);
  transform: none;
}

.dj-deck-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  color: #cbd5e1;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.dj-deck-track {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.dj-deck-meta {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
  line-height: 1.45;
}

.dj-metric-card {
  height: 100%;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dj-metric-label {
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.dj-metric-value {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.dj-metric-text {
  font-size: 0.95rem;
  line-height: 1.2;
}

.dj-row-hover {
  cursor: default;
}

.dj-row-hover td {
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.dj-row-hover:hover td {
  background: rgba(59, 130, 246, 0.06);
}

.studio-result-item {
  transition: all 0.2s ease-in-out;
}

.studio-result-item[draggable="true"],
.dj-playlist-pill[draggable="true"],
.dj-deck-queue-item[draggable="true"] {
  cursor: grab;
}

.studio-result-item.dj-drag-source,
.dj-playlist-pill.dj-drag-source,
.dj-deck-queue-item.dj-drag-source {
  opacity: 0.62;
  transform: scale(0.985);
}

.studio-result-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.015);
}

.dj-playlist-pill {
  min-width: 190px;
  padding: 0.65rem 0.8rem;
  border-radius: 18px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(37, 99, 235, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dj-playlist-pill.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(14, 165, 233, 0.18));
  border-color: rgba(56, 189, 248, 0.35);
}

.dj-playlist-pill:hover {
  transform: none;
  border-color: rgba(56, 189, 248, 0.35);
}

.dj-request-panel {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(7, 11, 22, 0.96), rgba(3, 7, 18, 0.98));
}

.dj-request-table-wrap {
  flex: 1;
  min-height: 0;
  border-radius: 20px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(2, 6, 23, 0.45);
}

.dj-stage-shell {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(3, 7, 18, 0.98));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  min-height: 0;
}

.dj-stage-toolbar {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: rgba(17, 24, 39, 0.9);
  border-bottom: none;
  position: relative;
  z-index: 10000;
}

.dj-stage-summary-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  background:
    radial-gradient(circle at top center, rgba(59, 130, 246, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(6, 11, 24, 0.96), rgba(3, 7, 18, 0.98));
}

.dj-stage-summary-grid .dj-deck-card {
  grid-column: span 3;
}

.dj-stage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  grid-column: span 6;
}

.dj-tool-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 100%;
}

.dj-tool-card + .dj-tool-card {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.dj-browser-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 99999; /* Lowered from 1050 so it doesn't overlap video panels */
  max-height: min(68vh, 620px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dj-browser-viewport {
  flex: 1;
  min-height: 0;
  padding: 0;
  background:
    radial-gradient(circle at top center, rgba(59, 130, 246, 0.08), transparent 35%),
    rgba(0, 0, 0, 0.26);
}

.dj-flow-card {
  min-height: 170px;
}

.dj-flow-items {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 0.8rem 1rem 1rem;
  max-height: 185px;
}

.dj-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  background:
    radial-gradient(circle at top center, rgba(14, 165, 233, 0.08), transparent 35%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
}

.dj-organizer-panel {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(6, 11, 24, 0.94), rgba(3, 7, 18, 0.98));
}

.dj-organizer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.dj-spotlight-card,
.dj-ai-panel {
  grid-column: span 4;
}

.dj-vinyl-card,
.dj-ai-panel {
  padding: 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dj-vinyl-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  margin-bottom: 0.7rem;
}

.dj-vinyl {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(15, 23, 42, 0.4) 0 16%, transparent 16% 18%, rgba(15, 23, 42, 0.3) 18% 100%),
    repeating-radial-gradient(circle at center, rgba(15, 23, 42, 0.18) 0 5px, rgba(2, 6, 23, 0.95) 5px 10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.dj-vinyl::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dj-vinyl.spinning {
  animation: djSpin 6s linear infinite;
}

.dj-vinyl-core {
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(14, 165, 233, 0.26)),
    #0f172a;
  background-size: cover;
  background-position: center;
  border: 5px solid rgba(15, 23, 42, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dj-vinyl-core::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #e2e8f0;
}

.dj-vinyl-title {
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  font-size: 0.94rem;
}

.dj-vinyl-meta,
.dj-ai-reason {
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.78rem;
  line-height: 1.35;
}

.dj-ai-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(7, 16, 32, 0.96), rgba(3, 7, 18, 1));
}

.dj-ai-score {
  min-width: 64px;
  padding: 0.45rem 0.7rem;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.95));
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.18);
}

.dj-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dj-expand-card {
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(7, 11, 24, 0.96), rgba(3, 7, 18, 1));
}

.dj-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.8rem 1rem 1rem;
}

.dj-module-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  border: 1px dashed rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
  color: #e9d5ff;
  font-weight: 700;
  font-size: 0.82rem;
}

.dj-flow-items .dj-playlist-pill {
  min-width: 0;
  width: 100%;
}

.dj-performance-deck {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dj-performance-deck.active {
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dj-performance-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.dj-performance-kicker {
  color: rgba(125, 211, 252, 0.9);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.dj-performance-title {
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
}

.dj-stage-screen {
  position: relative;
  height: 170px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at center, rgba(59, 130, 246, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.98));
}

.dj-youtube-frame,
.dj-youtube-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.dj-stage-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.8rem;
  background: linear-gradient(transparent, rgba(2, 6, 23, 0.96));
  pointer-events: none;
}

.dj-stage-meta {
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.74rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.dj-level-meter {
  display: flex;
  align-items: end;
  gap: 0.28rem;
  height: 24px;
}

.dj-level-meter span {
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  animation: djMeter 1.15s ease-in-out infinite;
  opacity: 0.8;
}

.dj-level-meter span:nth-child(1) { height: 24%; animation-delay: 0s; }
.dj-level-meter span:nth-child(2) { height: 52%; animation-delay: 0.08s; }
.dj-level-meter span:nth-child(3) { height: 76%; animation-delay: 0.16s; }
.dj-level-meter span:nth-child(4) { height: 42%; animation-delay: 0.24s; }
.dj-level-meter span:nth-child(5) { height: 90%; animation-delay: 0.32s; }
.dj-level-meter span:nth-child(6) { height: 58%; animation-delay: 0.4s; }

.dj-deck-actions,
.dj-cue-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
}

.dj-cue-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dj-control-btn,
.dj-cue-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: #e2e8f0;
  border-radius: 12px;
  min-height: 34px;
  font-size: 0.82rem;
}

.dj-control-btn:hover,
.dj-cue-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
  color: #fff;
}

.dj-volume-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.78rem;
}

.dj-volume-row .form-range {
  accent-color: #38bdf8;
}

.dj-mixer-strip {
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.dj-crossfader-wrap {
  width: min(100%, 340px);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dj-crossfader-wrap .form-range {
  accent-color: #38bdf8;
}

@keyframes djMeter {
  0%, 100% { transform: scaleY(0.6); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes djSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1599px) {
  .dj-workspace-topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .dj-workspace-meta {
    justify-content: flex-start;
  }

  .dj-workspace-grid {
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-areas:
      "queue stage"
      "queue tools";
  }

  .dj-column-stage {
    border-right: 0;
  }

  .dj-column-tools {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .dj-tool-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .dj-expand-card {
    grid-column: 1 / -1;
  }

  .dj-stage-summary-grid .dj-deck-card {
    grid-column: span 6;
  }

  .dj-stage-metrics {
    grid-column: 1 / -1;
  }

  .dj-spotlight-card {
    grid-column: span 6;
  }

  .dj-ai-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 899px) {
  .dj-workspace-grid {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .dj-stage-summary-grid .dj-deck-card,
  .dj-stage-metrics,
  .dj-spotlight-card,
  .dj-ai-panel {
    grid-column: 1 / -1;
  }

  .dj-stage-metrics {
    grid-template-columns: 1fr;
  }

  .dj-performance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .dj-workspace-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "queue"
      "tools";
    overflow: auto;
  }

  .dj-column-queue,
  .dj-column-stage {
    border-right: 0;
  }

  .dj-column-queue,
  .dj-column-stage,
  .dj-column-tools {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .dj-tool-stack {
    grid-template-columns: 1fr;
  }

  .dj-module-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.gastos-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.1), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.85));
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
}

.gastos-hero-copy {
  max-width: 720px;
}

.gastos-hero-kicker,
.gastos-form-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fda4af;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.gastos-hero-title {
  color: #fff;
  font-size: clamp(2rem, 2.4vw, 3rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

.gastos-hero-subtitle {
  margin: 0.75rem 0 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 1rem;
  max-width: 760px;
}

.gastos-hero-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.gastos-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.gastos-hero-chip-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.25);
  background: rgba(127, 29, 29, 0.18);
}

.gastos-form-shell,
.gastos-history-shell {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.82));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.gastos-form-shell {
  padding: 1rem;
}

.gastos-form-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.2), transparent 40%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(15, 23, 42, 0.4));
  border: 1px solid rgba(248, 113, 113, 0.14);
}

.gastos-form-title,
.gastos-history-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gastos-amount-preview {
  min-width: 120px;
  text-align: right;
}

.gastos-amount-preview strong {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
}

.gastos-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.gastos-preset-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  transition: all 0.18s ease;
}

.gastos-preset-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fff;
  background: rgba(248, 113, 113, 0.12);
}

.gastos-upload-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.gastos-upload-box .input-modern {
  background: transparent;
  border: none;
  padding: 0;
}

.gastos-upload-box .input-modern:focus {
  box-shadow: none;
}

.gastos-form-tip {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.14);
  color: #cbd5e1;
  font-size: 0.9rem;
}

.gastos-submit-btn {
  border-radius: 18px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gastos-history-shell {
  padding: 1.2rem;
}

.gastos-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gastos-toolbar {
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0.75rem;
}

.gastos-filter-field {
  flex: 1 1 320px;
}

.gastos-filter-select {
  width: 220px;
  border-radius: 14px;
}

.gastos-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gastos-history-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.gastos-kpi {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.08), transparent 35%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.82));
  padding: 1rem;
  min-height: 132px;
}

.gastos-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.gastos-kpi-value {
  color: #f8fafc;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.05;
}

.gastos-kpi-category {
  font-size: 1.05rem;
  color: #67e8f9;
}

.gastos-kpi-sub {
  margin-top: 0.55rem;
  color: #94a3b8;
  font-size: 0.8rem;
}

.gastos-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.gastos-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right center, rgba(14, 165, 233, 0.08), transparent 25%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.82));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.gastos-card:hover {
  transform: none;
  border-color: rgba(248, 113, 113, 0.22);
}

.gastos-card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gastos-card-day {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.gastos-card-month {
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.gastos-card-main {
  min-width: 0;
}

.gastos-card-category {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  font-size: 0.78rem;
}

.gastos-card-meta {
  color: #94a3b8;
  font-size: 0.8rem;
}

.gastos-card-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.gastos-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.gastos-card-amount {
  color: #fca5a5;
  font-size: 1.2rem;
  font-weight: 800;
}

.gastos-empty-state {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.55));
  border-radius: 22px;
}

.panel-notification-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.panel-notification-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at right center, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.72));
}

.panel-notification-item.order {
  border-color: rgba(248, 113, 113, 0.16);
}

.panel-notification-item.music {
  border-color: rgba(34, 211, 238, 0.18);
}

.panel-notification-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.panel-notification-item.order .panel-notification-icon {
  background: rgba(248, 113, 113, 0.14);
  color: #fda4af;
}

.panel-notification-item.music .panel-notification-icon {
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
}

.panel-notification-title {
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}

.panel-notification-message {
  color: #cbd5e1;
  font-size: 0.86rem;
  margin-top: 0.2rem;
}

.panel-notification-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.78rem;
  margin-top: 0.4rem;
}

.panel-notification-time {
  color: #94a3b8;
  font-size: 0.74rem;
  white-space: nowrap;
}

.panel-notification-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
}

/* Login specific */
.login-glass {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(40px);
}

@media (max-width: 899px) {
  #appSection.app-shell {
    display: block;
    min-height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  #appSidebar.sidebar {
    width: var(--sidebar-mobile-width);
    min-width: var(--sidebar-mobile-width);
    max-width: calc(100vw - 52px);
    height: 100vh;
    height: 100dvh;
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.65rem;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    transform: translate3d(-105%, 0, 0);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
    will-change: transform;
  }
  #appSection.app-shell.is-sidebar-open #appSidebar.sidebar {
    transform: translate3d(0, 0, 0);
    box-shadow: 26px 0 60px rgba(0, 0, 0, 0.38);
  }
  #appSection.app-shell.is-sidebar-dragging #appSidebar.sidebar {
    transition: none;
  }
  #appSidebar.sidebar::before {
    opacity: 0.85;
  }
  #appSidebar .sidebar-top {
    order: 0;
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 0.75rem;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  #appSidebar .sidebar-toggle-btn {
    display: inline-flex;
  }
  #appSidebar .sidebar-select-wrap {
    order: 1;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin-bottom: 0.25rem !important;
  }
  #appSidebar .sidebar-select-wrap .btn {
    width: 100%;
    padding: 0.72rem 0.95rem !important;
    font-size: 0.88rem !important;
  }
  .pos-cart { width: 100%; height: 50vh; order: 2; }
  #menuTabs.nav-menu { flex-direction: column; }
  #appSidebar #menuTabs.nav-menu {
    order: 2;
    flex: 1 1 auto;
    width: 100%;
    gap: 0.55rem;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
  }
  #appSidebar #menuTabs .nav-item {
    width: 100%;
    min-width: 0;
    padding: 0.8rem 0.95rem;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.85rem;
    border-radius: 14px;
  }
  #appSidebar #menuTabs .nav-item i {
    width: 22px;
    min-width: 22px;
    font-size: 1rem;
    text-align: center;
    transform: none !important;
  }
  #appSidebar #menuTabs .nav-item span {
    display: block;
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
  }
  #appSidebar #menuTabs .nav-item .badge {
    margin-left: auto !important;
  }
  #appSidebar .brand-text {
    max-width: 88px !important;
    font-size: 0.62rem !important;
  }
  #appSidebar .user-profile {
    order: 3;
  }
  #mobileSidebarToggle.sidebar-mobile-toggle,
  #sidebarOverlay.sidebar-overlay,
  #sidebarSwipeZone.sidebar-swipe-zone {
    display: inline-flex;
  }
  #sidebarOverlay.sidebar-overlay {
    display: block;
  }
  #appSection.app-shell.is-sidebar-open #sidebarOverlay.sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  #appSection.app-shell.is-sidebar-open #mobileSidebarToggle.sidebar-mobile-toggle {
    opacity: 0;
    transform: translateX(-12px) scale(0.96);
    pointer-events: none;
  }
  #appSection.app-shell.is-sidebar-open > .main-content {
    transform: translateX(18px) scale(0.995);
    border-radius: 22px 0 0 22px;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
  }
  #appSection > .main-content {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .user-profile { display: none; } /* .brand is now flex */
  .gastos-hero,
  .gastos-history-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .gastos-hero-side {
    justify-content: flex-start;
  }
  .gastos-card {
    grid-template-columns: 1fr;
  }
  .gastos-card-date,
  .gastos-card-side {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  #appSection.app-shell {
    min-height: 100vh;
    height: 100dvh;
  }
  #appSidebar.sidebar {
    width: min(80vw, 272px);
    min-width: min(80vw, 272px);
    max-width: calc(100vw - 44px);
    padding: calc(env(safe-area-inset-top, 0px) + 0.9rem) 0.85rem calc(env(safe-area-inset-bottom, 0px) + 0.9rem);
  }
  #appSidebar .sidebar-top {
    gap: 0.6rem;
  }
  #appSidebar .brand-text {
    max-width: 76px !important;
    font-size: 0.58rem !important;
  }
  #appSidebar .sidebar-select-wrap .btn {
    padding: 0.68rem 0.82rem !important;
    font-size: 0.82rem !important;
  }
  #appSidebar #menuTabs.nav-menu {
    gap: 0.45rem;
  }
  #appSidebar #menuTabs .nav-item {
    padding: 0.74rem 0.82rem;
    gap: 0.72rem;
  }
  #appSidebar #menuTabs .nav-item span {
    font-size: 0.87rem;
  }
  #mobileSidebarToggle.sidebar-mobile-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
    left: 0.75rem;
  }
}

@media (max-width: 575px) {
  #appSidebar.sidebar {
    width: min(84vw, 258px);
    min-width: min(84vw, 258px);
    max-width: calc(100vw - 34px);
    padding: calc(env(safe-area-inset-top, 0px) + 0.8rem) 0.75rem calc(env(safe-area-inset-bottom, 0px) + 0.8rem);
  }
  #appSidebar #menuTabs .nav-item {
    padding: 0.7rem 0.76rem;
    gap: 0.65rem;
    border-radius: 13px;
  }
  #appSidebar #menuTabs .nav-item i {
    width: 20px;
    min-width: 20px;
    font-size: 0.95rem;
  }
  #appSidebar #menuTabs .nav-item span {
    font-size: 0.82rem;
  }
  #appSidebar .sidebar-select-wrap .btn {
    padding: 0.62rem 0.75rem !important;
    font-size: 0.78rem !important;
  }
  #mobileSidebarToggle.sidebar-mobile-toggle {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .main-content,
  .sidebar-mobile-toggle,
  .sidebar-overlay {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =========================================
   TABLE MANAGEMENT & MAP STYLES (v2 â€“ Pro Floor Plan)
   ========================================= */

#tablesMapContainer {
  background-color: #101418;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 28px 28px;
  position: relative;
  overflow: hidden;
}

body.light-mode #tablesMapContainer {
  background-color: #f1f5f9;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,0.06) 1px, transparent 0);
  background-size: 28px 28px;
}

#tablesMapContainer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(124,58,237,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(14,165,233,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ---- TABLE ITEM ---- */
.table-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  user-select: none;
  z-index: 10;
  border-radius: 14px;
  transform: translate(-50%, -50%);
}

.table-item:hover { z-index: 20; transform: translate(-50%, -50%) scale(1.08); }

.table-item .table-surface {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  position: relative;
  overflow: visible;
  transition: none !important;
  background: rgba(30, 41, 59, 0.7);
  border: 2px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  color: #e2e8f0;
}

.table-item.circle .table-surface { border-radius: 50%; }
.table-item.bar .table-surface { border-radius: 8px; }
.table-item.silla .table-surface { border-radius: 10px; }
.table-item.banqueta .table-surface { border-radius: 50%; }

/* Hide chairs for small individual seats */
.table-item.silla .chair,
.table-item.banqueta .chair { display: none; }

/* Subtle different border for silla/banqueta */
.table-item.silla.status-free .table-surface,
.table-item.banqueta.status-free .table-surface {
  border-color: rgba(251,191,36,0.2);
}
.table-item.silla.status-free:hover .table-surface,
.table-item.banqueta.status-free:hover .table-surface {
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 15px rgba(251,191,36,0.1);
}

/* FREE */
.table-item.status-free .table-surface {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(14, 165, 233, 0.2);
}

.table-item.status-free:hover .table-surface {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 20px rgba(14,165,233,0.15);
}

/* OCCUPIED */
.table-item.status-occupied .table-surface {
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(124,58,237,0.1));
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 25px rgba(124,58,237,0.2);
}

.table-item.status-occupied:hover .table-surface {
  border-color: rgba(124,58,237,0.8);
  box-shadow: 0 0 35px rgba(124,58,237,0.35);
}

/* ---- INFO OVERLAY (Tooltip) ---- */
.table-info-overlay {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 10px;
  min-width: 110px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 100;
  color: #fff;
  border: 1px solid rgba(124,58,237,0.25);
  pointer-events: none;
  white-space: nowrap;
}

.table-info-overlay::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(15,23,42,0.92);
}

body.light-mode .table-item .table-surface {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.08);
  color: #1e293b;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

body.light-mode .table-item.status-occupied .table-surface {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(124,58,237,0.05));
  border-color: rgba(124,58,237,0.35);
}

body.light-mode .table-info-overlay {
  background: #fff;
  color: #1e293b;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

body.light-mode .table-info-overlay::after {
  border-top-color: #fff;
}

.very-small { font-size: 0.6rem; }

/* ---- CHAIRS ---- */
.chair {
  position: absolute;
  width: 20px;
  height: 8px;
  background: rgba(148,163,184,0.3);
  border-radius: 3px;
  z-index: 1;
  transition: background 0.3s;
}

/* ---- RESIZE HANDLE ---- */
.resize-handle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
  z-index: 50;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
  pointer-events: none;
}

body.light-mode .resize-handle { border-color: #f1f5f9; }

.editing .resize-handle {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.editing .resize-handle:hover {
  transform: scale(1.2);
  background: var(--primary-light);
}

.table-item.status-occupied .chair { background: rgba(124,58,237,0.35); }

.chair-t { top: -10px; left: 50%; transform: translateX(-50%); }
.chair-b { bottom: -10px; left: 50%; transform: translateX(-50%); }
.chair-l { left: -10px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.chair-r { right: -10px; top: 50%; transform: translateY(-50%) rotate(90deg); }

/* ---- MAP TOOLBAR ---- */
.map-toolbar {
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 100%);
  pointer-events: none;
}

.map-toolbar > * { pointer-events: auto; }

.map-toolbar .glass-panel {
  pointer-events: auto;
  border-color: rgba(255,255,255,0.08);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
}

body.light-mode .map-toolbar {
  background: linear-gradient(180deg, rgba(241,245,249,0.8) 0%, transparent 100%);
}

body.light-mode .map-toolbar .glass-panel {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.06);
}

.hover-opacity-100:hover { opacity: 1 !important; }

/* ---- OCCUPIED PULSE ---- */
.table-item.status-occupied {
  animation: table-glow 4s infinite ease-in-out;
}

@keyframes table-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.15)); }
  50% { filter: drop-shadow(0 0 18px rgba(124, 58, 237, 0.4)); }
}

/* ---- EDITING UI ---- */
.table-item.editing {
  cursor: grab;
}

.table-item.editing:active {
  cursor: grabbing;
}

.table-item.editing .table-surface {
  border-style: dashed;
  border-color: rgba(255,189,92,0.5);
}

.delete-table-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ef4444;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(15,23,42,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
  cursor: pointer;
  z-index: 2000;
  transition: all 0.2s ease;
}

.delete-table-btn:hover {
  transform: scale(1.2);
  background: #dc2626;
}

/* ---- CONTEXT MENU ---- */
#tableContextMenu {
  z-index: 3000 !important;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  min-width: 200px;
}

body.light-mode #tableContextMenu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.light-mode .delete-table-btn {
  border-color: #fff;
}

/* Edit mode bottom bar */
.edit-mode-bar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 10px 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* --- WEB GRABBER UI --- */
.web-grabber-zone {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(15, 23, 42, 0.4);
    border-radius: 24px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.grabber-preview-container {
    width: 200px;
    height: 200px;
    margin: 20px auto 0;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    display: none;
    border: 3px solid var(--primary);
    box-shadow: 0 0 30px var(--primary-glow), inset 0 0 20px rgba(0,0,0,0.5);
    animation: image-pulse 2s infinite ease-in-out;
}

@keyframes image-pulse {
    0%, 100% { transform: scale(1); border-color: var(--primary); }
    50% { transform: scale(1.02); border-color: #d095ff; }
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

#imageSearchModal .modal-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
}

.btn-search-image {
    background: rgba(208, 149, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(208, 149, 255, 0.2);
    transition: none !important;
}

.btn-search-image:hover {
    background: var(--primary);
    color: white;
    transform: none;
}

.dj-console-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.dj-console-header {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(420px, 1.9fr) minmax(200px, 0.8fr);
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.15), transparent 32%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(6, 11, 24, 0.92));
}

.dj-console-commandbar,
.dj-console-brand,
.dj-workspace-meta {
  min-width: 0;
}

.dj-console-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  padding: 1rem 1.2rem 1.2rem;
  overflow-y: visible;
  overflow-x: hidden;
}

.dj-vjd-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.2fr) minmax(300px, 1fr);
  gap: 1.5rem;
}

.dj-vjd-deck {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.6));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 1rem;
}

.dj-vjd-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}

.dj-vjd-jog-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.dj-vjd-jog {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 80%, #020617 100%);
  border: 4px solid #334155;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 15px rgba(0,0,0,0.8);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dj-vjd-jog.spinning {
  animation: spin 2s linear infinite;
}

.dj-vjd-jog-inner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #475569;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #94a3b8;
  font-weight: bold;
  font-size: 0.8rem;
}

.dj-vjd-center {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-console-rail-bottom {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
}

.dj-virtual-dj-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.2fr) minmax(260px, 1fr);
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.dj-deck-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-mixer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-console-rail,
.dj-console-stage,
.dj-console-main,
.dj-tools-shell,
.dj-tool-panels,
.dj-tool-panel {
  min-height: 0;
}

.dj-console-rail,
.dj-console-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-console-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  overflow: hidden;
}

.dj-console-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-console-toolbar {
  padding: 0.4rem 0.6rem;
  border-radius: 16px;
  background: rgba(4, 10, 24, 0.88);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: visible;
  position: relative;
  z-index: 10000;
}

.dj-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dj-section-copy {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.dj-section-subtitle {
  max-width: 720px;
  line-height: 1.45;
}

.dj-header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dj-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.dj-app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dj-app-btn:hover {
  transform: translateY(-1px);
  color: #fff;
}

.dj-app-btn:disabled {
  opacity: 0.72;
  cursor: default;
  transform: none;
}

.dj-app-btn-primary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(14, 165, 233, 0.18));
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.14);
}

.dj-app-btn-primary:hover,
.dj-app-btn-primary.is-active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.34), rgba(34, 211, 238, 0.24));
  border-color: rgba(103, 232, 249, 0.42);
}

.dj-app-btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.22);
}

.dj-app-btn-secondary.is-ready {
  border-color: rgba(168, 85, 247, 0.36);
  color: #e9d5ff;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.24), rgba(59, 130, 246, 0.14));
}

.dj-app-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.84);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dj-app-status.is-active {
  color: #a7f3d0;
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(6, 95, 70, 0.18);
}

.dj-app-status.is-standalone {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(30, 64, 175, 0.2);
}

.dj-deck-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dj-deck-overview-card {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(7, 11, 24, 0.94), rgba(2, 6, 23, 0.94));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dj-deck-overview-card.deck-a {
  border-color: rgba(59, 130, 246, 0.22);
}

.dj-deck-overview-card.deck-b {
  border-color: rgba(34, 211, 238, 0.22);
}

.dj-deck-overview-card.is-active {
  transform: none;
}

.dj-deck-overview-card.is-live {
  box-shadow: 0 20px 48px rgba(14, 165, 233, 0.2);
}

.dj-deck-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dj-deck-overview-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dj-deck-overview-title {
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dj-deck-overview-meta {
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.78rem;
  line-height: 1.45;
  min-width: 0;
}

.dj-deck-overview-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}



.dj-music-hub,
.dj-request-dock {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(4, 10, 24, 0.92));
}

.dj-music-hub {
  flex: 1.4 1 0;
  min-width: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
  justify-content: flex-start;
}

.dj-music-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dj-music-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dj-request-dock {
  flex: 0.95 1 0;
  min-width: 0;
  gap: 0.25rem;
  padding: 0.4rem;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(6, 14, 33, 0.96), rgba(3, 8, 22, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 44px rgba(2, 6, 23, 0.34);
}

.dj-search-placeholder {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-align: center;
  padding: 0.65rem 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}

.dj-search-placeholder-icon {
  font-size: 1.2rem;
  color: rgba(56, 189, 248, 0.45);
}

.dj-search-placeholder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.dj-console-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dj-console-visual-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(340px, 1.5fr) minmax(260px, 1.05fr);
  gap: 1rem;
  min-height: 320px;
}

.dj-screen-panel,
.dj-visual-core {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dj-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.dj-console-screen {
  min-height: 245px;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.dj-visual-card {
  flex: 0 0 auto;
}

.dj-visual-stack {
  display: grid;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}

.dj-visual-canvas {
  width: 100%;
  height: 120px;
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(7, 11, 24, 0.98), rgba(3, 7, 18, 0.94));
  border: 1px solid rgba(255,255,255,0.06);
}

.dj-deck-playlist-items {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 4px;
}

.dj-playlist-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 2px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dj-playlist-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dj-playlist-item.active {
  background: rgba(14, 165, 233, 0.15);
  border-left: 2px solid #0ea5e9;
}

.dj-playlist-item-img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  margin-right: 8px;
}

.dj-playlist-item-info {
  flex: 1;
  min-width: 0;
}

.dj-playlist-item-title {
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
}

.dj-playlist-item-artist {
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.65rem;
}

.dj-playlist-item-remove {
  color: #ef4444;
  opacity: 0.5;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.dj-playlist-item-remove:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

.dj-playlist-item-play:hover {
  color: #0ea5e9 !important;
}

.dj-playlist-item-fav:hover {
  color: #fbbf24 !important;
  opacity: 1;
}

.dj-playlist-item-download:hover {
  color: #22c55e !important;
  opacity: 1;
}

.dj-deck-queue-card {
  padding: 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dj-deck-queue-card-a {
  border-color: rgba(59, 130, 246, 0.2);
}

.dj-deck-queue-card-b {
  border-color: rgba(34, 211, 238, 0.2);
}

.dj-deck-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.dj-deck-queue-title-wrap {
  min-width: 0;
}

.dj-deck-queue-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dj-deck-queue-subtitle {
  margin-top: 0.35rem;
  color: rgba(148, 163, 184, 0.88);
  font-size: 0.72rem;
  line-height: 1.35;
}

.dj-deck-queue-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.dj-deck-queue-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 800;
}

.dj-deck-queue-list {
  max-height: 250px;
  overflow-y: auto;
  border-radius: 18px;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dj-deck-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.65rem;
  margin-bottom: 0.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.dj-deck-queue-item:last-child {
  margin-bottom: 0;
}

.dj-deck-queue-item-current {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.08));
  border-color: rgba(59, 130, 246, 0.22);
}

.dj-deck-queue-item-side {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.dj-deck-queue-art {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dj-deck-queue-copy {
  min-width: 0;
}

.dj-deck-queue-line {
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.dj-deck-queue-meta-line {
  color: #94a3b8;
  font-size: 0.68rem;
  line-height: 1.25;
}

.dj-deck-queue-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dj-deck-queue-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dj-deck-queue-pill-primary {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
}

.dj-deck-queue-pill-info {
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.16);
}

.dj-deck-queue-pill-soft {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
}

.dj-console-spotlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dj-console-mixer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.25fr) minmax(260px, 1fr);
  gap: 1rem;
}

.dj-center-mixer-card {
  padding-bottom: 0.5rem;
  flex-shrink: 0;
}

.dj-center-mixer-body {
  display: grid;
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.dj-master-faders {
  display: grid;
  gap: 0.5rem;
}

.dj-console-range-group {
  display: grid;
  gap: 0.35rem;
}

.dj-console-range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
}

.dj-graphic-eq {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  min-height: 180px;
}

.dj-eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.45rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}

.dj-eq-band span {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
  letter-spacing: 0.08em;
}

.dj-eq-band input[type="range"] {
  writing-mode: vertical-lr !important;
  direction: rtl !important;
  width: 20px;
  height: 110px;
}

.dj-console-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dj-pad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.dj-pad-btn {
  min-height: 74px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 65%),
    rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dj-pad-btn.active,
.dj-pad-btn:hover {
  transform: none;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 12px 24px rgba(34, 211, 238, 0.14);
}

.dj-knob-grid,
.dj-video-routing-grid,
.dj-status-grid {
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.dj-knob-grid,
.dj-video-routing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dj-knob-control {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
}

.dj-knob-control label,
.dj-status-label {
  font-size: 0.76rem;
  color: rgba(148, 163, 184, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dj-knob-control span {
  color: #f8fafc;
  font-weight: 700;
}

.dj-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dj-status-pill {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.dj-status-pill strong {
  color: #f8fafc;
  font-size: 1rem;
}

.dj-side-status-card {
  flex: 0 0 auto;
}

.dj-system-note {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  color: rgba(226, 232, 240, 0.88);
}

.dj-tools-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dj-tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dj-tool-tab {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(226, 232, 240, 0.8);
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.dj-tool-tab.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.26), rgba(34, 211, 238, 0.18));
  color: #fff;
  border-color: rgba(59, 130, 246, 0.28);
}

.dj-tool-panels {
  flex: 1;
  position: relative;
}

.dj-tool-panel {
  display: none;
  height: 100%;
  overflow: hidden;
}

.dj-tool-panel.active {
  display: flex;
  flex-direction: column;
}

.dj-tools-body {
  padding: 0 1rem 1rem;
}

.dj-flow-items,
.dj-browser-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.dj-request-panel,
.dj-tools-shell {
  height: 100%;
}

.dj-request-table-wrap {
  max-height: 100%;
}

.dj-v-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 40px;
  height: 160px;
  accent-color: #64748b;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

@media (max-width: 1680px) {
  .dj-workspace {
    height: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .dj-console-header {
    grid-template-columns: 1fr;
  }

  .dj-console-body {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.95fr);
    overflow: visible;
  }

  .dj-console-rail-right {
    grid-column: 1 / -1;
  }

  .dj-tools-shell {
    min-height: 380px;
  }

  .dj-console-visual-grid,
  .dj-console-mixer-grid,
  .dj-console-performance-grid,
  .dj-console-spotlight-grid,
  .dj-virtual-dj-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .dj-workspace {
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .dj-console-body {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .dj-console-toolbar,
  .dj-console-header,
  .dj-console-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dj-console-summary,
  .dj-knob-grid,
  .dj-video-routing-grid,
  .dj-tool-tabs,
  .dj-status-grid {
    grid-template-columns: 1fr;
  }

  .dj-section-header,
  .dj-stage-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dj-header-meta {
    justify-content: flex-start;
  }

  .dj-music-hub,
  .dj-request-dock {
    width: 100%;
    flex: 1 1 auto;
  }
}

/* =========================================
   VDJ PRO CONSOLE STYLES
   ========================================= */

/* Waveform Overview Bar */
.vdj-waveform-overview {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(2, 6, 23, 0.95);
  border: none;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}

.vdj-waveform-canvas {
  flex: 1;
  min-width: 0;
  display: block;
  background: rgba(0,0,0,0.4);
  cursor: ew-resize;
}

.vdj-waveform-b { border-left: 1px solid rgba(255,255,255,0.06); }

.vdj-waveform-divider {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: rgba(15,23,42,0.9);
}

.vdj-bpm-sync {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(56,189,248,0.4);
}

/* Console 3-Column Grid */
.vdj-console-grid {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 6px;
  min-height: 0;
}

/* Deck Shared */
.vdj-deck {
  background: rgba(8, 12, 24, 0.95);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.vdj-deck-a { border-top: none; }
.vdj-deck-b { border-top: none; }

.vdj-deck.dj-drop-ready {
  border-color: rgba(56,189,248,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(56,189,248,0.35), 0 22px 38px rgba(14,165,233,0.22);
  transform: none;
}

.vdj-deck-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vdj-deck-label-tag {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.vdj-tag-a {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 0 12px rgba(59,130,246,0.3);
}

.vdj-tag-b {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: white;
  box-shadow: 0 0 12px rgba(6,182,212,0.3);
}

.vdj-deck-track-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.vdj-track-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vdj-track-artist {
  color: rgba(148,163,184,0.8);
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Video + Jog Row */
.vdj-deck-main-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-height: 130px;
}

.vdj-video-box {
  position: relative;
  min-height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 48%),
    linear-gradient(180deg, rgba(4,9,22,0.95), rgba(1,4,11,0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 35px rgba(2,6,23,0.35);
}

.vdj-video-box.show-artwork .dj-youtube-frame {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

.vdj-deck-artwork {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: scale(1.08);
}

.vdj-deck-artwork::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 0 22%, rgba(255,255,255,0.08) 24%, transparent 28%),
    linear-gradient(180deg, rgba(2,6,23,0.1), rgba(2,6,23,0.78));
}

.vdj-video-box.show-artwork .vdj-deck-artwork {
  opacity: 1;
  transform: scale(1);
}

.vdj-video-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  pointer-events: none;
  z-index: 2;
}

.vdj-video-meta {
  color: rgba(226,232,240,0.7);
  font-size: 0.6rem;
  margin-bottom: 4px;
}

/* Progress Bar */
.vdj-progress-container {
  margin-top: 8px;
  pointer-events: auto;
}

.vdj-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.vdj-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.vdj-progress-bar:hover .vdj-progress-fill {
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
}

.vdj-time-display {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.vdj-time-separator {
  color: rgba(255,255,255,0.4);
}

/* VU Meter */
.vdj-vu-meter {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}

.vdj-vu-meter span {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ef4444, #f59e0b 40%, #22c55e 70%);
  animation: djMeter 0.8s ease-in-out infinite;
  opacity: 0.75;
}

.vdj-vu-meter span:nth-child(1) { height: 30%; animation-delay: 0s; }
.vdj-vu-meter span:nth-child(2) { height: 55%; animation-delay: 0.06s; }
.vdj-vu-meter span:nth-child(3) { height: 80%; animation-delay: 0.12s; }
.vdj-vu-meter span:nth-child(4) { height: 45%; animation-delay: 0.18s; }
.vdj-vu-meter span:nth-child(5) { height: 95%; animation-delay: 0.24s; }
.vdj-vu-meter span:nth-child(6) { height: 60%; animation-delay: 0.30s; }
.vdj-vu-meter span:nth-child(7) { height: 40%; animation-delay: 0.36s; }
.vdj-vu-meter span:nth-child(8) { height: 70%; animation-delay: 0.42s; }

/* Jog Wheel */
.vdj-jog-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 10px 8px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.09), transparent 22%),
    linear-gradient(180deg, rgba(18,24,38,0.98), rgba(4,8,16,0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 34px rgba(2,6,23,0.38);
}

.vdj-deck-a .vdj-jog-wrap {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 34px rgba(37,99,235,0.16);
}

.vdj-deck-b .vdj-jog-wrap {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 34px rgba(6,182,212,0.16);
}

.vdj-jog-wrap::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.05);
  background: radial-gradient(circle at center, rgba(255,255,255,0.04), transparent 65%);
}

.vdj-jog-wrap::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34,197,94,0.9);
}

.vdj-jog-canvas {
  width: 100%;
  max-width: 182px;
  height: auto;
  cursor: grab;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 16px 24px rgba(15,23,42,0.45));
  transition: filter 0.3s ease;
  touch-action: none;
  user-select: none;
}

.vdj-jog-canvas:active { cursor: grabbing; filter: drop-shadow(0 20px 34px rgba(59,130,246,0.28)); }

.vdj-jog-time {
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,0.16);
  background: rgba(8,14,26,0.88);
  text-shadow: 0 0 6px rgba(56,189,248,0.3);
  font-family: 'Courier New', monospace;
}

/* Transport Buttons */
.vdj-transport {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) repeat(2, minmax(0, 1fr)) minmax(0, 0.9fr);
  gap: 0.45rem;
  align-items: stretch;
  margin-top: 0.15rem;
}

.vdj-btn {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
  border-radius: 14px;
  min-height: 52px;
  padding: 0.7rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.vdj-btn-icon {
  padding-inline: 0.35rem;
  font-size: 0.9rem;
}

.vdj-btn:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; border-color: rgba(255,255,255,0.18); }
.vdj-btn:active { transform: scale(0.95); }

.vdj-btn-play { background: rgba(34,197,94,0.15); color: #4ade80; border-color: rgba(34,197,94,0.3); }
.vdj-btn-play:hover { background: rgba(34,197,94,0.3); box-shadow: 0 0 12px rgba(34,197,94,0.2); }

.vdj-btn-pause { background: rgba(251,191,36,0.1); color: #fbbf24; border-color: rgba(251,191,36,0.25); }
.vdj-btn-pause:hover { background: rgba(251,191,36,0.25); }

.vdj-btn-cue { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.25); }
.vdj-btn-cue:hover { background: rgba(239,68,68,0.25); box-shadow: 0 0 10px rgba(239,68,68,0.15); }

.vdj-btn-sync { background: rgba(168,85,247,0.12); color: #c084fc; border-color: rgba(168,85,247,0.25); }
.vdj-btn-sync:hover { background: rgba(168,85,247,0.25); box-shadow: 0 0 10px rgba(168,85,247,0.15); }

.vdj-btn-mixia {
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(59,130,246,0.3));
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.7rem;
}
.vdj-btn-mixia:hover { box-shadow: 0 0 16px rgba(139,92,246,0.25); }

/* EQ Strip */
.vdj-eq-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.vdj-eq-knob-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vdj-eq-knob-group label,
.vdj-vol-fader-wrap label {
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(148,163,184,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vdj-knob {
  width: 100%;
  accent-color: #38bdf8;
  height: 4px;
}

.vdj-vol-fader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 30px;
}

.vdj-vol-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 28px;
  height: 50px;
  accent-color: #22c55e;
  touch-action: none;
}

.vdj-vol-value {
  font-size: 0.55rem;
  font-weight: 700;
  color: #22c55e;
  font-family: monospace;
}

/* Hot Cue Buttons */
.vdj-hotcue-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.vdj-hotcue {
  border: none;
  border-radius: 6px;
  padding: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  color: white;
  text-align: center;
  transition: all 0.15s ease;
}

.vdj-hc-1 { background: rgba(239,68,68,0.35); }
.vdj-hc-2 { background: rgba(34,197,94,0.35); }
.vdj-hc-3 { background: rgba(59,130,246,0.35); }
.vdj-hc-4 { background: rgba(251,191,36,0.35); }
.vdj-hotcue:hover { filter: brightness(1.4); transform: scale(1.05); }
.vdj-hotcue:active { transform: scale(0.92); }

/* MIXER COLUMN - VDJ Style */
.vdj-mixer {
  background: linear-gradient(180deg, rgba(40,44,52,0.98), rgba(30,33,40,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.vdj-mixer-header {
  display: flex;
  align-items: stretch;
  border-bottom: none;
}

.vdj-mixer-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(148,163,184,0.6);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}

.vdj-mixer-tab.active {
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  border-bottom: none;
}

.vdj-mixer-tab:hover { color: #e2e8f0; }

/* Mixer Body: 3 columns */
.vdj-mixer-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2px;
  padding: 8px 4px;
  align-items: center;
}

/* Knob Columns */
.vdj-knobs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vdj-rotary-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
}

.vdj-rotary {
  cursor: grab;
  border-radius: 50%;
  transition: filter 0.2s ease;
  touch-action: none;
  user-select: none;
  outline: none;
  flex-shrink: 0;
  width: 48px !important;
  height: 48px !important;
  display: block;
}
.vdj-rotary:active { cursor: grabbing; filter: brightness(1.3); }
.vdj-rotary:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 0 4px rgba(59,130,246,0.35);
}

.vdj-rotary-label {
  font-size: 0.5rem;
  font-weight: 800;
  color: rgba(148,163,184,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vdj-rotary-value {
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(226,232,240,0.88);
  font-variant-numeric: tabular-nums;
}

/* Channel Faders */
.vdj-channel-faders {
  display: flex;
  gap: 6px;
  padding: 4px 6px;
  align-items: center;
  justify-content: center;
}

.vdj-ch-fader-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vdj-ch-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  height: 120px;
  accent-color: #64748b;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  touch-action: none;
}

.vdj-ch-fader-a { accent-color: #3b82f6; }
.vdj-ch-fader-b { accent-color: #06b6d4; }

/* FX Row */
.vdj-fx-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  border-top: none;
  border-bottom: none;
}

.vdj-fx-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(148,163,184,0.5);
  letter-spacing: 0.1em;
}

.vdj-fx-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.1);
  color: #c084fc;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.vdj-fx-btn:hover { background: rgba(168,85,247,0.25); box-shadow: 0 0 10px rgba(168,85,247,0.2); }
.vdj-fx-btn.active { 
    background: #a855f7 !important; 
    border-color: #d8b4fe !important; 
    color: #fff !important;
    box-shadow: 0 0 15px rgba(168,85,247,0.8) !important; 
    transform: scale(1.05);
}

/* Master Row */
.vdj-master-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
}

/* Crossfader Track */
.vdj-cf-track {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  padding: 4px 2px;
  display: flex;
  align-items: center;
}

/* Spectrum */
.vdj-spectrum-box {
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0.7), rgba(15,23,42,0.8));
  border: 1px solid rgba(56,189,248,0.15);
  box-shadow: inset 0 0 20px rgba(6,182,212,0.08), 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
}
.vdj-spectrum-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 11px, rgba(56,189,248,0.04) 12px),
    repeating-linear-gradient(90deg, transparent 0, transparent 24px, rgba(56,189,248,0.04) 25px);
  pointer-events: none;
  z-index: 1;
}

/* ==== PREMIUM MASTER PANEL ==== */
.vdj-master-panel {
  background: linear-gradient(145deg, rgba(15,23,42,0.95), rgba(2,6,23,0.98));
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 12px;
  padding: 8px 10px 10px;
  margin: 6px 4px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 4px 16px rgba(0,0,0,0.5),
    0 0 30px rgba(56,189,248,0.08);
  position: relative;
  overflow: hidden;
}
.vdj-master-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.5), transparent);
}
.vdj-master-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 2px 4px;
}
.vdj-master-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #e2e8f0;
  text-shadow: 0 0 8px rgba(56,189,248,0.4);
}
.vdj-master-panel-title i {
  color: #38bdf8;
  font-size: 0.7rem;
}
.vdj-master-leds {
  display: flex;
  gap: 4px;
  align-items: center;
}
.vdj-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
  transition: box-shadow 0.1s, background 0.1s;
}
.vdj-led.active.vdj-led-green {
  background: #10b981;
  box-shadow: 0 0 10px #10b981, inset 0 0 4px rgba(255,255,255,0.4);
}
.vdj-led.active.vdj-led-yellow {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b, inset 0 0 4px rgba(255,255,255,0.4);
}
.vdj-led.active.vdj-led-red {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444, inset 0 0 4px rgba(255,255,255,0.4);
  animation: vdj-led-pulse 0.4s ease-out;
}
@keyframes vdj-led-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.vdj-master-panel .vdj-master-row {
  margin-top: 8px;
  padding: 0;
}
.vdj-master-panel .vdj-master-knob-group {
  background: linear-gradient(180deg, rgba(30,41,59,0.6), rgba(15,23,42,0.8));
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 8px;
  padding: 6px 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vdj-master-panel .vdj-master-knob-group:hover {
  border-color: rgba(56,189,248,0.35);
  box-shadow: 0 0 16px rgba(56,189,248,0.15);
}
.vdj-master-panel .vdj-master-knob-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.vdj-master-panel .vdj-master-knob-group label i {
  color: #38bdf8;
}
.vdj-master-panel .vdj-knob-val {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  text-shadow: 0 0 6px rgba(56,189,248,0.5);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.vdj-spectrum-canvas {
  width: 100%;
  display: block;
}

/* Master EQ Faders */
.vdj-master-eq {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 6px 0;
}

.vdj-meq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vdj-meq-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(148,163,184,0.5);
  letter-spacing: 0.1em;
}

.vdj-meq-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 24px;
  height: 60px;
  accent-color: #a855f7;
}

/* Panel de Sugerencias Rediseñado */
.sugg-win-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sugg-win-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.sugg-win-letter {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: bold; font-size: 1rem; flex-shrink: 0;
  box-shadow: 0 0 20px rgba(59,130,246,0.4);
}
.sugg-win-heading {
  color: white; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; gap: 6px;
}
.sugg-win-heading::before {
  content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: automix-pulse-anim 1.5s infinite;
}
.sugg-win-sub {
  color: rgba(255,255,255,0.5); font-size: 0.7rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 250px;
}
.sugg-win-actions { display: flex; gap: 6px; align-items: center; }
.sugg-icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  font-size: 0.8rem;
}
.sugg-icon-btn:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  transform: translateY(-1px);
}
.sugg-close-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; cursor: pointer;
  transition: all 0.2s;
}
.sugg-close-btn:hover { background: #ef4444; color: white; }
.sugg-list {
  flex: 1; overflow-y: auto; padding: 12px;
  min-height: 400px; max-height: 70vh;
  display: flex; flex-direction: column; gap: 8px;
}
.sugg-loading, .sugg-empty {
  text-align: center; color: #64748b; padding: 40px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.sugg-item {
  display: flex; gap: 12px; padding: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: all 0.2s;
}
.sugg-item:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(255,255,255,0.03));
  border-color: rgba(139,92,246,0.3);
  transform: translateX(2px);
}
.sugg-thumb {
  position: relative; width: 100px; height: 58px;
  border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: #000;
}
.sugg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sugg-duration {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.85); color: white;
  font-size: 0.65rem; padding: 1px 5px; border-radius: 3px;
  font-weight: 600;
}
.sugg-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sugg-title {
  color: white; font-size: 0.78rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  line-height: 1.25;
}
.sugg-artist {
  color: rgba(255,255,255,0.5); font-size: 0.7rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 4px;
}
.sugg-actions { display: flex; gap: 4px; margin-top: auto; }
.sugg-load-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 5px 8px; border: none; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700; cursor: pointer;
  color: white; transition: all 0.2s;
}
.sugg-load-btn span {
  background: rgba(255,255,255,0.25);
  padding: 1px 6px; border-radius: 4px;
}
.sugg-load-a { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.sugg-load-b { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.sugg-load-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.sugg-queue-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 5px 8px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8);
  border-radius: 6px; cursor: pointer; transition: all 0.2s;
  font-size: 0.68rem; font-weight: 700;
}
.sugg-queue-btn i { font-size: 0.65rem; }
.sugg-queue-a:hover { background: rgba(59,130,246,0.3); color: white; border-color: #3b82f6; }
.sugg-queue-b:hover { background: rgba(6,182,212,0.3); color: white; border-color: #06b6d4; }

/* Drag handle */
.sugg-drag-handle {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.25); font-size: 0.85rem;
  cursor: grab; padding: 0 2px;
  transition: color 0.2s;
}
.sugg-item:hover .sugg-drag-handle { color: rgba(255,255,255,0.6); }
.sugg-item { cursor: grab; }
.sugg-item.sugg-dragging { opacity: 0.4; cursor: grabbing; }
.sugg-item.sugg-dragging .sugg-drag-handle { cursor: grabbing; }

/* Drop zones */
.sugg-drop-available {
  outline: 2px dashed rgba(139, 92, 246, 0.5) !important;
  outline-offset: 4px;
  transition: all 0.2s;
  position: relative;
}
.sugg-drop-available::after {
  content: "↓ Suelta aquí";
  position: absolute; top: 4px; right: 8px;
  background: rgba(139,92,246,0.9); color: white;
  font-size: 0.65rem; padding: 2px 8px; border-radius: 6px;
  font-weight: 700; pointer-events: none; z-index: 10;
}
.sugg-drop-hover {
  outline-color: #10b981 !important;
  background: rgba(16,185,129,0.1) !important;
  transform: scale(1.01);
}
.sugg-drop-hover::after {
  background: #10b981 !important;
  content: "✓ Soltar" !important;
}

/* Botón Salida Video TV */
.vdj-video-output-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  border: 1px solid rgba(59,130,246,0.4);
  color: white;
  border-radius: 10px; cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.vdj-video-output-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}
.vdj-video-output-btn i { font-size: 1.3rem; }
.vdj-video-output-status {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  color: #6ee7b7; font-size: 0.75rem;
}
.vdj-video-output-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: automix-pulse-anim 1.5s infinite;
  flex-shrink: 0;
}
.vdj-video-output-close {
  margin-left: auto;
  padding: 2px 10px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px; cursor: pointer; font-size: 0.7rem;
}
.vdj-video-output-close:hover { background: #ef4444; color: white; }

/* Panel Video Simple */
.vdj-video-simple {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
}
.vdj-video-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.vdj-video-cell {
  display: flex; flex-direction: column; gap: 6px;
}
.vdj-video-cell-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem; font-weight: 600;
  text-align: center;
}
.vdj-video-cell-frame {
  position: relative;
  width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.vdj-video-cell-frame iframe,
.vdj-video-cell-frame img {
  width: 100%; height: 100%; object-fit: cover; border: 0;
}
.vdj-video-cell { cursor: pointer; transition: transform 0.15s; }
.vdj-video-cell:hover { transform: scale(1.02); }
.vdj-video-cell.tv-active .vdj-video-cell-frame {
  outline: 3px solid #10b981;
  outline-offset: 2px;
  box-shadow: 0 0 20px rgba(16,185,129,0.4);
}
.vdj-video-cell.tv-active .vdj-video-cell-label::after {
  content: " 📺 EN TV";
  color: #10b981;
  font-size: 0.65rem;
  animation: automix-pulse-anim 1.5s infinite;
}

/* Selector fuente TV */
.vdj-video-source-selector {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.vdj-video-source-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem; font-weight: 600;
}
.vdj-video-source-btns { display: flex; gap: 4px; flex: 1; }
.vdj-tv-src-btn {
  flex: 1; padding: 5px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border-radius: 6px; cursor: pointer;
  font-size: 0.72rem; font-weight: 600;
  transition: all 0.15s;
}
.vdj-tv-src-btn:hover {
  background: rgba(255,255,255,0.1); color: white;
}
.vdj-tv-src-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white; border-color: #10b981;
  box-shadow: 0 0 12px rgba(16,185,129,0.3);
}

.vdj-video-cell-frame.is-empty::after {
  content: "Sin video";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.35); font-size: 0.8rem;
}
.vdj-video-simple-row {
  display: flex; flex-direction: column; gap: 4px;
}
.vdj-video-simple-row label {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem; font-weight: 500;
  display: flex; justify-content: space-between;
  margin: 0;
}
.vdj-video-simple-row label span {
  color: white; font-weight: 600;
}
.vdj-video-simple-row input[type=range] {
  width: 100%; accent-color: #94a3b8;
}
.vdj-video-simple-xfader {
  display: flex; align-items: center; gap: 8px;
}
.vdj-video-simple-xfader span {
  color: rgba(255,255,255,0.6); font-size: 0.75rem; font-weight: 700;
}
.vdj-video-simple-xfader input { flex: 1; }
.vdj-video-simple-actions {
  display: flex; gap: 8px;
}
.vdj-video-simple-btn {
  flex: 1; padding: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border-radius: 8px; cursor: pointer;
  font-size: 0.75rem; transition: all 0.2s;
}
.vdj-video-simple-btn:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}

/* Botón Sugerencias */
.btn-sugerencias {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.btn-sugerencias:hover {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* AutoMix Bar */
.automix-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.automix-deck-indicator {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 0;
}
.automix-deck-indicator[data-deck="A"].active {
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(59,130,246,0.08));
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 20px rgba(59,130,246,0.25);
}
.automix-deck-indicator[data-deck="B"].active {
  background: linear-gradient(135deg, rgba(6,182,212,0.25), rgba(6,182,212,0.08));
  border-color: rgba(6,182,212,0.5);
  box-shadow: 0 0 20px rgba(6,182,212,0.25);
}
.automix-deck-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  transition: all 0.3s;
}
.automix-deck-indicator[data-deck="A"].active .automix-deck-letter {
  background: #3b82f6; color: white; box-shadow: 0 0 12px rgba(59,130,246,0.7);
}
.automix-deck-indicator[data-deck="B"].active .automix-deck-letter {
  background: #06b6d4; color: white; box-shadow: 0 0 12px rgba(6,182,212,0.7);
}
.automix-deck-status {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.automix-deck-status span:last-child {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.automix-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
  transition: all 0.3s;
}
.automix-deck-indicator.active .automix-pulse {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: automix-pulse-anim 1.5s ease-in-out infinite;
}
@keyframes automix-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.automix-toggle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.3s;
  min-width: 90px;
  font-size: 0.65rem;
}
.automix-toggle-btn i { font-size: 1rem; margin-bottom: 2px; }
.automix-btn-label { font-weight: bold; letter-spacing: 0.5px; font-size: 0.7rem; }
.automix-btn-state {
  font-size: 0.6rem;
  padding: 1px 8px;
  border-radius: 8px;
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  font-weight: bold;
}
.automix-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  color: white;
  transform: translateY(-1px);
}
.automix-toggle-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 20px rgba(139,92,246,0.5);
}
.automix-toggle-btn.active .automix-btn-state {
  background: rgba(16,185,129,0.3);
  color: #10b981;
  animation: automix-pulse-anim 2s ease-in-out infinite;
}

/* Crossfader */
.vdj-crossfader-section {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}

.vdj-cf-label {
  font-size: 0.75rem;
  font-weight: 900;
  color: #38bdf8;
  flex-shrink: 0;
}

.vdj-crossfader {
  flex: 1;
  accent-color: #f59e0b;
  height: 6px;
}

/* Master Controls */
.vdj-master-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.vdj-master-knob-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.vdj-master-knob-group label {
  font-size: 0.5rem;
  font-weight: 800;
  color: rgba(148,163,184,0.5);
  letter-spacing: 0.08em;
}

.vdj-master-knob-group .vdj-knob {
  width: 100%;
}

.vdj-knob-val {
  font-size: 0.55rem;
  font-weight: 700;
  color: #64748b;
  font-family: monospace;
}

/* Mix IA Box */
.vdj-mixia-box {
  text-align: center;
  padding: 6px 4px;
  border-top: none;
}

.vdj-mixia-text {
  color: #cbd5e1;
  font-size: 0.65rem;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ========= VDJ SMART SEARCH ========= */
.vdj-smart-search-wrap {
  flex: none;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  min-height: 0;
  margin-top: 0;
  z-index: 9999;
  overflow: visible;
}

.vdj-search-input-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0 6px;
  transition: all 0.2s ease;
}

.vdj-search-input-row:focus-within {
  border-color: rgba(56,189,248,0.4);
  box-shadow: 0 0 20px rgba(56,189,248,0.1), inset 0 1px 0 rgba(255,255,255,0.05);
  background: rgba(15,23,42,0.95);
}

.vdj-search-icon {
  color: rgba(148,163,184,0.5);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-right: 4px;
  transition: color 0.2s;
}

.vdj-search-input-row:focus-within .vdj-search-icon { color: #38bdf8; }

.vdj-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 5px 0;
  font-weight: 500;
}

.vdj-search-input::placeholder { color: rgba(148,163,184,0.4); }

.vdj-search-spinner {
  color: #38bdf8;
  font-size: 0.85rem;
  margin-left: 6px;
  animation: fadeIn 0.2s ease;
}

.vdj-search-clear {
  background: none;
  border: none;
  color: rgba(148,163,184,0.5);
  font-size: 0.75rem;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  margin-left: 4px;
}
.vdj-search-clear:hover { color: #f87171; background: rgba(239,68,68,0.1); }

.vdj-search-shortcut {
  font-size: 0.46rem;
  font-weight: 700;
  color: rgba(148,163,184,0.3);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 4px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* Genre Chips */
.vdj-genre-chips {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}
.vdj-genre-chips::-webkit-scrollbar {
  height: 2px;
}
.vdj-genre-chips::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.vdj-genre-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(226,232,240,0.7);
  font-size: 0.5rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.vdj-genre-chip:hover {
  background: rgba(56,189,248,0.12);
  border-color: rgba(56,189,248,0.25);
  color: #7dd3fc;
  transform: translateY(-1px);
}

.vdj-genre-chip:active { transform: scale(0.95); }

.vdj-genre-chip.active {
  background: rgba(56,189,248,0.2);
  border-color: rgba(56,189,248,0.4);
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56,189,248,0.15);
}

/* Search Tabs */
.vdj-search-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  min-height: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.vdj-search-tabs::-webkit-scrollbar {
  height: 2px;
}
.vdj-search-tabs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.vdj-search-tabs:empty { display: none; }

.dj-browser-dropdown-inline {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 400px;
  z-index: 99999;
  display: block;
  margin-top: 5px;
  min-height: 0;
  max-height: min(68vh, 620px);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}

.dj-request-dock .input-group {
  flex-wrap: nowrap !important;
}

.dj-request-dock .input-group-text,
.dj-request-dock .form-control {
  min-height: 34px;
}

.dj-request-dock .form-control {
  font-size: 0.74rem;
  width: 1% !important;
  flex: 1 1 auto !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.dj-request-dock .input-group-text {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.dj-request-dock .form-control::placeholder {
  font-size: 0.7rem;
}

.dj-request-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: rgba(148, 163, 184, 0.88);
  font-weight: 600;
}

.dj-request-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.vdj-search-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 3px 8px 3px 10px;
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(226,232,240,0.6);
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 160px;
}

.vdj-search-tab:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }

.vdj-search-tab.active {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: #93c5fd;
}

.vdj-search-tab-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

.vdj-search-tab-close {
  background: none;
  border: none;
  color: rgba(148,163,184,0.4);
  font-size: 0.55rem;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.vdj-search-tab-close:hover { color: #f87171; }

.vdj-search-tab-count {
  font-size: 0.5rem;
  background: rgba(56,189,248,0.15);
  color: #7dd3fc;
  padding: 1px 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* Responsive */
@media (max-width: 899px) {
  .vdj-console-grid {
    grid-template-columns: 1fr 180px 1fr;
  }
}

@media (max-width: 899px) {
  .vdj-console-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .vdj-mixer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .vdj-master-eq {
    flex-direction: row;
  }
  .vdj-smart-search-wrap { max-width: 100%; }
  .vdj-genre-chips { overflow-x: auto; flex-wrap: nowrap; }
}

/* =========================================================
   VDJ VIDEO PANEL - Panel de Video Completo
   ========================================================= */

/* Panel switcher */
.vdj-mixer-panel { display: flex; flex-direction: column; gap: 0; }
.vdj-mixer-panel.active { display: flex; }

/* Video Panel Container */
.vdj-video-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 6px;
  overflow-y: auto;
  max-height: 540px;
}

/* Output Preview */
.vdj-video-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vdj-video-preview-label {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(148,163,184,0.7);
  text-transform: uppercase;
  display: flex;
  align-items: center;
}

.vdj-output-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(59,130,246,0.2);
  box-shadow: 0 0 16px rgba(59,130,246,0.1), inset 0 0 0 1px rgba(255,255,255,0.03);
}

.vdj-output-overlay-info {
  position: absolute;
  bottom: 4px;
  right: 4px;
  pointer-events: none;
}

.vdj-output-res-badge {
  font-size: 0.5rem;
  font-weight: 800;
  background: rgba(0,0,0,0.7);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  border: 1px solid rgba(56,189,248,0.2);
}

/* Controls Grid */
.vdj-video-controls-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vdj-video-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vdj-video-ctrl-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(148,163,184,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vdj-video-val-badge {
  font-size: 0.55rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
}

.vdj-video-select {
  width: 100%;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  color: #e2e8f0;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 5px 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.vdj-video-select:focus { outline: none; border-color: rgba(56,189,248,0.4); }
.vdj-video-select option { background: #1e2330; color: #e2e8f0; }

/* Video Sliders */
.vdj-video-slider {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  outline: none;
}
.vdj-video-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: grab;
  transition: transform 0.1s;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.vdj-video-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.3); }

.vdj-slider-blue  { accent-color: #3b82f6; }
.vdj-slider-blue::-webkit-slider-thumb  { background: #3b82f6; }
.vdj-slider-cyan  { accent-color: #06b6d4; }
.vdj-slider-cyan::-webkit-slider-thumb  { background: #06b6d4; }
.vdj-slider-yellow { accent-color: #f59e0b; }
.vdj-slider-yellow::-webkit-slider-thumb { background: #f59e0b; }
.vdj-slider-pink  { accent-color: #ec4899; }
.vdj-slider-pink::-webkit-slider-thumb  { background: #ec4899; }

/* Video Transition FX */
.vdj-video-fx-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.vdj-video-fx-title {
  font-size: 0.55rem;
  font-weight: 800;
  color: rgba(148,163,184,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vdj-video-fx-btns {
  display: flex;
  gap: 3px;
}

.vdj-video-fx-btn {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: rgba(148,163,184,0.6);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 5px 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}
.vdj-video-fx-btn:hover {
  background: rgba(56,189,248,0.12);
  color: #7dd3fc;
  border-color: rgba(56,189,248,0.25);
}
.vdj-video-fx-btn.active {
  background: rgba(56,189,248,0.2);
  border-color: rgba(56,189,248,0.4);
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56,189,248,0.2);
}

/* Video Crossfader */
.vdj-video-xfader-section {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

/* Action Row */
.vdj-video-action-row {
  display: flex;
  gap: 4px;
}

.vdj-video-action-btn {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vdj-video-action-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.2);
}
.vdj-btn-live {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: #4ade80;
}
.vdj-btn-live:hover {
  background: rgba(34,197,94,0.25) !important;
  box-shadow: 0 0 12px rgba(34,197,94,0.2);
}

/* Diagnostics Row */
.vdj-video-diag-row {
  display: flex;
  gap: 4px;
  padding: 6px 4px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.vdj-video-diag-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vdj-diag-label {
  font-size: 0.48rem;
  font-weight: 800;
  color: rgba(100,116,139,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vdj-diag-val {
  font-size: 0.7rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
}

@media (max-width: 899px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 1050;
  }

  .sidebar::before {
    display: none;
  }

  .sidebar-top {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .sidebar .brand {
    padding: 0;
    margin: 0;
    border-bottom: 0;
    flex-shrink: 0;
  }

  .sidebar-select-wrap {
      width: auto;
      max-width: 50%;
    flex-shrink: 0;
  }

  .nav-menu {
    width: 100%;
    flex-direction: row;
    gap: 0.85rem;
    flex-wrap: nowrap;
    min-width: 100%;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .nav-item {
    margin: 0;
    min-width: 84px;
    padding: 0.75rem 0.9rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .nav-item span {
    display: block;
    font-size: 0.7rem;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
  }

  .nav-item .badge {
    margin: 0 !important;
  }

  .user-profile {
    display: none;
  }

  .main-content {
    min-height: 0;
  }

  .module-section {
    height: auto;
    min-height: calc(100dvh - 88px);
  }

  #ventas.module-section,
  #mesas.module-section,
  #inventario.module-section {
    min-height: calc(100dvh - 88px);
  }

  section.module-section.p-4 {
    padding: 1rem !important;
  }

  .module-centered {
    padding-inline: 1rem !important;
  }

  .module-centered > * {
    max-width: none;
  }

  #hub > .d-flex:first-child,
  #dashboard > .d-flex:first-child,
  #caja > .d-flex:first-child,
  #dj > .d-flex:first-child,
  #inventario > .px-5.py-4 > .d-flex:first-child {
    flex-wrap: wrap;
    align-items: flex-start !important;
    gap: 0.85rem;
  }

  .toast-modern {
    min-width: 0;
    width: min(92vw, 420px);
    max-width: calc(100vw - 24px);
    padding: 0.9rem 1rem;
    bottom: 16px;
  }

  .modal-dialog {
    margin: 0.75rem;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  #ventas > .d-flex.h-100,
  #mesas > .d-flex.h-100 {
    flex-direction: column;
  }

  .pos-product-container {
    padding: 1rem;
    gap: 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .pos-cart {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 42dvh;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .map-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem;
    padding: 0.75rem !important;
  }

  .map-toolbar .glass-panel {
    justify-content: center;
    flex-wrap: wrap;
  }

  #editMapControls {
    left: 0;
    right: 0;
    bottom: 1rem;
    transform: none !important;
    margin: 0 1rem;
  }

  .edit-mode-bar {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.85rem 1rem;
  }

  #tableDetailPanel {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }

  #tableCheckoutArea .p-5,
  #productDrawer .p-5 {
    padding: 1.25rem !important;
  }

  #inventario > .px-5.py-4,
  #inventario > .flex-grow-1.p-5 {
    padding: 1rem !important;
  }

  #inventario #productDrawer {
    width: min(100vw, 640px) !important;
  }

  #inventario .display-6 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
  }

  .gastos-form-shell.sticky-top {
    position: static !important;
    top: auto !important;
  }

  .gastos-toolbar {
    align-items: stretch !important;
  }

  .gastos-filter-select,
  .gastos-filter-field {
    width: 100%;
    flex: 1 1 100%;
  }

  .vdj-console-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .vdj-deck-main-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .dj-tool-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dj-toolbar,
  .dj-panel-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .main-content {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dj-request-dock {
    min-width: 0;
    width: 100%;
  }

  .dj-section-header {
    gap: 0.85rem;
    margin-bottom: 1rem !important;
  }

  .dj-header-actions,
  .dj-header-meta {
    width: 100%;
  }

  .dj-app-btn {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .dj-deck-overview {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem !important;
  }

  .sidebar {
    padding: 0.75rem 0.75rem 0.2rem;
    gap: 0.5rem;
  }

  .sidebar-toggle-btn {
    display: none;
  }

  .brand-text {
    display: block;
    max-width: none;
    font-size: 0.6rem !important;
  }

  .sidebar-select-wrap {
    width: auto;
    min-width: unset;
    max-width: 140px;
  }
  
  .sidebar-select-wrap .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.7rem !important;
  }

  .nav-item {
    min-width: 72px;
    padding: 0.65rem 0.75rem;
  }

  .nav-item i {
    font-size: 1rem;
  }

  .nav-item span {
    font-size: 0.64rem;
  }

  .module-section {
    min-height: calc(100dvh - 124px);
  }

  #hub,
  #dashboard {
    overflow-y: visible;
    padding-bottom: 1rem !important;
  }

  #hub > .row.g-4 > [class*="col-"],
  #dashboard > .row.g-4.mb-4 > [class*="col-"] {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }

  #hub .glass-panel,
  #dashboard > .row.g-4.mb-4 .glass-panel {
    padding: 1rem !important;
  }

  #hub h5,
  #dashboard > .row.g-4.mb-4 .text-uppercase {
    font-size: 0.9rem;
  }

  #hub .small.text-secondary,
  #dashboard > .row.g-4.mb-4 .small.text-secondary {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  section.module-section.p-4 {
    padding: 0.85rem !important;
  }

  .module-centered {
    padding-inline: 0.75rem !important;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  #hub .glass-panel,
  #dashboard .glass-panel,
  #caja .glass-panel {
    padding: 1rem !important;
  }

  #ventas .p-4.bg-app.bg-opacity-50 {
    padding: 1rem !important;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .pos-cart {
    max-height: none;
  }

  .cart-header,
  .cart-footer {
    padding: 1rem;
  }

  .pos-cart-summary,
  .pos-payment-grid,
  .pos-checkout-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .pos-checkout-overlay {
    padding: 0.85rem;
  }

  .pos-checkout-card {
    padding: 0.9rem;
    border-radius: 16px;
  }

  .cart-footer .row.g-2 {
    row-gap: 0.5rem;
  }

  .cart-footer .row.g-2 > * {
    width: 50%;
    flex: 0 0 50%;
  }

  .map-toolbar .glass-panel {
    width: 100%;
    border-radius: 18px !important;
  }

  .table-item {
    transform: translate(-50%, -50%) scale(0.88);
  }

  .table-item:hover {
    transform: translate(-50%, -50%) scale(0.94);
  }

  .table-info-overlay {
    width: min(220px, 78vw);
  }

  #inventario .d-flex.justify-content-between.align-items-center.mb-4,
  #inventario .d-flex.justify-content-between.align-items-center.mb-5,
  #inventario .d-flex.gap-2,
  #inventario .d-flex.align-items-center.gap-4 {
    flex-direction: column;
    align-items: stretch !important;
  }

  #inventario .input-group[style] {
    max-width: none !important;
    min-width: 0 !important;
    width: 100%;
  }

  #inventario #productDrawer {
    width: 100% !important;
  }

  #inventario #productPreview {
    width: 84px !important;
    height: 84px !important;
  }

  .gastos-form-banner,
  .gastos-form-tip,
  .gastos-history-head {
    flex-direction: column;
    align-items: stretch;
  }

  .vdj-waveform-overview {
    flex-direction: column;
  }

  .vdj-waveform-divider {
    justify-content: center;
    padding: 6px 8px;
  }

  .vdj-waveform-b {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .vdj-deck {
    padding: 0.85rem;
  }

  .vdj-deck-header,
  .vdj-video-action-row,
  .vdj-video-diag-row {
    flex-wrap: wrap;
  }

  .dj-deck-queue-head {
    flex-direction: column;
    align-items: stretch;
  }

  .dj-deck-queue-meta {
    justify-content: flex-start;
  }

  .vdj-deck-main-row {
    grid-template-columns: 1fr;
  }

  .vdj-jog-canvas {
    max-width: 150px;
  }

  .vdj-video-box {
    min-height: 150px;
  }

  .dj-tool-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dj-tool-tab {
    min-height: 42px;
  }

  .dj-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dj-request-item {
    align-items: flex-start !important;
  }

  .table-premium {
    font-size: 0.86rem;
  }

  #ventas > .d-flex.h-100 {
    gap: 0;
    align-items: stretch;
  }

  #ventas > .d-flex.h-100 > .flex-grow-1.d-flex.flex-column {
    min-height: 52dvh;
  }

  #ventas .p-4.bg-app.bg-opacity-50 {
    position: sticky;
    top: 0;
    z-index: 15;
    padding: 0.9rem !important;
  }

  #ventas .pos-product-container {
    padding: 0.85rem 0.85rem 1rem;
    gap: 0.85rem;
  }

  #ventas #productGrid.product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  #ventas .product-card {
    padding: 0.9rem;
    border-radius: 18px;
  }

  #ventas .product-img-container,
  #ventas .product-image {
    height: 108px;
    margin-bottom: 0.85rem;
  }

  #ventas .product-title {
    font-size: 0.9rem;
    line-height: 1.28;
  }

  #ventas .product-price {
    font-size: 0.95rem;
    padding: 0.35rem 0.7rem;
  }

  /* overridden by bottom-sheet pattern below */

  #ventas .cart-header,
  #ventas .cart-items,
  #ventas .cart-footer {
    padding: 1rem;
  }

  #ventas .cart-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
  }

  #ventas .cart-total {
    font-size: 1.85rem;
    margin: 0.75rem 0 1rem;
  }

  #ventas #discountInput {
    width: 88px !important;
  }

  #mesas > .d-flex.h-100.overflow-hidden {
    overflow: visible !important;
  }

  #tablesMapContainer {
    min-height: 100dvh;
    flex: 1;
  }

  #tablesArea {
    min-height: 100dvh;
  }

  #tableDetailPanel {
    width: 100% !important;
    max-width: none !important;
    border-left: 0 !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    max-height: 100dvh;
    height: 100dvh;
    z-index: 120;
  }

  .map-toolbar {
    gap: 0.5rem;
    padding: 0.5rem !important;
    flex-wrap: wrap;
  }

  .map-toolbar > .glass-panel {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    border-radius: 12px !important;
    padding: 0.5rem !important;
  }

  .map-toolbar > .glass-panel:first-child {
    margin-bottom: 0.5rem;
  }

  #editFab {
    bottom: 1rem !important;
    right: 1rem !important;
    margin: 0 !important;
    z-index: 50;
  }

  #editMapControls {
    bottom: 1rem;
    left: 0.5rem;
    right: 5rem;
    margin: 0;
    z-index: 50;
    max-width: calc(100% - 5.5rem);
  }

  #editMapControls .edit-mode-bar {
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  #editMapControls .edit-mode-bar > * {
    flex: 1 1 auto;
    min-width: 0;
  }

  #tableDetailPanel {
    width: 100% !important;
    max-width: none !important;
    border-left: 0 !important;
  }

  #tableContent .card-header {
    padding: 0.75rem !important;
    gap: 0.5rem;
  }

  #tableContent .card-header > .d-flex.gap-2 {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #tableOrdersList {
    padding: 0.5rem !important;
    overflow-x: auto;
  }

  #tableContent > .p-4.flex-grow-1 {
    padding: 0.75rem !important;
  }

  #tableOrderItems {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    max-height: none;
  }

  .table-order-toolbar,
  .table-product-picker-head,
  .table-drawer-preference {
    flex-direction: column;
    align-items: stretch;
  }

  .table-product-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 140;
    padding: 0.75rem;
  }

  .table-product-drawer-shell {
    border-radius: 24px 24px 0 0;
  }

  #tableOrderItems > div {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  #tableProductGrid {
    max-height: none;
  }

  #closeTablePanel {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 20;
  }

  #tableCheckoutArea .p-5 {
    padding: 1rem !important;
  }

  #tableCheckoutArea .row.g-5 {
    row-gap: 1rem;
  }

  #tableCheckoutArea .mt-5.d-flex.gap-3 {
    flex-direction: column;
    margin-top: 1.25rem !important;
  }

  #dj.module-section {
    padding: 0 !important;
  }

  .dj-workspace {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-radius: 0;
  }

  .dj-workspace-topbar,
  .dj-console-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .dj-workspace-brand p {
    max-width: none;
    font-size: 0.84rem;
  }

  .dj-workspace-meta {
    justify-content: flex-start;
  }

  .dj-workspace-grid,
  .dj-vjd-grid,
  .dj-virtual-dj-grid,
  .dj-console-visual-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    overflow: visible;
  }

  .dj-column-queue,
  .dj-column-stage {
    border-right: 0;
  }

  .dj-console-body,
  .dj-workspace-column,
  .dj-console-stage,
  .dj-console-main,
  .dj-console-rail,
  .dj-tool-panels,
  .dj-tool-panel {
    overflow: visible;
  }

  .dj-console-body {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .dj-panel-card,
  .dj-stage-shell,
  .dj-tool-card,
  .dj-console-card {
    height: auto;
  }

  .dj-console-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dj-screen-head,
  .dj-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dj-console-screen {
    min-height: 180px;
  }

  .dj-visual-canvas {
    height: 96px;
  }

  .dj-tool-tab {
    padding: 0.75rem 0.55rem;
    font-size: 0.78rem;
  }

  .dj-toolbar {
    gap: 0.75rem;
  }

  .dj-request-table-wrap {
    max-height: 320px;
    overflow: auto;
  }

  .vdj-video-panel {
    max-height: none;
  }

  .vdj-video-controls-grid {
    grid-template-columns: 1fr;
  }

  .vdj-transport {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .vdj-btn {
    min-height: 46px;
    font-size: 0.76rem;
  }
}

@media (max-width: 575px) {
  #ventas #productGrid.product-grid {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  #ventas #productGrid.product-grid {
    grid-template-columns: 1fr;
  }

  /* #ventas .pos-cart overridden by bottom-sheet pattern */

  #tableContent .card-header > .d-flex.gap-2 > * {
    flex: 1 1 calc(50% - 0.25rem);
  }

  .dj-console-summary {
    grid-template-columns: 1fr;
  }

  .dj-app-btn {
    flex: 1 1 100%;
  }

  .dj-app-status {
    width: 100%;
  }

  .dj-deck-overview-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dj-meta-badge {
    width: 100%;
    justify-content: center;
  }

  .sidebar-select-wrap {
    display: block !important;
    width: auto;
    min-width: 130px;
    max-width: 45vw;
  }

  .nav-menu {
    gap: 0.45rem;
  }

  .nav-item {
    min-width: 64px;
    padding: 0.6rem 0.55rem;
  }

  .module-section {
    min-height: calc(100dvh - 112px);
  }

  .toast-modern {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    border-radius: 16px;
  }

  .cart-footer .row.g-2 > * {
    width: 100%;
    flex: 0 0 100%;
  }

  .dj-tool-tabs {
    grid-template-columns: 1fr;
  }

  .vdj-jog-canvas {
    max-width: 136px;
  }
}

/* =============================================
   DJ QUICK ACCESS PILL & NOW PLAYING WIDGET
   ============================================= */

/* --- Quick Access Pill (centered top shortcut) --- */
.top-center-stack {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1060;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.top-center-stack > * {
  pointer-events: auto;
}

/* --- Quick Access Pill (within stack) --- */
.dj-quick-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 12px;
  height: 40px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.4), rgba(30, 30, 45, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  user-select: none;
  letter-spacing: 0.5px;
}

.dj-quick-pill:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(59, 130, 246, 0.35));
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.3), 0 0 0 3px rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}

.dj-quick-pill:active {
  transform: scale(0.96);
}

.dj-quick-pill i {
  font-size: 0.85rem;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5));
}

.dj-quick-pill-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.dj-quick-pill-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: djBadgePop 0.3s ease-out;
}

@keyframes djPillPulseSubtle {
  0%, 100% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12), 0 0 0 0 rgba(139, 92, 246, 0); }
  50% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2), 0 0 0 4px rgba(139, 92, 246, 0.05); }
}

@keyframes djBadgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Hide pill when on DJ panel itself */
.dj-quick-pill.is-on-dj {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

/* --- Floating Now Playing Widget (v2 Advanced) --- */
.dj-np-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 280px;
  background: rgba(8, 10, 18, 0.92);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 18px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 1px rgba(255, 255, 255, 0.08),
    0 0 40px rgba(139, 92, 246, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  animation: djWidgetSlideIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes djWidgetSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dj-np-widget:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.6),
    0 0 1px rgba(255, 255, 255, 0.12),
    0 0 50px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Drag bar at the very top â€” separated from header so buttons aren't captured */
.dj-np-drag-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 2px 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.dj-np-drag-bar:active { cursor: grabbing; }

.dj-np-drag-dots {
  display: flex;
  gap: 3px;
}
.dj-np-drag-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.2s;
}
.dj-np-drag-bar:hover .dj-np-drag-dots span {
  background: rgba(139, 92, 246, 0.5);
}

.dj-np-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 12px 6px 12px;
}

.dj-np-widget-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(224, 212, 252, 0.85);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.dj-np-widget-title i {
  font-size: 0.72rem;
  color: #a78bfa;
  filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.4));
}

.dj-np-widget-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dj-np-widget-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dj-np-widget-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #e0d4fc;
  transform: scale(1.08);
}

.dj-np-widget-body {
  padding: 4px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Deck row */
.dj-np-deck {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: none !important;
}

.dj-np-deck.is-playing {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(139, 92, 246, 0.04));
  border-color: rgba(34, 197, 94, 0.15);
}

/* Album art */
.dj-np-deck-art-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.dj-np-deck-art {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

.dj-np-deck.is-playing .dj-np-deck-art {
  border-color: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.1);
}

.dj-np-deck-letter {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
}

.dj-np-deck-letter.deck-a {
  background: rgba(37, 99, 235, 0.85);
  color: #bfdbfe;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.dj-np-deck-letter.deck-b {
  background: rgba(217, 119, 6, 0.85);
  color: #fef3c7;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

/* Track info */
.dj-np-deck-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dj-np-deck-track {
  color: #eff0f3;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.dj-np-deck.is-playing .dj-np-deck-track {
  color: #fff;
}

.dj-np-deck-artist {
  color: rgba(148, 163, 184, 0.6);
  font-size: 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Progress bar */
.dj-np-deck-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  margin-top: 3px;
  overflow: hidden;
}

.dj-np-deck-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  transition: width 0.8s linear;
}

.dj-np-deck.is-playing .dj-np-deck-progress-bar {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* Play/Pause button */
.dj-np-deck-playbtn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(148, 163, 184, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  z-index: 10;
}

.dj-np-deck-playbtn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #e0d4fc;
  transform: scale(1.12);
}

.dj-np-deck-playbtn:active {
  transform: scale(0.92);
}

.dj-np-deck.is-playing .dj-np-deck-playbtn {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

.dj-np-deck.is-playing .dj-np-deck-playbtn:hover {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

@keyframes djNpPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.15); }
  50% { box-shadow: 0 0 14px rgba(34, 197, 94, 0.35); }
}

/* Widget hidden state */
.dj-np-widget.is-hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .dj-quick-pill {
    padding: 0 12px 0 10px;
    font-size: 0.72rem;
  }

  .dj-np-widget {
    width: 240px;
    bottom: 12px;
    right: 12px;
  }

  .dj-np-deck-art-wrap,
  .dj-np-deck-art {
    width: 32px;
    height: 32px;
  }

  .dj-np-deck-track { font-size: 0.68rem; }
  .dj-np-deck-artist { font-size: 0.55rem; }
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}
body.light-mode input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #1e293b !important;
}
.user-avatar-sm { box-shadow: 0 0 10px var(--primary-glow); }

.table-premium th { text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.05em; color: rgba(255,255,255,0.5); }


/* --- HISTORIAL CALENDAR --- */

.history-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.history-calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    text-transform: uppercase;
}
.history-calendar-day {
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.history-calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    z-index: 2;
}
.history-calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}
.history-calendar-day.empty:hover {
    transform: none;
}
.history-calendar-day.has-sales {
    border-color: rgba(208, 149, 255, 0.3);
}
.history-calendar-day.has-sales::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow);
}
.history-calendar-day.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}
.history-calendar-day.selected::after {
    background: #fff;
    box-shadow: none;
}
.history-calendar-day.today {
    color: var(--accent);
}
.history-calendar-day.selected.today {
    color: #fff;
}

.history-sale-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}
.history-sale-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(208, 149, 255, 0.3);
}
.history-sale-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.history-sale-items {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}
.history-sale-amounts {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.history-payment-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

/* Responsive para calendario de historial en móvil */
@media (max-width: 767px) {
    .history-calendar-grid {
        gap: 2px;
    }
    .history-calendar-day-header {
        font-size: 0.65rem;
        padding: 0.25rem 0;
    }
    .history-calendar-day {
        font-size: 0.75rem;
        border-radius: 6px;
        min-height: 36px;
    }
    .history-calendar-day.has-sales::after {
        width: 4px;
        height: 4px;
        bottom: 3px;
    }
    /* Ajustes para la sección de historial en móvil */
    #historial .row.g-4 {
        flex-direction: column;
    }
    #historial .col-md-5.col-lg-4,
    #historial .col-md-7.col-lg-8 {
        width: 100%;
        height: auto !important;
    }
    #historial .glass-panel {
        max-height: 400px;
    }
}

@media (max-width: 575px) {
    .history-calendar-day {
        font-size: 0.7rem;
        min-height: 32px;
    }
    .history-calendar-day-header {
        font-size: 0.6rem;
    }
}

@media print {
    body * { visibility: hidden; }
    #inventario, #inventario * { visibility: visible; }
    #inventario { 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        background: white !important; 
        color: black !important;
        display: flex !important;
    }
    .btn, .input-group, .border-bottom, .glass-panel { border: none !important; background: none !important; box-shadow: none !important; }
    .display-6, .h4, .text-white { color: black !important; }
    .table-premium { color: black !important; width: 100%; border-collapse: collapse; }
    .table-premium th, .table-premium td { border: 1px solid #ddd !important; padding: 8px !important; }
    .badge { border: 1px solid black !important; color: black !important; background: transparent !important; }
    .d-none-print, button, input { display: none !important; }
}

@media print {
    body * { visibility: hidden; }
    #inventario, #inventario * { visibility: visible; }
    #inventario { 
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%; 
        background: white !important; 
        color: black !important;
        display: flex !important;
    }
    .btn, .input-group, .border-bottom, .glass-panel { border: none !important; background: none !important; box-shadow: none !important; }
    .display-6, .h4, .text-white { color: black !important; }
    .table-premium { color: black !important; width: 100%; border-collapse: collapse; }
    .table-premium th, .table-premium td { border: 1px solid #ddd !important; padding: 8px !important; }
    .badge { border: 1px solid black !important; color: black !important; background: transparent !important; }
    .d-none-print, button, input { display: none !important; }
}

.flying-item { position: fixed; z-index: 99999; pointer-events: none; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease-out, width 0.6s, height 0.6s; border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.5); transform-origin: center center; }

.cursor-pointer, .nav-item, .glass-panel[onclick], .product-card, .btn, .table-item {
    cursor: pointer !important;
}



#cashMetricsGrid .h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.25rem !important;
}
#cashMetricsGrid .glass-panel {
    padding: 1rem !important;
}

/* New Integrated Inputs */
.input-modern-wrapper {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 2px 12px !important;
    transition: all 0.3s ease !important;
    margin-bottom: 1rem;
}
.input-modern-wrapper:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2) !important;
    background: rgba(15, 23, 42, 0.8) !important;
}

/* Fix: Inner input should be transparent inside wrapper */
.input-modern-wrapper .input-modern {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 5px !important;
    width: 100% !important;
    color: white !important;
}
.input-modern-icon {
    color: var(--primary) !important;
    margin-right: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}
.input-modern-borderless {
    background: transparent !important;
    border: none !important;
    color: white !important;
    padding: 8px 0 !important;
    width: 100% !important;
    outline: none !important;
    font-size: 0.95rem !important;
}
.input-modern-borderless::placeholder {
    color: rgba(255,255,255,0.3) !important;
}
/* ---- FLOOR ELEMENT HANDLES & CONTEXT ---- */
.editing .rotate-handle, .editing .resize-handle {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1);
}

.resize-handle {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 20px;
  height: 200%; /* Cover a larger vertical area for easier grabbing */
  max-height: 24px;
  width: 24px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50%; /* Circle looks more standard for handles */
  cursor: nwse-resize;
  z-index: 2100;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resize-handle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: translate(-1px, -1px);
}

.resize-handle:hover {
  transform: scale(1.2);
  background: var(--primary-light);
  box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.4);
}

.rotate-handle {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: grab;
  z-index: 2100 !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.65rem;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.rotate-handle::before {
  content: '\f2f1';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}
.rotate-handle::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 10px;
  background: var(--primary);
}

.rotate-handle:hover { transform: translateX(-50%) scale(1.2); background: var(--primary-light); }

#floorContextMenu {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  animation: contextShow 0.15s ease-out;
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.9) !important;
  z-index: 3000 !important;
}

@keyframes contextShow {
  from { opacity: 0; transform: scale(0.95) translateY(-5px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.floor-element {
  backdrop-filter: blur(4px);
  transition: box-shadow 0.2s;
  z-index: 3;
}
.floor-element.editing {
  z-index: 50 !important;
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3) !important;
}

.floor-element.wall { background: rgba(148, 163, 184, 0.2); border-color: rgba(148, 163, 184, 0.5); }
.floor-element.bar { background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.5); }
.floor-element.stage { background: rgba(168, 85, 247, 0.18); border-color: rgba(168, 85, 247, 0.5); }
.floor-element.zone { background: rgba(14, 165, 233, 0.1); border-color: rgba(14, 165, 233, 0.4); }
.floor-element.column { border-radius: 50% !important; background: rgba(148, 163, 184, 0.4); }



/* --- NOTIFICATION BELL & DROPDOWN --- */
.notification-wrapper {
  position: relative;
  z-index: 1060;
}

.notification-bell-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}

.notification-bell-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.notification-bell-btn .notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  max-height: 500px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: notifyDrop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}

.dj-peticiones-dropdown.dj-peticiones-fading {
  opacity: 0;
  transform: translateX(-50%) scale(0.96) translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes notifyDrop {
  from { opacity: 0; transform: translateX(-50%) scale(0.9) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

.notification-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.notification-list {
  overflow-y: auto;
  padding: 0.75rem;
  flex: 1;
}

.notification-item {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.notification-item.item-music { border-left: 3px solid #3b82f6; }
.notification-item.item-order { border-left: 3px solid #10b981; }

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.item-music .notification-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.item-order .notification-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.notification-content { flex: 1; min-width: 0; }

.notification-title {
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.notification-msg {
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.notification-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.5);
}

.notification-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
}

.btn-confirm-notify,
.btn-delete-notify {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-confirm-notify:hover {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.btn-delete-notify:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.notification-loc {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}


/* FINAL MEGA-FIX PARA AUTOFILL Y RECUADRO BLANCO EN LOGIN */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
input:-internal-autofill-selected {
    -webkit-box-shadow: 0 0 0 1000px #0f171e inset !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 1000px #0f171e inset !important;
    transition: background-color 5000s ease-in-out 0s;
    background-color: transparent !important;
    background-image: none !important;
}

.input-modern, .input-group .form-control, input {
    background-color: transparent !important;
    background-image: none !important;
    color: #ffffff !important;
}

.input-modern-wrapper {
    background: rgba(15, 23, 42, 0.95) !important;
    color: white !important;
}


/* Fix Final: Remover apariencia nativa y forzar transparencia */
.input-modern, input.input-modern {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: white !important;
}

/* --- LIGHT MODE PARA PANEL DJ VDJ ENGINE --- */
body.light-mode .vdj-console-grid {
    background: #f8fafc;
    border-radius: var(--radius-xl);
}
body.light-mode .vdj-deck,
body.light-mode .vdj-mixer {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-mode .vdj-track-title {
    color: #1e293b !important;
}
body.light-mode .vdj-track-artist {
    color: #64748b !important;
}
body.light-mode .vdj-time-lcd {
    background: #e2e8f0;
    color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
body.light-mode .vdj-time-lcd-remain { color: #f43f5e; }
body.light-mode .vdj-bpm-display {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}
body.light-mode .vdj-btn {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border: 1px solid #cbd5e1;
    color: #334155;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
body.light-mode .vdj-btn:hover { background: #e2e8f0; color: #0f172a; }
body.light-mode .vdj-btn:active { background: #cbd5e1; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); }
body.light-mode .vdj-btn-play,
body.light-mode .vdj-btn-cue {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: white !important;
}
body.light-mode .vdj-btn-toggle.active {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border-color: #93c5fd;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
body.light-mode .vdj-fader-track { background: #cbd5e1; border: 1px solid #94a3b8; }
body.light-mode .vdj-fader-knob {
    background: linear-gradient(to right, #f8fafc, #e2e8f0);
    border: 1px solid #94a3b8;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.15);
}
body.light-mode .vdj-knob-container canvas { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)); }
body.light-mode .vdj-mixer-tabs { background: #e2e8f0; }
body.light-mode .vdj-mixer-tab { color: #64748b; }
body.light-mode .vdj-mixer-tab.active { background: white; color: #0f172a; border: 1px solid #cbd5e1; }
body.light-mode .vdj-mixer-panel { border: 1px solid #cbd5e1; }
body.light-mode .vdj-video-box { background: #1e293b; /* keep video dark to contrast */ border: 2px solid #cbd5e1; }
body.light-mode .vdj-header-bar { border-bottom: 1px solid #cbd5e1; }
body.light-mode .vdj-fx-pad {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}
body.light-mode .vdj-fx-pad:hover { background: #e2e8f0; }
body.light-mode .vdj-fx-pad.active {
    background: rgba(14, 165, 233, 0.1);
    border-color: #38bdf8;
    color: #0284c7;
}
body.light-mode .vdj-deck-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* --- MÁS ARREGLOS LIGHT MODE PARA PANEL DJ VDJ ENGINE --- */
body.light-mode .dj-workspace-topbar,
body.light-mode .dj-console-header {
    background: linear-gradient(180deg, #ffffff, #f1f5f9) !important;
    border-bottom: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02) !important;
}
body.light-mode .vdj-jog-wrap {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}
body.light-mode .vdj-video-box {
    background: #f8fafc !important; /* Make video container lighter if there's no video */
    border: 1px solid #cbd5e1 !important;
}
body.light-mode .vdj-time-lcd,
body.light-mode .vdj-jog-time {
    color: #475569;
    font-weight: 600;
}
body.light-mode .vdj-deck-main-row {
    background: transparent;
}
body.light-mode .dj-search-glass,
body.light-mode .vdj-searcher input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
body.light-mode .dj-search-glass::placeholder,
body.light-mode .vdj-searcher input::placeholder {
    color: #94a3b8;
}
body.light-mode .dj-track-result {
    color: #334155;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
body.light-mode .dj-track-result:hover {
    background: #f1f5f9;
}
body.light-mode .vdj-deck-artwork {
    background: #e2e8f0;
}
body.light-mode .vdj-video-meta {
    color: #475569;
    text-shadow: none;
    font-weight: 500;
}
body.light-mode .dj-section-copy h4 {
    color: #0f172a !important;
}
body.light-mode .dj-workspace-brand {
    color: #0f172a !important;
}
body.light-mode .dj-request-item {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
body.light-mode .dj-request-item .text-white {
    color: #1e293b !important;
}
body.light-mode .dj-request-item .text-secondary {
    color: #64748b !important;
}
body.light-mode #djQueueContent .text-secondary {
    color: #64748b !important;
}
body.light-mode .dj-empty-list {
    color: #94a3b8 !important;
}

/* =============================================
   MOBILE DJ CONSOLE OPTIMIZATION
   ============================================= */

.dj-mobile-tabbar {
  display: none;
}

.dj-landscape-hint {
  display: none;
}

@media (max-width: 767px) {

  /* --- Mobile Tab Bar --- */
  .dj-mobile-tabbar {
    display: flex !important;
    gap: 0;
    padding: 0;
    margin-bottom: 0.65rem;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
  }

  .dj-mob-tab {
    flex: 1;
    padding: 11px 4px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
  }

  .dj-mob-tab.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(139,92,246,0.16));
    color: #60a5fa;
    box-shadow: inset 0 -2px 0 #3b82f6;
  }

  .dj-mob-tab i { font-size: 0.82rem; }

  /* --- Landscape Hint --- */
  .dj-landscape-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 0.65rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: rgba(255,255,255,0.65);
    font-size: 0.72rem;
    font-weight: 500;
  }

  .dj-landscape-hint i:first-child {
    font-size: 1.3rem;
    color: #8b5cf6;
    flex-shrink: 0;
  }

  .dj-landscape-dismiss {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
  }

  /* Hide hint in landscape */
  @media (orientation: landscape) {
    .dj-landscape-hint { display: none !important; }
  }

  /* --- Section Header compact --- */
  .dj-section-subtitle { display: none; }

  .dj-section-header {
    flex-direction: column;
    gap: 0.5rem !important;
    margin-bottom: 0.65rem !important;
  }

  .dj-section-header h4 { font-size: 1.1rem; }
  .dj-section-header h4 i { font-size: 1.4rem !important; }

  .dj-header-meta {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  /* --- Hide right sidebar on mobile --- */
  .dj-console-rail-right { display: none !important; }

  /* --- TAB: Cola (requests) --- */
  #dj[data-mob-tab="cola"] .dj-stage-toolbar {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
  }

  #dj[data-mob-tab="cola"] .dj-music-hub {
    margin-bottom: 0.75rem;
  }

  #dj[data-mob-tab="cola"] #djPeticionesPanel {
    display: flex !important;
    position: static !important;
    width: 100% !important;
    max-height: 55vh !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    animation: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  #dj[data-mob-tab="cola"] #djPeticionesToggle {
    display: none !important;
  }
  #dj[data-mob-tab="cola"] #djSongsBody {
    max-height: 55vh !important;
  }

  #dj[data-mob-tab="cola"] .vdj-waveform-overview,
  #dj[data-mob-tab="cola"] .vdj-console-grid {
    display: none !important;
  }

  /* --- TAB: Deck A --- */
  #dj[data-mob-tab="deckA"] .dj-stage-toolbar { display: none !important; }
  #dj[data-mob-tab="deckA"] .vdj-waveform-overview { display: flex; }
  #dj[data-mob-tab="deckA"] .vdj-console-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  #dj[data-mob-tab="deckA"] .vdj-mixer { display: none !important; }
  #dj[data-mob-tab="deckA"] .vdj-deck-b { display: none !important; }
  #dj[data-mob-tab="deckA"] .vdj-deck-a { display: flex !important; }

  /* --- TAB: Mixer --- */
  #dj[data-mob-tab="mixer"] .dj-stage-toolbar { display: none !important; }
  #dj[data-mob-tab="mixer"] .vdj-waveform-overview { display: flex; }
  #dj[data-mob-tab="mixer"] .vdj-console-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  #dj[data-mob-tab="mixer"] .vdj-deck-a { display: none !important; }
  #dj[data-mob-tab="mixer"] .vdj-deck-b { display: none !important; }
  #dj[data-mob-tab="mixer"] .vdj-mixer {
    display: flex !important;
    max-width: 100%;
  }

  /* --- TAB: Deck B --- */
  #dj[data-mob-tab="deckB"] .dj-stage-toolbar { display: none !important; }
  #dj[data-mob-tab="deckB"] .vdj-waveform-overview { display: flex; }
  #dj[data-mob-tab="deckB"] .vdj-console-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  #dj[data-mob-tab="deckB"] .vdj-mixer { display: none !important; }
  #dj[data-mob-tab="deckB"] .vdj-deck-a { display: none !important; }
  #dj[data-mob-tab="deckB"] .vdj-deck-b { display: flex !important; }

  /* --- Compact element sizes for mobile --- */

  .vdj-jog-canvas {
    max-width: 110px !important;
    max-height: 110px !important;
  }

  .vdj-video-box {
    min-height: 110px !important;
    max-height: 150px;
  }

  .vdj-transport {
    gap: 4px !important;
  }

  .vdj-btn {
    min-height: 38px !important;
    font-size: 0.72rem !important;
    padding: 0.4rem !important;
  }

  /* Hide deck playlists on mobile by default to reduce scroll */
  .vdj-deck-playlist-container {
    display: none !important;
  }

  /* Compact EQ strip */
  .vdj-eq-strip {
    gap: 4px;
    padding: 0.4rem !important;
  }

  .vdj-eq-knob-group label {
    font-size: 0.58rem;
  }

  .vdj-knob {
    width: 100%;
  }

  /* Compact mixer body */
  .vdj-mixer-body {
    padding: 0.5rem !important;
  }

  .vdj-spectrum-box {
    padding: 0.3rem !important;
  }

  .vdj-spectrum-canvas {
    height: 40px !important;
  }

  .vdj-crossfader-section,
  .vdj-master-row,
  .vdj-fx-row {
    padding-inline: 0.5rem !important;
  }

  /* Compact mixer tabs */
  .vdj-mixer-tab {
    padding: 8px 4px !important;
    font-size: 0.7rem !important;
  }

  /* Waveform compact */
  .vdj-waveform-canvas {
    height: 35px !important;
  }

  .vdj-waveform-divider {
    padding: 4px 6px !important;
  }

  .vdj-bpm-sync {
    font-size: 0.65rem !important;
  }

  /* Video panel compact */
  .vdj-video-controls-grid {
    gap: 0.5rem !important;
  }

  .vdj-video-ctrl-label {
    font-size: 0.65rem !important;
  }

  .vdj-video-action-row {
    gap: 0.4rem !important;
  }

  .vdj-video-action-btn {
    font-size: 0.68rem !important;
    padding: 0.4rem 0.6rem !important;
  }

  .vdj-video-diag-row {
    gap: 0.4rem !important;
  }

  .vdj-video-fx-btn {
    font-size: 0.6rem !important;
    padding: 4px 8px !important;
  }
}

/* --- Landscape mobile: FULL 3-column DJ layout (like desktop) --- */
@media (max-width: 767px) and (orientation: landscape) {

  /* Hide header, tabs, landscape hint — go straight to console */
  .dj-section-header { display: none !important; }
  .dj-mobile-tabbar { display: none !important; }
  .dj-landscape-hint { display: none !important; }

  #dj.module-section {
    padding: 2px !important;
    overflow: hidden !important;
  }

  .dj-workspace {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .dj-console-body {
    padding: 3px !important;
    gap: 3px !important;
  }

  /* Override ALL tab-based visibility — always show full layout */
  #dj[data-mob-tab] .dj-stage-toolbar { display: none !important; }
  #dj[data-mob-tab] .vdj-waveform-overview { display: none !important; }
  #dj[data-mob-tab] .vdj-console-grid {
    display: grid !important;
    grid-template-columns: 1fr 130px 1fr !important;
    gap: 3px !important;
  }
  #dj[data-mob-tab] .vdj-deck-a { display: flex !important; }
  #dj[data-mob-tab] .vdj-deck-b { display: flex !important; }
  #dj[data-mob-tab] .vdj-mixer  { display: flex !important; max-width: none !important; }

  /* Hide right sidebar */
  .dj-console-rail-right { display: none !important; }

  /* ---- DECKS: ultra-compact ---- */
  .vdj-deck {
    padding: 4px !important;
    gap: 3px !important;
    border-radius: 8px !important;
  }

  .vdj-deck-header {
    gap: 4px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .vdj-deck-label-tag {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.5rem !important;
    border-radius: 5px !important;
  }

  .vdj-track-title {
    font-size: 0.62rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vdj-track-artist {
    font-size: 0.5rem !important;
  }

  .vdj-deck-header .badge { font-size: 0.45rem !important; padding: 2px 5px !important; }
  .vdj-deck-header .btn { width: 18px !important; height: 18px !important; }

  /* Video box: small preview */
  .vdj-deck-main-row {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }

  .vdj-video-box {
    min-height: 60px !important;
    max-height: 70px !important;
    border-radius: 6px !important;
  }

  .vdj-video-meta { font-size: 0.5rem !important; }

  .vdj-progress-container { display: none !important; }

  /* Hide jog wheel in landscape (saves huge space) */
  .vdj-jog-wrap { display: none !important; }

  /* Transport: tight grid */
  .vdj-transport {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2px !important;
    margin-top: 2px !important;
  }

  .vdj-btn {
    min-height: 26px !important;
    font-size: 0.55rem !important;
    padding: 0.15rem !important;
    border-radius: 6px !important;
  }

  /* Hide EQ strip in landscape */
  .vdj-eq-strip { display: none !important; }

  /* Hide deck playlists */
  .vdj-deck-playlist-container { display: none !important; }

  /* ---- MIXER: compact center column ---- */
  .vdj-mixer {
    padding: 3px !important;
    gap: 0 !important;
    border-radius: 8px !important;
    min-width: 0 !important;
  }

  /* Hide mixer audio/video tab switcher */
  .vdj-mixer-header { display: none !important; }

  /* Only show audio panel */
  #vdjMixerPanelVideo { display: none !important; }

  .vdj-mixer-body {
    grid-template-columns: 1fr auto 1fr !important;
    padding: 2px !important;
    gap: 0 !important;
  }

  /* Rotary knobs: tiny */
  .vdj-rotary {
    width: 28px !important;
    height: 28px !important;
  }

  .vdj-rotary-label {
    font-size: 0.4rem !important;
    letter-spacing: 0 !important;
  }

  .vdj-rotary-value { display: none !important; }

  .vdj-rotary-group {
    gap: 1px !important;
    margin-bottom: 2px !important;
  }

  .vdj-knobs-col {
    gap: 1px !important;
    padding: 2px !important;
  }

  /* Channel faders compact */
  .vdj-channel-faders {
    gap: 2px !important;
    padding: 2px !important;
  }

  .vdj-ch-fader {
    height: 55px !important;
  }

  /* Hide FX row & spectrum to save vertical space */
  .vdj-fx-row { display: none !important; }
  .vdj-spectrum-box { display: none !important; }

  /* Master row: tight */
  .vdj-master-row {
    padding: 2px 4px !important;
    gap: 4px !important;
  }

  .vdj-master-knob-group label {
    font-size: 0.45rem !important;
  }

  .vdj-master-knob-group .vdj-knob {
    width: 100% !important;
  }

  .vdj-knob-val {
    font-size: 0.45rem !important;
  }

  /* Crossfader: compact */
  .vdj-crossfader-section {
    padding: 2px 4px !important;
    gap: 4px !important;
  }

  .vdj-cf-label {
    font-size: 0.55rem !important;
  }
}

/* Light mode support for mobile tabs */
body.light-mode .dj-mobile-tabbar {
  background: rgba(241, 245, 249, 0.96);
  border-color: rgba(0,0,0,0.08);
}

body.light-mode .dj-mob-tab {
  color: rgba(0,0,0,0.4);
}

body.light-mode .dj-mob-tab.active {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
  box-shadow: inset 0 -2px 0 #3b82f6;
}

/* Inventory Drawer Animation */
#inventoryDrawer {
  transform: translateX(100%);
}

#inventoryDrawer.active {
  transform: translateX(0);
}

body.light-mode .dj-landscape-hint {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.15);
  color: rgba(0,0,0,0.6);
}

/* =====================================================================
   LIGHT MODE · REFRESH 2026 — "Crisp White"
   Paleta blanca moderna, limpia y consistente para toda la interfaz.
   Se aplica sólo cuando body.light-mode esté activo.
   ===================================================================== */

body.light-mode {
  /* Superficies */
  --bg-app: #f6f7fb;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef1f6;

  /* Texto */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Marca (indigo + cyan limpios) */
  --primary: #6d28d9;
  --primary-hover: #5b21b6;
  --primary-glow: rgba(109, 40, 217, 0.18);
  --secondary: #0284c7;
  --secondary-glow: rgba(2, 132, 199, 0.18);
  --accent: #ea580c;
  --accent-glow: rgba(234, 88, 12, 0.18);

  /* Funcional */
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;

  /* Bordes / sombras */
  --border-light: #e5e7eb;
  --border-soft: #eef1f6;
  --glass-bg: #ffffff;
  --glass-border: 1px solid #e5e7eb;
  --glass-blur: none;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

/* Fondo global: blanco suave sin neones */
body.light-mode {
  background-color: var(--bg-app) !important;
  background-image:
    radial-gradient(circle at 15% -10%, rgba(109, 40, 217, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 110% 110%, rgba(2, 132, 199, 0.05) 0%, transparent 45%) !important;
  color: var(--text-primary);
}

body.light-mode .bg-blob { display: none !important; }

/* Tipografía */
body.light-mode,
body.light-mode p,
body.light-mode span,
body.light-mode div,
body.light-mode label,
body.light-mode li,
body.light-mode td,
body.light-mode th { color: var(--text-primary); }

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
  color: #0b1220;
  text-shadow: none !important;
}

body.light-mode .text-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .text-white:not(.btn):not(.btn-modern):not(.badge):not(.nav-item.active):not(.user-avatar) {
  color: var(--text-primary) !important;
}

body.light-mode .text-secondary,
body.light-mode .text-muted,
body.light-mode small.text-secondary {
  color: var(--text-secondary) !important;
}

/* Paneles, tarjetas y modales: blanco puro con borde suave */
body.light-mode .glass-panel,
body.light-mode .card-modern,
body.light-mode .modal-content,
body.light-mode .card,
body.light-mode .panel,
body.light-mode .stat-card,
body.light-mode .widget,
body.light-mode .dashboard-card {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--border-light) !important;
  border-top-color: var(--border-light) !important;
  box-shadow: var(--card-shadow) !important;
  color: var(--text-primary);
}

body.light-mode .modal-header,
body.light-mode .modal-footer {
  background: #ffffff !important;
  border-color: var(--border-light) !important;
}

body.light-mode .offcanvas,
body.light-mode .dropdown-menu,
body.light-mode .popover,
body.light-mode .tooltip-inner {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--card-shadow) !important;
}

body.light-mode .dropdown-item {
  color: var(--text-primary);
}
body.light-mode .dropdown-item:hover,
body.light-mode .dropdown-item:focus {
  background: var(--surface-2);
  color: var(--primary);
}
body.light-mode .dropdown-divider { border-color: var(--border-light); }

/* Sidebar */
body.light-mode .sidebar {
  background: #ffffff !important;
  border-right: 1px solid var(--border-light) !important;
  box-shadow: 1px 0 0 var(--border-light), 10px 0 30px rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.light-mode .sidebar::before { display: none; }

body.light-mode .brand-text {
  color: var(--primary) !important;
  text-shadow: none !important;
}

body.light-mode .sidebar-toggle-btn {
  background: var(--surface-2);
  border-color: var(--border-light);
  color: var(--text-secondary);
}
body.light-mode .sidebar-toggle-btn:hover {
  background: var(--surface-3);
  color: var(--primary);
}

body.light-mode .nav-item {
  color: var(--text-secondary);
  border: 1px solid transparent;
}
body.light-mode .nav-item:hover {
  background: var(--surface-2);
  color: var(--primary);
  box-shadow: none;
  border-color: var(--border-light);
}
body.light-mode .nav-item:hover i { color: var(--primary); text-shadow: none; }

body.light-mode .nav-item.active {
  background: linear-gradient(90deg, rgba(109, 40, 217, 0.10), rgba(109, 40, 217, 0.02)) !important;
  border: 1px solid rgba(109, 40, 217, 0.22) !important;
  color: var(--primary) !important;
  box-shadow: 0 1px 2px rgba(109, 40, 217, 0.06) !important;
}
body.light-mode .nav-item.active i {
  color: var(--primary) !important;
  filter: none !important;
}
body.light-mode .nav-item.active::before { box-shadow: none; background: var(--primary); }

body.light-mode .user-profile {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-light) !important;
}
body.light-mode .user-profile #userInfo { color: var(--text-primary) !important; }
body.light-mode .user-profile #userRole { color: var(--text-secondary) !important; }

/* Inputs, selects, textareas */
body.light-mode .input-modern,
body.light-mode .form-control,
body.light-mode .form-select,
body.light-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body.light-mode select,
body.light-mode textarea {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

body.light-mode .input-modern::placeholder,
body.light-mode .form-control::placeholder,
body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

body.light-mode .input-modern:focus,
body.light-mode .form-control:focus,
body.light-mode .form-select:focus,
body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
  background: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

body.light-mode .input-group-text {
  background: var(--surface-2) !important;
  border-color: #d1d5db !important;
  color: var(--text-secondary) !important;
}

body.light-mode .form-label { color: var(--text-primary); font-weight: 500; }
body.light-mode .form-check-input {
  background-color: #fff;
  border-color: #cbd5e1;
}
body.light-mode .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Botones */
body.light-mode .btn-primary,
body.light-mode .btn-modern.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25) !important;
}
body.light-mode .btn-primary:hover { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; }

body.light-mode .btn-secondary {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}
body.light-mode .btn-secondary:hover { background: var(--surface-3) !important; color: var(--primary) !important; }

body.light-mode .btn-outline-primary {
  background: transparent !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
}
body.light-mode .btn-outline-primary:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

body.light-mode .btn-link,
body.light-mode .btn-link.text-secondary { color: var(--text-secondary) !important; }
body.light-mode .btn-link:hover { color: var(--primary) !important; }

body.light-mode .btn-success { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
body.light-mode .btn-danger  { background: var(--danger)  !important; border-color: var(--danger)  !important; color: #fff !important; }
body.light-mode .btn-warning { background: var(--warning) !important; border-color: var(--warning) !important; color: #fff !important; }
body.light-mode .btn-info    { background: var(--info)    !important; border-color: var(--info)    !important; color: #fff !important; }

/* Badges */
body.light-mode .badge.bg-glass,
body.light-mode .badge.bg-light,
body.light-mode .badge.bg-secondary {
  background: var(--surface-2) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-light) !important;
}
body.light-mode .badge.bg-primary { background: var(--primary) !important; color: #fff !important; }
body.light-mode .badge.bg-success { background: #dcfce7 !important; color: #065f46 !important; border: 1px solid #bbf7d0 !important; }
body.light-mode .badge.bg-danger  { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid #fecaca !important; }
body.light-mode .badge.bg-warning { background: #fef3c7 !important; color: #92400e !important; border: 1px solid #fde68a !important; }
body.light-mode .badge.bg-info    { background: #e0f2fe !important; color: #075985 !important; border: 1px solid #bae6fd !important; }

/* Tablas */
body.light-mode table,
body.light-mode .table,
body.light-mode .table-premium {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}
body.light-mode .table thead th,
body.light-mode .table-premium thead th {
  background: var(--surface-2) !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--border-light) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}
body.light-mode .table tbody tr,
body.light-mode .table-premium tbody tr {
  background: #ffffff !important;
  border-bottom: 1px solid var(--border-soft) !important;
  box-shadow: none !important;
}
body.light-mode .table tbody tr:hover,
body.light-mode .table-premium tbody tr:hover {
  background: var(--surface-2) !important;
  transform: none !important;
}
body.light-mode .table td { border-color: var(--border-soft) !important; }

/* POS / carrito / productos */
body.light-mode .pos-cart {
  background: #ffffff !important;
  border-left: 1px solid var(--border-light) !important;
}
body.light-mode .cart-header,
body.light-mode .cart-footer {
  background: var(--surface-2) !important;
  border-color: var(--border-light) !important;
}
body.light-mode .cart-item {
  background: #ffffff !important;
  border: 1px solid var(--border-soft) !important;
}
body.light-mode .cart-total { color: var(--text-primary) !important; text-shadow: none !important; }

body.light-mode .product-card {
  background: #ffffff !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}
body.light-mode .product-card:hover {
  background: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.10) !important;
  transform: translateY(-2px);
}
body.light-mode .product-img-mini {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-light) !important;
}

body.light-mode .uppercase-tracking { color: var(--text-secondary) !important; }

/* Drawers / paneles laterales */
body.light-mode #productDrawer,
body.light-mode #inventoryDrawer,
body.light-mode #tableDetailPanel,
body.light-mode .drawer,
body.light-mode .side-panel {
  background: #ffffff !important;
  border-left: 1px solid var(--border-light) !important;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.06) !important;
}

/* Mapa de mesas */
body.light-mode #tablesMapContainer {
  background: radial-gradient(circle at center, #ffffff 0%, #eef1f6 100%) !important;
}

/* Encabezados de sección (inventario, dashboard, etc.) */
body.light-mode #inventario > div:first-child,
body.light-mode .page-header,
body.light-mode .section-header {
  background: #ffffff !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}

/* Scrollbars */
body.light-mode ::-webkit-scrollbar { width: 10px; height: 10px; }
body.light-mode ::-webkit-scrollbar-track { background: transparent; }
body.light-mode ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
  border: 2px solid var(--bg-app);
}
body.light-mode ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Alertas */
body.light-mode .alert-success { background: #ecfdf5 !important; color: #065f46 !important; border: 1px solid #a7f3d0 !important; }
body.light-mode .alert-danger  { background: #fef2f2 !important; color: #991b1b !important; border: 1px solid #fecaca !important; }
body.light-mode .alert-warning { background: #fffbeb !important; color: #92400e !important; border: 1px solid #fde68a !important; }
body.light-mode .alert-info    { background: #eff6ff !important; color: #075985 !important; border: 1px solid #bae6fd !important; }

/* Notificaciones (notify util) */
body.light-mode .notification,
body.light-mode .toast {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--card-shadow) !important;
}

/* Navegación por pestañas / chips */
body.light-mode .nav-tabs,
body.light-mode .nav-pills {
  border-bottom: 1px solid var(--border-light);
}
body.light-mode .nav-tabs .nav-link,
body.light-mode .nav-pills .nav-link {
  color: var(--text-secondary);
  background: transparent;
  border-color: transparent;
}
body.light-mode .nav-tabs .nav-link.active,
body.light-mode .nav-pills .nav-link.active {
  color: var(--primary);
  background: var(--surface-2);
  border-color: var(--border-light);
}

/* Progress */
body.light-mode .progress { background: var(--surface-3); }
body.light-mode .progress-bar { background: var(--primary); }

/* Divisores */
body.light-mode hr { border-color: var(--border-light); opacity: 1; }

/* Códigos / kbd */
body.light-mode code, body.light-mode kbd, body.light-mode pre {
  background: var(--surface-2);
  color: var(--primary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

/* Asegurar textos blancos en botones con gradiente de marca */
body.light-mode .btn-modern:not(.btn-secondary):not(.btn-outline-primary) {
  color: #ffffff !important;
}

/* =====================================================================
   LIGHT MODE · FIX PACK — Textos que se perdían sobre blanco
   ===================================================================== */

/* Títulos internos y valores destacados (eran color:#fff fijo) */
body.light-mode .section-title,
body.light-mode .inventory-card-title,
body.light-mode .gastos-card-title,
body.light-mode .cart-total,
body.light-mode .dj-deck-track,
body.light-mode .dj-metric-value,
body.light-mode .dj-vinyl-title,
body.light-mode .dj-performance-title,
body.light-mode .card-title,
body.light-mode .modal-title {
  color: var(--text-primary) !important;
  text-shadow: none !important;
  border-bottom-color: var(--border-light) !important;
}

/* Chips/Category pills (modo oscuro tienen fondo translúcido con texto blanco) */
body.light-mode .category-pill {
  background: #ffffff !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.light-mode .category-pill:hover {
  background: var(--surface-2) !important;
  color: var(--primary) !important;
  border-color: rgba(109, 40, 217, 0.3) !important;
}
body.light-mode .category-pill.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25) !important;
}

/* Botones de vista de inventario activos */
body.light-mode #inventoryViewListBtn.active,
body.light-mode #inventoryViewGridBtn.active {
  background: rgba(109, 40, 217, 0.10) !important;
  color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px rgba(109, 40, 217, 0.35) !important;
}

/* Auto-fill del navegador en inputs */
body.light-mode input:-webkit-autofill,
body.light-mode input:-webkit-autofill:hover,
body.light-mode input:-webkit-autofill:focus,
body.light-mode input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px #ffffff inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary);
}

/* Utilidades Bootstrap que quedaban oscuras */
body.light-mode .bg-dark { background-color: var(--surface-2) !important; color: var(--text-primary) !important; }
body.light-mode .bg-light { background-color: #ffffff !important; }
body.light-mode .text-light { color: var(--text-primary) !important; }
body.light-mode .border-dark { border-color: var(--border-light) !important; }

/* Texto en blanco dentro de tarjetas/paneles, sin romper botones ni badges con fondo de color */
body.light-mode .card-modern .text-white,
body.light-mode .glass-panel .text-white,
body.light-mode .card .text-white,
body.light-mode .panel .text-white,
body.light-mode .stat-card .text-white {
  color: var(--text-primary) !important;
}

/* fw-bold text-white muy usado en widgets */
body.light-mode .fw-bold.text-white { color: var(--text-primary) !important; }

/* Mesas (mapa) — el texto de las mesas era claro; oscurecerlo en modo claro */
body.light-mode .table-item .table-surface {
  color: var(--text-primary);
}
body.light-mode .table-item.status-free .table-surface {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
}
body.light-mode .table-item.status-free:hover .table-surface {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(2,132,199,0.12);
}
body.light-mode .table-item.status-occupied .table-surface {
  background: linear-gradient(135deg, rgba(109,40,217,0.12), rgba(109,40,217,0.04));
  border-color: rgba(109,40,217,0.45);
  box-shadow: 0 4px 12px rgba(109,40,217,0.12);
  color: var(--text-primary);
}
body.light-mode .table-item.status-occupied:hover .table-surface {
  border-color: rgba(109,40,217,0.7);
  box-shadow: 0 6px 18px rgba(109,40,217,0.22);
}

/* Tooltip / overlays de mesa (fondo oscuro con texto blanco queda bien, pero unificamos bordes) */
body.light-mode .table-info-overlay {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}

/* table-premium th con rgba blanco muy bajo contraste sobre blanco */
body.light-mode .table-premium th {
  color: var(--text-secondary) !important;
}

/* Tooltips globales */
body.light-mode [role="tooltip"],
body.light-mode .sidebar [data-tooltip]::before {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

/* Login / auth cards si heredan .glass-panel ya cubiertos; asegurar inputs del login */
body.light-mode .auth-card,
body.light-mode .login-card {
  background: #ffffff !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--card-shadow) !important;
}

/* Listas con separador claro */
body.light-mode .list-group-item {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}
body.light-mode .list-group-item:hover { background: var(--surface-2) !important; }
body.light-mode .list-group-item.active {
  background: rgba(109,40,217,0.08) !important;
  color: var(--primary) !important;
  border-color: rgba(109,40,217,0.25) !important;
}

/* Texto secundario muy claro (rgba blancos) */
body.light-mode [style*="color: rgba(255,255,255"],
body.light-mode [style*="color: rgba(255, 255, 255"] {
  color: var(--text-secondary) !important;
}

/* Enlaces */
body.light-mode a { color: var(--primary); }
body.light-mode a:hover { color: var(--primary-hover); }

/* Modales específicos con inline style background:#fff ya se ven; pero text-dark que a veces no existe */
body.light-mode .modal-content .text-dark { color: var(--text-primary) !important; }

/* Sidebar tooltips (cuando está colapsada) */
body.light-mode .nav-item[data-label]::after {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

/* Hero / encabezados con degradados oscuros — suavizar */
body.light-mode .gastos-hero,
body.light-mode .inventory-hero,
body.light-mode .dashboard-hero,
body.light-mode .hero-panel {
  background: linear-gradient(135deg, #ffffff 0%, var(--surface-2) 100%) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  box-shadow: var(--card-shadow) !important;
}

/* Contadores / números grandes que usaban text-gradient blanco */
body.light-mode .stat-value,
body.light-mode .kpi-value,
body.light-mode .metric-value {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  background: none !important;
}
 
/* ============================================================
   PREMIUM THEMES — Identidades visuales completas para bares
   Cada tema sobreescribe las CSS vars principales + acentos.
   ============================================================ */

/* ---- 1. MIDNIGHT SOMMELIER (neon nightclub — default) ---- */
body.theme-midnight {
  --bg-app: #0e0e0e;
  --bg-card: rgba(26, 26, 26, 0.4);
  --bg-sidebar: rgba(19, 19, 19, 0.6);
  --primary: #d095ff;
  --primary-glow: rgba(208, 149, 255, 0.4);
  --secondary: #00e3fd;
  --secondary-glow: rgba(0, 227, 253, 0.4);
  --accent: #ffbd5c;
  --accent-glow: rgba(255, 189, 92, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #adaaaa;
  --text-muted: #767575;
}
body.theme-midnight .sidebar,
body.theme-midnight .main-content {
  background: radial-gradient(circle at 20% 10%, rgba(208,149,255,0.08), transparent 55%),
              radial-gradient(circle at 85% 90%, rgba(0,227,253,0.06), transparent 55%),
              var(--bg-app);
}

/* ---- 2. WHISKEY LOUNGE (amber & oak, classy) ---- */
body.theme-whiskey {
  --bg-app: #1a1208;
  --bg-card: rgba(50, 33, 18, 0.45);
  --bg-sidebar: rgba(28, 19, 10, 0.75);
  --primary: #d4a24c;
  --primary-glow: rgba(212, 162, 76, 0.45);
  --secondary: #f5d689;
  --secondary-glow: rgba(245, 214, 137, 0.35);
  --accent: #c97b3c;
  --accent-glow: rgba(201, 123, 60, 0.4);
  --text-primary: #f9f1df;
  --text-secondary: #c9b794;
  --text-muted: #8a7a5e;
}
body.theme-whiskey {
  background: radial-gradient(circle at 15% 10%, rgba(212,162,76,0.10), transparent 60%),
              radial-gradient(circle at 90% 90%, rgba(201,123,60,0.08), transparent 55%),
              linear-gradient(180deg, #1a1208, #100a04) !important;
}
body.theme-whiskey .sidebar {
  background: linear-gradient(180deg, rgba(40,28,14,0.9), rgba(20,14,7,0.85)) !important;
  border-right: 1px solid rgba(212,162,76,0.15);
}
body.theme-whiskey .glass-panel,
body.theme-whiskey .card-modern,
body.theme-whiskey .modal-content {
  background: linear-gradient(145deg, rgba(55,38,22,0.55), rgba(30,22,14,0.65)) !important;
  border: 1px solid rgba(212,162,76,0.18) !important;
  backdrop-filter: blur(12px);
}
body.theme-whiskey .btn-primary {
  background: linear-gradient(135deg, #d4a24c, #a87830) !important;
  box-shadow: 0 10px 22px -6px rgba(212,162,76,0.5) !important;
  color: #1a1208 !important;
  font-weight: 700;
}
body.theme-whiskey .nav-item.active {
  background: rgba(212,162,76,0.12);
  border-color: rgba(212,162,76,0.3);
}
body.theme-whiskey .brand-text {
  font-family: 'Playfair Display', serif;
  background: linear-gradient(135deg, #f5d689, #c97b3c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- 3. TROPICAL SUNSET (coral & teal, beach bar) ---- */
body.theme-tropical {
  --bg-app: #1a0d2e;
  --bg-card: rgba(50, 25, 70, 0.4);
  --bg-sidebar: rgba(30, 15, 50, 0.75);
  --primary: #ff6b8a;
  --primary-glow: rgba(255, 107, 138, 0.45);
  --secondary: #14c4b8;
  --secondary-glow: rgba(20, 196, 184, 0.4);
  --accent: #ffb347;
  --accent-glow: rgba(255, 179, 71, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #d4c5e8;
  --text-muted: #9685b5;
}
body.theme-tropical {
  background: linear-gradient(135deg, #1a0d2e 0%, #2d1b4e 40%, #4a1e5c 100%) !important;
  position: relative;
}
body.theme-tropical::before {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 0% 100%, rgba(255,107,138,0.18), transparent 50%),
              radial-gradient(ellipse at 100% 0%, rgba(20,196,184,0.15), transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(255,179,71,0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
body.theme-tropical .main-content, body.theme-tropical .sidebar { position: relative; z-index: 1; }
body.theme-tropical .glass-panel,
body.theme-tropical .card-modern,
body.theme-tropical .modal-content {
  background: linear-gradient(145deg, rgba(60,30,85,0.55), rgba(30,15,50,0.7)) !important;
  border: 1px solid rgba(255,107,138,0.2) !important;
}
body.theme-tropical .btn-primary {
  background: linear-gradient(135deg, #ff6b8a, #ff9f47) !important;
  box-shadow: 0 10px 22px -6px rgba(255,107,138,0.55) !important;
}
body.theme-tropical .brand-text {
  background: linear-gradient(135deg, #ff6b8a, #ffb347, #14c4b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-tropical .user-avatar {
  background: linear-gradient(135deg, #ff6b8a, #14c4b8) !important;
}

/* ---- 4. NOIR SPEAKEASY (gold & crimson, minimalist elegance) ---- */
body.theme-noir {
  --bg-app: #050505;
  --bg-card: rgba(15, 15, 15, 0.7);
  --bg-sidebar: rgba(8, 8, 8, 0.9);
  --primary: #d4af37;
  --primary-glow: rgba(212, 175, 55, 0.5);
  --secondary: #f4e4bc;
  --secondary-glow: rgba(244, 228, 188, 0.3);
  --accent: #c0392b;
  --accent-glow: rgba(192, 57, 43, 0.45);
  --text-primary: #f4e4bc;
  --text-secondary: #a89878;
  --text-muted: #665a45;
}
body.theme-noir {
  background: #050505 !important;
}
body.theme-noir .sidebar {
  background: linear-gradient(180deg, #0a0a0a, #000) !important;
  border-right: 1px solid rgba(212,175,55,0.22);
}
body.theme-noir .glass-panel,
body.theme-noir .card-modern,
body.theme-noir .modal-content {
  background: rgba(12,12,12,0.85) !important;
  border: 1px solid rgba(212,175,55,0.18) !important;
  box-shadow: 0 0 30px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(212,175,55,0.04) !important;
}
body.theme-noir .btn-primary {
  background: linear-gradient(135deg, #d4af37, #a8862a) !important;
  color: #050505 !important;
  font-weight: 700;
  box-shadow: 0 8px 20px -5px rgba(212,175,55,0.45) !important;
}
body.theme-noir .nav-item.active {
  background: linear-gradient(90deg, rgba(212,175,55,0.14), transparent);
  border-left: 3px solid #d4af37;
}
body.theme-noir .nav-item.active::before { background: #d4af37; }
body.theme-noir .brand-text {
  font-family: 'Playfair Display', serif;
  background: linear-gradient(135deg, #f4e4bc, #d4af37);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}
body.theme-noir .user-avatar {
  background: linear-gradient(135deg, #d4af37, #c0392b) !important;
  color: #000;
}
body.theme-noir .product-card:hover,
body.theme-noir .category-pill.active {
  border-color: #d4af37 !important;
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

/* ---- 5. EMERALD CLUB (deep green & rose gold) ---- */
body.theme-emerald {
  --bg-app: #0a1a14;
  --bg-card: rgba(15, 40, 28, 0.45);
  --bg-sidebar: rgba(10, 25, 20, 0.8);
  --primary: #50c878;
  --primary-glow: rgba(80, 200, 120, 0.4);
  --secondary: #e8b4b8;
  --secondary-glow: rgba(232, 180, 184, 0.35);
  --accent: #f5d76e;
  --accent-glow: rgba(245, 215, 110, 0.4);
  --text-primary: #f0f8f2;
  --text-secondary: #b8d4c2;
  --text-muted: #7a9485;
}
body.theme-emerald {
  background: radial-gradient(circle at 20% 20%, rgba(80,200,120,0.08), transparent 55%),
              radial-gradient(circle at 85% 80%, rgba(232,180,184,0.06), transparent 55%),
              linear-gradient(180deg, #0a1a14, #050d0a) !important;
}
body.theme-emerald .sidebar {
  background: linear-gradient(180deg, rgba(12,32,22,0.9), rgba(5,13,10,0.9)) !important;
  border-right: 1px solid rgba(80,200,120,0.15);
}
body.theme-emerald .glass-panel,
body.theme-emerald .card-modern,
body.theme-emerald .modal-content {
  background: linear-gradient(145deg, rgba(20,48,34,0.5), rgba(10,25,20,0.7)) !important;
  border: 1px solid rgba(80,200,120,0.15) !important;
}
body.theme-emerald .btn-primary {
  background: linear-gradient(135deg, #50c878, #2e8b57) !important;
  box-shadow: 0 10px 22px -6px rgba(80,200,120,0.5) !important;
}
body.theme-emerald .brand-text {
  background: linear-gradient(135deg, #50c878, #f5d76e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-emerald .user-avatar {
  background: linear-gradient(135deg, #50c878, #e8b4b8) !important;
}

/* ============================================================
   THEME PICKER MODAL
   ============================================================ */
.theme-picker-modal {
  background: linear-gradient(145deg, rgba(18,18,22,0.98), rgba(8,8,12,0.98)) !important;
  border-radius: 24px !important;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06) !important;
}
.theme-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  height: 100%;
  position: relative;
}
.theme-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.7);
}
.theme-card.active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary), 0 20px 40px -12px rgba(0,0,0,0.7);
}
.theme-preview {
  height: 150px;
  display: flex;
  overflow: hidden;
  position: relative;
}
.theme-preview-sidebar {
  width: 32%;
  background: rgba(0,0,0,0.35);
  border-right: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.theme-preview-sidebar::before,
.theme-preview-sidebar::after {
  content: "";
  position: absolute; left: 10%; right: 10%; height: 6px;
  background: rgba(255,255,255,0.12); border-radius: 3px;
}
.theme-preview-sidebar::before { top: 20%; }
.theme-preview-sidebar::after { top: 38%; background: rgba(255,255,255,0.2); }
.theme-preview-main {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}
.theme-preview-card {
  height: 26px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}
.theme-preview-card.alt { background: rgba(255,255,255,0.14); width: 80%; }
.theme-preview-btn {
  height: 20px;
  width: 45%;
  border-radius: 10px;
  margin-top: 4px;
}

/* Preview paletas por tema */
.theme-preview-midnight { background: radial-gradient(circle at 20% 20%, rgba(208,149,255,0.25), transparent 60%), #0e0e0e; }
.theme-preview-midnight .theme-preview-btn { background: linear-gradient(135deg, #d095ff, #00e3fd); box-shadow: 0 0 12px rgba(208,149,255,0.6); }

.theme-preview-whiskey { background: radial-gradient(circle at 30% 20%, rgba(212,162,76,0.25), transparent 60%), #1a1208; }
.theme-preview-whiskey .theme-preview-btn { background: linear-gradient(135deg, #d4a24c, #c97b3c); box-shadow: 0 0 12px rgba(212,162,76,0.5); }
.theme-preview-whiskey .theme-preview-sidebar { background: rgba(40,28,14,0.9); }

.theme-preview-tropical { background: linear-gradient(135deg, #1a0d2e, #4a1e5c); }
.theme-preview-tropical .theme-preview-btn { background: linear-gradient(135deg, #ff6b8a, #ffb347); box-shadow: 0 0 12px rgba(255,107,138,0.55); }

.theme-preview-noir { background: #050505; }
.theme-preview-noir .theme-preview-sidebar { background: #000; border-right: 1px solid rgba(212,175,55,0.25); }
.theme-preview-noir .theme-preview-btn { background: linear-gradient(135deg, #d4af37, #c0392b); box-shadow: 0 0 12px rgba(212,175,55,0.55); }
.theme-preview-noir .theme-preview-card { background: rgba(212,175,55,0.1); }

.theme-preview-emerald { background: radial-gradient(circle at 25% 20%, rgba(80,200,120,0.22), transparent 60%), #0a1a14; }
.theme-preview-emerald .theme-preview-btn { background: linear-gradient(135deg, #50c878, #f5d76e); box-shadow: 0 0 12px rgba(80,200,120,0.5); }

.theme-info {
  padding: 1rem 1.1rem 1.1rem;
  background: rgba(0,0,0,0.3);
}
.theme-name {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.theme-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}
.theme-swatches {
  display: flex;
  gap: 6px;
}
.theme-swatches span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.theme-badge {
  font-size: 0.68rem;
  background: var(--primary);
  color: #000;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* === Tarjetas de notificación rediseñadas (v2) === */
.nx-item {
  --nx-accent: #10b981;
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.85rem;
  padding: 0.9rem 0.95rem;
  margin-bottom: 0.6rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--nx-accent) 12%, transparent), transparent 70%),
    rgba(15, 23, 42, 0.72);
  border: 1px solid color-mix(in srgb, var(--nx-accent) 22%, transparent);
  box-shadow: 0 8px 24px -14px color-mix(in srgb, var(--nx-accent) 50%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: nxSlideIn 0.28s ease both;
}
.nx-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--nx-accent) 45%, transparent);
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--nx-accent) 60%, transparent);
}
.nx-item[draggable="true"],
.nx-item[data-dj-draggable-track] {
  cursor: grab;
}
#notificationWrapper {
  display: none !important;
}
.nx-item[draggable="true"]:active,
.nx-item[data-dj-draggable-track]:active,
.nx-item.dj-dragging,
.nx-item.dj-drag-source {
  cursor: grabbing;
}
.dj-requests-dragging .nx-item {
  opacity: 0.38;
  filter: saturate(0.7);
}
body.dj-requests-dragging-active #djSongsBody .nx-item {
  opacity: 0.38;
  filter: saturate(0.7);
}
.dj-requests-dragging .nx-item.dj-dragging,
.dj-requests-dragging .nx-item.dj-drag-source,
body.dj-requests-dragging-active #djSongsBody .nx-item.dj-dragging,
body.dj-requests-dragging-active #djSongsBody .nx-item.dj-drag-source {
  opacity: 0.78;
  filter: none;
  transform: scale(0.98);
}
@keyframes nxSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.nx-item.nx-priority {
  border-color: color-mix(in srgb, var(--nx-accent) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--nx-accent) 40%, transparent),
              0 10px 28px -12px color-mix(in srgb, var(--nx-accent) 70%, transparent);
}
.nx-item.nx-priority::before {
  content: "BOOST";
  position: absolute; top: -8px; right: 14px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 1px;
  padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1f1300;
  box-shadow: 0 4px 10px -2px rgba(245, 158, 11, 0.6);
}

.nx-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--nx-accent);
  background: color-mix(in srgb, var(--nx-accent) 16%, rgba(255,255,255,0.02));
  border: 1px solid color-mix(in srgb, var(--nx-accent) 30%, transparent);
}

.nx-body { min-width: 0; }
.nx-head {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.4rem 0.6rem; margin-bottom: 0.3rem;
  font-size: 0.72rem;
}
.nx-type-chip {
  padding: 2px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--nx-accent) 22%, transparent);
  color: var(--nx-accent);
  font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  font-size: 0.62rem;
}
.nx-table {
  color: rgba(226, 232, 240, 0.85);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.nx-table i { font-size: 0.65rem; opacity: 0.8; }
.nx-time {
  margin-left: auto;
  color: rgba(226, 232, 240, 0.5);
  font-size: 0.7rem;
}

.nx-title {
  color: #f8fafc; font-weight: 700;
  font-size: 0.95rem; line-height: 1.25;
  margin-bottom: 0.15rem;
}
.nx-msg {
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.82rem; line-height: 1.35;
  margin-bottom: 0.45rem;
}

.nx-detail {
  background: rgba(255,255,255,0.035);
  border: 1px dashed color-mix(in srgb, var(--nx-accent) 30%, transparent);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.55rem;
}
.nx-song {
  color: #fff; font-weight: 600; font-size: 0.88rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nx-artist {
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.75rem; margin-top: 2px;
}
.nx-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.4rem;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
}
.nx-chip-boost {
  background: linear-gradient(135deg, rgba(250,204,21,0.18), rgba(245,158,11,0.18));
  color: #facc15;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.nx-items {
  list-style: none; margin: 0 0 0.55rem; padding: 0.4rem 0.5rem;
  background: rgba(255,255,255,0.035);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.82rem;
}
.nx-items li {
  display: flex; gap: 0.45rem; padding: 3px 4px;
  color: rgba(226, 232, 240, 0.9);
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.nx-items li:last-child { border-bottom: none; }
.nx-items .nx-qty {
  color: var(--nx-accent); font-weight: 800; min-width: 28px;
}
.nx-items .nx-more {
  color: rgba(226, 232, 240, 0.55);
  font-style: italic; justify-content: flex-end;
}

.nx-actions {
  display: flex; gap: 0.4rem; margin-top: 0.25rem;
}
.nx-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.nx-btn:active { transform: scale(0.96); }
.nx-btn-ok {
  background: color-mix(in srgb, var(--nx-accent) 22%, transparent);
  color: var(--nx-accent);
  border-color: color-mix(in srgb, var(--nx-accent) 45%, transparent);
  flex: 1;
  justify-content: center;
}
.nx-btn-ok:hover {
  background: color-mix(in srgb, var(--nx-accent) 32%, transparent);
}
.nx-btn-del {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}
.nx-btn-del:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fff;
}

/* Sobrescribir estilos viejos que puedan colisionar */
.notification-item.nx-item { padding: 0.9rem 0.95rem; }

/* ===== TABLERO DE COMANDAS ===== */
.comandas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.1rem;
  align-content: start;
}

.comanda-card {
  --ca: #10b981;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ca) 10%, transparent), transparent 65%),
    rgba(15, 23, 42, 0.75);
  border: 1px solid color-mix(in srgb, var(--ca) 25%, transparent);
  border-radius: 20px;
  padding: 1.1rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 24px -14px color-mix(in srgb, var(--ca) 45%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: nxSlideIn 0.25s ease both;
}
.comanda-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--ca) 60%, transparent);
  border-color: color-mix(in srgb, var(--ca) 45%, transparent);
}

.comanda-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.comanda-table-badge {
  font-weight: 800;
  font-size: 1rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.comanda-table-badge i { color: var(--ca); font-size: 0.85rem; }
.comanda-time-badge {
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.5);
  white-space: nowrap;
}

.cq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.6rem 0;
}
.cq-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.9);
}
.cq-qty {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ca);
  min-width: 26px;
}
.cq-name { flex: 1; }

.comanda-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.comanda-count {
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.45);
}
.comanda-btns {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.cb-ok {
  padding: 0.38rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.cb-ok:hover {
  background: rgba(16, 185, 129, 0.28);
  color: #fff;
  transform: scale(1.04);
}
.cb-del {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: rgba(239, 68, 68, 0.7);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.cb-del:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.comanda-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(226, 232, 240, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.comanda-empty i { color: rgba(16, 185, 129, 0.2); }

/* === CAMPANA PETICIONES MÚSICA === */
.dj-music-bell-btn {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
  background: rgba(56, 189, 248, 0.08) !important;
}
.dj-music-bell-btn:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  transform: translateY(-2px);
}
.dj-music-bell-btn .notification-badge {
  background: #0ea5e9 !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.55) !important;
}

.dj-peticiones-dropdown {
  left: auto !important;
  right: 0 !important;
  transform: none !important;
  width: 380px;
}
@keyframes notifyDrop {
  from { opacity: 0; transform: scale(0.93) translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.dj-peticiones-dropdown.d-none { display: none !important; }

.dj-peticiones-dropdown .dj-request-card[draggable="true"] { cursor: grab; }
.dj-peticiones-dropdown .dj-request-card[draggable="true"]:active { cursor: grabbing; }
.dj-peticiones-dropdown .dj-request-card.dj-dragging { opacity: 0.45; }

/* Styles for song cards inside the dropdown */
.dj-peticiones-dropdown .dj-request-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  transition: border-color 0.15s;
}
.dj-peticiones-dropdown .dj-request-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
}
.dj-peticiones-dropdown .dj-request-card .priority-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

/* input group override inside notification panel */
.dj-peticiones-dropdown .input-group-text,
.dj-peticiones-dropdown .form-control {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #e2e8f0 !important;
  font-size: 0.78rem;
}
.dj-peticiones-dropdown .form-control::placeholder { color: rgba(148,163,184,0.55); }

