:root {
  --primary: #1a472a;
  --primary-light: #2d6a4f;
  --accent: #95d5b2;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --text: #111827;
  --text-muted: #6b7280;
  --white: #ffffff;
  --radius: 0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --danger: #dc2626;
  --danger-light: #b91c1c;
  --warning: #d97706;
  --warning-light: #b45309;
  --info: #2563eb;
  --info-light: #1d4ed8;
  --border: #d1d5db;
  --border-focus: #1a472a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1800px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 40px;
}

/* Header */
header {
  background: var(--primary);
  color: var(--white);
  border-bottom: 4px solid var(--accent);
  width: 100%;
  min-height: 10vh;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 15px;
  /* max-width: 1200px; */
  margin: 0 40px;
  padding: 20px;
}

.logo-img {
  height: 40px;
  /* Constrains height to fit the nav bar */
  width: auto;
  /* Maintains original aspect ratio */
  display: block;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

header a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

header a:hover {
  color: var(--white);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Forms & Inputs */
.form-group,
.veld {
  margin-bottom: 16px;
}

.form-group label,
.veld label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* Standardized Buttons */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-decoration: none;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.btn-primary,
button.ok {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover,
button.ok:hover {
  background: var(--primary-light);
}

.btn-secondary,
button.cancel {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover,
button.cancel:hover {
  background: #e5e7eb;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: var(--danger-light);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-warning:hover {
  background: var(--warning-light);
}

.btn-edit {
  background: var(--info);
  color: var(--white);
}

.btn-edit:hover {
  background: var(--info-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Tables */
.table-container,
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 800px;
}

thead th {
  background: var(--bg-alt);
  color: var(--text);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover td {
  background: #f9fafb;
}

td {
  padding: 12px 16px;
  font-size: 0.9rem;
  vertical-align: middle;
}

/* Modals */
.modal-overlay,
#overlay,
#overlay-verkoop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal,
#modal,
#modal-verkoop {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.modal-warning-header {
  background-color: #fef2f2;
  /* Zacht rood/roze achtergrond */
  border-left: 5px solid #ff6c6c;
  /* Felle rode accentlijn */
  border-right: 5px solid #ff6c6c;
  /* Felle rode accentlijn */
  border-bottom: 1px solid #fee2e2;
  /* Subtiele scheidingslijn onderaan */
  padding: 12px 20px;
  margin: 0;
  color: #993b3b;
  /* Donkerrode tekstkleur voor leesbaarheid */
}

.modal-warning-header p {
  margin: 0;
  font-size: 0.80rem;
  line-height: 1.5;
  font-weight: 600;
  /* Iets dikker om op te vallen zonder icoon */
}

.modal-header,
#modal h3,
#modal-verkoop h3 {
  padding: 20px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-alt);
}

.modal-body {
  padding: 20px;
}

.modal-footer,
.modal-btns {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-alt);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  height: auto;
  padding: 0;
}

.close-btn:hover {
  color: var(--text);
}

/* Messages & Toasts */
.msg,
#form-msg,
#verkoop-form-msg,
#boek-msg {
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-top: 16px;
  display: none;
  font-weight: 500;
  border: 1px solid transparent;
}

.msg.success,
#form-msg.success,
#verkoop-form-msg.success,
#boek-msg.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
  display: block;
}

.msg.error,
#form-msg.error,
#verkoop-form-msg.error,
#boek-msg.error,
#login-fout {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
  display: block;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.9rem;
  animation: slideIn 0.3s ease-out;
  min-width: 250px;
}

.toast.success {
  background: var(--primary);
}

.toast.error {
  background: var(--danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* States & Highlights */
mark {
  background-color: var(--primary);
  color: var(--bg);
  font-weight: inherit;
  padding: 0 2px;
}

/* Public specific */
.controls {
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.search-wrapper {
  flex: 1;
  position: relative;
  min-width: 250px;
}

.search-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-wrapper input {
  padding-left: 36px;
}

.foto-cel {
  width: 50px;
  text-align: center;
}

.boek-icon {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.staat-nieuw {
  color: #1bdbb5;
  font-weight: 500;
}

.staat-zeergoed {
  color: #107a35;
}

.staat-goed {
  color: #5ef219;
}

.staat-redelijk {
  color: #dcdc14;
}

#style-verkoop-banner {
  background: var(--bg-alt);
  padding: 32px;
  border: 1px solid var(--border);
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.banner-text h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--primary);
}

footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0 20px;
  margin-top: 60px;
  width: 100%;
}

.footer-grid {
  max-width: 1800px;
  margin: 0 auto 40px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-section h4 {
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.leeg {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
}

/* Responsive adjustments */
@media (max-width: 768px) {

  .container,
  .header-content,
  .footer-grid {
    padding-left: 20px;
    padding-right: 20px;
  }
}

main {
  min-height: 90vh;
}

#contact {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px;
  background: #AECA14;
  border-radius: 12px;
  line-height: 1.6;
}

#contact h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

#contact p {
  margin-bottom: 16px;
}