:root {
  --ink: #27343a;
  --muted: #718087;
  --line: #e5eceb;
  --paper: #f7faf9;
  --white: #fff;
  --mint: #b7e3d1;
  --mint-deep: #2a856b;
  --teal: #126a61;
  --coral: #ee8f76;
  --yellow: #f7cf79;
  --shadow: 0 14px 40px rgba(35, 65, 62, 0.07);
}
.chart-card:has(.chart-wrap[style]) .legend-line.green {
  background: var(--curve-color);
}
.chart-card:has(.chart-wrap[style]) .legend-line.band {
  background: var(--band-color);
}
.chart-card:has(.chart-wrap[style]) .legend-line.dot {
  background: #fff;
  border: 2px solid #1f2933;
  width: 9px;
  height: 9px;
}
.child-form .form-grid {
  grid-template-columns: 1fr;
}
[readonly] {
  background: #eef2f1 !important;
  color: #8b9896 !important;
  opacity: 0.78;
  cursor: not-allowed;
  box-shadow: none;
}
.profile-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  padding: 7px;
  margin-top: 7px;
}
.profile-menu[hidden] {
  display: none;
}
.profile-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 9px;
  text-align: left;
  color: var(--ink);
  font: 600 12px "DM Sans";
  cursor: pointer;
}
.profile-option:hover {
  background: #eef7f3;
  color: var(--teal);
}
.profile-option small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.profile-option.new {
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 12px;
  color: var(--teal);
}
.profile-menu .active-profile {
  background: #eef7f3;
  color: var(--teal);
}
.edit-button,
.delete-button {
  font-size: 10px;
  padding: 5px 8px;
  margin: 7px 0 0 4px;
}
.who-chart {
  height: 410px !important;
  margin: 18px 0 4px;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.who-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}
