:root {
  --accent: #fa6464;
  --bg-dark: #070707;
  --card-bg: #ffffff;
  --muted: #7a7a7a;
  --text-dark: #111;
  --radius: 14px;
  --transition: 250ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: "Vazirmatn", sans-serif;
  background-color: #ebe8e8;
  padding: 3.5rem 1rem;
  overflow-x: hidden;
}

/* Container */
.page-root {
  display: block;
}

/* Main Card */
.main-card {
  max-width: 1100px;
  width: 100%;
}
.card {
  background: var(--card-bg);
  border-radius: calc(var(--radius) + 4px);
  overflow: visible;
  box-shadow: 0 12px 50px rgba(2, 2, 2, 0.45);
  border: none;
}

/* Accent bar */
.accent-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), #ff8b8b, var(--accent));
}

/* Header */
.header-row .page-title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #222;
  position: relative;
  display: inline-block;
  letter-spacing: -0.5px;
  text-transform: capitalize;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(90deg, #860f1b, #080707);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-row .page-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, #b02a37, transparent);
  transform: translateX(-50%);
  border-radius: 3px;
  opacity: 0.8;
  transition: all 0.4s ease;
}

.header-row .page-title:hover::after {
  width: 80%;
  opacity: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ddd;
  object-fit: cover;
}

/* Signout button */
.signout-btn {
  background-color: transparent;
  border: 1px solid #ccc;
  color: #444;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  transition: all 0.2s;
}
.signout-btn:hover {
  background-color: #f8f8f8;
  border-color: #aaa;
}

/* Stepper */
.stepper-wrap {
  padding: 0.6rem 0 1rem 0;
  margin-bottom: 0.6rem;
}
.stepper-inner {
  position: relative;
  padding: 1rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.step-line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 35%;
  height: 2px;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0%,
    var(--accent) 15%,
    rgba(255, 255, 255, 0.2) 30%,
    var(--accent) 45%,
    rgba(255, 255, 255, 0.2) 60%,
    var(--accent) 75%,
    rgba(255, 255, 255, 0.2) 100%
  );
  background-size: 200% auto;
  animation: flowLine 5s linear infinite;
  z-index: 1;
}
@keyframes flowLine {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: 0% center;
  }
}
.stepper {
  position: relative;
  z-index: 2;
  gap: 0.3rem;
  justify-content: space-between;
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  min-width: max-content;
}
.step-item {
  flex: 0 0 auto;
  width: 100px;
  min-width: 100px;
  margin: 0 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.step-caption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #444;
  font-weight: 600;
}
.step-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.1rem;
  background: #fff;
  transition: all 0.3s ease;
}
.step-circle.completed {
  background: linear-gradient(90deg, var(--accent), #ff8b8b);
  color: #fff;
  box-shadow: 0 0 20px rgba(250, 100, 100, 0.3);
  transform: translateY(-6px);
  border: none;
}
.step-circle.active {
  background: linear-gradient(90deg, var(--accent), #ff8b8b);
  color: var(--card-bg);
  box-shadow: 0 10px 28px rgba(250, 100, 100, 0.09);
  transform: translateY(-4px);
}
.step-circle.active::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 147, 147, 0.6);
  animation: rotateRing 5s linear infinite;
  opacity: 1;
  z-index: -1;
  filter: drop-shadow(0 0 10px #ff9393);
}

@media (max-width: 992px) {
  .step-line {
    display: none;
  }
  .stepper {
    justify-content: flex-start !important;
  }
}
@media (max-width: 500px) {
  .step-item {
    margin: 0px;
    margin-left: -10px;
  }
  .step-caption {
    font-size: 12px;
  }
}

/* Alert bar */
.alert-important {
  background: linear-gradient(90deg, var(--accent), #ff8b8b);
  color: #fff;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: 0 10px 34px rgba(250, 100, 100, 0.12);
}
.alert-important img {
  width: 60px;
  height: 60px;
  position: relative;
  border-radius: 35px;
  transition: all 0.4s ease;
  object-fit: cover;
}
.alert-important img:hover {
  transform: scale(1.05);
}
@media (max-width: 430px) {
  .alert-important img {
    width: 55px;
    height: 55px;
  }
} 
/* Accent Button */
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  border: none;
  transition: all var(--transition);
}
.btn-accent:hover {
  transform: translateY(-3px);
  background: var(--accent);
  color: white;
}

/* Responsive header */
@media (max-width: 576px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .flag {
    width: 32px;
    height: 30px;
  }
  .header-row .page-title {
    font-size: 15px;
  }
  .text-fild-morabi p {
    margin-right: 5px !important;
    font-size: 10px;
    line-height: 1.7;
    width: 100%;
  }
}
.text-fild-morabi p {
  margin-right: 20px;
}
/*text-morabi*/
.text-fild-morabi {
  font-size: 13px;
}
.text-fild-morabi p {
  margin-right: 20px;
}
/*adamak-input*/
.adamak {
  flex: 0 0 auto;
  width: 229px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.adamak img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
}

.form-label {
  font-size: 0.9rem;
  color: #222;
  font-weight: 500;
}
.form-select {
  height: 38px;
  border-radius: 10px;
  border: 1.2px solid #ccc;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  width: 20%;
  text-align: center;
}
.form-select:focus {
  border-color: rgb(228, 29, 29);
  box-shadow:none;
}
.form-control {
  height: 38px;
  border-radius: 10px;
  border: 1.2px solid #ccc;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  width: 90px;
  margin-bottom: 2px;
  text-align: center;
}

.form-control:focus {
  border-color: rgb(228, 29, 29);
  box-shadow:none;
}
#sine:focus {
  border-color: #0e9deb;
}
#saaed:focus {
  border-color: #1668ba;
}
#shekam:focus {
  border-color: #ff85f3;
}
#much:focus {
  border-color: #04496e;
}
#height:focus {
  border-color: #a834e1;
}
#shone:focus {
  border-color: #0de109;
}
#kamar:focus {
  border-color: #a834e1;;
}
#basan:focus {
  border-color: #5109e1;
}
#sughpa:focus {
  border-color: rgb(255, 132, 0);
}
@media (max-width: 992px) {
  .adamak {
    width: 180px;
  }
  .form-control {
    height: 36px;
  }
}

