/* 
  =============================================================
  TONNYSHOP PREMIUM - MODERN SAAS SPACE-DARK DASHBOARD
  =============================================================
*/

:root {
  /* Elegant Cosmic HSL Palette */
  --bg-base: #060913;
  --bg-surface: rgba(13, 20, 38, 0.45);
  --bg-surface-light: rgba(22, 32, 58, 0.5);
  --bg-card: rgba(13, 20, 38, 0.6);
  --bg-glass: rgba(10, 15, 30, 0.75);
  
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-bright: rgba(255, 255, 255, 0.12);
  --border-neon-indigo: rgba(99, 102, 241, 0.35);
  --border-neon-purple: rgba(139, 92, 246, 0.4);
  
  /* Typography & Acentuation */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-dimmed: #64748b;
  --text-accent: #818cf8;
  --text-neon: #c084fc;
  
  /* Dynamic Status Accents */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-danger: #f43f5e;
  --color-danger-bg: rgba(244, 63, 94, 0.12);
  --color-ai: #8b5cf6;
  --color-ai-glow: rgba(139, 92, 246, 0.45);

  /* Modern Fonts */
  --font-display: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Smooth Animations */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-neon: 0 0 25px rgba(99, 102, 241, 0.18);
  --shadow-neon-ai: 0 0 30px rgba(139, 92, 246, 0.3);
  
  /* Ultra-smooth layered shadows */
  --shadow-premium-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
  --shadow-premium-md: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -1px rgba(0, 0, 0, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.35);
  --shadow-premium-lg: 
    0 10px 25px -5px rgba(0, 0, 0, 0.35), 
    0 8px 10px -6px rgba(0, 0, 0, 0.3), 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Reset and Base Rules */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-attachment: fixed;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "kern";
  font-variant-numeric: tabular-nums lining-nums;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

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

/* Helper class to hide elements */
.hidden {
  display: none !important;
}

/* Background Glowing Mesh Orbs */
.bg-orb-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.14;
  mix-blend-mode: screen;
  animation: orb-float 24s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, #6366f1, #8b5cf6);
  animation-duration: 18s;
}

.orb-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #ec4899, #8b5cf6);
  animation-duration: 26s;
}

.orb-3 {
  top: 35%;
  left: 45%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #06b6d4, #6366f1);
  animation-duration: 21s;
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, 6vh) scale(1.12); }
  100% { transform: translate(-3vw, -4vh) scale(0.92); }
}

/* Glassmorphism Panel styles */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium-lg);
  transition: var(--transition-smooth);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.glass-panel-light {
  background: var(--bg-surface-light);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-premium-sm);
}

/* Floating Layout (Only applied on Desktop for ultra premium SaaS look) */
@media (min-width: 993px) {
  body {
    padding: 16px;
    height: 100vh;
    box-sizing: border-box;
  }
  
  .app-layout {
    display: flex;
    height: calc(100vh - 32px);
    width: calc(100vw - 32px);
    gap: 16px;
  }
  
  .sidebar {
    height: 100% !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-glass) !important;
  }
  
  .main-content {
    height: 100% !important;
    gap: 16px;
  }
  
  .content-header {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-glass) !important;
  }
  
  .content-body {
    padding: 0 !important;
  }
}

/* Desktop App Container */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar styling */
.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  z-index: 100;
  border-radius: 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-icon-neon {
  color: #fff;
  font-size: 20px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.active-tenant-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  border-radius: var(--radius-md);
  position: relative;
}

.tenant-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tenant-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.tenant-role {
  font-size: 11px;
  color: var(--text-accent);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Sidebar navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  margin-top: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.nav-item i {
  font-size: 16px;
  transition: var(--transition-fast);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
  border-color: var(--border-neon-indigo);
  box-shadow: var(--shadow-neon), inset 0 0 10px rgba(99, 102, 241, 0.05);
}

.nav-item.active i {
  color: var(--text-neon);
  transform: scale(1.1);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-dimmed);
  width: 100%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.btn-logout:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* Main Content styling */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.content-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
}

