﻿:root {
  --bg: linear-gradient(180deg, #ffffff 0%, #f5f6f8 100%);
  --text: #111111;
  --text-light: #666666;
  --accent: #000000;
  --danger: #e74c3c;
  --border: #e5e5e5;
  --muted: #f6f6f6;
  --radius: 12px;
  --transition: 0.25s ease;
  --font-main: 'Inter', 'SF Pro Display', Arial, sans-serif;
  --panel-dark: rgba(10, 10, 20, 0.85);
  --panel-border-dark: rgba(255, 255, 255, 0.2);
  --panel-shadow-dark: 0 24px 70px rgba(0, 0, 0, 0.55);
  --button-gradient: linear-gradient(135deg, rgba(139, 229, 255, 0.25), rgba(255, 255, 255, 0.12));
  --input-border-dark: rgba(255, 255, 255, 0.15);
  --input-bg-dark: rgba(255, 255, 255, 0.07);
  --placeholder-dark: rgba(255, 255, 255, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100vh;
  background: var(--bg);
  background-attachment: fixed;
  background-size: cover;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
}

/* Mobile-optimized width for homepage */
.mobile-shell {
  max-width: 90vw;
  margin: 0 auto;
  padding: 14px;
}

/* Admin panel - wider layout for tables */
body:has(header h1:contains("Kantinen-Admin")),
body > .admin-tabs {
  max-width: 1400px !important;
}

@media (min-width: 768px) {
  body { max-width: 95vw; padding: 24px; }
  .mobile-shell { max-width: 95vw; padding: 18px; }
}

@media (min-width: 1024px) {
  body { max-width: 1200px; padding: 28px; }
  .mobile-shell { max-width: 1000px; padding: 24px; }
  body > .admin-tabs { max-width: 1400px; }
}

h1 {
  font-size: 46px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px 0;
}

h2, h3 {
  font-weight: 300;
  color: var(--text-light);
  margin: 0 0 15px 0;
}

p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-light);
  margin: 0;
}

a { color: var(--text); text-decoration: none; }

