:root {
  --bg: #f2f5ef;
  --surface: #ffffff;
  --surface-soft: #f7f9f5;
  --ink: #17231e;
  --muted: #728079;
  --muted-strong: #526159;
  --line: #e2e8e2;
  --green: #174f42;
  --green-deep: #103a31;
  --green-soft: #dcece5;
  --mint: #8fc9b3;
  --lime: #dbe9a9;
  --sand: #efe9d7;
  --orange: #eaaa65;
  --danger: #d86666;
  --shadow: 0 18px 48px rgba(28, 57, 45, 0.08);
  --shadow-soft: 0 8px 24px rgba(28, 57, 45, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sidebar-width: 248px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(219, 233, 169, 0.24), transparent 24rem),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 28px 20px 22px;
  border-right: 1px solid rgba(220, 228, 222, 0.9);
  background: rgba(250, 252, 249, 0.91);
  box-shadow: 8px 0 36px rgba(38, 66, 54, 0.03);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(23, 79, 66, 0.2);
  color: white;
}

.brand-mark svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 42px;
}

.nav-label {
  margin: 0 0 7px 12px;
  color: #98a39e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border-radius: 14px;
  color: #66746d;
  font-size: 14px;
  font-weight: 600;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-link:hover {
  background: #f0f4ef;
  color: var(--ink);
  transform: translateX(2px);
}

.nav-link.is-active {
  background: var(--green-soft);
  color: var(--green);
}

.nav-link.is-active::before {
  position: absolute;
  left: -20px;
  width: 3px;
  height: 23px;
  border-radius: 0 4px 4px 0;
  background: var(--green);
  content: "";
}

.nav-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.nav-count {
  display: grid;
  width: 21px;
  height: 21px;
  margin-left: auto;
  place-items: center;
  border-radius: 8px;
  background: #e8d9c5;
  color: #895d2a;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-spacer {
  flex: 1;
  min-height: 24px;
}

.storage-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid #e0e7dd;
  border-radius: 19px;
  background: linear-gradient(145deg, #f2f6eb, #edf3ee);
}

.storage-card::after {
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(219, 233, 169, 0.42);
  content: "";
}

.storage-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 11px;
  background: white;
  color: var(--green);
  box-shadow: var(--shadow-soft);
}

.storage-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.storage-card strong {
  display: block;
  font-size: 13px;
}

.storage-card p {
  position: relative;
  z-index: 1;
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.text-button {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.profile-card {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 11px;
  margin-top: 18px;
  padding: 8px 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #ecdac4, #dec2a0);
  color: #6b492d;
  font-size: 14px;
  font-weight: 800;
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.profile-copy strong {
  font-size: 12px;
}

.profile-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.profile-card > svg {
  width: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-header,
.bottom-nav {
  display: none;
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  max-width: 1600px;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 34px clamp(26px, 3.5vw, 58px) 30px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}

.date-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: capitalize;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(23, 79, 66, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.demo-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5eae8d;
  box-shadow: 0 0 0 3px rgba(94, 174, 141, 0.13);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(27px, 2.3vw, 37px);
  font-weight: 730;
  letter-spacing: -0.045em;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.more-button,
.dialog-close {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition:
    border 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.icon-button:hover,
.more-button:hover,
.dialog-close:hover {
  border-color: #cbd7d0;
  background: white;
  transform: translateY(-1px);
}

.icon-button svg,
.dialog-close svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border: 1.5px solid white;
  border-radius: 50%;
  background: var(--orange);
}

.primary-button,
.light-button,
.ghost-light-button,
.outline-button,
.details-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  box-shadow: 0 10px 20px rgba(23, 79, 66, 0.16);
  color: white;
}

.primary-button:hover,
.light-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(23, 79, 66, 0.22);
}

.primary-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.overview-card {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr);
  grid-template-rows: auto auto;
  gap: 24px 40px;
  padding: clamp(28px, 3vw, 42px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(120deg, rgba(14, 57, 48, 0.96), rgba(24, 84, 68, 0.94)),
    var(--green-deep);
  box-shadow: 0 22px 55px rgba(18, 63, 52, 0.16);
  color: white;
  isolation: isolate;
}

.overview-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
  mask-image: linear-gradient(to right, black, transparent 80%);
}

.overview-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
}

.overview-orb-one {
  top: -100px;
  right: -40px;
  width: 280px;
  height: 280px;
  background: rgba(219, 233, 169, 0.17);
}

.overview-orb-two {
  right: 280px;
  bottom: -140px;
  width: 230px;
  height: 230px;
  background: rgba(143, 201, 179, 0.11);
}

.section-kicker {
  display: block;
  margin-bottom: 9px;
  color: #c7ddce;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-kicker.dark {
  color: #849189;
}

.overview-copy h2 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(25px, 2.3vw, 36px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.13;
}

.overview-copy > p {
  max-width: 600px;
  margin: 14px 0 0;
  color: rgba(235, 244, 239, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 23px;
}

.light-button {
  border: 1px solid white;
  background: white;
  color: var(--green-deep);
}

.ghost-light-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.ghost-light-button:hover {
  background: rgba(255, 255, 255, 0.11);
}

.health-score {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 19px;
}

.score-ring {
  position: relative;
  display: grid;
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--lime) 0 82%, rgba(255, 255, 255, 0.12) 82% 100%);
  box-shadow: 0 0 45px rgba(219, 233, 169, 0.1);
}

