/* Gold Deal Finder 2026 Premium Fintech Design System */

:root {
  /* Light Palette - Warm Ivory & Muted Gold */
  --bg: #faf8f5;
  --bg-subtle: #f3efe8;
  --surface: #ffffff;
  --surface-hover: #fcfbfa;
  --surface-active: #f7f4ef;
  --border: #e8e4df;
  --border-subtle: #f0ece6;
  --border-strong: #c8c2b7;

  --text-primary: #1a1a1a;
  --text-secondary: #5e5953;
  --text-muted: #8c857b;

  --gold: #c5a059;
  --gold-hover: #b38f48;
  --gold-light: #f7f2e6;
  --gold-border: #e2d1a8;

  --success: #15803d;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Geometry & Elevation */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 6px rgba(26, 26, 26, 0.05);
  --shadow-md: 0 8px 20px rgba(26, 26, 26, 0.07);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.1);

  --header-height: 64px;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 64px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

:root.dark {
  /* Dark Palette - Near-black Charcoal Trading Terminal */
  --bg: #0f1115;
  --bg-subtle: #14171d;
  --surface: #181b20;
  --surface-hover: #1f232a;
  --surface-active: #262b34;
  --border: #262a33;
  --border-subtle: #1e2229;
  --border-strong: #3d4352;

  --text-primary: #f0f2f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --gold: #d4af37;
  --gold-hover: #e5c158;
  --gold-light: rgba(212, 175, 55, 0.12);
  --gold-border: rgba(212, 175, 55, 0.3);

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.25);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.25);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[v-cloak] {
  display: none !important;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography Helpers */
.serif-heading {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.num-tabular {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.font-mono {
  font-family: var(--font-mono);
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Sticky App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-sidebar-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-sidebar-toggle:hover {
  background: var(--surface-active);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold), #9a7632);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(197, 160, 89, 0.3);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.spot-price-ticker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.spot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0px rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0px rgba(34, 197, 94, 0); }
}

.spot-label {
  color: var(--text-muted);
  font-weight: 500;
}

.spot-val {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Icon Buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: var(--surface-active);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.badge-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform 0.1s ease;
}
.btn-primary:hover {
  background: var(--gold-hover);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-secondary:hover {
  background: var(--surface-active);
  border-color: var(--border-strong);
}

/* App Main Layout */
.app-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0.6rem;
  transition: width var(--transition-normal), background-color var(--transition-normal);
  user-select: none;
  flex-shrink: 0;
}

.app-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem;
  white-space: nowrap;
}
.app-sidebar.collapsed .nav-section-label {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--gold-light);
  color: var(--gold);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--gold);
}

.nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.app-sidebar.collapsed .nav-item span,
.app-sidebar.collapsed .nav-item .nav-badge {
  display: none;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}
.nav-item.active .nav-badge {
  background: var(--gold);
  color: white;
  border: none;
}

/* Main Content Surface */
.app-main {
  flex: 1;
  padding: 1.25rem 1.75rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Market Status Metrics Bar */
.market-status-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.metric-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color var(--transition-fast);
}
.metric-pill:hover {
  border-color: var(--border-strong);
}

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

.metric-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

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

/* Scan Control Strip */
.scan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.scan-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.scan-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.scan-id-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.scan-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Compact Filter Bar */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.filter-row-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrapper i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.input-control {
  width: 100%;
  height: 34px;
  padding: 0 0.75rem;
  padding-left: 2.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}
.input-control:focus {
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--gold-light);
}

.select-control {
  height: 34px;
  padding: 0 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.select-control:focus {
  border-color: var(--gold);
}

.active-chips-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-subtle);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}
.filter-chip button {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.75rem;
}
.filter-chip button:hover {
  color: var(--text-primary);
}

.btn-clear-filters {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  margin-left: 0.25rem;
}
.btn-clear-filters:hover {
  color: var(--danger);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 580px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* High-Density Product Card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}
.product-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.product-card.best-deal-card {
  border-color: var(--gold-border);
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--surface) 20%);
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.vendor-badge {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.best-value-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--gold);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

