/* ===== Foodlab · kraft-paper / label stijl ===== */

:root {
  --kraft: #c9a876;
  --kraft-dark: #b08d5b;
  --kraft-deep: #8a6d3b;
  --paper: #f7f0e1;
  --paper-2: #efe4cc;
  --ink: #3a2e21;
  --ink-soft: #6b5a45;
  --line: #d8c7a0;
  --shadow: rgba(58, 46, 33, 0.25);

  /* Categorie-kleuren */
  --cat-jam: #c0455b;
  --cat-chutney: #b5651d;
  --cat-compote: #8e5a9e;
  --cat-groente: #4f7942;
  --cat-taart: #c98a2e;
  --cat-recept: #4a6d7c;
  --cat-anders: #5a7d8c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  /* Voorkom dat mobiele browsers (o.a. Samsung Internet) tekst automatisch
     opschalen; dat verstoorde anders de nav-uitlijning. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Courier Prime", "Courier New", monospace;
  color: var(--ink);
  min-height: 100vh;
  background-color: var(--kraft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

.hidden {
  display: none !important;
}

/* ===== Label-kaart (kraft-paper met tape) ===== */
.label-card {
  position: relative;
  background: var(--paper);
  background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='40' height='40' filter='url(%23p)' opacity='0.04'/%3E%3C/svg%3E");
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 10px 30px var(--shadow);
}

/* Washi-tape hoeken */
.tape {
  position: absolute;
  width: 90px;
  height: 26px;
  background: rgba(214, 197, 156, 0.75);
  border: 1px dashed rgba(138, 109, 59, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.tape-tl {
  top: -12px;
  left: 22px;
  transform: rotate(-4deg);
}
.tape-br {
  bottom: -12px;
  right: 22px;
  transform: rotate(-3deg);
}

/* ===== Buttons ===== */
.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 3px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
  letter-spacing: 0.02em;
}
.btn:active {
  transform: translateY(1px);
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: #4d3d2c;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: rgba(58, 46, 33, 0.08);
}
.btn-danger {
  background: var(--cat-jam);
  color: #fff;
  border-color: #8f2f40;
}
.btn-danger:hover {
  background: #a83a4d;
}

/* ===== Login ===== */
.view {
  min-height: 100vh;
}
.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem 2rem;
}
.brand {
  text-align: center;
  margin-bottom: 1.75rem;
}
.brand-mark {
  font-size: 2.5rem;
}
.brand-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 2.4rem;
  margin: 0.2rem 0 0;
  letter-spacing: -0.02em;
}
.brand-sub {
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0.1rem 0 0;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.login-form label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  padding: 0.6rem 0.7rem;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--kraft-deep);
  box-shadow: 0 0 0 3px rgba(138, 109, 59, 0.15);
}
.login-form .btn {
  margin-top: 0.5rem;
}
.login-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 0.6rem 0 0;
}
.login-sent {
  text-align: center;
}
.login-sent .check {
  font-size: 2.5rem;
  margin: 0;
}
.login-sent p {
  color: var(--ink-soft);
}
.login-sent strong {
  color: var(--ink);
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 12px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.topbar-logo {
  height: 56px;
  width: auto;
  display: block;
}
.topbar-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.4rem;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.topbar .btn-ghost {
  color: var(--ink);
  border-color: var(--ink);
}
.topbar .btn-ghost:hover {
  background: rgba(58, 46, 33, 0.08);
}

/* ===== Controls ===== */
.controls {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.search-wrap {
  flex: 1 1 160px;
}
.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.filters select {
  width: auto;
  cursor: pointer;
}

/* ===== Recepten-grid ===== */
.recipes-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 4rem;
}
.recipe-count {
  font-size: 0.85rem;
  color: var(--paper);
  opacity: 0.9;
  margin: 0.25rem 0 1rem;
  text-shadow: 0 1px 2px var(--shadow);
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.recipe-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 8px solid var(--cat, var(--kraft-deep));
  border-radius: 4px;
  padding: 1.1rem 1.1rem 1rem;
  box-shadow: 0 6px 18px var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.recipe-card:hover {
  transform: translateY(-3px) rotate(-0.3deg);
  box-shadow: 0 12px 26px var(--shadow);
}
.card-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: var(--cat, var(--kraft-deep));
}
.badge-season {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
}
.card-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
}
.card-author {
  font-family: "Caveat", cursive;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--kraft-deep);
  margin-top: -0.15rem;
}
.card-meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.card-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.tag-chip {
  font-family: "Caveat", cursive;
  font-size: 1rem;
  line-height: 1;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
  color: var(--ink-soft);
}
.card-actions {
  display: flex;
  gap: 0.5rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.6rem;
  margin-top: 0.2rem;
}

