/* Weektafel — visuele bron: Claude-design "Weektafel.dc.html". */

:root {
  --paper: #f5f2ec;
  --surface: #fbf9f5;
  --surface-sunken: #efeae1;
  --surface-hover: #f3efe7;
  --field: #f7f4ee;

  --line: #e2dacd;
  --line-soft: #e4ddd1;
  --line-faint: #ede6da;
  --line-fainter: #f1ebe1;
  --line-button: #dcd3c4;

  --ink: #26231f;
  --ink-2: #4c463d;
  --ink-3: #6b6459;
  --ink-4: #8c8577;
  --ink-5: #948c7f;
  --ink-6: #a79e90;
  --ink-7: #c2b9a9;

  --clay: #a4633f;
  --clay-ink: #7a4726;
  --clay-soft: #f5e7dd;
  --clay-panel: #f8ede4;
  --clay-line: #edd6c3;
  --clay-button: #f3e5d9;

  --moss: #5a6b54;
  --moss-deep: #3c4a38;
  --moss-deeper: #2f3a2c;
  --moss-soft: #edf0e8;
  --moss-line: #c7d0c0;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shell: min(1120px, 100%);
  --gutter: clamp(16px, 3vw, 36px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a {
  color: var(--moss);
  text-decoration: none;
  border-bottom: 1px solid rgb(90 107 84 / 35%);
}

a:hover {
  color: var(--moss-deep);
  border-bottom-color: var(--moss-deep);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 2px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ---------------------------------------------------------------- layout */

.layout {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--paper);
}

.sidebar {
  width: 252px;
  flex: 0 0 252px;
  background: var(--surface-sunken);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 18px;
}

.sidebar__brand {
  padding: 0 8px 26px;
}

.sidebar__title {
  font: 400 22px/1 var(--serif);
  letter-spacing: -0.01em;
}

.sidebar__sub {
  margin-top: 7px;
  font: 400 12px/1.4 var(--sans);
  color: var(--ink-5);
}

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

.sidebar__foot {
  margin-top: auto;
  padding: 14px 12px 6px;
  border-top: 1px solid var(--line);
  font: 400 11.5px/1.6 var(--sans);
  color: var(--ink-5);
}

.navitem {
  appearance: none;
  text-align: left;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 7px;
  font: 500 14px/1 var(--sans);
  background: transparent;
  color: var(--ink-3);
}

.navitem:hover {
  background: #e7e2d8;
}

.navitem[aria-current="page"] {
  background: #e2dfd6;
  color: var(--ink);
}

.navitem__label {
  flex: 1;
}

.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--clay);
  color: var(--surface);
  font: 600 11px/20px var(--sans);
  text-align: center;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(245 242 236 / 93%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__row {
  width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar__heading {
  flex: 1;
  min-width: 180px;
}

.eyebrow {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font: 400 clamp(26px, 3.4vw, 34px) / 1.05 var(--serif);
  letter-spacing: -0.015em;
}

.topbar__sub {
  margin-top: 7px;
  font: 400 13px/1.4 var(--sans);
  color: var(--ink-3);
}

.weekswitch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
}

.weekswitch button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font: 400 17px/1 var(--sans);
  color: var(--ink-3);
}

.weekswitch button:hover {
  background: var(--surface-sunken);
}

.weekswitch__label {
  min-width: 118px;
  text-align: center;
  padding: 0 4px;
}

.weekswitch__label strong {
  display: block;
  font: 500 14px/1.2 var(--sans);
}

.weekswitch__label span {
  display: block;
  font: 400 11.5px/1.3 var(--sans);
  color: var(--ink-5);
}

.ritual {
  width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter) 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ritual__step {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 99px;
  background: transparent;
  font: 500 12.5px/1 var(--sans);
  color: var(--ink-6);
}

.ritual__step[data-state="done"],
.ritual__step[data-state="todo"] {
  color: var(--ink-6);
}

.ritual__step[data-state="done"] {
  color: var(--ink-2);
}

.ritual__step[data-state="active"] {
  background: #e2dfd6;
  color: var(--ink-2);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d2c9b9;
}

.ritual__step[data-state="done"] .dot {
  background: var(--moss);
}

.ritual__step[data-state="active"] .dot {
  background: var(--clay);
}

.content {
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) var(--gutter) 120px;
}

