/* SocioTech Core Design System & CSS Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #0a0a0c;
  --bg-secondary: #131317;
  --bg-card: rgba(30, 30, 38, 0.6);
  --bg-card-hover: rgba(45, 45, 56, 0.8);
  
  --primary: #ff6b00; /* Naranja Fuego */
  --primary-hover: #ff8524;
  --secondary: #ffb700; /* Amarillo Maíz */
  --secondary-hover: #ffd043;
  --accent: #2dd4bf; /* Teal para estados de éxito */
  --danger: #ef4444; /* Rojo para alertas/cancelación */
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #0f172a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 107, 0, 0.4);
  
  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Shadows & Blur */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.15);
  --shadow-glow-green: 0 0 20px rgba(45, 212, 191, 0.15);
  --blur-md: blur(12px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Animation speeds */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 107, 0, 0.15); }
  50% { box-shadow: 0 0 25px rgba(255, 107, 0, 0.3); }
}

.animate-fade {
  animation: fadeIn var(--transition-normal) forwards;
}

/* Glassmorphism Classes */
.glass {
  background: var(--bg-card);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.glass-hover:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 107, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #e65c00);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #ff6b00);
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(255, 107, 0, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* Input Fields */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 14px 20px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

/* Landing Page (index.html) */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
}

.brand-logo-glow {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float 5s ease-in-out infinite;
}

.brand-logo-glow span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-section {
  width: 100%;
  max-width: 550px;
  margin-top: 30px;
  position: relative;
}

.search-bar-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.search-input {
  width: 100%;
  padding: 18px 20px 18px 55px;
  font-size: 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--blur-md);
  color: var(--text-main);
  outline: none;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  background: rgba(255, 255, 255, 0.05);
}

.results-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 100;
  display: none;
  animation: fadeIn var(--transition-fast) forwards;
}

.result-item {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

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

.result-item:hover {
  background: rgba(255, 107, 0, 0.1);
}

.result-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.result-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
}

.result-city {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.result-arrow {
  color: var(--primary);
  font-size: 1.2rem;
  transition: transform var(--transition-fast);
}

.result-item:hover .result-arrow {
  transform: translateX(4px);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: var(--blur-md);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: 35px;
  text-align: center;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-backdrop.show .modal-card {
  transform: scale(1);
}

.modal-logo {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-glow);
}

.modal-title {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.role-buttons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.role-btn {
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.role-btn:hover {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.08);
}

.role-btn-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.role-btn-icon {
  font-size: 1.5rem;
}

.role-btn-text {
  text-align: left;
}

.role-btn-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.role-btn-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modo simplificado para modal de roles sin descripción */
.no-desc .role-btn-desc {
  display: none !important;
}

.no-desc .role-buttons-grid {
  gap: 12px;
}

.no-desc .role-btn {
  padding: 13px 18px;
}

.close-modal-link {
  display: inline-block;
  margin-top: 25px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.close-modal-link:hover {
  color: var(--text-main);
}

/* Login Page (login.html) */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.login-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 25px;
  transition: color var(--transition-fast);
  float: left;
}

.login-back-btn:hover {
  color: var(--text-main);
}

.waiter-selector {
  margin-bottom: 20px;
}

.waiter-selector select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

/* PIN Display / Input Grid */
.pin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--text-muted);
  transition: all var(--transition-fast);
}

.pin-dot.filled {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.pin-keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  height: 60px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pin-key:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.pin-key:active {
  transform: scale(0.92);
}

.pin-key.action-key {
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.01);
}

/* Waiter/Mesero View (mesero.html) */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 100vh;
}

