@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --deep-navy: #19324A;
  --burnt-orange: #D96C2C;
  --burgundy: #87384A;
  --forest-sage: #527A5B;
  --warm-ivory: #F5F0E8;
  --sand: #E7DDD0;
  --white: #FFFFFF;
  --anthrazit: #292B2A;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: var(--warm-ivory);
  color: var(--anthrazit);
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-weight: 400;
}

.karte {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(25, 50, 74, 0.08);
  padding: 2.5rem;
  width: 100%;
  max-width: 360px;
  margin-top: 5rem;
}

.karte-breit {
  max-width: 480px;
  margin-top: 1.5rem;
}

h1 {
  font-weight: 600;
  font-size: 1.375rem;
  margin: 0 0 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

input[type="password"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  color: var(--anthrazit);
}

input:focus, select:focus {
  outline: 2px solid var(--burnt-orange);
  outline-offset: 1px;
}

button {
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.primaer {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: var(--burnt-orange);
  color: var(--white);
}

.primaer:hover {
  filter: brightness(1.05);
}

.primaer:disabled {
  opacity: 0.6;
  cursor: default;
}

.fehler {
  color: var(--burgundy);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.personen {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.person-knopf {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--warm-ivory);
  border: 1px solid var(--sand);
  border-radius: 6px;
  font-size: 1rem;
  text-align: left;
}

.person-knopf:hover {
  border-color: currentColor;
}

.person-punkt {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-zeile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-name {
  font-weight: 600;
  font-size: 1.125rem;
}

.sekundaer {
  width: 100%;
  padding: 0.65rem;
  background: transparent;
  color: var(--anthrazit);
  border: 1px solid var(--sand);
  margin-top: 0.6rem;
}

.sekundaer:hover {
  background: var(--warm-ivory);
}

.text-knopf {
  background: none;
  color: var(--burgundy);
  font-size: 0.8125rem;
  padding: 0;
  text-decoration: underline;
}

.versteckt {
  display: none;
}

/* Tagesansicht */

.kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kopfzeile-aktionen {
  display: flex;
  gap: 1rem;
}

.tages-summe {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  background: var(--warm-ivory);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.tages-summe-zahl {
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--deep-navy);
}

.tages-summe-label {
  font-size: 0.875rem;
  color: var(--anthrazit);
}

.eintrag-liste {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.eintrag-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  gap: 0.75rem;
}

.eintrag-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.eintrag-name {
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eintrag-menge {
  font-size: 0.8125rem;
  color: #6b6f6e;
}

.eintrag-kcal {
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.eintrag-loeschen {
  background: none;
  color: var(--burgundy);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}

.leer-hinweis {
  font-size: 0.875rem;
  color: #6b6f6e;
  margin: 0.5rem 0 1rem;
}

.hinzufuegen-bereich {
  border-top: 1px solid var(--sand);
  padding-top: 1.25rem;
  position: relative;
}

.such-ergebnisse {
  border: 1px solid var(--sand);
  border-radius: 6px;
  margin-top: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
  background: var(--white);
}

.such-ergebnis-zeile {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: none;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--sand);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.such-ergebnis-zeile:last-child {
  border-bottom: none;
}

.such-ergebnis-zeile:hover {
  background: var(--warm-ivory);
}

.such-ergebnis-kcal {
  color: #6b6f6e;
  white-space: nowrap;
}

.mengen-formular {
  margin-top: 0.75rem;
  background: var(--warm-ivory);
  border-radius: 6px;
  padding: 0.9rem;
}

.mengen-formular-name {
  font-weight: 500;
  margin: 0 0 0.6rem;
  font-size: 0.9375rem;
}

.mengen-zeile {
  display: flex;
  gap: 0.5rem;
}

.mengen-zeile input[type="number"] {
  flex: 1;
}

.mengen-zeile select {
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  background: var(--white);
  padding: 0 0.5rem;
}

.mengen-knopf {
  width: auto;
  margin-top: 0;
  white-space: nowrap;
}
