/* ═══════════════════════════════════════════════════════════════════════
   NOVAPP MOBILE — ULTRA-PREMIUM DESIGN SYSTEM
   Apple-Level • Glassmorphism • NovaRide Brand Identity
   ═══════════════════════════════════════════════════════════════════════ */

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

/* ═══════════ CSS VARIABLES — NOVARIDE BRAND ═══════════ */
:root {
  /* Base Blacks */
  --void: #000000;
  --obsidian: #050505;
  --carbon: #0a0a0a;
  --charcoal: #101010;
  --graphite: #151515;
  --slate: #1a1a1a;
  --steel: #222222;

  /* Nova Green Spectrum */
  --nova: #10b981;
  --nova-bright: #34d399;
  --nova-light: #6ee7b7;
  --nova-subtle: rgba(16, 185, 129, 0.12);
  --nova-glow: rgba(16, 185, 129, 0.35);
  --nova-ultra-subtle: rgba(16, 185, 129, 0.06);

  /* Semantic Colors */
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.12);
  --info: #3b82f6;
  --info-subtle: rgba(59, 130, 246, 0.12);
  --success: #10b981;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --text-muted: rgba(255, 255, 255, 0.25);

  /* Glassmorphism */
  --glass: rgba(255, 255, 255, 0.03);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(16, 185, 129, 0.25);
  --blur: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(16,185,129,0.25);
  --shadow-glow-strong: 0 0 60px rgba(16,185,129,0.4), 0 0 120px rgba(16,185,129,0.15);

  /* Spacing */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-height: 72px;
  --header-height: 64px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ═══════════ RESET & BASE ═══════════ */
*, *::before, *::after { 
  margin: 0; padding: 0; box-sizing: border-box; 
}

html { 
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow: hidden;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--obsidian);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  margin: 0;
  overscroll-behavior: none;
}

/* Premium selection */
::selection { background: var(--nova); color: var(--void); }

/* Hide scrollbar but allow scrolling */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ═══════════ APP SHELL ═══════════ */
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

/* Background ambient glow */
#app::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(16,185,129,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════ HEADER ═══════════ */
.app-header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  padding-top: calc(8px + var(--safe-top));
  min-height: var(--header-height);
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-title-container {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-transform: uppercase;
}

.header-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--nova);
  margin-left: 1.2rem;
  margin-top: -2px;
  text-transform: uppercase;
}

.header-sync {
  display: flex;
}

.header-sync.syncing svg {
  animation: spin 1s linear infinite;
  color: var(--nova);
}

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--nova), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  box-shadow: 0 0 0 2px var(--obsidian), 0 0 0 3px rgba(16,185,129,0.3);
}

/* ═══════════ MAIN CONTENT AREA ═══════════ */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  position: relative;
  z-index: 1;
}

.page {
  display: none;
  padding: 16px 16px calc(var(--tab-height) + 16px + var(--safe-bottom));
  min-height: 100%;
  animation: pageIn 0.35s var(--ease) forwards;
}

.page.active {
  display: block;
}

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

/* ═══════════ TAB BAR — iOS PREMIUM ═══════════ */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: var(--tab-height);
  padding-bottom: var(--safe-bottom);
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.25s var(--ease);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
  color: var(--nova);
}

/* Active indicator glow line */
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--nova);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 2px 12px var(--nova-glow);
}

.tab-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.3s var(--spring);
}

.tab-item.active .tab-icon {
  transform: scale(1.15);
}

.tab-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Tab badge */
.tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}

/* ═══════════ GLASSMORPHISM CARDS ═══════════ */
.glass-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  padding: 20px;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

/* Premium top highlight */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.glass-card:active {
  transform: scale(0.98);
  border-color: var(--glass-border-hover);
}