.score-ring::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: #174b3f;
  content: "";
}

.score-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-core strong {
  font-size: 38px;
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.score-core span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.score-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-copy > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.score-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
}

.score-copy strong i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(219, 233, 169, 0.12);
}

.score-copy small {
  color: #b8d0c4;
  font-size: 10px;
}

.overview-stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.overview-stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-stats > div:first-child {
  padding-left: 0;
}

.overview-stats > div:last-child {
  border-right: 0;
}

.overview-stats span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.overview-stats strong {
  font-size: 12px;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(325px, 0.8fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  border: 1px solid rgba(221, 228, 222, 0.95);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.body-map-panel {
  min-width: 0;
  padding: 26px;
}

.panel-header,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-header h2,
.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.panel-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.more-button {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--surface-soft);
}

.more-button svg {
  width: 18px;
  fill: currentColor;
}

.body-map-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(210px, 0.75fr);
  gap: 22px;
  margin-top: 20px;
}

.body-stage {
  position: relative;
  display: flex;
  min-height: 470px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4ebe5;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(184, 219, 205, 0.35), transparent 43%),
    linear-gradient(155deg, #f4f8f5, #edf4ef);
}

.body-stage::before,
.body-stage::after {
  position: absolute;
  border: 1px solid rgba(23, 79, 66, 0.06);
  border-radius: 50%;
  content: "";
}

.body-stage::before {
  width: 350px;
  height: 350px;
}

.body-stage::after {
  width: 260px;
  height: 260px;
}

.body-stage-label {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 3;
}

.body-stage-label span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 79, 66, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.body-stage-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #62aa8b;
}

.body-figure {
  position: relative;
  z-index: 2;
  width: auto;
  height: 438px;
  max-width: 90%;
  overflow: visible;
}

.figure-shadow {
  fill: rgba(39, 77, 61, 0.1);
  filter: blur(5px);
}