/* -------------------------------------------------------------- elements */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 16px;
}

.stat__label,
.label {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-5);
}

.stat__value {
  margin-top: 9px;
  font: 400 17px/1.2 var(--serif);
  color: var(--ink);
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.panel--pad {
  padding: 20px 22px;
}

.panel__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-faint);
  flex-wrap: wrap;
}

.panel__head h2 {
  margin: 0;
  font: 400 19px/1.2 var(--serif);
}

.panel__note {
  flex: 1;
  min-width: 160px;
  font: 400 12.5px/1 var(--sans);
  color: var(--ink-5);
}

.section {
  margin-bottom: 26px;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section__head h2 {
  margin: 0;
  font: 400 19px/1.2 var(--serif);
}

.section__note {
  font: 400 12.5px/1 var(--sans);
  color: var(--ink-5);
}

.section__total {
  margin-left: auto;
  font: 500 13px/1 var(--sans);
  color: var(--ink-2);
}

.shelf {
  margin-top: 14px;
}

.shelf__label {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  padding: 0 2px 8px;
}

.prose {
  font: 400 13px/1.6 var(--sans);
  color: var(--ink-3);
  max-width: 640px;
  margin-bottom: 22px;
}

.hint {
  font: 400 12.5px/1.5 var(--sans);
  color: var(--ink-5);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.spacer {
  flex: 1;
}

/* --------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-button);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font: 500 14px/1 var(--sans);
}

.btn:hover:not(:disabled) {
  background: var(--surface-sunken);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn--primary {
  border: 0;
  background: var(--moss-deep);
  color: #f7f5f0;
}

.btn--primary:hover:not(:disabled) {
  background: var(--moss-deeper);
}

.btn--primary:disabled {
  background: #c4bfb4;
  color: #f7f5f0;
  opacity: 1;
}

.btn--soft {
  background: var(--surface-sunken);
  color: var(--ink-2);
}

.btn--small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
}

.btn--small:hover:not(:disabled) {
  background: var(--surface-sunken);
  border-color: #c9bfad;
}

.btn--tiny {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 6px;
}

.btn--pick {
  border-color: var(--moss-line);
  background: var(--moss-soft);
  color: var(--moss-deep);
}

.btn--pick:hover:not(:disabled) {
  background: #e2e8dc;
}

.btn--clay {
  border-color: #dcc3ac;
  background: var(--clay-button);
  color: var(--clay-ink);
}

.btn--full {
  width: 100%;
}

.btn--link {
  border: 0;
  background: transparent;
  color: var(--moss);
  min-height: 34px;
  padding: 0;
  text-decoration: underline;
}

.linkbutton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #f7f5f0;
  font: 500 15px/1 var(--sans);
  border: 0;
  text-decoration: none;
}

.linkbutton:hover {
  color: #f7f5f0;
  border-bottom-color: transparent;
}

.field {
  flex: 1;
  min-width: 220px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-button);
  background: var(--surface);
  color: var(--ink);
  font: 400 14px/1 var(--sans);
}

select.field {
  min-width: 150px;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ tags */

.tag {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--surface-sunken);
  border-radius: 4px;
  padding: 5px 7px;
}

.tag--clay {
  color: var(--clay);
  background: var(--clay-soft);
}

.tag--moss {
  color: var(--moss);
  background: #e9ede4;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 99px;
  background: #f1ece3;
  border: 1px solid #e6dfd3;
}

.chip__label {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
}

.chip__value {
  font: 400 13px/1 var(--sans);
  color: var(--ink-2);
}

.reason {
  font: 400 11.5px/1 var(--sans);
  color: var(--ink-3);
  background: #f1ece3;
  border-radius: 4px;
  padding: 6px 8px;
}

/* -------------------------------------------------------------- weekmenu */

.day {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  padding: 16px clamp(14px, 2vw, 20px);
  border-top: 1px solid var(--line-faint);
  flex-wrap: wrap;
  background: transparent;
  width: 100%;
  text-align: left;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.day:first-child {
  border-top: 0;
}

.day:hover {
  background: var(--surface-hover);
}

.day[data-free="true"] {
  opacity: 0.72;
  cursor: default;
}

.day__when {
  width: 64px;
  flex: 0 0 64px;
}

.day__short {
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.day__date {
  margin-top: 6px;
  font: 400 12px/1 var(--sans);
  color: var(--ink-6);
}

.day__rule {
  width: 1px;
  align-self: stretch;
  background: #eae3d7;
}

.day__body {
  flex: 1;
  min-width: 190px;
}

.day__tags {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.day__title {
  margin-top: 9px;
  font: 400 clamp(18px, 2.2vw, 21px) / 1.25 var(--serif);
}

.day[data-free="true"] .day__title {
  color: var(--ink-6);
}

.day__meta {
  margin-top: 6px;
  font: 400 12.5px/1.4 var(--sans);
  color: var(--ink-4);
}

.day__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.chevron {
  color: var(--ink-7);
  font: 400 15px/1 var(--sans);
  padding: 0 2px;
}

/* ------------------------------------------------------------------ list */

.line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-top: 1px solid var(--line-faint);
  flex-wrap: wrap;
}

.line:first-child {
  border-top: 0;
}

.line[data-off="true"] {
  opacity: 0.45;
}

.check {
  appearance: none;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 5px;
  cursor: pointer;
  border: 1.5px solid var(--moss);
  background: var(--moss);
  color: var(--surface);
  font: 600 13px/1 var(--sans);
  display: flex;
  align-items: center;
  justify-content: center;
}

.check[aria-pressed="false"] {
  border-color: #d2c9b9;
  background: transparent;
  color: transparent;
}

.thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 6px;
  border: 1px solid var(--line-soft);
  background: repeating-linear-gradient(135deg, #efe9de 0 6px, #e6ded0 6px 12px);
  object-fit: cover;
}

.thumb--small {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.line__body {
  flex: 1;
  min-width: 150px;
}

.line__name {
  font: 500 14.5px/1.3 var(--sans);
}

.line__product {
  margin-top: 4px;
  font: 400 12px/1.4 var(--sans);
  color: var(--ink-4);
}

.line__product--missing {
  color: var(--clay);
}

.line__need {
  width: 96px;
  text-align: right;
  font: 400 13px/1 var(--sans);
  color: var(--ink-3);
}

.line__price {
  width: 84px;
  text-align: right;
  font: 500 13.5px/1 var(--sans);
}

.line__price--missing {
  color: var(--ink-6);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
}

.stepper button {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-3);
  font: 400 16px/1 var(--sans);
}

.stepper__value {
  min-width: 34px;
  text-align: center;
  font: 500 13.5px/1 var(--sans);
}

.stepper__value[data-auto="true"] {
  color: var(--ink-5);
}

.summary {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}

.summary__value {
  margin-top: 8px;
  font: 400 30px/1 var(--serif);
}

.summary__note {
  margin-top: 8px;
  font: 400 12.5px/1.5 var(--sans);
  color: var(--ink-3);
}

/* --------------------------------------------------------------- notices */

.notice {
  border: 1px solid var(--clay-line);
  background: var(--clay-panel);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.notice h2 {
  margin: 0;
  font: 400 20px/1.35 var(--serif);
  color: var(--clay-ink);
}

.notice p {
  margin: 6px 0 0;
  font: 400 13px/1.5 var(--sans);
  color: #8b5b39;
}

.notice__list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice__item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fbf6f1;
  border: 1px solid var(--clay-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  flex-wrap: wrap;
}

.notice__item span.dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--clay);
}

.notice__text {
  flex: 1;
  min-width: 180px;
  font: 400 13.5px/1.4 var(--sans);
  color: #5c4531;
}

.notice--error {
  border-color: #e0b3a0;
}

.ok-note {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dce2d6;
  border-radius: 9px;
  background: #f1f4ed;
  flex-wrap: wrap;
}

.ok-note span.dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--moss);
}