/* ═══════════ KPI HERO CARD ═══════════ */
.kpi-hero {
  position: relative;
  background: linear-gradient(145deg, rgba(16,185,129,0.08) 0%, rgba(16,185,129,0.02) 100%);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--r-2xl);
  padding: 24px;
  overflow: hidden;
}

.kpi-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.kpi-hero .kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nova);
  margin-bottom: 8px;
}

.kpi-hero .kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.kpi-hero .kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.kpi-trend.up { background: var(--nova-subtle); color: var(--nova-bright); }
.kpi-trend.down { background: var(--danger-subtle); color: var(--danger); }

/* ═══════════ KPI MINI CARDS ═══════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.kpi-mini {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 16px;
  overflow: hidden;
}

.kpi-mini .kpi-icon {
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 12px;
  width: fit-content;
  white-space: nowrap;
}

.kpi-icon.green { background: var(--nova-subtle); color: var(--nova); }
.kpi-icon.red { background: var(--danger-subtle); color: var(--danger); }
.kpi-icon.amber { background: var(--warning-subtle); color: var(--warning); }
.kpi-icon.blue { background: var(--info-subtle); color: var(--info); }

.kpi-mini .kpi-mini-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.kpi-mini .kpi-mini-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.kpi-mini .kpi-mini-sub {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ═══════════ SECTION HEADERS ═══════════ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 14px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.section-action {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--nova);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--nova-ultra-subtle);
  border: none;
  transition: all 0.2s var(--ease);
}

.section-action:active { transform: scale(0.95); }

/* ═══════════ LIST ITEMS ═══════════ */
.list-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s var(--ease);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.list-item:last-child { border-bottom: none; }
.list-item:active { background: rgba(255,255,255,0.03); }

.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

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

.list-item-subtitle {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.list-item-right {
  text-align: right;
  flex-shrink: 0;
}

.list-item-amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.list-item-meta {
  font-size: 0.62rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ═══════════ BADGES ═══════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success { background: var(--nova-subtle); color: var(--nova-bright); }
.badge-danger { background: var(--danger-subtle); color: var(--danger); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-info { background: var(--info-subtle); color: var(--info); }
.badge-neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* ═══════════ PILL TABS (Premium Segmented Control) ═══════════ */
.pill-tabs-container {
  position: relative;
  margin-bottom: 20px;
}

/* Gradient masks for scroll indicators */
.pill-tabs-container::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, var(--obsidian));
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.pill-tabs-container.has-overflow::after { opacity: 1; }

.pill-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.pill-tabs::-webkit-scrollbar { display: none; }

.pill-tab {
  flex: 1;
  min-width: fit-content;
  padding: 8px 16px;
  border: none;
  background: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  scroll-snap-align: start;
}

.pill-tab.active {
  background: var(--nova);
  color: #000;
  box-shadow: 0 4px 12px var(--nova-glow);
  transform: scale(1.02);
}

.pill-tab:not(.active):active {
  background: rgba(255,255,255,0.06);
}

/* ═══════════ SEARCH BAR ═══════════ */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.25s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--nova);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
  background: rgba(255,255,255,0.05);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ═══════════ DONUT CHART ═══════════ */
.donut-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
}

.donut-chart {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  margin-left: -4px;
}

.donut-legend {
  flex: 1;
  min-width: 0;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.donut-legend-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}

.donut-legend-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

/* ═══════════ TVA MODULE CARDS ═══════════ */
.tva-card {
  text-align: center;
  padding: 24px 16px;
}