button, .btn, .btn-link, .btn-primary, .btn-danger {
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: var(--muted);
  color: var(--text);
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #000000d9; }

.btn-light {
  background: #f8f8f8;
  color: var(--text);
  border: 1px solid #e6e6e6;
}
.btn-light:hover { background: #e9e9e9; }

.btn-link {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
}
.btn-link:hover { background: var(--muted); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }

.cta-animate {
  position: relative;
  overflow: hidden;
}
.btn-flash {
  animation: btnFlash 0.45s ease;
}
@keyframes btnFlash {
  0% { box-shadow: 0 0 0 0 rgba(0,0,0,0.12); transform: translateY(0); }
  60% { box-shadow: 0 12px 30px rgba(0,0,0,0.18); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); transform: translateY(0); }
}

/* Modern form controls */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e2e2;
  background: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-family: var(--font-main);
  color: #222;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
input::placeholder,
textarea::placeholder {
  color: #9aa0ad;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  background: #fff;
}
textarea { resize: vertical; }

.card {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(210, 210, 210, 0.45);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@media (min-width: 480px) {
  .card {
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.4rem;
  }
}

@media (min-width: 768px) {
  .card {
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
}

.footer-links .btn-link {
  min-width: 160px;
  text-align: center;
}

/* Light mode glass effect for main surfaces */
:root:not(.kantine-mode) .card,
:root:not(.kantine-mode) .panel,
:root:not(.kantine-mode) .content-box,
:root:not(.kantine-mode) .announcement-card,
:root:not(.kantine-mode) .stat-card,
:root:not(.kantine-mode) .tab,
:root:not(.kantine-mode) .pill-tab {
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(210, 210, 210, 0.45);
  color: var(--text);
}

.compact-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.app-logo.small-logo {
  width: 90px;
  height: auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--text-light);
  margin: 0 0 0.1rem 0;
}

.tab-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.pill-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.pill-tab.active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  border-color: var(--text);
}
.pill-tab.flash-blue { animation: tabFlashBlue 0.6s ease; }
.pill-tab.flash-money { animation: tabFlashMoney 0.6s ease; }
.pill-tab.flash-yellow { animation: tabFlashYellow 0.6s ease; }

@keyframes tabFlashBlue {
  0% { box-shadow: 0 0 0 0 rgba(0,120,255,0.4); }
  100% { box-shadow: 0 0 0 14px rgba(0,120,255,0); }
}
@keyframes tabFlashMoney {
  0% { box-shadow: 0 0 0 0 rgba(0,200,120,0.4), 0 0 0 0 rgba(255,64,64,0.35); }
  100% { box-shadow: 0 0 0 14px rgba(0,200,120,0), 0 0 0 18px rgba(255,64,64,0); }
}
@keyframes tabFlashYellow {
  0% { box-shadow: 0 0 0 0 rgba(255,190,0,0.4); }
  100% { box-shadow: 0 0 0 14px rgba(255,190,0,0); }
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.sticky-card { position: sticky; top: 10px; z-index: 5; }

.stacked-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.product-booking {
  padding: 1rem 1rem 0.9rem;
}
.product-booking h2 {
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
}
.product-booking .stacked-form {
  gap: 0.6rem;
}
.product-booking .input-block span {
  font-size: 0.95rem;
}
.product-booking .input-block select,
.product-booking .input-block input {
  padding: 10px 12px;
}
.product-booking .btn-primary {
  padding: 12px;
  font-weight: 700;
}
.flex-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: flex-end;
}
.flex-form .form-item {
  flex: 1 1 180px;
  min-width: 180px;
}

.card-tight { padding: 1rem; }
.ds-section .card-tight { padding: 1.4rem; }

.btn-compact {
  padding: 10px 14px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.ds-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.ds-headlines h2 { margin: 0 0 4px 0; }
.ds-headlines .hint { margin: 0; color: var(--text-light); }

.ds-switch-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.ds-switch-copy { display: flex; flex-direction: column; gap: 2px; }
.ds-switch-copy .switch-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}
.ds-switch-box .hint { margin: 0; color: var(--text-light); }
.ds-switch-box button { white-space: nowrap; padding: 8px 10px; font-size: 0.9rem; }
.kantine-mode .ds-switch-box {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
@media (max-width: 720px) {
  .ds-switch-box {
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.2rem 0 1.6rem;
  align-items: stretch;
}

.ds-grid.ds-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .ds-grid.ds-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ds-grid.ds-grid-3 { grid-template-columns: 1fr; }
}

.ds-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  align-content: start;
  min-height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ds-box-grid { height: 100%; }

.ds-field { display: flex; flex-direction: column; gap: 0.5rem; }
.ds-section label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.ds-box select,
.ds-box input {
  padding: 11px 14px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.ds-section input[type="text"],
.ds-section select {
  height: 46px;
}

.ds-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.ds-section .btn,
.ds-section .btn-primary,
.ds-section .btn-danger,
.ds-section .btn-link,
.ds-section .btn-compact {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  min-height: 32px;
  font-weight: 600;
  line-height: 1;
}
/* kompakte Variante für kleine Aktionsbuttons (Wechseln / Speichern / Anlegen) */
.ds-section .btn-compact { padding: 5px 9px; font-size: 11px; min-height: 28px; }

/* Stabilisiere Tabellenzeilen: einheitliche Vertikal-Ausrichtung und feste Höhen für Inputs/Buttons */
.ds-table th,
.ds-table td { vertical-align: middle; }
.ds-table td input,
.ds-table td button,
.ds-table td .budget-input { height: 36px; box-sizing: border-box; }
.ds-table tbody tr { transition: background 0.12s ease; }

/* Verhindere Layout-Verschiebungen durch unterschiedliche Box-Sizing */
.ds-table td input,
.ds-table td button,
.ds-table td select { box-sizing: border-box; }

/* Halte Tabellenzeilen übersichtlich: leichte Farbe, klarer Abstand */
.ds-table tbody tr:hover { background: #fbfcfd; }

.hint-box { 
  align-content: center;
  border: 1px solid #e8f4f8;
  background: #f0f9fc;
  color: #0066cc;
}

.hint-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ds-table-shell {
  margin-top: 1.1rem;
  overflow-x: auto;
  border: 1px solid #eef0f2;
  border-radius: 12px;
  background: #fff;
  padding: 0.35rem;
}
.kantine-mode .ds-table-shell {
  background: rgba(10, 10, 20, 0.6);
  border-color: rgba(255, 255, 255, 0.18);
}

.ds-table { 
  table-layout: auto;
  margin-top: 0;
  border-collapse: collapse;
  width: 100%;
  min-width: 820px;
}

.ds-table th,
.ds-table td {
  padding: 12px 14px;
  text-align: left;
}

.ds-table th {
  background: #f8f9fa;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.ds-table td {
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-light);
  font-size: 0.93rem;
}

.ds-table tbody tr:hover {
  background: #fafbfc;
}

.ds-table .col-name { width: 26%; min-width: 200px; }
.ds-table .col-code { width: 12%; min-width: 110px; white-space: nowrap; }
.ds-table .col-budget { width: 24%; min-width: 220px; }
.ds-table .col-admin,
.ds-table .col-default-user { width: 12%; min-width: 140px; }
.ds-table .col-switch,
.ds-table .col-status,
.ds-table .col-action { width: 10%; min-width: 120px; white-space: nowrap; }

.ds-table td form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ds-table td button { white-space: nowrap; }

.ds-table tbody tr + tr td { border-top: 1px solid #f0f0f0; }

.budget-columns.tight {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 0.65rem;
}

.budget-form-compact .budget-input {
  padding: 9px 11px;
  font-size: 0.9rem;
}

.budget-form-compact .budget-actions {
  margin-top: 0.6rem;
}

.ds-budget-form { gap: 0.8rem; }
.ds-budget-columns {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}
.ds-budget-tile {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ds-budget-tile .budget-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.ds-budget-tile .budget-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.2rem 0 0.3rem;
}

.ds-section .budget-input {
  width: 100%;
  max-width: none;
  padding: 9px 11px;
  font-size: 0.9rem;
}
.ds-section .budget-actions {
  margin-top: 0;
  justify-content: flex-start;
  gap: 0.5rem;
}

.input-block { display: flex; flex-direction: column; gap: 0.35rem; }
.input-block span {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.input-block input,
.input-block select,
.input-block textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e2e2;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}
.input-block textarea { resize: vertical; }
.input-block.half { max-width: 240px; }
.full-width { width: 100%; }
.tab-panel .card:not(:first-child) { margin-top: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem 0; }
.chip {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.chip.negative { color: var(--danger); }
.chip.positive { color: #0f9d58; }

.balance-list { display: flex; flex-direction: column; gap: 0.6rem; }
.balance-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.balance-name { margin: 0; font-weight: 600; }
.balance-amount { font-weight: 700; color: var(--text); }
.balance-amount.negative { color: var(--danger); }
.balance-amount.positive { color: #0f9d58; }
.btn-link.slim { padding: 8px 12px; }
.balance-row .btn-link {
  background: #ffd54f;
  border-color: #f4c537;
  color: #111;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.balance-row .btn-link:hover {
  background: #ffc930;
  border-color: #f4c537;
}

.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
}
.pill-check input { width: 18px; height: 18px; }

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.toast.success { color: #0f9d58; }
.toast.success::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34,197,94,0.4), rgba(34,197,94,0.1));
  transform: translateX(-120%);
  animation: toastSweep 0.7s ease forwards;
}
.toast-content {
  position: relative;
  z-index: 1;
}
.star-pop {
  position: fixed;
  font-size: 18px;
  pointer-events: none;
  animation: starPop 1.9s cubic-bezier(.2,.8,.2,1) forwards;
  z-index: 1400;
}
@keyframes toastSweep {
  to { transform: translateX(120%); }
}
@keyframes starPop {
  0% { opacity: 1; transform: translateY(0) scale(0.95); }
  60% { opacity: 0.9; transform: translateY(-12px) scale(1.02); }
  100% { opacity: 0; transform: translateY(-24px) scale(1.05); }
}

.card-header-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }

.timeline { display: flex; flex-direction: column; gap: 0.75rem; }
.timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-title { margin: 0; font-weight: 600; }
.badge-amount {
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  background: var(--muted);
  color: var(--text);
  font-weight: 700;
}
.badge-amount.paid { background: #f0f0f0; color: var(--text); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}
th {
  background: #fafafa;
  font-weight: 700;
  color: var(--text);
}
tbody tr:nth-child(even) { background: #fbfbfb; }

.table-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0 0.6rem;
  flex-wrap: wrap;
}
.pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pager-info { font-weight: 600; color: var(--text); }
.pager-form select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
.disabled-link {
  pointer-events: none;
  opacity: 0.45;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f1f1;
  font-size: 14px;
}
.admin-table th {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text);
}
.admin-table tbody tr:nth-child(even) { background: #fbfbfb; }

.user-table-shell { margin-top: 1rem; }
.user-table { table-layout: fixed; }
.user-table th,
.user-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.user-table .col-user-name { width: 26%; }
.user-table .col-user-username { width: 18%; }
.user-table .col-user-email { width: 24%; }
.user-table .col-user-role { width: 16%; }
.user-table .col-user-actions { width: 16%; }
.user-row { height: 100%; }
.user-main { display: flex; flex-direction: column; gap: 4px; }
.user-name { font-weight: 700; color: var(--text); }
.user-meta { font-size: 0.85rem; color: var(--text-light); }
.user-mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; color: #444; }
.user-muted { color: var(--text-light); }
.user-role-form { display: flex; align-items: center; }
.user-role-select {
  width: 100%;
  min-width: 160px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
}
.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  align-items: center;
}
.btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--muted); }
.user-delete-form .btn-danger {
  padding: 9px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.action-grid,
.ann-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}
.form-actions { display: flex; gap: 0.5rem; align-items: center; }
.inline-form { display: inline; }
.ann-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) {
  .ann-grid .span-2 { grid-column: span 1; }
}