.card-image-wrap {
  width: calc(100% - 1rem);
  margin: 0.5rem auto 0;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.dark .card-image-wrap {
  background: #1c2027;
  border-color: rgba(255, 255, 255, 0.06);
}

.product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}
.product-card:hover .product-img {
  transform: scale(1.04);
}

.savings-ribbon {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--success);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.savings-ribbon.negative {
  background: var(--danger);
}

.card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

.card-price-matrix {
  margin-top: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-main-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.selling-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.expected-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-decoration: line-through;
}

.price-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.btn-shortlist-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}
.btn-shortlist-icon:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.btn-shortlist-icon.active {
  background: var(--gold-light);
  color: var(--gold);
  border-color: var(--gold);
}

.btn-view-deal {
  flex: 1;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.btn-view-deal:hover {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

/* Table Pagination */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-page {
  min-width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-page:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.btn-page.active {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}
.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Data Table (Archive & Shortlist) */
.data-table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

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

/* Insights Analytics Layout */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-container-wrap {
  height: 260px;
  position: relative;
}

/* Command Palette Overlay */
.palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.palette-box {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-pop 0.15s ease;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.palette-search-bar {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}
.palette-search-bar i {
  color: var(--text-muted);
  font-size: 1rem;
}
.palette-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.palette-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.palette-item:hover {
  background: var(--bg-subtle);
}

/* Drawers & Modals */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  height: 100%;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

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

.drawer-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.drawer-body {
  padding: 1.25rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Toast Notification Stack */
.toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  color: var(--text-primary);
  animation: toast-slide 0.2s ease;
}

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

.toast.toast-success {
  border-color: var(--success-border);
  background: var(--surface);
}
.toast.toast-success i {
  color: var(--success);
}

.toast.toast-error {
  border-color: var(--danger-border);
}
.toast.toast-error i {
  color: var(--danger);
}

.toast.toast-info i {
  color: var(--gold);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border-subtle) 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

/* Responsive Mobile Handling */
@media (max-width: 768px) {
  .app-header {
    padding: 0 0.85rem;
  }
  .header-center {
    display: none;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .app-main {
    padding: 0.75rem;
    padding-bottom: 75px !important;
  }
  .app-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 80;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .app-sidebar.mobile-open {
    transform: translateX(0);
  }
  .market-status-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Mobile Bottom Navigation */
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 90;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
  }

  .mobile-nav-item i {
    font-size: 1.1rem;
  }

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

  .mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: 20%;
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--bg-subtle);
    color: var(--text-primary);
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
  }

  .mobile-nav-badge.highlight {
    background: var(--gold);
    color: #ffffff;
    border: none;
  }

  /* Mobile Filter Row */
  .filter-bar {
    padding: 0.5rem 0.65rem;
  }
  .filter-row-inline {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  .search-input-wrapper {
    width: 100%;
    min-width: 100%;
  }
  .select-control {
    flex: 1;
    height: 36px;
    font-size: 0.78rem;
  }

  /* Mobile Drawer Bottom Sheet */
  .filter-drawer {
    width: 100% !important;
    max-width: 100% !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    top: auto !important;
    bottom: 0 !important;
    max-height: 85vh;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  }
}

/* Dealer Rates Banner Container & Cards */
.dealer-rates-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .dealer-rates-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
  }
  .dealer-rates-container::-webkit-scrollbar {
    display: none;
  }
  .rate-banner-card {
    min-width: 290px;
    max-width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.rate-banner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.rate-banner-card.bhima-card {
  border-left: 4px solid var(--gold-primary);
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-subtle) 100%);
}

.rate-banner-card.kalyan-card {
  border-left: 4px solid var(--success);
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-subtle) 100%);
}

.rate-banner-card.tanishq-card {
  border-left: 4px solid #b91c1c;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-subtle) 100%);
}

.rate-banner-card.mmtc-card {
  border-left: 4px solid #2563eb;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-subtle) 100%);
}

.rate-banner-card.josalukkas-card {
  border-left: 4px solid #e65100;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-subtle) 100%);
}

.rate-banner-card:hover {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-md);
}

