/* Process detail page — charts & Excel tables */

.process-page {
  padding-top: 80px;
}

.process-hero {
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.process-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  transition: var(--transition);
}

.process-hero__back:hover {
  color: var(--color-primary-light);
}

.process-hero__title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
}

.process-hero__desc {
  max-width: 680px;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 17px;
}

/* Sticky step nav */
.process-nav {
  position: sticky;
  top: 68px;
  z-index: 50;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.process-nav__inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.process-nav__inner::-webkit-scrollbar {
  display: none;
}

.process-nav__link {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
}

.process-nav__link:hover,
.process-nav__link--active {
  color: #171717;
  background: rgba(230, 182, 0, 0.2);
  border-color: rgba(230, 182, 0, 0.4);
}

/* Step sections */
.process-detail {
  padding: 80px 0;
  border-bottom: 1px solid var(--color-border);
}

.process-detail:last-of-type {
  border-bottom: none;
}

.process-detail__header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
}

.process-detail__num {
  flex-shrink: 0;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.process-detail__meta h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
}

.process-detail__meta p {
  color: var(--color-text-muted);
  font-size: 16px;
  max-width: 720px;
}

.process-detail__duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(230, 182, 0, 0.1);
  border-radius: 100px;
}

.process-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.process-detail__grid--wide {
  grid-template-columns: 1.2fr 1fr;
}

.process-detail__full {
  margin-bottom: 32px;
}

/* Content blocks */
.detail-block {
  padding: 28px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.detail-block__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.detail-block__title svg {
  color: var(--color-primary-light);
  flex-shrink: 0;
}

.detail-list {
  list-style: none;
}

.detail-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.detail-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

.detail-list li strong {
  color: var(--color-text);
}

/* Chart container */
.chart-wrap {
  padding: 24px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.chart-wrap__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-wrap__title {
  font-size: 15px;
  font-weight: 700;
}

.chart-wrap__note {
  font-size: 11px;
  color: var(--color-text-dim);
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.chart-wrap__canvas {
  position: relative;
  height: 260px;
}

.chart-wrap__canvas--sm {
  height: 200px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chart-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.chart-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Excel-style table */
.xlsx {
  background: #1a1f2e;
  border: 1px solid #3a4556;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 12px;
}

.xlsx__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #217346;
  color: #171717;
  font-size: 12px;
  font-weight: 600;
}

.xlsx__filename {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xlsx__filename svg {
  opacity: 0.9;
}

.xlsx__tabs {
  display: flex;
  gap: 2px;
  padding: 0 8px;
  background: #2d3748;
  border-bottom: 1px solid #3a4556;
}

.xlsx__tab {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--color-text-dim);
  background: #1a1f2e;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: default;
}

.xlsx__tab--active {
  color: var(--color-text);
  background: #1a1f2e;
  border-color: #3a4556;
  font-weight: 600;
}

.xlsx__scroll {
  overflow-x: auto;
}

.xlsx table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.xlsx th,
.xlsx td {
  padding: 6px 10px;
  border: 1px solid #3a4556;
  text-align: left;
  white-space: nowrap;
}

.xlsx thead th {
  background: #2d3748;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.xlsx tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.xlsx tbody tr:hover {
  background: rgba(230, 182, 0, 0.06);
}

.xlsx .col-a {
  background: #2d3748;
  color: var(--color-text-dim);
  font-weight: 600;
  text-align: center;
  width: 36px;
  min-width: 36px;
}

.xlsx .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.xlsx .positive {
  color: var(--color-success);
}

.xlsx .negative {
  color: var(--color-danger);
}

.xlsx .code-1 {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  font-weight: 600;
}

.xlsx .code-2 {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  font-weight: 600;
}

.xlsx .code-3 {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  font-weight: 600;
}

.xlsx .code-4 {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-weight: 600;
}

.xlsx .total-row {
  background: rgba(230, 182, 0, 0.08) !important;
  font-weight: 700;
}

.xlsx .total-row td {
  border-top: 2px solid var(--color-primary);
}

/* KPI row under tables */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.kpi-mini {
  padding: 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
}

.kpi-mini__val {
  display: block;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.kpi-mini__val--good { color: var(--color-success); }
.kpi-mini__val--warn { color: var(--color-warning); }
.kpi-mini__val--bad { color: var(--color-danger); }

.kpi-mini__lbl {
  font-size: 11px;
  color: var(--color-text-dim);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
  margin-bottom: 20px;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 2px solid var(--color-bg);
}

.timeline__week {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary-light);
  margin-bottom: 4px;
}

.timeline__text {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* CTA bottom */
.process-cta {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.process-cta h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.process-cta p {
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

.process-step--link {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.process-step--link:hover {
  border-color: rgba(230, 182, 0, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(230, 182, 0, 0.12);
}

.process-step__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-light);
}

.section__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary-light);
  transition: var(--transition);
}

.section__cta-link:hover {
  gap: 12px;
}

@media (max-width: 1024px) {
  .process-detail__grid,
  .process-detail__grid--wide {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .process-detail__header {
    flex-direction: column;
    gap: 12px;
  }

  .process-detail__num {
    font-size: 48px;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }
}
