/* ========================================================
   DzStock Radar - Modern Design System & Stylesheet (2026)
   ======================================================== */

:root {
  /* Fonts */
  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-latin: 'Outfit', sans-serif;

  /* Color Palette - Dark Default */
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-card: rgba(19, 26, 43, 0.75);
  --bg-card-hover: rgba(28, 38, 64, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(14, 20, 33, 0.9);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --border-glow: rgba(59, 130, 246, 0.3);

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

  /* Accent Colors */
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --primary-dark: #1d4ed8;

  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.12);
  --accent-green-border: rgba(16, 185, 129, 0.3);

  --accent-blue: #06b6d4;
  --accent-blue-bg: rgba(6, 182, 212, 0.12);

  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);
  --accent-amber-border: rgba(245, 158, 11, 0.3);

  --accent-red: #ef4444;
  --accent-red-bg: rgba(239, 68, 68, 0.12);
  --accent-red-border: rgba(239, 68, 68, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
body.theme-light {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-input: #ffffff;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #2563eb;
  --border-glow: rgba(37, 99, 235, 0.2);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.15);
}

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

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  line-height: 1.6;
}

/* Ambient Glow Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: opacity var(--transition-smooth);
}
.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
  top: -100px;
  right: -50px;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #8b5cf6 0%, rgba(139, 92, 246, 0) 70%);
  bottom: 10%;
  left: -100px;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #10b981 0%, rgba(16, 185, 129, 0) 70%);
  top: 40%;
  right: 25%;
  opacity: 0.15;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

/* ========================================================
   Header
   ======================================================== */
.app-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 13, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}
body.theme-light .app-header {
  background: rgba(255, 255, 255, 0.8);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.radar-pulse-icon {
  width: 28px;
  height: 28px;
  animation: radarSpin 8s linear infinite;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.theme-light .brand-title {
  background: linear-gradient(135deg, #0f172a 40%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-tag {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-latin);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

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

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

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

body.theme-dark .icon-sun { display: block; }
body.theme-dark .icon-moon { display: none; }
body.theme-light .icon-sun { display: none; }
body.theme-light .icon-moon { display: block; }

.btn-outline-sm {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-outline-sm:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
}

/* ========================================================
   Main Content Layout
   ======================================================== */
.main-content {
  padding-top: 36px;
  padding-bottom: 60px;
  display: flex;
  flex-col: column;
  gap: 32px;
}

/* ========================================================
   Scanner Hero Box
   ======================================================== */
.scanner-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.scanner-header {
  margin-bottom: 24px;
  text-align: center;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent-green-border);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.scanner-heading {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.scanner-subtext {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* Scan Input Bar */
.scan-input-group {
  display: flex;
  gap: 12px;
  max-width: 850px;
  margin: 0 auto 20px auto;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  right: 18px;
  font-size: 1.15rem;
  pointer-events: none;
  opacity: 0.6;
}

.store-url-input {
  width: 100%;
  height: 56px;
  padding: 0 46px 0 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-latin), var(--font-arabic);
  direction: ltr;
  text-align: right;
  transition: all var(--transition-fast);
}

.store-url-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--border-glow);
}

.btn-clear {
  position: absolute;
  left: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}
.btn-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-primary-glow {
  height: 56px;
  padding: 0 28px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.55);
}

.btn-primary-glow:active {
  transform: translateY(1px);
}

.btn-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.search-icon {
  width: 20px;
  height: 20px;
}

.spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-primary-glow.loading .btn-content { display: none; }
.btn-primary-glow.loading .spinner { display: block; }

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

/* Preset Chips */
.preset-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-chip:hover,
.preset-chip.active {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ========================================================
   Progress Card
   ======================================================== */
.progress-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease;
}

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

.progress-info-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.scanning-indicator {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulseWave 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}
.wave-delay {
  animation-delay: 1s;
}

@keyframes pulseWave {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.radar-center {
  font-size: 1.3rem;
  position: relative;
  z-index: 2;
}

.progress-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.progress-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.progress-percent-badge {
  font-family: var(--font-latin);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.25s ease-out;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.6);
}

.live-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.ticker-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.ticker-text {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   Store Hero & Actions Card
   ======================================================== */
.store-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.store-meta-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.store-avatar-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.badge-store-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-live-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-green-bg);
  color: #34d399;
  border: 1px solid var(--accent-green-border);
}

.scan-timestamp {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.store-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  font-family: var(--font-latin), var(--font-arabic);
  direction: ltr;
  transition: color var(--transition-fast);
}
.store-link:hover {
  color: var(--primary);
}

.store-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-refresh,
.btn-action {
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-refresh:hover,
.btn-action:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-refresh {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}
.btn-refresh:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* ========================================================
   KPI Stats Grid
   ======================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-latin), var(--font-arabic);
  line-height: 1.15;
}