@media (max-width: 768px) {
  .input-left,
  .input-right {
    min-width: 60px;
    gap: 0.5rem;
  }
  #much-pa {
    margin-top: 60px !important;
  }
}

@media (max-width: 500px) {
  .form-control {
    height: 34px;
    font-size: 0.59rem;
    width: 60px;
    margin: -3px !important;
  }
  .form-select {
    width: 30%;
  }
}

@media (max-width: 400px) {
  .adamak {
    width: 160px;
  }
  .input-right {
    margin: 0px !important;
  }
  #much-pa {
    margin-top: 40px !important;
  }
}

/*error fild*/
.form-error-box {
  background: linear-gradient(90deg, #ff5a5a, #ff8080);
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(180, 43, 49, 0.2);
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 250px;
}

.form-error-box.show {
  opacity: 0.9;
  transform: translateX(0);
}

.form-control.invalid-field {
  border-color: #b42b31 !important;
}

/* ---------- Body Metrics (Circular) ---------- */
.body-metrics {
  width: 100%;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.metric-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.65)
  );
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: 0 12px 30px rgba(10, 10, 10, 0.06);
  border: 1px solid rgba(250, 100, 100, 0.04);
  backdrop-filter: blur(6px);
  transition: transform 280ms cubic-bezier(0.2, 0.9, 0.25, 1), box-shadow 280ms;
  min-height: 110px;
}

.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(10, 10, 10, 0.09);
}

.ring-wrap {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ring {
  width: 84px;
  height: 84px;
  display: block;
}
.ring-bg {
  fill: none;
  stroke: rgba(10, 10, 10, 0.06);
  stroke-width: 10;
}
.ring-fg {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}

.metric-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-value {
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #111;
}
.metric-value .num {
  font-size: 1.2rem;
  font-weight: 600;
}
.metric-value .unit {
  font-weight: 700;
  color: #666;
  font-size: 0.9rem;
}
.metric-label {
  font-weight: 700;
  color: #333;
  display: flex;
  gap: 8px;
  align-items: center;
}
.metric-label .hint {
  font-weight: 500;
  font-size: 0.78rem;
  color: #8a8a8a;
  margin-right: 6px;
}

.metrics-note {
  color: #6b6b6b;
}

.metric-card[data-key="muscle"] .metric-label {
  color: #b02a37;
}
.metric-card[data-key="bodyfat"] .metric-label {
  color: #b26a00;
}
.metric-card[data-key="visceral"] .metric-label {
  color: #0b78b1;
}

.metric-card .spark {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px;
  }
}
@media (max-width: 992px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .metric-card {
    padding: 14px;
    min-height: auto;
  }
  .ring-wrap {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
  }
  .metric-value .num {
    font-size: 1.4rem;
  }
}
@media (max-width: 450px) {
.metric-value .unit {
  font-size: 0.7rem;
}
.metric-label {
  font-size: 0.8rem;
}
..metric-label .hint {
  font-size: 0.55rem;
}
}

.metric-card[data-key="muscle"] .ring-bg {
  stroke: rgba(250, 100, 100, 0.06);
}
.metric-card[data-key="bodyfat"] .ring-bg {
  stroke: rgba(255, 160, 90, 0.06);
}
.metric-card[data-key="visceral"] .ring-bg {
  stroke: rgba(60, 160, 255, 0.06);
}