.ok-note__text {
  flex: 1;
  min-width: 180px;
  font: 400 13.5px/1.4 var(--sans);
  color: var(--moss-deep);
}

.empty {
  border: 1px dashed var(--line-button);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  font: 400 13.5px/1.6 var(--sans);
  color: var(--ink-5);
}

.done-card {
  border: 1px solid var(--moss-line);
  background: var(--moss-soft);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  font: 400 15px/1.6 var(--serif);
  color: var(--moss-deep);
}

.done-card small {
  font: 400 13px/1.6 var(--sans);
  color: var(--moss);
}

.progress {
  height: 5px;
  border-radius: 3px;
  background: #eae3d7;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--moss);
  transition: width 0.25s ease;
}

.progress__bar--busy {
  width: 100%;
  animation: pulse 1.2s ease-in-out infinite;
}

.loading {
  font: 400 13px/1.6 var(--sans);
  color: var(--ink-5);
  padding: 26px 2px;
}

/* -------------------------------------------------------------- voorstel */

.split {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: stretch;
}

.split > * {
  flex: 1;
  min-width: 260px;
}

.card-column {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-column--sunken {
  background: var(--surface-sunken);
  border-color: var(--line);
}

.big-total {
  margin-top: 10px;
  font: 400 clamp(34px, 5vw, 44px) / 1 var(--serif);
}

.proposal-day {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-faint);
  flex-wrap: wrap;
}

