/* ==========================================================================
   TẠP HÓA VIỆT / XƯỞNG DỊCH TIẾN ĐỘ STYLES (progress.css)
   Mô hình 4 chặng: Dịch thuật -> Hiệu đính -> Font & UI -> Kiểm thử QA
   ========================================================================== */

.progress-page {
  padding: 32px 0 60px;
}

.progress-masthead {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.masthead-info {
  max-width: 600px;
}

.masthead-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 12px;
}

.masthead-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.2;
}

.masthead-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.masthead-metrics {
  display: flex;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 18px 24px;
  border-radius: var(--radius-md);
}

.metric-item {
  text-align: center;
}

.metric-item dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-item dd {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

/* Chú thích 4 công đoạn */
.production-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.trans { background: var(--accent-gold); }
.legend-dot.proof { background: var(--accent-cyan); }
.legend-dot.font { background: var(--accent-purple); }
.legend-dot.qa { background: var(--accent-green); }

/* Thanh lọc nhanh dự án xưởng dịch */
.progress-toolbar {
  margin-bottom: 24px;
}

.progress-filter-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prog-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #121316;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: #121316;
  box-shadow: 2px 2px 0px #121316;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prog-pill:hover {
  background: rgba(234, 72, 40, 0.08);
  color: var(--accent-orange, #EA4828);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #121316;
}

.prog-pill.active {
  background: var(--accent-orange, #EA4828);
  color: #FFFFFF;
  border-color: #121316;
  box-shadow: 2px 2px 0px #121316;
}

.prog-pill.active i {
  color: #FFFFFF !important;
}

/* Danh sách dự án xưởng dịch */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.progress-card {
  background: #FFFFFF;
  border: 2px solid #121316;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 210px 1.5fr 2fr 120px;
  align-items: center;
  gap: 24px;
  box-shadow: 4px 4px 0px #121316;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0px #121316;
}

/* Cột 1: Ảnh bìa game 460x215 */
.prog-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 460 / 215;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid #121316;
  box-shadow: 3px 3px 0px #121316;
  background: #121316;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prog-cover-wrap:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #121316;
}

.prog-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.prog-cover-wrap:hover .prog-cover-img {
  transform: scale(1.06);
}

.prog-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 8px;
}

.prog-status-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid #121316;
  box-shadow: 1px 1px 0px #121316;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.prog-status-pill.ready {
  background: #059669;
  color: #FFFFFF;
}

.prog-status-pill.wip {
  background: #EA4828;
  color: #FFFFFF;
}

/* Cột 2: Thông tin dự án */
.prog-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1.3;
}

.prog-info h3:hover {
  color: var(--accent-orange, #EA4828);
}

.prog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.prog-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cột 3: 4 thanh công đoạn chi tiết */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 18px;
}

.stage-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.stage-label-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.stage-track {
  height: 8px;
  background: #EFE9DC;
  border: 1px solid #121316;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stage-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.stage-fill.trans { background: var(--accent-orange, #EA4828); }
.stage-fill.proof { background: #0284C7; }
.stage-fill.font { background: #7C3AED; }
.stage-fill.qa { background: #059669; }

/* Cột 4: Cột tổng % tiến độ & nút hành động */
.prog-total-box {
  text-align: center;
  border-left: 2px solid var(--border-subtle, #E2DAC8);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.prog-total-percent {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-orange, #EA4828);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 4px;
}

.prog-total-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-prog-action {
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  background: var(--accent-orange, #EA4828);
  color: #FFFFFF;
  border: 1.5px solid #121316;
  border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0px #121316;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-prog-action:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #121316;
  background: #CE3214;
}

@media (max-width: 1100px) {
  .progress-card {
    grid-template-columns: 180px 1fr;
    gap: 20px;
  }
  .stages-grid {
    grid-column: 1 / -1;
  }
  .prog-total-box {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1.5px dashed var(--border-subtle, #E2DAC8);
    padding-left: 0;
    padding-top: 16px;
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .progress-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* ==========================================================================
   TẠP HÓA KEM & CAM - THEME OVERRIDES (progress.css)
   ========================================================================== */
[data-theme="cream"] .progress-masthead {
  background: #FFFFFF;
  border: 2px solid #121316;
  box-shadow: 4px 4px 0px #121316;
}

[data-theme="cream"] .masthead-metrics {
  background: #FAF6EE;
  border: 1.5px solid #121316;
}

[data-theme="cream"] .production-legend {
  background: #FAF6EE;
  border: 1.5px solid #121316;
}

[data-theme="cream"] .progress-card {
  background: #FFFFFF;
  border: 2px solid #121316;
  box-shadow: 4px 4px 0px #121316;
}

[data-theme="cream"] .prog-total-percent {
  color: var(--accent-orange, #EA4828);
}