/* Categorie-accenten */
.cat-jam { --cat: var(--cat-jam); }
.cat-chutney { --cat: var(--cat-chutney); }
.cat-compote { --cat: var(--cat-compote); }
.cat-groente { --cat: var(--cat-groente); }
.cat-taart { --cat: var(--cat-taart); }
.cat-recept { --cat: var(--cat-recept); }
.cat-anders { --cat: var(--cat-anders); }

/* ===== Empty / loading ===== */
.empty-state,
.loading-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--paper);
  text-shadow: 0 1px 2px var(--shadow);
}
.empty-emoji {
  font-size: 3rem;
  margin: 0;
}
.empty-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  margin: 0.4rem 0 0.2rem;
}
.empty-sub {
  opacity: 0.9;
  margin: 0;
}

/* ===== Modals ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 27, 18, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem;
  overflow-y: auto;
  z-index: 50;
}
.modal {
  width: 100%;
  max-width: 680px;
  padding: 2rem 1.75rem 1.75rem;
}
.modal-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.6rem;
  margin: 0 0 1.25rem;
}
.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--ink);
}

.recipe-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.field-full {
  grid-column: 1 / -1;
}
.field label {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ===== Detail-weergave ===== */
.detail-card {
  max-width: 640px;
}
.detail-header {
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}
.detail-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.9rem;
  margin: 0.5rem 0 0.4rem;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}
.detail-meta-item {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.5rem 0.7rem;
}
.detail-meta-item .k {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  display: block;
}
.detail-meta-item .v {
  font-weight: 700;
}
.detail-section h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  margin: 1.2rem 0 0.4rem;
}
.detail-section p,
.detail-section li {
  white-space: pre-wrap;
  line-height: 1.55;
}
.detail-section ul {
  margin: 0;
  padding-left: 1.2rem;
}
.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}
.detail-created {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* Aanduiding "automatisch vertaald" boven de receptinhoud */
.detail-translated-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  margin: 0.6rem 0 0.2rem;
}

/* Klein delete-icoon in de linkerbenedenhoek van de detailweergave */
.detail-delete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.detail-delete-icon:hover {
  color: #fff;
  background: var(--cat-jam);
  border-color: #8f2f40;
}

/* ===== Inline bewerk-/aanmaakpaneel ===== */
.editor-panel {
  padding: 1.75rem 1.6rem 1.6rem;
  margin-bottom: 1.5rem;
}
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 0.4rem;
}
.editor-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.6rem;
  margin: 0;
}
.editor-actions {
  display: flex;
  gap: 0.75rem;
}
.editor-actions-bottom {
  justify-content: flex-end;
  border-top: 1px dashed var(--line);
  padding-top: 1.1rem;
  margin-top: 0.5rem;
}

/* ===== Eenvoudige rich-text-editor ===== */
.rte {
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
}
.rte:focus-within {
  border-color: var(--kraft-deep);
  box-shadow: 0 0 0 3px rgba(138, 109, 59, 0.15);
}
.rte-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.35rem 0.4rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.rte-btn {
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.4rem;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.rte-btn:hover {
  background: rgba(58, 46, 33, 0.1);
  border-color: var(--line);
}
.rte-btn:active {
  transform: translateY(1px);
}
.rte-sep {
  width: 1px;
  height: 1.3rem;
  background: var(--line);
  margin: 0 0.25rem;
}
.rte-editor {
  min-height: 6.5rem;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  outline: none;
}
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-soft);
  opacity: 0.7;
}
.rte-editor p {
  margin: 0 0 0.5rem;
}
.rte-editor ul,
.rte-editor ol {
  margin: 0 0 0.5rem;
  padding-left: 1.4rem;
}