.proposal-day:first-child {
  border-top: 0;
}

.proposal-day__short {
  width: 96px;
  flex: 0 0 96px;
  font: 500 12px/1.5 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  overflow-wrap: anywhere;
}

.proposal-day__body {
  flex: 1;
  min-width: 200px;
}

.proposal-day__title {
  font: 400 17px/1.3 var(--serif);
}

.proposal-day__reasons {
  margin-top: 7px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.proposal-day__score {
  width: 52px;
  text-align: right;
  font: 400 15px/1 var(--serif);
  color: var(--ink-5);
}

.ai-head {
  padding: 22px;
  border-bottom: 1px solid var(--line-faint);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.ai-head__body {
  flex: 1;
  min-width: 220px;
}

.ai-head__title {
  margin-top: 10px;
  font: 400 clamp(22px, 3vw, 27px) / 1.2 var(--serif);
}

.ai-head__meta {
  margin-top: 8px;
  font: 400 13px/1.5 var(--sans);
  color: var(--ink-3);
}

.ai-head__cost {
  text-align: right;
}

.ai-head__cost strong {
  display: block;
  margin-top: 8px;
  font: 400 26px/1 var(--serif);
}

.ai-head__cost small {
  display: block;
  margin-top: 6px;
  font: 400 12px/1 var(--sans);
  color: var(--ink-5);
}

.ai-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 22px;
  flex-wrap: wrap;
}

.ai-line .dot {
  background: var(--moss);
}

.ai-line[data-ok="false"] .dot {
  background: var(--clay);
}

.ai-line__body {
  flex: 1;
  min-width: 160px;
}

.ai-line__name {
  font: 500 14px/1.3 var(--sans);
}

.ai-line__note {
  margin-top: 4px;
  font: 400 12px/1.4 var(--sans);
  color: var(--ink-4);
}

.ai-line[data-ok="false"] .ai-line__note {
  color: var(--clay);
}

.ai-foot {
  padding: 18px 22px;
  background: var(--clay-panel);
  border-top: 1px solid var(--clay-line);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.ai-foot--ok {
  background: var(--moss-soft);
  border-top-color: var(--moss-line);
}

.ai-foot__text {
  flex: 1;
  min-width: 220px;
  font: 400 13px/1.55 var(--sans);
  color: var(--clay-ink);
}

.ai-foot--ok .ai-foot__text {
  color: var(--moss-deep);
}

/* -------------------------------------------------------------- voorraad */

.grid-cards {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 10px;
}

.stock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface);
}

.stock[data-empty="true"] {
  background: var(--clay-panel);
}

.stock__body {
  flex: 1;
  min-width: 0;
}

.stock__label {
  font: 500 14px/1.3 var(--sans);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock__state {
  margin-top: 4px;
  font: 400 11.5px/1.3 var(--sans);
  color: var(--moss);
}

.stock[data-empty="true"] .stock__state {
  color: var(--clay);
}

.stock[data-tracked="false"] .stock__state {
  color: var(--ink-6);
}

.stock .stepper__value {
  min-width: 60px;
}

/* -------------------------------------------------------------- historie */

.history-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border-top: 1px solid var(--line-faint);
  flex-wrap: wrap;
}

.history-row:first-child {
  border-top: 0;
}