.btn-toggle-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  margin-right: 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.db-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.status-dot.green {
  background-color: var(--color-success);
  color: var(--color-success);
}
.status-dot.yellow {
  background-color: var(--color-warning);
  color: var(--color-warning);
}
.status-dot.red {
  background-color: var(--color-danger);
  color: var(--color-danger);
}

.btn-sync-header {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface-light);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sync-header:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.content-body {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
}

/* Sections transition animation */
.tab-section {
  display: none;
  animation: slideFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
}

.tab-section.active {
  display: block;
}

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

/* POS Layout Grid */
.pos-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 16px;
  height: 100%;
  overflow: hidden;
}

@media (min-width: 993px) {
  .pos-grid {
    height: 100% !important;
  }
  .pos-catalog {
    max-height: 100% !important;
  }
}

.pos-catalog {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-group .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dimmed);
  pointer-events: none;
}

.input-icon-group input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(13, 20, 38, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.input-icon-group input:focus {
  border-color: var(--text-accent);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.12);
  background: rgba(13, 20, 38, 0.7);
}

.emulator-group input {
  border-color: var(--border-neon-indigo);
}

.flex-grow { flex-grow: 1; }

.shelf-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.shelf-filters::-webkit-scrollbar {
  height: 4px;
}

.filter-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.filter-chip.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Products grid view */
.products-grid {
  flex-grow: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  align-content: start;
  padding-right: 4px;
}

/* Empty state placeholder inside grids and decks */
.empty-deck {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: rgba(13, 20, 38, 0.25);
  border: 1.5px dashed var(--border-glass-bright);
  border-radius: var(--radius-lg);
  color: var(--text-dimmed);
  text-align: center;
  transition: var(--transition-smooth);
}

.empty-deck i {
  color: var(--text-dimmed);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
  animation: float-soft 4s ease-in-out infinite alternate;
}

@keyframes float-soft {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}


/* Product Card Redesign (Ultra Premium) */
.product-card {
  background: rgba(16, 24, 48, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  will-change: transform, border-color, background, box-shadow;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  box-shadow: var(--shadow-premium-sm);
}

.product-card:hover {
  transform: translateY(-6px) translate3d(0, 0, 0);
  border-color: var(--border-neon-indigo);
  background: rgba(22, 32, 58, 0.55);
  box-shadow: 
    0 12px 24px -10px rgba(0, 0, 0, 0.5), 
    0 8px 16px -8px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(99, 102, 241, 0.22);
}

.product-img-wrapper {
  aspect-ratio: 1.1;
  width: 100%;
  border-radius: var(--radius-sm);
  background: rgba(10, 15, 30, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  border: 1px solid var(--border-glass);
}

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

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

.service-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.shelf-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(6, 9, 19, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  will-change: background, border-color, color;
}

/* Micro-animations and interactive feedback on card hover */
.product-card:hover .shelf-tag {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.product-card i.fa-box,
.product-card i.fa-image,
.product-card i.fa-solid {
  transition: var(--transition-smooth);
  will-change: transform, color;
}

.product-card:hover i.fa-box,
.product-card:hover i.fa-image,
.product-card:hover i.fa-solid {
  transform: scale(1.18) rotate(3deg) translateZ(0);
  color: var(--text-accent) !important;
}

.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
  transition: var(--transition-smooth);
}

.product-card:hover .product-name {
  color: var(--text-accent);
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-success);
  transition: var(--transition-smooth);
}

.product-card:hover .product-price {
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.product-stock {
  font-size: 11px;
  color: var(--text-dimmed);
}

.product-stock.out {
  color: var(--color-danger);
  font-weight: 600;
}

.product-stock.low {
  color: var(--color-warning);
  font-weight: 600;
}

/* POS Shopping Cart Sidebar Redesign */
.pos-cart-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.btn-text-danger {
  background: transparent;
  border: none;
  color: var(--color-danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 4px;
}

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

.empty-cart-message i {
  font-size: 36px;
}

/* Cart Item Row */
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  padding: 10px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.cart-item-row:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border-glass-bright);
}

.cart-item-info {
  flex-grow: 1;
  overflow: hidden;
}

.cart-item-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  color: var(--text-primary);
}

.cart-item-price {
  font-size: 11px;
  color: var(--color-success);
  font-weight: 500;
}