/* Tabellen — zowel in de editor als in de detailweergave */
.rte-editor table,
.rich-content table {
  border-collapse: collapse;
  margin: 0.4rem 0;
  width: auto;
}
.rte-editor td,
.rte-editor th,
.rich-content td,
.rich-content th {
  border: 1px solid var(--line);
  padding: 0.35rem 0.55rem;
  min-width: 2.5rem;
  text-align: left;
}
.rich-content ul,
.rich-content ol {
  margin: 0;
  padding-left: 1.3rem;
}
.rich-content p {
  margin: 0 0 0.6rem;
}
.rich-content p:last-child {
  margin-bottom: 0;
}

.confirm-card {
  max-width: 420px;
  text-align: center;
}
.confirm-card .modal-actions {
  justify-content: center;
}

/* ===== Profiel + hulp-quiz ===== */
.profile-card {
  max-width: 560px;
}

/* Inline profielpaneel (zelfde patroon als het recept-bewerkpaneel) */
.profile-panel-inline .profile-intro {
  margin-top: 0.4rem;
}
.profile-top-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 0.6rem 0 0.2rem;
}
.profile-avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.profile-avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-placeholder {
  font-size: 2.6rem;
  opacity: 0.55;
}
.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 118px;
}
.profile-avatar-actions .btn {
  width: 100%;
  text-align: center;
}
.profile-identity {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 200px;
}
.profile-identity input[readonly] {
  background: var(--paper-2);
  color: var(--ink-soft);
  cursor: default;
}
.profile-identity input[readonly]:focus {
  border-color: var(--line);
  box-shadow: none;
}

.profile-intro {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.profile-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.climate-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.climate-row select {
  flex: 1;
}
.climate-row .btn {
  white-space: nowrap;
}
.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.quiz-q {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.75rem 0.9rem 0.85rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.35);
}
.quiz-q legend {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 0.4rem;
  color: var(--ink);
}
.quiz-q label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  padding: 0.25rem 0;
  cursor: pointer;
  color: var(--ink);
}
.quiz-q input[type="radio"] {
  width: auto;
  margin-top: 0.2rem;
}
.quiz-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.4rem 0 0;
}
.quiz-result {
  background: var(--paper-2);
  border: 1px dashed var(--kraft-deep);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.quiz-result strong {
  color: var(--cat-groente);
}

/* ===== "?"-uitleg naast type / methode ===== */
.field-with-help {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.field-with-help select {
  flex: 1;
}
.help-icon {
  flex: 0 0 auto;
  width: 2.1rem;
  height: auto;
  min-height: 2.1rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
}
.help-icon:hover {
  color: var(--paper);
  background: var(--kraft-deep);
  border-color: var(--kraft-deep);
}
.field-help {
  margin-top: 0.4rem;
  padding: 0.55rem 0.7rem;
  background: var(--paper-2);
  border: 1px dashed var(--kraft-deep);
  border-radius: 3px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}
.help-link {
  color: var(--kraft-deep);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
}

/* ===== Testdata-rijen ===== */
.tests-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.test-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.test-row .test-date {
  flex: 0 0 auto;
  width: auto;
}
.test-row .test-note {
  flex: 1;
}
.test-remove {
  flex: 0 0 auto;
}
.tests-add-btn {
  align-self: flex-start;
  margin-top: 0.6rem;
}
.tests-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== "Deel dit recept"-schakelaar ===== */
.share-field {
  border-top: 1px dashed var(--line);
  padding-top: 1rem;
}
.share-field .share-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.share-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.share-toggle .switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.share-toggle .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 0.15s ease, background 0.15s ease;
}
.share-toggle input:checked + .switch {
  background: var(--cat-groente);
  border-color: var(--cat-groente);
}
.share-toggle input:checked + .switch::after {
  transform: translateX(20px);
  background: #fff;
}
.share-toggle input:focus-visible + .switch {
  box-shadow: 0 0 0 3px rgba(138, 109, 59, 0.25);
}
.share-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

/* Badge voor gedeelde recepten */
.badge-public {
  background: var(--cat-groente);
  color: #fff;
}

/* ===== Uitleg-pagina (Help) ===== */
.help-body {
  padding-top: 0.5rem;
}
.help-intro {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 1rem;
}
.help-h {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  margin: 1.6rem 0 0.6rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.35rem;
}
.help-cat {
  border-left: 6px solid var(--cat, var(--kraft-deep));
  padding: 0.2rem 0 0.2rem 0.9rem;
  margin: 1rem 0 1.2rem;
}
.help-cat h4 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--cat, var(--ink));
}
.help-item {
  margin: 0 0 0.9rem;
}
.help-item h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}
.help-item p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}
.help-empty {
  color: var(--ink-soft);
  font-style: italic;
}