.body-silhouette {
  fill: url(#bodyGlow);
  stroke: rgba(95, 150, 127, 0.22);
  stroke-width: 1.2;
}

.bone {
  fill: none;
  stroke: url(#boneGradient);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 1px 1px rgba(42, 94, 72, 0.14));
}

.bone-fill {
  fill: rgba(255, 255, 255, 0.6);
  stroke-width: 3;
}

.bone.thick {
  stroke-width: 7;
}

.bone.ribs {
  stroke-width: 3;
}

.joint {
  fill: #edf5f1;
  stroke: white;
  stroke-width: 2;
}

.organ {
  opacity: 0.44;
  transition:
    opacity 180ms ease,
    filter 180ms ease;
}

.organ.lungs {
  fill: #96c6b4;
}

.organ.heart {
  fill: #ce7c73;
  opacity: 0.75;
}

.body-marker {
  outline: none;
  cursor: pointer;
}

.body-marker .marker-pulse {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(35, 112, 89, 0.18);
  stroke-width: 1;
  transition:
    fill 180ms ease,
    stroke 180ms ease,
    transform 180ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.body-marker .marker-dot {
  fill: #6bb092;
  filter: drop-shadow(0 3px 5px rgba(43, 105, 80, 0.24));
}

.body-marker path {
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.body-marker:hover .marker-pulse,
.body-marker:focus .marker-pulse,
.body-marker.is-active .marker-pulse {
  fill: rgba(219, 233, 169, 0.75);
  stroke: #8fae5b;
  transform: scale(1.13);
}

.body-marker.is-active .marker-dot {
  fill: var(--green);
}

.body-marker.is-active .marker-pulse {
  animation: markerPulse 2.2s ease-in-out infinite;
}

.figure-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 11px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 79, 66, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.67);
  color: var(--muted);
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.figure-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.figure-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-normal {
  background: #6bb092;
}

.legend-watch {
  background: var(--orange);
}

.system-inspector {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 9px 4px 4px;
}

.system-icon {
  display: grid;
  width: 45px;
  height: 45px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
}

.system-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.status-badge,
.micro-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #e5f1eb;
  color: #397a60;
  font-size: 9px;
  font-weight: 750;
}

.status-badge i,
.micro-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.is-watch {
  background: #f7ebdc;
  color: #a36e30;
}

.system-inspector h3 {
  margin: 13px 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.system-inspector > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.58;
}

.system-metrics {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.system-metrics > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.system-metrics span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-metrics strong {
  display: block;
  margin-top: 7px;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.system-metrics strong small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
}

.details-button {
  width: 100%;
  margin-top: auto;
  border: 1px solid var(--line);
  background: white;
  color: var(--green);
}

.details-button:hover,
.outline-button:hover {
  border-color: #bfd0c7;
  background: #f6faf7;
}

.details-button svg {
  width: 14px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.updated-label {
  width: 100%;
  margin-top: 9px;
  color: #9ba59f;
  font-size: 8px;
  text-align: center;
}

.vitals-column {
  min-width: 0;
  padding: 25px 0 0;
}

.section-heading.compact {
  align-items: flex-end;
  padding: 0 2px 16px;
}

.dark-link {
  padding: 8px;
}

.vitals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vital-card {
  position: relative;
  display: flex;
  min-height: 201px;
  overflow: hidden;
  flex-direction: column;
  padding: 17px;
  border: 1px solid rgba(221, 228, 222, 0.95);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.vital-card.accent-mint {
  background: linear-gradient(150deg, #eff8f3, white 80%);
}

.vital-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.vital-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 11px;
}

.vital-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.heart-icon {
  background: #f5e4e1;
  color: #b75f58;
}

.sleep-icon {
  background: #e5e6f3;
  color: #666da0;
}

.steps-icon {
  background: #f2ecd7;
  color: #9a7b39;
}

.micro-status {
  padding: 5px 7px;
  font-size: 8px;
}

.micro-status.neutral {
  background: #f0f2f0;
  color: var(--muted);
}

.micro-status.warning {
  background: #f7ebdc;
  color: #a36e30;
}

.vital-label {
  margin-top: 16px;
  color: var(--muted);
  font-size: 10px;
}

.vital-value {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.045em;
}

.vital-value small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
}

.mini-chart {
  height: 36px;
  margin: 9px -3px 0;
}

.mini-chart svg {
  width: 100%;
  height: 100%;
}

.chart-area {
  fill: rgba(88, 165, 132, 0.11);
}

.chart-line {
  fill: none;
  stroke: #62a789;
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.vital-note {
  margin-top: auto;
  color: #8b9891;
  font-size: 8px;
}

.sleep-track,
.progress-track {
  overflow: hidden;
  width: 100%;
  height: 5px;
  margin-top: 21px;
  border-radius: 999px;
  background: #ecefec;
}

.sleep-track span,
.progress-track span {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: inherit;
  background: #7d84b5;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 21px;
}

.progress-row .progress-track {
  flex: 1;
  margin: 0;
}

.progress-track span {
  background: #bea45b;
}

.progress-row > span {
  color: var(--muted);
  font-size: 8px;
}

.add-source-card {
  padding: 0;
  border-style: dashed;
  background: rgba(250, 252, 249, 0.45);
  box-shadow: none;
}

.add-source-card > button {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 199px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 17px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.add-source-icon {
  display: grid;
  width: 41px;
  height: 41px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
  transition: transform 160ms ease;
}

.add-source-card button:hover .add-source-icon {
  transform: scale(1.07) rotate(4deg);
}

.add-source-icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.add-source-card strong {
  font-size: 11px;
}

.add-source-card small {
  max-width: 120px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 20px;
  margin-top: 20px;
}

.schedule-panel,
.documents-panel {
  padding: 25px;
}

.lower-header {
  align-items: center;
  margin-bottom: 18px;
}

.outline-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: white;
  color: var(--green);
  box-shadow: none;
  font-size: 10px;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 48px 19px minmax(0, 1fr) 34px;
  gap: 11px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid #edf0ed;
}

.timeline-item time {
  display: flex;
  width: 46px;
  height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--surface-soft);
}

.timeline-item time strong {
  font-size: 17px;
  line-height: 1;
}

.timeline-item time span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.timeline-line {
  position: relative;
  display: flex;
  height: 100%;
  justify-content: center;
}

.timeline-line::before {
  position: absolute;
  top: -15px;
  bottom: -15px;
  width: 1px;
  background: #e6eae7;
  content: "";
}

.timeline-line i {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 21px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(68, 143, 112, 0.18);
}

.doctor-dot {
  background: #4f9e7d;
}

.lab-dot {
  background: #8a89b3;
}

.timeline-content {
  min-width: 0;
}

.timeline-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-topline > span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.event-type {
  padding: 5px 7px;
  border-radius: 7px;
  background: #e5f1eb;
  color: #397a60;
  font-size: 8px;
  font-weight: 700;
}

.event-type.lab-type {
  background: #e9e8f4;
  color: #65669b;
}

.timeline-content h3 {
  overflow: hidden;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-content p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-list {
  display: flex;
  flex-direction: column;
}

.document-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 15px;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-top: 1px solid #edf0ed;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.file-icon {
  display: grid;
  width: 36px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  font-size: 7px;
  font-weight: 800;
}

.file-icon.pdf {
  background: #f5e5e2;
  color: #ad5c55;
}

.file-icon.image {
  background: #e5eee9;
  color: #4f7f6b;
}

.file-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.file-copy strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.file-status {
  padding: 5px 7px;
  border-radius: 999px;
  background: #e5f1eb;
  color: #397a60;
  font-size: 7px;
  font-weight: 700;
}

.file-status.muted-status {
  background: #f0f2f0;
  color: var(--muted);
}

.document-row > svg {
  width: 14px;
  fill: none;
  stroke: #9ca7a1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.upload-zone {
  display: flex;
  width: 100%;
  min-height: 57px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px dashed #cbd8d0;
  border-radius: 13px;
  background: var(--surface-soft);
  cursor: pointer;
  color: var(--green);
}

.upload-zone > svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.upload-zone span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.upload-zone strong {
  font-size: 9px;
}

.upload-zone small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 2px 0;
  color: #8e9993;
  font-size: 9px;
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.site-footer svg {
  width: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.data-dialog {
  width: min(520px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 23px;
  background: white;
  box-shadow: 0 30px 90px rgba(18, 45, 35, 0.22);
}

.data-dialog::backdrop {
  background: rgba(14, 32, 25, 0.42);
  backdrop-filter: blur(5px);
}

.data-dialog[open] {
  animation: dialogIn 180ms ease-out;
}

.data-dialog form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 27px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 2px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}

.dialog-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.dialog-close {
  width: 36px;
  height: 36px;
}

.data-dialog label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.data-dialog label > span {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 650;
}

.data-dialog input,
.data-dialog select,
.data-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--surface-soft);
  color: var(--ink);
  transition:
    border 160ms ease,
    box-shadow 160ms ease;
}

.data-dialog input,
.data-dialog select {
  height: 43px;
  padding: 0 12px;
}

.data-dialog textarea {
  resize: vertical;
  padding: 11px 12px;
}

.data-dialog input:focus,
.data-dialog select:focus,
.data-dialog textarea:focus {
  border-color: #83ad9b;
  box-shadow: 0 0 0 3px rgba(83, 151, 122, 0.1);
}

.dialog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 3px;
}

.dialog-actions .primary-button,
.dialog-actions .outline-button {
  min-height: 41px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  min-width: 300px;
  max-width: min(380px, calc(100vw - 30px));
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: #153d33;
  box-shadow: 0 18px 50px rgba(13, 42, 33, 0.24);
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: rgba(219, 233, 169, 0.16);
  color: var(--lime);
}

.toast-icon svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.toast > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast strong {
  font-size: 11px;
}

.toast span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
}

@keyframes markerPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.68;
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 218px;
  }

  .sidebar {
    padding-inline: 16px;
  }

  .nav-link.is-active::before {
    left: -16px;
  }

  .main-content {
    padding-inline: 24px;
  }

  .overview-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .vitals-column {
    padding-top: 5px;
  }

  .vitals-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vital-card,
  .add-source-card > button {
    min-height: 196px;
  }
}

