:root {
  --bg: #f4efe5;
  --panel: #fffdf8;
  --ink: #1f2330;
  --quote: #445569;
  --muted: #5d6578;
  --accent: #c2472d;
  --accent-2: #265d66;
  --line: #e8ded0;
  --danger: #b32929;
  --menu-list-offset: 210px;
  --main-list-offset: 185px;
  --backup-list-offset: 220px;
  --mobile-list-height: 56dvh;
}

* {
  box-sizing: border-box;
  position: relative;
  /* Zorgt ervoor dat content boven de overlay staat */
  z-index: 2;
  /* Plaatst content boven de overlay */
}

body {
  margin: 0;
  /* Verwijdert standaard marges */
  padding: 0;
  /* Verwijdert standaard padding */
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #fff5e8 0%, var(--bg) 55%);
  background-image: url('60601.jpg');
  /* Verwijst naar de afbeelding */
  background-size: cover;
  /* Zorgt ervoor dat de afbeelding de hele achtergrond bedekt */
  background-position: center;
  /* Centreert de afbeelding */
  background-repeat: no-repeat;
  /* Voorkomt herhaling van de afbeelding */
  position: relative;
  background-attachment: fixed;
  /* Voor het plaatsen van een overlay */
  min-height: 91dvh;
  /* background-color: rgba(255, 255, 255, 0.9); Maakt overliggende componenten semi-transparant voor betere leesbaarheid */
}

body::after {
  content: "";
  /* Pseudo-element voor de overlay */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.20);
  /* Donkere overlay voor betere leesbaarheid */
  z-index: 1;
  /* Zorgt ervoor dat de overlay boven de achtergrond staat */
  pointer-events: none;
  /* Zorgt ervoor dat de overlay geen interacties blokkeert */
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(4px);
  display: none;
}

.bg-shape-a {
  width: 260px;
  height: 260px;
  right: -80px;
  top: 90px;
  background: #ffd7a1;
  display: none;
}

.bg-shape-b {
  width: 220px;
  height: 220px;
  left: -60px;
  bottom: 80px;
  background: #b7dfe2;
  display: none;
}

.topbar {
  /* padding: 1.2rem 1rem 0.6rem; */
  padding: 1.2rem 1rem 0.1rem;
  max-width: 1365px;
  /* margin: 0 auto; */
  margin: 32px auto 0px auto;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 0.5em 1em;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.12rem, 1.92vw, 1.76rem);
  letter-spacing: 0.02em;
  min-width: max-content;
}

.topbar p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.header-quote {
  flex: 1 1 auto;
  text-align: right;
  font-size: clamp(1.12rem, 1.92vw, 1.76rem);
  font-style: italic;
  color: var(--quote);
  opacity: 0.99;
  line-height: 1.3;
  word-wrap: break-word;
  margin: 0;

  /* max-width: 420px; Zelfde breedte als .panel */
  margin-left: auto;
  /* Rechts uitlijnen */
  position: relative;
  right: -25px;
  /* Corrigeer de verschuiving zodat het vak exact rechts uitlijnt */
}

.status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 0.25rem 0rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #5d6578;
  background: rgba(244, 239, 229, 0.98);
  border-bottom: 2px solid #e8ded0;
  backdrop-filter: blur(4px);
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-banner.error {
  color: #b32929;
  background: rgba(255, 232, 232, 0.98);
  border-bottom-color: #e8ded0;
}

.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  margin-top: 0rem;
  display: grid;
  grid-template-columns: 340px 1fr 420px;
  gap: 1rem;
}

.panel {
  /* background: color-mix(in srgb, var(--panel) 90%, white); */
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(38, 52, 64, 0.08);
  background-color: rgba(255, 255, 255, 0.95);
  /* Maakt de panel minimaal transparant */
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h2 {
  margin: 0.2rem 0 0.7rem;
  font-size: 1.1rem;
}

.row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.row.end {
  justify-content: flex-end;
  margin-top: 0.8rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}

button {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

button.ghost {
  background: #fff;
  color: var(--accent-2);
  border: 1px solid #b8d0d5;
}

button.danger {
  color: var(--danger);
  border-color: #e3bcbc;
}

.status {
  margin: 0.25rem 0 0;
  color: var(--muted);
  min-height: 1.2rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.filter-chip {
  background: #fff;
  color: var(--accent-2);
  border: 1px solid #c8dde1;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.filter-chip.active {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

.badge {
  background: #1e525a;
  color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
}

.menu-items {
  max-height: calc(91dvh - var(--menu-list-offset));
  overflow: auto;
  display: grid;
  gap: 0.4rem;
  padding-right: 0.2rem;
}

.order-items {
  max-height: calc(91dvh - var(--main-list-offset));
  overflow: auto;
  display: grid;
  gap: 0.55rem;
  padding-right: 0.2rem;
}

.menu-item,
.order-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.menu-name,
.order-name {
  margin: 0;
  font-size: 1rem;
}

.menu-desc,
.order-note {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.order-note-strong {
  font-weight: 700;
  color: #193943;
}

.menu-cat,
.order-sub {
  color: var(--muted);
}

.menu-options {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.option-group {
  display: grid;
  gap: 0.2rem;
}

.option-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.option-select {
  max-width: 240px;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.add-btn {
  background: var(--accent-2);
  padding-inline: 0.65rem;
}

.btn-danger {
  background: var(--danger);
}

qty-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.minus-btn,
.plus-btn {
  min-width: 30px;
  padding: 0.35rem;
}

.remove-btn {
  background: #fff;
  color: var(--danger);
  border: 1px solid #f0d3d3;
  padding: 0.35rem 0.45rem;
}

.order-meta {
  margin-bottom: 0.8rem;
  color: var(--muted);
}

.order-summary {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.summary-name {
  margin: 0;
  font-size: 0.98rem;
}

.summary-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.aggregate-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.7rem;
}

.aggregate-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.aggregate-breakdown {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.35rem;
}

.aggregate-breakdown-line {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-topbar {
  display: grid;
  gap: 0.35rem;
}

.admin-links {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.admin-link {
  color: var(--accent-2);
  text-decoration: none;
  border: 1px solid #b8d0d5;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: #fff;
}

.admin-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
  margin-top: 3rem;
  display: grid;
  gap: 1rem;
}

.admin-actions {
  flex-wrap: wrap;
}

.admin-meta {
  margin: 0.2rem 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.admin-note {
  margin: 0.6rem 0 0.2rem;
  padding: 0.45rem 0.7rem;
  border-left: 3px solid var(--accent, #c2472d);
  background: color-mix(in srgb, var(--accent, #c2472d) 8%, transparent);
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

.betaal-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.betaal-form input {
  flex: 1 1 160px;
  min-width: 0;
}

.betaal-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.betaal-empty {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

.betaal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  background: #fff;
}

.betaal-item.betaal-actief {
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 6%, #fff);
}

.betaal-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.88rem;
}

.betaal-bic {
  color: var(--muted);
  font-size: 0.8rem;
}

.betaal-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.betaal-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.betaal-delete-btn {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-2);
}

.backup-list {
  display: grid;
  gap: 0.6rem;
  max-height: calc(100dvh - var(--backup-list-offset));
  overflow: auto;
  padding-right: 0.2rem;
}

.backup-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.backup-name {
  margin: 0;
  font-size: 1rem;
}

.backup-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.backup-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 740px) {
  body {
    max-height: 100dvh;
    background-size: cover;
    background-position: center center;    background-attachment: fixed;  }

  .topbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .topbar-left {
    width: 100%;
  }

  .header-quote {
    flex: none;
    text-align: left;
    margin-left: 0;
    right: auto;
    order: 3;
    display: block;
  }

  .backup-item {
    flex-direction: column;
  }

  .backup-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .menu-items,
  .order-items {
    max-height: var(--mobile-list-height);
  }
}