@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 100 200 300 400 500 600 700 800 900;
  font-display: swap;
  src:
    url("../fonts/Fredoka-VariableFont-wdth-wght.woff2")
      format("woff2 supports variations"),
    url("../fonts/Fredoka-VariableFont-wdth-wght.woff2")
      format("woff2-variations");
}

:root {
  --color-2: #094a52;
  --teal: #17504c;
  --dark: #123c3a;
  --cream: #f6ebdd;
  --warn: #b0654f;
  --teal-deep: #0e3634;
  --teal-light: #3e726c;
  --grad: linear-gradient(160deg, #1e5a54 0%, #164b47 55%, #123e3b 100%);
  --accent: #e89a3c;
  --accent-soft: rgba(232, 154, 60, 0.14);
  --paper: #ffffff;
  --ink: #173f3c;
  --muted: #8a8a80;
  --line: rgba(23, 63, 60, 0.08);
  --rand: #d8d0c2;
  --straw: #ce9f5e;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-pill: 999px;
  --sh: 0 14px 34px rgba(18, 60, 58, 0.16);
  --sh-sm: 0 6px 18px rgba(18, 60, 58, 0.1);
  --tint: rgba(23, 80, 76, 0.09);
  --tint2: rgba(23, 80, 76, 0.16);
  --font-disp:
    "Fredoka", ui-rounded, "Hiragino Maru Gothic ProN", "Segoe UI", system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button {
  font-family: inherit;
}
h1,
h2,
h3 {
  font-family: var(--font-disp);
  letter-spacing: 0.005em;
}

/* ---------- Grundlayout ---------- */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

/* Kopfzeile als Verlaufsbalken mit Sonnen-Glanz (Signatur) */
.topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.2rem;
  background: var(--color-2);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  z-index: 5;
}

.topbar > * {
  position: relative;
  z-index: 1;
}
.topbar .titel {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 0.95rem;
}
.topbar .user {
  margin-left: auto;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.logout {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.gear {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0.4rem;
  cursor: pointer;
  display: inline-flex;
  margin-left: 0.4rem;
}
.gear.on {
  background: #fff;
  color: var(--teal-deep);
}

main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 0.5rem;
}

/* Untere Navigation – schwebend, aktives Icon im Teal-Kreis */
nav.tabs {
  position: sticky;
  bottom: 0;
  display: grid;
  background: var(--dark);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  box-shadow: 0 -8px 24px rgba(18, 60, 58, 0.2);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 0 0.8rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--paper);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.tab .icon {
  position: relative;
  z-index: 1;
}
.tab.active {
  color: var(--accent);
}
.tab.active::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-pill);
  background: rgba(232, 154, 60, 0.16);
  z-index: 0;
}

/* ---------- Start-Screen ---------- */
.start {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--grad);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.start::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -70px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(226, 183, 120, 0.5),
    rgba(226, 183, 120, 0) 70%
  );
}
.start-in {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.start .logo {
  width: 104px;
  height: 104px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.start h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.start p {
  opacity: 0.92;
  margin-top: 0.6rem;
  line-height: 1.55;
  font-size: 0.95rem;
  max-width: 17rem;
}
.start-foot {
  padding: 1.5rem 2rem 2.2rem;
  position: relative;
  z-index: 1;
}
.start-foot small {
  display: block;
  text-align: center;
  opacity: 0.85;
  margin-top: 1rem;
  font-size: 0.72rem;
}

/* ---------- Anmeldung (Login/Registrieren) ---------- */
.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}
.grad-head {
  background: var(--grad);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.5rem 2.6rem;
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
}
.grad-head::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(226, 183, 120, 0.45),
    rgba(226, 183, 120, 0) 70%
  );
}
.grad-head > * {
  position: relative;
  z-index: 1;
}
.grad-head h1 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 0.3rem;
}
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}
.auth-sheet {
  background: var(--cream);
  margin-top: -1.3rem;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  padding: 1.4rem 1.3rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* ---------- Seitenkopf / Typo ---------- */
header.seite {
  padding: 1.4rem 1.25rem 0.6rem;
}
.datum {
  font-size: 0.85rem;
  color: var(--teal);
  text-transform: capitalize;
}
h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.1rem 0 0;
  color: var(--teal);
}
.sub {
  font-size: 0.85rem;
  color: var(--teal);
  margin: 0.15rem 0 0;
}

/* ---------- Karten & Abstände ---------- */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 1.1rem;
}
.mx {
  margin: 0 1.25rem;
}
.stack > * + * {
  margin-top: 0.6rem;
}