@media (max-width: 1024px) {
  .mobile-nav-tabs {
    display: grid !important;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
    padding-bottom: 20px;
  }
  
  .dashboard-layout .cart-sidebar {
    position: static !important;
    display: none; /* Controlado por JS para coincidir con la pestaña activa */
    height: auto !important;
    max-height: none !important;
    border-top: none !important;
    border-left: none !important;
    background: transparent !important;
    width: 100% !important;
    padding: 15px !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  
  /* Reglas de visibilidad para pestañas móviles */
  .dashboard-layout.show-cart-tab .cart-sidebar {
    display: flex !important;
  }
  .dashboard-layout.show-cart-tab .menu-area {
    display: none !important;
  }
  
  .dashboard-layout .cart-header {
    cursor: default !important;
    height: auto !important;
    padding: 0 0 15px 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    margin-bottom: 15px;
  }
  
  .dashboard-layout .cart-header::after {
    display: none !important;
  }
  
  .cart-items-list {
    display: block !important;
    overflow-y: visible !important;
    flex-grow: 0 !important;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .cart-footer {
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
  }
}

/* Header Navbar */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: rgba(19, 19, 23, 0.8);
  backdrop-filter: var(--blur-md);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Selector de pestañas móviles (oculto en escritorio) */
.mobile-nav-tabs {
  display: none;
  grid-template-columns: 1fr 1fr;
  background: #131317;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 51px;
  z-index: 99;
}

.mobile-tab-btn {
  padding: 14px 10px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.mobile-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(255, 255, 255, 0.02);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}

.nav-brand span {
  color: var(--primary);
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-badge {
  background: rgba(255, 107, 0, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Menu Grid area */
.menu-area {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(100vh - 75px);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.category-tabs::-webkit-scrollbar {
  height: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-img-wrapper {
  width: 100%;
  height: 150px;
  background-color: #1a1a24;
  position: relative;
  overflow: hidden;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(30,30,38,0.8), rgba(15,15,20,0.9));
}

.product-details {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

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

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

.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--secondary);
}

.add-product-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 107, 0, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all var(--transition-fast);
}

.product-card:hover .add-product-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary);
}

/* Sidebar Cart */
.cart-sidebar {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  position: sticky;
  top: 0;
}

.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-count-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 15px;
}

.cart-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.cart-item {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.2s forwards;
}

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

.cart-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--secondary);
}

.cart-item-options {
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-style: italic;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-main);
}

.qty-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.remove-cart-item {
  color: var(--danger);
  font-size: 0.85rem;
  cursor: pointer;
  background: none;
  border: none;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  margin-bottom: 24px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  border-top: 1px dashed var(--border-color);
  padding-top: 15px;
}

.cart-summary-total span:last-child {
  color: var(--secondary);
}

.payment-method-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pay-method-btn {
  padding: 10px 5px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.pay-method-btn.active {
  background: rgba(255, 107, 0, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* Product Customizer Modal */
.options-list {
  text-align: left;
  margin: 20px 0;
}

.option-group {
  margin-bottom: 18px;
}

.option-group-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.option-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.06);
}

.option-checkbox-label input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.option-checkbox-label input:checked + span {
  color: var(--primary);
  font-weight: 600;
}

.option-checkbox-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.05);
}

/* Admin Panel (admin.html) */
.admin-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.admin-tabs {
  display: flex;
  gap: 15px;
}