.tva-card .tva-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.tva-card .tva-amount {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ═══════════ MONTH SELECTOR ═══════════ */
.month-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.month-selector button {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.month-selector button:active { transform: scale(0.9); }

.month-selector .month-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 120px;
  text-align: center;
}

/* ═══════════ FILTER CHIPS ═══════════ */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.filter-chip {
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.filter-chip.active {
  background: var(--nova-subtle);
  border-color: rgba(16,185,129,0.3);
  color: var(--nova-bright);
}

/* ═══════════ STOCK INDICATOR ═══════════ */
.stock-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stock-dot.ok { background: var(--nova); box-shadow: 0 0 6px var(--nova-glow); }
.stock-dot.low { background: var(--warning); box-shadow: 0 0 6px rgba(245,158,11,0.4); }
.stock-dot.out { background: var(--danger); box-shadow: 0 0 6px rgba(239,68,68,0.4); }

.stock-qty {
  font-size: 0.72rem;
  font-weight: 600;
}

/* ═══════════ EMPTY STATE ═══════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ═══════════ PRODUCT CARDS & GRID ═══════════ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.product-card {
  background: var(--charcoal);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.2s var(--ease);
}

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

.product-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--carbon);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

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

.thumb-emoji-fallback {
  opacity: 0.25;
}

.product-info {
  padding: 12px 14px 14px;
}

.product-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.product-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.product-stock {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* ═══════════ PRODUCT DETAIL — APPLE-LEVEL ═══════════ */
.product-sheet {
  padding-bottom: 120px;
}

.product-hero {
  position: relative;
  width: 100%;
  height: 280px;
  background: var(--carbon);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--obsidian), transparent);
  pointer-events: none;
}

.product-sheet-header {
  padding: 0 24px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.product-sheet-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.product-sheet-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.15;
}

.product-sheet-ref {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  margin-bottom: 32px;
}

/* — Pricing row — */
.pd-price-row {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--charcoal);
}

.pd-price-cell {
  flex: 1;
  padding: 18px 12px;
  text-align: center;
  position: relative;
}

.pd-price-cell + .pd-price-cell::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255,255,255,0.06);
}

.pd-price-cell {
  background: none;
  border: none;
}

.pd-price-cell + .pd-price-cell {
  border-left: 1px solid rgba(255,255,255,0.06);
}

.pd-price-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.pd-price-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.pd-price-cell.--accent .pd-price-value {
  color: #10b981; /* Neon Green */
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* — Section divider — */
.pd-section {
  padding: 0 24px;
  margin-bottom: 32px;
}

.pd-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* — Specs grid (Borderless & Minimal) — */
.pd-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 24px;
  column-gap: 12px;
  background: none;
  border-radius: 0;
  overflow: visible;
  margin: 0 24px 32px;
}

.pd-spec {
  padding: 0;
  background: none;
  text-align: left;
}

.pd-spec-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f59e0b; /* Amber/Gold for key specs */
  margin-bottom: 4px;
}

.pd-spec-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* — Info rows (Minimalist List) — */
.pd-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pd-info-row:last-child { border-bottom: none; }

.pd-info-key {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.pd-info-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* — Stock indicator — */
.pd-stock-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 20px 24px;
  margin: 0 24px 32px;
  background: var(--charcoal);
  border-radius: var(--r-lg);
}

.pd-stock-cell {
  text-align: center;
}

.pd-stock-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pd-stock-lbl {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* — Stats row — */
.pd-stats-row {
  display: flex;
  gap: 12px;
  padding: 0 24px;
  margin-bottom: 32px;
}

.pd-stat {
  flex: 1;
  padding: 18px 12px;
  background: var(--charcoal);
  border-radius: var(--r-lg);
  text-align: center;
}

.pd-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pd-stat-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.stock-history-card {
  background: rgba(16,185,129,0.05);
  border: 1px solid rgba(16,185,129,0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

/* ═══════════ PULL TO REFRESH ═══════════ */
.ptr-indicator {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--carbon);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s var(--ease);
}

.ptr-indicator.visible { opacity: 1; top: 12px; }

.ptr-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--nova);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ═══════════ LOGIN SCREEN ═══════════ */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px 24px;
  background: var(--obsidian);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(16,185,129,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--nova), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow-strong);
  position: relative;
  z-index: 1;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 36px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-input {
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.25s var(--ease);
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  user-select: auto;
  -webkit-user-select: auto;
}