.history-row__date {
  width: 128px;
  flex: 0 0 128px;
  font: 400 12px/1.3 var(--sans);
  color: var(--ink-6);
}

.history-row__title {
  flex: 1;
  min-width: 170px;
  font: 400 16px/1.3 var(--serif);
}

.scores {
  display: flex;
  gap: 5px;
}

.score {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink-3);
  font: 500 13px/1 var(--sans);
}

.score[data-good="true"] {
  border-color: var(--moss-line);
}

.score:hover {
  background: var(--surface-sunken);
}

.score-value {
  font: 500 13px/1 var(--sans);
  color: var(--ink-3);
}

.score-value[data-tone="good"] {
  color: var(--moss);
}

.score-value[data-tone="bad"] {
  color: var(--clay);
}

/* ----------------------------------------------------------- koppelingen */

.mapping-target {
  margin-bottom: 22px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  border-top: 1px solid var(--line-fainter);
  flex-wrap: wrap;
}

.option__body {
  flex: 1;
  min-width: 170px;
}

.option__title {
  font: 500 14px/1.3 var(--sans);
}

.option__sku {
  margin-top: 4px;
  font: 400 11.5px/1.4 var(--mono);
  color: var(--ink-6);
}

.option__price {
  width: 84px;
  text-align: right;
  font: 500 13.5px/1 var(--sans);
}

/* -------------------------------------------------------- drawer / sheet */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(38 35 31 / 30%);
  animation: fadeIn 0.2s ease both;
  border: 0;
  padding: 0;
  cursor: default;
}

.drawer {
  position: fixed;
  z-index: 61;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  animation: riseIn 0.26s ease both;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(440px, 100%);
  border-left: 1px solid var(--line);
}

.drawer__head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-faint);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.drawer__eyebrow {
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
}

.drawer__title {
  margin-top: 10px;
  font: 400 clamp(21px, 3vw, 25px) / 1.2 var(--serif);
}

.drawer__meta {
  margin-top: 8px;
  font: 400 12.5px/1.5 var(--sans);
  color: var(--ink-4);
}

.drawer__close {
  appearance: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--ink-3);
  font: 400 16px/1 var(--sans);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 24px;
}

.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  overflow: hidden;
  margin: 12px 0 24px;
}

.ingredient {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  background: var(--surface);
}

.ingredient__name {
  flex: 1;
  font: 400 13.5px/1.3 var(--sans);
}

.ingredient__qty {
  font: 400 13px/1.3 var(--sans);
  color: var(--ink-3);
}

.method {
  margin: 12px 0 24px;
  font: 300 15.5px/1.65 var(--serif);
  color: #3f3a33;
  white-space: pre-line;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 24px;
}

.choice {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font: 400 13.5px/1.35 var(--sans);
}

.choice:hover {
  background: var(--surface-sunken);
}

.choice[aria-pressed="true"] {
  border-color: var(--moss-line);
  background: var(--moss-soft);
  color: var(--moss-deep);
}

.choice__meta {
  margin-left: auto;
  font: 400 12px/1 var(--sans);
  color: var(--ink-5);
}

/* ------------------------------------------------------- mobiele naviatie */

.bottomnav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgb(239 234 225 / 97%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}

.bottomnav button {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 2px;
  color: var(--ink-4);
  font: 500 11.5px/1 var(--sans);
}

.bottomnav button[aria-current="page"] {
  color: var(--ink);
}

.bottomnav .dot {
  width: 5px;
  height: 5px;
  background: transparent;
}

.bottomnav button[aria-current="page"] .dot {
  background: var(--clay);
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  padding: 12px 12px calc(20px + env(safe-area-inset-bottom));
  animation: riseIn 0.24s ease both;
}

.sheet__grip {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-button);
  margin: 4px auto 14px;
}

.sheet .navitem {
  min-height: 52px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #f7f5f0;
  font: 400 13.5px/1.45 var(--sans);
  animation: riseIn 0.2s ease both;
  box-shadow: 0 8px 24px rgb(38 35 31 / 22%);
}

