/* Ulti-Back – Backstuben-Design: Orange, Beige, Krustenbraun. Alle Farben sind Tokens (im Adminpanel anpassbar). */
:root {
  --orange: #E8772E;
  --orange-light: #F6B26B;
  --orange-deep: #A84A14;
  --beige: #F5EBDD;
  --cream: #FBF6EE;
  --kruste: #6B3F1D;
  --ink: #2E1A0A;
  --on-orange: #3B2008;
  --muted: #7A4A26;
  --line: #E3D2BB;
  --danger: #9B2C20;
  --danger-bg: #F8E3DF;
  --ok: #3E7A2E;
  --ok-bg: #E6F0DF;
  --warn-bg: #FCEBC8;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(107, 63, 29, .08), 0 10px 24px -12px rgba(107, 63, 29, .35);
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Georgia", "Cambria", "Times New Roman", serif;
  --tap: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 17px/1.45 var(--font); color: var(--ink); background: var(--beige);
  background-image: radial-gradient(rgba(232, 119, 46, .07) 1.2px, transparent 1.4px), radial-gradient(rgba(107, 63, 29, .05) 1px, transparent 1.2px);
  background-size: 34px 34px, 52px 52px; background-position: 0 0, 17px 21px;
  min-height: 100vh; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--kruste); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
a { color: var(--orange-deep); }
small, .hint { color: var(--muted); }
.hint { display: block; margin-top: 4px; font-size: .88rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--kruste); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
.stack > * + * { margin-top: 14px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* ---------- Buttons / Felder ---------- */
.btn {
  min-height: var(--tap); padding: 0 22px; border-radius: 14px; border: 2px solid var(--kruste); background: var(--cream); color: var(--kruste);
  font: 700 1.05rem/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s cubic-bezier(.3, 1.6, .5, 1), box-shadow .12s, background .15s; box-shadow: 0 3px 0 var(--kruste); touch-action: manipulation;
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--kruste); }
.btn.primary { background: var(--orange); border-color: var(--kruste); color: var(--on-orange); }
.btn.primary:hover { background: var(--orange-light); }
.btn.danger { background: var(--danger); color: #fff; border-color: #5d1a12; box-shadow: 0 3px 0 #5d1a12; }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn.ghost:active { transform: none; }
.btn.small { min-height: 42px; padding: 0 14px; font-size: .95rem; }
.btn.big { min-height: 76px; font-size: 1.35rem; padding: 0 30px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.field { display: block; margin-bottom: 14px; }
.field > label { display: block; font-weight: 700; color: var(--kruste); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange); outline: 3px solid rgba(232, 119, 46, .35); outline-offset: 0; }
input[type="checkbox"] { width: 26px; min-height: 26px; height: 26px; accent-color: var(--orange-deep); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: center; gap: 12px; font-weight: 600; min-height: 44px; }
.err { background: var(--danger-bg); color: var(--danger); border: 2px solid var(--danger); padding: 10px 14px; border-radius: 12px; font-weight: 700; margin-bottom: 14px; }
.note { background: var(--warn-bg); border: 2px solid var(--orange); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; }
.okbox { background: var(--ok-bg); border: 2px solid var(--ok); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; }
.card { background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--beige); border: 1.5px solid var(--line); font-size: .85rem; font-weight: 700; color: var(--kruste); }
.pill.warn { background: var(--warn-bg); border-color: var(--orange); }
.pill.bad { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.pill.good { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }

/* ---------- Gerüst ---------- */
.shell { max-width: 1280px; margin: 0 auto; padding: 0 16px 80px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.topbar .brand { display: flex; align-items: center; gap: 10px; font: 700 1.25rem var(--font-display); color: var(--kruste); text-decoration: none; margin-right: auto; }
.topbar .brand img { width: 46px; height: auto; }
.nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.nav a { white-space: nowrap; text-decoration: none; padding: 10px 16px; border-radius: 99px; font-weight: 800; color: var(--kruste); border: 2px solid transparent; min-height: 46px; display: inline-flex; align-items: center; gap: 8px; }
.nav a:hover { background: var(--cream); }
.nav a[aria-current="page"] { background: var(--orange); color: var(--on-orange); border-color: var(--kruste); }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); display: inline-block; }
.status-dot.off { background: var(--orange); }
.status-dot.sync-bad { background: var(--bad, #b3261e); }
.view { animation: view-in .28s ease-out both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Banner ---------- */
.banner {
  position: relative; overflow: hidden; border-radius: 28px; padding: 34px 28px 54px; margin: 6px 0 22px; color: var(--on-orange);
  background: radial-gradient(120% 140% at 85% 0%, #F6B26B 0%, transparent 55%), linear-gradient(135deg, #F08A3C 0%, var(--orange) 55%, #D96A22 100%);
  border: 3px solid var(--kruste); box-shadow: 0 6px 0 var(--kruste), 0 20px 40px -18px rgba(107, 63, 29, .6);
}
.banner::after { /* gewellte Teigkante unten */
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -1px; height: 30px; background: var(--beige);
  -webkit-mask: radial-gradient(34px 22px at 34px 0, transparent 98%, #000) 0 0 / 68px 100% repeat-x; mask: radial-gradient(34px 22px at 34px 0, transparent 98%, #000) 0 0 / 68px 100% repeat-x;
}
.banner-inner { position: relative; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; z-index: 2; }
.banner-logo { width: clamp(96px, 16vw, 168px); height: auto; filter: drop-shadow(0 4px 0 rgba(107, 63, 29, .45)); background: var(--cream); border-radius: 50%; padding: 14px; border: 3px solid var(--kruste); animation: dough-rise 1s cubic-bezier(.2, 1.4, .4, 1) both, oven-glow 4s ease-in-out 1s infinite; }
.banner-text h1 { font-size: clamp(2.2rem, 6.5vw, 4.4rem); color: var(--kruste); margin: 0; letter-spacing: .01em; text-shadow: 0 2px 0 rgba(255, 255, 255, .45); }
.banner-text .sub { font: italic 600 clamp(1rem, 2.6vw, 1.5rem) var(--font-display); color: var(--on-orange); margin-top: 6px; }
.banner-text .hello { font-weight: 800; margin-top: 12px; }
.flour { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.flour i { position: absolute; bottom: -14px; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 250, 240, .8); animation: flour-rise 7s linear infinite; }
.flour i:nth-child(1) { left: 8%; animation-delay: 0s; } .flour i:nth-child(2) { left: 19%; animation-delay: 1.4s; width: 5px; height: 5px; }
.flour i:nth-child(3) { left: 31%; animation-delay: 3.1s; } .flour i:nth-child(4) { left: 46%; animation-delay: .7s; width: 9px; height: 9px; }
.flour i:nth-child(5) { left: 58%; animation-delay: 4.2s; width: 5px; height: 5px; } .flour i:nth-child(6) { left: 71%; animation-delay: 2.2s; }
.flour i:nth-child(7) { left: 83%; animation-delay: 5.3s; width: 6px; height: 6px; } .flour i:nth-child(8) { left: 93%; animation-delay: 3.7s; }
@keyframes flour-rise { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(24px, -240px) scale(1.3); opacity: 0; } }
@keyframes dough-rise { 0% { transform: scale(.55) translateY(30px); opacity: 0; } 60% { transform: scale(1.08) translateY(-4px); opacity: 1; } 100% { transform: none; } }
@keyframes oven-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 178, 107, .0); } 50% { box-shadow: 0 0 34px 8px rgba(255, 214, 150, .75); } }

/* ---------- Kacheln ---------- */
.tile-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mod-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; min-height: 180px; text-decoration: none; color: var(--kruste);
  background: var(--cream); border: 3px solid var(--kruste); border-radius: 24px; box-shadow: 0 5px 0 var(--kruste); overflow: hidden; cursor: pointer;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s; animation: tile-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.mod-tile:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: 0 10px 0 var(--kruste); }
.mod-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--kruste); }
.mod-tile .ico { font-size: 3rem; line-height: 1; transition: transform .3s; }
.mod-tile:hover .ico { transform: scale(1.15) rotate(-8deg); }
.mod-tile .name { font: 700 1.5rem var(--font-display); }
.mod-tile .blurb { color: var(--muted); font-weight: 600; }
.mod-tile .badge { position: absolute; right: 16px; top: 16px; }
.mod-tile::before { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 119, 46, .28), transparent 70%); }
@keyframes tile-pop { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin: 4px 0 18px; overflow-x: auto; padding-bottom: 6px; }
.tab { min-height: 60px; padding: 0 24px; border-radius: 16px 16px 6px 6px; border: 3px solid var(--kruste); background: var(--cream); color: var(--kruste); font: 800 1.15rem var(--font); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 4px 0 var(--kruste); }
.tab[aria-selected="true"] { background: var(--orange); color: var(--on-orange); transform: translateY(-2px); }
.tab .pct { font-weight: 700; font-size: .9rem; opacity: .85; }

/* ---------- Lager ---------- */
.prod-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.prod { background: var(--cream); border: 3px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: border-color .2s; }
.prod.low { border-color: var(--danger); background: #FFF5F2; }
.prod.bump { animation: bump .35s cubic-bezier(.3, 1.8, .5, 1); }
.prod.shake { animation: shake .35s; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.prod h3 { margin: 0; font-size: 1.2rem; }
.prod .meta { font-size: .9rem; color: var(--muted); font-weight: 600; }
.prod .qty { font: 800 2.2rem/1 var(--font); color: var(--ink); text-align: center; padding: 6px 0; }
.stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stepper .btn { min-height: 84px; font-size: 3rem; font-weight: 800; line-height: 1; padding: 0; }
.stepper .minus { background: #fff; } .stepper .plus { background: var(--orange); color: var(--on-orange); }
.pack-hint { text-align: center; font-weight: 700; color: var(--muted); font-size: .9rem; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input, .filters select { max-width: 320px; }

.silo-wrap { display: grid; gap: 22px; grid-template-columns: minmax(220px, 340px) 1fr; align-items: start; }
@media (max-width: 760px) { .silo-wrap { grid-template-columns: 1fr; } }
.silo-svg { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.silo-fill { transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(.3, .9, .3, 1); }
.silo-big { font: 800 clamp(2rem, 5vw, 3.2rem)/1.05 var(--font); color: var(--ink); }
.silo-sub { font-weight: 700; color: var(--muted); font-size: 1.15rem; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 420px; }
.keypad .btn { min-height: 74px; font-size: 1.9rem; }
.kp-display { font: 800 2.6rem/1 var(--font); text-align: right; padding: 14px 18px; background: #fff; border: 3px solid var(--kruste); border-radius: 16px; min-height: 76px; margin-bottom: 12px; max-width: 420px; word-break: break-all; }
.kp-display .unit { font-size: 1.3rem; color: var(--muted); margin-left: 8px; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.quick .btn { min-height: 62px; font-size: 1.2rem; }
.delivery-warn { font-weight: 800; }

/* ---------- Tabellen / Rezepte ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--cream); border-radius: 14px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1.5px solid var(--line); vertical-align: middle; }
th { background: #F1E1CB; color: var(--kruste); font-weight: 800; white-space: nowrap; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.sub td:first-child { padding-left: calc(12px + var(--depth, 0) * 22px); }
tr.sub td { background: #FFF9F0; color: var(--muted); }
tr.total td { font-weight: 800; background: #F6E7D0; }
.recipe-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.rcard { text-align: left; cursor: pointer; background: var(--cream); border: 3px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 6px; font: inherit; color: inherit; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; min-height: 120px; }
.rcard:hover { transform: translateY(-3px); border-color: var(--orange); }
.rcard h3 { margin: 0; }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.stat { background: var(--cream); border: 2px solid var(--line); border-radius: 14px; padding: 10px 16px; min-width: 130px; }
.stat b { display: block; font-size: 1.35rem; color: var(--ink); } .stat span { color: var(--muted); font-weight: 700; font-size: .9rem; }
.scale-box { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; background: #FFF3E0; border: 2px dashed var(--orange); border-radius: 16px; padding: 14px; margin-bottom: 16px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step { counter-increment: s; position: relative; background: var(--cream); border: 2px solid var(--line); border-radius: 16px; padding: 14px 14px 14px 64px; }
.step::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: var(--on-orange); font: 800 1.2rem/38px var(--font); text-align: center; border: 2px solid var(--kruste); }
.step .kv { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.timer { display: inline-flex; align-items: center; gap: 10px; position: relative; }
.timer .time { font: 800 1.5rem var(--font); min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
.timer.running .steam { opacity: 1; }
.steam { display: inline-flex; gap: 3px; opacity: .25; }
.steam i { width: 5px; height: 22px; border-radius: 4px; background: var(--orange); animation: steam 1.8s ease-in-out infinite; transform-origin: bottom; }
.steam i:nth-child(2) { animation-delay: .4s; height: 28px; } .steam i:nth-child(3) { animation-delay: .8s; }
.timer:not(.running) .steam i { animation: none; }
@keyframes steam { 0%, 100% { transform: scaleY(.5) translateX(0); opacity: .4; } 50% { transform: scaleY(1.1) translateX(3px); opacity: 1; } }
.timer.done .time { color: var(--danger); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.tree-indent { display: inline-block; }
.edit-row { display: grid; gap: 8px; grid-template-columns: 2fr 1fr 1fr auto; align-items: end; padding: 10px; background: #fff; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
@media (max-width: 760px) { .edit-row { grid-template-columns: 1fr 1fr; } }
.edit-row .field { margin: 0; }
.step-edit { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }

/* ---------- Kalkulation ---------- */
.bar { display: flex; height: 38px; border-radius: 10px; overflow: hidden; border: 2px solid var(--kruste); margin: 10px 0; }
.bar span { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; color: var(--on-orange); min-width: 0; overflow: hidden; white-space: nowrap; transition: flex-grow .6s; }
.seg-m { background: #F6B26B; } .seg-l { background: #E8772E; } .seg-g { background: #D9B382; } .seg-r { background: #EBD5B3; } .seg-p { background: #9CC27F; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 700; font-size: .9rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; border: 1.5px solid var(--kruste); vertical-align: -2px; }
.price-big { font: 800 3rem/1 var(--font); color: var(--ink); }

/* ---------- Dialoge / Hinweise ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(59, 32, 8, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; animation: fade .15s; }
.modal { background: var(--cream); border: 3px solid var(--kruste); border-radius: 22px; padding: 22px; max-width: 520px; width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: 0 12px 0 var(--kruste); animation: pop .25s cubic-bezier(.2, 1.4, .4, 1); }
.modal.wide { max-width: 860px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: scale(.9) translateY(16px); } }
.toast-host { position: fixed; left: 0; right: 0; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 200; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 16px; background: var(--kruste); color: #fff; padding: 14px 20px; border-radius: 16px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); animation: toast-in .25s cubic-bezier(.2, 1.4, .4, 1); max-width: 560px; }
.toast.error { background: var(--danger); } .toast.warn { background: #7A4A00; }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .2s; }
.toast-action { background: var(--orange-light); color: var(--on-orange); border: 0; border-radius: 10px; min-height: 44px; padding: 0 16px; font: 800 1rem var(--font); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Anmeldung ---------- */
.login-wrap { max-width: 520px; margin: 0 auto; padding: 24px 16px 60px; }
.login-logo { display: block; width: 150px; margin: 10px auto 6px; animation: dough-rise 1s cubic-bezier(.2, 1.4, .4, 1) both, oven-glow 4s ease-in-out 1s infinite; border-radius: 50%; }
.login-title { text-align: center; font: 700 2.4rem var(--font-display); color: var(--kruste); margin: 0 0 4px; }
.login-sub { text-align: center; color: var(--muted); font-weight: 700; margin-bottom: 18px; }
.recovery-code { font: 800 1.35rem/1.6 ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 3px dashed var(--kruste); border-radius: 14px; padding: 16px; text-align: center; letter-spacing: .08em; word-break: break-word; user-select: all; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 10px 0 16px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--kruste); background: transparent; }
.pin-dots i.on { background: var(--orange); }
.splash { position: fixed; inset: 0; background: var(--beige); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 500; transition: opacity .5s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash img { width: 160px; animation: dough-rise 1s cubic-bezier(.2, 1.4, .4, 1) both; }
.splash p { font: 700 1.6rem var(--font-display); color: var(--kruste); margin-top: 14px; }

/* ---------- Admin ---------- */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-nav .btn[aria-pressed="true"] { background: var(--orange); color: var(--on-orange); }
.inline-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }

@media print {
  body { background: #fff; } .nav, .topbar, .btn, .toast-host, .modal-actions { display: none !important; }
  .recovery-code { border-color: #000; color: #000; }
}
@media (max-width: 560px) { body { font-size: 16px; } .banner { padding: 22px 16px 46px; } .banner-inner { gap: 14px; } }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
.reduce-motion .flour { display: none; }

/* ---------- Dashboard-Hinweise ---------- */
.hints { margin-top: 22px; }
.hint-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 6px 14px; align-items: center; padding: 12px 4px; border-bottom: 1.5px solid var(--line); color: inherit; text-decoration: none; }
.hint-row:last-child { border-bottom: 0; }
a.hint-row:hover { background: #fff; border-radius: 12px; }
.hint-row.warn { background: var(--warn-bg); border-radius: 12px; padding: 12px; }
.mini-bar { grid-column: 1 / -1; height: 14px; background: #fff; border: 2px solid var(--kruste); border-radius: 99px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: calc(var(--w, 0) * 1%); background: var(--orange); transition: width .8s cubic-bezier(.3, .9, .3, 1); }
.mini-bar i.low { background: var(--danger); }
.silo-status { margin: 10px 0 18px; }
tr.undone { opacity: .5; }
tr.short td { background: var(--danger-bg); }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.check input { width: 24px; height: 24px; }

/* ---------- Eigene Tabs ---------- */
.check-row { display: flex; align-items: center; gap: 14px; padding: 14px 8px; border-bottom: 1.5px solid var(--line); font-size: 1.15rem; font-weight: 700; cursor: pointer; min-height: 60px; }
.check-row input { width: 30px; height: 30px; flex: none; }
.check-row.done span { text-decoration: line-through; color: var(--muted); }
.rcard.note { cursor: default; }
.rcard.note:hover { transform: none; border-color: var(--line); }
.note-body { white-space: pre-wrap; margin: 0; word-break: break-word; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; word-break: break-all; }
.ok-box { background: var(--ok-bg); border: 2px solid var(--ok); border-radius: 12px; padding: 10px 14px; font-weight: 700; color: var(--ok); }
.tab-card h3 { margin: 14px 0 8px; }

/* ---------- Sachliche Optik (überschreibt die frühere verspielte Gestaltung) ---------- */
:root { --radius: 10px; --shadow: 0 1px 2px rgba(60, 35, 12, .08), 0 2px 8px -4px rgba(60, 35, 12, .18); --font-display: var(--font); }
body { background: var(--beige); background-image: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.005em; }
.btn { border-width: 1px; border-radius: 8px; box-shadow: none; transition: background .15s, border-color .15s; }
.btn:active { transform: none; box-shadow: none; background: var(--line); }
.btn.danger { box-shadow: none; border-color: #5d1a12; }
.btn.primary { border-color: var(--orange-deep); }
input, select, textarea { border-width: 1px; border-radius: 8px; }
.card, .prod, .rcard, .step, .stat, .edit-row, .step-edit { border-width: 1px; }
.err, .note, .okbox, .ok-box { border-width: 1px; border-radius: 8px; }
.pill { border-width: 1px; }
.nav a { border-radius: 8px; font-weight: 700; }
.nav a[aria-current="page"] { border-color: var(--orange-deep); }
.nav-ico, .mod-tile .ico { display: inline-flex; }
.icon { display: block; }
.view { animation: view-in .15s ease-out both; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }
/* Banner: ruhig, flach, ohne Effekte */
.banner { border-radius: 12px; border: 1px solid var(--orange-deep); box-shadow: var(--shadow); padding: 26px 24px; margin: 6px 0 20px; background: linear-gradient(135deg, var(--orange) 0%, #D96A22 100%); }
.banner::after { display: none; }
.banner-logo { animation: none; filter: none; border: 0; padding: 10px; }
.banner-text h1 { text-shadow: none; color: var(--on-orange); letter-spacing: 0; }
.banner-text .sub { font: 600 clamp(1rem, 2.4vw, 1.25rem) var(--font); }
.flour { display: none; }
/* Kacheln */
.mod-tile { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); animation: none; transition: box-shadow .15s, border-color .15s; min-height: 160px; }
.mod-tile::before { display: none; }
.mod-tile:hover { transform: none; border-color: var(--orange); box-shadow: 0 4px 14px -6px rgba(60, 35, 12, .35); }
.mod-tile:active { transform: none; box-shadow: var(--shadow); }
.mod-tile:hover .ico { transform: none; }
.mod-tile .ico { color: var(--orange-deep); }
.mod-tile .name { font: 700 1.3rem var(--font); }
/* Reiter */
.tabs { gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.tab { min-height: 52px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; box-shadow: none; font-weight: 700; padding: 0 20px; }
.tab[aria-selected="true"] { background: transparent; color: var(--orange-deep); border-bottom-color: var(--orange); transform: none; }
/* Lager */
.prod { border-radius: 12px; }
.prod.bump { animation: none; }
.stepper .btn { box-shadow: none; }
.silo-fill { transition-duration: .5s; }
/* Dialoge / Meldungen */
.modal { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(40, 20, 5, .3); animation: fade .15s; }
.modal-back { background: rgba(40, 24, 10, .5); }
.toast { border-radius: 8px; animation: fade .15s; }
/* Anmeldung / Start */
.login-logo, .splash img { animation: none; }
.login-title { font: 700 2rem var(--font); }
.recovery-code { border-width: 2px; border-radius: 8px; }
.keypad .btn { min-height: 68px; }
.step::before { border-width: 1px; }
.steam { display: none; }
.scale-box { border-width: 1px; border-style: solid; border-radius: 10px; }
.bar { border-width: 1px; border-radius: 8px; }
.mini-bar { border-width: 1px; }
.kp-display { border-width: 1px; border-radius: 8px; }