.cart-item-qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-qty:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-glass-bright);
}

.cart-item-qty {
  font-size: 13px;
  font-weight: 700;
  width: 22px;
  text-align: center;
}

.cart-item-subtotal {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  width: 65px;
  text-align: right;
  flex-shrink: 0;
}

/* Cart Summary block */
.cart-summary {
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  flex-shrink: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.total-row {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.total-row span:last-child {
  color: var(--color-success);
  font-family: var(--font-display);
  font-size: 26px;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* Primary and Glow buttons */
.btn-primary-action {
  width: 100%;
  padding: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: var(--transition-smooth);
}

.btn-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

.btn-primary-action:disabled {
  background: var(--text-dimmed);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-secondary-action {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-glass-bright);
}

.btn-accent-glow {
  padding: 10px 18px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--color-ai);
  color: #c084fc;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-accent-glow:hover {
  background: rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-neon-ai);
  color: #fff;
}

/* Premium Tables */
.table-scrollable {
  overflow: auto;
  max-height: calc(100vh - 200px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

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

.premium-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-glass-bright);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(13, 20, 38, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.premium-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 14px;
  color: var(--text-secondary);
}

.premium-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

/* Furniture physical cabinets */
.furniture-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
}

.furniture-item-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
}

.furniture-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.furniture-item-code {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--border-neon-indigo);
  color: #c7d2fe;
  padding: 3px 9px;
  border-radius: 4px;
}

.furniture-drawers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-tag {
  font-size: 12px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.drawer-tag:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--border-neon-indigo);
  color: #fff;
}

/* QR code Generator card */
.qr-preview-card {
  padding: 24px;
  max-width: 320px;
  width: 100%;
}

.qr-canvas-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius-md);
  display: inline-block;
}

/* Claw Chat Styles - Completely Overhauled */
.claw-chat-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  height: calc(100vh - 290px);
}

.claw-messages-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 16px;
  padding: 20px;
  height: 100%;
}

.chat-message {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: 75%;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.chat-message.user .chat-avatar {
  background: var(--text-accent);
}

.chat-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.chat-message.assistant .chat-bubble {
  background: rgba(22, 32, 58, 0.5);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-top-left-radius: 2px;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 12px;
}

.chat-bubble th, .chat-bubble td {
  padding: 8px 12px;
  border: 1px solid var(--border-glass-bright);
}

.chat-bubble th {
  background: rgba(0, 0, 0, 0.35);
}

/* Debug Plan console (Cibernetic terminal design) */
.claw-debug-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
}

.panel-header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.debug-console {
  background: #04060b;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #34d399;
  padding: 14px;
  border-radius: var(--radius-md);
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid rgba(52, 211, 153, 0.2);
  box-shadow: inset 0 0 15px rgba(0,0,0,0.85);
}

/* Kimi Purchase Suggestions Deck */
.suggestions-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.suggestion-card {
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(16, 24, 48, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.suggestion-card.pinned {
  border-color: var(--color-warning);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
  background: rgba(245, 158, 11, 0.03);
}

.pin-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--color-warning);
}

.suggestion-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.suggestion-reason {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
  line-height: 1.45;
}

.suggestion-stats {
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

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

.suggestion-actions button {
  flex-grow: 1;
}

/* Modern Showstopper Modals */
.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card {
  max-width: 650px;
  width: 92%;
  padding: 28px;
  max-height: 85vh;
  overflow-y: auto;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  transform: scale(1);
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dimmed);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  will-change: transform, color, background-color;
}

.btn-modal-close:hover {
  color: var(--color-danger);
  background-color: var(--color-danger-bg);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

/* Modern Frosted Forms */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-row-double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-control, .form-control-styled, input[type="text"], input[type="number"], input[type="password"], input[type="email"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(13, 20, 38, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus, .form-control-styled:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  border-color: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18), 0 0 8px rgba(99, 102, 241, 0.25);
  background: rgba(13, 20, 38, 0.85);
}

/* Database switcher dropdown button */
#btn-tenant-menu {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#btn-tenant-menu:hover {
  background: var(--text-accent);
  color: white;
  border-color: var(--text-accent);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

#btn-tenant-menu:active {
  transform: translateY(1px);
}

