@import url("https://fonts.googleapis.com/css2?family=Karla:wght@400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap");
@import url("tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-foreground);
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(245, 197, 24, 0.28), transparent 50%),
    radial-gradient(ellipse 90% 60% at -10% 100%, rgba(196, 30, 42, 0.12), transparent 45%),
    var(--color-background);
  touch-action: manipulation;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  letter-spacing: 0.02em;
}

a {
  color: var(--color-primary);
  cursor: pointer;
}

button,
.btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 var(--space-3);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), color var(--transition), opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
}

button:active,
.btn:active {
  transform: scale(0.97);
}

button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-foreground);
  border-color: var(--color-border);
}

.btn-block {
  width: 100%;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

input,
select,
textarea {
  font: inherit;
  width: 100%;
  min-height: var(--touch);
  padding: 0 var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-foreground);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 42, 0.15);
}

textarea {
  min-height: 96px;
  padding: var(--space-3);
  resize: vertical;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.field {
  margin-bottom: var(--space-3);
}

.field-error {
  color: var(--color-destructive);
  font-size: 0.9rem;
  margin-top: var(--space-1);
}

.hint {
  color: var(--color-muted-fg);
  font-size: 0.9rem;
  margin-top: var(--space-1);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  color: #fff;
  padding: var(--space-3) var(--space-3) calc(var(--space-3) + 4px);
  padding-top: calc(var(--space-3) + env(safe-area-inset-top, 0px));
  border-bottom: 3px solid var(--color-header-accent);
  box-shadow: var(--shadow-md);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 960px;
  margin: 0 auto;
}

.app-header-titles {
  min-width: 0;
  flex: 1;
}

.app-header-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--color-header-accent);
  flex-shrink: 0;
  background: #000;
}

.app-header-credit {
  margin-left: auto;
  flex-shrink: 0;
  max-width: 42%;
  text-align: right;
  line-height: 1.25;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
}

