:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #2b2a27;
  --text-muted: #6b6a65;
  --border: #e7e4dc;
  --accent: #b5603f;
  --accent-dark: #8e4a30;
  --accent-soft: #f1e2da;
  --success: #4a7a52;
  --error: #b5433f;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  --tile-1: #b5603f;
  --tile-2: #8a6d3b;
  --tile-3: #a4443f;
  --tile-4: #6b7a4f;
  --tile-5: #c98a3f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-side { display: flex; align-items: center; }
.navbar-side-right { justify-content: flex-end; }
.navbar-side a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.navbar-side a:hover { color: var(--accent-dark); text-decoration: none; }

.settings-gear {
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted) !important;
}
.settings-gear:hover { color: var(--accent-dark) !important; }

.brand-home {
  justify-self: center;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--accent-dark);
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
}
.brand-home:hover {
  background: var(--accent-soft);
  text-decoration: none;
  color: var(--accent-dark);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.page-header h1 { margin: 0; font-size: 1.6rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--text); }
.btn-danger { background: var(--error); }
.btn-danger:hover { background: #8f302c; }
.btn-small { padding: 0.3rem 0.65rem; font-size: 0.82rem; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.item-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease;
}
.item-card:hover { transform: translateY(-2px); }

.item-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--accent-soft);
}
.item-card .no-photo {
  width: 100%;
  height: 140px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-card .no-photo span {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--accent-dark);
  opacity: 0.7;
}

.item-card .content { padding: 0.85rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.item-card h3 { margin: 0; font-size: 1.05rem; }
.item-card .meta { font-size: 0.82rem; color: var(--text-muted); }

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.filter-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filter-tabs a {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
}
.filter-tabs a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

form .field { margin-bottom: 1rem; }
form label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
input[type=text], input[type=password], input[type=number], input[type=date],
select, textarea, input[type=file] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }

.repeat-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.flashes { margin-bottom: 1rem; }
.flash {
  padding: 0.65rem 1rem;
  border-radius: 9px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.flash.success { background: #e5f0e6; color: var(--success); }
.flash.error { background: #f6e3e2; color: var(--error); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid var(--border);
}
.checklist li.checked { opacity: 0.5; text-decoration: line-through; }
.checklist input[type=checkbox] { width: 1.15rem; height: 1.15rem; }

.status-pill {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-idee { background: #e6e6e6; color: #555; }
.status-droom { background: #e2e6f6; color: #3b4c9e; }
.status-begonnen { background: #fff2d6; color: #9a6a00; }
.status-vastgelopen { background: #f6e3e2; color: var(--error); }
.status-afgerond { background: #e5f0e6; color: var(--success); }
.status-te_kijken { background: #e6e6e6; color: #555; }
.status-bezig { background: #fff2d6; color: #9a6a00; }
.status-gezien { background: #e5f0e6; color: var(--success); }
.status-gepland { background: #e2e6f6; color: #3b4c9e; }
.status-gedaan { background: #e5f0e6; color: var(--success); }

.auth-wrap {
  max-width: 380px;
  margin: 4rem auto;
  padding: 0 1rem;
}
.auth-wrap h1 {
  text-align: center;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 2.2rem;
  color: var(--accent-dark);
}

.photo-strip { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.photo-strip img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; }

.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  min-width: 140px;
}
.stat-box .num { font-size: 1.6rem; font-weight: 700; color: var(--accent-dark); }
.stat-box .label { font-size: 0.8rem; color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }

@media (max-width: 600px) {
  .repeat-row { grid-template-columns: 1fr 1fr; }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-top: 0.5rem;
}

.dash-tile {
  --tile-color: var(--tile-1);
  --tile-image: none;
  position: relative;
  overflow: hidden;
  background-color: var(--surface);
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  border-top: 4px solid var(--tile-color);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
}
.dash-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  text-decoration: none;
  color: var(--text);
}
.dash-label {
  width: 100%;
  padding: 0.75rem 1rem 0.85rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(2px);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.dash-label h2 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
  color: var(--tile-color);
  font-weight: 800;
}
.dash-label p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.dashboard-grid > .dash-tile:nth-child(5n+1) { --tile-color: var(--tile-1); }
.dashboard-grid > .dash-tile:nth-child(5n+2) { --tile-color: var(--tile-2); }
.dashboard-grid > .dash-tile:nth-child(5n+3) { --tile-color: var(--tile-3); }
.dashboard-grid > .dash-tile:nth-child(5n+4) { --tile-color: var(--tile-4); }
.dashboard-grid > .dash-tile:nth-child(5n+5) { --tile-color: var(--tile-5); }

/* ---------------- Recept view: foodblog-stijl ---------------- */

.recipe-view {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: start;
}

.recipe-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.recipe-back:hover { color: var(--accent-dark); }

.recipe-eyebrow {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.6rem;
}
.recipe-eyebrow .dot { margin: 0 0.4rem; opacity: 0.5; }

.recipe-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 2.6rem;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.recipe-actions {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}

.recipe-section { margin-bottom: 2.25rem; }

.recipe-section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--accent-dark);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ingredient-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ingredient-list li {
  display: flex;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.96rem;
}
.ingredient-list li:last-child { border-bottom: none; }
.ingredient-amount {
  font-weight: 700;
  color: var(--accent-dark);
  min-width: 90px;
  flex-shrink: 0;
}
.ingredient-name { color: var(--text); }

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.15rem;
}
.step-number {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-text {
  padding-top: 0.35rem;
  line-height: 1.6;
  color: var(--text);
}

.recipe-delete {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.recipe-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.recipe-delete-btn:hover { color: var(--error); }

.recipe-photo-panel {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recipe-hero-photo {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  aspect-ratio: 4 / 5;
}
.recipe-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-hero-empty {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}
.recipe-hero-empty span {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 6rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.85;
}

.recipe-thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
}
.recipe-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}
.recipe-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 800px) {
  .recipe-view { grid-template-columns: 1fr; gap: 1.5rem; }
  .recipe-photo-panel { position: static; order: -1; }
  .recipe-title { font-size: 2rem; }
}

/* ---------------- Instellingen: kleurthema-kaarten ---------------- */

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

.theme-option {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
  display: block;
}
.theme-option:hover { transform: translateY(-2px); }
.theme-option.selected { border-color: var(--accent); }
.theme-option input[type="radio"] {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: auto;
}

.theme-swatches {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  display: inline-block;
}

.theme-option-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.theme-option-desc { font-size: 0.82rem; color: var(--text-muted); }

/* ---------------- Kleurthema's ---------------- */
/* Standaard (:root hierboven) = Terracotta. Onderstaande blokken overschrijven
   dezelfde CSS-variabelen, dus de rest van het stylesheet hoeft niet aangepast
   te worden - elk element dat var(--accent) etc. gebruikt volgt automatisch mee. */

[data-theme="pastel"] {
  --bg: #fdf6f9;
  --surface: #ffffff;
  --text: #4a3f4a;
  --text-muted: #a08fa0;
  --border: #f0e0ea;
  --accent: #e8a2b8;
  --accent-dark: #c97a94;
  --accent-soft: #fbe8ee;
  --tile-1: #e8a2b8;
  --tile-2: #a8c8e8;
  --tile-3: #b8e0c8;
  --tile-4: #e8d4a2;
  --tile-5: #cbb8e8;
}

[data-theme="mono"] {
  --bg: #f4f4f3;
  --surface: #ffffff;
  --text: #232323;
  --text-muted: #7a7a7a;
  --border: #e2e2e0;
  --accent: #3a3a3a;
  --accent-dark: #1a1a1a;
  --accent-soft: #e8e8e6;
  --tile-1: #4a4a4a;
  --tile-2: #6a6a6a;
  --tile-3: #2a2a2a;
  --tile-4: #8a8a8a;
  --tile-5: #1a1a1a;
}

[data-theme="grijs"] {
  --bg: #eef0f2;
  --surface: #ffffff;
  --text: #22262b;
  --text-muted: #6b7280;
  --border: #dde1e6;
  --accent: #5b6470;
  --accent-dark: #343b42;
  --accent-soft: #e2e5e9;
  --tile-1: #5b6470;
  --tile-2: #8a94a3;
  --tile-3: #3d434b;
  --tile-4: #aab3c0;
  --tile-5: #232830;
}

[data-theme="bruin"] {
  --bg: #f7f1ea;
  --surface: #ffffff;
  --text: #3b2a1e;
  --text-muted: #8a7460;
  --border: #e6d9c8;
  --accent: #6f4630;
  --accent-dark: #4a2e1d;
  --accent-soft: #ecdccb;
  --tile-1: #6f4630;
  --tile-2: #9c6b45;
  --tile-3: #4a2e1d;
  --tile-4: #b08968;
  --tile-5: #7a5230;
}

[data-theme="rood"] {
  --bg: #fdf2f1;
  --surface: #ffffff;
  --text: #2b1615;
  --text-muted: #8a5a56;
  --border: #f3d9d6;
  --accent: #c23b34;
  --accent-dark: #8f2620;
  --accent-soft: #f7ded9;
  --tile-1: #c23b34;
  --tile-2: #e0685f;
  --tile-3: #8f2620;
  --tile-4: #f0958c;
  --tile-5: #701a15;
}

[data-theme="oranje"] {
  --bg: #fdf5ee;
  --surface: #ffffff;
  --text: #2e1f0f;
  --text-muted: #94724a;
  --border: #f3e1cc;
  --accent: #d9772f;
  --accent-dark: #a5541b;
  --accent-soft: #f8e4cf;
  --tile-1: #d9772f;
  --tile-2: #f0a35c;
  --tile-3: #a5541b;
  --tile-4: #f7c088;
  --tile-5: #7d3d12;
}

[data-theme="geel"] {
  --bg: #fdf9ea;
  --surface: #ffffff;
  --text: #332b0a;
  --text-muted: #8f7f3f;
  --border: #f0e6bc;
  --accent: #d9b32f;
  --accent-dark: #a1811a;
  --accent-soft: #f7edc4;
  --tile-1: #d9b32f;
  --tile-2: #e8cc6a;
  --tile-3: #a1811a;
  --tile-4: #f0dd94;
  --tile-5: #7d6110;
}

[data-theme="groen"] {
  --bg: #f1f7f0;
  --surface: #ffffff;
  --text: #182a17;
  --text-muted: #5f8a5a;
  --border: #dcecd9;
  --accent: #4a8a3f;
  --accent-dark: #2f6026;
  --accent-soft: #dcefd6;
  --tile-1: #4a8a3f;
  --tile-2: #7fb571;
  --tile-3: #2f6026;
  --tile-4: #a8d49c;
  --tile-5: #1e4318;
}

[data-theme="blauw"] {
  --bg: #eff4fa;
  --surface: #ffffff;
  --text: #152233;
  --text-muted: #5e7896;
  --border: #d9e5f2;
  --accent: #3572b5;
  --accent-dark: #204d85;
  --accent-soft: #dbe9f7;
  --tile-1: #3572b5;
  --tile-2: #6b9cd4;
  --tile-3: #204d85;
  --tile-4: #a0c3e8;
  --tile-5: #153357;
}

[data-theme="paars"] {
  --bg: #f7f1fa;
  --surface: #ffffff;
  --text: #281a33;
  --text-muted: #8367a0;
  --border: #ecdcf3;
  --accent: #8a4fb5;
  --accent-dark: #602f85;
  --accent-soft: #efdff7;
  --tile-1: #8a4fb5;
  --tile-2: #b083d4;
  --tile-3: #602f85;
  --tile-4: #d1acea;
  --tile-5: #3f1e57;
}

[data-theme="neon"] {
  --bg: #0e0e12;
  --surface: #17171d;
  --text: #f2f2f5;
  --text-muted: #9a9aa5;
  --border: #2a2a34;
  --accent: #39ff8f;
  --accent-dark: #1fe07d;
  --accent-soft: #173322;
  --tile-1: #39ff8f;
  --tile-2: #ff3df0;
  --tile-3: #3df0ff;
  --tile-4: #fff23d;
  --tile-5: #ff6a3d;
}