.who-chart + .chart-legend {
  display: none;
}
.chart-card:has(.who-chart) {
  padding-bottom: 14px;
}
.chart-card:has(.who-chart) .card-head {
  margin-bottom: 5px;
}
.chart-card:has(.who-chart) .card-head h2 {
  font-size: 20px;
}
.chart-card:has(.who-chart) .card-head p {
  font-size: 13px;
}
:root {
  --ink: #27343a;
  --muted: #718087;
  --line: #e5eceb;
  --paper: #f7faf9;
  --white: #fff;
  --mint: #b7e3d1;
  --mint-deep: #2a856b;
  --teal: #126a61;
  --coral: #ee8f76;
  --yellow: #f7cf79;
  --shadow: 0 14px 40px rgba(35, 65, 62, 0.07);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 268px;
  background: #eef7f3;
  border-right: 1px solid #deebe7;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  font:
    800 23px Manrope,
    sans-serif;
  letter-spacing: -1px;
  padding: 0 10px 35px;
  color: var(--teal);
}
.brand span span,
.mobile-brand span {
  color: #e27963;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--coral);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  margin-right: 8px;
  font-size: 18px;
  vertical-align: 2px;
}
.profile-switcher {
  background: #fff;
  border: 1px solid #e0ece7;
  border-radius: 12px;
  padding: 11px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f7c6b4;
  color: #9e4f42;
  font-weight: 700;
}
.profile-switcher strong {
  font-size: 13px;
  display: block;
}
.profile-switcher small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.icon-button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.main-nav {
  margin-top: 28px;
}
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 13px;
  border-radius: 9px;
  color: #6c7d7e;
  font: 600 13px "DM Sans";
  cursor: pointer;
  margin: 2px 0;
}
.nav-item span {
  display: inline-block;
  width: 26px;
  font-size: 18px;
  vertical-align: -2px;
}
.nav-item:hover {
  background: #e3f1eb;
  color: var(--teal);
}
.nav-item.active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 5px 12px rgba(18, 106, 97, 0.16);
}
.sidebar-bottom {
  margin-top: auto;
}
.tip-card {
  background: #fff8ed;
  border-radius: 12px;
  padding: 17px;
  margin: 0 3px 17px;
  border: 1px solid #f3e8d6;
}
.tip-icon {
  display: block;
  color: var(--coral);
  font-size: 20px;
  margin-bottom: 9px;
}
.tip-card strong {
  font-size: 13px;
}
.tip-card p {
  font-size: 11px;
  color: #8b8276;
  line-height: 1.5;
  margin: 7px 0 0;
}
.version {
  display: block;
  color: #a2b0ad;
  text-align: center;
  font-size: 10px;
  margin-top: 22px;
}
.content {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6%;
  background: rgba(247, 250, 249, 0.8);
}
.notification {
  border: 0;
  background: #fff;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  box-shadow: 0 3px 12px #dfe9e6;
  color: var(--teal);
  font-size: 20px;
  position: relative;
}
.notification i {
  position: absolute;
  background: var(--coral);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  right: 8px;
  top: 8px;
}
.mobile-brand {
  display: none;
}
.page {
  max-width: 1170px;
  margin: 0 auto;
  padding: 45px 6% 70px;
}
.auth-page {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 32px 5%;
}
.app-shell.auth-mode .sidebar,
.app-shell.auth-mode .topbar {
  display: none !important;
}
.auth-card {
  width: min(100%, 460px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.auth-card h1 {
  font: 800 28px Manrope, sans-serif;
  margin: 8px 0;
}
.auth-card .form-actions {
  margin-top: 24px;
}
.auth-error {
  color: #b42318;
  font-size: 12px;
  margin: 16px 0 0;
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--teal);
  font-weight: 700;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.page h1 {
  font:
    800 34px Manrope,
    sans-serif;
  letter-spacing: -1.5px;
  margin: 8px 0 8px;
  color: #25343a;
}
.intro {
  color: var(--muted);
  margin-bottom: 20px;
}
.date-label {
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 13px;
  border-radius: 7px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 26px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 19px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.stat-top {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-icon {
  font-size: 18px;
  color: var(--teal);
}
.stat-value {
  font: 800 26px Manrope;
  margin-top: 13px;
  color: #26373a;
}
.stat-value small {
  font: 500 12px "DM Sans";
  color: var(--muted);
}
.trend {
  font-size: 12px;
  color: var(--mint-deep);
  margin-top: 6px;
}
.trend.neutral {
  color: var(--muted);
}
.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 24px 25px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 13px;
}
.card-head h2 {
  font: 700 18px Manrope;
  margin: 0;
}
.card-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.segmented {
  display: flex;
  gap: 3px;
  background: #f2f6f5;
  border-radius: 7px;
  padding: 3px;
}
.segmented button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 7px 11px;
  font: 600 11px "DM Sans";
  color: var(--muted);
  cursor: pointer;
}
.segmented button.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 2px 5px #dfe8e5;
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 310px;
  margin: 7px auto 0;
}
.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-legend {
  display: none;
  gap: 20px;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 11px;
}
.legend-line {
  display: inline-block;
  width: 22px;
  height: 3px;
  vertical-align: 3px;
  margin-right: 6px;
  border-radius: 3px;
}
.legend-line.green {
  background: var(--teal);
}
.legend-line.band {
  background: #bde2d1;
}
.legend-line.dot {
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  vertical-align: 1px;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 25px;
}
.list-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
}
.list-card h2 {
  font: 700 17px Manrope;
  margin: 0 0 17px;
}
.measurement-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #eef2f1;
}
.measurement-row:first-of-type {
  border-top: 0;
}
.measurement-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.measurement-row strong {
  font-size: 13px;
}
.measurement-table-wrap {
  overflow-x: auto;
  padding: 0;
}
.measurement-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}
.measurement-table th,
.measurement-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.measurement-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.measurement-table tbody tr:nth-child(even) {
  background: #f4f8f7;
}
.measurement-table tbody tr:nth-child(odd) {
  background: #fff;
}
.measurement-table tbody tr:last-child td {
  border-bottom: 0;
}
.measurement-table td:last-child {
  text-align: right;
}
.pill {
  font-size: 10px;
  border-radius: 20px;
  padding: 5px 8px;
  background: #e5f5ee;
  color: var(--teal);
  height: max-content;
}
.button {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 11px 16px;
  font: 600 12px "DM Sans";
  cursor: pointer;
}
.button:hover {
  background: #0c574f;
}
.button.secondary {
  background: #eff6f3;
  color: var(--teal);
}
.form-card {
  max-width: 740px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-top: 24px;
}
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #5c6e71;
  margin-bottom: 7px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #5c6e71;
  margin-bottom: 7px;
}
.form-card .field:has(#measureAge) {
  display: none;
}
.measurement-age-field {
  display: none;
}
.sex-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 220px;
  padding: 3px;
  background: #f2f6f5;
  border-radius: 7px;
}
.sex-toggle input {
  position: absolute;
  opacity: 0;
}
.sex-toggle label {
  position: relative;
  z-index: 1;
  padding: 9px 12px;
  margin: 0;
  border-radius: 5px;
  color: var(--muted);
  font: 600 12px "DM Sans";
  text-align: center;
  cursor: pointer;
}
.sex-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 2px 5px #dfe8e5;
  transition: transform 160ms ease;
}
.sex-toggle:has(#childSexGirl:checked)::before {
  transform: translateX(100%);
}
.sex-toggle input:checked + label {
  color: var(--teal);
}
.field input,
.field select {
  width: 100%;
  border: 1px solid #dce7e4;
  border-radius: 7px;
  padding: 11px 12px;
  font: 14px "DM Sans";
  color: var(--ink);
  background: #fff;
  margin-bottom: 12px;
}
.field input:focus,
.field select:focus {
  outline: 2px solid #b8e4d4;
  border-color: var(--teal);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}
.disclaimer {
  font-size: 10px;
  color: #9aa7a5;
  margin-top: 20px;
  line-height: 1.5;
}
.mobile-only {
  display: none;
}
@media (max-width: 800px) {
  .sidebar {
    width: 220px;
  }
  .page {
    padding-left: 4%;
    padding-right: 4%;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .sidebar {
    display: none;
  }
  .topbar {
    height: 60px;
    padding: 0 5%;
  }
  .mobile-brand {
    display: block;
    margin-right: auto;
    font: 800 19px Manrope;
    color: var(--teal);
  }
  .mobile-brand:first-letter {
    color: var(--coral);
  }
  .page {
    padding: 30px 5% 55px;
  }
  .page h1 {
    font-size: 28px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px 13px;
  }
  .stat-value {
    font-size: 22px;
  }
  .chart-card {
    padding: 18px 12px;
  }
  .card-head {
    display: block;
  }
  .segmented {
    margin-top: 15px;
    width: max-content;
  }
  .chart-wrap {
    height: 250px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 20px 16px;
  }
}
@media (min-width: 801px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
