body {
font-family: sans-serif;
margin: 0;
display: flex;
flex-direction: column;
min-height: 100dvh;
}
nav {
/* width: 200px; */
background: #f0f0f0;
/* padding: 1rem; */
/* min-height: 100vh; */
display: flex;
}
nav a {
display: block;
padding: .4rem 0;
color: #333;
text-decoration: none;
flex: 1;
text-align: center;
}
nav a.actief {
font-weight: bold;
color: #06c;
}
nav .submenu a {
padding-left: 1rem;
font-size: .9rem;
}

main {
  flex: 1;
  padding: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

#footer {
  position: sticky;
  bottom: 0;
  background: #f0f0f0;
}
h2, h3 {
	margin: 0px;
	display: inline;
}

ul {
	padding-left: 0.1rem;
}

li {
  padding: 0.3rem;
}

li a { color: black; text-decoration: none; }

.toast {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%) translateY(1rem);
	background: var(--ink);
	color: #fff;
	padding: .7rem 1.1rem;
	border-radius: 8px;
	box-shadow: 0 6px 20px -6px rgba(0,0,0,.4);
	opacity: 0;
	transition: opacity .2s, transform .2s;
	pointer-events: none;   /* never intercepts clicks */
	z-index: 1000;
	text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

:root {
  --bg:        #ffffff;
  --card:      #ffffff;
  --ink:       #1a1a1a;
  --muted:     #6b6b6b;
  --line:      #e0e0e0;
  --accent:    #9c4221;
  --accent-soft: #f5ede8;
}

button,
a.knop {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}

button:hover,
a.knop:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

button:hover,
a.knop:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* primary action */
button.primair,
a.knop.primair {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primair:hover,
a.knop.primair:hover {
  background: #80371a;
  border-color: #80371a;
}

/* destructive */
button.gevaar,
a.knop.gevaar {
  color: #c0392b;
  border-color: #c0392b;
}
button.gevaar:hover,
a.knop.gevaar:hover {
  background: #fdf0ef;
}

/* small — for inline row actions like × and ✎ */
button.klein,
a.knop.klein {
  padding: .2rem .5rem;
  font-size: .8rem;
}

/* ghost — no border, just text, for things like ← Terug */
button.ghost,
a.knop.ghost {
  border-color: transparent;
  background: transparent;
}
button.ghost:hover,
a.knop.ghost:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

#amount, #servings{
	width: 50px;
	padding: 10px;
}

/* #food-info{ */
/* 	border-top: 1px solid grey; */
/* 	border-bottom: 1px solid grey; */
/* 	width: 85%; */
/* 	text-align: left; */
/* 	margin: auto; */
/* 	padding: 10px; */
/* 	margin-top: 15px; */
/* } */


#food-info {
  border-collapse: collapse;
  margin: .5rem auto;
  font-size: .9rem;
}
#food-info th,
#food-info td {
  padding: .3rem .6rem;
  text-align: right;
}
#food-info th {
  font-weight: normal;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
#food-info td:first-child {
  text-align: left;
  color: var(--muted);
}

#food-info th,
#food-info td {
  padding: .3rem .6rem;
  text-align: right;
}
#food-info th {
  font-weight: normal;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
#food-info td:first-child {
  text-align: left;
  color: var(--muted);
}

input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-pair {
  display: flex;
  gap: 1rem;
	justify-content: center;
	padding: 1rem;
	flex-wrap: wrap;
}
.input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.input-group input {
  text-align: center;
}
.input-group label {
  font-size: .85rem;
  color: var(--muted);
}

#preview, .preview {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: .5rem 0;
}


.preview-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.preview-value {
  font-size: 1.2rem;
  font-weight: bold;
}
.preview-label {
  font-size: .8rem;
  color: var(--muted);
}#food-name {
  margin: 0;
  font-size: 1.4rem;
}
#food-brand {
  margin: .2rem 0 0;
  font-size: .9rem;
  color: var(--muted);
}
#food-title {
  margin: .5rem 0 0;
  font-size: 1rem;
  font-weight: normal;
}

.meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meal-header h3 {
  margin: 0;
}
.meal-actions {
  display: flex;
  gap: .4rem;
}

dialog {
	border: 1px solid var(--line);
	border-radius: 6px;
}

#dialog menu {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}
#dialog menu button {
  margin: .3rem;
}
.collapse-icon {
  font-size: .6em;
  vertical-align: middle;
  margin-right: .3rem;
}
small {
	font-weight: normal;
}

.lijst {
  list-style: none;
}

.lijst li::before {
  content: '◦';
  margin-right: .3rem;
  color: var(--muted);
}

.lijst li {
  display: flex;
  align-items: center;
}
.lijst li a {
  flex: 1;
  text-decoration: none;
  color: inherit;
}

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  opacity: .75;
}

hr.total {
	border: none;
	border-top: 4px solid #e0e0e0;
}

#food-search {
  display: block;
  width: 100%;
  padding: .6rem .8rem;
  /* margin: 0 0 .5rem; */
	margin:.5rem 0 .5rem 0;
  /* border: 1px solid var(--line); */
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  box-sizing: border-box;
}

.food-tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: .2rem;
}

.food-tabs button.actief {
  font-weight: bold;
  border-color: var(--accent-soft);
}

#food-rows td:last-child {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

#food-rows tr {
  border-bottom: 1px solid var(--line);
}

#food-rows td {
  padding: .3rem .3rem;
}

#food-rows a {
  text-decoration: none;
  color: inherit;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.page-header h1 {
  margin: 0;
}
.page-header h2 {
  margin: 0;
}

#totalStr {

	/* font-size: 1.3rem; */
	/* text-align: center; */
	margin: 0 0 1rem 0;
	font-weight: normal;
}

.error {
  color: #c0392b;
  font-size: .9rem;
}
nav { display: none; }
.authed nav { display: flex; }

#login-form {
  max-width: 280px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
#login-form label {
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  color: var(--muted);
}
#login-form input {
  margin-top: .3rem;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
#login-form input:focus {
  outline: none;
  border-color: var(--accent);
}
#login-form button {
  margin-top: .5rem;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.page-actions {
  display: flex;
  gap: .4rem;
  margin-left: auto;
}
.row-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
.row-actions button {
  margin-left: .3rem;
}
#food-rows .empty-row td {
  text-align: left;
  width: auto;
}
#quick-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-width: 260px;
}
#quick-form label {
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  color: var(--muted);
}
#quick-form input {
  margin-top: .2rem;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
#quick-form input:focus {
  outline: none;
  border-color: var(--accent);
}
#quick-form menu {
  display: flex;
  gap: .5rem;
  padding: 0;
  margin-top: .5rem;
}