.rate-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.rate-banner-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.rate-banner-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.rate-banner-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.rate-banner-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(197, 160, 89, 0.25);
  text-transform: uppercase;
}

.rate-banner-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rate-metric {
  display: flex;
  flex-direction: column;
}

.rate-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rate-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.currency-symbol {
  font-size: 0.9rem;
  margin-right: 2px;
  color: var(--text-secondary);
}

.rate-value .unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.rate-footnote {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.rate-divider {
  width: 1px;
  height: 38px;
  background: var(--border-subtle);
}

.rate-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-rate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gold-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn-rate-link:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
}

.rate-banner-slot {
  border: 1px dashed var(--border);
  background: var(--bg-subtle);
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.rate-banner-slot:hover {
  border-color: var(--gold-primary);
  background: var(--surface);
}

.slot-plus-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.85rem;
}

/* ==========================================================================
   INTERACTIVE INVESTMENT & CALCULATION SUITE
   ========================================================================== */

.calc-suite-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.calc-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.calc-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.calc-tab-btn i {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.calc-tab-btn.active {
  color: var(--text-primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

.calc-tab-btn.active i {
  color: var(--gold);
}

.calc-main-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .calc-main-card {
    grid-template-columns: 1fr;
  }
}

.calc-form-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-form-title i {
  color: var(--gold);
}

.calc-form-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.calc-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.calc-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.calc-field-group.full-width {
  grid-column: 1 / -1;
}

.calc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-label-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: none;
}

.segmented-group {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.seg-btn {
  flex: 1;
  min-width: 55px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.seg-btn.active {
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-subtle);
}

.range-slider-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calc-range-slider {
  flex: 1;
  height: 6px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Calculator Output Panel */
.calc-output-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  gap: 1rem;
}

.calc-output-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.calc-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.breakdown-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breakdown-row strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.breakdown-row.discount-row strong {
  color: var(--success);
}

.breakdown-row.highlight-row {
  background: var(--surface);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.breakdown-row.highlight-row strong {
  color: var(--gold);
  font-size: 0.95rem;
}

.calc-total-banner {
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.calc-total-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #e5c158);
}

.calc-total-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.calc-total-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.calc-total-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Product Card Melt Value Deconstruction Strip */
.card-melt-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  margin: 0.5rem 0;
  font-size: 0.72rem;
}

.card-melt-info {
  display: flex;
  flex-direction: column;
}

.card-melt-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.card-melt-val {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.btn-calc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-calc-pill:hover {
  background: var(--gold-light);
  color: var(--gold);
  border-color: var(--gold-border);
}

/* ==========================================================================
   MULTI-KARAT LIVE SPOT MATRIX & INDIAN UNITS
   ========================================================================== */

.multi-karat-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.matrix-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.matrix-title i {
  color: var(--gold);
}

.matrix-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.matrix-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.matrix-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-border);
}

.matrix-card.featured {
  border-color: var(--gold-border);
  background: linear-gradient(180deg, var(--gold-light), var(--bg-subtle));
}

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

.matrix-karat {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.matrix-hallmark {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.matrix-rate {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.matrix-unit-tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   GOLD-TO-SILVER RATIO (GSR) VALUATION METER
   ========================================================================== */

.gsr-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.gsr-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 850px) {
  .gsr-grid {
    grid-template-columns: 1fr;
  }
}

.gsr-main-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 1.25rem;
  border-right: 1px solid var(--border-subtle);
}

@media (max-width: 850px) {
  .gsr-main-stat {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 0;
    padding-bottom: 1rem;
  }
}

.gsr-ratio-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.gsr-ratio-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.gsr-ratio-value span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.gsr-ratio-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gsr-meter-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gsr-meter-bar {
  position: relative;
  height: 22px;
  background: var(--bg-subtle);
  border-radius: 20px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border);
}

.gsr-zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gsr-zone.gold-favored {
  background: rgba(197, 160, 89, 0.2);
  color: var(--gold);
}

.gsr-zone.fair-zone {
  background: rgba(21, 128, 61, 0.15);
  color: var(--success);
}

.gsr-zone.silver-favored {
  background: rgba(99, 102, 241, 0.18);
  color: #6366f1;
}

.gsr-pointer {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 5px;
  background: var(--text-primary);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  transform: translateX(-50%);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.gsr-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.gsr-insight-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
}

.gsr-insight-card i {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 0.1rem;
}

/* ==========================================================================
   AUSPICIOUS GOLD BUYING CALENDAR (SHUBH MUHURAT)
   ========================================================================== */

.muhurat-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.muhurat-featured-box {
  background: linear-gradient(135deg, var(--surface), var(--gold-light));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.muhurat-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-border);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.muhurat-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.muhurat-date-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.muhurat-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--gold-border);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  box-shadow: var(--shadow-xs);
}

