:root {
  --mf-ink: #102a3d;
  --mf-muted: #617487;
  --mf-line: #d9e3ec;
  --mf-bg: #f6f8fb;
  --mf-surface: #ffffff;
  --mf-blue: #0b5f9f;
  --mf-blue-soft: #e8f3fb;
  --mf-teal: #007f73;
  --mf-amber: #d99200;
  --mf-red: #b42318;
  --mf-shadow: 0 10px 26px rgba(16, 42, 61, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--mf-bg);
}

body {
  background: var(--mf-bg);
  color: var(--mf-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--mf-ink);
  border-bottom: 1px solid var(--mf-line);
  box-shadow: 0 4px 18px rgba(16, 42, 61, 0.06);
  backdrop-filter: blur(10px);
}

header img {
  display: block;
  height: 58px;
  max-width: 180px;
  object-fit: contain;
  margin: 0;
}

.mf-nav,
nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  text-align: center;
}

.mf-nav a,
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--mf-ink);
  background: transparent;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.mf-nav a:hover,
nav a:hover {
  color: var(--mf-blue);
  background: var(--mf-blue-soft);
  border-color: #c8dff0;
  text-decoration: none;
}

.mf-nav a[aria-current="page"] {
  color: #fff;
  background: var(--mf-blue);
  border-color: var(--mf-blue);
}

.user-info {
  min-width: 190px;
  color: var(--mf-muted);
  font-size: 0.86rem;
  text-align: right;
}

.klok-retro {
  display: inline-block;
  min-width: 138px;
  margin-top: 6px;
  padding: 7px 10px;
  background: #102a3d;
  border-radius: 6px;
  box-shadow: none;
}

#klok-digitaal {
  font-size: 1rem;
  letter-spacing: 0;
  text-shadow: none;
}

.datum-retro {
  color: #f2c94c;
  text-shadow: none;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

footer {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 0;
  border: 1px solid var(--mf-line);
  border-radius: 8px 8px 0 0;
  background: var(--mf-surface);
  color: var(--mf-muted);
}

h1,
h2,
h3 {
  color: var(--mf-ink);
  letter-spacing: 0;
}

h1 {
  margin-top: 0;
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 2rem);
}

table {
  overflow: hidden;
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  background: var(--mf-surface);
}

th {
  color: var(--mf-ink);
  background: #edf4fa;
}

td,
th {
  border-color: var(--mf-line) !important;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid #b9c8d6;
  border-radius: 6px;
  background: #fff;
  color: var(--mf-ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(11, 95, 159, 0.16);
  border-color: var(--mf-blue);
}

button,
.btn,
.button,
.btn-ios,
.btn-details,
.btn-edit,
.btn-verzorg,
.btn-uithalen,
.btn-bestemming,
.btn-small,
.btn-back,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: none;
  text-decoration: none;
  font-weight: 750;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

button,
.btn,
.button,
.btn-ios {
  background: var(--mf-amber);
  color: #fff;
}

button:hover,
.btn:hover,
.button:hover,
.btn-ios:hover {
  background: #bd7f00;
  transform: translateY(-1px);
}

.btn-details,
.btn-edit {
  background: var(--mf-blue);
  color: #fff;
}

.btn-details:hover,
.btn-edit:hover {
  background: #084e83;
  color: #fff;
  transform: translateY(-1px);
}

.btn-verzorg,
.btn-bestemming {
  background: var(--mf-teal);
  color: #fff;
}

.btn-verzorg:hover,
.btn-bestemming:hover {
  background: #006b61;
  color: #fff;
}

.btn-uithalen {
  background: #7048a8;
  color: #fff;
}

.btn-uithalen:hover {
  background: #5d3b8d;
  color: #fff;
}

.btn-outline,
.btn-back {
  background: #fff;
  color: var(--mf-blue);
  border-color: #bad4e9;
}

.paspoort-grid,
.transport-kaarten,
.transport-lijst {
  gap: 16px;
}

.paspoort-blits,
.kaart,
.transport-card,
.centrum-keuze-kaart,
.login-card,
.card,
.modal-content {
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  background: var(--mf-surface);
  box-shadow: var(--mf-shadow);
}

.paspoort-blits {
  width: min(100%, 330px);
  padding: 18px;
  color: var(--mf-ink);
  backdrop-filter: none;
}

.paspoort-body h2 {
  color: var(--mf-blue);
}

.paspoort-status,
.bed-badge,
.bed-badge-corner {
  border-radius: 6px;
}

.paspoort-footer {
  gap: 8px;
  flex-wrap: wrap;
}

.paspoort-footer a {
  flex: 1 1 120px;
}

.paspoort-waarschuwing,
.lege-status,
.alert,
.alert-success {
  border-radius: 8px;
}

.transport-card,
.kaart {
  padding: 14px;
}

.mf-searchbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) minmax(150px, auto) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0 22px;
  padding: 14px;
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  background: var(--mf-surface);
  box-shadow: var(--mf-shadow);
}

.mf-searchbar label {
  display: grid;
  gap: 4px;
  color: var(--mf-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.mf-searchbar input,
.mf-searchbar select {
  width: 100%;
}

.mf-timeline {
  display: grid;
  gap: 10px;
  margin: 10px 0 28px;
  padding: 14px;
  border: 1px solid var(--mf-line);
  border-radius: 8px;
  background: var(--mf-surface);
}

.mf-timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.mf-timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--mf-blue);
  box-shadow: 0 0 0 4px var(--mf-blue-soft);
}

.mf-timeline-success .mf-timeline-dot { background: #138a4d; box-shadow: 0 0 0 4px #dff4e9; }
.mf-timeline-care .mf-timeline-dot { background: var(--mf-teal); box-shadow: 0 0 0 4px #d9f1ee; }
.mf-timeline-destination .mf-timeline-dot { background: #7048a8; box-shadow: 0 0 0 4px #eee7f8; }
.mf-timeline-planned .mf-timeline-dot { background: var(--mf-amber); box-shadow: 0 0 0 4px #fff0cf; }
.mf-timeline-danger .mf-timeline-dot { background: var(--mf-red); box-shadow: 0 0 0 4px #fde4e1; }
.mf-timeline-return .mf-timeline-dot { background: #2364aa; box-shadow: 0 0 0 4px #e0eefb; }

.mf-timeline-content {
  display: grid;
  gap: 2px;
}

.mf-timeline-content span,
.mf-timeline-content small {
  color: var(--mf-muted);
}

.mf-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #edf4fa;
  color: var(--mf-ink);
  font-weight: 800;
  font-size: 0.8rem;
}

.mf-status-sent { background: #dff4e9; color: #116239; }
.mf-status-failed { background: #fde4e1; color: #9f1f17; }
.mf-status-skipped { background: #fff0cf; color: #875900; }
.mf-status-pending { background: #e7edf4; color: #43566b; }

.login-card {
  border-radius: 8px;
}

.login-card button,
.login-card .google-login {
  border-radius: 6px;
}

@media (max-width: 820px) {
  header {
    position: static;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .mf-nav,
  nav {
    justify-content: flex-start;
  }

  .user-info {
    width: 100%;
    text-align: left;
  }

  main {
    width: min(100% - 20px, 1280px);
    padding-top: 18px;
  }

  .paspoort-blits {
    width: 100%;
  }

  .mf-searchbar {
    grid-template-columns: 1fr;
  }
}
