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

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --primary-bg: rgba(13, 148, 136, 0.1);
  --primary-bg-2: rgba(13, 148, 136, 0.05);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --success: #22c55e;
  --warning: #f59e0b;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  /* Theme colors - will be overridden in dark mode */
  --bg-primary: var(--gray-50);
  --bg-secondary: var(--white);
  --bg-tertiary: var(--gray-100);
  --text-primary: var(--gray-800);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --border-color: var(--gray-200);
  --card-bg: var(--white);
  --input-bg: var(--white);
  --modal-bg: var(--white);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --card-bg: #1e293b;
  --input-bg: #334155;
  --modal-bg: #1e293b;
  --gray-50: #0f172a;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-800: #f1f5f9;
  --gray-900: #f8fafc;
  --white: #1e293b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-logo {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.screen {
  min-height: 100vh;
  animation: fadeIn 0.3s ease-out;
}

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

.hidden {
  display: none !important;
}

/* ============================================
   LANDING PAGE
   ============================================ */

#landing-screen {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.landing-logo .icon-logo {
  width: 28px;
  height: 28px;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-visual-label {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 18px 32px;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(13, 148, 136, 0.3);
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl), 0 0 60px rgba(13, 148, 136, 0.4);
}

.btn-arrow {
  transition: transform 0.2s;
}

.btn-hero:hover .btn-arrow {
  transform: translateX(4px);
}

.hero-note {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* Hero Visual */
.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  perspective: 1000px;
}

.hero-phone {
  width: 280px;
  height: 560px;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
  border-radius: 50px;
  padding: 10px;
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.5),
    0 30px 60px -30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  animation: phoneFloat 6s ease-in-out infinite;
  position: relative;
  transform-style: preserve-3d;
}

/* Phone frame details */
.hero-phone::before {
  content: '';
  position: absolute;
  right: -3px;
  top: 120px;
  width: 3px;
  height: 35px;
  background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
  border-radius: 0 3px 3px 0;
}

.hero-phone::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 180px;
  width: 3px;
  height: 70px;
  background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
  border-radius: 0 3px 3px 0;
}

@keyframes phoneFloat {
  0%, 100% {
    transform: translateY(0) rotateX(2deg) rotateY(-5deg);
  }
  25% {
    transform: translateY(-10px) rotateX(0deg) rotateY(-3deg);
  }
  50% {
    transform: translateY(-20px) rotateX(-2deg) rotateY(0deg);
  }
  75% {
    transform: translateY(-10px) rotateX(0deg) rotateY(-3deg);
  }
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
  border-radius: 42px;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Dynamic Island / Notch */
.phone-screen::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Status bar indicator */
.phone-screen::after {
  content: '9:41';
  position: absolute;
  top: 16px;
  left: 28px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  z-index: 5;
}

.demo-box {
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
  padding: 60px 20px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-qr {
  width: 110px;
  height: 110px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 20px;
  box-shadow:
    0 4px 15px rgba(13, 148, 136, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1);
  animation: qrPulse 3s ease-in-out infinite;
  position: relative;
}

.demo-qr::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--primary);
  border-radius: calc(var(--radius-lg) + 4px);
  opacity: 0;
  animation: qrScan 3s ease-in-out infinite;
}

@keyframes qrPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes qrScan {
  0%, 100% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

.qr-svg {
  width: 100%;
  height: 100%;
  color: var(--gray-800);
}

.demo-items {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.demo-item {
  background: white;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(100%);
  opacity: 0;
  animation: itemSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border-left: 3px solid var(--primary);
}

.demo-item:nth-child(1) { animation-delay: 0.8s; }
.demo-item:nth-child(2) { animation-delay: 1.1s; }
.demo-item:nth-child(3) { animation-delay: 1.4s; }

@keyframes itemSlideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Home indicator */
.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--gray-300);
  border-radius: 4px;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.floating-card {
  position: absolute;
  background: white;
  padding: 12px 18px;
  border-radius: var(--radius-xl);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.floating-card .icon {
  width: 20px;
  height: 20px;
}

.card-1 {
  top: 15%;
  left: -5%;
  animation: floatCard1 4s ease-in-out infinite;
  transform-origin: center center;
}

.card-2 {
  bottom: 20%;
  right: 0%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  animation: floatCard2 4s ease-in-out infinite;
  box-shadow:
    0 10px 40px rgba(13, 148, 136, 0.3),
    0 4px 12px rgba(13, 148, 136, 0.2);
}

@keyframes floatCard1 {
  0%, 100% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }
  50% {
    transform: translateY(-15px) rotate(3deg) scale(1.02);
  }
}

@keyframes floatCard2 {
  0%, 100% {
    transform: translateY(0) rotate(3deg) scale(1);
  }
  50% {
    transform: translateY(-12px) rotate(-2deg) scale(1.03);
  }
}

/* Features Section */
.features {
  padding: 80px 24px;
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 50px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.feature-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  transition: var(--transition);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  position: relative;
}

.feature-card:hover {
  background: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-bg);
}

.feature-step {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.4);
}

.feature-icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--primary-bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--primary);
}

.feature-icon-wrap .icon {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-800);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Use Cases */
.usecases {
  padding: 80px 24px;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.usecase-card {
  background: var(--white);
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.usecase-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-bg);
}

