/* ==========================================================================
   Fashion Finder - Design System
   Premium Minimalist & Editorial Aesthetic (Clean, Minimalist, Belo e Estiloso)
   Derived from ui-ux-pro-max Guidelines
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  /* Editorial Color Palette - Warm Sand & Obsidian */
  --bg-main: #FAF9F6;       /* Warm alabaster/off-white background */
  --bg-card: #FFFFFF;       /* Pure white cards */
  --bg-card-hover: #F4F3EE; /* Subtle warm stone hover */
  
  --primary: #CA8A04;       /* Elegant dark gold / accent */
  --primary-glow: rgba(202, 138, 4, 0.15);
  --secondary: #1C1917;     /* Obsidian/charcoal stone */
  --secondary-glow: rgba(28, 25, 23, 0.08);
  
  --success: #15803d;       /* Deep green */
  --warning: #b45309;       /* Deep amber */
  
  --text-main: #1C1917;     /* High contrast stone black for accessibility */
  --text-muted: #57534E;    /* Soft charcoal */
  --text-dim: #78716C;      /* Mid gray */
  --border-glass: #E7E5E4;  /* Muted thin stone border */
  --border-active: #CA8A04; /* Gold focus/active border */

  /* Typography */
  --font-display: 'Cormorant', serif;
  --font-sans: 'Montserrat', sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 8px 30px rgba(28, 25, 23, 0.06);
  --shadow-glow: 0 0 20px var(--primary-glow);
  
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #EAE8E1;
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Device Shell Simulator (Desktop Bezel) */
.device-container {
  width: 100%;
  max-width: 440px;
  height: 92vh;
  max-height: 880px;
  background-color: var(--bg-main);
  border: 12px solid #1C1917;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(28, 25, 23, 0.15);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Mobile full-screen collapse override */
@media (max-width: 480px) {
  .device-container {
    max-width: 100%;
    height: 100vh;
    max-height: 100%;
    border: none;
    border-radius: 0;
  }
}

/* Device Top Status Bar Notch Simulator */
.device-notch {
  width: 140px;
  height: 22px;
  background-color: #1C1917;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.device-notch::before {
  content: '';
  width: 40px;
  height: 3px;
  background-color: var(--bg-main);
  border-radius: var(--radius-full);
  opacity: 0.15;
}

/* App Header styling */
header {
  padding: 36px 24px 16px 24px;
  background: var(--bg-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
}

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

.brand-logo {
  width: 28px;
  height: 28px;
  background: var(--secondary);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--bg-main);
  letter-spacing: -1px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--secondary);
  letter-spacing: 0.5px;
}

/* App Scrollable Content */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 90px 24px;
  position: relative;
  scrollbar-width: none; /* Hide scrollbar */
}
.app-content::-webkit-scrollbar {
  display: none;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 12px;
  z-index: 200;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-dim);
  stroke-width: 1.8;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--secondary);
}
.nav-item:hover svg {
  stroke: var(--secondary);
}

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

.nav-item.active svg {
  stroke: var(--primary);
}

/* ==========================================================================
   View 1: Landing (Upload Look)
   ========================================================================== */
.view-panel {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
}

.view-panel.active {
  display: block;
}

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

.hero-text {
  text-align: center;
  margin: 10px 0 28px 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  color: var(--secondary);
}

.hero-title span {
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* Premium Elegant Upload Container */
.upload-card {
  background: var(--bg-card);
  border: 1px dashed var(--text-dim);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.upload-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-card-hover);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

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

.upload-card:hover::before {
  opacity: 1;
}

.upload-icon-container {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  background: var(--bg-main);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.upload-card:hover .upload-icon-container {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: scale(1.05);
}

.upload-icon-container svg {
  width: 22px;
  height: 22px;
  stroke: var(--secondary);
  stroke-width: 1.5;
}

.upload-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.upload-desc {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-camera {
  position: relative;
  z-index: 1;
  background: var(--secondary);
  color: var(--bg-main);
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
}

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

.btn-camera svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
}

#file-input {
  display: none;
}

/* Preset sections (popular style gallery) */
.presets-section {
  margin-top: 36px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 1px;
  height: 20px;
  background: var(--primary);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  aspect-ratio: 0.85;
}

.preset-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.preset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.preset-card:hover img {
  transform: scale(1.03);
}

.preset-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.95) 0%, rgba(28, 25, 23, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.preset-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.72rem;
  color: white;
  letter-spacing: 0.2px;
  margin-top: 2px;
}

.preset-tag {
  font-size: 0.58rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Privacy LGPD Banner */
.privacy-toast {
  margin-top: 28px;
  background: var(--bg-card-hover);
  border-left: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.privacy-toast svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  stroke-width: 1.8;
  flex-shrink: 0;
}

.privacy-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   View 2: Scanning & AI Pipeline
   ========================================================================== */
.scanning-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 0.85;
  background: #FAF9F6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.scanning-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%);
}

/* Bounding box overlays */
.bounding-box {
  position: absolute;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1000px rgba(26, 23, 20, 0.45);
  display: none;
  cursor: pointer;
  z-index: 50;
  animation: pulseBox 2.5s infinite ease-in-out;
}

.bounding-box::before {
  content: 'SELECT';
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--secondary);
  color: var(--bg-main);
  font-family: var(--font-sans);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

@keyframes pulseBox {
  0%, 100% { border-color: var(--primary); }
  50% { border-color: white; }
}

/* Scanning laser overlay line */
.laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: scanMotion 3s infinite ease-in-out;
  z-index: 60;
}

