/* Import main Pramukh Polytech site tokens & base styling */
@import url("../styles.css");

/* ==========================================================================
   Polymer Price Monitor Subpage Unified Styles
   ========================================================================== */

/* Subpage Secondary Navigation Sub-Bar */
.subpage-nav-bar {
  background: #0d2838;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.subpage-nav-container {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
}

.subpage-nav-container::-webkit-scrollbar {
  display: none;
}

.subpage-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  color: #94a3b8;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.subpage-nav-link:hover {
  color: var(--color-white);
}

.subpage-nav-link.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 700;
}

/* Hero Banner Section */
.price-hero-section {
  padding-top: calc(var(--header-height) + var(--space-4));
  padding-bottom: var(--space-6);
  background: linear-gradient(180deg, var(--color-primary) 0%, #0c2535 100%);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.price-hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(22, 198, 209, 0.14) 0%, transparent 60%);
  pointer-events: none;
}

.hero-top-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.demo-data-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(22, 198, 209, 0.15);
  border: 1px solid rgba(22, 198, 209, 0.4);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.last-updated-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.price-hero-title {
  font-size: clamp(2rem, 4vw, 3.125rem);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  margin: var(--space-1) 0 var(--space-2) 0;
  line-height: 1.15;
}

.price-hero-subtitle {
  max-width: 760px;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #e2e8f0;
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.fixture-notice-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 0.875rem;
  color: #f1f5f9;
}

.fixture-notice-banner svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

/* Section Header Compact */
.section-header-compact {
  margin-bottom: var(--space-3);
}

.section-header-compact h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  color: var(--color-primary);
  margin: 0 0 4px 0;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.section-header-compact p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin: 0;
}

/* Polymer Summary Cards */
.summary-cards-section {
  padding: var(--space-5) 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-3);
}

.polymer-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.polymer-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  height: 100%;
}

.polymer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(21, 63, 87, 0.08);
  border-color: #b0bec5;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.polymer-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.badge-pp { background: #e0f2fe; color: #0369a1; }