.kpi-unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.text-green { color: #34d399; }
.text-blue { color: #38bdf8; }
.text-amber { color: #fbbf24; }
.text-red { color: #f87171; }
.text-teal { color: #2dd4bf; }
.text-indigo { color: #818cf8; }
.text-purple { color: #c084fc; }

.highlight-green { border-color: rgba(16, 185, 129, 0.25); }
.highlight-blue { border-color: rgba(6, 182, 212, 0.25); }
.highlight-amber { border-color: rgba(245, 158, 11, 0.25); }
.highlight-red { border-color: rgba(239, 68, 68, 0.25); }
.highlight-teal { border-color: rgba(20, 184, 166, 0.35); background: rgba(20, 184, 166, 0.05); }
.highlight-indigo { border-color: rgba(99, 102, 241, 0.35); background: rgba(99, 102, 241, 0.05); }
.highlight-purple { border-color: rgba(168, 85, 247, 0.35); background: rgba(168, 85, 247, 0.05); }

/* ========================================================
   Store Diff & Changes Summary Banner
   ======================================================== */
.diff-summary-card {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(30, 41, 59, 0.75));
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  animation: fadeIn 0.3s ease;
}

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

.diff-badge-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.diff-timestamp-badge {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.diff-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.diff-item {
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.diff-item:hover {
  transform: translateY(-2px);
}

.diff-item.diff-added {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.diff-item.diff-newprod {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(99, 102, 241, 0.06);
}

.diff-item.diff-sold {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(6, 182, 212, 0.06);
}

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

.diff-val {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-latin), var(--font-arabic);
  line-height: 1.2;
}

.diff-item.diff-added .diff-val { color: #34d399; }
.diff-item.diff-newprod .diff-val { color: #818cf8; }
.diff-item.diff-sold .diff-val { color: #38bdf8; }

.diff-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.diff-details-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.diff-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

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

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

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

/* ========================================================
   Inventory Toolbar
   ======================================================== */
.inventory-toolbar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.toolbar-search-box {
  position: relative;
  min-width: 260px;
  flex: 1;
}

.search-glass-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.6;
}

.filter-search-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
}
.filter-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

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

.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.filter-chip.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: #60a5fa;
}

.toolbar-right-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-select {
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  cursor: pointer;
}
.custom-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.view-toggle {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-toggle.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* ========================================================
   Products Grid View
   ======================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.15);
}

.product-image-container {
  position: relative;
  aspect-ratio: 4/4.5;
  background: var(--bg-secondary);
  overflow: hidden;
}

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

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

.stock-floating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stock-badge-high {
  background: rgba(16, 185, 129, 0.88);
  color: #fff;
}

.stock-badge-low {
  background: rgba(245, 158, 11, 0.9);
  color: #1e1b18;
}

.stock-badge-zero {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.stock-badge-preorder {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(168, 85, 247, 0.95));
  color: #fff;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.product-info-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.product-price-tag {
  font-family: var(--font-latin), var(--font-arabic);
  font-weight: 700;
  font-size: 1rem;
  color: #60a5fa;
}

.product-stock-bar-container {
  margin: 10px 0 14px 0;
}

.stock-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stock-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stock-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.fill-high { background: var(--accent-green); }
.fill-low { background: var(--accent-amber); }
.fill-zero { background: var(--accent-red); }
.fill-preorder { background: linear-gradient(90deg, #8b5cf6, #c084fc); }

.bg-purple { background-color: #8b5cf6 !important; }

.product-footer-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-total-val {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.product-total-num {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-latin);
}

.btn-view-store {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.btn-view-store:hover {
  text-decoration: underline;
}

/* ========================================================
   Table View
   ======================================================== */
.table-container {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.9rem;
}

.inventory-table th {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
}

.inventory-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.inventory-table tr:hover td {
  background: var(--bg-card-hover);
}

.table-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-secondary);
}

.table-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-latin), var(--font-arabic);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}

/* ========================================================
   History Drawer
   ======================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  transition: opacity var(--transition-smooth);
}

.history-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  z-index: 101;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(0);
  transition: transform var(--transition-smooth);
}

.history-drawer.hidden {
  transform: translateX(-100%);
  display: flex !important;
}

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

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.history-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.history-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ========================================================
   Toast Notification
   ======================================================== */
.toast-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-tags {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .scanner-heading {
    font-size: 1.45rem;
  }
  .scan-input-group {
    flex-direction: column;
  }
  .store-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .store-actions-right {
    width: 100%;
  }
  .btn-action, .btn-refresh {
    flex: 1;
    justify-content: center;
  }
  .inventory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-right-tools {
    justify-content: space-between;
  }
  .toolbar-search-box {
    min-width: 100%;
  }
}

/* ========================================================
   Navigation Tabs (Scanner vs Tracker)
   ======================================================== */
.app-nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.2));
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.15);
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseDot 1.8s infinite;
}

/* ========================================================
   Tracker Status Banner
   ======================================================== */
.tracker-status-banner {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.banner-right-info {
  flex: 1;
  min-width: 280px;
}

.cron-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--accent-green-border);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.cron-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseDot 1.5s infinite;
}

.tracker-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.tracker-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 650px;
}

.banner-timer-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.timer-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.countdown-digits {
  font-family: var(--font-latin);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #60a5fa;
  text-shadow: 0 0 16px rgba(96, 165, 250, 0.4);
}

.last-checked-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tracker-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  height: 38px !important;
  padding: 0 16px !important;
  font-size: 0.85rem !important;
}