.admin-tab {
  padding: 10px 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.admin-tab:hover {
  color: var(--text-main);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-content {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-panel-section {
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

.admin-panel-section.active {
  display: block;
}

/* Dashboard Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.metric-value.highlight {
  color: var(--secondary);
}

.metric-trend {
  font-size: 0.8rem;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-trend.up {
  color: var(--accent);
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 24px;
  border-radius: var(--radius-md);
  min-height: 350px;
}

.chart-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* CRUD Screens */
.crud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.crud-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.crud-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.crud-table th, .crud-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.crud-table th {
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
}

.crud-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.crud-table img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.crud-actions {
  display: flex;
  gap: 8px;
}

.action-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
}

.action-icon-btn.delete-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Image Upload Widget */
.image-upload-widget {
  width: 100%;
  height: 180px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
  position: relative;
  background-color: rgba(0, 0, 0, 0.1);
}

.image-upload-widget:hover {
  border-color: var(--primary);
  background-color: rgba(255, 107, 0, 0.02);
}

.image-upload-widget input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-upload-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.image-upload-icon {
  font-size: 2rem;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 16px 24px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fadeIn var(--transition-fast) forwards;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--primary);
}

.toast.success {
  border-left-color: var(--accent);
  background: #111c1a;
  color: #a7f3d0;
  box-shadow: var(--shadow-glow-green);
}

.toast.error {
  border-left-color: var(--danger);
  background: #1c1111;
  color: #fecaca;
}

/* --- PRINT STYLES --- */
#print-section,
#printArea,
.thermal-print-area {
  display: none;
}

@media print {
  @page {
    margin: 0;
    size: 80mm auto;  /* Papel térmico 80mm exacto — evita que Chrome reencuadre el contenido */
  }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #000 !important;
  }

  /* Hide all interactive/web elements to avoid blank space and extra pages */
  body > *:not(#print-section):not(#printArea):not(.thermal-print-area) {
    display: none !important;
  }
  
  /* Position print section relatively to grow height naturally */
  #print-section,
  #printArea,
  .thermal-print-area {
    display: block !important;
    position: relative !important;
    width: 68mm;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .print-ticket {
    width: 68mm;
    padding: 1.5mm;  /* Padding simétrico */
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;    /* Reducido de 12.5px para que todo el contenido quepa */
    line-height: 1.25;
    color: #000;
    background: #fff;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Línea de separación entre COPIA CLIENTE y COPIA COCINA */
  .ticket-cut-line {
    width: 68mm;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 2mm 0;
    letter-spacing: 2px;
    color: #000;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    margin: 1.5mm 0;
    box-sizing: border-box;
  }

  .ticket-header {
    text-align: center;
    border-bottom: 1.5px dashed #000;
    padding-bottom: 2mm;
    margin-bottom: 2mm;
  }

  .ticket-title {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 0.5mm;
    letter-spacing: 0.5px;
  }

  .ticket-copy-indicator {
    font-size: 12px;
    font-weight: bold;
    border: 1.5px solid #000;
    padding: 0.5mm 2mm;
    display: inline-block;
    margin: 1mm 0;
  }

  .ticket-number-banner {
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    border-top: 1.5px dashed #000;
    border-bottom: 1.5px dashed #000;
    padding: 1.5mm 0;
    margin: 2mm 0;
  }

  .ticket-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    margin-bottom: 1mm;
  }

  .ticket-items {
    border-bottom: 1.5px dashed #000;
    padding-bottom: 2.5mm;
    margin-bottom: 2.5mm;
  }

  .ticket-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1mm;
  }

  .ticket-item-details {
    flex-grow: 1;
    padding-right: 3mm;
  }

  .ticket-item-name {
    font-weight: bold;
    font-size: 11px;
  }

  .ticket-item-mods {
    font-size: 10px;
    font-style: italic;
    padding-left: 2mm;
  }

  .ticket-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: bold;
    margin-top: 2.5mm;
  }
}

/* Global Touch Target & Gesture Optimization */
button, a, select, input, textarea, .pin-key, .qty-btn, .tab-btn, .role-btn, .result-item {
  touch-action: manipulation;
}

