/* De Indruk-huisstijl: navy #030616, blauw #1d38d0, Gilroy/Proxima Nova (met vrije lookalikes) */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/outfit.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/figtree.woff2) format('woff2-variations');
}

:root {
  --f-heading: gilroy, 'Outfit', 'Helvetica Neue', Verdana, sans-serif;
  --f-content: proxima-nova, 'Figtree', 'Helvetica Neue', Verdana, sans-serif;
  --ease: cubic-bezier(0.7, 0, 0.3, 1);

  --primary: #1d38d0;
  --primary-hover: #162ba1;
  --primary-soft: #e9ecfc;
  --primary-faint: #f6f7fe;
  --navy: #030616;

  --bg: #ffffff;
  --panel: #ffffff;
  --sunken: #f5f5f5;
  --line: #e6e6e6;
  --line-strong: #d1d1d1;
  --text: #030616;
  --muted: #707070;
  --on-primary: #ffffff;

  --backlog: #a9a9a9;
  --todo: #20a2df;
  --doing: #ff9620;
  --review: #1d38d0;
  --done: #36ab80;
  --error: #f45422;
  --warning: #f7af22;

  --r-card: 18px;
  --r-panel: 36px;
  --shadow: 0 1px 2px rgba(3, 6, 22, .04), 0 8px 24px rgba(3, 6, 22, .06);
  --shadow-lift: 0 2px 4px rgba(3, 6, 22, .06), 0 16px 40px rgba(3, 6, 22, .10);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #798aec;
    --primary-hover: #bcc5f5;
    --primary-soft: #101e70;
    --primary-faint: #091243;
    --bg: #030616;
    --panel: #091243;
    --sunken: #060c2e;
    --line: #16225e;
    --line-strong: #24318a;
    --text: #f6f7fe;
    --muted: #a9b1d6;
    --on-primary: #030616;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lift: 0 16px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--f-content); }
h1, h2, h3, h4 { font-family: var(--f-heading); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
a { color: var(--primary); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Woordmerk */
.wordmark { font-family: var(--f-heading); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; color: var(--primary); line-height: 1; white-space: nowrap; }
.wordmark small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; font-family: var(--f-content); }

/* Knoppen: pills zoals op deindruk.nl */
.btn {
  border: 1px solid transparent; background: var(--primary); color: var(--on-primary); border-radius: 1000px;
  padding: 10px 20px; font-family: var(--f-heading); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--line); font-weight: 500; }
.btn.ghost:hover { border-color: var(--text); background: var(--panel); }
.btn.link { background: none; border: 0; color: var(--muted); padding: 6px 8px; font-weight: 500; }
.btn.link:hover { color: var(--primary); }
.btn.danger { background: transparent; color: var(--error); border-color: var(--line); font-weight: 500; }
.btn.danger:hover { border-color: var(--error); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 13px; }

input, select, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; outline: none;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 14px 0 6px; }
.err { color: var(--error); margin-top: 10px; min-height: 1em; font-size: 14px; }

