
:root {
  --pg-red: #ff1717;
  --pg-red-dark: #b90000;
  --pg-bg: #060606;
  --pg-panel: #111111;
  --pg-panel-2: #171717;
  --pg-line: rgba(255,255,255,.09);
  --pg-muted: #929292;
  --pg-success: #38d678;
  --pg-warning: #ffb020;
}

.progress-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 0%, rgba(255,23,23,.10), transparent 32rem),
    var(--pg-bg);
  color: #f6f6f6;
}

.progress-shell { padding: 2rem 0 6rem; }

.progress-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-heading h1 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.9rem);
  font-weight: 900;
  line-height: .95;
  text-transform: uppercase;
}

.progress-heading p {
  max-width: 760px;
  margin: .6rem 0 0;
  color: var(--pg-muted);
}

.progress-panel {
  height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--pg-line);
  border-radius: .9rem;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.progress-panel h2,
.progress-panel h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.progress-topline h2 { margin: 0; font-size: 1.55rem; }

.pg-kicker {
  color: var(--pg-red);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.metric-grid-progress {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .8rem;
}

.metric-card-progress {
  position: relative;
  min-height: 145px;
  padding: 1rem;
  border: 1px solid var(--pg-line);
  border-radius: .75rem;
  background: rgba(255,255,255,.03);
}

.metric-card-progress i {
  color: var(--pg-red);
  font-size: 1.25rem;
}

.metric-card-progress strong {
  display: block;
  margin-top: 1rem;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2.15rem;
  line-height: 1;
}

.metric-card-progress span {
  color: var(--pg-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metric-card-progress small {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--pg-success);
  font-weight: 800;
}

.chart-wrap {
  position: relative;
  min-height: 310px;
}

.form-label {
  color: #d5d5d5;
  font-size: .8rem;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 48px;
  color: white;
  background: #0c0c0c;
  border-color: var(--pg-line);
  border-radius: .55rem;
}

.form-control:focus,
.form-select:focus {
  color: white;
  background: #0c0c0c;
  border-color: var(--pg-red);
  box-shadow: 0 0 0 .2rem rgba(255,23,23,.12);
}

.form-control::placeholder { color: #666; }

.form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.measurement-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .75rem;
}

.measurement-box {
  padding: .95rem;
  border-radius: .65rem;
  background: rgba(255,255,255,.03);
}

.measurement-box strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
}

.measurement-box span {
  color: var(--pg-muted);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.progress-history {
  display: grid;
  gap: .75rem;
}

.history-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.history-row:last-child { border-bottom: 0; }

.history-date {
  color: var(--pg-muted);
  font-size: .75rem;
}

.history-main strong { display: block; font-size: .85rem; }
.history-main small { color: #777; }

.history-actions {
  display: flex;
  gap: .45rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .8rem;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--pg-line);
  border-radius: .75rem;
  background: #0f0f0f;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: #1b1b1b;
}

.photo-card-body {
  padding: .8rem;
}

.photo-card-body strong { display: block; }
.photo-card-body small { color: var(--pg-muted); }

.upload-dropzone {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 1rem;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: .75rem;
  background: rgba(255,255,255,.02);
  text-align: center;
}

.upload-dropzone i {
  color: var(--pg-red);
  font-size: 2rem;
  margin-bottom: .7rem;
}

.upload-dropzone input { display: none; }

.strength-table {
  width: 100%;
  color: #ddd;
}

.strength-table th {
  padding: .7rem;
  color: #777;
  background: #0d0d0d;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.strength-table td {
  padding: .75rem .7rem;
  border-color: rgba(255,255,255,.055);
  vertical-align: middle;
  font-size: .8rem;
}

.adherence-ring {
  --value: 72;
  position: relative;
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--pg-red) calc(var(--value)*1%), #262626 0);
}

.adherence-ring::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #111;
}

.adherence-ring-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.adherence-ring-content strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2.4rem;
  line-height: 1;
}

.summary-list {
  display: grid;
  gap: .7rem;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.summary-list div:last-child { border-bottom: 0; }

.summary-list span { color: var(--pg-muted); }

.empty-state {
  padding: 2.5rem 1rem;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: .75rem;
  color: var(--pg-muted);
  text-align: center;
}

.empty-state i {
  display: block;
  margin-bottom: .85rem;
  color: var(--pg-red);
  font-size: 2rem;
}

@media (max-width: 1199.98px) {
  .metric-grid-progress { grid-template-columns: repeat(2,1fr); }
  .photo-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 767.98px) {
  .progress-shell { padding-top: 1.25rem; }
  .progress-heading { align-items: flex-start; flex-direction: column; }
  .measurement-grid { grid-template-columns: repeat(2,1fr); }
  .history-row { grid-template-columns: 1fr; gap: .35rem; }
  .history-actions { justify-content: flex-start; }
}

@media (max-width: 575.98px) {
  .metric-grid-progress { grid-template-columns: 1fr; }
  .measurement-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
}