/* ===== Beheerscherm ===== */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.25rem;
}
.admin-tab {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 4px 4px 0 0;
  transition: color 0.12s ease, background 0.12s ease;
}
.admin-tab:hover {
  color: var(--kraft-deep);
  background: var(--paper-2);
}
.admin-tab.is-active {
  color: var(--kraft-deep);
  border-bottom-color: var(--kraft-deep);
}
/* Binnen een tab-paneel is de eerste sectiekop niet meer nodig als extra ruimte. */
.admin-tab-panel > .admin-section:first-child > h3 {
  margin-top: 0;
}
.admin-section {
  margin-bottom: 2rem;
}
.admin-section > h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  margin: 1.4rem 0 0.8rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.35rem;
}
.admin-subhead {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 1rem 0 0.4rem;
}
.admin-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.7rem;
}
.admin-row.admin-add {
  border-style: dashed;
  background: var(--paper-2);
}
.admin-fields {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem 0.8rem;
  min-width: 240px;
}
.admin-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.admin-fields .a-narrow {
  max-width: 110px;
}
.admin-fields .a-full {
  grid-column: 1 / -1;
}
.admin-fields textarea {
  resize: vertical;
}
.admin-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 0 0 auto;
}

/* Hint-tekst onder een veld (bijv. regio-autocomplete) */
.field-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0.35rem 0 0;
}

/* Regio-beheer per land */
.admin-region-country {
  margin: 0.6rem 0 1rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--line);
}
.admin-region-country h5 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  margin: 0.4rem 0 0.5rem;
}
.admin-row.admin-merge {
  background: var(--paper-2);
  border-style: dashed;
}

/* ===== Testdata in detailweergave ===== */
.detail-tests {
  list-style: none;
  margin: 0;
  padding: 0;
}
.detail-tests li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}
.detail-tests li:last-child {
  border-bottom: none;
}
.detail-tests .test-d {
  font-weight: 700;
  flex: 0 0 auto;
  min-width: 5.5rem;
}
.detail-tests .test-n {
  color: var(--ink-soft);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(200%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1.4rem;
  border-radius: 4px;
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 100;
  transition: transform 0.3s ease;
  font-weight: 700;
  max-width: 90vw;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.error {
  background: var(--cat-jam);
}

/* ===== Publieke voorkant ===== */
.site-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 12px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
}
/* Zelfde breedte + zijmarge als .pub-main, zodat het logo links en de
   taalkiezer rechts exact op de randen van de contentkolom uitlijnen. */
.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: block;
  flex: 0 0 auto;
}
.nav-logo img {
  height: 60px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.nav-links a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--kraft-deep);
}
.nav-links a.is-active {
  border-bottom-color: var(--kraft-deep);
  color: var(--kraft-deep);
}
.nav-lang {
  width: auto;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}
/* Rechtergroep: links + taalkiezer + hamburger. Houdt de desktop-uitlijning
   gelijk (logo links, de rest rechts) en groepeert wat op mobiel splitst. */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
/* Hamburger + sluitknop: enkel zichtbaar op mobiel (zie media-query). */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-close {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 0 0.3rem;
}

.pub-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin: 0.25rem 0 1.5rem;
}
.hero-lead {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  line-height: 1.1;
  color: var(--paper);
  text-shadow: 0 1px 3px var(--shadow);
  margin: 0 0 0.6rem;
}
.hero-video,
.about-video {
  position: relative;
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
}
/* In de hero vult de video de volledige (gelijke) rijhoogte; op de About-pagina
   staat de video op zichzelf en houdt hij een vaste 16:9-verhouding. */