/* Modals Scrollable & Safe on Small Displays */
.modal-card {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- COMPREHENSIVE RESPONSIVE AND MOBILE STYLES --- */

/* Mobile displays (Smartphones) */
@media (max-width: 600px) {
  /* Brand and Logo sizes */
  .brand-logo-glow {
    font-size: 2.5rem;
    margin-bottom: 5px;
    gap: 8px;
  }
  
  .landing-container {
    padding: 30px 15px;
  }
  
  .landing-container p {
    font-size: 0.95rem !important;
    margin-bottom: 25px !important;
    line-height: 1.5;
  }

  /* Search Section */
  .search-section {
    margin-top: 20px;
    width: 100%;
  }

  .search-input {
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
  }

  .search-icon {
    left: 18px;
    font-size: 1rem;
  }

  /* Navigation Bar Mesero */
  .nav-bar {
    padding: 10px 15px;
  }
  
  .nav-brand {
    font-size: 1.2rem;
  }

  .nav-user-info {
    gap: 8px;
  }

  .user-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  #logoutBtn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  /* Food/Product Grid (2 Columns on Mobile Phones) */
  .menu-area {
    padding: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .product-card {
    border-radius: var(--radius-sm);
  }

  .product-img-wrapper {
    height: 100px;
  }

  .product-details {
    padding: 10px;
  }

  .product-name {
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Keep it to a single line */
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  .product-price {
    font-size: 0.95rem;
  }

  .add-product-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  /* Category tabs horizontal scrolling space */
  .category-tabs {
    gap: 6px;
    margin-bottom: 15px;
    padding-bottom: 8px;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* PIN Keyboard thumb-sized (comfort typing) */
  .login-card {
    padding: 16px 12px !important;
  }

  .login-card .modal-logo {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-top: 5px !important;
    margin-bottom: 10px;
  }

  .login-card .modal-title {
    font-size: 1.3rem;
  }

  .login-card .modal-subtitle {
    margin-bottom: 12px;
  }

  .pin-keyboard {
    max-width: 280px;
    gap: 8px;
  }

  .pin-key {
    height: 54px; /* Reduced from 68px to fit on single mobile screen */
    font-size: 1.4rem;
    border-radius: 10px;
  }

  .pin-key.action-key {
    font-size: 0.85rem;
  }

  .pin-display {
    margin: 12px 0;
    gap: 12px;
  }

  .pin-dot {
    width: 14px;
    height: 14px;
  }

  /* Cart Sidebar mobile adjustments & Safe Area */
  .cart-sidebar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .cart-items-list {
    padding: 15px;
  }

  .cart-item {
    padding: 12px 0;
  }

  .cart-item-name {
    font-size: 0.9rem;
  }

  .qty-control {
    gap: 8px;
  }

  .qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    font-size: 0.85rem;
  }

  /* Toast Notification repositioned top-center on mobile */
  .toast-container {
    top: 20px;
    bottom: auto;
    right: 15px;
    left: 15px;
    width: calc(100% - 30px);
  }

  .toast {
    width: 100%;
    font-size: 0.85rem;
    padding: 12px 16px;
  }
}

/* Tablets and Mobile General */
@media (max-width: 768px) {
  .admin-navbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    text-align: center;
  }
  
  .admin-tabs {
    width: 100%;
    justify-content: space-around;
    gap: 5px;
    margin: 5px 0;
  }
  
  .admin-tab {
    padding: 8px 10px;
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
  }
  
  .crud-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }
  
  .crud-header h2 {
    font-size: 1.3rem;
  }
  
  .admin-content {
    padding: 15px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .metric-card {
    padding: 18px;
  }

  /* Responsive card-based tables transformation */
  .crud-table, 
  .crud-table thead, 
  .crud-table tbody, 
  .crud-table th, 
  .crud-table td, 
  .crud-table tr { 
    display: block; 
  }
  
  /* Hide desktop headers */
  .crud-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .crud-table tr {
    margin: 0 0 1.25rem 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }
  
  .crud-table td { 
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04); 
    position: relative;
    padding: 12px 10px 12px 45%; 
    text-align: right;
    min-height: 48px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  
  .crud-table td:last-child {
    border-bottom: none;
  }
  
  /* Dynamic labels from JS data-label attributes */
  .crud-table td::before { 
    content: attr(data-label);
    position: absolute;
    left: 12px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Specific align adjustment for images and badge elements inside tables */
  .crud-table td[data-label="Imagen"] {
    justify-content: flex-end;
  }

  .crud-table td[data-label="Imagen"] img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }
  
  .crud-actions {
    justify-content: flex-end;
    width: 100%;
    gap: 8px;
  }
}

/* ══════════════════════════════════════════════════════
   ESTILOS PARA EL PANEL DE PEDIDOS EN TIEMPO REAL (CAJA)
   ══════════════════════════════════════════════════════ */

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.orders-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  height: 18px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.orders-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

@media (max-width: 768px) {
  .orders-control-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.orders-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.orders-empty-state p {
  margin: 10px 0;
}

.order-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(30, 41, 59, 0.4);
}

.order-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.order-card.estado-pendiente {
  border-left: 4px solid var(--secondary);
}

.order-card.estado-completado {
  border-left: 4px solid #10b981;
  opacity: 0.8;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.order-consecutivo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.order-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.order-waiter {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 4px;
}

.order-card-items {
  flex-grow: 1;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.order-card-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  line-height: 1.4;
}

.order-card-item-qty {
  font-weight: 700;
  color: var(--secondary);
  margin-right: 6px;
}

.order-card-item-mods {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 20px;
  margin-top: -4px;
  margin-bottom: 6px;
}

.order-card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.order-card-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
}

.order-card-pay-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.order-card-actions {
  display: flex;
  gap: 10px;
}

.order-card-actions .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ══════════════════════════════════════════════════════
   NUEVAS CLASES: Dashboard Filters & Secondary Grid
   ══════════════════════════════════════════════════════ */

.dashboard-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-filter {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-filter:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-filter.active {
  background: linear-gradient(135deg, var(--primary), #e65c00);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.custom-date-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.custom-date-inputs label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.date-input {
  background: rgba(20, 20, 25, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.25);
}

.btn-apply-date {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Secondary Charts Grid (2x2 Layout) */
.charts-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .charts-grid-secondary {
    grid-template-columns: 1fr;
  }
  .dashboard-filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .filter-buttons {
    width: 100%;
    justify-content: space-between;
  }
}

/* Overlay de Texto en Gráficos de Anillo */
.chart-container-relative {
  position: relative;
  height: 280px;
  width: 100%;
}

.chart-center-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%); /* Ajuste fino hacia arriba para alinearse con el hueco de la dona */
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none; /* Permite hover en las rebanadas del gráfico */
  text-align: center;
}

.chart-center-overlay .overlay-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.chart-center-overlay .overlay-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ─── Fase 3: Mejoras Grupo B ──────────────────────────────────────────────── */
.option-group-builder {
  transition: all 0.2s ease;
}
.option-group-builder:hover {
  border-color: rgba(255, 107, 0, 0.25) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.option-val-row input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.option-val-row input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.4);
}

/* Estilos de producto agotado en menú del mesero */
.product-card.product-agotado {
  border: 1px dashed rgba(239, 68, 68, 0.2) !important;
  background: rgba(30, 30, 38, 0.3) !important;
  box-shadow: none !important;
}
.product-card.product-agotado:hover {
  transform: none !important;
}



/* ─── Funciones del Mesero — Toggle Switch ─────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  transition: all 0.3s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.35);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}
.toggle-switch:hover .toggle-slider {
  border-color: rgba(255, 255, 255, 0.25);
}

/* Animaciones de parpadeo y glow para el botón de pago de mensualidad */
@keyframes pulse-glow-green {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  }
}

