/* ==========================================================================
   LAL10 × MYNTRA FASHION INTELLIGENCE PLATFORM - LUXURY CORPORATE DESIGN
   ========================================================================== */

:root {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-hover: #f1f5f9;
  --border-card: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #0f172a;

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

  --lal10-gold: #d97706;
  --lal10-gold-light: #fef3c7;
  --myntra-pink: #ff3f6c;
  --accent-green: #10b981;
  --accent-green-light: #ecfdf5;
  --accent-red: #ef4444;
  --accent-red-light: #fef2f2;
  --accent-blue: #3b82f6;
  --accent-blue-light: #eff6ff;
  --accent-purple: #8b5cf6;
  --accent-purple-light: #f5f3ff;
  --accent-amber: #f59e0b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-drawer: -4px 0 24px rgba(15, 23, 42, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ==========================================================================
   APP LAYOUT (Sidebar + Main + Right Drawer)
   ========================================================================== */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  min-width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  height: 100vh;
  z-index: 40;
}

.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-light);
}

.lal10-logo-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.lantern-icon {
  background: #fef3c7;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lal10-text {
  display: flex;
  flex-direction: column;
}

.lal10-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #78350f;
  line-height: 1.2;
}

.lal10-sub {
  font-size: 10px;
  font-weight: 500;
  color: #b45309;
}

/* Navigation Links */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 10px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

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

.nav-item.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.nav-item svg {
  flex-shrink: 0;
}

.badge-count {
  margin-left: auto;
  background: var(--myntra-pink);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sync-card {
  background: #f8fafc;
  border: 1px solid var(--border-card);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.sync-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.myntra-brand-text {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #0f172a;
  font-weight: 700;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-green);
  font-weight: 600;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

.live-dot.pulse {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.motto-box {
  text-align: center;
  padding: 2px 4px;
}

.motto-box p {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.3;
}

.version-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 4px;
  display: block;
}

.user-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.user-info-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-info-text strong {
  font-size: 12px;
  font-weight: 700;
}

.user-info-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--accent-red);
  background: var(--accent-red-light);
}

/* ==========================================================================
   MAIN WRAPPER & TOP HEADER
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top-header {
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.platform-title span {
  color: var(--text-muted);
  font-weight: 400;
}

.platform-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-card);
  padding-left: 12px;
}

.header-search {
  width: 440px;
  display: flex;
  align-items: center;
  background: var(--bg-app);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  gap: 10px;
  transition: var(--transition);
}

.header-search:focus-within {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--text-primary);
}

.kbd-shortcut {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 1px 5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.scraper-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.scraper-status-pill:hover {
  background: #e2e8f0;
}

.scraper-status-pill.running {
  background: var(--accent-green-light);
  color: #065f46;
  border-color: #a7f3d0;
}

.scraper-status-pill.running:hover {
  background: #d1fae5;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  transition: background 0.3s ease;
}

.scraper-status-pill.running .status-indicator-dot {
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sync-timestamp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-hover);
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: var(--accent-red);
  color: white;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   CONTENT AREA & VIEW PANELS
   ========================================================================== */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 40px;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Common Header Styles */
.dashboard-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.breadcrumb-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.quote-tagline {
  text-align: right;
}

.quote-tagline span {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: block;
}

