:root {
  --bg: #040d19;
  --panel: #0a1a2a;
  --text: #e0e7ff;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-dim: rgba(16, 185, 129, 0.25);
  --danger: #f87171;
  --border: rgba(16, 185, 129, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: radial-gradient(circle at 20% 20%, var(--accent-dim), transparent 50%), var(--bg);
  color: var(--text);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
}

.header-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

/* Logo size + header shell: /assets/css/gzone-header.css */

.header-center {
  justify-self: center;
  text-align: center;
  min-width: 0;
  padding: 0 0.5rem;
}

.app-header {
  position: relative;
}

.app-header .header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: max-content;
  max-width: min(100vw - 10rem, 24rem);
  pointer-events: none;
}

.app-header .header-logo-link,
.app-header .header-toolbar {
  position: relative;
  z-index: 2;
}

.app-header .header-toolbar {
  margin-left: auto;
  justify-content: flex-end;
}

.app-header .header-title {
  margin: 0;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #00ff9d;
  text-shadow: 0 0 14px rgba(0, 255, 157, 0.35);
}

.header-title {
  margin: 0;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--text);
}

.header-tagline {
  margin: 0.2rem 0 0;
  font-size: clamp(0.72rem, 2.5vw, 0.82rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.header-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 2.75rem;
}

.nav-menu {
  position: relative;
}

.nav-menu-btn {
  margin: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #06111d;
  color: var(--text);
  cursor: pointer;
}

.nav-menu-btn:hover,
.nav-menu-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.nav-menu-icon {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.nav-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12.5rem;
  padding: 0.35rem 0;
  background: #0a1a2a;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.nav-menu-panel[hidden] {
  display: none;
}

.nav-menu-panel a.app-menu-item,
.user-menu-panel a.app-menu-item,
.user-menu-panel button.app-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.35;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.nav-menu-panel a {
  display: block;
  padding: 0.62rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.35;
}

.app-menu-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.88;
}

.app-menu-divider {
  margin: 0.35rem 0;
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.nav-menu-panel a.app-menu-item:hover,
.nav-menu-panel a.app-menu-item[aria-current='page'],
.user-menu-panel a.app-menu-item:hover,
.user-menu-panel button.app-menu-item:hover {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}

.nav-menu-panel a:hover,
.nav-menu-panel a[aria-current='page'] {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}

.user-menu-panel a.app-menu-item--danger {
  color: #fca5a5;
}

.user-menu-panel a.app-menu-item--danger:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #fecaca;
}

@media (min-width: 900px) {
  .nav-menu-panel {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(148, 163, 184, 0.12);
    min-width: 16.5rem;
    padding: 0.45rem 0;
  }

  .user-menu-panel {
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(148, 163, 184, 0.12);
    min-width: 20.5rem;
    padding: 0.45rem 0;
  }

  .nav-menu-panel a.app-menu-item,
  .user-menu-panel a.app-menu-item,
  .user-menu-panel button.app-menu-item,
  .nav-menu-panel a {
    font-size: 1.05rem;
    padding: 0.65rem 1rem;
  }

  .user-menu-email {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}

@media (max-width: 380px) {
  .header-tagline {
    display: none;
  }
}

.user-menu {
  position: relative;
}

.avatar-btn {
  margin: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: #06111d;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}

.avatar-btn:hover,
.avatar-btn:focus-visible {
  background: rgba(16, 185, 129, 0.15);
  outline: none;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 15.5rem;
  max-width: min(22rem, 92vw);
  padding: 0.5rem 0;
  background: #0a1a2a;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.user-menu-panel[hidden] {
  display: none;
}

.user-menu-email {
  margin: 0 0.75rem 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  word-break: break-all;
  font-size: 0.88rem;
}

.user-menu-panel a,
.user-menu-panel .menu-logout {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.62rem 0.9rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-panel a:hover,
.user-menu-panel .menu-logout:hover {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}

.settings-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.settings-links li {
  margin: 0.5rem 0;
}

.settings-links a {
  color: var(--accent);
}

.profile-dl {
  margin: 1rem 0 0;
}

.profile-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.profile-row dt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.profile-row dd {
  margin: 0;
  font-size: 0.95rem;
  word-break: break-word;
}

.app-main {
  max-width: 420px;
  margin: 2rem auto;
  padding: 0 1rem;
}

body[data-route="home"] .app-main {
  max-width: 720px;
}

.panel {
  background: linear-gradient(180deg, rgba(10, 26, 42, 0.95), rgba(4, 13, 25, 0.95));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.12);
}

h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; margin-top: 1rem; }
.forgot-row { margin-top: 0.75rem; margin-bottom: 0; }
.forgot-row a { color: var(--accent); }

label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input,
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #06111d;
  color: var(--text);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 4.25rem;
}

.pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}

.pw-toggle:hover,
.pw-toggle:focus-visible {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.12);
  outline: none;
}

.pw-icon[hidden] {
  display: none;
}

.btn {
  margin-top: 1.25rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: var(--accent);
  color: #042015;
  border-color: transparent;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  width: auto;
  padding: 0.5rem 1rem;
}

.error { color: var(--danger); margin-top: 0.75rem; }
.success { color: var(--accent); margin-top: 0.75rem; }

.save-feedback {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
  font-weight: 650;
  color: var(--accent);
}

.save-feedback-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.save-feedback-mark::before {
  content: "✓";
}

.save-feedback-text {
  line-height: 1.35;
}

.code-block {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: #06111d;
  border: 1px solid var(--border);
  overflow: auto;
  font-size: 0.8rem;
  max-height: 360px;
}

