/* ================================================================
   MiMi Events — Kassen-App CI
   Tablet-First, Dark Theme, Schwarz/Grau, kein Rot
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  --bg-base:        #0d0d0d;
  --bg-surface:     #1a1a1a;
  --bg-raised:      #222222;
  --bg-hover:       #2a2a2a;
  --bg-active:      #323232;
  --border-subtle:  #1e1e1e;
  --border:         #2e2e2e;
  --border-focus:   #606060;

  --text-primary:   #efefef;
  --text-secondary: #909090;
  --text-muted:     #505050;

  --accent:         #b0b0b0;
  --accent-dim:     #808080;

  --success:        #3d6b4f;
  --success-hover:  #4a7c5e;
  --success-text:   #6dbb8e;

  --badge-active-bg:   #1a2e22;
  --badge-active-text: #6dbb8e;
  --badge-planned-bg:  #1a2035;
  --badge-planned-text:#7a9ae0;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;

  --transition: 0.18s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}

/* ── App Shell ──────────────────────────────────────────────────── */
#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── Screen System ──────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Centered Screen Layout (Login / Mode / Events / Bar) ───────── */
.screen-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  overflow-y: auto;
  padding: 28px 24px 48px;
}
.screen-centered::-webkit-scrollbar { width: 4px; }
.screen-centered::-webkit-scrollbar-track { background: transparent; }
.screen-centered::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Shared Nav Row ─────────────────────────────────────────────── */
.nav-row {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-shrink: 0;
}
/* ── Dezente Versions-Anzeige (unten rechts) ──────────────────── */
.app-version {
  position: fixed;
  bottom: 10px;
  right: 12px;
  z-index: 9999;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
  pointer-events: none;
  letter-spacing: 0.05em;
}

.nav-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-logo::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 28px;
  background-image: url('/frontend/public/assets/logo_grau.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}
.nav-breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
}
.nav-breadcrumb b { color: var(--text-secondary); font-weight: 500; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.btn-back:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
}
.btn-back svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-logout {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-logout:hover {
  border-color: var(--border-focus);
  color: var(--text-secondary);
  background: var(--bg-raised);
}

/* ── Screen Title ───────────────────────────────────────────────── */
.screen-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 6px;
  align-self: flex-start;
  width: 100%;
  max-width: 720px;
}
.screen-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  align-self: flex-start;
  width: 100%;
  max-width: 720px;
}


/* ================================================================
   LOGIN SCREEN
   ================================================================ */

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 32px 24px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 52px;
}
.login-brand::before {
  content: '';
  display: block;
  width: 96px;
  height: 96px;
  background-image: url('/frontend/public/assets/logo_grau.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 4px;
  opacity: 0.9;
}
.login-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.login-brand-sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.login-prompt {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-weight: 400;
}
.barkeeper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 580px;
}
@media (max-width: 500px) {
  .barkeeper-grid { grid-template-columns: repeat(2, 1fr); }
}
.barkeeper-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  min-height: 110px;
}
.barkeeper-tile:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}
.barkeeper-tile:active { transform: scale(0.97); }
.barkeeper-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-active);
  border: 1px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.barkeeper-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ── PIN Overlay ────────────────────────────────────────────────── */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.pin-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.pin-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 40px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.pin-user {
  text-align: center;
}
.pin-user-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.pin-user-label {
  font-size: 13px;
  color: var(--text-muted);
}
.pin-dots {
  display: flex;
  gap: 16px;
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.12s ease;
}
.pin-dot.filled  { background: var(--accent); }
.pin-dot.error   { background: #c44; animation: pin-shake 0.3s ease; }
@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
}
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}
.numpad-btn {
  height: 58px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.numpad-btn:hover  { background: var(--bg-hover); border-color: var(--border-focus); }
.numpad-btn:active { transform: scale(0.95); }
.numpad-btn.del    { font-size: 16px; color: var(--text-secondary); }
.numpad-btn.empty  { background: transparent; border-color: transparent; cursor: default; }
.numpad-btn.empty:hover { background: transparent; border-color: transparent; transform: none; }
.pin-error-msg {
  font-size: 13px;
  color: #c44;
  min-height: 18px;
  text-align: center;
}
.btn-pin-cancel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s;
}
.btn-pin-cancel:hover { color: var(--text-secondary); }
.pin-demo-hint {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}