.budget-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.budget-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.budget-column {
  border: 1px solid #f1f1f1;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.02);
}
.budget-label {
  margin: 0 0 4px 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #6b7280;
  text-transform: uppercase;
}
.budget-amount {
  margin: 0 0 8px 0;
  font-weight: 800;
  color: var(--text);
}
.budget-input { max-width: 180px; }
.budget-actions { display: flex; gap: 8px; }

.product-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}
.product-input {
  max-width: 90px;
  padding: 10px 12px;
  text-align: right;
}
.text-right { text-align: right; }
.product-table td:first-child input,
.product-table th:first-child input {
  text-align: left;
}
.product-table tr.low-stock-row {
  background: rgba(255, 99, 71, 0.08);
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.product-actions form {
  display: inline-flex;
}
.product-actions .btn-danger.btn-xs {
  padding: 8px 10px;
  font-size: 13px;
}
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  background: #e5e7eb;
  color: #374151;
}
.status-badge.active {
  background: #e8f7ec;
  color: #0f9d58;
}
.status-badge.inactive {
  background: #f3f4f6;
  color: #6b7280;
}
.status-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid #ddd;
}
.status-toggle.active {
  background: #e6f9ec;
  color: #0f9d58;
  border-color: #0f9d58;
}
.status-toggle.inactive {
  background: #fdeaea;
  color: #e74c3c;
  border-color: #e74c3c;
}
.product-save-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.global-save {
  min-width: 220px;
}

