/* Universal POS SaaS - Production Design System & Theme Engine */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette */
  --bg-base: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #273549;
  --bg-card: rgba(15, 23, 42, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.3);
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --topbar-height: 64px;
  --demobar-height: 0px;
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Visibility Utilities */
.hidden {
  display: none !important;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Top Navigation Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--topbar-height);
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 0 16px var(--accent-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-accent {
  color: var(--accent-cyan);
}

.brand-tagline {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
}

.nav-link-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-link-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.nav-link-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.tenant-selector-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
}

/* Top Nav Dropdown Menus */
.top-nav-dropdown {
  position: relative;
  display: inline-block;
}

.top-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1050;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.top-nav-dropdown-menu.show {
  display: flex;
}

.top-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.top-nav-dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.top-nav-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

.btn-icon-subtle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}

.btn-icon-subtle:hover {
  color: var(--text-primary);
}

/* Demo Environment Bar */
.demo-bar {
  background: #0b111e;
  border-bottom: 1px solid var(--border-subtle);
  height: var(--demobar-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 0.78rem;
}

.demo-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.demo-label {
  color: var(--text-muted);
  font-weight: 600;
}

.demo-role-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demo-role-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.demo-indicators {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse 2s infinite;
}

.pulse-dot.emerald {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Main Content Area */
.main-content {
  min-height: calc(100vh - var(--topbar-height) - var(--demobar-height));
  padding: 0;
}

/* LANDING PAGE STYLES */
.landing-hero {
  padding: 80px 24px 60px;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.4rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.hero-stat-item strong {
  display: block;
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--text-primary);
}

.hero-stat-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Hero Terminal Mockup Card */
.hero-terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(20px);
}

.terminal-card-header {
  background: rgba(30, 41, 59, 0.6);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-card-body {
  padding: 24px;
}

/* Verticals Showcase Section */
.section-wrapper {
  max-width: 1240px;
  margin: 0 auto 80px;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.verticals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.vertical-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.vertical-card:hover, .vertical-card.active {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.vertical-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.vertical-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.vertical-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.vertical-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Architecture Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 18px;
  color: var(--accent-cyan);
}

.feature-card h4 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card.popular {
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px var(--accent-glow);
}

.pricing-card.popular::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.pricing-price {
  font-size: 2.8rem;
  font-family: var(--font-display);
  font-weight: 800;
  margin: 16px 0;
}

.pricing-price span {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  margin: 24px 0 32px;
  flex-grow: 1;
}

.pricing-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li i {
  color: var(--accent-emerald);
}

/* =========================================
   POS TERMINAL VIEW 2.0 (Cashier-First Workstation)
   ========================================= */
.terminal-layout {
  display: grid;
  grid-template-columns: 1fr clamp(380px, 32vw, 470px);
  height: calc(100vh - var(--topbar-height));
  max-height: calc(100vh - var(--topbar-height));
  min-height: 0;
  overflow: hidden;
  background: var(--bg-base);
}

/* Left Pane: Catalog & Cashier Workspace */
.terminal-catalog-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-base);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Secondary POS Cashier Toolbar */
.pos-toolbar {
  padding: 6px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.82rem;
}

.pos-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pos-toolbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.pos-register-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pos-register-pill:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
}

.pos-register-pill.closed {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.pos-toolbar-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pos-toolbar-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.pos-toolbar-btn.pos-support-btn {
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.3);
  color: #25D366;
  font-weight: 600;
}

.pos-toolbar-btn.pos-support-btn:hover {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}

.pos-terminal-support-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-shrink: 0;
  z-index: 5;
}

.pos-terminal-support-strip a {
  transition: all 0.15s ease;
}

.pos-terminal-support-strip a:hover {
  filter: brightness(1.25);
}

/* Dropdowns for Nav & Toolbar */
.top-nav-dropdown {
  position: relative;
  display: inline-block;
}

.top-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  padding: 6px;
  z-index: 1000;
  min-width: 180px;
}

.top-nav-dropdown-menu.show {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
}

.top-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
}

