/* cosan POS – Stylesheet (Design-Tokens aus design/cosan-pos.dc.html) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

:root {
  --pink: #FF2E8C; --orange: #FF5A1F; --gelb: #FFC93F; --teal: #00E5C7; --violett: #B57BFF;
  --grad: linear-gradient(135deg, #FF2E8C 0%, #FF5A1F 55%, #FFC93F 100%);
  --bg: #140826; --bg2: #1C0F36; --panel: #241448; --panel2: #1F1140;
  --card: #2B1856; --card-hover: #341C68; --bar: rgba(255,255,255,.10);
  --text: #FFFFFF; --muted: #B7A6DA; --faint: #7E6BA8;
  --border: rgba(255,255,255,.10); --border2: rgba(255,255,255,.06);
  --shadow: 0 26px 60px -24px rgba(0,0,0,.7); --shadow-sm: 0 4px 14px -6px rgba(0,0,0,.5);
}
[data-theme="light"] {
  --bg: #F1ECF9; --bg2: #FFFFFF; --panel: #FFFFFF; --panel2: #F8F5FD;
  --card: #FFFFFF; --card-hover: #F6F1FC; --bar: rgba(26,11,51,.10);
  --text: #1A0B33; --muted: #6B5B8A; --faint: #A091BE;
  --border: rgba(26,11,51,.10); --border2: rgba(26,11,51,.055);
  --shadow: 0 26px 60px -26px rgba(26,11,51,.28); --shadow-sm: 0 4px 14px -8px rgba(26,11,51,.22);
}

body {
  background: var(--bg); color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  transition: background .3s;
  -webkit-user-select: none; user-select: none;
}
button { font-family: 'Manrope', system-ui, sans-serif; }
.sg { font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif; }

@keyframes ringPulse { 0% { transform: scale(.45); opacity: .85; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes checkPop { 0% { transform: scale(0); } 62% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes softIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

#app { height: 100%; }
.app-rahmen { height: 100vh; display: flex; background: var(--bg2); overflow: hidden; }

/* ===== Login ===== */
.login {
  position: relative; height: 100vh; background: var(--bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  animation: softIn .4s both;
}
.login-glow1 { position: absolute; top: -140px; right: -120px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(255,46,140,.28), transparent 68%); filter: blur(20px); }
.login-glow2 { position: absolute; bottom: -160px; left: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(0,229,199,.20), transparent 68%); filter: blur(20px); }
.login-mitte { position: relative; text-align: center; max-width: 620px; padding: 40px; animation: floatUp .45s both; }
.login-karten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bediener-karte {
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  padding: 22px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: transform .16s, box-shadow .16s; color: var(--text);
}
.bediener-karte:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.avatar-gross { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk'; font-weight: 700; font-size: 22px; color: #fff; }

/* ===== PIN-Overlay ===== */
.pin-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(10,4,24,.62); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; animation: softIn .2s both;
}
.pin-dialog {
  background: var(--panel); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow); padding: 30px 34px; width: 340px; text-align: center;
}
.pin-punkte { display: flex; justify-content: center; gap: 14px; margin: 22px 0 26px; }
.pin-punkt { width: 14px; height: 14px; border-radius: 50%; background: var(--bar); transition: background .15s; }
.pin-punkt.voll { background: var(--pink); box-shadow: 0 0 10px rgba(255,46,140,.6); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-taste {
  padding: 16px 0; border-radius: 14px; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); font-family: 'Space Grotesk'; font-size: 19px; font-weight: 700; cursor: pointer;
  transition: background .12s;
}
.pin-taste:active { background: var(--card-hover); }
.pin-fehler { color: var(--pink); font-size: 12.5px; font-weight: 700; min-height: 18px; margin-top: 12px; }

