.vmt-app {
  --vmt-bg: #f7f4ef;
  --vmt-panel: #fffdf9;
  --vmt-ink: #243033;
  --vmt-muted: #65706d;
  --vmt-line: #ded7cb;
  --vmt-green: #356b5a;
  --vmt-teal: #0f7b83;
  --vmt-gold: #b8752f;
  --vmt-red: #a94335;
  --vmt-shadow: 0 18px 50px rgba(43, 51, 47, 0.12);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 780px;
  margin: 0 auto;
  color: var(--vmt-ink);
  background: linear-gradient(120deg, #f7f4ef 0%, #edf4f1 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.vmt-app *,
.vmt-app *::before,
.vmt-app *::after {
  box-sizing: border-box;
}

.vmt-app button,
.vmt-app input,
.vmt-app select {
  font: inherit;
}

.vmt-app button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--vmt-green);
  cursor: pointer;
}

.vmt-app button:hover {
  filter: brightness(0.96);
}

.vmt-app input,
.vmt-app select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--vmt-line);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--vmt-ink);
  background: #fff;
}

.vmt-sidebar {
  padding: 24px;
  border-right: 1px solid var(--vmt-line);
  background: rgba(255, 253, 249, 0.86);
}

.vmt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.vmt-brand img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--vmt-shadow);
}

.vmt-brand strong,
.vmt-brand span {
  display: block;
}

.vmt-brand span,
.vmt-note p,
.vmt-panel p,
.vmt-food-meta,
.vmt-food-serving,
.vmt-fine,
.vmt-status,
.vmt-metric small {
  color: var(--vmt-muted);
}

.vmt-tabs {
  display: grid;
  gap: 8px;
}

.vmt-tab {
  width: 100%;
  color: var(--vmt-ink) !important;
  background: transparent !important;
  text-align: left;
}

.vmt-tab.is-active {
  color: #fff !important;
  background: var(--vmt-green) !important;
}

.vmt-note {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--vmt-line);
  border-radius: 8px;
  background: #faf7f0;
}

.vmt-note p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.vmt-main {
  min-width: 0;
  padding: 30px;
}

.vmt-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.vmt-eyebrow {
  margin: 0 0 6px;
  color: var(--vmt-gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.vmt-app h1,
.vmt-app h2 {
  margin: 0;
  letter-spacing: 0;
}

.vmt-app h1 {
  font-size: clamp(1.75rem, 3vw, 2.8rem);
  line-height: 1.08;
}

.vmt-app h2 {
  font-size: 1.15rem;
}

.vmt-date,
.vmt-form label {
  display: grid;
  gap: 7px;
  color: #40504c;
  font-size: 0.9rem;
  font-weight: 700;
}

.vmt-date {
  min-width: 190px;
}

.vmt-view {
  display: none;
}

.vmt-view.is-active {
  display: block;
}

.vmt-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.vmt-metric,
.vmt-panel {
  border: 1px solid var(--vmt-line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--vmt-shadow);
}

.vmt-metric {
  padding: 18px;
}

.vmt-metric span,
.vmt-metric small,
.vmt-metric strong {
  display: block;
}

.vmt-metric strong {
  margin: 7px 0 2px;
  font-size: 1.85rem;
}

.vmt-metric > div {
  height: 8px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e0d6;
}

.vmt-metric i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vmt-teal), var(--vmt-gold));
}

.vmt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.vmt-panel {
  padding: 20px;
}

.vmt-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.vmt-panel p {
  margin: 7px 0 0;
  line-height: 1.48;
}

.vmt-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.vmt-status {
  min-height: 22px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.vmt-results,
.vmt-log,
.vmt-saved {
  display: grid;
  gap: 10px;
}

.vmt-food-card,
.vmt-log-row,
.vmt-saved-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--vmt-line);
  border-radius: 8px;
  background: #fff;
}

.vmt-food-name,
.vmt-food-serving {
  display: block;
}

.vmt-food-serving,
.vmt-food-meta {
  margin-top: 3px;
  font-size: 0.88rem;
}

.vmt-food-meta {
  margin-bottom: 0;
}

.vmt-food-actions {
  display: grid;
  grid-template-columns: 74px 72px;
  gap: 8px;
  align-items: center;
}

.vmt-meal-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.vmt-meal-option {
  min-width: 0;
  padding: 0 8px;
  color: var(--vmt-ink) !important;
  background: #eee7dc !important;
}

.vmt-meal-option.is-active {
  color: #fff !important;
  background: var(--vmt-teal) !important;
}

.vmt-ghost {
  color: var(--vmt-green) !important;
  background: #e8f0ec !important;
}

.vmt-danger {
  margin-left: 8px;
  background: var(--vmt-red) !important;
}

.vmt-log-row button,
.vmt-saved-row button {
  color: var(--vmt-red) !important;
  background: #fae7e3 !important;
}

.vmt-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.vmt-form button {
  grid-column: 1 / -1;
}

.vmt-target {
  margin: 22px 0;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--vmt-green), var(--vmt-teal));
  font-size: 1.1rem;
}

.vmt-target span {
  font-size: 3rem;
  font-weight: 800;
}

.vmt-target-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.vmt-target-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--vmt-line);
}

.vmt-target-list dt {
  color: var(--vmt-muted);
}

.vmt-target-list dd {
  margin: 0;
  font-weight: 800;
}

.vmt-fine {
  margin-top: 18px;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .vmt-app {
    grid-template-columns: 1fr;
  }

  .vmt-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--vmt-line);
  }

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

  .vmt-tab {
    text-align: center;
  }

  .vmt-note {
    display: none;
  }

  .vmt-metrics,
  .vmt-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .vmt-main,
  .vmt-sidebar {
    padding: 18px;
  }

  .vmt-topbar,
  .vmt-panel-head {
    display: grid;
    align-items: stretch;
  }

  .vmt-metrics,
  .vmt-grid,
  .vmt-form,
  .vmt-meal-filter,
  .vmt-tabs,
  .vmt-search,
  .vmt-food-card,
  .vmt-log-row,
  .vmt-saved-row {
    grid-template-columns: 1fr;
  }

  .vmt-food-actions {
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}