.quote-tagline strong {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* ==========================================================================
   KPI STAT CARDS (5 Cards in a Row - Image 1)
   ========================================================================== */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

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

.kpi-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kpi-icon-wrap {
  background: #f1f5f9;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.kpi-trend {
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
}

.kpi-trend.positive {
  color: #059669;
  background: #d1fae5;
}

.kpi-trend.negative {
  color: #dc2626;
  background: #fee2e2;
}

.kpi-trend.neutral {
  color: #64748b;
  background: #f1f5f9;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   CHARTS GRID (3 Columns - Image 1)
   ========================================================================== */
.dash-charts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.btn-link {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chart-body {
  flex: 1;
  position: relative;
  min-height: 180px;
}

/* Donut Chart Layout */
.donut-chart-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.donut-canvas-container {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  line-height: 1.1;
}

.donut-center-label strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.donut-center-label span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.custom-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  color: var(--text-secondary);
  flex: 1;
}

.legend-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* Geographic Demand */
.geo-demand-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.india-map-vector {
  flex-shrink: 0;
}

.geo-rank-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.geo-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.geo-rank-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.geo-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  width: 12px;
}

.geo-city {
  font-weight: 600;
  color: var(--text-primary);
}

.geo-share {
  font-weight: 700;
  color: var(--text-secondary);
}

/* Top Trending Brands */
.trending-brands-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trend-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.trend-brand-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #0f172a;
  color: white;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trend-brand-name {
  width: 100px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-bar-track {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}

.trend-bar-fill {
  height: 100%;
  background: #d97706;
  border-radius: 3px;
}

.trend-percent {
  font-size: 11px;
  font-weight: 800;
  color: #b45309;
  width: 42px;
  text-align: right;
}

/* Heatmap Matrix Table */
.heatmap-table-wrap {
  overflow-x: auto;
}

.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.heatmap-table th {
  text-align: center;
  padding: 6px 4px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 10px;
}

.heatmap-table th:first-child {
  text-align: left;
}

.heatmap-table td {
  padding: 6px 4px;
  text-align: center;
}

.heatmap-table td:first-child {
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.heatmap-cell {
  padding: 6px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  display: inline-block;
  min-width: 32px;
}

/* Heatmap color scales */
.hm-lvl-0 { background: #f8fafc; color: #cbd5e1; }
.hm-lvl-1 { background: #fef3c7; color: #92400e; }
.hm-lvl-2 { background: #fed7aa; color: #9a3412; }
.hm-lvl-3 { background: #d97706; color: #ffffff; }
.hm-lvl-4 { background: #78350f; color: #ffffff; }

/* ==========================================================================
   AI INSIGHTS SECTION (Row 3 - Image 1)
   ========================================================================== */
.ai-insights-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.ai-insights-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ai-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
}

.ai-insights-header span {
  font-size: 12px;
  color: var(--text-muted);
}

.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ai-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
}

.ai-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-card-content h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ai-card-content p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   VIEW 2: PRODUCT CATALOG (Image 2)
   ========================================================================== */
.catalog-hero-banner,
.compare-hero-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.65) 60%, rgba(255,255,255,0.3) 100%);
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-badge-right {
  position: relative;
  z-index: 2;
  text-align: right;
}

.banner-badge-right span {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: block;
}

.banner-badge-right strong {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

/* Catalog Metrics Row */
.catalog-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.cat-metric-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.cat-pill-icon.red { background: #fee2e2; }
.cat-pill-icon.gold { background: #fef3c7; }
.cat-pill-icon.orange { background: #ffedd5; }
.cat-pill-icon.purple { background: #f5f3ff; }
.cat-pill-icon.blue { background: #eff6ff; }

.cat-metric-pill .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
}

.cat-metric-pill .val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cat-metric-pill strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

.badge-tag.green { background: #d1fae5; color: #065f46; }
.badge-tag.red { background: #fee2e2; color: #991b1b; }
.badge-tag.neutral { background: #f1f5f9; color: #64748b; }

.cat-metric-pill .sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* Category Filter Tabs Bar */
.catalog-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
}

.category-tabs-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.cat-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

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

.cat-tab-btn.active {
  background: #0f172a;
  color: white;
}

.tab-cnt {
  font-size: 10px;
  opacity: 0.75;
}

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

.sort-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.sort-select-wrap select {
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: white;
  outline: none;
}

.btn-compare-action {
  background: #f1f5f9;
  border: 1px solid var(--border-card);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-compare-action:hover {
  background: #0f172a;
  color: white;
}

/* Catalog Main Layout */
.catalog-main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  position: relative;
}

.catalog-filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: fit-content;
}

.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.filter-sidebar-header h3 {
  font-size: 14px;
  font-weight: 800;
}

.btn-clear {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-clear:hover {
  color: var(--myntra-pink);
}

.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.filter-search-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 6px 10px;
  gap: 6px;
}

.filter-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 11px;
  width: 100%;
}

.brand-filter-search input {
  width: 100%;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  outline: none;
}

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

.brand-checkboxes-scroll {
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  accent-color: #0f172a;
}

.check-item .cnt {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
}

.range-display-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

input[type="range"] {
  width: 100%;
  accent-color: #0f172a;
}

.toggle-block {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 700;
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 34px;
}

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

input:checked + .slider {
  background-color: #0f172a;
}

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

/* ==========================================================================
   PRODUCT DATA TABLE
   ========================================================================== */
.catalog-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
}

.product-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.product-data-table th {
  background: #f8fafc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.product-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.product-data-table tr:hover td {
  background: #f8fafc;
}

.prod-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  cursor: pointer;
}

.prod-thumb {
  width: 44px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
  flex-shrink: 0;
}

.prod-info-cell {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.prod-title {
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-sku {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.brand-badge {
  font-weight: 700;
  color: var(--text-primary);
}

.price-text {
  font-weight: 800;
  color: var(--text-primary);
}

.mrp-text {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-pill {
  font-size: 10px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.stock-text {
  font-weight: 700;
  color: #0f172a;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #d97706;
}

.table-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-icon-btn {
  background: transparent;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.table-icon-btn:hover {
  background: #0f172a;
  color: white;
}

.table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
}

.pagination-pages {
  display: flex;
  gap: 4px;
}

.page-btn {
  padding: 4px 8px;
  border: 1px solid var(--border-card);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.page-btn.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

/* ==========================================================================
   SLIDE-OVER PRODUCT DETAIL DRAWER (Image 2) - RESPONSIVE & EXPANDABLE
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 620px;
  max-width: 95vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-card);
  box-shadow: -12px 0 50px rgba(15, 23, 42, 0.28);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
  pointer-events: none;
}

.product-detail-drawer.active {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.product-detail-drawer.expanded {
  width: 880px;
  max-width: 98vw;
}

@media (max-width: 768px) {
  .product-detail-drawer {
    width: 100vw;
    max-width: 100vw;
    border-left: none;
  }
  .product-detail-drawer.expanded {
    width: 100vw;
    max-width: 100vw;
  }
}

.product-table-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.product-table-row:hover {
  background-color: #f8fafc;
}

.product-table-row.selected-row {
  background-color: #f0fdf4 !important;
}

.drawer-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.drawer-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.drawer-close-btn {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.drawer-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* Two-column hero split on desktop */
.drawer-hero-split {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 640px) {
  .drawer-hero-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.drawer-image-carousel {
  position: relative;
  width: 100%;
  height: 310px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-image-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.drawer-image-carousel:hover img {
  transform: scale(1.03);
}

.drawer-discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--myntra-pink);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(255, 63, 108, 0.35);
}

.drawer-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 2px 0;
}

.drawer-thumb-img {
  width: 48px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.drawer-thumb-img:hover, .drawer-thumb-img.active {
  border-color: #0f172a;
  transform: translateY(-2px);
}

.drawer-info-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-info-block .brand-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drawer-info-block h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.drawer-product-title {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.drawer-sku {
  font-size: 11px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.drawer-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}

.drawer-price-row .price {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.drawer-price-row .mrp {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: line-through;
}
.product-detail-drawer.expanded .drawer-spec-grid {
  grid-template-columns: repeat(3, 1fr);
}

.product-detail-drawer.expanded .drawer-hero-split {
  grid-template-columns: 280px 1fr;
}

.product-detail-drawer.expanded .drawer-dod-grid {
  grid-template-columns: repeat(4, 1fr);
}

.drawer-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.drawer-spec-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.15s ease;
}

.drawer-spec-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.drawer-spec-pill .lbl {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.drawer-spec-pill .val {
  font-size: 12px;
  color: #0f172a;
  font-weight: 700;
  margin-top: 2px;
  display: block;
}

.drawer-savings-badge {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.drawer-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #10b981;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.drawer-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.drawer-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
  flex-shrink: 0;
}

.drawer-policy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.drawer-policy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: #475569;
}

.drawer-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.drawer-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
}

.drawer-meta-grid span {
  color: var(--text-muted);
}

.drawer-meta-grid strong {
  color: var(--text-primary);
  display: block;
}

.size-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.drawer-size-pill {
  border: 1px solid var(--border-card);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.drawer-ai-insight-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 11px;
  color: #78350f;
  line-height: 1.4;
}

.drawer-ai-insight-box strong {
  display: block;
  margin-bottom: 2px;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.btn-primary-full {
  background: #0f172a;
  color: white;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-secondary-full {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 9px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}

/* ==========================================================================
   VIEW 3: PRODUCT COMPARE SUITE (Image 3)
   ========================================================================== */
.compare-layout-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.compare-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.compare-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.compare-prod-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.compare-prod-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn-remove-compare {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-remove-compare:hover {
  background: #fee2e2;
  color: #dc2626;
}

.compare-card-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #f8fafc;
}

.compare-card-brand {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.compare-card-title {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.compare-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.compare-card-price-row .price {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.compare-card-price-row .mrp {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.compare-card-price-row .disc {
  font-size: 11px;
  font-weight: 800;
  color: #dc2626;
}

.compare-add-slot {
  background: #fafafa;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 24px;
  min-height: 180px;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.compare-add-slot:hover {
  border-color: #ff3f6c;
  background: #fff5f7;
  color: #ff3f6c;
}

.compare-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
}

.compare-metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.compare-metrics-table tr {
  border-bottom: 1px solid var(--border-light);
}

.compare-metrics-table td {
  padding: 10px 12px;
}

.compare-metrics-table td:first-child {
  font-weight: 700;
  color: var(--text-muted);
  width: 160px;
}

.trend-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  display: inline-block;
}

.trend-badge.high { background: #d1fae5; color: #065f46; }
.trend-badge.growing { background: #d1fae5; color: #065f46; }
.trend-badge.stable { background: #ffedd5; color: #9a3412; }
.trend-badge.declining { background: #fee2e2; color: #991b1b; }

.compare-charts-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.comp-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.comp-chart-card h4 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.comp-chart-wrap {
  height: 120px;
  position: relative;
}

/* Compare Right AI Insights Sidebar (Image 3) */
.compare-insights-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.ai-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.badge-beta {
  background: #f1f5f9;
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.ai-insight-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-insight-item {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-insight-badge {
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-insight-badge.best_value { color: #059669; }
.ai-insight-badge.customer_fav { color: #d97706; }
.ai-insight-badge.inventory_strength { color: #3b82f6; }
.ai-insight-badge.watch_trend { color: #dc2626; }

.ai-insight-item p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-dark-full {
  background: #0f172a;
  color: white;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-dark-full:hover {
  background: #1e293b;
}

/* ==========================================================================
   RIGHT SIDEBAR: LAL10 AI COPILOT DRAWER (Images 1 & 3)
   ========================================================================== */
.ai-copilot-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 340px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-card);
  box-shadow: var(--shadow-drawer);
  z-index: 80;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-copilot-drawer.active {
  right: 0;
}

.copilot-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.red-lantern-badge {
  background: #fee2e2;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copilot-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-close-copilot {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
}

.copilot-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.copilot-chat-bubble {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #78350f;
}

.copilot-chat-bubble.assistant {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

.copilot-chat-bubble.user {
  background: #0f172a;
  color: white;
  align-self: flex-end;
  border-radius: 12px 12px 2px 12px;
}

.bubble-greeting {
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.copilot-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-action-btn {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.quick-action-btn:hover {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}

.chat-stream-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copilot-footer {
  padding: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copilot-input-row {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 4px 6px 4px 14px;
}

.copilot-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
}

.btn-copilot-send {
  background: #0f172a;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.suggested-queries-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggested-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.suggested-query-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 3px 0;
  transition: var(--transition);
}

.suggested-query-item:hover {
  color: #0f172a;
  font-weight: 600;
}

.silk-quote-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 14px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border: 1px solid var(--border-card);
}

.silk-quote-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
}

.silk-quote-text {
  position: relative;
  z-index: 2;
  font-size: 11px;
}

.silk-quote-text strong {
  display: block;
  color: var(--text-primary);
}

.silk-quote-text span {
  color: var(--text-muted);
}

/* ==========================================================================
   MODALS, BUTTONS & UTILITIES
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
  background: #ffffff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: #0f172a;
  color: white;
}

.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-card);
  color: var(--text-primary);
}

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

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

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

/* Live Console Logs */
.console-box {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.console-header {
  background: #1e293b;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}

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

.console-dot.green { background: #10b981; }

.btn-clear-logs {
  margin-left: auto;
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
}

.console-logs {
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #38bdf8;
  max-height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Exports Grid */
.exports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.export-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-icon {
  font-size: 28px;
}

.export-card h3 {
  font-size: 15px;
  font-weight: 800;
}

.export-card p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   COLOR INTELLIGENCE & PALETTE STYLES
   ========================================================================== */
.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.color-swatch-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.color-swatch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border-color: #cbd5e1;
}

.color-swatch-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-swatch-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.color-swatch-title-wrap {
  overflow: hidden;
}

.color-swatch-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.color-swatch-hex {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
  text-transform: uppercase;
}

.color-swatch-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding-top: 8px;
  border-top: 1px solid var(--border-color, #f1f5f9);
}

.color-swatch-metrics-row strong {
  color: var(--text-main, #0f172a);
}

.color-progress-track {
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.color-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   BRANDS INTELLIGENCE SUITE
   ========================================================================== */
.brand-pricing-power-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.brand-pricing-power-badge.high {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.brand-pricing-power-badge.moderate {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.brand-pricing-power-badge.low {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.brand-detail-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: 480px;
  max-width: 90vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-detail-drawer.active {
  right: 0;
}

/* ==========================================================================
   SIZE-WISE INVENTORY & DAY-OVER-DAY STYLES
   ========================================================================== */
.tbl-size-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 3px;
  margin-bottom: 2px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.tbl-size-pill.in-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tbl-size-pill.low-pill {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tbl-size-pill.oos-pill {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
  text-decoration: line-through;
  opacity: 0.8;
}

.tbl-size-more {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  cursor: help;
}

.tbl-dod-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  display: block;
  width: fit-content;
}

.tbl-dod-badge.drop {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tbl-dod-badge.hike {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.tbl-dod-sales {
  font-size: 10px;
  font-weight: 700;
  color: #ea580c;
  margin-top: 2px;
}

.tbl-dod-restock {
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 2px;
}

/* Movement Filter Chips Toolbar */
.mv-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  margin-bottom: 8px;
}

.mv-chip {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mv-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.mv-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

.date-select-wrap, .size-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.date-select-wrap select, .size-select-wrap select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  outline: none;
}

/* Drawer Size Breakdown Table */
.drawer-size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 8px;
}

.drawer-size-table th {
  text-align: left;
  padding: 6px 8px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
}

.drawer-size-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.drawer-size-bar-wrap {
  width: 60px;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.drawer-size-bar {
  height: 100%;
  border-radius: 3px;
  background: #10b981;
}

.drawer-size-bar.low {
  background: #f59e0b;
}

.drawer-size-bar.oos {
  background: #ef4444;
}

/* Drawer Day-over-Day Card */
.drawer-dod-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
}

.drawer-dod-card h4 {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-dod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 11px;
}

.drawer-dod-item {
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.drawer-dod-item span {
  display: block;
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.drawer-dod-item strong {
  font-size: 13px;
  color: #0f172a;
  font-weight: 800;
}

.drawer-dod-item small {
  font-size: 10px;
  font-weight: 700;
}

/* Day over day view layout */
.dod-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dod-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.dod-kpi-card .icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.dod-kpi-card .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.dod-kpi-card .value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.dod-kpi-card .subtext {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
}

.dod-kpi-card .subtext.warn {
  color: #ea580c;
}

/* Size intelligence section */
.size-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.size-intel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.size-intel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.size-intel-card .size-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.size-intel-card .size-units {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  margin: 4px 0;
}

.size-intel-card .size-oos-rate {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

.size-intel-card .size-bar-wrap {
  width: 100%;
  height: 4px;
  background: #f1f5f9;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.size-intel-card .size-bar-fill {
  height: 100%;
  background: #059669;
}