.muhurat-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.muhurat-toggle-btn:hover {
  background: var(--surface-hover);
}

.muhurat-drawer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.muhurat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.muhurat-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.muhurat-card.next {
  border-color: var(--gold-border);
  background: var(--gold-light);
}

.muhurat-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.muhurat-card-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.muhurat-card-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 0.25rem;
}

/* ==========================================================================
   STICKY 1-CLICK WHATSAPP SHARE WIDGET
   ========================================================================== */

.sticky-wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .sticky-wa-float {
    bottom: 70px;
    right: 15px;
  }
}

.btn-wa-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #ffffff;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-wa-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.btn-wa-copy {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-wa-copy:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ==========================================================================
   LIVE SCAN PROGRESS MODAL & FLOATING MINIMIZED DOCK
   ========================================================================== */

.scan-progress-overlay {
  z-index: 1001;
  background: rgba(10, 15, 29, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scan-progress-box {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.scan-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.scan-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.scan-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  width: fit-content;
}

.scan-status-pill.running {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.scan-status-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.scan-status-pill.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulseDot 1.5s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.scan-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.scan-id-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.scan-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.scan-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.scan-progress-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid var(--border);
}

.scan-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.scan-stat-item .stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.scan-stat-item .stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.scan-progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.scan-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #f59e0b, #10b981);
  transition: width 0.4s ease;
  position: relative;
}

.scan-bar-glow {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
  filter: blur(2px);
  animation: barShimmer 1.8s infinite linear;
}

@keyframes barShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.scan-sites-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.section-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}

.scan-sites-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.site-status-card {
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.site-status-card.running {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.06);
}

.site-status-card.completed {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.04);
}

.site-status-card.error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
}

.site-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.site-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.site-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.site-badge.pending {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.site-badge.running {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
}

.site-badge.completed {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.site-badge.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.site-card-msg {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-logs-section {
  padding: 0.85rem 1.25rem;
  flex: 1;
  min-height: 120px;
  max-height: 170px;
  display: flex;
  flex-direction: column;
}

.scan-logs-terminal {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  overflow-y: auto;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.log-entry {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  line-height: 1.35;
}

.log-time {
  color: var(--text-secondary);
  opacity: 0.7;
  font-size: 0.68rem;
}

.log-tag {
  color: var(--gold);
  font-weight: 600;
}

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

.log-entry.log-success .log-msg {
  color: #10b981;
}

.log-entry.log-error .log-msg {
  color: #ef4444;
}

.log-empty {
  color: var(--text-secondary);
  font-style: italic;
}

.scan-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  gap: 1rem;
}

.scan-tip {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* FLOATING MINIMIZED DOCK */
.scan-minimized-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 0.65rem 0.9rem;
  border-radius: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(212, 175, 55, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  animation: slideUpPill 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
}

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

.scan-minimized-dock:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 175, 55, 0.4);
}

.dock-radar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.dock-radar.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.dock-radar.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dock-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.dock-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dock-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.dock-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}

.dock-sub-row {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dock-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .scan-progress-box {
    max-height: 95vh;
  }
  .scan-progress-meta {
    grid-template-columns: repeat(2, 1fr);
  }
  .scan-sites-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .scan-minimized-dock {
    bottom: 75px;
    right: 15px;
    left: 15px;
    max-width: calc(100% - 30px);
  }
}



