/* ============================================================
   ZEROPACT PORTAL — Page-Specific Styles
   ============================================================ */

/* ---------- Dashboard ---------- */
.dashboard-welcome {
  margin-bottom: var(--space-8);
}

.dashboard-welcome h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.dashboard-welcome p {
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
}

.chart-card {
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow: hidden;
}

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

.chart-card-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

/* ---------- Products Grid / Table Toggle ---------- */
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.products-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.products-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.view-toggle {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-toggle button {
  padding: 8px 12px;
  font-size: 1rem;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.view-toggle button.active {
  background: var(--color-primary);
  color: white;
}

.view-toggle button:hover:not(.active) {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* Product Grid View */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

.product-grid-card {
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.product-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

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

.product-grid-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.product-grid-body {
  padding: var(--space-4);
}

.product-grid-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.product-grid-sku {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.product-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.product-co2 {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.product-co2 .unit {
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ---------- Product Detail ---------- */
.product-detail-header {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-6);
  align-items: stretch;
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-xl);
  background: var(--color-bg-alt);
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
}

.product-detail-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-1);
  line-height: 1.2;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.product-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.product-carbon-highlight {
  background: var(--color-primary-soft);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.carbon-main-value {
  text-align: center;
}

.carbon-number {
  font-size: 2.4rem;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1;
}

.carbon-unit {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.carbon-context {
  flex: 1;
}

.carbon-comparison {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  margin-bottom: 2px;
}

.carbon-comparison .highlight {
  color: var(--color-primary);
}

.carbon-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.lifecycle-phases {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .product-detail-header {
    grid-template-columns: 1fr;
  }
}

/* ---------- Integrations ---------- */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-6);
}

/* ---------- Green Claims ---------- */
.compliance-overview {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-8);
  align-items: center;
}

.compliance-score-ring {
  width: 180px;
  height: 180px;
  position: relative;
  margin: 0 auto;
}

.compliance-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.compliance-score-ring .bg-ring {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 12;
}

.compliance-score-ring .progress-ring {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-slow);
}

.compliance-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.compliance-score-number {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-primary);
  line-height: 1;
}

.compliance-score-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.compliance-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.compliance-stat {
  text-align: center;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.compliance-stat-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
}

.compliance-stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.compliance-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .compliance-overview {
    grid-template-columns: 1fr;
  }
}

/* ---------- DPP Coming Soon ---------- */
.dpp-coming-soon {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.dpp-illustration {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-8);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-soft), rgba(16, 185, 129, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

.dpp-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-4);
}

.dpp-desc {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto var(--space-8);
  line-height: var(--line-height-relaxed);
}

.dpp-features-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 800px;
  margin: 0 auto var(--space-10);
}

.dpp-feature {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}

.dpp-feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
}

.dpp-feature-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.dpp-feature-desc {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .dpp-features-preview {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reports ---------- */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.report-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  transition: all var(--transition-fast);
}

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

.report-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.report-info {
  flex: 1;
}

.report-name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

.report-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-4);
}

.report-actions {
  display: flex;
  gap: var(--space-2);
}