.usecase-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--primary);
}

.usecase-icon .icon {
  width: 24px;
  height: 24px;
}

.usecase-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gray-800);
}

.usecase-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* CTA Section */
.cta-section {
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.cta-section .btn-hero {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.cta-section .btn-hero:hover {
  background: var(--gray-50);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* FAQ Section */
.faq-section {
  padding: 80px 24px;
  background: var(--gray-50);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
}

.faq-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Landing Footer */
.landing-footer {
  padding: 40px 24px;
  background: var(--gray-900);
  color: var(--gray-400);
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-brand .icon-logo {
  width: 24px;
  height: 24px;
  color: var(--primary-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* ============================================
   AUTH SCREEN
   ============================================ */

#auth-screen {
  background: linear-gradient(135deg, var(--primary-bg-2) 0%, var(--gray-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-back-landing {
  position: absolute;
  top: 24px;
  left: 24px;
  background: none;
  border: none;
  color: var(--gray-600);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-back-landing:hover {
  color: var(--primary);
}

.auth-container {
  max-width: 420px;
  width: 100%;
  padding: 40px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.auth-container h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

/* Onglets auth */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--gray-700);
}

.auth-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.subtitle {
  color: var(--gray-500);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input {
  padding: 16px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--gray-50);
  transition: var(--transition);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

.auth-form button {
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.auth-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 14px;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-weight: 500;
}

/* ============================================
   DASHBOARD & MAIN APP
   ============================================ */

/* Main Header */
.main-header {
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.scan-btn-header {
  background: var(--primary-bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}

.scan-btn-header:hover {
  background: var(--primary);
  color: white;
}

/* Detail Header */
.detail-header {
  background: var(--white);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
}

.btn-icon {
  background: var(--gray-100);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-600);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
  z-index: 1000;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  min-width: 64px;
}

.bottom-nav-item .icon {
  width: 24px;
  height: 24px;
}

.bottom-nav-item:hover {
  color: var(--gray-700);
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-scan {
  position: relative;
  color: white !important;
  width: 48px;
  height: 48px;
  min-width: 48px;
  margin-top: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.bottom-nav-scan .icon {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 2;
}

.bottom-nav-scan span {
  display: none;
}

.bottom-nav-scan::before {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

/* FAB visible above bottom nav */
#main-screen .fab {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 16px));
  right: 16px;
  z-index: 100;
}

/* Global Search View */
.search-global-container {
  padding: 20px 16px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

.search-global-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-global-input-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

#global-search-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--white);
  transition: var(--transition);
}

#global-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

.global-search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.search-result-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-bg);
}

.search-result-card:active {
  background: var(--gray-50);
}

.search-result-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-result-icon.box {
  background: var(--primary-bg);
  color: var(--primary);
}

.search-result-icon.item {
  background: var(--gray-100);
  color: var(--gray-500);
}

.search-result-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-content p {
  font-size: 0.8rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}

.search-no-results .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--gray-300);
}

/* Hide old FAB menu since we have bottom nav */
.fab-container {
  display: none;
}

.btn-text {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-text:hover {
  color: var(--gray-700);
}

/* Summary Bar */
.summary-bar {
  background: var(--gray-50);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
}

.summary-stat strong {
  color: var(--gray-800);
  font-weight: 600;
}

.summary-sep {
  color: var(--gray-300);
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.toolbar .search-container {
  flex: 1;
}

.toolbar #search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--gray-50);
}

.toolbar #search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  min-width: 130px;
}

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

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

/* Profile Menu */
.profile-menu {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.profile-btn:hover {
  background: var(--gray-200);
}

.profile-avatar {
  font-size: 1rem;
}

.profile-name {
  color: var(--gray-700);
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  font-size: 0.7rem;
  color: var(--gray-400);
}

.profile-dropdown {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0));
  right: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  min-width: 200px;
  z-index: 1001;
  overflow: hidden;
  animation: dropdownUp 0.15s ease-out;
}

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

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.profile-dropdown-user {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.profile-dropdown-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.profile-dropdown-section {
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin: 8px 0;
  padding: 12px 0 4px;
}

.profile-dropdown-section-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px;
  margin-bottom: 4px;
}

.profile-dropdown-section-desc {
  font-size: 0.8rem;
  color: var(--gray-500);
  padding: 0 16px;
  margin-bottom: 8px;
}

#username-display {
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Dashboard Stats */
/* Dashboard stats removed - now in header */

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

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

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

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: #dc2626;
}

/* Kebab Menu */
.kebab-menu {
  position: relative;
}

.kebab-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  -webkit-tap-highlight-color: transparent;
}

.kebab-btn:hover {
  background: var(--gray-200);
}

.kebab-btn:active {
  background: var(--gray-300);
}

.kebab-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
  animation: dropdownIn 0.15s ease-out;
}

.kebab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.kebab-item:hover {
  background: var(--gray-50);
}

.kebab-item-danger {
  color: var(--danger);
}

.kebab-item-danger:hover {
  background: var(--danger-bg);
}

.btn-back {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--gray-600);
  padding: 8px 0;
  font-weight: 500;
  transition: var(--transition);
}

.btn-back:hover {
  color: var(--primary);
}

.btn-outline-small {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-small:hover {
  background: var(--primary);
  color: white;
}

/* Search */
.search-container {
  position: relative;
  flex: 1;
}

#search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--gray-50);
  transition: var(--transition);
}

#search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 24px;
  right: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  border: 1px solid var(--gray-200);
}

.search-result-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--primary-bg);
}

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