.badge-hdpe { background: #dcfce7; color: #15803d; }
.badge-lldpe { background: #fef3c7; color: #b45309; }
.badge-ldpe { background: #fae8ff; color: #86198f; }
.badge-pvc { background: #fee2e2; color: #b91c1c; }

.polymer-full-name {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 600;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.card-price-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.card-price-unit {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 600;
}

.card-price-alt {
  font-size: 0.78125rem;
  color: var(--color-muted);
  margin-top: 2px;
  margin-bottom: var(--space-2);
}

.card-metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border);
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.metric-change.up { color: #16a34a; }
.metric-change.down { color: #dc2626; }
.metric-change.neutral { color: var(--color-muted); }

.indicator-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-up { background: #dcfce7; color: #15803d; }
.tag-down { background: #fee2e2; color: #b91c1c; }
.tag-neutral { background: #f1f5f9; color: #475569; }

/* Source Types Legend */
.source-types-section {
  padding: var(--space-4) 0;
  background: var(--color-section);
  border-bottom: 1px solid var(--color-border);
}

.source-types-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}

.source-types-header h3 {
  font-size: 1.125rem;
  color: var(--color-primary);
  margin: 0 0 4px 0;
  font-weight: 700;
}

.source-types-header p {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0 0 var(--space-3) 0;
}

.source-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}

.source-type-item {
  padding: 16px;
  background: var(--color-section);
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
}

.source-type-item.producer { border-left-color: #0284c7; }
.source-type-item.market-source { border-left-color: #16a34a; }
.source-type-item.indication { border-left-color: #d97706; }

.source-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.badge-official { background: #e0f2fe; color: #0369a1; }
.badge-market { background: #dcfce7; color: #15803d; }
.badge-indication { background: #fef3c7; color: #b45309; }

/* Pricing Matrix & Filtering */
.pricing-matrix-section {
  padding: var(--space-5) 0;
  background: var(--color-background);
}

.filter-wrapper {
  background: var(--color-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}

.filter-tabs-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
}

.polymer-filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.polymer-filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  border-radius: var(--radius-button);
  color: var(--color-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease;
}

.filter-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-tab.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(21, 63, 87, 0.2);
}

.search-and-dropdowns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  font-size: 0.875rem;
  background: var(--color-white);
}

.search-box input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--color-highlight);
  box-shadow: 0 0 0 3px rgba(23, 137, 212, 0.15);
}

.filter-select {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  font-size: 0.875rem;
  background: var(--color-white);
  color: var(--color-secondary);
  cursor: pointer;
}

.table-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.table-results-header h2 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin: 0;
  font-weight: 700;
}

.result-count-badge {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 600;
}

/* Sortable Table Headers */
th[data-sort] {
  cursor: pointer;
  user-select: none;
  position: relative;
}

th[data-sort]:hover {
  background: #e2e8f0;
}

th[data-sort]::after {
  content: " ↕";
  opacity: 0.4;
  font-size: 0.75rem;
}

th[data-sort].sorted[data-direction="asc"]::after {
  content: " ↑";
  opacity: 1;
  color: var(--color-accent);
}

th[data-sort].sorted[data-direction="desc"]::after {
  content: " ↓";
  opacity: 1;
  color: var(--color-accent);
}

/* Price Matrix Table */
.table-responsive-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-white);
}

.price-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.price-matrix-table th {
  background: var(--color-section);
  color: var(--color-primary);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.price-matrix-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.price-matrix-table tbody tr {
  transition: background-color 150ms ease;
  cursor: pointer;
}

.price-matrix-table tbody tr:hover {
  background-color: #f1f5f9;
}

.table-price-main {
  font-weight: 800;
  font-size: 0.9375rem;
  color: var(--color-primary);
}

.table-price-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.action-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--color-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  color: var(--color-primary);
  font-size: 0.78125rem;
  font-weight: 700;
  transition: all 150ms ease;
}

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

/* Price Detail Page Styling */
.detail-breadcrumbs {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

.detail-breadcrumbs a {
  color: var(--color-primary);
  font-weight: 600;
}

.detail-header-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 16px rgba(21, 63, 87, 0.05);
}

.detail-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-location-badge {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 600;
}

.detail-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 6px 0;
  letter-spacing: var(--tracking-tight);
}

.detail-subhead {
  font-size: 0.9375rem;
  color: var(--color-muted-strong);
  margin: 0 0 var(--space-3) 0;
}

.detail-price-box {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.detail-price-main {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.detail-price-main .unit {
  font-size: 1rem;
  color: var(--color-muted);
  font-weight: 600;
}

.detail-price-mt {
  font-size: 1.125rem;
  color: var(--color-muted-strong);
  font-weight: 600;
}

.detail-change-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.detail-change-pill.up { background: #dcfce7; color: #15803d; }
.detail-change-pill.down { background: #fee2e2; color: #b91c1c; }
.detail-change-pill.neutral { background: #f1f5f9; color: #475569; }

.detail-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.detail-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}

.detail-section-title {
  font-size: 1.125rem;
  color: var(--color-primary);
  margin: 0 0 var(--space-3) 0;
  font-weight: 700;
}

.metadata-grid {
  display: flex;
  flex-direction: column;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.meta-row:last-child {
  border-bottom: none;
}

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

.meta-val {
  font-weight: 600;
  color: var(--color-secondary);
  text-align: right;
}

.meta-val.highlight {
  color: var(--color-primary);
  font-weight: 800;
}

.external-link {
  color: var(--color-highlight);
  font-weight: 700;
}

/* Interactive SVG Trend Chart */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-header h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin: 0;
  font-weight: 700;
}

.chart-header span {
  font-size: 0.78125rem;
  color: var(--color-muted);
}

.svg-chart-wrapper {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px;
}

.trend-svg {
  width: 100%;
  height: auto;
  display: block;
}

.revision-note-box {
  background: var(--color-section);
  border-left: 4px solid var(--color-primary);
  padding: 16px;
  border-radius: 6px;
}

.revision-note-box h4 {
  margin: 0 0 6px 0;
  font-size: 0.9375rem;
  color: var(--color-primary);
}

.revision-note-box p {
  margin: 0 0 12px 0;
  font-size: 0.84375rem;
  color: var(--color-muted-strong);
  line-height: 1.5;
}

.note-meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* News Feed Grid & Cards */
.price-changes-section {
  padding: var(--space-5) 0;
  background: var(--color-section);
  border-top: 1px solid var(--color-border);
}

.news-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-3);
}

.news-feed-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.news-card-date {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 600;
}

.news-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px 0;
  line-height: 1.35;
}

.news-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.news-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: #f1f5f9;
  border-radius: 4px;
  color: var(--color-muted-strong);
}

.news-card-summary {
  font-size: 0.875rem;
  color: var(--color-muted-strong);
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* Footer layout matching Pramukh Polytech website */
.site-footer {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 48px 0 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 360px;
}

.footer-heading {
  color: var(--color-white);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 2;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 150ms ease;
}

.footer-links a:hover,
.active-footer-link {
  color: var(--color-accent) !important;
}

.footer-contact {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.68;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.footer-legal a {
  color: #cbd5e1;
}

.footer-legal span {
  margin: 0 8px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .detail-layout-grid {
    grid-template-columns: 1fr;
  }

  .search-and-dropdowns {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .price-hero-section {
    padding-top: calc(var(--header-height) + var(--space-4));
  }

  .search-and-dropdowns {
    grid-template-columns: 1fr;
  }

  .summary-cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Phase 6 — Frontend Intelligence & Interactive Dashboard Styles
   ========================================================================== */

/* Market Snapshot Metric Bar */
.market-snapshot-section {
  padding: 24px 0;
  background: var(--color-surface, #ffffff);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}

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

.snapshot-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

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

.snapshot-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.snapshot-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-primary, #0f2c3f);
  line-height: 1.2;
}

.snapshot-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
}

/* Freshness Badges */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.freshness-current {
  background: #dcfce7;
  color: #166534;
}

.freshness-recent {
  background: #e0f2fe;
  color: #0369a1;
}

.freshness-stale {
  background: #fef3c7;
  color: #92400e;
}

/* Chart Container & Controls */
.chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-title-group h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary, #0f2c3f);
}

.chart-title-group p {
  margin: 2px 0 0 0;
  font-size: 0.84375rem;
  color: #64748b;
}

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

.chart-range-btn {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 150ms ease;
}

.chart-range-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.chart-range-btn.active {
  background: var(--color-primary, #0f2c3f);
  color: #ffffff;
  border-color: var(--color-primary, #0f2c3f);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
}

/* Cross-Source Verification & Discrepancies Grid */
.verification-section {
  padding: 32px 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.verification-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.verification-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}

.v-polymer-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary, #0f2c3f);
}

.v-spread-badge {
  padding: 4px 10px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0369a1;
}

.v-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.v-metric-box {
  background: #f8fafc;
  padding: 10px;
  border-radius: 6px;
}

.v-metric-label {
  font-size: 0.75rem;
  color: #64748b;
}

.v-metric-val {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.v-sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.v-source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #f1f5f9;
}

.v-source-item:last-child {
  border-bottom: none;
}

/* Discrepancy Alert Box */
.discrepancy-alert-box {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.discrepancy-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 8px;
}

.discrepancy-desc {
  font-size: 0.875rem;
  color: #7c2d12;
  margin: 0;
  line-height: 1.5;
}

/* System Health & Data Status Panel */
.health-status-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-top: 24px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.health-item {
  display: flex;
  flex-direction: column;
}

.health-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 2px;
}

.health-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

/* Provenance Modal Styles */
.provenance-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.provenance-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.provenance-modal-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px);
  transition: transform 200ms ease;
}

.provenance-modal-overlay.is-open .provenance-modal-container {
  transform: translateY(0);
}

.provenance-modal-header {
  padding: 20px 24px;
  background: var(--color-primary, #0f2c3f);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.provenance-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tag-official {
  background: rgba(22, 198, 209, 0.2);
  color: var(--color-accent, #16c6d1);
  border: 1px solid rgba(22, 198, 209, 0.4);
}

.tag-market {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.provenance-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.provenance-modal-close {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 150ms ease;
}

.provenance-modal-close:hover {
  color: #ffffff;
}

.provenance-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.875rem;
}

.provenance-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provenance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.p-label {
  color: #64748b;
  font-weight: 500;
}

.p-val {
  color: #0f172a;
  text-align: right;
}

.p-highlight {
  color: #0284c7;
  font-weight: 700;
}

.provenance-notes-card {
  margin-top: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.notes-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.notes-text {
  margin: 0;
  font-size: 0.84375rem;
  color: #334155;
  line-height: 1.5;
}


/* ==========================================================================
   Phase 8 — Polymer Price Intelligence, Comparison & Watchlist Styles
   ========================================================================== */

/* Floating Comparison Action Bar / Drawer */
.comparison-floating-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 200ms ease, opacity 200ms ease;
}

.comparison-floating-bar.hidden {
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.comparison-floating-bar .btn-compare-action {
  background: var(--color-accent, #16c6d1);
  color: #0f172a;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8125rem;
}

.comparison-floating-bar .btn-compare-action:hover {
  background: #14b4be;
}

.comparison-floating-bar .btn-clear-action {
  background: transparent;
  color: #94a3b8;
  border: none;
  cursor: pointer;
  font-size: 0.8125rem;
}

.comparison-floating-bar .btn-clear-action:hover {
  color: #ffffff;
}

/* Watchlist Badge & Section */
.watchlist-badge-new {
  display: inline-block;
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 6px;
}

.btn-watchlist-toggle {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 150ms ease;
}

.btn-watchlist-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-watchlist-toggle.is-active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
}

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

.watchlist-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  position: relative;
}

.watchlist-item-card.has-new-event {
  border-left: 4px solid #3b82f6;
}

.watchlist-item-card.is-stale {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

/* Print View Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .site-header,
  .subpage-nav-bar,
  .nav-toggle,
  .polymer-filter-tabs,
  .search-and-dropdowns,
  .comparison-floating-bar,
  .button,
  .action-btn-sm,
  .btn-watchlist-toggle,
  .site-footer,
  .chart-controls-group {
    display: none !important;
  }

  .price-hero-section {
    padding: 12px 0 !important;
  }

  .pricing-matrix-section,
  .verification-section,
  .chart-section {
    padding: 0 !important;
    page-break-inside: avoid;
  }

  .table-responsive-wrapper {
    overflow: visible !important;
  }

  .price-matrix-table {
    border: 1px solid #000000 !important;
  }

  .price-matrix-table th,
  .price-matrix-table td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
}