/* ===== Sidebar ===== */
.sidebar {
  width: 88px; flex: none; background: var(--panel2); border-right: 1px solid var(--border2);
  display: flex; flex-direction: column; align-items: center; padding: 20px 0; gap: 8px; z-index: 5;
}
.logo-kachel {
  width: 44px; height: 44px; border-radius: 14px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  box-shadow: 0 8px 20px -6px rgba(255,46,140,.5);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 58px; height: 58px; border-radius: 17px; cursor: pointer; border: none;
  font-size: 9.5px; font-weight: 600; letter-spacing: .02em; transition: all .2s;
  color: var(--faint); background: transparent;
}
.nav-btn.aktiv { color: #fff; background: var(--grad); box-shadow: 0 10px 24px -8px rgba(255,46,140,.6); }
.avatar-klein {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Space Grotesk'; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px -6px rgba(255,46,140,.6);
}

.haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Seitenleiste pro Bediener: Schwebe-Knopf (wenn ausgeblendet) & Icon-Editor */
.schwebe-knopf {
  position: fixed; top: 14px; left: 14px; z-index: 30;
  width: 46px; height: 46px; border-radius: 15px; border: none; cursor: pointer;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -8px rgba(255,46,140,.6); animation: softIn .2s both;
}
.icon-wahl {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--panel2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; transition: all .15s; padding: 0;
}
.icon-wahl.aktiv { border-color: var(--pink); background: rgba(255,46,140,.12); color: var(--pink); }

/* ===== Kasse ===== */
.pos { flex: 1; display: flex; min-height: 0; }
.pos-links { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 24px 24px 0; }
.kopfzeile { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.titel { font-family: 'Space Grotesk'; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.untertitel { font-size: 13px; color: var(--faint); margin-top: 2px; }
.status-chip {
  display: flex; align-items: center; gap: 8px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 14px; padding: 8px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.status-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.status-punkt.aus { background: var(--faint); box-shadow: none; }

.gruppen-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; }
.gruppen-tab {
  display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 12px;
  cursor: pointer; border: none; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: all .18s; color: var(--muted); background: transparent;
}
.gruppen-tab.aktiv { color: var(--text); background: var(--card); box-shadow: var(--shadow-sm); }
.gruppen-punkt { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.artikel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.artikel-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; padding-bottom: 24px; }
.artikel-kachel {
  background: var(--card); border: 1px solid var(--border2); border-radius: 17px; padding: 16px;
  cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 12px;
  min-height: 104px; justify-content: space-between; transition: transform .14s, box-shadow .14s;
  color: var(--text);
}
.artikel-kachel:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.artikel-name { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.artikel-preis { font-family: 'Space Grotesk'; font-size: 17px; font-weight: 700; }

/* Warenkorb-Rail */
.korb {
  width: 352px; flex: none; background: var(--panel); border-left: 1px solid var(--border2);
  display: flex; flex-direction: column; padding: 24px 22px;
}
.korb-leer { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--faint); gap: 8px; padding: 40px 0; font-size: 13px; }
.korb-leer-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.korb-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border2); }
.korb-balken { width: 7px; height: 34px; border-radius: 4px; flex: none; }
.menge-btn {
  width: 28px; height: 28px; border-radius: 9px; cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--border); background: var(--panel2); color: var(--text);
}
.menge-btn.plus { border: none; background: var(--grad); color: #fff; }

.cta {
  width: 100%; padding: 17px; border-radius: 16px; border: none; background: var(--grad); color: #fff;
  font-family: 'Space Grotesk'; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(255,46,140,.6);
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.cta:hover { filter: brightness(1.06); }
.cta:disabled { opacity: .45; cursor: default; filter: none; }
.sekundaer-btn {
  padding: 14px 26px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); font-family: 'Space Grotesk'; font-size: 14.5px; font-weight: 700; cursor: pointer;
}

/* ===== Bezahlen ===== */
.zahlen { flex: 1; display: flex; min-height: 0; animation: softIn .3s both; }
.zahlen-links { width: 420px; flex: none; padding: 28px 30px; border-right: 1px solid var(--border2); display: flex; flex-direction: column; }
.zahlen-rechts { flex: 1; min-width: 0; padding: 28px 34px; display: flex; flex-direction: column; }
.zurueck-btn { align-self: flex-start; display: flex; align-items: center; gap: 7px; background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 13.5px; font-weight: 600; margin-bottom: 22px; padding: 0; }
.abschnitt-titel { font-family: 'Space Grotesk'; font-size: 15px; font-weight: 600; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.tip-reihe { display: flex; gap: 10px; margin-bottom: 26px; }
.tip-btn {
  flex: 1; padding: 11px 0; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all .18s; border: 1.5px solid var(--border); color: var(--muted); background: transparent;
}
.tip-btn.aktiv { border-color: var(--pink); color: var(--pink); background: rgba(255,46,140,.10); }
.zahlart-btn {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; cursor: pointer;
  transition: all .18s; border: 1.5px solid var(--border); background: var(--panel2); width: 100%; text-align: left;
}
.zahlart-btn.aktiv { border-color: var(--pink); background: rgba(255,46,140,.07); }
.radio { width: 20px; height: 20px; border-radius: 50%; flex: none; border: 2px solid var(--faint); background: transparent; }
.zahlart-btn.aktiv .radio { border-color: var(--pink); background: var(--grad); }

.tap-ring { position: relative; width: 230px; height: 230px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.tap-ring span { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--pink); animation: ringPulse 1.8s ease-out infinite; }
.tap-ring span:nth-child(2) { border-color: var(--orange); animation-delay: .6s; }
.tap-ring span:nth-child(3) { border-color: var(--gelb); animation-delay: 1.2s; }
.tap-kern { width: 118px; height: 118px; border-radius: 34px; background: var(--grad); display: flex; align-items: center; justify-content: center; box-shadow: 0 18px 40px -10px rgba(255,46,140,.6); z-index: 2; }

.erfolg-kreis { width: 110px; height: 110px; border-radius: 50%; background: rgba(0,229,199,.14); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; animation: checkPop .5s cubic-bezier(.2,.8,.2,1) both; }
.erfolg-kern { width: 74px; height: 74px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(0,229,199,.6); }

/* ===== Beleg ===== */
.beleg-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 34px; overflow-y: auto; animation: softIn .3s both; }
.beleg {
  width: 400px; max-width: 100%; background: var(--panel); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow); padding: 34px 34px 26px; font-family: 'Space Grotesk';
}
.beleg-trenn { border-top: 2px dashed var(--border); }
.beleg-zeile { display: flex; justify-content: space-between; padding: 6px 0; font-family: 'Manrope'; font-size: 13.5px; }
.beleg-bezahlt { text-align: center; margin-top: 22px; padding: 12px; border-radius: 12px; background: rgba(0,229,199,.12); color: var(--teal); font-family: 'Manrope'; font-size: 12.5px; font-weight: 700; }

