.live-tracker-page {
  background:
    linear-gradient(180deg, #f7fafc 0%, #ffffff 46%, #f3f7fa 100%);
  color: var(--modern-ink);
  font-family: var(--modern-font);
  margin: 0;
  min-height: 100vh;
}

.live-tracker-nav {
  align-items: center;
  background: rgba(12, 43, 54, 0.94);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  min-height: 70px;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.live-tracker-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  padding: 8px 0;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
}

.live-tracker-nav a::after {
  background: linear-gradient(90deg, var(--modern-teal), var(--modern-amber));
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  opacity: 0;
  position: absolute;
  transform: scaleX(0.4);
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
  width: 100%;
}

.live-tracker-nav a:hover,
.live-tracker-nav a:focus-visible,
.live-tracker-nav a[aria-current="page"] {
  color: #ffffff;
}

.live-tracker-nav a:hover::after,
.live-tracker-nav a:focus-visible::after,
.live-tracker-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.live-tracker-shell {
  margin: 0 auto;
  max-width: 1360px;
  padding: 34px 22px 54px;
}

.live-tracker-title {
  align-items: end;
  display: grid;
  gap: 10px 24px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 24px;
}

.live-tracker-eyebrow {
  color: var(--modern-teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.live-tracker-title h1 {
  color: var(--modern-ink);
  font-size: 2.45rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.live-tracker-lead {
  color: var(--modern-muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 10px 0 0;
}

.weight-account-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.11);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.07);
  display: grid;
  gap: 14px 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.weight-account-panel [hidden] {
  display: none !important;
}

.weight-account-identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.weight-account-avatar {
  align-items: center;
  background: #e8f4f6;
  border: 1px solid rgba(26, 108, 122, 0.18);
  border-radius: 8px;
  color: var(--modern-teal);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
  width: 44px;
}

.weight-account-avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.weight-account-identity p {
  color: var(--modern-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.weight-account-identity strong {
  color: var(--modern-ink);
  display: block;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weight-account-identity span:not(.weight-account-avatar) {
  color: var(--modern-muted);
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
  margin-top: 4px;
}

.weight-account-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.weight-profile-select {
  display: grid;
  gap: 4px;
}

.weight-profile-select span {
  color: var(--modern-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.weight-profile-select select {
  appearance: none;
  background: #f8fafc;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 7px;
  color: var(--modern-ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  height: 38px;
  line-height: 1.2;
  max-width: 190px;
  min-width: 150px;
  padding: 0 32px 0 10px;
}

.weight-profile-select select:focus {
  border-color: var(--modern-teal);
  box-shadow: 0 0 0 3px rgba(26, 108, 122, 0.13);
  outline: none;
}

.weight-google-button,
.weight-secondary-button {
  align-items: center;
  appearance: none;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0 13px;
  text-transform: none;
}

.weight-google-button {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.18);
  color: #273344;
}

.weight-google-button::before {
  background:
    conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  border-radius: 999px;
  content: "";
  height: 15px;
  margin-right: 8px;
  width: 15px;
}

.weight-secondary-button {
  background: #f8fafc;
  border: 1px solid rgba(17, 24, 39, 0.13);
  color: #293547;
}

.weight-google-button:hover,
.weight-google-button:focus-visible,
.weight-secondary-button:hover,
.weight-secondary-button:focus-visible {
  background: rgba(26, 108, 122, 0.08);
  border-color: rgba(26, 108, 122, 0.34);
  box-shadow: none;
  color: #145764;
  outline: none;
  transform: none;
}

.weight-google-button:disabled,
.weight-secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.weight-account-message {
  color: var(--modern-muted);
  font-size: 0.84rem;
  grid-column: 1 / -1;
  line-height: 1.35;
  margin: -4px 0 0;
}

.weight-monitor-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(440px, 0.92fr) minmax(520px, 1.08fr);
}

.weight-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.11);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.weight-panel__header {
  align-items: center;
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 82px;
  padding: 18px;
}

.weight-panel__header--chart {
  align-items: start;
}

.weight-panel__header h2 {
  color: var(--modern-ink);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.weight-panel__header p {
  color: var(--modern-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 6px 0 0;
}

.weight-icon-button {
  align-items: center;
  appearance: none;
  background: var(--modern-teal);
  border: 1px solid var(--modern-teal);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.45rem;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 42px;
}

.weight-icon-button:hover,
.weight-icon-button:focus-visible {
  background: #145764;
  border-color: #145764;
  box-shadow: 0 10px 22px rgba(26, 108, 122, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.weight-table-scroll {
  max-height: 600px;
  overflow-x: hidden;
  overflow-y: auto;
}

.weight-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.weight-table th {
  background: #f4f7fb;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  color: #263241;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  padding: 12px 10px;
  position: sticky;
  text-align: left;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.weight-table th:nth-child(1) {
  width: 37%;
}

.weight-table th:nth-child(2),
.weight-table th:nth-child(3) {
  width: 19%;
}

.weight-table th:nth-child(4) {
  width: 25%;
}

.weight-table td {
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  padding: 9px 8px;
  vertical-align: middle;
}

.weight-table tr.is-editing td {
  background: rgba(216, 135, 31, 0.08);
}

.weight-table input {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 6px;
  color: var(--modern-ink);
  font: inherit;
  font-size: 0.92rem;
  height: 38px;
  line-height: 1.2;
  min-width: 0;
  padding: 8px;
  width: 100%;
}

.weight-table input:focus {
  border-color: var(--modern-teal);
  box-shadow: 0 0 0 3px rgba(26, 108, 122, 0.13);
  outline: none;
}

.weight-input-control {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 54px minmax(0, 1fr);
}

.weight-step-controls {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, 25px);
}

.weight-step-controls button {
  align-items: center;
  appearance: none;
  background: #f8fafc;
  border: 1px solid rgba(17, 24, 39, 0.13);
  border-radius: 6px;
  color: #243244;
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-transform: none;
  width: 25px;
}

.weight-step-controls button:hover,
.weight-step-controls button:focus-visible {
  background: rgba(26, 108, 122, 0.09);
  border-color: rgba(26, 108, 122, 0.32);
  box-shadow: none;
  color: #145764;
  outline: none;
  transform: none;
}

.weight-row-actions {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.weight-action-button {
  align-items: center;
  appearance: none;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 6px;
  color: #233041;
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.weight-action-button svg {
  display: block;
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

.weight-action-button:hover,
.weight-action-button:focus-visible {
  background: rgba(26, 108, 122, 0.08);
  border-color: rgba(26, 108, 122, 0.34);
  box-shadow: none;
  color: #145764;
  outline: none;
  transform: none;
}

.weight-action-button[data-row-action="duplicate"]:hover,
.weight-action-button[data-row-action="duplicate"]:focus-visible {
  background: rgba(36, 84, 166, 0.09);
  border-color: rgba(36, 84, 166, 0.3);
  color: var(--modern-blue);
}

.weight-action-button[data-row-action="remove"]:hover,
.weight-action-button[data-row-action="remove"]:focus-visible {
  background: rgba(171, 45, 45, 0.09);
  border-color: rgba(171, 45, 45, 0.3);
  color: #8b2323;
}

.weight-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: flex-end;
}

.weight-legend span {
  align-items: center;
  color: #263241;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 7px;
  line-height: 1.2;
}

.weight-legend__dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.weight-legend__dot--morning {
  background: var(--modern-teal);
}

.weight-legend__dot--evening {
  background: var(--modern-amber);
}

.weight-chart-options {
  align-items: center;
  background: #fbfcfe;
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  padding: 12px 18px;
}

.weight-chart-control {
  align-items: center;
  border: 0;
  display: flex;
  gap: 10px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.weight-chart-control legend {
  color: var(--modern-muted);
  float: left;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-right: 10px;
  padding: 0;
  text-transform: uppercase;
}

.weight-segmented-control {
  background: #eef3f7;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  display: inline-grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  overflow: hidden;
}

.weight-segmented-control button {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #293547;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  height: 32px;
  line-height: 1;
  min-width: 72px;
  padding: 0 12px;
  text-transform: none;
}

.weight-segmented-control button + button {
  border-left: 1px solid rgba(17, 24, 39, 0.1);
}

.weight-segmented-control button[aria-pressed="true"] {
  background: #ffffff;
  color: #145764;
  box-shadow: inset 0 -2px 0 var(--modern-teal);
}

.weight-segmented-control button:hover,
.weight-segmented-control button:focus-visible {
  background: rgba(26, 108, 122, 0.08);
  box-shadow: none;
  color: #145764;
  outline: none;
  transform: none;
}

.weight-segmented-control button[aria-pressed="true"]:hover,
.weight-segmented-control button[aria-pressed="true"]:focus-visible {
  background: #ffffff;
  box-shadow: inset 0 -2px 0 var(--modern-teal);
}

.weight-chart-frame {
  height: 430px;
  padding: 18px 18px 12px;
}

.weight-chart-frame canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.weight-regression-grid {
  border-top: 1px solid rgba(17, 24, 39, 0.1);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weight-regression {
  background: #f8fafc;
  color: #293547;
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
  min-height: 62px;
  padding: 16px 18px;
}

.weight-regression strong {
  color: var(--modern-teal);
}

@media (max-width: 1080px) {
  .weight-monitor-layout {
    grid-template-columns: 1fr;
  }

  .weight-panel--chart {
    order: -1;
  }
}

@media (max-width: 680px) {
  .live-tracker-shell {
    padding: 24px 14px 38px;
  }

  .live-tracker-title h1 {
    font-size: 2rem;
  }

  .weight-account-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .weight-account-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .weight-profile-select select,
  .weight-google-button,
  .weight-secondary-button {
    max-width: none;
    width: 100%;
  }

  .weight-panel__header {
    align-items: stretch;
    flex-direction: column;
  }

  .weight-table-scroll {
    overflow-x: auto;
  }

  .weight-table {
    min-width: 620px;
  }

  .weight-icon-button {
    align-self: flex-start;
  }

  .weight-chart-options {
    align-items: stretch;
    flex-direction: column;
  }

  .weight-chart-control {
    justify-content: space-between;
  }

  .weight-chart-frame {
    height: 340px;
    padding: 12px;
  }

  .weight-regression-grid {
    grid-template-columns: 1fr;
  }
}
