/* Farben aus dem Logo: Navy #10467f, Blau #4a7fb8, Stahlblau #6c8ba6 */
:root {
  --bg: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #f2f5f9;
  --surface-3: #e5ecf4;
  --header: #ffffff;
  --text: #14202e;
  --muted: #5f6e82;
  --line: #dbe3ec;
  --input: #ffffff;
  --primary: #1f5fa8;
  --primary-h: #2a6fc0;
  --primary-d: #10467f;
  --primary-l: #e6eef8;
  --primary-l2: #cddff3;
  --catbar: #10467f;
  --steel: #6c8ba6;
  --img-a: #ffffff;
  --img-b: #edf1f6;
  --skel-a: #e4eaf2;
  --skel-b: #f4f7fa;
  --footer: #0b2440;
  --yellow: #ffc400;
  --tape-dark: #14202e;
  --green: #1f9d55;
  --green-l: #e5f6ec;
  --red: #d93b30;
  --red-l: #fdeceb;
  --warn: #946c00;
  --warn-l: #fff6d6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 38, 66, .06), 0 6px 18px rgba(16, 38, 66, .08);
  --shadow-hover: 0 16px 34px rgba(16, 38, 66, .16);
  --shadow-lg: 0 12px 40px rgba(10, 20, 35, .28);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c1520;
  --surface: #142131;
  --surface-2: #1a2a3e;
  --surface-3: #22364f;
  --header: #101b29;
  --text: #e4ebf3;
  --muted: #95a5b9;
  --line: #24364c;
  --input: #0f1a28;
  --primary: #3d82d0;
  --primary-h: #4f93de;
  --primary-d: #8bb8ea;
  --primary-l: rgba(61, 130, 208, .16);
  --primary-l2: rgba(61, 130, 208, .3);
  --catbar: #0d2747;
  --img-a: #1f3148;
  --img-b: #15243a;
  --skel-a: #1a2a3e;
  --skel-b: #22364f;
  --footer: #070f19;
  --tape-dark: #0c1520;
  --green: #34c174;
  --green-l: rgba(52, 193, 116, .14);
  --red: #ef5a4f;
  --red-l: rgba(239, 90, 79, .14);
  --warn: #f0c24b;
  --warn-l: rgba(240, 194, 75, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  --shadow-hover: 0 16px 34px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "Cascadia Mono", monospace; }

/* ------------------------------------------------------------ Kopfbereich */
.tape { height: 8px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--tape-dark) 14px 28px); }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--header); box-shadow: 0 2px 14px rgba(16,70,127,.14); transition: background-color .25s; }
.topbar-inner { display: flex; align-items: center; gap: 18px; padding: 8px 0; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 54px; width: auto; max-width: 140px; object-fit: contain; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.brand:hover .brand-logo { transform: rotate(-2deg) scale(1.04); }

.search { flex: 1; display: flex; max-width: 640px; background: var(--surface-2); border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--line); transition: box-shadow .2s; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--primary); }
.search input { flex: 1; border: 0; outline: 0; padding: 11px 18px; background: transparent; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; background: var(--primary); color: #fff; padding: 0 18px; cursor: pointer; transition: background .2s; }
.search button:hover { background: var(--primary-h); }

.top-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-weight: 600; transition: background .15s, color .15s; white-space: nowrap; }
.btn-ghost:hover { background: var(--primary-l); color: var(--primary-d); }
.theme-btn { border: 0; background: var(--surface-2); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; color: var(--text); transition: background .15s, transform .3s; }
.theme-btn:hover { background: var(--primary-l); transform: rotate(-15deg); }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
.balance-pill { background: var(--green); color: #fff; font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.btn-cart { position: relative; border: 0; background: var(--primary); color: #fff; width: 46px; height: 42px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; transition: transform .15s, background .15s; }
.btn-cart:hover { background: var(--primary-h); transform: translateY(-1px); }
.btn-cart.bump { animation: bump .45s; }
@keyframes bump { 30% { transform: scale(1.18) rotate(-6deg); } 60% { transform: scale(.95); } }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--yellow); color: #14202e; font-size: 11.5px; font-weight: 900; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--header); }