/* Admin Tenant Switcher styles */
.tenants-list-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.tenant-select-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-align: left;
}

.tenant-select-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tenant-select-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--text-accent);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.tenant-card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tenant-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.tenant-card-schema {
  font-size: 11px;
  color: var(--text-dimmed);
  font-family: monospace;
}

.tenant-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.tenant-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tenant-status-indicator.active {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.tenant-status-indicator.inactive {
  background-color: #94a3b8;
}


/* Image input styling */
.camera-upload-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.image-preview-square {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: rgba(0,0,0,0.25);
}

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

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

.toast {
  padding: 14px 22px;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Toggle Switch styling */
.switch-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
}

.switch-glow input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  transition: .3s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}

.switch-glow input:checked + .switch-slider {
  background-color: var(--text-accent);
}

.switch-glow input:checked + .switch-slider:before {
  transform: translateX(18px);
}

/* Authentication Screen (Showstopper design) */
.auth-wrapper {
  min-height: 100vh;
  width: 100vw;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.18) 0%, transparent 45%);
}

.auth-card {
  max-width: 420px;
  width: 90%;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: rgba(10, 15, 30, 0.65);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  animation: authFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.icon-bolt-neon {
  font-size: 26px;
  color: #fff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
}

.auth-form input {
  padding-top: 14px;
  padding-bottom: 14px;
}

.auth-toggle-mode button {
  color: var(--text-accent);
  background: transparent;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* Spinner Loader Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neon-spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  border-top-color: var(--text-accent);
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Flex layout utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-center-vertical {
  display: flex;
  align-items: center;
}

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

.flex-center-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.flex-column-layout {
  display: flex;
  flex-direction: column;
}

.flex-column-layout.gap-2 {
  gap: 8px;
}

/* General Layout utilities */
.w-full { width: 100%; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mr-2 { margin-right: 8px; }
.p-5 { padding: 20px; }
.border-top-glow { border-top: 1px solid var(--border-glass-bright); }
.border-none { border: none !important; }
.text-dimmed { color: var(--text-dimmed); }
.text-accent { color: var(--text-accent); }
.text-success { color: var(--color-success); }
.text-amber { color: var(--color-warning); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.input-huge { font-size: 20px !important; font-weight: 700; text-align: center; }
.total-big { font-size: 32px; font-weight: 800; color: var(--color-success); }

/* Responsive adjustments */
@media (max-width: 992px) {
  body {
    height: auto !important;
    overflow: auto !important;
  }
  .app-layout {
    height: auto !important;
    min-height: 100vh;
  }
  .main-content {
    height: auto !important;
    overflow: visible !important;
  }
  .content-body {
    height: auto !important;
    overflow: visible !important;
    padding: 16px !important;
  }
  .pos-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .pos-cart-panel {
    height: 450px;
  }
  .claw-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .claw-debug-panel {
    height: 250px;
  }
  .table-scrollable {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-height: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding: 16px;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .btn-toggle-sidebar {
    display: block;
  }
  .content-header {
    padding: 0 16px;
  }
}

/* 
  =========================================
  THERMAL RECEIPT PRINT STYLES (58mm Target)
  =========================================
*/
.thermal-print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  
  .thermal-print-area, .thermal-print-area * {
    visibility: visible;
  }
  
  .thermal-print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10pt;
    line-height: 1.2;
    color: #000;
    background: #fff;
    padding: 2mm;
  }
  
  .receipt-header {
    text-align: center;
    margin-bottom: 4mm;
  }
  
  .receipt-logo {
    max-width: 40mm;
    max-height: 40mm;
    margin-bottom: 2mm;
    filter: grayscale(1);
  }
  
  .receipt-divider {
    border-top: 1px dashed #000;
    margin: 2mm 0;
  }
  
  .receipt-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .receipt-table td {
    padding: 1mm 0;
    font-size: 9pt;
  }
  
  .receipt-text-right {
    text-align: right;
  }
  
  .receipt-footer {
    text-align: center;
    margin-top: 5mm;
    font-size: 8pt;
  }
}