.top-nav-dropdown-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.top-nav-dropdown-item.text-rose {
  color: var(--accent-rose);
}

.top-nav-dropdown-item.text-rose:hover {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
}

.top-nav-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* Primary Product Search Bar */
.catalog-search-bar {
  padding: 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input-wrapper i.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.input-field {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  padding: 9px 50px 9px 38px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-surface-elevated);
}

.search-kbd-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  pointer-events: none;
}

/* Category Filter Strip */
.category-filter-scroll {
  padding: 6px 16px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.4);
  flex-shrink: 0;
  height: 42px;
  align-items: center;
}

.category-filter-scroll::-webkit-scrollbar {
  height: 3px;
}

.category-filter-scroll::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.category-tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-tab-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.category-tab-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* High-Density Catalog Product Grid */
.catalog-products-grid {
  flex: 1 1 0;
  min-height: 0;
  padding: 12px 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  align-content: start;
}

.product-pos-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
}

.product-pos-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.product-pos-card:active {
  transform: scale(0.98);
}

.product-card-img-wrapper {
  height: 90px;
  background: #1e293b;
  position: relative;
  overflow: hidden;
}

.product-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

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

.product-stock-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.product-stock-pill.low-stock {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.product-stock-pill.out-of-stock {
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
}

.product-card-content {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 2px;
}

.product-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}

.product-card-sku {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-price-row {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.product-card-price {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #a5b4fc;
}

.product-card-price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* =========================================
   RIGHT PANE: LIVE REGISTER & CHECKOUT WORKSPACE
   ========================================= */
.terminal-cart-pane {
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  border-left: 1px solid var(--border-subtle);
}

.cart-header {
  flex-shrink: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
}

.cart-header h3 {
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

#pos-customer-bar-mount {
  flex-shrink: 0;
}

.restaurant-order-bar {
  flex-shrink: 0;
}

.cart-customer-bar {
  flex-shrink: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.7);
}

.pos-customer-selected-card {
  padding: 8px 10px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-cust-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
}

/* Scrollable Cart Items Container */
.cart-items-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.5);
}

.cart-items-scroll::-webkit-scrollbar {
  width: 5px;
}

.cart-items-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

.cart-items-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}

.cart-items-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

.cart-empty-state {
  height: 100%;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.cart-empty-state i {
  font-size: 38px;
  margin-bottom: 12px;
  opacity: 0.35;
}

.cart-item-row {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  transition: all 0.15s ease;
}

.cart-item-row:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--bg-surface-hover);
}

.cart-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.cart-item-packaging-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-right: 4px;
}

.cart-item-unit-price {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.qty-control {
  display: flex;
  align-items: center;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: background 0.1s ease;
}

.qty-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.qty-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  width: 28px;
  text-align: center;
}

.cart-item-total {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 58px;
  text-align: right;
  color: #38bdf8;
}

.btn-remove-item {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 3px;
  transition: color 0.15s ease;
}

.btn-remove-item:hover {
  color: var(--accent-rose);
}

/* Pinned Integrated Checkout & Payment Footer */
.cart-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.financial-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.financial-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

.financial-row.grand-total {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 6px;
  margin-top: 2px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.financial-row.grand-total span:last-child {
  color: #38bdf8;
  font-size: 1.35rem;
}

/* Payment Method Selector Grid */
.payment-method-pills {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 2px;
}

.pay-pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 2px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.pay-pill-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.pay-pill-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Quick Tender Chips */
.quick-tender-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
}

.tender-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tender-chip:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Primary Complete Sale CTA */
.btn-complete-sale-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
  width: 100%;
}

.btn-complete-sale-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-complete-sale-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cart-actions-grid {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  margin-top: 4px;
}

/* =========================================
   BUSINESS DASHBOARD & PORTAL
   ========================================= */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--topbar-height) - var(--demobar-height));
}

.dashboard-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-heading {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  margin-top: 12px;
}

.sidebar-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.sidebar-tab-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.sidebar-tab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  font-weight: 600;
}

.dashboard-main-pane {
  padding: 32px;
  background: var(--bg-base);
  overflow-y: auto;
}

/* Dashboard Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-primary);
}

.metric-card.emerald::after { background: var(--accent-emerald); }
.metric-card.amber::after { background: var(--accent-amber); }
.metric-card.cyan::after { background: var(--accent-cyan); }

.metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.metric-card-val {
  font-size: 2rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.metric-card-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Modern Data Tables */
.data-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.data-table th {
  background: rgba(30, 41, 59, 0.4);
  padding: 12px 18px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

/* MODAL SYSTEM */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.modal-lg {
  max-width: 760px;
}

@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

.modal-header h3 {
  font-size: 1.2rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(15, 23, 42, 0.5);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
}

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

/* Fast Terminal PIN Pad */
.pin-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.pin-key {
  height: 56px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: 1.4rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s ease;
}

.pin-key:active {
  background: var(--accent-primary);
  transform: scale(0.96);
}

.pin-display-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  background: transparent;
  transition: all 0.15s ease;
}

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

/* Digital Receipt Paper Preview */
.receipt-paper {
  background: #ffffff;
  color: #111827;
  font-family: var(--font-mono);
  padding: 32px 28px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 380px;
  margin: 0 auto;
  font-size: 0.84rem;
}

.receipt-header-center {
  text-align: center;
  border-bottom: 1px dashed #d1d5db;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.receipt-biz-name {
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.receipt-items-table {
  width: 100%;
  margin: 16px 0;
}

.receipt-items-table td {
  padding: 4px 0;
}

.receipt-totals-table {
  width: 100%;
  border-top: 1px dashed #d1d5db;
  padding-top: 12px;
  margin-top: 12px;
}

.receipt-grand-total {
  font-size: 1.25rem;
  font-weight: 800;
  padding-top: 8px;
}

.receipt-barcode-box {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #d1d5db;
}

.receipt-barcode {
  font-size: 24px;
  letter-spacing: 4px;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.2s ease;
}

.toast.success { border-color: var(--accent-emerald); }
.toast.error { border-color: var(--accent-rose); }

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

/* Modal sizing & table enhancements */
.modal-box.modal-lg {
  max-width: 860px;
  width: 95%;
}
.modal-box.modal-sm {
  max-width: 440px;
}
.data-table-container {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 14px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.filter-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-toolbar .form-control {
  max-width: 260px;
}
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }


/* Print Stylesheet for Physical Thermal Printers & PDF Invoices */
@media print {
  @page {
    margin: 0;
    size: auto;
  }
  body * {
    visibility: hidden;
  }
  .receipt-paper, .receipt-paper *, .invoice-paper, .invoice-paper * {
    visibility: visible;
  }
  .receipt-paper {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0 !important;
    padding: 8px !important;
    box-shadow: none !important;
    color: #000 !important;
    background: #fff !important;
    border-radius: 0 !important;
  }
  .receipt-paper.receipt-58mm {
    width: 58mm !important;
    max-width: 58mm !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }
  .receipt-paper.receipt-80mm {
    width: 80mm !important;
    max-width: 80mm !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }
  .invoice-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 24px !important;
    box-shadow: none !important;
    color: #000 !important;
    background: #fff !important;
  }
}

/* Thermal Receipt & Invoice Preview Layouts */
.receipt-paper {
  background: #ffffff;
  color: #111827;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace, -apple-system;
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  transition: width 0.2s ease;
}
.receipt-paper.receipt-58mm {
  width: 58mm;
  font-size: 0.74rem;
  padding: 12px;
}
.receipt-paper.receipt-80mm {
  width: 80mm;
  font-size: 0.82rem;
  padding: 18px;
}

/* Invoice Paper Styling */
.invoice-paper {
  background: #ffffff;
  color: #111827;
  padding: 32px;
  font-family: 'Inter', sans-serif;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  max-width: 800px;
  margin: 0 auto;
}

/* Camera Barcode Scanner Viewfinder */
.scanner-viewport {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 280px;
  margin: 0 auto 16px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
}
.scanner-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-guide-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 140px;
  border: 2px solid #10b981;
  border-radius: 8px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.scanner-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: laserScan 2s infinite ease-in-out alternate;
}
@keyframes laserScan {
  0% { top: 4px; }
  100% { top: calc(100% - 6px); }
}

/* Split Payment Breakdown Styles */
.split-pay-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--bg-base);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

/* Sub-Navigation Tabs & Inventory Operations Engine */
.subnav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.subnav-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
  white-space: nowrap;
}
.subnav-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.subnav-tab-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 9999px;
}
.status-pill.status-in_stock {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.status-pill.status-low_stock {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.status-pill.status-out_of_stock {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.status-pill.status-in_transit {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}
.status-pill.status-partially_received {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}
.status-pill.status-received {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.status-pill.status-draft {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
}


/* Responsive Media Queries */
@media (max-width: 1024px) {
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin: 0 auto 36px;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .verticals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .terminal-layout {
    grid-template-columns: 1fr 360px;
  }
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 16px;
  }
  .nav-links {
    display: none; /* Mobile navigation toggle */
  }
  .terminal-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .terminal-cart-pane {
    height: 75vh;
    min-height: 480px;
    max-height: 85vh;
  }
  .verticals-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SUPPORT MODE STICKY BANNER
   ========================================================================== */
.support-mode-banner {
  background: linear-gradient(90deg, #92400e, #d97706);
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.support-mode-banner .banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-mode-banner .exit-support-btn {
  background: #ffffff;
  color: #92400e;
  border: none;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-mode-banner .exit-support-btn:hover {
  background: #fef3c7;
  transform: translateY(-1px);
}

/* ==========================================================================
   SAAS LANDING PAGE - FEATURES, 14 INDUSTRIES, HOW IT WORKS & FOOTER
   ========================================================================== */
.saas-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.saas-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.saas-feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.saas-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.saas-feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.saas-feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* 14 Industries Grid */
.saas-industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.saas-industry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.saas-industry-card:hover {
  border-color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.saas-industry-card .industry-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #818cf8;
  margin-bottom: 12px;
}

.saas-industry-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.saas-industry-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* How It Works 6-Step Commercial Flow */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  text-align: center;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Final CTA Section */
.saas-final-cta {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-xl);
  padding: 60px 32px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 80px;
}

.saas-final-cta h2 {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.saas-final-cta p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 32px;
}

/* Professional SaaS Footer */
.saas-footer {
  background: #0b0f17;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 24px 30px;
}

.saas-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) 1.5fr;
  gap: 36px;
  margin-bottom: 48px;
}

.footer-brand .brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #e2e8f0;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-col ul li a:hover {
  color: #818cf8;
}

/* Developer & Support Footer Column */
.footer-dev-col .footer-dev-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.footer-dev-col .footer-dev-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.footer-dev-col .dev-chip {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-dev-col .footer-dev-tagline {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin: 3px 0 0;
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.footer-contact-list li {
  margin-bottom: 9px;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  transition: all 0.2s ease;
  word-break: break-all;
}

.footer-contact-link i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.footer-contact-link:hover {
  color: #fff;
  transform: translateX(2px);
}

.footer-contact-link.footer-wa-link {
  color: #25D366;
  font-weight: 600;
}

.footer-contact-link.footer-wa-link:hover {
  color: #4ade80;
  text-shadow: 0 0 10px rgba(37, 211, 102, 0.4);
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-btn:hover {
  transform: translateY(-2px);
  color: #fff;
}

.footer-social-btn.btn-wa:hover {
  background: #25D366;
  border-color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  color: #fff;
}

.footer-social-btn.btn-mail:hover {
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  color: #fff;
}

.footer-social-btn.btn-web:hover {
  background: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  color: #fff;
}

.footer-social-btn.btn-fb:hover {
  background: #1877F2;
  border-color: #1877F2;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
  color: #fff;
}

.footer-social-btn.btn-in:hover {
  background: #0A66C2;
  border-color: #0A66C2;
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.35);
  color: #fff;
}

/* Footer Bottom Polish */
.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-dot-sep {
  opacity: 0.4;
}

.footer-author-highlight {
  color: #818cf8;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-author-highlight:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.footer-quick-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-pill-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.footer-pill-link.wa:hover {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.4);
}

.footer-pill-link.fb:hover {
  color: #1877F2;
  border-color: rgba(24, 119, 242, 0.4);
}

.footer-pill-link.in:hover {
  color: #0A66C2;
  border-color: rgba(10, 102, 194, 0.4);
}

.footer-pill-link.web:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.footer-pill-link.mail:hover {
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.4);
}

@media (max-width: 1024px) {
  .saas-footer-inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
  .saas-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .saas-footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   PRODUCT & CATALOG MANAGEMENT ENGINE STYLES
   ======================================================== */

.catalog-toolbar-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.catalog-search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.catalog-actions-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.catalog-filter-select {
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.catalog-filter-select:focus {
  border-color: var(--color-primary);
}

.product-thumb-sm {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.product-row-selected {
  background: rgba(99, 102, 241, 0.08) !important;
}

.catalog-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.catalog-page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-tabs-header {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
}

.product-tab-btn {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.product-tab-btn:hover {
  color: var(--text-primary);
}

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

.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.product-gallery-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-base);
}

.product-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-card .gallery-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.product-gallery-card:hover .gallery-actions {
  opacity: 1;
}

.product-gallery-card .primary-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.csv-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-base);
}

.csv-dropzone:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.04);
}

.variant-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 12px;
}

.variant-matrix-table th {
  padding: 8px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
}

.variant-matrix-table td {
  padding: 6px 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.variant-matrix-table input {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.82rem;
}

/* Printable Barcode Label Styles */
.barcode-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 12px;
  background: #fff;
  color: #000;
  border-radius: var(--radius-md);
}

.barcode-label-card {
  border: 1px dashed #cbd5e1;
  padding: 10px;
  text-align: center;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
}

.barcode-label-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 2px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barcode-label-sku {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 4px;
}

.barcode-label-graphic {
  font-family: 'Libre Barcode 39', 'Libre Barcode 128', monospace;
  font-size: 2.2rem;
  letter-spacing: 2px;
  margin: 4px 0;
  user-select: none;
}

.barcode-label-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printable-barcode-container,
  #printable-barcode-container * {
    visibility: visible;
  }
  #printable-barcode-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
}