/* Verlaufs-Icon-Kachel (Listen) */
.tile {
  width: 50px;
  height: 50px;
  border-radius: var(--r-md);
  background: var(--color-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: none;
}
.tile.soft {
  background: var(--tint);
  color: var(--teal);
  box-shadow: none;
}
.tile.sm {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-sm);
}
.menu-card {
  transition:
    box-shadow 0.15s,
    transform 0.12s;
}
.menu-card:hover {
  box-shadow: var(--sh);
}
.menu-card:active {
  transform: scale(0.995);
}

/* ---------- Buttons ---------- */
.btn {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
  box-shadow: 0 8px 18px rgba(92, 130, 130, 0.28);
}
.btn:hover {
  filter: brightness(1.06);
}
.btn-block {
  width: 100%;
  padding: 0.75rem;
}
.btn.ghost {
  background: #fff;
  color: var(--teal-deep);
  box-shadow: var(--sh-sm);
}
.btn-ghost {
  background: var(--tint);
  color: var(--teal);
  border: none;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.6rem 1.1rem;
}
.btn-ghost:hover {
  background: var(--tint2);
}
.btn-link {
  background: none;
  border: none;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0;
}
.btn-warn {
  background: var(--warn);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 2px dashed var(--rand);
  border-radius: var(--r-lg);
  padding: 0.95rem;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.85rem;
  background: none;
  cursor: pointer;
  transition: background 0.15s;
}
.add-row:hover {
  background: var(--tint);
}

/* ---------- Formulare ---------- */
.input,
.textarea,
.select {
  width: 100%;
  border: 1.5px solid var(--rand);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--teal);
}
.textarea {
  resize: vertical;
}
label.klein {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-top: 0.7rem;
  font-weight: 600;
}

/* ---------- Chips / Pills / Badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: var(--r-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  background: var(--tint);
  color: var(--ink);
}
.chip.ich {
  background: var(--tint2);
  color: var(--teal);
  font-weight: 600;
}
.chip button {
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
  cursor: pointer;
  color: inherit;
}
.pill {
  border-radius: var(--r-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: var(--r-pill);
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-repeat {
  color: var(--muted);
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.badge-wichtig {
  background: rgba(176, 106, 90, 0.14);
  color: var(--warn);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: var(--r-pill);
}
.cat-badge {
  border-radius: var(--r-pill);
  padding: 0.1rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--tint);
  color: var(--teal);
}
.mein-badge {
  flex: none;
  border-radius: var(--r-pill);
  padding: 0.1rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 600;
  background: var(--tint);
  color: var(--teal);
}

/* ---------- Aufgaben ---------- */
.task {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  border-left: 4px solid transparent;
  padding-right: 0.4rem;
  transition: transform 0.12s;
}
.task:active {
  transform: scale(0.99);
}
.task.alarm {
  border-left-color: var(--warn);
}
.task-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  padding: 0.9rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.check {
  margin-top: 0.05rem;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border: 2px solid var(--rand);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.check.on {
  background: var(--teal);
  border-color: var(--teal);
}
.task-titel {
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 500;
}
.task.done .task-titel {
  color: #9a968c;
  text-decoration: line-through;
  font-weight: 400;
}
.badges {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* ---------- Fortschritt ---------- */
.progress-track {
  height: 0.6rem;
  width: 100%;
  background: var(--tint);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar {
  height: 100%;
  background: var(--teal);
  border-radius: var(--r-pill);
  transition: width 0.4s;
}
.warnzeile {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--warn);
}

/* ---------- Segmente ---------- */
.seg {
  display: flex;
  gap: 0.3rem;
  background: var(--tint);
  padding: 0.3rem;
  border-radius: var(--r-pill);
}
.seg button {
  flex: 1;
  border: none;
  border-radius: var(--r-pill);
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  color: var(--muted);
  transition: all 0.15s;
}
.seg button.on {
  background: #fff;
  color: var(--teal);
  box-shadow: var(--sh-sm);
}

/* ---------- Abschnitt-Überschriften ---------- */
.seth {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--teal);
  margin: 0;
}
.seti {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
}
.sec-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--teal);
  margin: 0.4rem 0 0.6rem;
}
.sec-head::before {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 5px;
  background: var(--dark);
  flex: none;
}