/* ================================================================
   MODE SELECT SCREEN
   ================================================================ */

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
  max-width: 560px;
}
.mode-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 48px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  min-height: 220px;
  text-align: center;
  position: relative;
}
.mode-tile:not(.disabled):hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}
.mode-tile:not(.disabled):active { transform: scale(0.98); }
.mode-tile.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.mode-tile-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--bg-active);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mode-tile:not(.disabled):hover .mode-tile-icon {
  border-color: var(--border-focus);
}
.mode-tile-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-dim);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mode-tile-label {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.mode-tile-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 160px;
}
.mode-tile-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-active);
  color: var(--text-muted);
  border: 1px solid var(--border);
}


/* ================================================================
   EVENT SELECT SCREEN
   ================================================================ */

.event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 720px;
}
.event-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.event-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}
.event-card:active { transform: translateX(3px); }
.event-card.is-active {
  border-color: #2a4a35;
  background: #111a15;
}
.event-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.event-card.is-active .event-dot {
  background: var(--badge-active-text);
  box-shadow: 0 0 8px rgba(109, 187, 142, 0.45);
}
.event-card-body {
  flex: 1;
  min-width: 0;
}
.event-card-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-card-meta {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.event-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
}
.event-badge.active  { background: var(--badge-active-bg);  color: var(--badge-active-text); }
.event-badge.planned { background: var(--badge-planned-bg); color: var(--badge-planned-text); }
.event-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.event-card-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ================================================================
   BAR SELECT SCREEN
   ================================================================ */

.bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 720px;
}
.bar-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  min-height: 145px;
  text-align: center;
}
.bar-tile:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}
.bar-tile:active { transform: scale(0.97); }
.bar-tile-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--bg-active);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bar-tile:hover .bar-tile-icon { border-color: var(--border-focus); }
.bar-tile-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-dim);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bar-tile-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}


/* ================================================================
   ORDER SCREEN
   ================================================================ */

.order-wrap {
  display: grid;
  grid-template-rows: 58px 1fr;
  grid-template-columns: 86px 1fr 284px;
  height: 100%;
  overflow: hidden;
  background: var(--bg-base);
}

/* ── Header ─────────────────────────────────────────────────────── */
.order-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px 0 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.order-header-brand {
  width: 52px;
  height: 36px;
  background-image: url('/frontend/public/assets/logo_grau.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  opacity: 0.85;
  flex-shrink: 0;
  /* Text für Screenreader, visuell ausblenden */
  font-size: 0;
  color: transparent;
}
.order-header-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.order-header-ctx {
  flex: 1;
  min-width: 0;
}
.order-header-event {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.order-header-bar {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}
.order-header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.order-header-uname { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.order-header-time  { font-size: 12px; color: var(--text-muted); }

/* ── Category Rail ──────────────────────────────────────────────── */
.cat-rail {
  grid-row: 2;
  grid-column: 1;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cat-rail-items {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.cat-rail-items::-webkit-scrollbar { display: none; }
.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 4px;
  min-height: 62px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
}
.cat-btn:hover {
  background: var(--bg-raised);
  color: var(--text-secondary);
}
.cat-btn.active {
  background: var(--bg-raised);
  color: var(--accent);
  border-left-color: var(--accent-dim);
}
.cat-rail-footer {
  border-top: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;
}
.cat-back-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 4px;
  min-height: 56px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.cat-back-btn:hover { background: var(--bg-raised); color: var(--text-secondary); }
.cat-back-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Product Area ───────────────────────────────────────────────── */
.product-area {
  grid-row: 2;
  grid-column: 2;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg-base);
}
.product-area::-webkit-scrollbar { width: 4px; }
.product-area::-webkit-scrollbar-track { background: transparent; }
.product-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 9px;
}
.product-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  min-height: 88px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  gap: 3px;
  position: relative;
  overflow: hidden;
}
.product-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-hover);
  opacity: 0;
  transition: opacity 0.15s;
}
.product-btn:hover::before  { opacity: 1; }
.product-btn:active { transform: scale(0.96); }
.product-btn-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  position: relative;
}
.product-btn-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  position: relative;
}
.product-btn-add {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-active);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 19px;
  font-weight: 300;
  line-height: 1;
}