/* ========================================================================= */
/* POS WEIGHT & DECIMAL KEYPAD SYSTEM (GROCERY & SUPERMARKET)                */
/* ========================================================================= */
.weight-modal-body {
  padding: 24px;
}

.weight-display-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weight-display-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.weight-display-input {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent-emerald);
  background: transparent;
  border: none;
  width: 180px;
  text-align: right;
  outline: none;
}

.weight-unit-tag {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.weight-calc-summary {
  text-align: right;
}

.weight-calc-subtotal {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.quick-weight-chips {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.quick-weight-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.quick-weight-chip:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-hover);
  color: var(--accent-primary);
}

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

.keypad-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  padding: 14px 0;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
  user-select: none;
}

.keypad-btn:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.keypad-btn:active {
  transform: scale(0.97);
}

.keypad-btn.btn-action {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.keypad-btn.btn-action:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* Clothing & Electronics Phase 2 Styles */
.btn-xs {
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ========================================================
   Phase 4: Restaurant, Café & Bakery Design System
   ======================================================== */

/* Order Type Toggle in POS */
.order-type-selector {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.order-type-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.order-type-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Table Floor Plan Grid */
.floor-plan-area {
  margin-bottom: 24px;
}

.floor-area-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
}

.floor-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.restaurant-table-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.restaurant-table-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.restaurant-table-card.status-available {
  border-color: rgba(16, 185, 129, 0.4);
}
.restaurant-table-card.status-available:hover {
  border-color: #10b981;
}

.restaurant-table-card.status-occupied {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.05);
}

.restaurant-table-card.status-reserved {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.05);
}

.restaurant-table-card.status-cleaning {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.05);
}