.toast[data-tone="fout"] {
  background: var(--clay-ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 899px) {
  .sidebar {
    display: none;
  }

  .bottomnav {
    display: flex;
  }

  .content {
    padding-bottom: 140px;
  }

  .drawer {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-height: 86vh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
  }

  .line__need {
    width: auto;
  }

  .history-row__date {
    width: 100%;
    flex: 1 0 100%;
  }
}

/* ------------------------------------------------------------ toegang */

.authshell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--paper);
}

.authpage {
  width: 100%;
  max-width: 420px;
}

.authcard {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: clamp(24px, 5vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: riseIn 0.24s ease both;
}

.authcard__brand {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-faint);
  margin-bottom: 4px;
}

.authcard__title {
  margin: 0;
  font: 400 clamp(24px, 4vw, 29px) / 1.15 var(--serif);
  letter-spacing: -0.015em;
}

.authcard__sub {
  margin: -6px 0 4px;
  font: 400 13.5px/1.5 var(--sans);
  color: var(--ink-3);
}

.authfield {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.authfield__label {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-5);
}

.authfield .field {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  background: var(--field);
}

.authhint {
  margin: -4px 0 0;
  font: 400 12.5px/1.5 var(--sans);
  color: var(--ink-5);
}

.authnotice {
  border: 1px solid var(--line);
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: 400 13px/1.5 var(--sans);
  color: var(--ink-2);
}

.authnotice--fout {
  border-color: var(--clay-line);
  background: var(--clay-panel);
  color: var(--clay-ink);
}

.authnotice strong {
  font-weight: 500;
}

.authnotice__list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.authlinks {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 2px;
}

.authfoot {
  margin: 16px 4px 0;
  text-align: center;
  font: 400 12px/1.6 var(--sans);
  color: var(--ink-5);
}

.sidebar__account {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 12px 12px;
}