.app-header-credit strong {
  display: block;
  color: var(--color-header-accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.app-header-credit-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.8;
}

.app-header-credit-aka {
  display: block;
  font-size: 0.68rem;
  color: rgba(231, 229, 228, 0.85);
}

.app-header h1 {
  color: inherit;
  font-size: 1.2rem;
  margin: 0;
  color: var(--color-header-accent);
}

.app-header .meta {
  opacity: 0.85;
  font-size: 0.88rem;
  color: #e7e5e4;
  margin-top: 2px;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

body.has-bottom-nav .app-main {
  padding-bottom: calc(
    var(--bottom-nav-height) + var(--bottom-nav-offset) + 28px +
    env(safe-area-inset-bottom, 0px)
  );
}

body.has-bottom-nav .app-main.admin-pad {
  padding-bottom: calc(
    var(--bottom-nav-height) + var(--bottom-nav-offset) + 36px +
    env(safe-area-inset-bottom, 0px)
  );
}

.app-main.wide {
  max-width: 1100px;
}

.app-footer {
  text-align: center;
  padding: var(--space-3);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  color: var(--color-muted-fg);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

/* Credit-Footer nicht unter der Bottom-Nav liegen lassen */
body.has-bottom-nav .app-footer {
  display: none;
}

.app-footer strong {
  color: var(--color-foreground);
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--color-border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav a {
  flex: 1 0 auto;
  min-width: 64px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--color-muted-fg);
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 6px;
  transition: background-color var(--transition), color var(--transition);
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--color-primary);
  background: var(--color-muted);
}

.bottom-nav svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.bottom-nav.nav-dense a {
  min-width: 58px;
  font-size: 0.58rem;
  letter-spacing: -0.01em;
}

.bottom-nav.nav-dense svg {
  width: 20px;
  height: 20px;
}

.card,
.panel {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.alert {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  border: 2px solid var(--color-border);
}

.alert-error {
  background: #FEE2E2;
  border-color: var(--color-destructive);
  color: var(--color-destructive);
}

.alert-success {
  background: #DCFCE7;
  border-color: var(--color-success);
  color: var(--color-success);
}

.alert-info {
  background: #FFFBEB;
  border-color: var(--color-secondary);
  color: #92400E;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 2px solid currentColor;
  background: var(--color-surface);
}

.badge-neu { color: var(--color-primary); background: #FEE2E2; }
.badge-in_zubereitung { color: #B45309; background: #FEF3C7; }
.badge-fertig { color: var(--color-success); background: #DCFCE7; }
.badge-unterwegs { color: #1D4ED8; background: #DBEAFE; }
.badge-ausgeliefert { color: var(--color-muted-fg); background: #F5F5F4; }

.category-block {
  margin-bottom: 14px;
}

.category-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cat-color, var(--color-primary)) 12%, #fff);
  border-left: 4px solid var(--cat-color, var(--color-primary));
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.category-head .marke-dot {
  width: 10px;
  height: 10px;
}

.category-list {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.drink-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  min-height: 56px;
}

.drink-row:last-child {
  border-bottom: 0;
}

.drink-row:active {
  background: #FFFBF5;
}

.drink-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.drink-name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drink-price {
  display: inline-flex;
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted-fg);
}

.drink-meta {
  color: var(--color-muted-fg);
  font-size: 0.9rem;
}

.marke-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-foreground);
}

.marke-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--marke-color, #64748B);
  border: 2px solid color-mix(in srgb, var(--marke-color, #64748B) 65%, #000);
  flex-shrink: 0;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qty-control button {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--color-surface);
  color: var(--color-foreground);
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
}

.qty-control button.qty-plus {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.qty-control .qty {
  min-width: 1.6ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.05rem;
}

.guest-field-card {
  border: 1.5px solid #111;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fff;
}

.guest-field-card label {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.sticky-checkout {
  z-index: 45;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid #111;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.checkout-spacer {
  height: 0;
}

.checkout-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted-fg);
  margin-bottom: 4px;
}

.checkout-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-row > div:first-child {
  flex: 1;
  min-width: 0;
}

.checkout-submit {
  flex-shrink: 0;
  min-width: 120px;
  min-height: 52px;
  padding: 0 18px;
}

.sum-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 0;
  font-variant-numeric: tabular-nums;
}

.sum-line.sum-total {
  margin-top: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #111;
  color: var(--color-header-accent);
  font-size: 1.15rem;
  font-weight: 800;
}

.sum-line .hint,
#summen .hint {
  margin: 0;
}

.order-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.order-card-items {
  margin: 12px 0;
  padding-left: 18px;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.order-actions form {
  display: inline;
}

/* —— Theken-Board (Tablet / PC) —— */
body.page-bar .app-main.bar-main {
  max-width: 1400px;
}

.bar-board {
  display: grid;
  gap: 14px;
}

.bar-col {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bar-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 3px solid transparent;
}

.bar-col-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bar-col-count {
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  background: #111;
  color: var(--color-header-accent);
}

.bar-col--neu .bar-col-head {
  background: #FEE2E2;
  border-bottom-color: var(--color-primary);
  color: #991B1B;
}

.bar-col--in_zubereitung .bar-col-head {
  background: #FEF3C7;
  border-bottom-color: #D97706;
  color: #92400E;
}

.bar-col--fertig .bar-col-head {
  background: #DCFCE7;
  border-bottom-color: var(--color-success);
  color: #166534;
}

.bar-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.bar-col-empty {
  margin: 8px 4px;
  color: var(--color-muted-fg);
  font-size: 0.9rem;
  text-align: center;
}

.order-card--bar {
  margin: 0;
  padding: 12px;
  box-shadow: none;
}

.order-card--bar h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
  line-height: 1.2;
}

.order-card--bar .order-card-items {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.order-card--bar .order-card-items li + li {
  margin-top: 2px;
}

.order-card-marken {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 8px;
  background: #111;
  color: var(--color-header-accent);
}

.order-card--bar .order-actions {
  margin-top: 10px;
  gap: 8px;
  align-items: stretch;
}

.order-card--bar .order-actions form {
  flex: 1;
  display: block;
  min-width: 0;
}

.order-card--bar .order-actions .btn {
  min-height: 44px;
  font-size: 0.9rem;
}

.order-card--bar .btn-icon-sm {
  min-width: 44px;
  width: 44px;
  padding: 0;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .bar-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  .bar-col {
    position: sticky;
    top: calc(72px + env(safe-area-inset-top, 0px));
    max-height: calc(100vh - 120px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .bar-col-body {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 12px;
  }

  .order-card--bar h3 {
    font-size: 1.15rem;
  }

  .order-card--bar .order-card-items {
    font-size: 1rem;
  }

  .order-card--bar .order-actions .btn-primary {
    min-height: 48px;
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  body.page-bar .app-main.bar-main {
    max-width: 1600px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .bar-board {
    gap: 20px;
  }

  .bar-col-head h2 {
    font-size: 1.05rem;
  }
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table.data th,
table.data td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

table.data th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted-fg);
}

.admin-layout {
  display: grid;
  gap: var(--space-3);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.admin-nav a {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  text-decoration: none;
  color: var(--color-foreground);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.admin-nav a.active {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}

.login-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.login-brand {
  text-align: center;
  margin-bottom: var(--space-4);
}

.login-brand img {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  border: 3px solid #111;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-3);
  background: #000;
}

.login-brand h1 {
  font-size: 1.6rem;
  color: var(--color-foreground);
}

.login-card {
  border-width: 3px;
  border-color: #111;
  box-shadow: var(--shadow-md);
}

.grid-2 {
  display: grid;
  gap: var(--space-3);
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111;
  color: var(--color-header-accent);
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-checkout {
    position: sticky;
    bottom: 24px;
    margin-top: var(--space-4);
  }

  .checkout-spacer {
    display: none;
  }

  .checkout-submit {
    min-width: 180px;
  }
}

@media (min-width: 1024px) {
  .admin-layout {
    grid-template-columns: 220px 1fr;
  }

  .admin-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-nav a {
    border-radius: var(--radius-sm);
  }

  .app-main.admin-pad {
    padding-bottom: var(--space-5);
  }

  body.has-bottom-nav .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(480px, calc(100% - 24px));
  }
}

/* —— Mobile-first Handy-Optimierung —— */
@media (max-width: 767px) {
  :root {
    --touch: 52px;
  }

  body {
    overscroll-behavior-y: contain;
  }

  .app-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .app-header h1 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .app-header .meta {
    font-size: 0.8rem;
  }

  .app-header-credit {
    max-width: 38%;
    font-size: 0.62rem;
  }

  .app-header-credit strong {
    font-size: 0.72rem;
  }

  .app-header-credit-label {
    display: none;
  }

  .app-header-credit-aka {
    font-size: 0.6rem;
  }

  .app-main {
    padding: 12px;
    padding-bottom: calc(
      var(--bottom-nav-height) + var(--bottom-nav-offset) + 28px +
      env(safe-area-inset-bottom, 0px)
    );
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: calc(var(--bottom-nav-offset) + env(safe-area-inset-bottom, 0px));
    padding: 4px;
  }

  .bottom-nav a {
    min-height: 52px;
    font-size: 0.7rem;
  }

  .card,
  .panel {
    padding: 14px;
    margin-bottom: 12px;
  }

  .category-block {
    margin-bottom: 12px;
  }

  .category-head {
    font-size: 0.88rem;
    padding: 6px 10px;
    position: sticky;
    top: calc(58px + env(safe-area-inset-top, 0px));
    z-index: 20;
  }

  .drink-row {
    padding: 8px 10px;
    min-height: 52px;
    gap: 8px;
  }

  .drink-name {
    font-size: 0.95rem;
  }

  .qty-control button {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }

  .qty-control .qty {
    min-width: 1.8ch;
    font-size: 1.1rem;
  }

  /* Checkout klar über der Bottom-Nav, ohne Überlappung */
  .mobile-checkout {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(
      var(--bottom-nav-offset) + var(--bottom-nav-height) + var(--checkout-gap) +
      env(safe-area-inset-bottom, 0px)
    );
    margin: 0;
    border-radius: 18px;
    z-index: 45;
  }

  .checkout-spacer {
    height: calc(
      var(--checkout-height) + var(--bottom-nav-height) + var(--checkout-gap) +
      var(--bottom-nav-offset) + 20px
    );
  }

  body.has-bottom-nav.page-order .app-main {
    padding-bottom: calc(
      var(--checkout-height) + var(--bottom-nav-height) + var(--checkout-gap) +
      var(--bottom-nav-offset) + 28px + env(safe-area-inset-bottom, 0px)
    );
  }

  .checkout-row {
    gap: 10px;
  }

  .checkout-submit {
    min-width: 112px;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .sum-line.sum-total {
    font-size: 1.05rem;
    padding: 10px 12px;
  }

  .order-actions {
    flex-direction: column;
  }

  .order-actions .btn,
  .order-actions form,
  .order-actions form .btn {
    width: 100%;
  }

  .order-actions form {
    display: block;
  }

  .admin-nav {
    display: none;
  }

  .table-wrap {
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
  }

  table.data th,
  table.data td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  .login-wrap {
    padding: 16px 12px 32px;
  }

  .login-brand img {
    width: 96px;
    height: 96px;
  }

  .login-brand h1 {
    font-size: 1.35rem;
  }

  input,
  select,
  textarea,
  .btn {
    font-size: 16px; /* verhindert iOS-Zoom */
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

.bon {
  max-width: 320px;
  margin: 0 auto;
  font-family: ui-monospace, monospace;
  color: #000;
  background: #fff;
  padding: 16px;
}

.bon h1 {
  font-family: inherit;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 8px;
}

.bon .line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.bon hr {
  border: 0;
  border-top: 1px dashed #000;
  margin: 10px 0;
}

.queue-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.queue-toolbar .btn-sound {
  min-height: 0;
  min-width: 0;
  height: auto;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-width: 1px;
  border-radius: 8px;
  line-height: 1.2;
}

.queue-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-success);
}

.queue-live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: live-pulse 1.6s ease-out infinite;
}

.queue-live.is-err {
  color: var(--color-destructive);
}

.queue-live.is-ok {
  color: var(--color-success);
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* Läufer: Fertig-Hinweis */
.laeufer-toast {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top, 0px));
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #166534;
  color: #fff;
  box-shadow: var(--shadow-md);
  animation: laeufer-toast-in 0.28s ease-out;
}

.laeufer-toast[hidden] {
  display: none !important;
}

.laeufer-toast strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.laeufer-toast span {
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 0.95;
}

.laeufer-toast .btn {
  align-self: flex-start;
  margin-top: 4px;
  min-height: 40px;
}

.laeufer-toast .btn-primary {
  background: #fff;
  color: #166534;
  border-color: #fff;
}

.laeufer-toast .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.page-order .laeufer-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(64px + env(safe-area-inset-top, 0px));
  margin: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

@keyframes laeufer-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .laeufer-toast {
    animation: none;
  }
}