.btn-link {
  display: inline-block;
}

.tab {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.tab:hover { background: var(--muted); }
.tab-active { background: var(--text); color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Admin tabs */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.admin-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e4e4e4;
  background: #fafafa;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}
.admin-tab:hover { background: #f0f0f0; }
.admin-tab.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Aktionen & Anzeigen */
.aktionen-grid.actions-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1rem;
  align-items: flex-start;
}
.actions-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#section-aktionen .action-form { width: 100%; }
#section-aktionen .field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
}
#section-aktionen .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#section-aktionen .field-wide { grid-column: span 2; }
@media (max-width: 640px) {
  #section-aktionen .field-wide { grid-column: 1; }
}
#section-aktionen .field label {
  font-size: 0.9rem;
  color: var(--text-light);
  letter-spacing: 0.01em;
}
#section-aktionen .field input,
#section-aktionen .field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}
#section-aktionen .field input[type="color"] {
  padding: 0 6px;
}
#section-aktionen .form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}
#section-aktionen .form-actions-tight { margin-top: 0.25rem; }
.aktion-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.3rem;
}
.aktion-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem 1rem;
  align-items: flex-start;
}
.aktion-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aktion-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.aktion-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
.aktion-sub,
.aktion-dates,
.aktion-note {
  margin: 0;
  color: var(--text-light);
}
.aktion-note { color: var(--text); }
.aktion-chips,
.aktion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.aktion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7f7f7;
  color: var(--text-light);
  font-size: 12px;
}
.aktion-chip.subtle {
  background: #f1f1f1;
  color: #333;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot-color, #ddd);
  display: inline-block;
  border: 1px solid #e5e5e5;
}
.aktion-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}
.aktion-actions form { display: inline-flex; }
.aktion-actions .btn-link { padding: 4px 0; }
.aktion-actions .btn-danger { padding: 8px 12px; }
.aktion-actions-tight {
  flex-direction: column;
  gap: 0.3rem;
}
.announcement-style-form { margin-top: 0.25rem; }
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem 0.75rem;
}
.style-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-light);
}
.style-grid select,
.style-grid input {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0 10px;
  background: #fff;
  font-size: 13px;
}
.style-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}
#section-aktionen .muted {
  color: var(--text-light);
  margin: 0;
}