.sidebar__accountnaam {
  flex: 1;
  min-width: 0;
  font: 500 13px/1.3 var(--sans);
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__foot {
  margin-top: 0;
}

.card-column .field {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}

.line__meta {
  font: 400 12.5px/1.4 var(--sans);
  color: var(--ink-5);
  white-space: nowrap;
}

.line__acties {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.linkbox {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fbf6f1;
  border: 1px solid var(--clay-line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.linkbox__url {
  flex: 1;
  min-width: 200px;
  font: 400 12px/1.5 var(--mono);
  color: var(--clay-ink);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------- koppelsuggesties */

.suggesties {
  /* Buiten beeld hoeft de browser deze strip niet door te rekenen. */
  content-visibility: auto;
  contain-intrinsic-size: auto 190px;
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.suggesties--leeg {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  overflow: visible;
}

.suggestie {
  scroll-snap-align: start;
  flex: 0 0 148px;
  width: 148px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    transform 0.12s ease;
}

.suggestie:hover:not(:disabled) {
  border-color: var(--moss-line);
  background: var(--moss-soft);
  transform: translateY(-1px);
}

.suggestie:active:not(:disabled) {
  transform: none;
}

.suggestie:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.suggestie__foto {
  width: 100%;
  height: 72px;
  border-radius: 6px;
  border: 1px solid var(--line-faint);
  background: repeating-linear-gradient(135deg, #efe9de 0 6px, #e6ded0 6px 12px);
}

/* Productfoto's zijn vaak transparant; daar hoort geen ruitjespatroon achter. */
img.suggestie__foto {
  background: #fff;
  object-fit: contain;
}

.suggestie__titel {
  font: 500 12.5px/1.3 var(--sans);
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggestie__inhoud {
  font: 400 11px/1.3 var(--sans);
  color: var(--ink-5);
}

.suggestie__prijs {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/1 var(--sans);
  color: var(--ink);
}

.suggestie__bonus {
  font: 500 9.5px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  background: var(--clay-soft);
  border-radius: 3px;
  padding: 4px 5px;
}

.suggestie--skelet {
  cursor: default;
  border-style: dashed;
  animation: pulse 1.4s ease-in-out infinite;
}

.suggestie--skelet .suggestie__foto {
  height: 72px;
}

@media (max-width: 899px) {
  .suggestie {
    flex-basis: 132px;
    width: 132px;
  }
}

/* ------------------------------------------------------------- hulpklassen
   Los van de componenten hierboven: kleine plaatsings-hulpjes. Ze bestaan
   omdat de CSP geen inline stijlen toestaat, en dat willen we zo houden. */

[data-stijl~="mt-6"] { margin-top: 6px; }
[data-stijl~="mt-7"] { margin-top: 7px; }
[data-stijl~="mt-10"] { margin-top: 10px; }
[data-stijl~="mt-12"] { margin-top: 12px; }
[data-stijl~="mt-14"] { margin-top: 14px; }
[data-stijl~="mt-20"] { margin-top: 20px; }
[data-stijl~="mt-26"] { margin-top: 26px; }
[data-stijl~="mt-28"] { margin-top: 28px; }
[data-stijl~="mb-8"] { margin-bottom: 8px; }
[data-stijl~="mb-12"] { margin-bottom: 12px; }
[data-stijl~="mb-14"] { margin-bottom: 14px; }
[data-stijl~="mb-16"] { margin-bottom: 16px; }
[data-stijl~="mb-18"] { margin-bottom: 18px; }
[data-stijl~="mb-20"] { margin-bottom: 20px; }
[data-stijl~="mb-24"] { margin-bottom: 24px; }
[data-stijl~="mb-28"] { margin-bottom: 28px; }
[data-stijl~="kop-12"] { margin: 0 0 12px; }
[data-stijl~="ml-8"] { margin-left: 8px; }
[data-stijl~="rechts"] { text-align: right; }
[data-stijl~="groei"] { flex: 1; }
[data-stijl~="min-200"] { min-width: 200px; }
[data-stijl~="min-220"] { min-width: 220px; }
[data-stijl~="stapel"] { display: flex; flex-direction: column; gap: 8px; }
[data-stijl~="pad-lijst"] { padding: 6px 0; }
[data-stijl~="pad-kaartvoet"] { padding: 18px 22px; margin: 0; }
[data-stijl~="telkop"] { font: 400 26px/1 var(--serif); }

[data-stijl~="scheider-boven"] {
  border-top: 1px solid var(--line-faint);
  padding-top: 12px;
}

.meer-sentinel {
  display: flex;
  justify-content: center;
  padding: 22px 0 6px;
}

/* ---------------------------------------------------------- basisvoorraad */

.basisregel {
  /* Eén raster voor alle rijen: zo staan de kolommen onder elkaar, ook als de
     ene naam langer is dan de andere of een badge ontbreekt. */
  display: grid;
  grid-template-columns:
    minmax(0, 1.5fr)
    84px
    280px
    minmax(0, 1.1fr)
    12px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-faint);
  cursor: pointer;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}

.basisregel:first-child {
  border-top: 0;
}

.basisregel:hover {
  background: var(--surface-hover);
}

.basisregel--open {
  display: block;
  cursor: default;
  background: var(--surface-sunken);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.basisregel--open:hover {
  background: var(--surface-sunken);
}

.basisregel__kop {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.basisregel__naam {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font: 500 14.5px/1.3 var(--sans);
  color: var(--ink);
}

.basisregel__naam > span {
  flex: 0 0 auto;
}

/* De naam mag inkorten in plaats van de rij hoger te maken. */
.basisregel__naamtekst {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basisregel__hoeveelheid {
  text-align: right;
  font: 400 13px/1 var(--sans);
  color: var(--ink-3);
  white-space: nowrap;
}

.basisregel__wanneer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.basisregel__zoek {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
}

.basisregel__zoek .mono,
.basisregel__koppel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basisregel__koppel {
  font: 400 11.5px/1.3 var(--sans);
  color: var(--clay);
}

.basisregel__koppel--klaar {
  color: var(--moss);
}

.basisregel .chevron {
  padding: 0;
  text-align: right;
}

.basisform__velden {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.invoer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.invoer--breed {
  grid-column: 1 / -1;
}

.invoer__label {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-5);
}

.invoer .field {
  min-width: 0;
  width: 100%;
  flex: 0 0 auto;
  background: var(--surface);
}

@media (max-width: 1099px) {
  /* Te smal voor vijf kolommen: naam en aantal naast elkaar, de rest eronder. */
  .basisregel {
    grid-template-columns: minmax(0, 1fr) auto 12px;
    row-gap: 8px;
  }

  .basisregel__wanneer,
  .basisregel__zoek {
    grid-column: 1 / -1;
  }

  .basisregel__hoeveelheid {
    text-align: left;
  }
}