.search-result-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius);
}

.search-result-item .no-image {
  width: 52px;
  height: 52px;
  background: var(--gray-200);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
}

.search-result-info {
  flex: 1;
}

.search-result-info h4 {
  font-size: 0.95rem;
  margin-bottom: 3px;
  font-weight: 600;
}

.search-result-info p {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.search-section-title {
  padding: 10px 18px;
  background: var(--gray-50);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation */
.main-nav {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.nav-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-500);
  position: relative;
}

.nav-btn:hover {
  color: var(--gray-700);
  background: var(--gray-50);
}

.nav-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
  box-shadow: var(--shadow-md);
}

/* Views */
.view {
  padding: 20px 24px;
}

/* Boxes Grid */
.boxes-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.box-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 12px;
}

.box-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-200);
}

.box-card:active {
  background: var(--gray-50);
}

.box-card-content {
  flex: 1;
  min-width: 0;
}

.box-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--gray-800);
}

.box-card .description {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.box-card .item-preview {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.box-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.box-card .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.box-card .location-badge {
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.box-card-chevron {
  color: var(--gray-300);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.box-card:hover .box-card-chevron {
  color: var(--gray-400);
}

/* FAB Button */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  font-size: 1.8rem;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

.fab.open {
  transform: rotate(45deg);
  background: var(--gray-700);
}

/* FAB Menu */
.fab-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fabMenuIn 0.2s ease-out;
}

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

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.fab-menu-item:hover {
  background: var(--gray-50);
  transform: translateX(-4px);
}

.fab-menu-icon {
  font-size: 1.1rem;
}

/* Empty States */
.empty-state-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px dashed var(--gray-300);
}

.empty-illustration {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.8;
}

.empty-state-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-800);
}

.empty-state-card p {
  color: var(--gray-500);
  margin-bottom: 16px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
}

.empty-state-small {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}

.empty-state-small p {
  margin-bottom: 16px;
}

/* Tip Block */
.tip-block {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #fcd34d;
}

.tip-block .tip-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.tip-block p {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.5;
}

.tip-block strong {
  color: var(--gray-800);
}

/* Locations */
.locations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 20px) + 80px);
}

.location-card {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  cursor: pointer;
}

.location-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-200);
}

.location-card:active {
  background: var(--gray-50);
}

.location-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.location-card-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.location-card-info {
  flex: 1;
  min-width: 0;
}

.location-card-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.location-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-chevron {
  color: var(--gray-300);
  font-size: 1.2rem;
}

.location-kebab {
  position: relative;
}

.kebab-btn-small {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.kebab-btn-small:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.location-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  min-width: 150px;
  z-index: 100;
  overflow: hidden;
}

.location-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.location-menu button:hover {
  background: var(--gray-50);
}

.location-menu button.danger {
  color: var(--danger);
}

.location-menu button.danger:hover {
  background: var(--danger-bg);
}

/* Box Detail */
.box-detail {
  padding: 24px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 20px));
}

.box-info {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.box-info h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.box-info .description {
  color: var(--gray-500);
  margin-bottom: 12px;
}

.box-info .location-link {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.box-info .location-link:hover {
  background: var(--primary);
  color: white;
}

.qr-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.qr-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}

.qr-toggle:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.qr-toggle-icon {
  font-size: 1rem;
}

.qr-toggle-text {
  flex: 1;
  text-align: left;
}

.qr-chevron {
  font-size: 0.7rem;
  color: var(--gray-400);
  transition: transform 0.2s;
}

.qr-chevron.open {
  transform: rotate(180deg);
}

.qr-content {
  padding: 0 16px 20px;
  text-align: center;
  animation: slideDown 0.2s ease-out;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.qr-hint {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin: 16px 0;
}

#qr-code-img {
  max-width: 160px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: white;
  padding: 8px;
}

.qr-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.qr-buttons .btn-secondary {
  font-size: 0.8rem;
  padding: 8px 12px;
}

.items-section {
  background: var(--white);
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 20px) + 80px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.section-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-800);
}

.section-header h3 .separator {
  color: var(--gray-300);
}

.section-header h3 #items-count,
.section-header h3 #items-label {
  color: var(--gray-500);
  font-weight: 500;
}

.btn-add-item {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.btn-add-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.items-search {
  margin-bottom: 20px;
}

.items-search input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.items-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.item-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.3s ease-out backwards;
  position: relative;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.item-card:hover .item-card-overlay {
  opacity: 1;
}

.item-card-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 ratio */
  overflow: hidden;
}

