/* ==========================================================================
   VERISTOCK PRO WEB — Master Design System (Material 3 & Glassmorphism)
   Design Constitution v2.0 Compliant
   ========================================================================== */

:root, [data-theme="light"] {
  /* Surface & Background Hierarchy — Calm Light Theme (Default) */
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-surface-card: #FFFFFF;
  --bg-surface-glass: rgba(255, 255, 255, 0.92);
  --bg-surface-hover: #E2E8F0;
  --bg-input: #FFFFFF;

  /* Curated Brand Accent Palettes */
  --primary: #2563EB;
  --primary-glow: rgba(37, 99, 235, 0.18);
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --cyan-accent: #0891B2;
  --indigo-accent: #4F46E5;

  /* Semantic Feedback */
  --success: #059669;
  --success-glow: rgba(5, 150, 105, 0.18);
  --warning: #D97706;
  --warning-glow: rgba(217, 119, 6, 0.18);
  --danger: #DC2626;
  --danger-glow: rgba(220, 38, 38, 0.18);
  --purple: #7C3AED;

  /* Typography & Neutral Content */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --border-subtle: #E2E8F0;
  --border-focus: rgba(37, 99, 235, 0.5);
  --border-glass: rgba(0, 0, 0, 0.08);

  /* Radius & Shadows */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);
  --shadow-primary: 0 4px 14px var(--primary-glow);
  --shadow-success: 0 4px 14px var(--success-glow);

  /* Spacing Scale System (4px / 8px Rhythm) */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 40px;
  --space-4xl: 48px;

  /* Typography Scale System */
  --font-size-3xs: 9px;
  --font-size-2xs: 10px;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 13px;
  --font-size-md: 14px;
  --font-size-lg: 15px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;

  /* Layout dimensions */
  --sidebar-width: 260px;
  --topbar-height: 68px;
}

[data-theme="dark"] {
  /* Surface & Background Hierarchy — AMOLED Night Dark Theme */
  --bg-app: #080C16;
  --bg-surface: #0E1526;
  --bg-surface-elevated: #162038;
  --bg-surface-card: rgba(22, 32, 56, 0.75);
  --bg-surface-glass: rgba(18, 26, 46, 0.85);
  --bg-surface-hover: rgba(30, 43, 74, 0.8);
  --bg-input: rgba(11, 17, 31, 0.9);

  /* Curated Brand Accent Palettes */
  --primary: #3B82F6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --primary-light: #60A5FA;
  --primary-dark: #1D4ED8;
  --cyan-accent: #06B6D4;
  --indigo-accent: #6366F1;

  /* Semantic Feedback */
  --success: #10B981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #F59E0B;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --danger: #EF4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --purple: #A855F7;

  /* Typography & Neutral Content */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);
  --border-glass: rgba(255, 255, 255, 0.12);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 0 24px var(--primary-glow);
  --shadow-success: 0 0 24px var(--success-glow);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(8, 145, 178, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.02) 0%, transparent 50%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] body {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
}

h1, h2, h3, h4, h5, .brand-font {
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface-elevated);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ==========================================================================
   App Boot Splash Overlay (Zero-Panic Instant Loading Screen)
   ========================================================================== */

.app-boot-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.boot-splash-card {
  text-align: center;
  max-width: 440px;
  width: 90%;
  padding: 32px 24px;
}

.boot-logo-container {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-logo-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  animation: bootPulse 2s infinite ease-in-out;
}

.boot-logo-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-primary);
  position: relative;
  z-index: 2;
}

.boot-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.boot-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 28px;
}

.boot-progress-track {
  width: 260px;
  height: 5px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  margin: 0 auto 14px;
  overflow: hidden;
  position: relative;
}

.boot-progress-bar {
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan-accent));
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
  position: relative;
}

.boot-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: bootShimmer 1.5s infinite;
}

.boot-status-msg {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  min-height: 20px;
  transition: color 0.2s ease;
}

@keyframes bootPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes bootShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================================================
   App Layout: Sidebar & Main Container
   ========================================================================== */

#app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
}