.table-card-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.table-card-capacity {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* KDS - Kitchen Display System */
.kds-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  overflow-y: auto;
  padding-bottom: 20px;
}

.kds-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.kds-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kds-card-header {
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.kds-card.status-SENT .kds-card-header {
  border-top: 4px solid #ef4444;
}

.kds-card.status-PREPARING .kds-card-header {
  border-top: 4px solid #f59e0b;
}

.kds-card.status-READY .kds-card-header {
  border-top: 4px solid #10b981;
}

.kds-order-num {
  font-weight: 800;
  font-size: 0.95rem;
  font-family: var(--font-mono);
}

.kds-table-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.kds-items-list {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.kds-item-row {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-subtle);
}

.kds-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kds-item-main {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.88rem;
}

.kds-item-modifiers {
  font-size: 0.75rem;
  color: var(--accent-indigo);
  padding-left: 12px;
  margin-top: 2px;
}

.kds-item-notes {
  font-size: 0.75rem;
  color: #ef4444;
  font-style: italic;
  padding-left: 12px;
  margin-top: 2px;
}

.kds-card-footer {
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

/* Modifier Selection Modal */
.modifier-group-block {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modifier-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modifier-group-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.modifier-group-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modifier-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.modifier-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
  user-select: none;
}

.modifier-chip:hover {
  border-color: var(--color-primary);
  background: var(--bg-surface-hover);
}

.modifier-chip.selected {
  border-color: var(--color-primary);
  background: rgba(79, 70, 229, 0.15);
  color: var(--color-primary);
  font-weight: 700;
}

.modifier-chip-price {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-success);
}

/* Custom Bakery Cake Cards */
.cake-orders-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.cake-order-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.cake-order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cake-flavor-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
}

.cake-message-box {
  background: rgba(244, 63, 94, 0.08);
  border-left: 3px solid #f43f5e;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-primary);
}

/* ========================================================
   WHOLESALE + DISTRIBUTION STYLES
   ======================================================== */