/* ---------- Rangliste ---------- */
.rangzeile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0;
}
.rangnr {
  width: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9a968c;
}
.rangname {
  width: 5rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.rangbar {
  flex: 1;
  height: 0.55rem;
  background: var(--tint);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.rangbar > span {
  display: block;
  height: 100%;
  background: var(--teal);
}
.rangzahl {
  width: 1.6rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Zähler / Stepper ---------- */
.step {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--rand);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
.step:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ---------- Tiere ---------- */
.animal {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
.avatar {
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: var(--r-pill);
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar.big {
  width: 3.5rem;
  height: 3.5rem;
}
.avatar-img {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: var(--r-pill);
  object-fit: cover;
  flex: none;
  background: var(--cream);
}
.animal .name {
  font-weight: 600;
}
.animal .art {
  font-size: 0.85rem;
  color: var(--muted);
}
.move-line {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
}
.move-line.due {
  color: var(--warn);
  font-weight: 600;
}
.move-btn {
  flex: none;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.tier-foto {
  width: 100%;
  border-radius: var(--r-lg);
  display: block;
  object-fit: cover;
  max-height: 16rem;
}
.detail-row .lbl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--teal);
}
.detail-row p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.team-notiz {
  background: var(--tint);
  border-radius: var(--r-lg);
  padding: 1.1rem;
}

/* ---------- Kalender ---------- */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.cal-nav button {
  background: var(--tint);
  border: none;
  border-radius: var(--r-pill);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  color: var(--teal);
  display: inline-flex;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.15rem 0;
  font-weight: 700;
}
.cal-cell {
  min-height: 4rem;
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1.5px solid transparent;
  padding: 0.35rem 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
  text-align: left;
}
.cal-cell.leer {
  background: transparent;
  cursor: default;
}
.cal-cell.hat {
  background: var(--paper);
  box-shadow: var(--sh-sm);
}
.cal-cell.heute {
  border-color: var(--teal);
}
.cal-cell.drin {
  box-shadow: inset 0 0 0 2px var(--teal);
}
.cal-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  align-content: flex-start;
}
.cal-more {
  font-size: 0.6rem;
  color: var(--muted);
  align-self: center;
}
.cal-offen {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  display: inline-block;
}

/* ---------- Übergabe-Notizen ---------- */
.note {
  border-left: 3px solid var(--accent);
  padding-left: 0.85rem;
}
.note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}
.note .zeit {
  font-size: 0.7rem;
  color: #9a968c;
}
.note-actions {
  margin-left: auto;
}

/* ---------- Projekte / Material ---------- */
.proj-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.proj-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 0;
}
/* Löschbutton – als integrierter runder Icon-Button, nicht danebengequetscht */
.del {
  flex: none;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: 0.15s;
}
.del:hover,
.del:active {
  background: rgba(176, 106, 90, 0.12);
  color: var(--warn);
}
.confirm {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(176, 106, 90, 0.09);
  border-radius: var(--r-md);
  padding: 0.7rem;
}
.confirm span {
  font-size: 0.85rem;
  color: var(--warn);
}
.matline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 0.4rem 0;
  cursor: pointer;
}
.matcheck {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid var(--rand);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.matcheck.on {
  background: var(--teal);
  border-color: var(--teal);
}
.matname {
  font-size: 0.9rem;
}
.matname.on {
  color: #9a968c;
}
.matstatus {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
}
.barwrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.bar {
  height: 0.4rem;
  flex: 1;
  background: var(--tint);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.bar > div {
  height: 100%;
  background: var(--teal);
}

/* ---------- Papierkorb ---------- */
.trash {
  border: 1.5px solid var(--rand);
  border-radius: var(--r-lg);
  padding: 1.1rem;
}
.trash-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.trash-item .lbl {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Login (Alt-Klassen, weiter unterstützt) ---------- */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 1.75rem;
}
.login-card h1 {
  font-size: 1.3rem;
  text-align: center;
}
.login-card .sub {
  text-align: center;
  margin-bottom: 1rem;
}

/* ---------- Sonstiges ---------- */
.fehler {
  background: rgba(176, 106, 90, 0.12);
  color: var(--warn);
  border-radius: var(--r-md);
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
}
.fehler.ok {
  background: var(--tint2);
  color: var(--teal-deep);
}
.zentriert {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.icon {
  display: inline-block;
  vertical-align: middle;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Tiere-Karte (Zwei-Zeilen-Layout, nicht gequetscht) ---------- */
.animal-card {
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 0.9rem;
}
.animal-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.animal-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
}
.animal-acts {
  display: flex;
  gap: 0.1rem;
  flex: none;
}
.animal-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}
.name {
  font-weight: 600;
}
.art {
  font-size: 0.85rem;
  color: var(--muted);
}
.namerow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ---------- Profil-Kopf (Verlauf mit Avatar) ---------- */
.profil-head {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
  padding: 1.1rem 1.25rem 1.8rem;
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
  text-align: center;
}
.profil-head::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(226, 183, 120, 0.45),
    rgba(226, 183, 120, 0) 70%
  );
  pointer-events: none;
}
.profil-head > * {
  position: relative;
  z-index: 1;
}
.phead-back {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  border-radius: var(--r-pill);
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.profil-ava {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.profil-name {
  font-family: var(--font-disp);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0.6rem 0 0;
}
.profil-role {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

/* ---------- Lager: Sektionskopf mit [+] ---------- */
.sec-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.3rem;
}
.add-plus.sm {
  width: 2.1rem;
  height: 2.1rem;
}

/* ---------- Passwort mit Auge ---------- */
.pw-wrap {
  position: relative;
  margin-top: 0.3rem;
}
.pw-wrap .input {
  margin: 0;
  padding-right: 2.7rem;
  width: 100%;
}
.pw-eye {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem;
  display: inline-flex;
  align-items: center;
}
/* ---------- Tier-Gruppen-Überschrift ---------- */
.tier-gruppe {
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal);
  margin: 0.6rem 0.2rem 0.1rem;
}

/* ---------- Schichten: Petrol-Button + Klapp-Kopf ---------- */
.schicht-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 0.85rem 1.2rem;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: filter 0.15s;
}
.schicht-btn:hover {
  filter: brightness(1.06);
}
.schicht-btn:active {
  transform: scale(0.99);
}
.klapp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ---------- Hof-Übersicht (Kachel-Grid) ---------- */
.hof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 0 1.25rem;
  padding-bottom: 1rem;
}
.hof-kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 1.4rem 0.8rem;
  border: none;
  cursor: pointer;
  transition:
    transform 0.12s,
    box-shadow 0.15s;
}
.hof-kachel:hover {
  box-shadow: var(--sh);
}
.hof-kachel:active {
  transform: scale(0.98);
}
.hof-kachel .tile {
  width: 66px;
  height: 66px;
  border-radius: 20px;
}
.hof-kl {
  font-family: var(--font-disp);
  font-weight: 600;
  color: var(--teal);
  font-size: 1rem;
  text-align: center;
  line-height: 1.15;
}
.topbar-logo {
  width: 26px;
  height: 26px;
  flex: none;
}

/* ---------- Kopf mit Schnell-[+] (Verwalter/Super-User) ---------- */
.seite-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.add-plus {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--r-pill);
  background: var(--color-2);
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s;
}
.add-plus:hover {
  filter: brightness(1.08);
}
.add-plus:active {
  transform: scale(0.96);
}

/* ---------- Heute-Hero (Verlaufs-Kopf mit Fortschrittsring) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 1.3rem;
  box-shadow: 0 12px 26px rgba(63, 93, 92, 0.22);
}
.hero::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(226, 183, 120, 0.5),
    rgba(226, 183, 120, 0) 70%
  );
  pointer-events: none;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-txt {
  flex: 1;
  min-width: 0;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  opacity: 0.9;
  margin: 0;
}
.hero-h1 {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 0.15rem 0 0;
}
.hero-sub {
  font-size: 0.85rem;
  opacity: 0.92;
  margin: 0.25rem 0 0;
}
.hero-ring {
  width: 66px;
  height: 66px;
  flex: none;
}
.hero-warn {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-md);
}

/* ============================================================
   Desktop / Tablet ab 1024px – Seitenleiste + zentrierter Inhalt
   ============================================================ */
@media (min-width: 1024px) {
  body {
    background: #e4dfd4;
  }
  .app.dash {
    max-width: 1280px;
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "topbar topbar" "side main";
    height: 100vh;
    background: var(--cream);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.06);
  }
  .app.dash > .topbar {
    grid-area: topbar;
    padding: 1rem 1.6rem;
    border-radius: 0;
  }
  .app.dash > .topbar .titel {
    font-size: 1.05rem;
  }
  .app.dash > main {
    grid-area: main;
    overflow-y: auto;
    padding: 1.5rem 1.75rem 3rem;
  }
  .app.dash > main > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  .app.dash > nav.tabs {
    grid-area: side;
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-radius: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
    background: var(--dark);
    padding: 1.1rem 0.7rem;
  }
  .app.dash > nav.tabs .tab {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--r-md);
    font-size: 0.92rem;
    font-weight: 600;
  }
  .app.dash > nav.tabs .tab::before {
    display: none;
  }
  .app.dash > nav.tabs .tab:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  .app.dash > nav.tabs .tab.active {
    background: rgba(232, 154, 60, 0.16);
    color: var(--accent);
  }
  .app.dash header.seite {
    padding-left: 0;
    padding-right: 0;
    padding-top: 1rem;
  }
  .app.dash .mx {
    margin-left: 0;
    margin-right: 0;
  }
  .app.dash h1 {
    font-size: 1.75rem;
  }
}
