*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0f172a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card {
  background: #1e293b;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid #334155;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.logo h1 {
  font-size: 1.4rem;
  color: #f1f5f9;
  font-weight: 700;
}
.logo p {
  font-size: 0.78rem;
  color: #64748b;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.input-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}
input[type="number"] {
  width: 100%;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 10px;
  padding: 0.75rem 3.5rem 0.75rem 1rem;
  font-size: 1.05rem;
  color: #f1f5f9;
  outline: none;
  transition: border-color 0.2s;
}
input[type="number"]:focus {
  border-color: #6366f1;
}
.unit {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

button {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.1s;
}
button:hover {
  opacity: 0.88;
}
button:active {
  transform: scale(0.98);
}

.btn-calc {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}
.btn-pdf {
  background: #0f172a;
  color: #94a3b8;
  border: 1.5px solid #334155;
}
.btn-pdf:hover {
  border-color: #6366f1;
  color: #c7d2fe;
}

.error {
  background: #450a0a;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Result panel */
.result {
  margin-top: 2rem;
  background: #0f172a;
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid #334155;
}
.result-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.bmi-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1;
}
.bmi-unit {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.3rem;
}
.badge {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* BMI bar */
.scale {
  margin: 1rem 0;
}
.scale-bar {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 10px;
}
.seg {
  flex: 1;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #475569;
  margin-top: 0.3rem;
}
.indicator-row {
  position: relative;
  height: 14px;
}
.indicator {
  position: absolute; /* ou relative, dependendo do seu layout */
  left: var(--posicao-left, 0%);
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: #f1f5f9;
  border-radius: 50%;
  border: 2.5px solid #6366f1;
  top: 0;
}

.advice {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
}

/* Color helpers */
.c-blue {
  color: #60a5fa;
}
.c-green {
  color: #4ade80;
}
.c-yellow {
  color: #fbbf24;
}
.c-red {
  color: #f87171;
}

.bg-blue {
  background: #1e3a5f;
  color: #60a5fa;
}
.bg-green {
  background: #14532d;
  color: #4ade80;
}
.bg-yellow {
  background: #422006;
  color: #fbbf24;
}
.bg-red {
  background: #450a0a;
  color: #f87171;
}