@media (max-width: 720px) {
  .aktionen-grid.actions-layout { grid-template-columns: 1fr; }
  .aktion-item { grid-template-columns: 1fr; }
  .aktion-actions { align-items: flex-start; }
}

.theme-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}

.logout-fab {
  position: fixed;
  bottom: 16px;
  right: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: var(--transition);
}
.logout-fab:hover {
  background: var(--muted);
}

.emoji-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.emoji {
  position: absolute;
  font-size: 22px;
  opacity: 0.5;
  animation: float-down linear infinite;
  pointer-events: none;
}
@keyframes float-down {
  from { transform: translateY(-10vh); opacity: 0; }
  to { transform: translateY(110vh); opacity: 0.8; }
}

.kantine-mode body,
.kantine-mode {
  background: linear-gradient(180deg, #050826 0%, #000000 100%);
  background-attachment: fixed;
  background-size: cover;
  color: #f2f5ff;
}

.kantine-mode h1,
.kantine-mode h2,
.kantine-mode h3,
.kantine-mode h4,
.kantine-mode h5,
.kantine-mode h6,
.kantine-mode p,
.kantine-mode li,
.kantine-mode label,
.kantine-mode span,
.kantine-mode .eyebrow,
.kantine-mode .hero-title,
.kantine-mode .hero-subtitle,
.kantine-mode .announcement-title,
.kantine-mode .announcement-text,
.kantine-mode .balance-name,
.kantine-mode .balance-amount,
.kantine-mode .stat-label,
.kantine-mode .stat-value,
.kantine-mode .tab,
.kantine-mode .pill-tab,
.kantine-mode .admin-tab,
.kantine-mode .toast-message,
.kantine-mode .toast {
  color: #f2f5ff !important;
}

.kantine-mode .card,
.kantine-mode .panel,
.kantine-mode .content-box,
.kantine-mode .announcement-card,
.kantine-mode .stat-card,
.kantine-mode .ds-box,
.kantine-mode .ds-table-shell,
.kantine-mode .user-table-shell,
.kantine-mode .admin-table,
.kantine-mode .pay-info,
.kantine-mode .pay-qr-tile,
.kantine-mode .toast,
.kantine-mode .hero {
  background: rgba(16, 19, 45, 0.92);
  border: 1px solid var(--panel-border-dark);
  box-shadow: var(--panel-shadow-dark);
  border-radius: 20px;
  color: #f2f5ff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.kantine-mode .tab,
.kantine-mode .pill-tab,
.kantine-mode .admin-tab,
.kantine-mode .badge-amount,
.kantine-mode .promo-chip,
.kantine-mode .chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.kantine-mode .pill-tab {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.kantine-mode .pill-tab.active,
.kantine-mode .tab-active,
.kantine-mode .admin-tab.active {
  background: #ffffff;
  color: #050826;
  border-color: #ffffff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.kantine-mode .btn,
.kantine-mode .btn-primary,
.kantine-mode .btn-link,
.kantine-mode .btn-light,
.kantine-mode .btn-ghost,
.kantine-mode .btn-danger,
.kantine-mode .pay-button {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--button-gradient);
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kantine-mode .btn-link {
  background: rgba(255, 255, 255, 0.08);
  border-style: solid;
}

.kantine-mode .btn:hover,
.kantine-mode .btn-primary:hover,
.kantine-mode .btn-link:hover,
.kantine-mode .btn-light:hover,
.kantine-mode .btn-ghost:hover,
.kantine-mode .btn-danger:hover,
.kantine-mode .pay-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(135deg, rgba(139, 229, 255, 0.35), rgba(255, 255, 255, 0.2));
}

.kantine-mode label {
  color: #f2f5ff;
  font-weight: 600;
}

.kantine-mode input::placeholder,
.kantine-mode textarea::placeholder {
  color: var(--placeholder-dark);
}

.kantine-mode input,
.kantine-mode textarea,
.kantine-mode select {
  background: var(--input-bg-dark);
  border: 1px solid var(--input-border-dark);
  border-radius: 14px;
  color: #ffffff;
  font-family: var(--font-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.kantine-mode input:focus,
.kantine-mode textarea:focus,
.kantine-mode select:focus {
  border-color: rgba(139, 229, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(139, 229, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.kantine-mode table th,
.kantine-mode table td {
  border-color: rgba(255, 255, 255, 0.15);
}

.kantine-mode table th {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.kantine-mode table td {
  color: #ffffff;
}

.kantine-mode select {
  background-color: var(--input-bg-dark);
  color: #ffffff;
}

.kantine-mode select option {
  background-color: #141730;
  color: #ffffff;
}

.kantine-mode select option:hover {
  background-color: rgba(139, 229, 255, 0.12);
}

.kantine-mode select option:checked {
  background-color: rgba(139, 229, 255, 0.2);
}

.kantine-mode .status-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e9f5;
  border-color: rgba(255, 255, 255, 0.2);
}

.kantine-mode .status-toggle.active {
  background: rgba(0, 255, 149, 0.14);
  color: #5cf0b3;
  border-color: rgba(0, 255, 149, 0.4);
}

.kantine-mode .status-toggle.inactive {
  background: rgba(255, 92, 92, 0.15);
  color: #ffb3b3;
  border-color: rgba(255, 92, 92, 0.4);
}

.kantine-mode .emoji {
  filter: drop-shadow(0 8px 22px rgba(255, 255, 255, 0.45));
  opacity: 0.75;
}

.kantine-mode .toast {
  background: linear-gradient(135deg, rgba(5, 8, 38, 0.96), rgba(10, 12, 48, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.kantine-mode .pin-overlay.show {
  background: rgba(0, 0, 0, 0.65);
}

.kantine-mode .pin-modal {
  background: rgba(12, 15, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--panel-shadow-dark);
  border-radius: 18px;
  padding: 1.6rem;
  color: #fff;
}

.kantine-mode .pin-modal input {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.kantine-mode .theme-toggle,
.kantine-mode .logout-fab {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.tab-burst-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.tab-burst-emoji {
  position: absolute;
  font-size: 22px;
  opacity: 0.9;
  animation: tabBurst 1.1s ease-out forwards;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}
@keyframes tabBurst {
  0% { transform: translateY(0) scale(0.9); opacity: 1; }
  100% { transform: translateY(-50px) scale(1.3); opacity: 0; }
}
.kantine-mode .theme-toggle,
.kantine-mode .logout-fab {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.pay-card { overflow: hidden; }
.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.pay-info {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
}
.pay-amount {
  margin: 0.1rem 0 0.5rem;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
}
.pay-meta p { margin: 0.15rem 0; }
.pay-qr-tile {
  padding: 0.8rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.pay-qr-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}
.pay-qr {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.pay-action-row {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
  position: relative;
}
.pay-button {
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.pay-button.pay-pulse {
  animation: payPulse 0.6s ease-in-out 1;
}
.pay-emoji-burst {
  position: absolute;
  inset: -10px 0 auto 0;
  height: 64px;
  pointer-events: none;
}
.pay-emoji {
  position: absolute;
  bottom: 0;
  font-size: 18px;
  animation: payFloat 1.1s ease-out forwards;
}
@keyframes payPulse {
  0% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(0,0,0,0.08); }
  50% { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.16); }
  100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(0,0,0,0.08); }
}
@keyframes payFloat {
  0% { opacity: 1; transform: translateY(0) scale(0.9); }
  100% { opacity: 0; transform: translateY(-28px) scale(1.15); }
}

.emoji-plus {
  position: absolute;
  font-size: 22px;
  font-weight: 600;
  pointer-events: none;
  animation: floatUp 0.9s ease-out forwards;
  color: #fff;
  z-index: 5;
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

.announcement-board { background: #fff; border: 1px solid var(--border); }
.announcement-list { display: grid; gap: 0.6rem; }
.announcement-card {
  position: relative;
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(210, 210, 210, 0.5);
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.announcement-card.size-compact { padding: 0.55rem 0.7rem; }
.announcement-card.size-large { padding: 1rem 1.2rem; }
.announcement-card.font-normal { --ann-font-size: 1rem; }
.announcement-card.font-large { --ann-font-size: 1.1rem; }
.announcement-card.font-xl { --ann-font-size: 1.25rem; }
.announcement-card.banner-animated {
  background: linear-gradient(120deg, rgba(255, 235, 235, 0.9), rgba(255, 248, 240, 0.9), rgba(255, 235, 235, 0.9));
  background-size: 220% 220%;
  animation: bannerPulse 12s ease infinite;
}
.announcement-title { margin: 0 0 4px 0; font-weight: 700; color: inherit; }
.announcement-text { margin: 0; color: inherit; font-size: var(--ann-font-size, 1rem); }
.announcement-emoji-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.announcement-card p { position: relative; z-index: 2; }

@keyframes bannerPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.announcement-emoji {
  position: absolute;
  opacity: 0;
  color: inherit;
  animation: announcementFloat 6s linear forwards;
}

@keyframes announcementFloat {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(1); }
  15% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(var(--dx, 24px), -40px, 0) scale(1.4); }
}

.promo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}
.promo-chip {
  background: var(--muted);
  color: var(--text);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.stock-alert {
  color: #e67e22;
  font-weight: 800;
  margin-left: 6px;
}

.stock-low {
  color: var(--danger);
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: #fff;
}

.stat-label {
  margin: 0 0 6px 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.stat-value {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.top-consumers {
  margin-top: 1rem;
}

.top-consumers .big-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.top-consumers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.top-consumer-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.top-rank {
  font-size: 1.6rem;
}

.top-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-name {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.top-amount {
  margin: 0;
  font-weight: 800;
  color: var(--text);
}

.tab-alert {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1.4;
}

.hero {
  text-align: center;
  padding: 40px 12px 30px;
  position: relative;
  overflow: hidden;
}
.hero-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-logo {
  max-width: 100%;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .hero-logo {
    max-width: 100%;
    margin-bottom: 20px;
  }
}

/* Admin panel logo - begrenzt */
.admin-header .app-logo {
  max-width: 340px;
}

@media (min-width: 768px) {
  .admin-header .app-logo {
    max-width: 360px;
  }
}

@media (min-width: 1024px) {
  .admin-header .app-logo {
    max-width: 380px;
  }
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}
.hero-subtitle {
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 14px;
}
.hero-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 480px) {
  .hero {
    padding: 50px 16px 35px;
  }
  .hero-logo {
    max-width: 300px;
  }
  .hero-title {
    font-size: 38px;
  }
  .hero-tabs {
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 60px 20px 40px;
  }
  .hero-logo {
    max-width: 340px;
    margin-bottom: 20px;
  }
  .hero-title {
    font-size: 46px;
  }
  .hero-subtitle {
    margin-bottom: 28px;
    font-size: 16px;
  }
  .hero-tabs {
    gap: 16px;
  }
}

.pin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  z-index: 998;
}

.pin-overlay.show { display: block; }

.pin-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  width: min(380px, 92vw);
  z-index: 999;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pin-modal.show { display: block; }

.pin-modal h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
}

.pin-modal p {
  margin: 0 0 12px 0;
  color: var(--text-light);
}

.pin-modal input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 12px;
}

.pin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pin-actions .pin-cancel,
.pin-actions .pin-confirm {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.pin-actions .pin-cancel {
  background: var(--muted);
  color: var(--text);
}

.pin-actions .pin-confirm {
  background: var(--danger);
  color: #fff;
}

.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1200;
  pointer-events: none;
}

.toast {
  position: relative;
  min-width: 230px;
  max-width: 320px;
  background: #fff8f8;
  border: 1px solid var(--danger);
  border-radius: 12px;
  padding: 12px 14px 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-10px);
}

.toast-bar {
  position: absolute;
  top: 0;
  left: -40%;
  height: 3px;
  width: 70%;
  background: var(--danger);
  animation: flyBar 1.1s ease-out forwards;
}

.toast.success {
  background: #f2fbf5;
  border-color: #0f9d58;
}

.toast.success .toast-message { color: #0f9d58; }
.toast.success .toast-bar { background: #0f9d58; }
.toast.success .toast-emoji { color: #0f9d58; }

@keyframes flyBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}

.toast-message {
  margin: 0;
  font-weight: 800;
  color: var(--danger);
  position: relative;
}

.toast-emoji-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.toast-emoji {
  position: absolute;
  color: var(--danger);
  opacity: 0;
  animation: floatFade 2s ease-out forwards;
}

@keyframes floatFade {
  0% { transform: translateY(0) scale(1); opacity: 0.95; }
  100% { transform: translateY(-12px) scale(1.4); opacity: 0; }
}

.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.archive-panel {
  display: none;
  margin-top: 0.6rem;
}

.archive-panel.show {
  display: block;
}

.feedback-actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}

.announcement-style-form .style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}

.announcement-style-form label {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.announcement-style-form select,
.announcement-style-form input[type="color"] {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.style-actions {
  margin-top: 6px;
  text-align: right;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.ann-preview {
  position: relative;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  background: linear-gradient(120deg, #fdf3e7, #e8f1ff);
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
}
.ann-preview.small { min-height: 80px; margin-top: 0.6rem; }

@media (min-width: 720px) {
  .stacked-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stacked-form .full-width { grid-column: span 2; }
  .tab-bar { width: auto; align-self: flex-end; }
  .compact-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .balance-row { grid-template-columns: 1fr auto auto; }
}

@media (max-width: 640px) {
  .product-booking { padding: 0.9rem 0.85rem; }
  .product-booking h2 { font-size: 1.2rem; }
  .product-booking .btn-primary { font-size: 1rem; }
}
