:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", sans-serif;
  --ink: #173448;
  --muted: #536778;
  --paper: #ffffff;
  --canvas: #f1f5f7;
  --rule: #dce5ea;
  --navy: #15334e;
  --blue: #225f75;
  --focus: #116ea0;
  --danger: #8e2337;
  --shadow: 0 16px 48px rgb(21 51 78 / .09);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); min-width: 17rem; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus, h1:focus, h2:focus { outline: none; }
h1, h2, p { margin: 0; }
.muted { color: var(--muted); }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 5;
  transform: translateY(-180%);
  background: var(--paper);
  border-radius: .5rem;
  padding: .75rem 1rem;
}
.skip-link:focus { transform: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner {
  max-width: 81rem;
  margin: auto;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  min-height: 4.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.brand, .account { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.brand-mark {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: .72rem;
  background: var(--navy);
  color: var(--paper);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .05em;
}
.brand-name { font-size: .98rem; line-height: 1.3; font-weight: 700; }
.brand-name span { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; margin-top: .13rem; }
.account-name { font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
.account .button { flex: none; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  background: transparent;
  min-height: 2.65rem;
  padding: .58rem .94rem;
  color: inherit;
  font-weight: 650;
  font-size: .87rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.button-primary { background: var(--navy); color: var(--paper); }
.button-primary:hover { background: var(--blue); }
.button-add { background: #fff; color: var(--navy); }
.button-add:hover { background: #e7f3f5; }
.button-add span { font-size: 1.24rem; line-height: .8; }
.button-add:focus-visible { outline-color: #a8e0f1; }
.button-quiet { color: var(--blue); }
.button-quiet:hover { background: #eaf2f5; }
.button-outline { border-color: #c9d7df; background: var(--paper); color: var(--navy); }
.button-outline:not(:disabled):hover { border-color: var(--blue); background: #f0f7f8; }
.button:disabled { cursor: default; opacity: .62; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  margin: clamp(2rem, 11vh, 6rem) auto 2rem;
  width: min(calc(100% - 2rem), 57rem);
  min-height: 29rem;
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
}
.auth-intro, .library-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(120deg, #142f48, #20566e);
  color: #fff;
}
.auth-intro::before, .library-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 100% 100%, rgb(98 204 199 / .19), transparent 65%);
}
.auth-intro::after, .library-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  right: -7rem;
  bottom: -7.25rem;
  transform: rotate(24deg);
  border: 1px solid rgb(255 255 255 / .19);
  border-radius: 3.5rem;
  box-shadow: 0 0 0 1.8rem rgb(255 255 255 / .045), 0 0 0 4rem rgb(255 255 255 / .035);
  pointer-events: none;
}
.auth-intro { display: flex; align-items: center; padding: clamp(1.7rem, 5vw, 3.5rem); }
.intro-content { width: 100%; }
.lock-symbol {
  width: 2.8rem;
  height: 2.8rem;
  display: block;
  position: relative;
  border: 1px solid #6199a9;
  background: rgb(230 250 252 / .08);
  border-radius: .7rem;
  margin-bottom: 1.7rem;
}
.lock-symbol::before, .lock-symbol::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 1.5px solid #e0f3fb; }
.lock-symbol::before { top: .65rem; width: .625rem; height: .7rem; border-bottom: 0; border-radius: .4rem .4rem 0 0; }
.lock-symbol::after { top: 1.27rem; width: .98rem; height: .7rem; border-radius: .18rem; }
.auth-intro h1, .library-hero h1 { letter-spacing: -.055em; font-weight: 720; line-height: 1.13; }
.auth-intro h1 { font-size: clamp(2.08rem, 4vw, 3.38rem); }
.auth-intro p, .library-hero p { color: #d8ebf0; margin-top: .72rem; line-height: 1.55; }
.auth-intro p { max-width: 25ch; font-size: 1.05rem; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 5vw, 3.4rem); }
.auth-panel h2 { font-size: 1.65rem; letter-spacing: -.03em; }
.auth-description { margin: .5rem 0 1.3rem; color: var(--muted); line-height: 1.48; font-size: .93rem; }
.auth-panel form { display: grid; gap: .4rem; }
.auth-panel label:not(:first-child) { margin-top: .48rem; }
.auth-submit { margin-top: .62rem; }
.back-button { width: fit-content; padding-left: 0; }
#mfa-code { width: 10rem; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.account-help { margin-top: 1.35rem; font-size: .84rem; }

label { display: block; font-size: .84rem; color: var(--ink); font-weight: 650; }
input, select {
  min-width: 0;
  min-height: 2.75rem;
  width: 100%;
  border: 1px solid #c4d3dc;
  border-radius: .57rem;
  padding: .55rem .71rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .93rem;
}
input::placeholder { color: #657989; }
input[type="file"] { padding: .36rem; }
input::file-selector-button { color: var(--navy); font: inherit; border: 0; padding: .4rem .6rem; background: #ebf2f6; border-radius: .3rem; margin-right: .6rem; cursor: pointer; }
.notice { border-radius: .55rem; background: #e4f1f2; padding: .75rem .88rem; color: #194c57; font-size: .9rem; line-height: 1.45; }
.notice-error { color: var(--danger); background: #fff1f3; }
.auth-panel .notice { margin-bottom: .8rem; }

.library { max-width: 81rem; padding: 1.65rem clamp(1rem, 4vw, 2.5rem) 3rem; margin: 0 auto; }
.library-hero {
  min-height: 8.9rem;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  border-radius: .98rem;
}
.library-hero h1 { font-size: clamp(2rem, 4vw, 3.06rem); }
.library-hero p { margin-top: .32rem; }
.library-content { margin-top: 1.18rem; }
.filters {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(12rem, 1.7fr) repeat(2, minmax(8.5rem, 1fr)) auto;
  gap: .85rem;
  padding: 1rem 1.12rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: .82rem;
  margin-bottom: 1rem;
}
.filters label { margin-bottom: .33rem; }
.reset-filters { min-height: 2.75rem; }
.library-content > .notice, #retry { margin-bottom: .85rem; }
.results { border: 1px solid var(--rule); border-radius: .82rem; background: var(--paper); overflow: hidden; }
.results-heading { padding: 1.03rem 1.12rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .45rem 1rem; }
.results-heading h2 { font-size: 1.14rem; letter-spacing: -.024em; }
.result-count { color: var(--muted); font-size: .85rem; }
.table-wrap { width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th {
  text-align: left;
  color: #465f70;
  background: #f4f7f9;
  padding: .7rem .68rem;
  font-size: .77rem;
  font-weight: 690;
  border-block: 1px solid var(--rule);
}
td { padding: .78rem .68rem; border-bottom: 1px solid var(--rule); vertical-align: middle; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 1.12rem; width: 41%; }
th:last-child, td:last-child { padding-right: 1.12rem; text-align: right; }
tbody tr:hover { background: #f7fafb; }
.document-title { display: block; line-height: 1.4; font-weight: 670; }
.document-meta { display: block; margin-top: .25rem; color: var(--muted); font-size: .77rem; line-height: 1.4; }
.document-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.status {
  display: inline-block;
  padding: .32rem .56rem;
  border-radius: .35rem;
  color: #4e616e;
  background: #eaf0f3;
  font-weight: 640;
  font-size: .75rem;
  line-height: 1.15;
}
.status-concept { color: #694909; background: #f9efd5; }
.status-definitief { color: #245b4b; background: #e2f0e8; }
.status-vervallen { color: #753e47; background: #f6e8eb; }
.download { white-space: nowrap; min-height: 2.27rem; padding: .45rem .62rem; color: var(--blue); font-size: .81rem; }
.download span { font-size: 1rem; line-height: .7; }
.document-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .13rem; }
.visibility-action { padding: .38rem .4rem; min-height: 2rem; font-size: .76rem; text-align: right; }
.empty-state { padding: 2.5rem 1.12rem; border-top: 1px solid var(--rule); color: var(--muted); text-align: center; }
.pagination { border-top: 1px solid var(--rule); padding: .75rem 1.12rem; display: flex; align-items: center; justify-content: space-between; gap: .65rem; font-size: .84rem; }
.pagination > div { display: flex; gap: .45rem; }

dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100% - 2rem);
  border: 1px solid var(--rule);
  border-radius: .98rem;
  padding: 0;
  box-shadow: var(--shadow);
  color: var(--ink);
}
dialog::backdrop { background: rgb(12 34 51 / .56); }
.dialog-header { padding: .85rem 1.2rem; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dialog-header h2 { font-size: 1.19rem; letter-spacing: -.025em; }
.close-button { font-size: 1.5rem; padding: .25rem .55rem; min-height: 2.3rem; }
.upload-form { padding: 1.15rem 1.2rem 1.2rem; display: grid; gap: .42rem; }
.upload-form > label:not(:first-of-type) { margin-top: .47rem; }
.field-help, .optional { font-size: .8rem; font-weight: 450; color: var(--muted); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: .72rem; margin-top: .47rem; }
.form-columns label { margin-bottom: .42rem; }
.dialog-actions { margin-top: .8rem; display: flex; justify-content: flex-end; gap: .65rem; }
.no-script { max-width: 55rem; margin: .7rem auto; padding: 1rem; text-align: center; }

@media (max-width: 48rem) {
  .auth-layout { min-height: 0; margin-top: 1.65rem; grid-template-columns: 1fr; max-width: 32rem; }
  .auth-intro { padding: 1.45rem 1.6rem; }
  .auth-intro p { max-width: 34ch; font-size: .93rem; }
  .lock-symbol { margin-bottom: .8rem; }
  .auth-panel { padding: 1.5rem 1.6rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-search { grid-column: 1 / -1; }
  .reset-filters { justify-self: start; margin: -.13rem 0 -.2rem -.45rem; }
  .library-hero p { font-size: .91rem; }
}

@media (max-width: 40rem) {
  .table-wrap thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .table-wrap table, .table-wrap tbody { display: block; }
  .table-wrap tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .78rem 1.12rem; border-top: 1px solid var(--rule); gap: .62rem .78rem; }
  .table-wrap td { display: block; border: 0; padding: 0; }
  .table-wrap td:first-child { width: auto; grid-column: 1 / -1; }
  .table-wrap td:last-child { text-align: right; align-self: end; }
  .document-category::before, .document-status::before, .document-date::before { display: block; color: var(--muted); font-size: .72rem; margin-bottom: .2rem; }
  .document-category::before { content: "Categorie"; }
  .document-status::before { content: "Status"; }
  .document-date::before { content: "Datum"; }
  .document-date { white-space: normal; }
}

@media (max-width: 32rem) {
  .header-inner { flex-wrap: wrap; padding-block: .63rem; }
  .account { flex-basis: 100%; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: .28rem; }
  .library { padding-top: 1rem; }
  .library-hero { flex-direction: column; align-items: flex-start; }
  .brand-name span { font-size: .72rem; }
  .form-columns { grid-template-columns: 1fr; gap: .9rem; }
}