.sidebar-brand {
  height: var(--topbar-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--cyan-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-primary);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.brand-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan-accent);
  letter-spacing: 0.1em;
  margin-top: -2px;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sidebar Nav Search */
.sidebar-search-wrap {
  position: relative;
  margin: 0 4px 10px;
  display: flex;
  align-items: center;
}

.sidebar-search-input {
  width: 100%;
  padding: 8px 28px 8px 30px;
  font-size: var(--font-size-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.sidebar-search-input:focus {
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.sidebar-search-icon {
  position: absolute;
  left: 9px;
  font-size: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.sidebar-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.sidebar-search-clear:hover {
  color: var(--text-primary);
}

/* Collapsible Nav Groups */
.nav-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-xs);
  padding: 8px 10px 4px;
  transition: background 0.15s ease;
}

.nav-group-header:hover {
  background: var(--bg-surface-hover);
}

.nav-group-header .menu-category-label {
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.group-chevron {
  font-size: 11px;
  color: var(--text-dim);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  line-height: 1;
}

.nav-group.collapsed .group-chevron {
  transform: rotate(-90deg);
}

.nav-group.collapsed .nav-group-items {
  display: none;
}

.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-category-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  padding: 14px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16) 0%, rgba(6, 182, 212, 0.08) 100%);
  color: var(--primary-light);
  border-color: rgba(59, 130, 246, 0.35);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.nav-link .nav-icon {
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.nav-link .nav-tag {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-light);
  font-weight: 600;
}

.nav-link .nav-tag.live {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link .nav-tag.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.app-main {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Topbar */
.app-topbar {
  height: var(--topbar-height);
  background: var(--bg-surface-glass);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  backdrop-filter: blur(20px);
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.tenant-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.tenant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-status-beacon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

/* View Container */
.app-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ==========================================================================
   Buttons, Inputs, and Cards
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563EB);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: var(--shadow-success);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #F87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

/* Glassmorphic Cards */
.card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.card-sm {
  padding: var(--space-base);
}

.card-flush {
  padding: 0;
}

/* Navigation Tabs Component */
.nav-tab-bar {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  padding-bottom: var(--space-2xs);
  align-items: center;
}

.btn-tab {
  padding: var(--space-sm) var(--space-base);
  border: none;
  background: none;
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  user-select: none;
}

.btn-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.btn-tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

/* Settings Danger Tab — Prominent Destructive Boundary Guard */
.btn-tab-danger {
  color: var(--danger);
  border: 1px dashed rgba(239, 68, 68, 0.4);
  border-bottom: 2px solid transparent;
  background: rgba(239, 68, 68, 0.05);
  margin-left: auto;
  border-radius: var(--radius-sm);
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
}

.btn-tab-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-tab-danger.active {
  border-bottom-color: var(--danger);
  background: var(--danger-glow);
  color: var(--danger);
  border-color: var(--danger);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Metric KPI Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.stat-box.success::before { background: var(--success); }
.stat-box.warning::before { background: var(--warning); }
.stat-box.cyan::before { background: var(--cyan-accent); }

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.stat-subtitle {
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ==========================================================================
   Data Tables (KYC Register, Ledger, Inventory)
   ========================================================================== */

.table-responsive-container,
.table-wrapper {
  overflow-x: auto;
  width: 100%;
  display: block;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-card);
}

.table-responsive-container::-webkit-scrollbar,
.table-wrapper::-webkit-scrollbar,
div[style*="overflow-x: auto"]::-webkit-scrollbar,
div[style*="overflow-x:auto"]::-webkit-scrollbar {
  height: 8px;
}

.table-responsive-container::-webkit-scrollbar-track,
.table-wrapper::-webkit-scrollbar-track,
div[style*="overflow-x: auto"]::-webkit-scrollbar-track,
div[style*="overflow-x:auto"]::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

.table-responsive-container::-webkit-scrollbar-thumb,
.table-wrapper::-webkit-scrollbar-thumb,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb,
div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.table-responsive-container::-webkit-scrollbar-thumb:hover,
.table-wrapper::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x: auto"]::-webkit-scrollbar-thumb:hover,
div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.data-table th {
  background: var(--bg-surface-elevated);
  padding: 13px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

/* Sticky Actions Column — Pin Actions & Edit to the right edge so they never get cut off */
.data-table th.actions-col,
.data-table td.actions-col {
  position: sticky;
  right: 0;
  background: var(--bg-surface-card);
  z-index: 5;
  box-shadow: -8px 0 12px rgba(0, 0, 0, 0.08);
  text-align: right;
  white-space: nowrap;
}

.data-table th.actions-col {
  background: var(--bg-surface-elevated);
  z-index: 6;
}

.data-table tbody tr:hover td.actions-col {
  background: var(--bg-surface-hover);
}

[data-theme="dark"] .data-table td.actions-col {
  background: #0E1526;
  box-shadow: -8px 0 14px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .data-table th.actions-col {
  background: #162038;
}

[data-theme="dark"] .data-table tbody tr:hover td.actions-col {
  background: #1E2B4A;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.28);
}

[data-theme="dark"] .badge-success {
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .badge-warning {
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .badge-primary {
  color: #93C5FD;
  border-color: rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .badge-purple {
  color: #D8B4FE;
  border-color: rgba(168, 85, 247, 0.35);
}

/* Evidence Indicator Dots */
.evidence-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.evidence-dot {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-dim);
  cursor: help;
}

.evidence-dot.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 16, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.modal-lg {
  max-width: 900px;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface-elevated);
}

/* ==========================================================================
   Responsive Shell: Off-Canvas Sidebar for Tablet / Mobile
   ========================================================================== */

.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.6);
  backdrop-filter: blur(2px);
  z-index: 45;
}

@media (max-width: 960px) {
  .sidebar-toggle-btn {
    display: flex;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }

  #app-container.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  #app-container.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .app-topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .topbar-left {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .tenant-badge {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .tenant-badge strong,
  .tenant-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sync-status-beacon span:last-child {
    display: none;
  }

  .app-viewport {
    padding: 16px;
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .app-topbar {
    padding: 0 10px;
  }

  .tenant-badge {
    max-width: 150px;
  }

  /* Hide topbar branch switcher on small phones; it moves to sidebar */
  #shopSwitcherSelect {
    display: none;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Show sidebar branch switcher only on mobile (≤ 960px) */
@media (max-width: 960px) {
  #sidebarBranchSwitcherWrap {
    display: block !important;
  }
}
@media (min-width: 961px) {
  #sidebarBranchSwitcherWrap {
    display: none !important;
  }
}

/* ==========================================================================
   Mobile Modal — Bottom Sheet Pattern (≤ 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    border-radius: 18px 18px 0 0;
    max-height: 92vh;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .modal-body {
    padding: 14px 12px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-footer .btn {
    flex: 1;
    min-width: 120px;
  }

  .modal-box.modal-lg {
    max-width: 100%;
  }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Quick POS — Mobile Bottom-Sheet Cart (≤ 768px)
   ========================================================================== */
.pos-cart-toggle-handle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border-glass);
  touch-action: none;
  user-select: none;
}

.pos-cart-handle-bar {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-glass);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .pos-layout {
    flex-direction: column !important;
    height: auto !important;
    position: relative;
    padding-bottom: 64px; /* Space for fixed cart handle */
  }

  .pos-product-grid {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-y: auto;
    max-height: 60vh;
  }

  .pos-cart-panel {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 75vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0 !important;
    z-index: 200;
    transform: translateY(calc(100% - 58px));
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  }

  .pos-cart-panel.cart-expanded {
    transform: translateY(0);
  }

  .pos-cart-toggle-handle {
    display: flex;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   Repair Kanban — Horizontal Scroll Snap (Touch Friendly)
   ========================================================================== */
.kanban-board {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  display: flex;
  gap: 16px;
}

.kanban-column {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ==========================================================================
   Onboarding Wizard — Step Indicators Minimum 44x44px Touch Target
   ========================================================================== */
.wizard-step-dot,
.step-indicator,
.onboarding-step-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ==========================================================================
   Hardware / Camera & Signature Canvas
   ========================================================================== */

.camera-container {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  background: black;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-target-overlay {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 70%;
  border: 2px dashed var(--cyan-accent);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  color: var(--cyan-accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.signature-pad-box {
  width: 100%;
  height: 160px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #0D1322;
  position: relative;
}

.signature-canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.signature-clear-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

/* Photo Grid in KYC Detail */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.photo-card {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 10px;
  color: var(--text-primary);
  text-align: center;
}

/* ==========================================================================
   Toast Notification System (P4-TASK-03)
   ========================================================================== */
#toastContainer {
  position: fixed;
  top: calc(var(--topbar-height) + 12px);
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  animation: toastSlideIn 0.25s ease-out forwards;
  transition: opacity 0.25s, transform 0.25s;
}

.toast-item.toast-success {
  border-left: 4px solid var(--success);
}

.toast-item.toast-error {
  border-left: 4px solid var(--danger);
}

.toast-item.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-item.toast-info {
  border-left: 4px solid var(--primary);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Loading Skeleton & Shimmer States (P4-TASK-04)
   ========================================================================== */
.shimmer-box {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmerAnim 1.6s infinite ease-in-out;
  border-radius: var(--radius-sm);
}

.shimmer-row {
  height: 38px;
  margin: 8px 0;
  width: 100%;
}

.shimmer-stat {
  height: 80px;
  width: 100%;
  border-radius: var(--radius-md);
}

@keyframes shimmerAnim {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   Responsive & Mobile Drawer Navigation (P5-TASK-04)
   ========================================================================== */

.sidebar-toggle-btn {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.7);
  backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Tablet & Mobile Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
  .sidebar-toggle-btn {
    display: flex;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }

  #app-container.sidebar-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  }

  #app-container.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile Small Screen Breakpoint (<= 640px) */
@media (max-width: 640px) {
  .app-topbar {
    padding: 0 14px;
    height: 60px;
  }

  #app-viewport {
    padding: 16px 12px;
  }

  .stat-grid {
    grid-template-columns: 1fr !important;
  }

  .page-title {
    font-size: 18px !important;
  }

  .modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto !important;
  }

  .data-table th, 
  .data-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* ==========================================================================
   Kanban Pipeline & Workshop Styling (Phase 2)
   ========================================================================== */
.filter-pill, .war-filter-pill {
  white-space: nowrap;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill.active, .war-filter-pill.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.kanban-board::-webkit-scrollbar {
  height: 8px;
}

.kanban-board::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

.kanban-cards-container::-webkit-scrollbar {
  width: 5px;
}

.kanban-cards-container::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.job-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.job-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-secondary {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ONBOARDING & INDUSTRY SELECTION WIZARD (DESIGN CONSTITUTION v3.0 PARITY)
   ───────────────────────────────────────────────────────────────────────────── */

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease-out;
}

.onboarding-card {
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  background: #121A2F;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(26, 86, 219, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.onboarding-header {
  padding: 24px 32px 18px;
  background: linear-gradient(180deg, rgba(22, 31, 54, 0.95) 0%, rgba(18, 26, 47, 0.85) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-brand .brand-badge {
  display: inline-block;
  background: rgba(26, 86, 219, 0.2);
  color: #60A5FA;
  border: 1px solid rgba(26, 86, 219, 0.4);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.onboarding-brand h2 {
  font-size: 20px;
  font-weight: 800;
  color: #F8FAFC;
  margin: 0 0 4px;
}

.onboarding-brand p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* Stepper Indicator */
.onboarding-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 12px;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1A233A;
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.step-node.active .step-number {
  background: var(--primary);
  border-color: #60A5FA;
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(26, 86, 219, 0.6);
  transform: scale(1.08);
}

.step-node.completed .step-number {
  background: #10B981;
  border-color: #34D399;
  color: #FFFFFF;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.step-node.active .step-label {
  color: #F8FAFC;
  font-weight: 700;
}

.step-node.completed .step-label {
  color: #34D399;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 8px -18px;
  position: relative;
  z-index: 1;
  transition: background 0.3s ease;
}

.step-connector.active {
  background: #10B981;
}

/* Body & Steps */
.onboarding-body {
  padding: 24px 32px;
  overflow-y: auto;
  flex: 1;
}

.wizard-step-pane {
  animation: fadeIn 0.25s ease-out;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0 0 4px;
}

.step-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 20px;
  line-height: 1.4;
}

.mono-field {
  font-family: 'JetBrainsMono', monospace, Consolas, monospace !important;
  letter-spacing: 0.5px;
}

/* Industry Selection Grid */
.industry-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dna-cluster-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px 16px;
}

.dna-cluster-header {
  padding-left: 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.dna-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 6px;
  border-radius: 4px;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.industry-card {
  background: rgba(18, 26, 47, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.industry-card:hover {
  background: rgba(26, 36, 64, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.industry-card.selected {
  background: rgba(26, 86, 219, 0.15);
  border-width: 1.5px;
}

.industry-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.industry-emoji {
  font-size: 22px;
  line-height: 1;
}

.industry-title-block {
  flex: 1;
}

.industry-name {
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.3;
}

.industry-hindi {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.industry-features-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.feature-bullet {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Focus Cards */
.focus-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.focus-card {
  background: rgba(18, 26, 47, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.focus-card:hover {
  background: rgba(26, 36, 64, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.focus-card.selected {
  background: rgba(26, 86, 219, 0.15);
  border-color: var(--primary-light);
  box-shadow: 0 0 16px rgba(26, 86, 219, 0.25);
}

.focus-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(18, 26, 47, 0.3);
}

/* Activity Cards Grid */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.activity-card {
  background: rgba(18, 26, 47, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-card:hover {
  background: rgba(26, 36, 64, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.activity-card.selected {
  background: rgba(26, 86, 219, 0.15);
  border-color: #3B82F6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.activity-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-emoji {
  font-size: 24px;
}

.activity-title {
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.3;
}

.activity-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
}

/* Quick UPI Chips */
.quick-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #93C5FD;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: rgba(26, 86, 219, 0.25);
  border-color: #60A5FA;
  color: #FFFFFF;
}

/* Signature & Logo Pad */
.signature-box {
  background: rgba(14, 21, 38, 0.8);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.signature-canvas {
  background: #0E1526;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
  display: block;
}

.signature-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.signature-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* Help Modal Sheet */
.help-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.help-modal-card {
  width: 100%;
  max-width: 520px;
  background: #161F36;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.help-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.help-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.help-modal-close:hover {
  color: #FFFFFF;
}

/* Accordion */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.accordion-content {
  padding: 14px 4px 4px;
}

/* Footer */
.onboarding-footer {
  padding: 16px 32px;
  background: rgba(14, 21, 38, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 640px) {
  .onboarding-header, .onboarding-body, .onboarding-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .step-label {
    display: none;
  }
  .industry-grid {
    grid-template-columns: 1fr;
  }
}

/* Password Toggle & Multi-Branch Switcher Enhancements */
.btn-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #94A3B8);
  font-size: 14px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  user-select: none;
}

.btn-password-toggle:hover {
  color: #FFFFFF;
}

.branch-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.branch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 💎 Crystal & Agate Multi-Stage Action Hub & Operational Widgets */
.stage-action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .stage-action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stage-action-grid {
    grid-template-columns: 1fr;
  }
}

.stage-action-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.stage-action-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.stage-action-card:active {
  transform: translateY(-1px);
}

.operational-banner-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.operational-banner-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   POS Counter Ergonomics & Touch Controls (UX Hardening)
   ========================================================================== */
.qty-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
  padding: 0;
}

.qty-btn:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.qty-btn:active:not(:disabled) {
  transform: scale(0.92);
  background: var(--primary);
  color: #fff;
}

.qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.qty-value {
  font-size: 14px;
  font-weight: 800;
  min-width: 22px;
  text-align: center;
  color: var(--text-primary);
  font-family: inherit;
}

.pos-grand-total-val {
  font-size: 26px;
  font-weight: 900;
  color: var(--success);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.search-highlight {
  background: rgba(250, 204, 21, 0.35);
  color: inherit;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
}

/* ==========================================================================
   Barcode Scanner Feedback
   ========================================================================== */
.barcode-scan-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  box-shadow: inset 0 0 0 4px var(--primary);
  background: rgba(37, 99, 235, 0.05);
  animation: scanFlashAnim 0.25s ease-out forwards;
}

@keyframes scanFlashAnim {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.01); }
}

/* ==========================================================================
   Unified Date Navigator (Day Book & Reports)
   ========================================================================== */
.date-navigator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 6px;
}

.date-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  transition: all 0.15s ease;
  user-select: none;
}

.date-nav-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
}

.date-display-box {
  min-width: 140px;
  text-align: center;
  cursor: pointer;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
  user-select: none;
}

.date-display-box:hover {
  background: var(--bg-surface-hover);
}

.date-main-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.date-sub-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-today-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.date-today-pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   Mobile Responsive Touch Tables
   ========================================================================== */
@media (max-width: 768px) {
  .data-table {
    min-width: 600px;
  }
  .data-table th, .data-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
  .card [style*="overflow-x:auto"] {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

/* ==========================================================================
   Barcode & Thermal Label Studio Module Styles
   ========================================================================== */
.label-studio-wrap {
  padding: 0 0 40px;
}

.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.studio-title {
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text-main);
}

.studio-icon {
  font-size: 28px;
}

.studio-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.studio-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Preset Pills Bar */
.preset-pills-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.preset-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
}

.preset-pill:hover {
  background: var(--bg-surface-hover, rgba(255, 255, 255, 0.04));
  border-color: var(--primary);
  transform: translateY(-1px);
}

.preset-pill.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.pill-icon {
  font-size: 22px;
}

.pill-text {
  display: flex;
  flex-direction: column;
}

.pill-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.pill-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Studio Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.config-card {
  margin-bottom: 20px;
}

/* Inventory Quick List */
.inventory-quick-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.inventory-quick-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.inventory-quick-item:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}

.quick-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.quick-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.quick-item-action {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-item-price {
  font-size: 13px;
  font-weight: 800;
  color: #10b981;
}

.empty-inventory-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

/* Dynamic Preset Fields */
.preset-field-group {
  margin-top: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
}

.group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-light, #93c5fd);
  margin-bottom: 10px;
  display: block;
}

/* Right Column: Preview Pane */
.preview-card {
  position: sticky;
  top: 80px;
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-controls {
  display: flex;
  background: var(--bg-body);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.zoom-controls button {
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.zoom-controls button.active {
  background: var(--primary);
  color: #fff;
}

.preview-body {
  background: #080c14;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 420px;
}

.label-canvas-viewport {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  overflow: hidden;
}

.label-canvas-zoom-container {
  transition: transform 0.2s ease;
  display: flex;
  justify-content: center;
}

/* Physical Sticker Aesthetics */
.physical-label-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.physical-sticker {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  overflow: hidden;
}

/* 50x25mm Standard Shelf */
.sticker-50x25 {
  width: 188px;
  height: 94px;
  padding: 6px 8px;
}

/* 38x25mm Compact */
.sticker-38x25 {
  width: 144px;
  height: 94px;
  padding: 5px 6px;
}

/* Jewelry Barbell */
.sticker-barbell {
  width: 260px;
  height: 60px;
  padding: 4px 8px;
  flex-direction: row;
  justify-content: space-between;
}

.barbell-left {
  width: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  font-size: 7px;
  line-height: 1.15;
}

.barbell-bridge {
  width: 30px;
  text-align: center;
  color: #999;
  font-size: 8px;
  letter-spacing: -1px;
}

.barbell-right {
  width: 110px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
}

/* Garment Hangtag */
.sticker-hangtag {
  width: 188px;
  height: 260px;
  padding: 12px 10px;
  text-align: center;
}

.st-shop-lg {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.st-brand {
  font-size: 7.5px;
  color: #666;
  text-transform: uppercase;
  margin-top: 1px;
}

.st-line {
  width: 80%;
  height: 1px;
  background: #000;
  margin: 6px auto;
}

.st-prod-title {
  font-size: 9.5px;
  font-weight: 800;
  margin-bottom: 6px;
}

.st-chips {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 6px;
}

.st-chip {
  font-size: 7px;
  font-weight: 700;
  border: 1px solid #000;
  padding: 1px 4px;
  border-radius: 2px;
}

.st-price-card {
  border: 1.5px solid #000;
  padding: 4px 8px;
  border-radius: 4px;
  width: 85%;
  margin: 6px auto;
}

.st-offer {
  font-size: 13px;
  font-weight: 900;
}

.st-tax-line {
  font-size: 6.5px;
  color: #666;
  margin-top: auto;
}

/* Sticker Elements */
.st-shop {
  font-size: 7.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  max-width: 95%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.st-prod {
  font-size: 8px;
  font-weight: 700;
  max-width: 95%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-top: -1px;
}

.st-code-box {
  width: 95%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0;
}

.st-row {
  display: flex;
  justify-content: space-between;
  width: 95%;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.st-mrp {
  font-size: 7.5px;
  color: #555;
  text-decoration: line-through;
  font-weight: 500;
}

.st-price {
  font-size: 9.5px;
  font-weight: 900;
}

.st-purity {
  font-size: 7.5px;
  font-weight: 900;
  color: #b45309;
}

.st-wt {
  font-size: 6.5px;
}

.st-batch {
  font-size: 7.5px;
  color: #444;
}

.st-grade {
  font-size: 7.5px;
  font-weight: 800;
  color: #15803d;
}

/* Multi-Sticker Roll Preview */
.multi-sticker-roll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.roll-perforation {
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 2px;
  user-select: none;
}

/* Driver Compatibility Box */
.driver-compat-box {
  margin-top: 24px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.compat-icon {
  font-size: 16px;
}

.compat-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.compat-text b {
  color: var(--text-main);
}

/* ==========================================================================
   Executive BI & Graphical Analytics Hub Styles
   ========================================================================== */
.bi-analytics-hub-container {
  margin-top: 10px;
}

.bi-grid-2col {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
}

@media (max-width: 992px) {
  .bi-grid-2col {
    grid-template-columns: 1fr !important;
  }
}

.analytics-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.service-pipeline-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  .service-pipeline-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pipeline-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.p-num {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.p-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.aging-bucket-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ab-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.ab-val {
  font-size: 16px;
  font-weight: 900;
  margin-top: 4px;
}

.chart-data-dot:hover {
  r: 7 !important;
  fill: #34d399 !important;
}

/* ==========================================================================
   Store Notifications & Alert Drawer Styles
   ========================================================================== */
.notification-bell-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-surface);
  line-height: 1;
}

.notification-badge.pulse {
  animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Slide-out Backdrop */
.notification-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1050;
  transition: opacity 0.25s ease;
}

/* Slide-out Drawer Panel */
.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1051;
}

.notification-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.02));
}

.drawer-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-header-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.drawer-icon {
  font-size: 18px;
}

.btn-close-drawer {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-close-drawer:hover {
  color: var(--text-main);
}

/* Permission Banner */
.drawer-perm-banner {
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.perm-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-main);
}

.perm-text p {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Tabs */
.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-body);
}

.drawer-tabs .tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-tabs .tab-btn:hover {
  color: var(--text-main);
}

.drawer-tabs .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

/* List */
.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

.drawer-empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.drawer-empty-state h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text-main);
}

.drawer-empty-state p {
  font-size: 12px;
  margin: 0;
}

.drawer-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-item:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.02);
}

.drawer-item.unread {
  border-left: 3.5px solid var(--primary);
  background: rgba(59, 130, 246, 0.04);
}

.drawer-item.urgent {
  border-left: 3.5px solid #ef4444;
}

.item-left-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.item-body {
  flex: 1;
  min-width: 0;
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-time {
  font-size: 10.5px;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-left: 8px;
}

.item-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 6px;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer */
.drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.02));
}