.badge-draft { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-confirmed { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-processing { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-ready { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-completed { background: rgba(16, 185, 129, 0.25); color: #059669; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-cancelled { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.badge-pending { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.badge-packing { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.badge-ready-dispatch { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.badge-dispatched { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-delivered { background: rgba(16, 185, 129, 0.2); color: #10b981; }

.credit-alert-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #ef4444;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.delivery-note-paper {
  background: #ffffff;
  color: #111827;
  padding: 36px;
  font-family: 'Inter', -apple-system, sans-serif;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 850px;
  margin: 0 auto;
}

.delivery-note-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.delivery-note-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.delivery-note-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.delivery-note-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
}

.delivery-note-table th,
.delivery-note-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.88rem;
}

.delivery-note-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.delivery-note-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px dashed #cbd5e1;
}

.signature-line {
  border-top: 1px solid #94a3b8;
  padding-top: 8px;
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
}

.wholesale-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ==========================================================================
   OFFLINE & PWA ENGINE UI COMPONENTS
   ========================================================================== */
.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-left: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.connection-badge:hover {
  transform: scale(1.03);
}

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

.status-offline {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  animation: pulse-border 2s infinite;
}

.status-syncing {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.status-synced {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-error {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.badge-dot.badge-online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.badge-dot.badge-offline {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.offline-mode-banner {
  background: linear-gradient(90deg, #b91c1c, #991b1b);
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.offline-mode-banner .banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.offline-mode-banner .banner-info i {
  font-size: 1.1rem;
}

.offline-receipt-notice {
  margin: 12px 0;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 6px;
  color: #b45309;
  font-size: 0.78rem;
  text-align: center;
  font-weight: 600;
}

/* =====================================================================
   SaaS PLANS, SUBSCRIPTIONS & BILLING STYLES
   ===================================================================== */

/* Subscription Status Warning Banner */
.subscription-status-banner {
  background: linear-gradient(90deg, #b45309 0%, #d97706 100%);
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 9998;
}

.subscription-status-banner .banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Interval Switcher (Monthly vs Yearly) */
.billing-interval-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  margin: 20px auto 36px;
  gap: 4px;
}

.billing-interval-btn {
  padding: 8px 20px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.billing-interval-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.discount-pill {
  background: #10b981;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Public Pricing Comparison Grid */
.saas-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 16px;
  align-items: stretch;
}

.saas-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.saas-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border-color: rgba(99, 102, 241, 0.4);
}

.saas-plan-card.featured {
  border: 2px solid var(--color-primary);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.06) 0%, var(--bg-card) 30%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.featured-ribbon {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 9999px;
}

.saas-plan-card .plan-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.saas-plan-card .plan-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 20px;
  min-height: 40px;
}

.saas-plan-card .plan-price-box {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.saas-plan-card .plan-price-amount {
  font-size: 2.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.saas-plan-card .plan-price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.saas-plan-card .plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-plan-card .plan-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.saas-plan-card .plan-features-list li i.fa-check {
  color: #10b981;
  font-size: 0.9rem;
}

.saas-plan-card .plan-features-list li i.fa-xmark {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 0.9rem;
}

/* Usage Meter Cards with Progress Bars */
.usage-meters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.usage-meter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

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

.usage-meter-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.usage-meter-count {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.progress-track {
  height: 8px;
  width: 100%;
  background: var(--bg-base);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.progress-fill.green { background: #10b981; }
.progress-fill.amber { background: #f59e0b; }
.progress-fill.red { background: #ef4444; }

/* Status Badges */
.badge-trialing { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-grace { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-suspended { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-cancelled { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* SaaS Invoice Printable View */
.saas-invoice-preview {
  background: #ffffff;
  color: #0f172a;
  padding: 40px;
  border-radius: var(--radius-lg);
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-sans);
}

.saas-invoice-preview table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.saas-invoice-preview th,
.saas-invoice-preview td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.saas-invoice-preview th {
  background: #f8fafc;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #64748b;
}

/* ==========================================================================
   COMMERCIAL SAAS LAUNCH ENHANCEMENTS
   ========================================================================== */

/* Demo Banner */
.demo-mode-banner {
  animation: slideDown 0.3s ease;
}

.demo-mode-banner.hidden,
.offline-mode-banner.hidden,
.support-mode-banner.hidden,
.subscription-status-banner.hidden {
  display: none !important;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* FAQ Accordion */
.saas-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.faq-item:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.03);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  gap: 12px;
}

.faq-answer {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Interactive Industry Cards */
.saas-industry-interactive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.saas-industry-interactive-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.industry-features-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

.industry-features-list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.industry-features-list li i {
  color: var(--color-success);
  font-size: 0.75rem;
}

/* Demo Showcase Tabs */
.demo-showcase-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.demo-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

/* First-Run Checklist Card */
.first-run-checklist-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.checklist-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.checklist-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-step:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.06);
}

.checklist-step.completed {
  opacity: 0.8;
  border-color: var(--color-success);
}

.checklist-step.completed i {
  color: var(--color-success);
}

/* In-App Help Center Modal */
.help-center-dialog {
  max-width: 860px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.help-topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.help-topic-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.help-topic-card:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.05);
}

/* ==========================================================================
   HANDWRITTEN REGISTER → POS MIGRATION / OPENING BALANCES STYLES
   ========================================================================== */
.migration-wizard-dialog {
  max-width: 960px;
  width: 96%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.migration-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}

.migration-type-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.migration-type-card:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.04);
}

.migration-type-card.selected {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.migration-type-card input[type="checkbox"] {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.migration-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.migration-nav-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.migration-nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-base);
}

.migration-nav-btn.active {
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 2px solid var(--color-primary);
}

/* Notebook Fast Entry Card */
.notebook-entry-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(16, 185, 129, 0.03));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.notebook-form-row {
  display: grid;
  grid-template-columns: 140px 1.5fr 140px 1fr 100px;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .notebook-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.notebook-item-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.notebook-item-badge.customer { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.notebook-item-badge.supplier { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.notebook-item-badge.cash { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.notebook-item-badge.bank { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.notebook-item-badge.inventory { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

/* CSV Dropzone */
.migration-csv-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.migration-csv-dropzone:hover,
.migration-csv-dropzone.dragover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.05);
}

/* KPI Summary Cards */
.migration-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.migration-kpi-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.migration-kpi-card .kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.migration-kpi-card .kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.migration-confirm-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 18px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* POS Customer Workflow Styles */
.pos-cust-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface-elevated, #1e293b);
  border: 1px solid var(--border-subtle, #334155);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
}

.pos-cust-option:hover {
  background: var(--bg-surface-hover, rgba(255, 255, 255, 0.06));
}

.pos-customer-selected-card {
  transition: border-color 0.2s ease;
}

.pos-customer-selected-card:hover {
  border-color: var(--color-primary, #6366f1);
}

/* WhatsApp Integration & History Styles */
.btn-whatsapp {
  background: #25D366 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.btn-whatsapp:hover {
  background: #20bd5a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-outline {
  background: transparent !important;
  color: #25D366 !important;
  border: 1px solid #25D366 !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.btn-whatsapp-outline:hover {
  background: rgba(37, 211, 102, 0.12) !important;
}

.product-subnav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-surface, #1e293b);
  border-bottom: 1px solid var(--border-subtle, #334155);
}

.product-subnav-pills .subnav-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border-subtle, #334155);
  background: var(--bg-base, #0f172a);
  color: var(--text-secondary, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.migration-nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-base);
}

.migration-nav-btn.active {
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 2px solid var(--color-primary);
}

/* Notebook Fast Entry Card */
.notebook-entry-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(16, 185, 129, 0.03));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.notebook-form-row {
  display: grid;
  grid-template-columns: 140px 1.5fr 140px 1fr 100px;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .notebook-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.notebook-item-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.notebook-item-badge.customer { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.notebook-item-badge.supplier { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.notebook-item-badge.cash { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.notebook-item-badge.bank { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.notebook-item-badge.inventory { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

/* CSV Dropzone */
.migration-csv-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.migration-csv-dropzone:hover,
.migration-csv-dropzone.dragover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.05);
}

/* KPI Summary Cards */
.migration-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.migration-kpi-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.migration-kpi-card .kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.migration-kpi-card .kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.migration-confirm-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 18px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* POS Customer Workflow Styles */
.pos-cust-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface-elevated, #1e293b);
  border: 1px solid var(--border-subtle, #334155);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
}

.pos-cust-option:hover {
  background: var(--bg-surface-hover, rgba(255, 255, 255, 0.06));
}

.pos-customer-selected-card {
  transition: border-color 0.2s ease;
}

.pos-customer-selected-card:hover {
  border-color: var(--color-primary, #6366f1);
}

/* WhatsApp Integration & History Styles */
.btn-whatsapp {
  background: #25D366 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.btn-whatsapp:hover {
  background: #20bd5a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-outline {
  background: transparent !important;
  color: #25D366 !important;
  border: 1px solid #25D366 !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.btn-whatsapp-outline:hover {
  background: rgba(37, 211, 102, 0.12) !important;
}

.product-subnav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-surface, #1e293b);
  border-bottom: 1px solid var(--border-subtle, #334155);
}

.product-subnav-pills .subnav-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border-subtle, #334155);
  background: var(--bg-base, #0f172a);
  color: var(--text-secondary, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.product-subnav-pills .subnav-tab-btn.active {
  background: var(--color-primary, #6366f1);
  color: #ffffff;
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Receipt Author Credit & Balance Highlight Styles */
.receipt-author-footer {
  margin-top: 12px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #475569;
  text-align: center;
  line-height: 1.4;
}

.receipt-author-footer strong {
  color: #0f172a;
  font-weight: 700;
}

.receipt-due-box {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid #fca5a5;
  border-radius: 4px;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.receipt-due-box strong {
  color: #dc2626;
  font-size: 0.88rem;
}

.receipt-image-preview-wrapper img {
  display: block;
  max-width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