.dash-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.dash-subtitle { margin: 0; }

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.subpanel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.dashboard { margin-top: 0.5rem; }

.legacy-dash {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.today-heading {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body[data-route="dashboard"] .app-main {
  width: 100%;
  max-width: none;
  margin: clamp(1.25rem, 3vw, 2rem) auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  body[data-route="dashboard"] .app-main {
    width: 75vw;
    max-width: 75vw;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }
}

.dash-hub,
.dash-premium {
  width: 100%;
}

.dash-premium {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.25rem 0 1.5rem;
}

.dash-prem-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 800;
}

.dash-prem-date,
.dash-prem-greeting {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.dash-prem-greeting {
  color: var(--text);
  line-height: 1.45;
}

.dash-energy-hero {
  border-radius: 14px;
  background: linear-gradient(145deg, #064e3b, #047857);
  color: #ecfdf5;
  padding: 1rem 1.1rem;
}

.dash-energy-hero__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash-energy-stat__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.dash-energy-stat__value {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dash-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.dash-quick-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}

.dash-overview-grid {
  display: grid;
  gap: 0.65rem;
}

.dash-module {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.dash-module__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
}

.dash-module__stats {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.dash-module__stats > div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-module__stats dt {
  color: var(--muted);
  font-weight: 600;
}

.dash-module__stats dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.dash-meals,
.dash-recent-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 0.9rem 1rem;
}

.dash-meals__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dash-meals__table th,
.dash-meals__table td {
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.dash-meals__empty {
  text-align: center;
  padding: 1rem !important;
  color: var(--muted);
}

.dash-meals__cta {
  color: var(--accent);
  font-weight: 700;
}

.dash-recent-grid {
  display: grid;
  gap: 0.65rem;
}

.weight-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weight-dashboard__motivation {
  margin: 0.25rem 0 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.weight-hero {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 157, 0.25);
  background: linear-gradient(160deg, rgba(0, 255, 157, 0.08), transparent 55%);
}

.weight-date-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 220px;
  min-height: 52px;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}

.weight-date-field__text {
  font-size: 20px;
  font-weight: 600;
}

.weight-date-field__input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
}

.weight-hero__value-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.weight-hero__kg-input {
  font-size: 56px;
  font-weight: 800;
  width: 4.5ch;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text);
  line-height: 1;
}

.weight-stepper {
  min-width: 56px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--accent);
}

.weight-hero__save,
.weight-hero__reminder {
  min-height: 48px;
}

.weight-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.weight-stat-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.weight-stat-card--wide {
  grid-column: 1 / -1;
}

.weight-trend__periods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.weight-period-btn {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.weight-recent__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.weight-recent__table th,
.weight-recent__table td {
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--border);
}

.weight-habit {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
}

.dash-card {
  width: 100%;
  padding: clamp(1.25rem, 2.2vw, 2rem);
}

.dash-card-head {
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

.dash-card-head h1 {
  margin: 0 0 0.35rem;
  text-align: left;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.dash-card-lead {
  margin: 0;
  text-align: left;
}

.dash-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1rem);
  margin-bottom: 0;
  align-items: start;
}