/* ===== Seiten (Dashboard, Artikel, Einstellungen) ===== */
.seite { flex: 1; overflow-y: auto; padding: 28px 30px; animation: softIn .3s both; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--border2); border-radius: 18px; padding: 20px; }
.kpi-label { font-size: 12.5px; color: var(--faint); font-weight: 600; margin-bottom: 10px; }
.kpi-wert { font-family: 'Space Grotesk'; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.karte { background: var(--card); border: 1px solid var(--border2); border-radius: 18px; padding: 22px 24px; }
.balken-reihe { display: flex; align-items: flex-end; gap: 7px; height: 190px; }
.balken { width: 100%; border-radius: 6px 6px 3px 3px; transform-origin: bottom; animation: barGrow .6s cubic-bezier(.2,.8,.2,1) both; background: var(--bar); }
.balken.spitze { background: var(--grad); }
.top-balken-bg { height: 7px; border-radius: 99px; background: var(--bar); overflow: hidden; }
.top-balken { height: 100%; background: var(--grad); border-radius: 99px; }

.tabelle { background: var(--card); border: 1px solid var(--border2); border-radius: 18px; overflow: hidden; }
.tabelle-kopf, .tabelle-zeile { display: grid; grid-template-columns: 2.4fr 1.2fr 1fr 0.9fr 0.7fr; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--border2); }
.tabelle-kopf { padding: 14px 22px; font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .05em; text-transform: uppercase; }
.status-pille { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; color: var(--teal); background: rgba(0,229,199,.13); }
.status-pille.aus { color: var(--faint); background: var(--panel2); }
.schalter { width: 42px; height: 24px; border-radius: 99px; cursor: pointer; border: none; position: relative; transition: all .2s; flex: none; background: var(--teal); }
.schalter.aus { background: var(--border); }
.schalter-knopf { position: absolute; top: 3px; left: 21px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: all .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.schalter.aus .schalter-knopf { left: 3px; }

.modul-zeile { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border2); }
.eingabe {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font-family: 'Manrope'; font-size: 14px; outline: none;
}
.eingabe:focus { border-color: var(--pink); }
.formular-label { display: block; font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: .05em; text-transform: uppercase; margin: 14px 0 7px; }
.mini-btn {
  padding: 10px 18px; border-radius: 12px; border: none; background: var(--grad); color: #fff;
  font-family: 'Space Grotesk'; font-size: 13.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(255,46,140,.6);
}
.hinweis { font-size: 12.5px; color: var(--faint); line-height: 1.5; }

/* Modal (Neuer Artikel) */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(10,4,24,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 40px; animation: softIn .2s both; }
.modal { width: 460px; max-width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 26px 28px; }

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  padding: 13px 22px; font-size: 13.5px; font-weight: 700; color: var(--text); animation: floatUp .25s both;
}
.toast.ok { border-color: rgba(0,229,199,.5); }
.toast.fehler { border-color: rgba(255,46,140,.6); }

/* ===== Animiertes cosan-Icon (Warte-/Ladeanzeige) ===== */
.cosan-lade { display: inline-block; }
.cosan-lade svg { overflow: visible; display: block; }
.cosan-lade .ring-basis { fill: none; stroke: var(--bar); stroke-width: 8; }
.cosan-lade .ring-sweep { fill: none; stroke: url(#cosanSweep); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 40 200; animation: cosanSpin 2.4s linear infinite; }
.cosan-lade .puls { fill: none; stroke: var(--teal); stroke-width: 3; opacity: 0; transform-origin: 27px 27px; animation: cosanPuls 2.4s ease-out infinite; }
.cosan-lade .kern { fill: var(--text); animation: cosanBlip 2.4s ease-in-out infinite; }
@keyframes cosanSpin { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -240; } }
@keyframes cosanPuls { 0% { transform: scale(.7); opacity: 0; } 8% { opacity: .9; } 45% { transform: scale(1.55); opacity: 0; } 100% { opacity: 0; } }
@keyframes cosanBlip { 0%, 30% { r: 5; } 38% { r: 8; } 46%, 100% { r: 5; } }
.lade-schirm {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; animation: softIn .2s both;
}
.lade-text { font-size: 13px; color: var(--faint); font-weight: 600; letter-spacing: .04em; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--bar); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }
