/* Beheer (keukenbrigade). Bouwt voort op /css/site.css. */

body.admin {
  background: #f4f7fc;
}
.admin-nav {
  background: var(--navy);
}
.admin-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-height: 56px;
}
.admin-nav a,
.admin-nav button {
  color: #dbe5fa;
  text-decoration: none;
  font: 600 0.95rem var(--font-body);
  padding: 10px 12px;
  border-radius: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}
.admin-nav a:hover,
.admin-nav button:hover {
  background: rgb(255 255 255 / 0.1);
  color: var(--white);
}
.admin-nav a.active {
  color: var(--white);
  box-shadow: inset 0 -3px 0 var(--lime);
}
.admin-nav .spacer {
  flex: 1;
}
.admin-main {
  padding: 22px 0 64px;
}
.admin-main h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  margin-bottom: 14px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar .grow {
  flex: 1;
}
.btn--sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 0.88rem var(--font-body);
  cursor: pointer;
  text-decoration: none;
}
.chip small {
  color: var(--muted);
  font-weight: 500;
}
.chip.active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}
.chip.active small {
  color: #dbe5fa;
}
.chip.past {
  opacity: 0.7;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--sky);
  color: var(--navy);
}
.badge--paid {
  background: #e3f2c1;
  color: #2f4a05;
}
.badge--unpaid {
  background: #fff1cc;
  color: #6b4a00;
}
.badge--pending {
  background: #e1e9fb;
  color: #1d3f8a;
}
.badge--cancelled,
.badge--expired {
  background: #eceff4;
  color: #4b5671;
}
.badge--refunded {
  background: #f1e6fb;
  color: #4b2a74;
}
.badge--warn {
  background: #fdecec;
  color: #7a1013;
}
.badge--draft {
  background: #eceff4;
  color: #4b5671;
}
.badge--published {
  background: #e3f2c1;
  color: #2f4a05;
}
.badge--closed {
  background: #fdecec;
  color: #7a1013;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}
.card h2 {
  font-size: 1.6rem;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  align-items: baseline;
  margin-bottom: 12px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.stats strong {
  color: var(--navy);
}

.slot-totals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.slot-total {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.slot-total strong {
  font: 400 1.35rem var(--font-head);
}
.slot-total .n {
  float: right;
  font-weight: 700;
}
.slot-total ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
table.data tr.muted td {
  color: #7a849b;
}
table.data .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.remarks {
  max-width: 260px;
  white-space: pre-wrap;
}
.remarks.has {
  color: #7a1013;
  font-weight: 600;
}

/* Responsieve tabel → kaarten op mobiel */
@media (max-width: 720px) {
  table.data.stack thead {
    display: none;
  }
  table.data.stack tr {
    display: block;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  table.data.stack td {
    display: flex;
    gap: 10px;
    border: 0;
    padding: 4px 0;
  }
  table.data.stack td::before {
    content: attr(data-label);
    flex: 0 0 96px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted);
  }
}

/* Formulieren */
.grid-2 {
  display: grid;
  gap: 0 16px;
}
@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.form-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px;
}
.form-section h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.allergen-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.allergen-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.allergen-picker input {
  position: absolute;
  opacity: 0;
}
.allergen-picker svg {
  width: 30px;
  height: 30px;
  padding: 4px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--blue);
  flex-shrink: 0;
}
.allergen-picker input:checked + label {
  border-color: var(--blue);
  background: var(--sky);
}
.allergen-picker input:checked + label svg {
  background: var(--blue);
  color: var(--white);
}
.allergen-picker input:focus-visible + label {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.repeat-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 10px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
}
.repeat-row .fields {
  display: grid;
  gap: 8px;
}
@media (min-width: 720px) {
  .repeat-row .fields.v {
    grid-template-columns: 1.2fr 2fr 0.8fr;
  }
  .repeat-row .fields.t {
    grid-template-columns: 1fr 1fr;
  }
}
.repeat-row .field {
  margin: 0;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--red);
  font-size: 1.2rem;
  cursor: pointer;
}

.photo-field {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.photo-preview {
  width: 200px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--sky) center / cover no-repeat;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 18px;
  position: sticky;
  bottom: 0;
  background: var(--white);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.swatches {
  display: flex;
  gap: 6px;
}
.swatches span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--line);
}
input[type='color'] {
  width: 100%;
  height: 48px;
  padding: 4px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  box-shadow: 0 20px 60px rgb(11 31 77 / 0.35);
}
dialog::backdrop {
  background: rgb(11 31 77 / 0.55);
}
dialog .dialog-body {
  padding: 20px;
}
dialog h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.login {
  max-width: 420px;
  margin: 48px auto;
  text-align: center;
}
.login img {
  width: 120px;
  margin: 0 auto 8px;
}
.login form {
  text-align: left;
}

.status-list {
  display: grid;
  gap: 10px;
}
.status-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: #c4cbd9;
}
.dot.ok {
  background: #6f9a12;
}
.dot.warn {
  background: #f29a2e;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 100;
  font-weight: 600;
  max-width: calc(100vw - 32px);
}
.toast.error {
  background: #9b1418;
}

.btn--delete {
  --btn-ink: var(--red);
  box-shadow: inset 0 0 0 2px var(--red);
}