.login-input:focus {
  border-color: var(--nova);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.login-input::placeholder { color: var(--text-muted); }

.login-btn {
  padding: 16px;
  background: var(--nova);
  color: #000;
  border: none;
  border-radius: var(--r-lg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}

.login-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}

.login-error {
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  display: none;
}

.login-error.show { display: block; }

/* ═══════════ DETAIL / MODAL VIEW ═══════════ */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  background: var(--obsidian);
  animation: slideUp 0.35s var(--ease) forwards;
}

.detail-overlay.active { display: flex; }

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

.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  padding-top: calc(14px + var(--safe-top));
  background: rgba(5,5,5,0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.detail-back {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.detail-back:active { transform: scale(0.9); }

.detail-title {
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
}

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

/* ═══════════ SPARKLINE / MINI CHART ═══════════ */
.sparkline-container {
  height: 36px;
  margin-top: 8px;
  position: relative;
}

.sparkline-svg {
  width: 100%;
  height: 100%;
}

/* ═══════════ ANIMATED COUNTER ═══════════ */
.counter-animated {
  display: inline-block;
  transition: opacity 0.3s var(--ease);
}

/* ═══════════ SKELETON LOADING ═══════════ */
.skeleton-box {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.03) 25%, 
    rgba(255,255,255,0.06) 50%, 
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--r-sm);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.skeleton-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}


/* ═══════════ MORE SHEET & BACKDROP ═══════════ */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.more-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #050505;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(40px + var(--safe-bottom));
  z-index: 250;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.more-sheet.active {
  transform: translateY(0);
}

.more-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  margin: -8px auto 24px;
}

.more-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.more-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.more-sheet-item:active { transform: scale(0.95); background: rgba(255,255,255,0.06); }

.more-icon { font-size: 1.6rem; }
.more-label { 
  font-size: 0.7rem; 
  font-weight: 600; 
  color: var(--text-secondary);
  text-align: center;
}

/* ═══════════ PAGINATION (Apple-Level) ═══════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0 32px;
  margin-top: 12px;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.page-btn.active {
  background: var(--nova);
  color: #000;
  border-color: var(--nova);
  box-shadow: 0 4px 15px var(--nova-glow);
}

.page-btn:active { transform: scale(0.9); }

.page-btn.disabled {
  opacity: 0.2;
  pointer-events: none;
}

.page-gap {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 4px;
}

/* ═══════════ PROFESSIONAL GREETING ═══════════ */
.greeting {
  margin-bottom: 20px;
  padding: 4px 0;
}

.greeting-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

.greeting-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

/* ═══════════ STAGGERED REVEAL (Subtle) ═══════════ */
.reveal-item {
  opacity: 0;
  transform: translateY(8px);
  animation: revealItem 0.4s var(--ease) forwards;
}

.reveal-item:nth-child(1) { animation-delay: 0.02s; }
.reveal-item:nth-child(2) { animation-delay: 0.06s; }
.reveal-item:nth-child(3) { animation-delay: 0.10s; }
.reveal-item:nth-child(4) { animation-delay: 0.14s; }
.reveal-item:nth-child(5) { animation-delay: 0.18s; }
.reveal-item:nth-child(6) { animation-delay: 0.22s; }

@keyframes revealItem {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════ PROFESSIONAL LIST AVATARS ═══════════ */
.list-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* Status pill — more professional */
.status-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r-full);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.status-paid { background: rgba(16,185,129,0.1); color: #34d399; }
.status-pending { background: rgba(245,158,11,0.1); color: #fbbf24; }
.status-open { background: rgba(239,68,68,0.1); color: #f87171; }
.status-progress { background: rgba(59,130,246,0.1); color: #60a5fa; }
.status-done { background: rgba(16,185,129,0.1); color: #34d399; }

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-item { opacity: 1; transform: none; }
}