.btn-simulate {
  border-color: rgba(139, 92, 246, 0.3) !important;
  color: #c084fc !important;
  background: rgba(139, 92, 246, 0.1) !important;
}
.btn-simulate:hover {
  background: rgba(139, 92, 246, 0.2) !important;
}

/* ========================================================
   Tracker Section Cards
   ======================================================== */
.tracker-section-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.card-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

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

/* Sold Models Grid */
.sold-models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.sold-model-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--accent-green-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
  transition: transform var(--transition-fast);
}

.sold-model-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.sold-model-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-card);
}

.sold-model-details {
  flex: 1;
}

.sold-model-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.sold-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-green-bg);
  border: 1px solid var(--accent-green-border);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.sold-financials {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sold-empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

/* End-of-Day Official Report Box */
.end-day-report-box {
  background: rgba(5, 8, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.report-code-block {
  font-family: var(--font-arabic), monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
  border: none;
  margin-bottom: 16px;
  direction: rtl;
}

.report-box-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* Timeline Logs */
.timeline-logs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-item-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline-time-badge {
  font-family: var(--font-latin);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.timeline-sold-summary {
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-items-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-item-chip {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

/* ========================================================
   Best Sellers & Forecast Grid (Intel Columns)
   ======================================================== */
.intel-columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.ranking-list,
.forecast-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item,
.forecast-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast);
}

.ranking-item:hover,
.forecast-item:hover {
  transform: translateX(-4px);
  border-color: rgba(59, 130, 246, 0.3);
}

.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-latin);
  font-size: 0.85rem;
}
.rank-1 { background: #f59e0b; color: #1e1b18; }
.rank-2 { background: #94a3b8; color: #1e1b18; }
.rank-3 { background: #b45309; color: #fff; }

.forecast-critical {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}
.forecast-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

/* ========================================================
   Marketing Intel & Pixels View
   ======================================================== */
.intel-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.intel-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.intel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
}

.intel-card-icon {
  font-size: 2.2rem;
}

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

.pixel-id-display {
  font-family: var(--font-latin);
  font-size: 1.25rem;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.02em;
  background: rgba(59, 130, 246, 0.1);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: inline-block;
}

.intel-card-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.btn-link-ads {
  margin-top: auto;
  text-decoration: none;
  background: rgba(37, 99, 235, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}
.btn-link-ads:hover {
  background: rgba(37, 99, 235, 0.3) !important;
  transform: translateY(-1px);
}

.contact-rows-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row-item {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipping-badges-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-tag {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================================
   Multi-Store Competitor Manager
   ======================================================== */
.add-competitor-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.competitor-input {
  flex: 1;
  min-width: 220px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
}
.competitor-input.url-field {
  direction: ltr;
  text-align: right;
  font-family: var(--font-latin), var(--font-arabic);
}
.competitor-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.tracked-stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tracked-store-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all var(--transition-fast);
}

.tracked-store-card.active-store {
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
}

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

.store-card-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.store-card-url {
  font-size: 0.8rem;
  color: var(--text-secondary);
  direction: ltr;
  text-align: right;
  word-break: break-all;
}

.store-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* ========================================================
   Telegram & Alert Settings View
   ======================================================== */
.telegram-config-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}

.switch-label {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 34px;
}

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

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

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

.config-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.config-input {
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-latin), var(--font-arabic);
  font-size: 0.9rem;
  direction: ltr;
}
.config-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.checkboxes-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.custom-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.telegram-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ========================================================
   Forensics Orders Intelligence
   ======================================================== */
.highlight-purple {
  border-color: rgba(168, 85, 247, 0.35) !important;
}
.highlight-purple .kpi-icon-box {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.text-purple {
  color: #c084fc !important;
}

.highlight-cyan {
  border-color: rgba(6, 182, 212, 0.35) !important;
}
.highlight-cyan .kpi-icon-box {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
}
.text-cyan {
  color: #22d3ee !important;
}

.forensic-card {
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.2) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
}

.forensics-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.forensic-tag {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #d8b4fe !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.badge-subsecond {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.forensics-pill-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.f-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.f-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.f-pill-dot.green { background: #10b981; }
.f-pill-dot.purple { background: #a855f7; }
.f-pill-dot.cyan { background: #06b6d4; }
.f-pill-dot.gold { background: #f59e0b; }

.f-pill.highlight-gold {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.forensic-table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  margin-top: 14px;
}

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

.forensic-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.forensic-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.forensic-table tr:last-child td {
  border-bottom: none;
}

.forensic-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.order-badge-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  font-weight: 800;
  font-family: var(--font-latin);
  font-size: 0.85rem;
}

.order-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.order-type-single {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.order-type-bundle {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.order-items-flex {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 600;
}

.order-item-thumb {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

.time-gap-pill {
  font-size: 0.78rem;
  font-family: var(--font-latin), var(--font-arabic);
  color: var(--text-muted);
}