.item-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card .no-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.item-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 148, 136, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.item-card-overlay::after {
  content: '👁️';
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.item-card-info {
  padding: 10px 12px;
}

.item-card-info h4 {
  font-size: 0.85rem;
  margin-bottom: 2px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card-info p {
  font-size: 0.75rem;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Item quantity badge */
.item-qty-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 2;
}

/* Item category */
.item-category {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

/* Item tags */
.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.item-tag {
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 10px;
}

.item-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.item-qty {
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 500;
}

.item-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Form row for quantity/category */
.form-row {
  display: flex;
  gap: 12px;
}

.form-col {
  flex: 1;
}

.input-quantity {
  width: 100%;
}

/* Public View */
.public-header {
  background: var(--white);
  padding: 16px 24px;
  box-shadow: var(--shadow);
}

.public-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.public-view {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.public-view h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: 700;
}

.public-view > .description {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.public-view > .location {
  text-align: center;
  margin-bottom: 30px;
}

.public-view > .location span {
  background: var(--primary-bg);
  color: var(--primary-dark);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
}

.public-search {
  margin-bottom: 24px;
}

.public-search input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: var(--transition);
}

/* Onboarding */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.onboarding-modal {
  background: var(--white);
  border-radius: var(--radius-2xl);
  max-width: 380px;
  width: 100%;
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-2xl);
  animation: modalIn 0.4s ease-out;
}

.onboarding-step {
  animation: fadeIn 0.3s ease-out;
}

/* ============================================
   HERO ANIMATION - 12 SECONDES EN 3 SCÈNES
   ============================================ */

/* ==========================================
   NOUVELLE ANIMATION HERO - 3 SCÈNES
   ========================================== */

.hero-anim-container {
  width: 380px;
  height: 480px;
  position: relative;
  background: linear-gradient(160deg, #f0fdf9 0%, #e6f7f4 50%, #d1f0ea 100%);
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(13, 148, 136, 0.2),
    0 10px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.anim-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== SCÈNE 0: Objets dans carton ========== */
.anim-scene-0 {
  animation: scene0Visibility 16s ease-in-out infinite;
}
@keyframes scene0Visibility {
  0%, 20% { opacity: 1; z-index: 3; }
  24%, 100% { opacity: 0; z-index: 1; }
}

/* Carton ouvert (Scène 0) */
.carton-ouvert {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 100px;
  animation: cartonOuvertAppear 16s ease-out infinite;
}
@keyframes cartonOuvertAppear {
  0% { transform: translateX(-50%) scale(0.8) translateY(30px); opacity: 0; }
  8% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
  22% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

/* Face avant du carton ouvert */
.carton-front-ouvert {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(180deg, #D4A574 0%, #C4956A 100%);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Côté droit */
.carton-right-ouvert {
  position: absolute;
  bottom: 0;
  right: -18px;
  width: 20px;
  height: 80px;
  background: linear-gradient(180deg, #B8895E 0%, #A67C52 100%);
  border-radius: 0 4px 4px 0;
  transform: skewY(-12deg);
  transform-origin: bottom left;
}

/* Rabats ouverts */
.carton-rabat {
  position: absolute;
  top: 5px;
  width: 48%;
  height: 35px;
  background: linear-gradient(180deg, #E8C9A0 0%, #D4A574 100%);
  transform-origin: bottom center;
}
.rabat-gauche {
  left: 2%;
  border-radius: 4px 4px 0 0;
  transform: perspective(80px) rotateX(-55deg);
}
.rabat-droite {
  right: 2%;
  border-radius: 4px 4px 0 0;
  transform: perspective(80px) rotateX(-50deg);
}

/* Objets qui tombent dans le carton - DERRIÈRE le carton */
.objet-falling {
  position: absolute;
  font-size: 28px;
  z-index: -1;
}
.objet-icon {
  display: block;
}

.objet-1 {
  left: 50%;
  animation: objetFall1 16s ease-in infinite;
}
@keyframes objetFall1 {
  0%, 3% { transform: translate(-50%, -80px) rotate(-10deg); opacity: 0; }
  5% { transform: translate(-50%, -80px) rotate(-10deg); opacity: 1; }
  12% { transform: translate(-50%, 40px) rotate(5deg); opacity: 1; }
  14% { transform: translate(-50%, 50px); opacity: 0; }
  100% { opacity: 0; }
}

.objet-2 {
  left: 40%;
  animation: objetFall2 16s ease-in infinite;
}
@keyframes objetFall2 {
  0%, 6% { transform: translate(-50%, -70px) rotate(15deg); opacity: 0; }
  8% { transform: translate(-50%, -70px) rotate(15deg); opacity: 1; }
  15% { transform: translate(-50%, 45px) rotate(-5deg); opacity: 1; }
  17% { transform: translate(-50%, 55px); opacity: 0; }
  100% { opacity: 0; }
}

.objet-3 {
  left: 60%;
  animation: objetFall3 16s ease-in infinite;
}
@keyframes objetFall3 {
  0%, 9% { transform: translate(-50%, -75px) rotate(-20deg); opacity: 0; }
  11% { transform: translate(-50%, -75px) rotate(-20deg); opacity: 1; }
  18% { transform: translate(-50%, 42px) rotate(10deg); opacity: 1; }
  20% { transform: translate(-50%, 52px); opacity: 0; }
  100% { opacity: 0; }
}

.objet-4 {
  left: 50%;
  animation: objetFall4 16s ease-in infinite;
}
@keyframes objetFall4 {
  0%, 12% { transform: translate(-50%, -85px) rotate(10deg); opacity: 0; }
  14% { transform: translate(-50%, -85px) rotate(10deg); opacity: 1; }
  21% { transform: translate(-50%, 38px) rotate(-8deg); opacity: 1; }
  23% { transform: translate(-50%, 48px); opacity: 0; }
  100% { opacity: 0; }
}

/* Check scène 0 */
.check-0 {
  bottom: 160px;
  left: 50%;
  animation: check0Appear 16s ease-out infinite;
}
@keyframes check0Appear {
  0%, 19% { transform: translateX(-50%) scale(0); opacity: 0; }
  21% { transform: translateX(-50%) scale(1.3); opacity: 1; }
  23% { transform: translateX(-50%) scale(1); opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

/* ========== SCÈNE 1: Carton + Main ========== */
.anim-scene-1 {
  animation: scene1Visibility 16s ease-in-out infinite;
}
@keyframes scene1Visibility {
  0%, 23% { opacity: 0; z-index: 1; }
  26%, 46% { opacity: 1; z-index: 3; }
  50%, 100% { opacity: 0; z-index: 1; }
}

/* Carton fermé (Scène 1) */
.carton-ferme {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 100px;
  animation: cartonFermeAppear 16s ease-out infinite;
}
@keyframes cartonFermeAppear {
  0%, 24% { transform: translateX(-50%) scale(0.8) translateY(30px); opacity: 0; }
  30% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
  46% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

/* Face avant carton fermé */
.carton-front-ferme {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(180deg, #D4A574 0%, #C4956A 100%);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Côté droit carton fermé */
.carton-right-ferme {
  position: absolute;
  bottom: 0;
  right: -18px;
  width: 20px;
  height: 80px;
  background: linear-gradient(180deg, #B8895E 0%, #A67C52 100%);
  border-radius: 0 4px 4px 0;
  transform: skewY(-12deg);
  transform-origin: bottom left;
}

/* Rabats fermés */
.rabat-ferme {
  position: absolute;
  top: 5px;
  width: 50%;
  height: 20px;
  background: linear-gradient(180deg, #E8C9A0 0%, #D4A574 100%);
  transform-origin: bottom center;
}
.rabat-ferme-gauche {
  left: 0;
  border-radius: 3px 0 0 0;
  transform: perspective(60px) rotateX(45deg);
}
.rabat-ferme-droite {
  right: 0;
  border-radius: 0 3px 0 0;
  transform: perspective(60px) rotateX(45deg);
}

/* Ancien carton - caché */
.carton {
  display: none;
}

.carton-face { position: absolute; }

.carton-front {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(165deg, #D4A574 0%, #C4956A 50%, #B8895E 100%);
  border-radius: 8px;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.carton-tape {
  position: absolute;
  top: 50%;
  left: 20%;
  right: 20%;
  height: 12px;
  background: linear-gradient(180deg, #C4956A 0%, #A67C52 100%);
  transform: translateY(-50%);
  border-radius: 3px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.carton-top {
  top: 2px;
  left: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(180deg, #E8C9A0 0%, #D4A574 100%);
  border-radius: 4px 4px 0 0;
  transform: perspective(200px) rotateX(40deg);
  transform-origin: bottom center;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.4),
    0 -3px 6px rgba(0,0,0,0.1);
}

.carton-right {
  bottom: 0;
  right: -25px;
  width: 30px;
  height: 100px;
  background: linear-gradient(180deg, #B8895E 0%, #A67C52 100%);
  border-radius: 0 8px 8px 0;
  transform: skewY(-18deg);
  transform-origin: bottom left;
}

/* Main avec QR */
.main-qr {
  position: absolute;
  top: 30px;
  right: 70px;
  width: 90px;
  height: 130px;
  animation: mainDescend 16s ease-in-out infinite;
}
@keyframes mainDescend {
  0%, 27% { transform: translateY(-100px) rotate(15deg); opacity: 0; }
  33% { transform: translateY(0) rotate(8deg); opacity: 1; }
  38% { transform: translateY(70px) rotate(0deg); opacity: 1; }
  42% { transform: translateY(70px) rotate(0deg); opacity: 1; }
  46% { transform: translateY(-60px) rotate(-10deg); opacity: 0; }
  100% { opacity: 0; }
}

.main-svg {
  width: 100%;
  height: 130px;
  filter: drop-shadow(3px 6px 10px rgba(0,0,0,0.25));
  transform: scaleY(-1);
}

.qr-dans-main {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  animation: qrDansMain 16s ease-in-out infinite;
}
@keyframes qrDansMain {
  0%, 26% { opacity: 0; }
  28%, 38% { opacity: 1; }
  41% { opacity: 0; }
  100% { opacity: 0; }
}

.qr-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
}

/* QR collé sur le carton */
.qr-colle {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  animation: qrColler 16s ease-out infinite;
}
@keyframes qrColler {
  0%, 38% { transform: translateX(-50%) scale(0); opacity: 0; }
  41% { transform: translateX(-50%) scale(1.2); opacity: 1; }
  44%, 47% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

/* Badge check scène 1 */
.check-badge {
  position: absolute;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.check-1 {
  bottom: 180px;
  left: 50%;
  animation: check1Appear 16s ease-out infinite;
}
@keyframes check1Appear {
  0%, 43% { transform: translateX(-50%) scale(0); opacity: 0; }
  45% { transform: translateX(-50%) scale(1.3); opacity: 1; }
  47% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

/* ========== SCÈNE 2: Smartphone scan ========== */
.anim-scene-2 {
  animation: scene2Visibility 16s ease-in-out infinite;
}
@keyframes scene2Visibility {
  0%, 48% { opacity: 0; z-index: 1; }
  52%, 72% { opacity: 1; z-index: 3; }
  76%, 100% { opacity: 0; z-index: 1; }
}

/* QR cible - caché car maintenant dans le viewfinder */
.qr-cible {
  display: none;
}

/* QR code visible dans le viewfinder du téléphone */
.qr-in-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85px;
  height: 85px;
  z-index: 0;
  animation: qrInViewfinder 16s ease-out infinite;
}
.qr-in-viewfinder .qr-svg {
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
@keyframes qrInViewfinder {
  0%, 52% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  54% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 0; }
  100% { opacity: 0; }
}

/* Smartphone réaliste */
.smartphone {
  position: absolute;
  top: 25px;
  animation: phoneDown 16s ease-out infinite;
}
@keyframes phoneDown {
  0%, 50% { transform: translateY(-150px) rotate(-5deg); opacity: 0; }
  56% { transform: translateY(0) rotate(0); opacity: 1; }
  72% { opacity: 1; }
  76% { opacity: 0; }
  100% { opacity: 0; }
}

.phone-body {
  width: 180px;
  height: 320px;
  background: linear-gradient(145deg, #1F2937 0%, #111827 100%);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.phone-speaker {
  width: 60px;
  height: 6px;
  background: #374151;
  border-radius: 3px;
  margin: 8px auto 6px;
}

.phone-camera {
  position: absolute;
  top: 14px;
  right: 55px;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #1e3a5f 40%, #0f172a 100%);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2);
}

.phone-screen {
  width: 100%;
  height: calc(100% - 20px);
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Viewfinder de scan */
.viewfinder {
  width: 120px;
  height: 120px;
  position: relative;
}

.vf-corner {
  position: absolute;
  width: 25px;
  height: 25px;
  border: 4px solid #10B981;
}

.vf-tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.vf-tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.vf-bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.vf-br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.laser-line {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, #10B981 20%, #10B981 80%, transparent 100%);
  box-shadow:
    0 0 20px #10B981,
    0 0 40px rgba(16, 185, 129, 0.6);
  border-radius: 2px;
  animation: laserMove 16s ease-in-out infinite;
  z-index: 2;
}
@keyframes laserMove {
  0%, 56% { top: 10px; opacity: 0; }
  58% { top: 10px; opacity: 1; }
  62% { top: calc(100% - 14px); }
  66% { top: 10px; }
  70% { top: calc(100% - 14px); }
  72% { top: 10px; opacity: 1; }
  74% { opacity: 0; }
  100% { opacity: 0; }
}

/* Flash de succès */
.scan-success-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.6) 0%, transparent 70%);
  animation: successFlash 16s ease-out infinite;
  pointer-events: none;
}
@keyframes successFlash {
  0%, 70% { opacity: 0; transform: scale(0.8); }
  72% { opacity: 1; transform: scale(1); }
  75% { opacity: 0; transform: scale(1.3); }
  100% { opacity: 0; }
}

.check-2 {
  top: 50%;
  left: 50%;
  animation: check2Appear 16s ease-out infinite;
}
@keyframes check2Appear {
  0%, 70% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  72% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  74% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  76% { opacity: 0; }
  100% { opacity: 0; }
}

/* ========== SCÈNE 3: App ouverte ========== */
.anim-scene-3 {
  animation: scene3Visibility 16s ease-in-out infinite;
}
@keyframes scene3Visibility {
  0%, 74% { opacity: 0; z-index: 1; }
  78%, 100% { opacity: 1; z-index: 3; }
}

.app-smartphone {
  animation: appEnter 16s ease-out infinite;
}
@keyframes appEnter {
  0%, 75% { transform: scale(0.7) translateY(50px); opacity: 0; }
  82% { transform: scale(1) translateY(0); opacity: 1; }
  97% { transform: scale(1); }
  100% { transform: scale(0.98); opacity: 1; }
}

.app-body {
  width: 200px;
  height: 360px;
  background: linear-gradient(145deg, #1F2937 0%, #111827 100%);
  border-radius: 32px;
  padding: 10px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.app-notch {
  width: 70px;
  height: 5px;
  background: #000;
  border-radius: 3px;
  margin: 4px auto 6px;
}

.app-screen {
  width: 100%;
  height: calc(100% - 16px);
  background: linear-gradient(180deg, #FAFCFB 0%, #F1F5F4 100%);
  border-radius: 24px;
  overflow: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.app-top-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  animation: topBarSlide 16s ease-out infinite;
}
@keyframes topBarSlide {
  0%, 80% { transform: translateX(-40px); opacity: 0; }
  85% { transform: translateX(0); opacity: 1; }
  100% { opacity: 1; }
}

.app-back-btn {
  font-size: 20px;
  color: #0F172A;
  font-weight: 300;
}

.app-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
}

.app-qr-preview {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 8px;
  padding: 4px;
  margin: 0 auto 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: qrPreviewSlide 16s ease-out infinite;
  flex-shrink: 0;
}
@keyframes qrPreviewSlide {
  0%, 83% { transform: translateY(30px); opacity: 0; }
  88% { transform: translateY(0); opacity: 1; }
  100% { opacity: 1; }
}

.mini-qr {
  width: 100%;
  height: 100%;
}

.app-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.app-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 12px 10px;
  border-radius: 10px;
  border-left: 3px solid #10B981;
  font-size: 11px;
  font-weight: 600;
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.item-check {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  flex-shrink: 0;
}

.app-item-1 { animation: item1Slide 16s ease-out infinite; }
.app-item-2 { animation: item2Slide 16s ease-out infinite; }
.app-item-3 { animation: item3Slide 16s ease-out infinite; }

@keyframes item1Slide {
  0%, 86% { transform: translateX(60px); opacity: 0; }
  90% { transform: translateX(0); opacity: 1; }
  100% { opacity: 1; }
}
@keyframes item2Slide {
  0%, 89% { transform: translateX(60px); opacity: 0; }
  93% { transform: translateX(0); opacity: 1; }
  100% { opacity: 1; }
}
@keyframes item3Slide {
  0%, 92% { transform: translateX(60px); opacity: 0; }
  96% { transform: translateX(0); opacity: 1; }
  100% { opacity: 1; }
}

.success-glow {
  position: absolute;
  inset: -30px;
  border-radius: 60px;
  pointer-events: none;
  animation: glowSuccess 16s ease-out infinite;
}
@keyframes glowSuccess {
  0%, 95% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
  98% { box-shadow: 0 0 60px 30px rgba(16, 185, 129, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Cacher l'ancien téléphone */
.hero-phone { display: none !important; }
.floating-card { display: none !important; }

/* Ligne de scotch sur la face avant */
.carton-front::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #A67C52;
  transform: translateY(-50%);
  border-radius: 2px;
}

/* Dessus du carton */
.carton-top {
  position: absolute;
  top: 0;
  left: 5%;
  width: 90%;
  height: 25px;
  background: linear-gradient(180deg, #E8C9A0 0%, #D4A574 100%);
  border-radius: 4px 4px 0 0;
  transform: perspective(80px) rotateX(30deg);
  transform-origin: bottom center;
}

/* Côté droit du carton */
.carton-side {
  position: absolute;
  bottom: 0;
  right: -18px;
  width: 22px;
  height: 70px;
  background: linear-gradient(180deg, #B8895E 0%, #A67C52 100%);
  border-radius: 0 4px 4px 0;
  transform: skewY(-15deg);
  transform-origin: bottom left;
}

/* Icon wrap for other steps */
.onboarding-icon-wrap {
  width: 80px;
  height: 80px;
  background: var(--primary-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--primary);
}

.onboarding-icon-wrap .icon {
  width: 36px;
  height: 36px;
}

.onboarding-icon-wrap.success {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  animation: successPop 0.5s ease-out;
}

@keyframes successPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.onboarding-modal h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.onboarding-modal p {
  color: var(--gray-600);
  margin-bottom: 28px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.onboarding-modal .btn-primary {
  width: 100%;
  padding: 14px;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: var(--transition);
  cursor: pointer;
}

.dot:hover {
  background: var(--gray-400);
}

.dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-2xl);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--gray-100);
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gray-500);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

#modal-content {
  padding: 28px;
}

#modal-content h3 {
  margin-bottom: 24px;
  font-size: 1.35rem;
  font-weight: 700;
}

#modal-content form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#modal-content label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  color: var(--gray-700);
  font-size: 0.9rem;
}

#modal-content input[type="text"],
#modal-content textarea,
#modal-content select {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

#modal-content input:focus,
#modal-content textarea:focus,
#modal-content select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}

#modal-content textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.modal-actions button {
  flex: 1;
  padding: 14px;
  font-size: 1rem;
}

.item-preview-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gray-900);
  color: white;
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 3000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.97);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 20px 16px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-content {
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 100px;
}

#lightbox-img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2xl);
}

.lightbox-info {
  text-align: center;
  color: white;
  margin-top: 20px;
  max-width: 600px;
}

.lightbox-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.lightbox-info p {
  color: rgba(255, 255, 255, 0.7);
}

.lightbox-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.lightbox-counter {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  font-weight: 600;
}

.lightbox-thumbnails {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
  max-width: 90vw;
  overflow-x: auto;
}

.lightbox-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.5;
  transition: var(--transition);
  border: 3px solid transparent;
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: white;
  transform: scale(1.08);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px 60px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-visual {
    min-height: 350px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-anim-container {
    width: 320px;
    height: 420px;
    margin: 0 auto;
  }

  .app-body {
    width: 220px;
    height: 380px;
  }

  .floating-card {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .cta-section h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  header {
    padding: 10px 12px;
  }

  header h1 {
    font-size: 0.95rem;
  }

  #username-display {
    display: none;
  }

  .summary-bar {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .toolbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .filter-select {
    min-width: 100px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .boxes-grid {
    padding: 12px;
    gap: 6px;
  }

  .fab {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-anim-container {
    width: 280px;
    height: 380px;
    border-radius: 24px;
  }

  .app-body {
    width: 200px;
    height: 340px;
    border-radius: 36px;
  }

  .phone-body {
    width: 150px;
    height: 270px;
    border-radius: 30px;
  }

  .viewfinder {
    width: 100px;
    height: 100px;
  }

  .qr-in-viewfinder {
    width: 70px;
    height: 70px;
  }

  .hero-phone {
    width: 220px;
    height: 440px;
    border-radius: 40px;
  }

  .phone-screen {
    border-radius: 34px;
  }

  .phone-screen::before {
    width: 80px;
    height: 24px;
    top: 10px;
  }

  .demo-box {
    padding: 50px 15px 15px;
  }

  .demo-qr {
    width: 90px;
    height: 90px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }

  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-prev,
  .lightbox-next {
    padding: 14px 12px;
    font-size: 1.4rem;
  }
}

/* ============================================
   DARK MODE SPECIFIC STYLES
   ============================================ */

[data-theme="dark"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="dark"] #landing-screen {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .hero-title {
  color: var(--text-primary);
}

[data-theme="dark"] .hero-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .auth-container,
[data-theme="dark"] .modal {
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .auth-form input,
[data-theme="dark"] .modal input,
[data-theme="dark"] .modal select,
[data-theme="dark"] .modal textarea,
[data-theme="dark"] .filter-select,
[data-theme="dark"] #global-search-input,
[data-theme="dark"] #items-search-input,
[data-theme="dark"] #public-search-input {
  background: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .auth-form input::placeholder,
[data-theme="dark"] .modal input::placeholder {
  color: var(--text-muted);
}

[data-theme="dark"] .box-card,
[data-theme="dark"] .location-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .usecase-card,
[data-theme="dark"] .faq-item {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .main-header,
[data-theme="dark"] .detail-header {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .bottom-nav {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .summary-bar {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .profile-dropdown {
  background: var(--modal-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .profile-dropdown-item:hover {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .qr-toggle,
[data-theme="dark"] .qr-content {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme="dark"] .item-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .lightbox {
  background: rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .lightbox-info {
  background: var(--bg-secondary);
}

[data-theme="dark"] .toast {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

[data-theme="dark"] .empty-state-card,
[data-theme="dark"] .empty-state-small {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .tip-block {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme="dark"] .kebab-dropdown,
[data-theme="dark"] .location-menu {
  background: var(--modal-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .public-header {
  background: var(--bg-secondary);
}

[data-theme="dark"] .public-view {
  background: var(--bg-primary);
}

/* Dark mode toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
}

.theme-toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--gray-300);
  border-radius: 12px;
  transition: var(--transition);
}

[data-theme="dark"] .theme-toggle-track {
  background: var(--primary);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

[data-theme="dark"] .theme-toggle-thumb {
  left: 22px;
}

/* ============================================
   MOVING MODE (DÉMÉNAGEMENT)
   ============================================ */

.moving-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--warning) 0%, #f97316 100%);
  color: white;
  font-weight: 600;
  gap: 12px;
}

.moving-banner-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.moving-banner-stats {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

.moving-banner-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.moving-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.moving-btn-end {
  background: rgba(255,255,255,0.2);
  color: white;
}

.moving-btn-end:hover {
  background: rgba(255,255,255,0.3);
}

.box-card.moving-loaded {
  border: 2px solid var(--success);
  position: relative;
}

.box-card.moving-loaded::after {
  content: '✓ Chargé';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--success);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.box-card.moving-unloaded {
  border: 2px solid var(--primary);
  position: relative;
}

.box-card.moving-unloaded::after {
  content: '✓ Déchargé';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.moving-status-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.moving-status-btn.load {
  background: var(--warning);
  color: white;
}

.moving-status-btn.unload {
  background: var(--primary);
  color: white;
}

.moving-status-btn.done {
  background: var(--success);
  color: white;
}

/* ============================================
   VOICE INPUT
   ============================================ */

.voice-input-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-input-container input {
  flex: 1;
}

.voice-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.voice-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.voice-btn.listening {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
  animation: pulse-voice 1s infinite;
}

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

.voice-btn svg {
  width: 20px;
  height: 20px;
}

.voice-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ============================================
   MOVE ITEM MODAL
   ============================================ */

.move-item-boxes {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  margin: 16px 0;
}

.move-item-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.move-item-box:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.move-item-box.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.move-item-box-icon {
  font-size: 1.5rem;
}

.move-item-box-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.move-item-box-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   IMPROVED FORM ELEMENTS
   ============================================ */

/* Photo upload area */
.photo-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--input-bg);
}

.photo-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

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

.photo-upload-placeholder .icon {
  color: var(--gray-400);
}

.photo-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* Quantity control */
.quantity-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--input-bg);
}

.quantity-control input {
  width: 50px;
  text-align: center;
  border: none;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-primary);
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--gray-100);
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
}

.qty-btn:active {
  transform: scale(0.95);
}

[data-theme="dark"] .qty-btn {
  background: var(--bg-tertiary);
}

/* Compact form row */
.form-row-compact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: end;
}

/* Voice button inline (small) */
.voice-btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--primary-bg);
  color: var(--primary);
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  transition: var(--transition);
}

.voice-btn-inline:hover {
  background: var(--primary);
  color: white;
}

.voice-btn-inline.listening {
  background: var(--danger);
  color: white;
  animation: pulse-voice 1s infinite;
}

.voice-btn-inline .icon {
  width: 16px;
  height: 16px;
}

/* Hide moving mode button - feature needs more work */
#start-moving-btn {
  display: none;
}