@keyframes scanMotion {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Interactive Timeline Stepper */
.pipeline-stepper {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  opacity: 0.35;
  transition: var(--transition);
}

.step-item.active {
  opacity: 1;
}

.step-indicator {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  flex-shrink: 0;
}

.step-item.active .step-indicator {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-item.completed .step-indicator {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
}

.step-details {
  flex: 1;
}

.step-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--secondary);
}

.step-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

/* Dynamic attribute chips */
.attribute-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   View 3: Results Matching
   ========================================================================== */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-back-landing {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-back-landing:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-dim);
}

.btn-back-landing svg {
  width: 12px;
  height: 12px;
  stroke: var(--text-main);
  stroke-width: 2.2;
}

.results-query-preview {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  align-items: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.results-query-image {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.results-query-details {
  flex: 1;
}

.results-query-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--secondary);
}

.results-query-tags {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Category Tab Panel */
.results-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glass);
  padding: 3px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.results-tabs .tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 0;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.results-tabs .tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Interactive Refinement Tuner Card */
.attribute-tuner {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tuner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--bg-card);
  user-select: none;
}

.tuner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tuner-icon {
  width: 14px;
  height: 14px;
  stroke: var(--primary);
  stroke-width: 2;
}

.tuner-chevron {
  width: 12px;
  height: 12px;
  stroke: var(--text-dim);
  transition: transform var(--transition);
}

.attribute-tuner.expanded .tuner-chevron {
  transform: rotate(180deg);
}

.tuner-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border-glass);
  max-height: 500px;
  transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.25s ease-out;
  opacity: 1;
}

.tuner-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.tuner-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tuner-group-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
}

.tuner-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tuner-chip {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.tuner-chip:hover {
  background: var(--border-glass);
  color: var(--secondary);
}

.tuner-chip.selected {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
  font-weight: 600;
}

/* Matches Grid List */
.matches-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: row;
  height: 124px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.match-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.match-card-image-box {
  width: 90px;
  height: 100%;
  position: relative;
}

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

.match-card-score {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--secondary);
  color: var(--bg-main);
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
}

.match-card-info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.match-card-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.match-card-category {
  font-size: 0.58rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.match-card-name {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.match-card-price {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
}

.btn-buy {
  background: var(--primary);
  color: white;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.btn-buy:hover {
  background: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.btn-buy svg {
  width: 10px;
  height: 10px;
  stroke: white;
  stroke-width: 2.2;
}

/* ==========================================================================
   View 4: Catalog Explorer
   ========================================================================== */
.search-filter-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: var(--text-dim);
  stroke-width: 2;
}

.search-input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-glass);
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  transition: var(--transition);
}

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

.catalog-tabs {
  display: flex;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.tab-btn.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

/* Catalog Product Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.catalog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.catalog-image-box {
  width: 100%;
  aspect-ratio: 0.85;
  overflow: hidden;
  position: relative;
}

.catalog-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.catalog-card:hover .catalog-image-box img {
  transform: scale(1.03);
}

.catalog-details {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.catalog-card-name {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.catalog-card-price {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--secondary);
}

.btn-catalog-buy {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glass);
  color: var(--secondary);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-catalog-buy:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-catalog-buy svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* ==========================================================================
   View 5: Admin Panel & Telemetry Dashboard
   ========================================================================== */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.admin-card-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-badge {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

/* Telemetry Grid widgets */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-box {
  background: var(--bg-main);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.58rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.metric-value {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--secondary);
}

.metric-sub {
  font-size: 0.58rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Telemetry Chart */
.chart-container {
  height: 100px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 8px;
}

.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 20px;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  background: var(--secondary);
  position: relative;
  transition: var(--transition);
}

.chart-bar:hover {
  background: var(--primary);
}

.chart-bar::before {
  content: attr(data-val);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: var(--text-muted);
  font-weight: 700;
}

.chart-label {
  font-size: 0.55rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Switch widgets */
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-glass);
}
.switch-row:last-child {
  border-bottom: none;
}

.switch-label-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.switch-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
}

.switch-desc {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-glass);
  transition: .2s;
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:checked + .slider {
  background-color: var(--secondary);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* Coupons manager list */
.coupons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coupon-card {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--bg-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coupon-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.coupon-code {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.coupon-discount {
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
}

.coupon-meta {
  font-size: 0.58rem;
  color: var(--text-muted);
}

.btn-clip {
  background: var(--bg-card);
  color: var(--secondary);
  border: 1px solid var(--border-glass);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-clip.clipped {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

/* Live logger console */
.log-box {
  background: var(--secondary);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.6rem;
  color: #D6D3D1;
  height: 90px;
  padding: 8px;
  overflow-y: auto;
  line-height: 1.45;
  scrollbar-width: none;
}
.log-box::-webkit-scrollbar {
  display: none;
}

.log-entry {
  margin-bottom: 2px;
  display: flex;
  gap: 4px;
}

.log-time {
  color: var(--primary);
}

.log-event {
  color: #FAF9F6;
}

/* Affiliate commission toasts */
.toast-overlay {
  position: absolute;
  top: 40px;
  left: 20px;
  right: 20px;
  background: var(--secondary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  z-index: 1000;
}

.toast-overlay.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-overlay-icon {
  width: 20px;
  height: 20px;
  background: var(--primary-glow);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.toast-overlay-icon svg {
  width: 12px;
  height: 12px;
  stroke: var(--primary);
  stroke-width: 2.5;
}

.toast-overlay-info {
  flex: 1;
}

.toast-overlay-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.72rem;
  color: white;
  letter-spacing: 0.2px;
}

.toast-overlay-desc {
  font-size: 0.6rem;
  color: #A8A29E;
  line-height: 1.3;
}