@media (min-width: 640px) and (max-width: 899px) {
  .dash-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .dash-tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* Personal command center (desktop-only layout scope) */
body[data-route="profile"] .app-main,
body[data-route="profile-personal"] .app-main,
body[data-route="profile-weight"] .app-main,
body[data-route="profile-bmi"] .app-main,
body[data-route="profile-goals"] .app-main {
  width: 100%;
  max-width: min(1440px, 100%);
  margin: clamp(1.25rem, 3vw, 2.5rem) auto;
  padding-left: clamp(1rem, 3vw, 2.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
  box-sizing: border-box;
}

.personal-command {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.personal-command-head {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  text-align: center;
  width: 100%;
  max-width: 52rem;
}

body[data-route="profile"] .personal-command-lead {
  margin-left: auto;
  margin-right: auto;
}

.personal-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.personal-command-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.personal-command-lead {
  margin: 0;
  max-width: 52rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.55;
}

.personal-modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.15rem, 2.2vw, 1.85rem);
  align-items: stretch;
  justify-content: center;
  justify-items: center;
  width: 100%;
  max-width: 78rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .personal-modules {
    grid-template-columns: repeat(2, minmax(min(100%, 19.5rem), 24rem));
    justify-content: center;
    justify-items: center;
  }
}

@media (min-width: 1100px) {
  .personal-modules {
    grid-template-columns: repeat(3, minmax(19.5rem, 24rem));
    gap: clamp(1.35rem, 2.2vw, 1.85rem);
    justify-content: center;
    justify-items: center;
    max-width: 78rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.personal-module {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 24rem);
  max-width: 24rem;
  justify-self: center;
  min-height: 20.5rem;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(160deg, rgba(10, 26, 42, 0.96) 0%, rgba(4, 13, 25, 0.98) 100%);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.personal-module-hit {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.personal-module-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.personal-module > :not(.personal-module-hit) {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.personal-module:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.personal-module-num {
  display: inline-block;
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.personal-module-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.22;
  padding: 0 0.25rem;
  text-align: center;
  width: 100%;
}

.personal-module-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.personal-module-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: clamp(1.02rem, 1.55vw, 1.18rem);
  line-height: 1.35;
  text-align: center;
}

.personal-module-stats li span {
  color: var(--muted);
  flex-shrink: 0;
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
}

.personal-module-stats li strong {
  font-weight: 650;
  text-align: center;
  font-size: clamp(1.12rem, 1.75vw, 1.35rem);
  word-break: break-word;
}

.personal-module-cta {
  margin-top: auto;
  padding-top: 1rem;
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  width: 100%;
}

.personal-module--weight {
  border-color: rgba(249, 115, 22, 0.45);
  background: linear-gradient(160deg, rgba(30, 18, 8, 0.65) 0%, rgba(10, 26, 42, 0.98) 55%);
  box-shadow: 0 14px 44px rgba(249, 115, 22, 0.12), 0 12px 40px rgba(0, 0, 0, 0.3);
  min-height: 20.5rem;
}

.personal-module--weight:hover {
  border-color: rgba(249, 115, 22, 0.65);
}

.personal-module--weight .personal-module-num {
  color: #fb923c;
}

.personal-module--current {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(16, 185, 129, 0.22);
}

.personal-command--sub {
  width: 100%;
  align-items: center;
}

.personal-command--sub .personal-modules {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: 1fr;
  justify-content: center;
  justify-items: center;
}

.personal-command--sub .personal-module:not(.personal-module--current) {
  display: none;
}

.personal-command--sub .personal-module--current {
  width: min(100%, 24rem);
  justify-self: center;
}

.personal-module--weight.personal-module--current {
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(249, 115, 22, 0.28);
}

.personal-detail-panel {
  width: min(100%, 40rem);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.personal-command--sub .page-back {
  text-align: center;
}

.personal-command--sub .quick-form {
  width: min(100%, 22rem);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.personal-command--sub .personal-detail-panel .section-label {
  text-align: center;
}

.personal-command--sub .entry-list li.empty {
  justify-content: center;
  text-align: center;
}

.personal-data-page {
  width: min(100%, 56rem);
  max-width: 56rem;
}

.personal-data-head {
  text-align: center;
}

.personal-data-head h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
}

.personal-data-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .personal-data-grid {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: start;
  }
}

.personal-data-readonly {
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(4, 13, 25, 0.65);
}

.personal-data-weight-dl {
  margin: 0.75rem 0 0;
}

.personal-data-form-cols {
  display: grid;
  gap: 0.25rem 1.5rem;
}

@media (min-width: 640px) {
  .personal-data-form-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.personal-data-form-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.personal-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.personal-module--weight .personal-module-cta {
  color: #fb923c;
}

.personal-sub {
  max-width: 40rem;
}

.personal-sub .saldo-box {
  max-width: 22rem;
  margin: 1rem 0;
}

.dash-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: clamp(0.85rem, 1.4vw, 1.05rem);
  border-radius: 14px;
  border: 1px solid var(--tile-border, rgba(255, 255, 255, 0.1));
  background: var(--tile-bg, rgba(6, 17, 29, 0.82));
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.dash-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tile-shine, transparent);
  pointer-events: none;
  opacity: 1;
}

.dash-tile:hover {
  transform: translateY(-3px);
  border-color: var(--tile-accent, var(--accent));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.dash-tile:active {
  transform: translateY(-1px);
}

.dash-tile-icon {
  position: absolute;
  top: clamp(0.7rem, 1.2vw, 0.85rem);
  right: clamp(0.7rem, 1.2vw, 0.85rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  color: var(--tile-accent);
  background: var(--tile-icon-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--tile-icon-border, rgba(255, 255, 255, 0.08));
  opacity: 0.92;
  z-index: 1;
}

.dash-tile-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  gap: 0.25rem;
  padding-right: 2.35rem;
  padding-top: 0.1rem;
  text-align: left;
}

.dash-tile-title {
  font-size: clamp(0.68rem, 1.1vw, 0.74rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tile-accent, var(--accent));
  line-height: 1.2;
}

.dash-tile-value {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f1f5f9;
}

.dash-tile-balance {
  align-items: flex-start;
  padding-top: 0.15rem;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.12;
}

.dash-tile-desc {
  margin-top: auto;
  font-size: clamp(0.72rem, 1.1vw, 0.78rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-tile--today {
  --tile-accent: #34d399;
  --tile-border: rgba(52, 211, 153, 0.28);
  --tile-bg: linear-gradient(152deg, rgba(6, 78, 59, 0.55) 0%, rgba(4, 13, 25, 0.94) 58%);
  --tile-shine: linear-gradient(135deg, rgba(52, 211, 153, 0.12) 0%, transparent 52%);
  --tile-icon-bg: rgba(6, 78, 59, 0.45);
  --tile-icon-border: rgba(52, 211, 153, 0.22);
}

.dash-tile--week {
  --tile-accent: #38bdf8;
  --tile-border: rgba(56, 189, 248, 0.26);
  --tile-bg: linear-gradient(152deg, rgba(12, 74, 110, 0.5) 0%, rgba(4, 13, 25, 0.94) 58%);
  --tile-shine: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, transparent 52%);
  --tile-icon-bg: rgba(12, 74, 110, 0.42);
  --tile-icon-border: rgba(56, 189, 248, 0.2);
}

.dash-tile--favorites {
  --tile-accent: #fbbf24;
  --tile-border: rgba(251, 191, 36, 0.26);
  --tile-bg: linear-gradient(152deg, rgba(120, 53, 15, 0.42) 0%, rgba(4, 13, 25, 0.94) 58%);
  --tile-shine: linear-gradient(135deg, rgba(251, 191, 36, 0.09) 0%, transparent 52%);
  --tile-icon-bg: rgba(120, 53, 15, 0.38);
  --tile-icon-border: rgba(251, 191, 36, 0.2);
}

.dash-tile--profile {
  --tile-accent: #a78bfa;
  --tile-border: rgba(167, 139, 250, 0.26);
  --tile-bg: linear-gradient(152deg, rgba(76, 29, 149, 0.42) 0%, rgba(4, 13, 25, 0.94) 58%);
  --tile-shine: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, transparent 52%);
  --tile-icon-bg: rgba(76, 29, 149, 0.38);
  --tile-icon-border: rgba(167, 139, 250, 0.2);
}

.dash-tile--activities {
  --tile-accent: #fb923c;
  --tile-border: rgba(251, 146, 60, 0.28);
  --tile-bg: linear-gradient(152deg, rgba(124, 45, 18, 0.45) 0%, rgba(4, 13, 25, 0.94) 58%);
  --tile-shine: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, transparent 52%);
  --tile-icon-bg: rgba(124, 45, 18, 0.4);
  --tile-icon-border: rgba(251, 146, 60, 0.22);
}

.dash-tile-balance.defizit {
  color: #6ee7b7;
}

.dash-tile-balance.ueberschuss {
  color: #fecaca;
}

.dash-tile-today.is-deficit {
  --tile-border: rgba(52, 211, 153, 0.42);
  --tile-bg: linear-gradient(152deg, rgba(6, 95, 70, 0.62) 0%, rgba(4, 13, 25, 0.94) 58%);
}

.dash-tile-today.is-surplus {
  --tile-accent: #f87171;
  --tile-border: rgba(248, 113, 113, 0.38);
  --tile-bg: linear-gradient(152deg, rgba(127, 29, 29, 0.5) 0%, rgba(4, 13, 25, 0.94) 58%);
  --tile-shine: linear-gradient(135deg, rgba(248, 113, 113, 0.1) 0%, transparent 52%);
  --tile-icon-bg: rgba(127, 29, 29, 0.45);
  --tile-icon-border: rgba(248, 113, 113, 0.22);
}

.dash-today-block {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding-top: clamp(1.1rem, 2vw, 1.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.dash-today-meals {
  min-width: 0;
}

.dash-today-meals-meta {
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.dash-today-food-list {
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  margin-bottom: 0.85rem;
  padding-right: 0.15rem;
}

.dash-today-food-list .entry-name {
  font-weight: 600;
  color: #f1f5f9;
  word-break: break-word;
}

.dash-today-meals-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.dash-nutrition-teaser {
  margin: 0.65rem 0 0;
  line-height: 1.45;
  font-size: 0.82rem;
}

.dash-nutrition-teaser a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.dash-nutrition-teaser a:hover {
  text-decoration: underline;
}

/* —— Nutrition stats page —— */
.nut-hub {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}

.nut-card {
  text-align: left;
}

.nut-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.nut-lead {
  margin: 0 0 1rem;
}

.nut-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.nut-period {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: rgba(6, 17, 29, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nut-period-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.nut-period-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
}

.nut-status {
  margin: 0 0 0.75rem;
}

.nut-hero {
  margin: 0 0 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 17, 29, 0.85));
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.nut-hero-k {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nut-hero-v {
  margin: 0.2rem 0 0;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  color: #6ee7b7;
  line-height: 1.1;
}

.nut-hero-sub {
  margin: 0.35rem 0 0;
}

.nut-intake-chart {
  margin: 0 0 1rem;
}

.nut-spark-bars {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 5.5rem;
}

.nut-spark-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  height: 100%;
  justify-content: flex-end;
}

.nut-spark-bar {
  display: block;
  width: 100%;
  max-width: 2.25rem;
  min-height: 4px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #38bdf8, rgba(56, 189, 248, 0.35));
}

.nut-spark-k {
  font-size: 0.62rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
}

.nut-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nut-view-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.nut-view-btn.active {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.65);
  color: #f1f5f9;
}

.nut-macro-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .nut-macro-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.nut-macro-tile {
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  background: rgba(6, 17, 29, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.nut-macro-tile-k {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.nut-macro-tile-v {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.nut-bar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nut-bar-row {
  margin: 0 0 0.85rem;
}

.nut-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}

.nut-bar-label {
  color: #e2e8f0;
  font-weight: 600;
}

.nut-bar-value {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.nut-bar-track {
  display: block;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
}

.nut-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #38bdf8);
}

.nut-empty {
  list-style: none;
  padding: 0.5rem 0;
}

.nut-footnote {
  margin: 1.25rem 0 0;
}

.nut-meals {
  margin: 0 0 1.1rem;
}

.nut-meals-hint {
  margin: 0 0 0.65rem;
}

.nut-meals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nut-meal-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 17, 29, 0.5);
}

.nut-meal-details {
  padding: 0.35rem 0.65rem 0.5rem;
}

.nut-meal-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  cursor: pointer;
  list-style: none;
}

.nut-meal-summary::-webkit-details-marker {
  display: none;
}

.nut-meal-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.nut-meal-est {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7dd3fc;
}

.nut-meal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.nut-meal-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}

.nut-meal-micros {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.nut-meal-micros li {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  color: var(--muted);
}

.nut-meal-micros li span:last-child {
  color: #e2e8f0;
  font-weight: 600;
}

.nut-meal-empty {
  margin: 0.5rem 0 0;
}

.dash-week-block {
  width: 100%;
  margin-top: 0;
  padding: 0;
  border-top: none;
  min-width: 0;
}

@media (max-width: 767px) {
  .dash-week-block {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.dash-week-block .section-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38bdf8;
}

.dash-today-meals .section-label,
.dash-week-weekly-total {
  margin: 0 0 0.35rem;
}

.dash-week-weekly-total {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 17, 29, 0.65);
  text-align: left;
}

.dash-week-stat-k {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.dash-week-stat-v {
  display: block;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.2;
}

.dash-week-stat-hint {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.dash-week-block #progress-status {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.dash-week-block .progress-days {
  margin-top: 0.25rem;
}

.dash-week-block .progress-day {
  padding: 1rem 0;
}

.dash-week-block .progress-day-meta {
  font-size: 0.85rem;
  line-height: 1.4;
}

.yesterday-card {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(6, 17, 29, 0.72);
  text-align: left;
}

.yesterday-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.yesterday-dl .profile-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.yesterday-dl dt {
  margin: 0;
  color: var(--muted);
}

.yesterday-dl dd {
  margin: 0;
  font-weight: 600;
}

.progress-days {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.progress-day {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.65rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.progress-day.is-today {
  border-bottom-color: rgba(57, 255, 20, 0.18);
}

.progress-day-date-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.1rem;
}

.progress-day-intake {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.progress-day-intake::before {
  content: 'In ';
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-day-bal {
  grid-column: 3;
  grid-row: 1;
}

.progress-day-meta {
  grid-column: 1 / -1;
}

.progress-day.defizit .progress-day-bal {
  color: var(--accent);
}

.progress-day.ueberschuss .progress-day-bal {
  color: var(--danger);
}

.progress-day.is-highlight {
  background: rgba(16, 185, 129, 0.06);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 8px;
}

.progress-day-date {
  font-weight: 600;
  grid-column: 1;
}

.progress-day-bal {
  font-weight: 700;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.progress-day-meta {
  grid-column: 1;
  font-size: 0.82rem;
  color: var(--muted);
}

.dash-date {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.dash-motto {
  margin: 0.5rem 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.green-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
}

.green-badge-green {
  color: #042015;
  background: var(--accent);
  border-color: transparent;
}

.green-badge-over-target { color: var(--danger); border-color: rgba(248, 113, 113, 0.5); }
.green-badge-neutral { color: var(--text); }
.green-badge-insufficient-data { color: var(--muted); }

.saldo-box {
  text-align: center;
  padding: 1.35rem 1rem 1.1rem;
  border-radius: 14px;
  border: 3px solid var(--border);
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.saldo-box.defizit {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: pulse-green-zone 2.4s ease-in-out infinite;
}

.saldo-box.ueberschuss {
  border-color: #ef4444;
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
}

@keyframes pulse-green-zone {
  0%, 100% { box-shadow: 0 0 28px rgba(16, 185, 129, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 0 42px rgba(16, 185, 129, 0.55), 0 20px 48px rgba(0, 0, 0, 0.5); }
}

.saldo-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.85);
  font-weight: 700;
}

.saldo-value {
  margin: 0.35rem 0 0;
  font-size: clamp(2.5rem, 12vw, 3.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.saldo-box.defizit .saldo-value { color: #39ff14; }
.saldo-box.ueberschuss .saldo-value { color: #fecaca; }

.saldo-unit {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.75);
}

.seal-status {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}

.seal-status.defizit { color: var(--accent); }
.seal-status.ueberschuss { color: #fca5a5; }

.surplus-alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  text-align: left;
}

.surplus-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fecaca;
}

.surplus-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1.1rem;
  text-align: left;
}

.mini-stat {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(6, 17, 29, 0.55);
}

.mini-stat-k {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.mini-stat-v {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.dash-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.dash-btn {
  margin-top: 0;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.dash-btn.meal {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border-color: transparent;
  color: #1a0a02;
  font-weight: 700;
}

.dash-btn.meal:hover {
  filter: brightness(1.08);
  color: #1a0a02;
}

.dash-btn.activity {
  background: linear-gradient(135deg, #059669 0%, var(--accent) 100%);
  border-color: transparent;
  color: #042015;
  font-weight: 700;
}

.dash-btn.activity:hover {
  filter: brightness(1.08);
  color: #042015;
}

.dash-sheet {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(6, 17, 29, 0.72);
  text-align: left;
}

.dash-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dash-sheet-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.entry-list-compact {
  margin-bottom: 0.75rem;
  max-height: 160px;
  overflow: auto;
}

.dash-more {
  margin-top: 1.5rem;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.dash-more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}

.dash-more summary::-webkit-details-marker { display: none; }

.dash-more[open] summary {
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.ws-detail__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.gz-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.gz-breadcrumb a,
.gz-breadcrumb a.ws-back-btn {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.gz-breadcrumb a:hover,
.gz-breadcrumb a.ws-back-btn:hover {
  color: var(--accent);
  text-decoration: underline;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

.gz-breadcrumb .ws-back-btn__icon {
  display: none;
}

.gz-breadcrumb__sep {
  color: var(--muted);
  font-weight: 400;
  user-select: none;
}

.gz-breadcrumb__current {
  font-weight: 600;
}

.ws-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.ws-back-btn__icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.ws-back-btn:hover {
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

.ws-back-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.ws-detail__crumb-current {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

body[data-route="profile-bmi"] .ws-bmi-hero-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

body[data-route="profile-bmi"] .ws-metric-tile {
  padding: 1.25rem 1.2rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
}

body[data-route="profile-bmi"] .ws-metric-tile__value {
  margin: 0;
  font-size: 2.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body[data-route="profile-bmi"] .ws-card--bmi.panel {
  margin-bottom: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

@media (min-width: 720px) {
  body[data-route="profile-bmi"] .ws-bmi-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.page-back {
  margin: 0 0 0.75rem;
  text-align: left;
}

.page-back a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.page-back a:hover {
  text-decoration: underline;
}

.fav-page-back .fav-back-sep {
  margin: 0 0.35rem;
  color: var(--muted, #94a3b8);
}

.today-page-flash {
  margin: 0 0 0.75rem;
}

.food-panel h1,
.activity-panel h1 {
  margin: 0 0 0.35rem;
  text-align: left;
  font-size: 1.35rem;
}

.food-panel > .muted.small,
.activity-panel > .muted.small {
  text-align: left;
  margin-bottom: 1rem;
}

.food-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.food-tab {
  margin: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.5rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

a.food-tab.food-tab-link {
  text-decoration: none;
  display: inline-block;
}

.food-tab:hover {
  color: var(--text);
}

.food-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.food-tab-panel {
  text-align: left;
  padding: 0.25rem 0 1rem;
}

.food-tab-panel[hidden] {
  display: none !important;
}

.food-form-labeled label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.food-form-labeled label:first-child {
  margin-top: 0;
}

.food-form-labeled input[type='text'],
.food-form-labeled input[type='number'],
.food-form-labeled textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #06111d;
  color: var(--text);
  font: inherit;
}

.food-form-labeled textarea {
  resize: vertical;
  min-height: 4rem;
}

.photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.photo-upload-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  border: 2px dashed rgba(16, 185, 129, 0.55);
  background: rgba(6, 17, 29, 0.5);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
}

.photo-upload-area:hover {
  border-color: var(--accent);
  color: var(--text);
}

.photo-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.photo-preview {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.manual-ai-block {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.ai-field-hint {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.82rem;
  text-align: left;
}

.ai-optional-photo-label {
  margin-top: 1rem;
}

.ai-analysis-meta {
  margin: 0.75rem 0 0.35rem;
  text-align: left;
}

.ai-warnings {
  list-style: disc;
  margin: 0 0 0.85rem 1.1rem;
  padding: 0;
  font-size: 0.82rem;
  color: #fcd34d;
  text-align: left;
}

.ai-warnings li {
  margin: 0.25rem 0;
}

.ai-food-review {
  margin: 0.75rem 0 0;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(6, 17, 29, 0.5);
  text-align: left;
}

.ai-review-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.ai-food-edit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.ai-food-edit-row {
  display: grid;
  grid-template-columns: 1fr 3.5rem 4.5rem 4.5rem;
  gap: 0.35rem;
  align-items: end;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ai-food-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.ai-food-edit-field input {
  margin: 0;
  padding: 0.45rem 0.5rem;
  font-size: 0.85rem;
}

.ai-food-total {
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .ai-food-edit-row {
    grid-template-columns: 1fr 1fr;
  }

  .ai-food-edit-field.ai-food-edit-qty,
  .ai-food-edit-field.ai-food-edit-unit {
    grid-column: span 1;
  }

  .ai-food-edit-field:first-child {
    grid-column: 1 / -1;
  }
}

#food-photo-analyze {
  margin-top: 1rem;
}

.photo-results {
  margin-top: 1rem;
}

.photo-review-actions {
  margin-top: 1rem;
  text-align: left;
}

.photo-review-prompt {
  margin: 0 0 0.75rem;
}

.photo-review-actions .btn.primary {
  margin-top: 0;
  width: 100%;
}

.photo-fav-btn {
  margin-top: 0.5rem;
  width: 100%;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.32);
  box-shadow: none;
}

.photo-fav-btn:hover {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.48);
}

.food-entry-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.food-entry-main {
  flex: 1 1 10rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.food-save-fav-btn {
  flex: 1 1 100%;
  margin: 0;
  width: 100%;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  color: #ffedd5;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.32);
}

.food-save-fav-btn:hover {
  color: #fff7ed;
  background: rgba(251, 146, 60, 0.2);
  border-color: rgba(251, 146, 60, 0.45);
}

@media (min-width: 520px) {
  .food-save-fav-btn {
    flex: 0 0 auto;
    width: auto;
    max-width: 9.5rem;
  }
}

.photo-fav-form {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.photo-fav-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.photo-fav-form-actions .btn {
  margin-top: 0;
  width: auto;
  flex: 1 1 8rem;
}

.section-label {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.95rem;
  text-align: left;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge-green {
  color: #042015;
  background: var(--accent);
  border-color: transparent;
}

.badge-over-target { color: var(--danger); border-color: rgba(248, 113, 113, 0.5); }
.badge-neutral { color: var(--text); }
.badge-insufficient-data { color: var(--muted); }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #06111d;
}

.stat-k {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.stat-v {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
}

.dash-meta { margin-top: 1rem; }

.lists-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .lists-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.entry-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.entry-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 0.9rem;
}

.entry-list li.empty {
  justify-content: flex-start;
  color: var(--muted);
  font-style: italic;
  border-bottom: none;
}

.entry-kcal { color: var(--accent); font-variant-numeric: tabular-nums; }

.quick-form {
  display: grid;
  gap: 0.5rem;
}

.quick-form .btn {
  margin-top: 0.25rem;
}

.field-row { margin-top: 0.25rem; }

body[data-route="food"][data-food-view="favorites"] .app-main {
  width: 100%;
  max-width: none;
  margin: clamp(1.25rem, 3vw, 2rem) auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  body[data-route="food"][data-food-view="favorites"] .app-main {
    width: 75vw;
    max-width: 75vw;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }
}

.food-hub {
  width: 100%;
}

.fav-hub-card {
  width: 100%;
  padding: clamp(1.25rem, 2.2vw, 2rem);
}

.fav-page-head {
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}

.fav-page-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: left;
  color: #f8fafc;
}

.fav-title-icon {
  display: inline-flex;
  color: #fbbf24;
}

.fav-page-lead {
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
}

.fav-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.fav-new-btn {
  width: auto;
  margin: 0;
}

.fav-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.fav-quick-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.fav-quick-link:hover {
  text-decoration: underline;
}

.fav-quick-sep {
  color: var(--muted);
}

.fav-create-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(152deg, rgba(120, 53, 15, 0.35) 0%, rgba(4, 13, 25, 0.94) 70%);
}

.fav-create-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  color: #fbbf24;
}

.fav-create-form .fav-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.fav-create-form .fav-create-actions .btn {
  width: auto;
  margin: 0;
}

.fav-page-flash {
  margin: 0 0 1rem;
}

.fav-empty {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(6, 17, 29, 0.45);
  margin-bottom: 1rem;
}

.fav-empty-icon {
  display: inline-flex;
  color: rgba(251, 191, 36, 0.75);
  margin-bottom: 0.75rem;
}

.fav-empty-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.fav-empty-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.fav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .fav-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

@media (min-width: 900px) {
  .fav-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.6rem;
  }
}

@media (min-width: 1200px) {
  .fav-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.fav-meal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 0;
  max-width: 9.5rem;
  justify-self: center;
  cursor: pointer;
  padding: 0.5rem 0.55rem 0.55rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  border-radius: 12px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--fav-border, rgba(255, 255, 255, 0.1));
  background: var(--fav-bg, rgba(6, 17, 29, 0.82));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fav-meal-card:hover {
  transform: translateY(-2px);
  border-color: var(--fav-accent, var(--accent));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.fav-meal-face {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.fav-meal-face[hidden],
.fav-meal-actions-menu[hidden],
.fav-meal-edit-form[hidden] {
  display: none !important;
}

.fav-meal-card.is-menu,
.fav-meal-card.is-editing {
  cursor: default;
}

.fav-meal-card.is-logging {
  opacity: 0.72;
  pointer-events: none;
}

.fav-meal-menu-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--fav-accent);
  background: var(--fav-icon-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--fav-icon-border, rgba(255, 255, 255, 0.08));
}

.fav-meal-menu-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.fav-meal-card.is-menu .fav-meal-menu-btn {
  border-color: var(--fav-accent);
  background: rgba(255, 255, 255, 0.1);
}

.fav-meal-actions-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0.35rem 0.15rem 0.15rem;
  box-sizing: border-box;
}

.fav-meal-actions-menu .btn {
  width: 100%;
  margin: 0;
}

.fav-meal-name {
  margin: 0 1.5rem 0.15rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fav-meal-kcal {
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  font-size: clamp(0.82rem, 3vw, 0.98rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fav-accent, var(--accent));
  font-variant-numeric: tabular-nums;
  text-align: left;
}


.btn.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.btn.danger:hover {
  color: #fff;
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(127, 29, 29, 0.35);
}

.fav-meal-card.is-editing {
  cursor: default;
}

.fav-meal-edit-form {
  display: grid;
  gap: 0.35rem;
  height: 100%;
  align-content: center;
}

.fav-edit-label {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.fav-edit-label:first-child {
  margin-top: 0.15rem;
}

.fav-meal-edit-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
}

.fav-meal-edit-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.fav-meal-edit-actions .btn {
  flex: 1;
  margin: 0;
}

@media (min-width: 640px) {
  .fav-meal-card {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
  }

  .fav-meal-menu-btn {
    top: 0.65rem;
    right: 0.65rem;
    width: 1.9rem;
    height: 1.9rem;
  }

  .fav-meal-menu-btn svg {
    width: 16px;
    height: 16px;
  }

  .fav-meal-name {
    margin: 0 2.1rem 0.3rem 0;
    font-size: 0.88rem;
  }

  .fav-meal-face > .favorite-log-btn {
    padding: 0.5rem 0.55rem;
    font-size: 0.78rem;
  }
}

@media (min-width: 900px) {
  .fav-meal-card {
    padding: 0.95rem 1rem;
  }

  .fav-meal-menu-btn {
    width: 2.1rem;
    height: 2.1rem;
  }

  .fav-meal-menu-btn svg {
    width: 18px;
    height: 18px;
  }

  .fav-meal-name {
    font-size: 0.95rem;
  }
}

.fav-meal-card--amber {
  --fav-accent: #fbbf24;
  --fav-border: rgba(251, 191, 36, 0.28);
  --fav-bg: linear-gradient(152deg, rgba(120, 53, 15, 0.42) 0%, rgba(4, 13, 25, 0.94) 62%);
  --fav-icon-bg: rgba(120, 53, 15, 0.45);
  --fav-icon-border: rgba(251, 191, 36, 0.22);
}

.fav-meal-card--green {
  --fav-accent: #34d399;
  --fav-border: rgba(52, 211, 153, 0.28);
  --fav-bg: linear-gradient(152deg, rgba(6, 78, 59, 0.5) 0%, rgba(4, 13, 25, 0.94) 62%);
  --fav-icon-bg: rgba(6, 78, 59, 0.45);
  --fav-icon-border: rgba(52, 211, 153, 0.22);
}

.fav-meal-card--cyan {
  --fav-accent: #38bdf8;
  --fav-border: rgba(56, 189, 248, 0.26);
  --fav-bg: linear-gradient(152deg, rgba(12, 74, 110, 0.48) 0%, rgba(4, 13, 25, 0.94) 62%);
  --fav-icon-bg: rgba(12, 74, 110, 0.42);
  --fav-icon-border: rgba(56, 189, 248, 0.2);
}

.fav-meal-card--rose {
  --fav-accent: #fb7185;
  --fav-border: rgba(251, 113, 133, 0.26);
  --fav-bg: linear-gradient(152deg, rgba(136, 19, 55, 0.4) 0%, rgba(4, 13, 25, 0.94) 62%);
  --fav-icon-bg: rgba(136, 19, 55, 0.38);
  --fav-icon-border: rgba(251, 113, 133, 0.2);
}

.fav-meal-card--violet {
  --fav-accent: #a78bfa;
  --fav-border: rgba(167, 139, 250, 0.26);
  --fav-bg: linear-gradient(152deg, rgba(76, 29, 149, 0.42) 0%, rgba(4, 13, 25, 0.94) 62%);
  --fav-icon-bg: rgba(76, 29, 149, 0.38);
  --fav-icon-border: rgba(167, 139, 250, 0.2);
}

.photo-ai-block {
  margin: 1rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.photo-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

#food-photo-input {
  margin-top: 0.5rem;
}

.btn-compact {
  margin-top: 0;
  width: auto;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

body[data-route="admin"] .app-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.admin-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.admin-gate-msg {
  margin: 1rem 24px;
}

.admin-platform {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100%;
  min-height: calc(100dvh - 4.25rem);
  align-items: stretch;
}

.admin-side {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid rgba(16, 185, 129, 0.2);
  background: linear-gradient(180deg, rgba(4, 13, 25, 0.98), rgba(2, 8, 18, 0.92));
  padding: 1.25rem 0.85rem 2rem;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100dvh - 4.25rem);
  overflow-y: auto;
}

.admin-side-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.35rem 1.1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.admin-side-eyebrow {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-side-title {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-side-group {
  border: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.admin-side-group-head {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6ee7b7;
  padding: 0.55rem 0.45rem;
  cursor: pointer;
}

.admin-side-group-head::-webkit-details-marker {
  display: none;
}

.admin-side-group-head svg {
  width: 1rem;
  height: 1rem;
}

.admin-side-link,
.admin-side-sublink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.admin-side-sublink {
  margin-left: 0.35rem;
  padding-left: 1.35rem;
  font-weight: 500;
  font-size: 0.84rem;
}

.admin-side-link svg {
  width: 1.05rem;
  height: 1.05rem;
}

.admin-side-link:hover,
.admin-side-sublink:hover {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.18);
}

.admin-side-link.active,
.admin-side-sublink.active {
  background: rgba(6, 78, 59, 0.42);
  border-color: rgba(52, 211, 153, 0.4);
  color: #ecfdf5;
}

.admin-main {
  min-width: 0;
  width: 100%;
  padding: 24px;
  box-sizing: border-box;
}

.admin-dash-hero {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0) 88%);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.admin-dash-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.admin-dash-title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.admin-dash-sub {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.92rem;
}

.admin-prod-badge {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.45);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.admin-dash-flash {
  margin: 0 0 1rem;
}

.admin-view[hidden] {
  display: none !important;
}

.admin-section-block {
  background: rgba(8, 16, 28, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.1rem;
}

.admin-section-block.priority {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.22), rgba(8, 16, 28, 0.85));
}

.admin-section-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #f1f5f9;
}

.admin-section-sub {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: #94a3b8;
}

.admin-section-header {
  margin-bottom: 1rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .admin-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-stat-card {
  position: relative;
  background: rgba(2, 10, 20, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  padding: 0.85rem;
  min-height: 92px;
  display: flex;
  flex-direction: column;
}

.admin-stat-card.accent-emerald {
  border-color: rgba(52, 211, 153, 0.28);
}

.admin-stat-card.accent-cyan {
  border-color: rgba(56, 189, 248, 0.28);
}

.admin-stat-card.accent-amber {
  border-color: rgba(251, 191, 36, 0.28);
}

.admin-stat-card.accent-violet {
  border-color: rgba(167, 139, 250, 0.28);
}

.admin-stat-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.8rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.admin-stat-card-contents {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-top: 1.35rem;
}

.admin-stat-card-contents strong {
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 800;
  color: #f8fafc;
}

.admin-stat-label {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  color: #cbd5e1;
  font-weight: 600;
  line-height: 1.25;
}

.admin-block-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.admin-muted-panel {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  background: rgba(2, 6, 23, 0.35);
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.admin-message {
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
}

.admin-message-success {
  background: rgba(6, 78, 59, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.admin-message-error {
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.admin-message-info {
  background: rgba(12, 74, 110, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

@media (max-width: 900px) {
  .admin-platform {
    grid-template-columns: 1fr;
  }

  .admin-side {
    width: 100%;
    position: static;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  }
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-width: 12rem;
}

.admin-actions .danger {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.admin-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-pill-active {
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.admin-pill-suspended,
.admin-pill-deactivated {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.admin-dim {
  color: #94a3b8;
  white-space: nowrap;
}

.admin-budget-form {
  display: grid;
  gap: 0.65rem;
  max-width: 22rem;
  margin-bottom: 1.25rem;
}

.admin-budget-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.admin-check {
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
}

.admin-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

.admin-placeholder {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem 1.15rem;
  background: rgba(2, 6, 23, 0.35);
}