:root {
  --ink: #18211f;
  --muted: #64736f;
  --line: #d8e1de;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --green: #126b45;
  --orange: #b26100;
  --red: #b3261e;
  --blue: #17617a;
  --shadow: 0 18px 50px rgba(30, 42, 38, .12);
  --app-font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(23, 97, 122, .14), transparent 34rem),
    linear-gradient(135deg, #f5efe3, #edf4f1 55%, #f8f3e8);
  font-family: var(--app-font-family);
  min-height: 100vh;
}
a { color: var(--blue); }
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1.3rem;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-weight: 800; }
.brand img { width: auto; object-fit: contain; }
.brand img[src="/branding/logo"] { min-width: 0; }
nav { display: flex; gap: .8rem; flex-wrap: wrap; margin-left: auto; }
nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.logout button { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.page { width: min(1320px, calc(100% - 2rem)); margin: 2rem auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.eyebrow { letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-size: .8rem; font-weight: 700; }
h1, h2, h3 { margin-top: 0; line-height: 1.08; }
h1 { font-size: clamp(2rem, 4vw, 4.2rem); }
button, .button {
  background: var(--ink);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: .75rem 1rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.panel, .auth-card, .project-card, .step {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(216,225,222,.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.panel { padding: 1.2rem; margin-bottom: 1rem; overflow-x: auto; }
.auth-card { max-width: 440px; margin: 8vh auto; padding: 2rem; }
.stack { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }
.wide { grid-column: 1 / -1; }
label { display: grid; gap: .35rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .72rem .8rem;
  font: inherit;
  background: white;
}
small, .muted { color: var(--muted); }
.grid.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.project-order-form .grid.projects { grid-template-columns: 1fr; }
.project-order-form { display: grid; gap: 1rem; }
.reorder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.74);
}
.project-card { padding: 1.1rem; border-top: 7px solid var(--green); }
.draggable-project { cursor: grab; transition: transform .16s ease, opacity .16s ease; }
.draggable-project.dragging { opacity: .58; transform: scale(.992); }
.status-groen { border-color: var(--green); }
.status-oranje { border-color: var(--orange); }
.status-rood { border-color: var(--red); }
.card-top, .step-head, .profile-row { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.card-actions { display: flex; align-items: center; gap: .6rem; }
.drag-handle {
  background: #edf4f1;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: .45rem .75rem;
  font-size: .9rem;
}
.status-dot {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.88);
  box-shadow: 0 0 0 3px rgba(24,33,31,.08), 0 8px 20px rgba(24,33,31,.18);
}
.status-dot-groen { background: var(--green); }
.status-dot-oranje { background: var(--orange); }
.status-dot-rood { background: var(--red); }
.pill, .chip {
  display: inline-flex;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #e7efeb;
  color: #25433a;
  font-size: .82rem;
  font-weight: 700;
}
.chip { margin: .2rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.facts-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
dt { color: var(--muted); font-size: .82rem; }
dd { margin: 0; font-weight: 800; }
.summary { color: var(--muted); min-height: 2.5rem; }
.steps { display: grid; gap: 1rem; }
.step { padding: 1rem; border-left: 8px solid var(--line); }
.lane-hardware { border-left-color: #315f9f; }
.lane-software { border-left-color: #7a6230; }
.lane-common_after_join { border-left-color: #2f7865; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-top: .8rem; }
.inline-form input { max-width: 9rem; }
.check { display: flex; align-items: center; grid-auto-flow: column; width: fit-content; }
.check input { width: auto; }
.comments { display: grid; gap: .6rem; margin: .8rem 0; }
.comment { border-left: 3px solid var(--line); padding-left: .75rem; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.checklist { display: grid; gap: .5rem; }
.checklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  border-bottom: 1px solid var(--line);
  padding: .5rem 0;
}
.warning-list { display: grid; gap: .4rem; padding-left: 1rem; }
.warning-list .critical { color: var(--red); }
.warning-list .warning { color: var(--orange); }
.alert { border-radius: 16px; padding: .8rem 1rem; margin: .8rem 0; }
.alert-red { background: #fde8e6; color: var(--red); }
.alert-green { background: #e5f5ec; color: var(--green); }
.helper-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: .9rem 1rem;
  background: linear-gradient(135deg, rgba(231,239,235,.78), rgba(255,255,255,.92));
}
.helper-card h2 { margin-bottom: .45rem; font-size: 1.2rem; }
.helper-card p { margin: .35rem 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: .7rem; vertical-align: top; }
th { color: var(--muted); font-size: .85rem; }
.avatar-large {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  object-fit: cover;
  background: #e7efeb;
  display: grid;
  place-items: center;
  font-weight: 800;
}
@media (max-width: 820px) {
  .topbar, .page-head, .card-top, .step-head, .profile-row { flex-direction: column; align-items: stretch; }
  nav { margin-left: 0; }
  .form-grid, .facts, .facts-wide, .split { grid-template-columns: 1fr; }
}