.hero-video {
  min-height: 320px;
}
.about-video {
  aspect-ratio: 16 / 9;
}
.hero-video iframe,
.about-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.hero-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  opacity: 0.6;
}
.hero-auth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.75rem 1.5rem 1.5rem;
}
.hero-auth .brand {
  margin-bottom: 1.25rem;
}

/* Publieke sectie + kaarten */
.pub-section-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--paper);
  text-shadow: 0 1px 3px var(--shadow);
  margin: 1.5rem 0 1rem;
}
.pub-none {
  grid-column: 1 / -1;
  color: var(--paper);
  text-shadow: 0 1px 2px var(--shadow);
}
.card-author-link {
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--cat-groente);
  font-weight: 700;
  text-decoration: underline;
  align-self: flex-start;
}
.card-author-link:hover {
  color: var(--cat-groente);
  opacity: 0.8;
}

/* Publieke inhoudspagina's (About / FAQ) */
.pub-page {
  max-width: 820px;
}
.pub-back {
  margin: 0 0 1rem;
}
.pub-back a {
  color: var(--paper);
  text-shadow: 0 1px 2px var(--shadow);
  font-weight: 700;
  text-decoration: none;
}
.pub-back a:hover {
  text-decoration: underline;
}
.pub-article {
  padding: 2rem 1.9rem;
}
.pub-page-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 2rem;
  margin: 0 0 1rem;
}
.pub-article .about-video {
  margin: 0 0 1.25rem;
}
.pub-prose {
  font-size: 1.02rem;
  line-height: 1.65;
}
.pub-prose p {
  margin: 0 0 1rem;
}

/* Auteursprofiel */
.author-box {
  max-width: 1100px;
}
.author-head {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px var(--shadow);
  margin-bottom: 1.5rem;
}
.author-avatar {
  width: 110px;
  height: 110px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.9rem;
  margin: 0 0 0.3rem;
}
.author-ctx {
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}
.author-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.author-social a {
  font-weight: 700;
  color: var(--kraft-deep);
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.88rem;
}
.author-social a:hover {
  background: var(--paper-2);
}
.author-recipes-h {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--paper);
  text-shadow: 0 1px 3px var(--shadow);
  margin: 1.5rem 0 1rem;
}

/* Aanmelden-pagina */
.signin-main {
  display: flex;
  justify-content: center;
  padding-top: 3rem;
}
.signin-main .login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem 2rem;
}

/* Sociale-links-kop in het profielformulier */
.profile-social-head {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.05rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
  }
}
/* Mobiel menu: taalkiezer blijft naast het logo, de drie links verhuizen
   achter de hamburger en klappen verticaal uit als paneel. Breakpoint op
   768px (i.p.v. 640) zodat de hamburger óók verschijnt op brede/opvouwbare
   telefoons, in landschap en in desktopweergave — anders bleven de links
   naast elkaar staan zonder hamburger (o.a. Samsung Internet). */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 1.5rem 1.1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 20px var(--shadow);
  }
  .site-nav.nav-open .nav-links {
    display: flex;
  }
  .nav-close {
    display: block;
    align-self: flex-end;
  }
  .nav-links a {
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child {
    border-bottom: none;
  }
}
@media (max-width: 560px) {
  .recipe-form {
    grid-template-columns: 1fr;
  }
  .controls {
    padding: 0 1rem;
  }
  .recipes-main {
    padding: 1.25rem 1rem 4rem;
  }
  .topbar {
    padding: 0.6rem 1rem;
  }
  /* Zelfde zijmarge als .pub-main op mobiel, zodat de uitlijning klopt. */
  .site-nav-inner {
    padding: 0.6rem 1rem;
  }
  .pub-main {
    padding: 1.25rem 1rem 4rem;
  }
  .topbar-logo {
    height: 44px;
  }
  .nav-logo img {
    height: 46px;
  }
  /* Paneel-zijmarge gelijk aan .site-nav-inner op smalle schermen. */
  .nav-links {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