/* Login en 2FA */
.auth { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 40px 36px; box-shadow: var(--shadow-lift); }
.auth .wordmark { margin-bottom: 36px; }
.auth h1 { margin: 0 0 6px; font-size: 32px; }
.auth form > .row { flex-direction: column-reverse; align-items: stretch; margin-top: 24px; }
.auth .row .btn { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.auth .row .btn.link { width: auto; align-self: center; padding: 6px; font-size: 14px; }

/* Layout */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 28px 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.side .wordmark { padding: 0 10px 28px; }
.side h4 { font-family: var(--f-content); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 8px 10px 8px; }
.proj { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-radius: 1000px; padding: 9px 12px; cursor: pointer; transition: background .3s var(--ease); }
.proj:hover { background: var(--sunken); }
.proj.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.count { font-size: 11px; font-weight: 700; background: var(--sunken); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.proj.active .count { background: var(--primary); color: var(--on-primary); }
.side .foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 0; }
.side .foot .btn.link { text-align: left; justify-content: flex-start; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: 24px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.top h2 { margin: 0; font-size: 26px; flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top input[type=search] { width: 190px; border-radius: 1000px; padding-left: 18px; }
.top select { width: auto; border-radius: 1000px; padding-left: 16px; padding-right: 32px; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(5, minmax(172px, 1fr)); gap: 12px; padding: 24px; overflow-x: auto; flex: 1; align-items: stretch; background: var(--sunken); }
.col {
  background: color-mix(in srgb, var(--c) 7%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line));
  border-top: 4px solid var(--c);
  border-radius: 24px; padding: 14px 12px 12px; min-height: calc(100vh - 180px);
  transition: background .3s var(--ease);
}
.col h3 { margin: 2px 4px 14px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.col h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.col h3 .count { margin-left: auto; background: var(--panel); }
.col[data-status=backlog] { --c: var(--backlog); }
.col[data-status=todo] { --c: var(--todo); }
.col[data-status=doing] { --c: var(--doing); }
.col[data-status=review] { --c: var(--review); }
.col[data-status=done] { --c: var(--done); }
.col.over { background: color-mix(in srgb, var(--c) 16%, var(--panel)); outline: 2px dashed var(--c); outline-offset: -6px; }
.cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; cursor: grab; box-shadow: var(--shadow);
  text-align: left; width: 100%; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.card.dragging { opacity: .4; }
.card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.card.ghost { position: fixed; z-index: 30; pointer-events: none; transform: rotate(2deg) scale(1.03); box-shadow: var(--shadow-lift); opacity: .95; }
.btn.has-update { position: relative; }
.btn.has-update::after { content: ""; position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--doing); }
.version-ok { color: #1f7a57; margin: 8px 0 0; }
.card .thumb { width: 100%; height: 110px; object-fit: cover; object-position: top; border-radius: 12px; margin-bottom: 10px; background: var(--sunken); display: block; }
.card .txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.card .meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card .meta > span:first-child { font-family: var(--f-heading); font-weight: 600; color: var(--text); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; margin-left: auto; font-family: var(--f-heading); }
.prio { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.prio.hoog { background: #fff5eb; color: #b55604; }
.prio.kritiek { background: #fde6de; color: #c23a10; }
.prio.laag { background: var(--sunken); color: var(--muted); }
.extra { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #e9f6fc; color: #136186; }
.extra-toggle { background: var(--sunken); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; }
.hint { background: var(--primary-faint); border: 1px solid var(--primary-soft); color: var(--text); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; font-size: 14px; }

/* Archief */
.col-action { display: block; width: 100%; margin: -6px 0 12px; background: none; border: 1px dashed color-mix(in srgb, var(--c) 45%, var(--line)); color: var(--muted); border-radius: 1000px; padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .3s var(--ease); }
.col-action:hover { color: var(--text); border-style: solid; border-color: var(--c); background: var(--panel); }
.btn.ghost.active { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary); }
.archive { flex: 1; background: var(--sunken); padding: 24px; }
.archive-head { display: flex; align-items: baseline; gap: 12px; margin: 0 4px 16px; }
.archive-head h3 { margin: 0; font-size: 22px; }
.archive-list { display: flex; flex-direction: column; gap: 10px; max-width: 1100px; }
.arow { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 14px 10px 10px; box-shadow: var(--shadow); }
.athumb { width: 96px; height: 60px; flex: none; border-radius: 10px; object-fit: cover; object-position: top; background: var(--sunken); }
.atext { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.atext .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.atext:hover .txt { color: var(--primary); }
.atext .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--muted); }
.atext .meta strong { color: var(--text); font-family: var(--f-heading); }
.pill { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--sunken); color: var(--muted); }
.pill.s-done { background: color-mix(in srgb, var(--done) 16%, transparent); color: #1f7a57; }
.pill.s-review { background: var(--primary-soft); color: var(--primary); }
.pill.s-doing { background: color-mix(in srgb, var(--doing) 18%, transparent); color: #b55604; }
.pill.s-todo { background: color-mix(in srgb, var(--todo) 16%, transparent); color: #136186; }

/* Drawer */
.overlay { position: fixed; inset: 0; background: rgba(3, 6, 22, .45); z-index: 10; animation: fade .3s var(--ease); }
.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(740px, calc(100vw - 24px)); background: var(--panel); z-index: 11;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lift); border-radius: 28px; overflow: hidden; animation: slide .5s var(--ease);
}
.drawer header { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0 auto 0 0; font-size: 22px; }
.drawer .content { overflow: auto; padding: 24px; flex: 1; }
.shot { width: 100%; border: 1px solid var(--line); border-radius: var(--r-card); display: block; cursor: zoom-in; }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.fields label { margin-top: 0; }
.metagrid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; background: var(--sunken); border-radius: var(--r-card); padding: 16px 18px; margin: 18px 0; }
.metagrid dt { color: var(--muted); }
.metagrid dd { margin: 0; word-break: break-all; }
.desc { white-space: pre-wrap; font-family: var(--f-heading); font-size: 20px; font-weight: 500; line-height: 1.35; cursor: text; }
.comment { border-left: 3px solid var(--line-strong); padding: 4px 0 4px 14px; margin: 14px 0; white-space: pre-wrap; }
.comment.team { border-color: var(--primary); }
.comment.internal { border-color: var(--doing); background: #fff5eb; border-radius: 0 12px 12px 0; padding-right: 12px; }
.tag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--doing); color: var(--navy); border-radius: 999px; padding: 1px 7px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; accent-color: var(--primary); }
.row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.row .left { margin-right: auto; }

/* Modal */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  overflow: auto; background: var(--panel); border-radius: 28px; padding: 32px; z-index: 11; box-shadow: var(--shadow-lift); animation: pop .4s var(--ease);
}
.modal h3 { margin: 0 0 8px; font-size: 26px; }
.modal h4 { margin: 26px 0 4px; font-size: 18px; }
pre.snippet { background: var(--sunken); border-radius: 12px; padding: 14px; overflow-x: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.users { width: 100%; border-collapse: collapse; margin: 12px 0 6px; }
.users td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.invite { background: var(--primary-faint); border: 1px solid var(--primary-soft); border-radius: var(--r-card); padding: 16px; margin: 14px 0; }
.empty { text-align: center; padding: 90px 20px; }
.empty h2 { font-size: 40px; margin: 0 0 10px; }
.empty p { max-width: 460px; margin: 0 auto 24px; }
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(3, 6, 22, .9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (prefers-color-scheme: dark) {
  .prio.hoog, .comment.internal { background: #3a2408; color: #ffcf99; }
  .prio.kritiek { background: #3d160a; color: #ffb199; }
  .extra { background: #093043; color: #a6daf2; }
  :root { --review: #798aec; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .side .wordmark { padding-bottom: 16px; }
  .side .foot { flex-direction: row; flex-wrap: wrap; }
  .top { padding: 18px 16px; }
  .top input[type=search] { width: 100%; }
  .board { grid-template-columns: repeat(5, 260px); padding: 18px 16px; }
  .fields { grid-template-columns: 1fr; }
  .athumb { display: none; }
  .arow { flex-wrap: wrap; }
  .auth { padding: 32px 22px; border-radius: 28px; }
  .modal { padding: 24px 20px; }
}