@keyframes pulse-glow-red {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 25px rgba(239, 68, 68, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  }
}

.pago-pendiente-blink-green {
  animation: pulse-glow-green 1.5s infinite ease-in-out;
}

.pago-pendiente-blink-red {
  animation: pulse-glow-red 1.5s infinite ease-in-out;
}

/* ── Barra de Navegación Inferior Móvil para Panel Admin ── */
.admin-mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(19, 19, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.admin-mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border-bottom: none;
}

.admin-mob-nav-item .nav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.admin-mob-nav-item.active {
  color: var(--primary);
  background: rgba(255, 107, 0, 0.1);
}

@media (max-width: 768px) {
  .admin-mobile-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 70px;
  }
}

/* Estilos para Cambio y Recuperación de Clave */
.toggle-password-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.toggle-password-btn:hover {
  color: var(--text-light);
}

.forgot-pass-link {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.forgot-pass-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-close-modal:hover {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   SOCIOTECH SUPERMASTER 2.0 - ULTRA-MINIMAL & MODERN DESIGN SYSTEM
   ========================================================================== */

/* Header Supermaster */
.sm-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(13, 13, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.sm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sm-brand span {
  color: var(--primary);
}

.sm-badge-master {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.sm-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sm-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* KPIs Ejecutivos Minimalistas */
.sm-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.sm-kpi-card {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: rgba(20, 20, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sm-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  background: rgba(26, 26, 34, 0.8);
}

.sm-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sm-kpi-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sm-kpi-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

.sm-kpi-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 6px;
}

.sm-kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pestañas de Navegación */
.sm-tabs-bar {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(18, 18, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sm-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.sm-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.sm-tab-btn.active {
  color: #fff;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.35);
  font-weight: 600;
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.15);
}

.sm-tab-count {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
}

.sm-tab-btn.active .sm-tab-count {
  background: var(--primary);
  color: #fff;
}

/* Cuadrícula de Negocios (Business Cards) */
.sm-biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.sm-biz-card {
  border-radius: var(--radius-md);
  background: rgba(22, 22, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.sm-biz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background var(--transition-fast);
}

.sm-biz-card.active-sub::before {
  background: linear-gradient(90deg, #10b981, var(--accent));
}

.sm-biz-card.suspended-sub::before {
  background: #ef4444;
}

.sm-biz-card:hover {
  border-color: rgba(255, 107, 0, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 0, 0.08);
  background: rgba(28, 28, 38, 0.85);
}

.sm-biz-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.sm-biz-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sm-biz-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.18), rgba(255, 183, 0, 0.18));
  border: 1px solid rgba(255, 107, 0, 0.3);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sm-biz-meta h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 3px;
}

.sm-biz-meta p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sm-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.sm-status-pill.active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.sm-status-pill.suspended {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Métricas internas de la tarjeta */
.sm-biz-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 16px;
}

.sm-biz-metric-item {
  display: flex;
  flex-direction: column;
}

.sm-biz-metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.sm-biz-metric-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.sm-biz-metric-val.highlight {
  color: var(--secondary);
}

/* Footer de la tarjeta con última sesión */
.sm-biz-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sm-biz-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
}

.sm-biz-session-dot.offline {
  background: #6b7280;
  box-shadow: none;
}

.sm-view-detail-link {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Modal Detalle Completo de Negocio */
.sm-detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
}

.sm-quick-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.sm-detail-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.sm-detail-box-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-profile-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.sm-profile-session-row:last-child {
  margin-bottom: 0;
}

/* Módulo de Contabilidad */
.sm-accounting-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.sm-acc-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(22, 22, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sm-acc-card.income {
  border-color: rgba(16, 185, 129, 0.3);
}

.sm-acc-card.expense {
  border-color: rgba(239, 68, 68, 0.3);
}

.sm-acc-card.balance {
  border-color: rgba(45, 212, 191, 0.35);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.05), rgba(20, 20, 26, 0.7));
}

.sm-acc-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sm-acc-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.sm-acc-val.income {
  color: #10b981;
}

.sm-acc-val.expense {
  color: #ef4444;
}

.sm-acc-val.balance {
  color: var(--accent);
}

.sm-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

/* Hub de Marketing & Pomelli */
.sm-marketing-banner {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.12), rgba(45, 212, 191, 0.08));
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.sm-dna-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e5e7eb;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
}