@media (max-width: 920px) {
  :root {
    --mobile-header-height: 68px;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 20px 13px;
    border-bottom: 1px solid rgba(221, 228, 222, 0.82);
    background: rgba(247, 250, 246, 0.88);
    backdrop-filter: blur(18px);
  }

  .brand-mobile {
    gap: 9px;
  }

  .brand-mobile .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand-mobile .brand-mark svg {
    width: 20px;
  }

  .brand-mobile strong {
    font-size: 17px;
  }

  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-actions .icon-button {
    width: 36px;
    height: 36px;
    border: 0;
    background: white;
  }

  .main-content {
    width: 100%;
    margin: 0;
    padding: 22px 20px 22px;
  }

  .page-header {
    align-items: flex-end;
    margin-bottom: 20px;
  }

  .desktop-demo,
  .header-actions .icon-button {
    display: none;
  }

  .page-header h1 {
    font-size: 29px;
  }

  .header-actions .primary-button {
    min-width: 42px;
    padding: 0 12px;
    font-size: 0;
  }

  .header-actions .primary-button svg {
    width: 18px;
  }

  .overview-card {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
    padding: 30px;
  }

  .overview-stats {
    gap: 0;
  }

  .health-score {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  .score-copy {
    align-items: flex-end;
  }

  .lower-grid {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    height: calc(70px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    padding: 8px 10px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(214, 223, 216, 0.9);
    background: rgba(252, 253, 251, 0.94);
    box-shadow: 0 -10px 30px rgba(30, 57, 46, 0.06);
    backdrop-filter: blur(20px);
  }

  .bottom-link,
  .bottom-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 53px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #849089;
    font-size: 9px;
    font-weight: 600;
  }

  .bottom-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .bottom-link.is-active {
    color: var(--green);
  }

  .bottom-add {
    position: relative;
    top: -18px;
    color: var(--green);
  }

  .bottom-add > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 4px solid var(--bg);
    border-radius: 17px;
    background: var(--green);
    box-shadow: 0 8px 20px rgba(23, 79, 66, 0.23);
    color: white;
  }

  .bottom-add svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
  }

  .bottom-add small {
    font-size: 8px;
    font-weight: 700;
  }

  .toast {
    right: 15px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 680px) {
  body {
    background: #f3f6f1;
  }

  .mobile-header {
    padding-inline: 16px;
  }

  .main-content {
    padding: 19px 14px 17px;
  }

  .page-header {
    gap: 12px;
  }

  .page-header h1 {
    font-size: 25px;
  }

  .page-header p {
    max-width: 270px;
    font-size: 11px;
    line-height: 1.5;
  }

  .date-label {
    font-size: 10px;
  }

  .overview-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 20px 20px;
    border-radius: 23px;
  }

  .overview-copy h2 {
    font-size: 26px;
  }

  .overview-copy > p {
    font-size: 11px;
    line-height: 1.6;
  }

  .overview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .light-button,
  .ghost-light-button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .health-score {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .score-ring {
    width: 108px;
    height: 108px;
  }

  .score-ring::before {
    inset: 5px;
  }

  .score-core strong {
    font-size: 32px;
  }

  .score-copy {
    align-items: flex-start;
  }

  .overview-stats {
    display: flex;
    overflow-x: auto;
    gap: 0;
    margin-inline: -20px;
    padding: 18px 20px 3px;
    scrollbar-width: none;
  }

  .overview-stats::-webkit-scrollbar {
    display: none;
  }

  .overview-stats > div {
    min-width: 165px;
    padding: 0 18px;
  }

  .overview-stats > div:first-child {
    padding-left: 0;
  }

  .dashboard-grid,
  .lower-grid {
    gap: 14px;
    margin-top: 14px;
  }

  .body-map-panel,
  .schedule-panel,
  .documents-panel {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .panel-header h2,
  .section-heading h2 {
    font-size: 18px;
  }

  .body-map-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .body-stage {
    min-height: 435px;
  }

  .body-figure {
    height: 410px;
  }

  .system-inspector {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0 12px;
    padding: 2px 0 0;
  }

  .system-icon {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .status-badge {
    width: fit-content;
  }

  .system-inspector h3 {
    margin: 7px 0 0;
    font-size: 16px;
  }

  .system-inspector > p,
  .system-metrics,
  .details-button,
  .updated-label {
    grid-column: 1 / -1;
  }

  .system-inspector > p {
    margin-top: 12px;
  }

  .system-metrics {
    margin-top: 15px;
  }

  .details-button {
    min-height: 41px;
    margin-top: 11px;
  }

  .vitals-column {
    padding-top: 11px;
  }

  .section-heading.compact {
    padding: 0 2px 13px;
  }

  .vitals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .vital-card,
  .add-source-card > button {
    min-height: 188px;
  }

  .vital-card {
    padding: 14px;
    border-radius: 17px;
  }

  .vital-value {
    font-size: 21px;
  }

  .timeline-item {
    grid-template-columns: 44px 14px minmax(0, 1fr) 30px;
    gap: 8px;
  }

  .timeline-content h3 {
    font-size: 11px;
  }

  .outline-button {
    padding-inline: 10px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
  }

  .data-dialog {
    width: calc(100% - 20px);
    border-radius: 20px;
  }

  .data-dialog form {
    padding: 22px 18px;
  }

  .dialog-fields {
    grid-template-columns: 1fr;
  }

  .toast {
    min-width: 0;
    width: calc(100% - 30px);
  }
}

@media (max-width: 380px) {
  .mobile-header {
    padding-inline: 12px;
  }

  .mobile-actions .demo-pill {
    display: none;
  }

  .main-content {
    padding-inline: 10px;
  }

  .page-header h1 {
    font-size: 23px;
  }

  .overview-actions {
    grid-template-columns: 1fr;
  }

  .body-stage {
    min-height: 400px;
  }

  .body-figure {
    height: 380px;
  }

  .vital-card {
    min-height: 180px;
    padding: 12px;
  }

  .vital-icon {
    width: 31px;
    height: 31px;
  }

  .micro-status {
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vital-value {
    font-size: 18px;
  }

  .timeline-item {
    grid-template-columns: 42px 12px minmax(0, 1fr);
  }

  .timeline-item > .more-button {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