/* ── Cart Panel ─────────────────────────────────────────────────── */
.cart-panel {
  grid-row: 2;
  grid-column: 3;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cart-panel-head {
  padding: 12px 16px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.cart-list::-webkit-scrollbar { width: 3px; }
.cart-list::-webkit-scrollbar-track { background: transparent; }
.cart-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.cart-empty-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
  text-align: center;
}
.cart-empty-msg svg {
  width: 34px;
  height: 34px;
  stroke: var(--border);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-item {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s;
}
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: var(--bg-raised); }
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-name  {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: 11px;
  color: var(--text-muted);
}
.cart-ctrl-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.cart-ctrl {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--bg-active);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}
.cart-ctrl:hover { background: var(--bg-hover); border-color: var(--border-focus); }
.cart-ctrl:active { transform: scale(0.92); }
.cart-qty {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 18px;
  text-align: center;
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  flex-shrink: 0;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.cart-total-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cart-total-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}
.btn-checkout {
  width: 100%;
  padding: 15px;
  background: var(--success);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.01em;
}
.btn-checkout:hover:not(:disabled) { background: var(--success-hover); }
.btn-checkout:active:not(:disabled) { transform: scale(0.98); }
.btn-checkout:disabled {
  background: var(--bg-active);
  color: var(--text-muted);
  cursor: not-allowed;
}


/* ================================================================
   PAYMENT MODAL
   ================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  width: 400px;
  max-width: 92vw;
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.payment-summary {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 22px;
}
.pay-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
  color: var(--text-secondary);
}
.pay-sum-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 10px;
}
.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 22px;
}
.pay-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.pay-method:hover { background: var(--bg-hover); border-color: var(--border-focus); }
.pay-method.selected {
  border-color: var(--accent-dim);
  background: var(--bg-active);
}
.pay-method svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-dim);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pay-method.selected svg { stroke: var(--accent); }
.pay-method-lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.pay-method.selected .pay-method-lbl { color: var(--accent); }
.modal-actions {
  display: flex;
  gap: 9px;
}
.btn-modal-cancel {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-modal-cancel:hover { background: var(--bg-raised); border-color: var(--border-focus); }
.btn-modal-confirm {
  flex: 2;
  padding: 14px;
  background: var(--success);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-modal-confirm:hover:not(:disabled) { background: var(--success-hover); }
.btn-modal-confirm:active:not(:disabled) { transform: scale(0.98); }
.btn-modal-confirm:disabled {
  background: var(--bg-active);
  color: var(--text-muted);
  cursor: not-allowed;
}


/* ================================================================
   SUCCESS FLASH
   ================================================================ */

.success-flash {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.success-flash.visible { opacity: 1; }
.success-flash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: flash-in 0.3s ease;
}
@keyframes flash-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.flash-check {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.flash-check svg {
  width: 38px;
  height: 38px;
  stroke: #fff;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flash-text { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.flash-sub  { font-size: 14px; color: var(--text-muted); }


/* ================================================================
   LOADING & ERROR STATES
   ================================================================ */

/* Spinner */
.spinner {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-dim);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* API-Fehlermeldung */
.api-error {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  line-height: 1.6;
}

/* ── Offline-Sync-Badge (Order-Header) ────────────────────────── */

.sync-badge {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 180, 60, 0.4);
  background: rgba(255, 180, 60, 0.12);
  color: #f5b842;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.sync-badge:hover {
  background: rgba(255, 180, 60, 0.2);
}

/* Offline-Variante des Erfolgs-Flash ─────────────────────────── */
.success-flash.is-offline .flash-check svg {
  stroke: #f5b842;
}
.success-flash.is-offline {
  border-color: rgba(245, 184, 66, 0.3);
}