.catbar { background: var(--catbar); }
.catbar-inner { display: flex; gap: 4px; overflow-x: auto; padding: 6px 0; scrollbar-width: none; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a { color: #d6e3f2; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.catbar a:hover { background: rgba(255,255,255,.12); color: #fff; }
.catbar a.active { background: #fff; color: #10467f; }

main { padding: 26px 0 60px; min-height: 60vh; outline: none; }

/* ------------------------------------------------------------------ Hero */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 46px 44px 92px;
  background:
    radial-gradient(1200px 420px at 110% -20%, rgba(74,127,184,.75), transparent 60%),
    radial-gradient(600px 300px at -10% 120%, rgba(255,196,0,.2), transparent 60%),
    linear-gradient(135deg, #0b2a4d, #164c86);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center;
}
/* Absperrband quer ueber die ganze Breite */
.hero::after {
  content: ""; position: absolute; left: -3%; right: -3%; bottom: 24px; height: 30px; transform: rotate(-1.6deg);
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #14202e 18px 36px);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.hero-kicker { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.hero-kicker b { color: var(--yellow); }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.04; margin: 16px 0 14px; letter-spacing: -.03em; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { color: #c9d6e6; font-size: 17px; max-width: 520px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; position: relative; z-index: 1; }
.stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 18px; backdrop-filter: blur(4px); transition: transform .2s; }
.stat.wide { grid-column: 1 / -1; }
.stat:hover { transform: translateY(-3px); }
.stat b { display: block; font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.stat span { color: #b9c7d8; font-size: 13.5px; }

/* ---------------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 11px 18px; font-weight: 800; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s, border-color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 #0b345f; }
.btn-primary:hover:not(:disabled) { background: var(--primary-h); }
.btn-dark { background: #14202e; color: #fff; }
.btn-dark:hover:not(:disabled) { background: #1d3d63; }
:root[data-theme="dark"] .btn-dark { background: var(--surface-3); }
:root[data-theme="dark"] .btn-dark:hover:not(:disabled) { background: #2c4664; }
.btn-light { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-light:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-outline-w { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.35); }
.btn-outline-w:hover { border-color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 12px; border-radius: 9px; font-size: 13.5px; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--surface-3); }

/* ------------------------------------------------------------ Abschnitte */
.section { margin-top: 38px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; font-weight: 900; }
.section-head h2 small { display: block; font-size: 13px; color: var(--primary); text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.link { color: var(--primary); font-weight: 700; }
.link:hover { text-decoration: underline; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-tile { position: relative; background: var(--surface); border-radius: var(--radius); padding: 18px 16px 16px; box-shadow: var(--shadow); overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; border: 1px solid transparent; }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.cat-tile .emoji { font-size: 30px; display: block; transition: transform .3s; }
.cat-tile:hover .emoji { transform: scale(1.18) rotate(-8deg); }
.cat-tile b { display: block; margin-top: 10px; font-size: 15px; line-height: 1.25; }
.cat-tile span { color: var(--muted); font-size: 13px; }
.cat-tile::after { content: ""; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 16px; transform: rotate(25deg); background: var(--primary-l); z-index: 0; transition: background .2s; }
.cat-tile:hover::after { background: var(--primary-l2); }
.cat-tile > * { position: relative; z-index: 1; }

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: start; }

.usp { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.usp div { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.usp i { font-style: normal; font-size: 26px; width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; background: var(--primary-l); display: grid; place-items: center; }
.usp b { display: block; }
.usp span { color: var(--muted); font-size: 13.5px; }
.usp p { margin: 0; }

/* --------------------------------------------------------- Produktkarten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-img { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, var(--img-a) 0, var(--img-b) 70%); border-bottom: 1px solid var(--line); }
.card-img img { width: 46%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 8px 8px rgba(0,0,0,.2)); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.card:hover .card-img img { transform: scale(1.12) rotate(-3deg); }
/* Fotos (eigene Bilder als .webp/.jpg) weich skalieren, Minecraft-Icons bleiben pixelig */
img[src*=".webp"], img[src*=".jpg"] { image-rendering: auto !important; }
.card-img img[src*=".webp"], .card-img img[src*=".jpg"] { width: 62%; }
.ph { width: 46%; aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; font-size: 34px; color: #fff; font-weight: 900;
  background: linear-gradient(135deg, #4a7fb8, var(--steel)); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.ph.gm { background: linear-gradient(135deg, #5b3fd6, #a58bff); }
.badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.badge-gm { background: #5b3fd6; color: #fff; }
.badge-stock { background: #14202e; color: #fff; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-weight: 700; line-height: 1.3; min-height: 2.6em; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title:hover { color: var(--primary); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 21px; font-weight: 900; letter-spacing: -.02em; }
.price small { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.qty { display: flex; align-items: center; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.qty button { border: 0; background: transparent; width: 30px; height: 36px; cursor: pointer; font-weight: 900; font-size: 16px; }
.qty button:hover { background: var(--surface-3); }
.qty input { width: 48px; text-align: center; border: 0; background: transparent; font-weight: 800; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-btn { flex: 1; }
.stack-hints { display: flex; gap: 4px; flex-wrap: wrap; }
.stack-hints button { border: 1px dashed var(--line); background: transparent; border-radius: 7px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; cursor: pointer; color: var(--muted); }
.stack-hints button:hover { border-color: var(--primary); color: var(--primary); }

/* ----------------------------------------------------------- Kategorie */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.side { position: sticky; top: 130px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.side a:hover { background: var(--surface-2); }
.side a.active { background: var(--primary); color: #fff; }
.side a.active span { color: #fff; }
.side a span { color: var(--muted); font-size: 12px; font-weight: 700; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; font-weight: 900; }
.toolbar h1 span { color: var(--muted); font-size: 15px; font-weight: 600; margin-left: 6px; }
select, .input { border: 1px solid var(--line); background: var(--input); border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
select:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l2); }
.more { display: flex; justify-content: center; margin-top: 22px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-size: 20px; color: var(--text); margin: 10px 0 4px; }
.empty .big { font-size: 54px; }

.skel { background: linear-gradient(90deg, var(--skel-a) 25%, var(--skel-b) 50%, var(--skel-a) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 290px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* -------------------------------------------------------------- Drawer */
.scrim { position: fixed; inset: 0; background: rgba(5, 10, 18, .55); z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg); z-index: 50; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .3s cubic-bezier(.2,.9,.3,1); box-shadow: var(--shadow-lg); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 20px; font-weight: 900; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot { padding: 16px 20px 20px; background: var(--surface); border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; background: var(--surface); padding: 10px; border-radius: 12px; box-shadow: var(--shadow); }
.line .thumb { width: 54px; height: 54px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.line .thumb img { width: 36px; image-rendering: pixelated; }
.line .thumb .ph { width: 40px; font-size: 18px; border-radius: 9px; }
.line b { display: block; font-size: 14px; line-height: 1.25; }
.line small { color: var(--muted); }
.line-right { display: flex; flex-direction: column; align-items: end; gap: 6px; }
.line .qty input { width: 52px; }
.line .qty button { height: 30px; width: 26px; }
.rm { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px; text-decoration: underline; }
.rm:hover { color: var(--red); }
.sum-row { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); }
.sum-row.total { color: var(--text); font-size: 20px; font-weight: 900; margin: 10px 0 14px; }
.sum-row.save { color: var(--green); font-weight: 700; }

/* --------------------------------------------------------------- Modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(5,10,18,.6); animation: fade .2s; }
.modal-card { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .25s cubic-bezier(.2,1.4,.4,1); }
.modal-card.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-head h3 { margin: 0; font-size: 21px; font-weight: 900; }
.modal-body { padding: 16px 22px 22px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 13.5px; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .input { width: 100%; }
.note { background: var(--primary-l); border-left: 4px solid var(--primary); padding: 10px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px; }
.note.green { background: var(--green-l); border-color: var(--green); }
.note.red { background: var(--red-l); border-color: var(--red); }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: var(--line); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-box { text-align: center; padding: 18px 8px 4px; }
.wait-box .spinner { width: 44px; height: 44px; border-width: 5px; }
.wait-box p { color: var(--muted); }
.wait-box h3 { font-size: 22px; margin: 8px 0; }
.big-emoji { font-size: 56px; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }

.pd { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; }
.pd-img { background: radial-gradient(circle at 50% 40%, var(--img-a) 0, var(--img-b) 70%); border-radius: 14px; display: grid; place-items: center; aspect-ratio: 1; }
.pd-img img { width: 55%; image-rendering: pixelated; filter: drop-shadow(0 12px 12px rgba(0,0,0,.22)); }
.pd-img .ph { width: 50%; font-size: 54px; }
.pd h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.pd .price { font-size: 32px; }
.pd dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; margin: 14px 0; }
.pd dt { color: var(--muted); }
.pd dd { margin: 0; font-weight: 600; }

/* ----------------------------------------------------- Konto & Listen */
.page-title { font-size: 30px; font-weight: 900; letter-spacing: -.03em; margin: 0 0 18px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel h3 { margin: 0 0 12px; font-size: 18px; font-weight: 900; }
.balance-card { background: linear-gradient(135deg, #0b2a4d, #1d4f86); color: #fff; position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 30px; transform: rotate(25deg); background: rgba(255,196,0,.22); }
.balance-card .big { font-size: 40px; font-weight: 900; letter-spacing: -.03em; margin: 4px 0; position: relative; z-index: 1; }
.balance-card .muted { color: #bccbdc; position: relative; z-index: 1; }
.copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface-2); padding: 9px 12px; border-radius: 10px; margin-bottom: 10px; }
.copy span { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; width: 48px; }
.copy code { flex: 1; font-size: 15px; font-weight: 800; }
.copy button { border: 0; background: var(--primary); color: #fff; padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th.r, td.amt-in, td.amt-out { text-align: right; }
.amt-in { color: var(--green); font-weight: 800; white-space: nowrap; }
.amt-out { color: var(--red); font-weight: 800; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.thumb-cell { width: 48px; }
.thumb-cell img { width: 32px; image-rendering: pixelated; }
.thumb-cell .ph { width: 32px; font-size: 13px; border-radius: 7px; }

.order { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.order-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.order-head b { font-size: 16px; }
.order-items { padding: 6px 18px; }
.order-item { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.order-item:last-child { border-bottom: 0; }
.order-item img { width: 32px; image-rendering: pixelated; }
.order-item .ph { width: 32px; font-size: 14px; border-radius: 7px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px 16px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.chip-paid { background: var(--green-l); color: var(--green); }
.chip-partially_returned { background: var(--warn-l); color: var(--warn); }
.chip-returned { background: var(--primary-l); color: var(--primary); }
.chip-failed { background: var(--red-l); color: var(--red); }
.chip-unklar { background: var(--warn-l); color: var(--warn); }
.countdown { font-weight: 800; color: var(--primary); }
.countdown.over { color: var(--muted); }
.ret-line { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ret-sum { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--primary); }
.kpi b { display: block; font-size: 24px; font-weight: 900; }
.kpi span { color: var(--muted); font-size: 13px; }
.admin-tabs { margin-bottom: 16px; max-width: 520px; }
.inline-input { width: 96px; padding: 6px 8px; }
.top-gap { margin-top: 14px; }
.center { justify-content: center; }
.fine { font-size: 12.5px; margin: 10px 0 0; text-align: center; }

/* -------------------------------------------------------------- Toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #14202e; color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: toast-in .3s cubic-bezier(.2,1.4,.4,1); max-width: min(560px, calc(100vw - 32px)); border-left: 5px solid var(--primary); }
:root[data-theme="dark"] .toast { background: #22364f; }
.toast.ok { border-left-color: var(--green); }
.toast.bad { border-left-color: var(--red); }
.toast.out { animation: toast-out .25s forwards; }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(16px); opacity: 0; } }

/* -------------------------------------------------------------- Footer */
.footer { background: var(--footer); color: #c3cfdd; padding: 40px 0 20px; margin-top: 30px; position: relative; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, #14202e 14px 28px); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.footer-logo { height: 64px; width: auto; max-width: 160px; margin-bottom: 12px; display: block; }
.footer h4 { color: #fff; margin: 4px 0 8px; }
.footer p { margin: 0; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 26px; padding-top: 14px; font-size: 12.5px; color: #8796a8; }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .hero { grid-template-columns: 1fr; padding: 32px 24px 84px; }
  .pd { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .brand { margin-right: auto; }
  .brand-logo { height: 42px; }
  .hide-sm, #account-label { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px; }
  .price { font-size: 18px; }
  .stack-hints { display: none; }
  .order-item { grid-template-columns: 32px 1fr auto; }
  .order-item .oi-sum { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Lieferung / Abholung ---------- */
.dlv-h { margin: 14px 0 8px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dlv-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px; border: 2px solid var(--line);
  border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dlv-opt:hover { border-color: var(--primary-l2); }
.dlv-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-l); }
.dlv-opt input { margin-top: 4px; accent-color: var(--primary); }
.dlv-opt small { display: block; color: var(--muted); margin-top: 3px; }
.dlv-opt.off { opacity: .55; cursor: not-allowed; }
.red-t { color: var(--red); }
.cd { font-variant-numeric: tabular-nums; }
.si-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
@media (max-width:640px){.si-row{grid-template-columns:1fr}}


.ac-live{margin:8px 0 4px}
.ac-steps{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:6px}
.ac-step{padding:3px 10px;border-radius:999px;border:1px solid currentColor;opacity:.45;font-size:.85em}
.ac-step.on{opacity:1;font-weight:700;background:#2f7de1;border-color:#2f7de1;color:#fff}
.ac-arrow{opacity:.4}