.sm-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 0.75rem;
}

/* Protocolo Onboarding Timeline */
.sm-protocol-step {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  position: relative;
}

.sm-protocol-step::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -16px;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.sm-protocol-step:last-child::after {
  display: none;
}

.sm-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.sm-step-content {
  background: rgba(20, 20, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  flex-grow: 1;
}

.sm-step-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.sm-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.sm-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #e5e7eb;
}

/* ==========================================================================
   SOCIOTECH SUPERMASTER - LIGHT MODERN MINIMALIST THEME (COLORES CLAROS)
   ========================================================================== */
body.sm-light-theme {
  background-color: #f8fafc !important; /* Gris nube suave y limpio */
  color: #0f172a !important;            /* Slate oscuro para tipografía nítida */
  font-family: var(--font-body);
}

/* Controles de formulario en tema claro */
.sm-light-theme .form-control {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.sm-light-theme .form-control:focus {
  border-color: #ff6b00 !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15) !important;
}

.sm-light-theme .form-label {
  color: #334155 !important;
  font-weight: 600;
}

/* Tarjeta de login en tema claro */
.sm-light-theme .login-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}

.sm-light-theme .login-card .modal-title {
  color: #0f172a !important;
}

.sm-light-theme .login-card .modal-subtitle {
  color: #64748b !important;
}

.sm-light-theme .login-back-btn {
  color: #64748b !important;
}

.sm-light-theme .login-back-btn:hover {
  color: #0f172a !important;
}

/* Header Navbar en tema claro */
.sm-light-theme .sm-navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.sm-light-theme .sm-brand {
  color: #0f172a !important;
}

.sm-light-theme .sm-badge-master {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

.sm-light-theme .sm-user-chip {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

/* Botones secundarios en tema claro */
.sm-light-theme .btn-secondary {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.sm-light-theme .btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Tarjetas de KPIs en tema claro */
.sm-light-theme .sm-kpi-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.sm-light-theme .sm-kpi-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.04) !important;
  transform: translateY(-2px);
  background: #ffffff !important;
}

.sm-light-theme .sm-kpi-title {
  color: #64748b !important;
  font-weight: 600;
}

.sm-light-theme .sm-kpi-value {
  color: #0f172a !important;
}

.sm-light-theme .sm-kpi-sub {
  color: #64748b !important;
}

/* Barra de pestañas en tema claro */
.sm-light-theme .sm-tabs-bar {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

.sm-light-theme .sm-tab-btn {
  color: #64748b !important;
}

.sm-light-theme .sm-tab-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

.sm-light-theme .sm-tab-btn.active {
  background: #ffffff !important;
  color: #ea580c !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.sm-light-theme .sm-tab-count {
  background: #e2e8f0 !important;
  color: #475569 !important;
}

.sm-light-theme .sm-tab-btn.active .sm-tab-count {
  background: #ea580c !important;
  color: #ffffff !important;
}

/* Tarjetas de Negocios en tema claro */
.sm-light-theme .sm-biz-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.sm-light-theme .sm-biz-card:hover {
  border-color: #fdba74 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04) !important;
}

.sm-light-theme .sm-biz-meta h3 {
  color: #0f172a !important;
}

.sm-light-theme .sm-biz-meta p {
  color: #64748b !important;
}

.sm-light-theme .sm-biz-avatar {
  background: #fff7ed !important;
  border: 1px solid #fed7aa !important;
  color: #ea580c !important;
}

.sm-light-theme .sm-biz-metrics-row {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.sm-light-theme .sm-biz-metric-label {
  color: #334155 !important;
  font-weight: 700 !important;
}

.sm-light-theme .sm-biz-metric-val {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.sm-light-theme .sm-biz-metric-val.highlight {
  color: #ea580c !important;
  font-weight: 800 !important;
}

.sm-light-theme .sm-biz-metric-val span {
  color: #475569 !important;
  font-weight: 600 !important;
}

.sm-light-theme .sm-biz-card-bottom {
  border-top: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  font-weight: 600 !important;
}

.sm-light-theme .sm-view-detail-link {
  color: #ea580c !important;
  font-weight: 700 !important;
}

/* Modales en tema claro */
.sm-light-theme .modal-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

.sm-light-theme .modal-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.sm-light-theme .modal-subtitle {
  color: #475569 !important;
}

.sm-light-theme .btn-close-modal {
  color: #64748b !important;
}

.sm-light-theme .btn-close-modal:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

.sm-light-theme .sm-detail-header-bar {
  border-bottom: 1px solid #e2e8f0 !important;
}

.sm-light-theme .sm-quick-actions-bar {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.sm-light-theme .sm-detail-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

.sm-light-theme .sm-detail-box-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.sm-light-theme .sm-profile-session-row {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

.sm-light-theme #detailBizNombre {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.sm-light-theme #detailBizCiudad,
.sm-light-theme #detailBizTipo {
  color: #475569 !important;
  font-weight: 600 !important;
}

.sm-light-theme #detailAdminEmail {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.sm-light-theme #detailAdminLastLogin {
  color: #047857 !important;
  font-weight: 600 !important;
}

.sm-light-theme #detailVentasHoy {
  color: #ea580c !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailPedidosHoy {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailVentasMes {
  color: #047857 !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailPedidosMes {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailTicketPromedio {
  color: #1e40af !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailConsecutivo {
  color: #0f766e !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailValorMensual {
  color: #047857 !important;
  font-weight: 800 !important;
}

.sm-light-theme #detailFechaCorte {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.sm-light-theme #bizDetailModal strong {
  color: #334155 !important;
}

/* Contabilidad en tema claro */
.sm-light-theme .sm-acc-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.sm-light-theme .sm-acc-card.balance {
  background: #f0fdfa !important;
  border-color: #99f6e4 !important;
}

.sm-light-theme .sm-acc-label {
  color: #64748b !important;
}

/* Tablas en tema claro */
.sm-light-theme .crud-table-wrapper {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.sm-light-theme .crud-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.sm-light-theme .crud-table td {
  color: #1e293b !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.sm-light-theme .crud-table tr:hover td {
  background: #f8fafc !important;
}

/* Protocolo en tema claro */
.sm-light-theme .sm-step-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.sm-light-theme .sm-step-title {
  color: #0f172a !important;
}

.sm-light-theme .sm-step-desc {
  color: #475569 !important;
}

.sm-light-theme .sm-checklist-item {
  color: #334155 !important;
}

.sm-light-theme .sm-step-number {
  background: #fff7ed !important;
  border-color: #fdba74 !important;
  color: #ea580c !important;
}

.sm-light-theme .sm-protocol-step::after {
  background: #e2e8f0 !important;
}

/* Marketing en tema claro */
.sm-light-theme .sm-marketing-banner {
  background: linear-gradient(135deg, #fff7ed, #f0fdfa) !important;
  border: 1px solid #fed7aa !important;
}

.sm-light-theme .sm-marketing-banner h2 {
  color: #0f172a !important;
}

.sm-light-theme .sm-marketing-banner p {
  color: #334155 !important;
}

.sm-light-theme .sm-dna-box {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

/* ─── Sub-Pestañas del Módulo Contable ─── */
.sm-subtabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.sm-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sm-subtab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.sm-subtab-btn.active {
  background: var(--surface);
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sm-subtab-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 700;
}

.sm-subtab-btn.active .sm-subtab-badge {
  background: rgba(45, 212, 191, 0.18);
  color: var(--accent);
}

/* Sub-paneles */
.sm-subpanel {
  display: none;
}
.sm-subpanel.active {
  display: block;
}

/* Badges de Contratos */
.badge-contract-vigente {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 700;
  font-size: 0.76rem;
}

.badge-contract-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 700;
  font-size: 0.76rem;
}

.badge-contract-expired {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-weight: 700;
  font-size: 0.76rem;
}

.badge-contract-pilot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 700;
  font-size: 0.76rem;
}

/* Modal Detalle Amplio y Logos */
.sm-biz-avatar img,
.sm-biz-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
}

@media (min-width: 1024px) {
  .sm-modal-fullscreen .sm-detail-grid {
    grid-template-columns: 1.15fr 1fr 1fr !important;
    gap: 20px !important;
  }
}

/* Sub-Pestañas en tema claro */
.sm-light-theme .sm-subtabs-bar {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

.sm-light-theme .sm-subtab-btn {
  color: #64748b !important;
}

.sm-light-theme .sm-subtab-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

.sm-light-theme .sm-subtab-btn.active {
  background: #ffffff !important;
  color: #4f46e5 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.sm-light-theme .sm-subtab-btn.active .sm-subtab-badge {
  background: #e0e7ff !important;
  color: #4338ca !important;
}



