html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: #f4f7f6;
  color: #17211f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

code {
  color: #12625a;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #d9e2df;
  background: rgba(250, 252, 251, 0.96);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  font-weight: 750;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: #44524f;
  text-decoration: none;
}

.nav-links a:hover {
  background: #e8efec;
  color: #17211f;
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 760;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: #60716d;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 680;
  text-decoration: none;
}

.btn-primary {
  background: #0f766e;
  color: #fff;
}

.btn-primary:hover {
  background: #0b5f59;
  color: #fff;
}

.btn-outline {
  border-color: #bdccc8;
  background: #fff;
  color: #273633;
}

.btn-outline:hover {
  border-color: #7aa39d;
  background: #edf5f3;
}

.full-width {
  width: 100%;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel,
.work-surface,
.login-panel {
  border: 1px solid #d8e2df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 38, 35, 0.04);
}

.metric {
  padding: 16px;
}

.metric span,
.metric small,
.section-title span,
.table-link small {
  color: #60716d;
}

.metric strong {
  display: block;
  margin: 2px 0;
  font-size: 24px;
  line-height: 1.1;
}

.work-surface,
.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.quick-actions a {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #c9ddd8;
  border-radius: 8px;
  background: #eef8f5;
  color: #183f3b;
  text-decoration: none;
}

.quick-actions a:hover {
  border-color: #7aa39d;
  background: #e3f2ee;
}

.quick-actions strong {
  font-size: 16px;
}

.quick-actions span {
  color: #526763;
}

.module-card {
  min-height: 190px;
  padding: 14px;
  border: 1px solid #dbe5e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.module-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.module-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

.module-card header span {
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dff2ed;
  color: #0f766e;
  text-align: center;
  font-weight: 750;
}

.module-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #4c5c58;
}

.compact-list,
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li,
.check-list li {
  padding: 7px 0;
  border-top: 1px solid #edf1ef;
  color: #41514d;
  font-size: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.notice {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #c9ddd8;
  border-radius: 8px;
  background: #eef8f5;
  color: #1d4b46;
}

.notice.warning {
  border-color: #f2c46c;
  background: #fff7e3;
  color: #66440b;
}

.notice.danger,
.validation {
  border-color: #ec9f9f;
  background: #fff0f0;
  color: #842525;
}

.database-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
}

.table-list,
.data-preview {
  min-height: 620px;
  padding: 16px;
  border: 1px solid #d8e2df;
  border-radius: 8px;
  background: #fff;
}

.filter-row {
  margin-bottom: 12px;
}

.filter-row input,
.login-panel input,
.search-form input,
.search-form select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #c8d5d1;
  border-radius: 6px;
  background: #fff;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}

.search-form label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #40504c;
  font-weight: 680;
}

.search-form label span {
  font-size: 13px;
}

.relatie-filter-form {
  grid-template-columns: minmax(250px, 1.4fr) 140px 130px 130px 100px 110px auto auto;
}

.search-form .check-filter {
  display: inline-flex;
  align-items: center;
  align-self: end;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #c8d5d1;
  border-radius: 6px;
  background: #fff;
}

.search-form .check-filter input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.table-title {
  margin-top: 4px;
}

.table-list nav {
  display: grid;
  gap: 4px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.table-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.table-link:hover,
.table-link.active {
  background: #e8f3f0;
  color: #0f766e;
}

.table-scroll {
  overflow: auto;
  max-height: 560px;
  border: 1px solid #e1e8e6;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  max-width: 280px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf1ef;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.data-table td small {
  display: block;
  margin-top: 2px;
  color: #6b7b77;
}

.domain-scroll {
  max-height: 640px;
}

.naw-grid-scroll {
  min-height: 440px;
  max-height: calc(100vh - 360px);
}

.domain-table td {
  max-width: 360px;
}

.naw-grid-table {
  min-width: 1580px;
}

.naw-grid-table th,
.naw-grid-table td {
  max-width: none;
}

.naw-grid-table .marker-col {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

.contact-marker {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c2413a;
  box-shadow: 0 0 0 2px #ffe2df;
  vertical-align: middle;
}

.box-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: #e8f3f0;
  color: #0f766e;
  font-weight: 760;
}

.date-cell {
  min-width: 150px;
  text-align: right;
}

.days-cell {
  font-weight: 760;
}

.muted-row {
  color: #798783;
  background: #fbfcfc;
}

.strong-cell {
  font-weight: 750;
}

.number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 180px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f1;
  color: #455651;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #f6faf8;
  color: #43534f;
  font-weight: 760;
}

.app-shell:has(.legacy-naw-window),
.legacy-shell {
  max-width: none;
  padding: 0;
}

.legacy-naw-window {
  min-height: 100vh;
  border: 0;
  background: #f5f7f8;
  color: #17211f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.legacy-naw-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 18px;
  border-bottom: 1px solid #d8e2df;
  background: rgba(255, 255, 255, 0.96);
  color: #17211f;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 1px 5px rgba(31, 45, 43, 0.08);
  overflow-x: auto;
}

.legacy-tool,
.legacy-counter,
.legacy-search {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 76px;
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #263633;
  font: inherit;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.legacy-tool,
.legacy-counter {
  cursor: pointer;
}

.legacy-tool:hover,
.legacy-counter:hover,
.legacy-tool.active {
  border-color: #c7d6d2;
  background: #eef5f3;
  color: #0f5f58;
}

.legacy-tool.is-muted {
  color: #777;
}

.legacy-tool b,
.legacy-search span {
  display: block;
  min-height: 15px;
  line-height: 16px;
}

.legacy-search {
  min-width: 290px;
  gap: 7px;
  padding: 0 10px;
}

.legacy-search input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  background: #fff;
  color: #17211f;
  font: 700 14px Inter, ui-sans-serif, system-ui, sans-serif;
  outline: none;
}

.legacy-search input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.legacy-counter {
  grid-template-columns: 28px 1fr;
  align-items: center;
  align-content: center;
  justify-items: start;
  min-width: 84px;
  min-height: 42px;
  padding: 8px 12px;
  text-align: left;
}

.legacy-counter strong {
  font-size: 15px;
}

.legacy-icon {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 6px;
}

.icon-menu {
  background:
    linear-gradient(#5a8fb6, #5a8fb6) 2px 7px / 28px 3px no-repeat,
    linear-gradient(#5a8fb6, #5a8fb6) 2px 15px / 28px 3px no-repeat,
    linear-gradient(#5a8fb6, #5a8fb6) 2px 23px / 28px 3px no-repeat;
}

.icon-new::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 22px;
  height: 18px;
  border: 1px solid #8fa9be;
  border-radius: 3px;
  background: #fff;
}

.icon-new::after {
  content: "+";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8fd19e;
  color: #fff;
  font-size: 18px;
  line-height: 16px;
}

.icon-open::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 18px;
  width: 28px;
  height: 13px;
  border: 1px solid #aaa;
  background: #dedede;
}

.icon-open::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 7px;
  width: 7px;
  height: 24px;
  background: #b6b6b6;
  transform: rotate(45deg);
}

.icon-delete::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  width: 22px;
  height: 28px;
  border: 2px solid #aaa;
  border-top: 4px solid #aaa;
  background: #d6d6d6;
}

.icon-delete::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  width: 26px;
  height: 4px;
  background: #aaa;
}

.icon-print::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  width: 30px;
  height: 18px;
  border: 2px solid #aaa;
  border-radius: 3px;
  background: #cfcfcf;
}

.icon-print::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 5px;
  width: 20px;
  height: 30px;
  border: 1px solid #bbb;
  background: linear-gradient(#fff 0 45%, #e9e9e9 45%);
}

.icon-contact,
.icon-contact-small {
  border-radius: 50%;
  background: #dedede;
}

.icon-contact::before,
.icon-contact-small::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 11px;
  width: 24px;
  height: 18px;
  border: 4px solid #aaa;
  border-top-color: transparent;
  border-radius: 50%;
}

.icon-contact::after,
.icon-contact-small::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ddd2cc;
}

.icon-excel {
  border: 1px solid #7eb58f;
  border-radius: 4px;
  background: #d9f0df;
}

.icon-excel::before {
  content: "X";
  position: absolute;
  left: 4px;
  top: 1px;
  color: #2f9a4a;
  font-size: 24px;
  line-height: 28px;
}

.icon-excel::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 6px;
  width: 10px;
  height: 20px;
  border-left: 1px solid #9bc8a8;
  background:
    linear-gradient(#9bc8a8, #9bc8a8) 0 6px / 10px 1px no-repeat,
    linear-gradient(#9bc8a8, #9bc8a8) 0 13px / 10px 1px no-repeat;
}

.icon-pin {
  width: 32px;
}

.icon-pin::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 17px;
  height: 23px;
  border-radius: 50% 50% 50% 0;
  background: #f07c7c;
  transform: rotate(-45deg);
}

.icon-pin::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.icon-oval {
  width: 32px;
  height: 32px;
}

.icon-oval::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 18px;
  width: 26px;
  height: 10px;
  border: 2px solid #9fbad2;
  border-radius: 50%;
  background: #d8e8f6;
}

.icon-users,
.icon-phone {
  width: 28px;
  height: 28px;
  margin: 0;
}

.icon-users::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f0c47d;
  box-shadow: 10px 0 #f0c47d;
}

.icon-users::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 14px;
  width: 24px;
  height: 9px;
  border-radius: 9px 9px 3px 3px;
  background: #7aaed6;
}

.icon-phone::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 18px;
  height: 18px;
  border: 5px solid #9bd19a;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-35deg);
}

.icon-save::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  width: 26px;
  height: 34px;
  border: 2px solid #8b78ad;
  border-radius: 2px;
  background:
    linear-gradient(#e9f7ff, #e9f7ff) 7px 21px / 15px 9px no-repeat,
    linear-gradient(#6a8294, #6a8294) 15px 3px / 8px 8px no-repeat,
    #f5f1ff;
}

.icon-save::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 24px;
  width: 16px;
  height: 2px;
  background: #9bd3f1;
  box-shadow: 0 5px #9bd3f1;
}

.icon-power {
  border-radius: 50%;
  background: #f05f62;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.icon-power::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 7px;
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: #fff;
}

.icon-power::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 16px;
  height: 16px;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
}

.legacy-naw-toolbar {
  gap: 14px;
  min-height: 82px;
  padding: 14px 36px;
  background: #ffffff;
}

.legacy-naw-toolbar .legacy-tool,
.legacy-naw-toolbar .legacy-counter {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: auto;
  height: 54px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid #d7e3e0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(29, 43, 40, 0.04);
  color: #263633;
}

.legacy-naw-toolbar .legacy-tool:hover,
.legacy-naw-toolbar .legacy-counter:hover,
.legacy-naw-toolbar .legacy-tool.active {
  border-color: #9fc7c0;
  background: #eef8f5;
  color: #0f766e;
  transform: translateY(-1px);
}

.legacy-naw-toolbar .legacy-tool b,
.legacy-naw-toolbar .legacy-search span {
  min-height: auto;
  line-height: 1;
}

.legacy-naw-toolbar .legacy-icon {
  width: 24px;
  height: 24px;
  margin: 0;
}

.legacy-naw-toolbar .icon-menu {
  background:
    linear-gradient(#4f8fb4, #4f8fb4) 2px 5px / 20px 2px no-repeat,
    linear-gradient(#4f8fb4, #4f8fb4) 2px 11px / 20px 2px no-repeat,
    linear-gradient(#4f8fb4, #4f8fb4) 2px 17px / 20px 2px no-repeat;
}

.legacy-naw-toolbar .icon-new::before {
  left: 3px;
  top: 4px;
  width: 17px;
  height: 14px;
  border-radius: 4px;
}

.legacy-naw-toolbar .icon-new::after {
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  font-size: 14px;
  line-height: 12px;
}

.legacy-naw-toolbar .icon-excel::before {
  left: 3px;
  top: 0;
  font-size: 19px;
  line-height: 22px;
}

.legacy-naw-toolbar .icon-excel::after {
  right: 3px;
  top: 5px;
  width: 8px;
  height: 14px;
  background:
    linear-gradient(#9bc8a8, #9bc8a8) 0 4px / 8px 1px no-repeat,
    linear-gradient(#9bc8a8, #9bc8a8) 0 9px / 8px 1px no-repeat;
}

.legacy-naw-toolbar .icon-pin::before {
  left: 6px;
  top: 1px;
  width: 13px;
  height: 18px;
}

.legacy-naw-toolbar .icon-pin::after {
  left: 10px;
  top: 5px;
  width: 6px;
  height: 6px;
}

.legacy-naw-toolbar .icon-oval::before {
  left: 1px;
  top: 13px;
  width: 22px;
  height: 8px;
}

.legacy-naw-toolbar .icon-users {
  width: 24px;
  height: 24px;
}

.legacy-naw-toolbar .icon-users::before {
  left: 4px;
  top: 3px;
  width: 8px;
  height: 8px;
  box-shadow: 8px 0 #f0c47d;
}

.legacy-naw-toolbar .icon-users::after {
  left: 1px;
  top: 13px;
  width: 21px;
  height: 8px;
}

.legacy-naw-toolbar .legacy-search {
  box-sizing: border-box;
  position: relative;
  flex: 0 0 clamp(300px, 24vw, 460px);
  width: clamp(300px, 24vw, 460px);
  max-width: 460px;
  align-self: center;
  justify-items: stretch;
  min-width: 300px;
  min-height: 54px;
  margin: 0 8px 0 2px;
  padding: 0;
}

.legacy-naw-toolbar .legacy-search input {
  box-sizing: border-box;
  display: block;
  height: 54px;
  padding: 0 16px;
  border-radius: 12px;
}

.legacy-naw-toolbar .legacy-search span {
  display: none;
  margin-top: 0;
  color: #526763;
  font-size: 11px;
}

.legacy-naw-toolbar .legacy-search input::placeholder {
  color: #6d7f7b;
  font-weight: 700;
}

.legacy-naw-toolbar .legacy-filter.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.legacy-naw-toolbar .legacy-filter.active .icon-pin::before {
  background: #fff;
}

.legacy-naw-toolbar .legacy-filter.active .icon-pin::after {
  background: #0f766e;
}

.legacy-naw-toolbar .legacy-counter {
  min-width: 74px;
  padding-right: 16px;
  background: #f8fbfa;
}

.legacy-naw-toolbar .legacy-counter strong {
  font-size: 15px;
  line-height: 1;
}

.legacy-grid-scroll {
  min-height: calc(100vh - 99px);
  max-height: calc(100vh - 99px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #f5f7f8;
}

.legacy-grid-scroll .naw-grid-table {
  min-width: 1500px;
  border-collapse: separate;
  border-spacing: 0;
  color: #1f2d2a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 650;
}

.legacy-grid-scroll .naw-grid-table th,
.legacy-grid-scroll .naw-grid-table td {
  height: 38px;
  max-width: none;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #dde6e3;
  border-bottom: 1px solid #e2e9e6;
  color: #1f2d2a;
  line-height: 20px;
  vertical-align: middle;
  white-space: nowrap;
}

.legacy-grid-scroll .naw-grid-table th {
  top: 0;
  height: 42px;
  border-right-color: #1f5f75;
  border-bottom: 1px solid #164d63;
  background: #28708a;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
}

.legacy-sort-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 18px;
  color: #fff;
  text-decoration: none;
}

.legacy-sort-link:hover,
.legacy-sort-link.active {
  color: #fff;
  text-decoration: none;
}

.legacy-sort-link span {
  min-width: 10px;
  font-size: 10px;
  line-height: 1;
}

.legacy-grid-scroll .naw-grid-table td {
  background: #fff;
}

.legacy-grid-scroll .naw-grid-table tbody tr:nth-child(even) td:not(.marker-col) {
  background: #f9fbfa;
}

.legacy-grid-scroll .naw-grid-table tbody tr:hover td:not(.marker-col) {
  background: #eef7f4;
}

.legacy-grid-scroll .naw-grid-table .marker-col {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  padding: 0;
  border-right-color: #1f5f75;
  background: #28708a;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(3),
.legacy-grid-scroll .naw-grid-table td:nth-child(3) {
  min-width: 280px;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(2),
.legacy-grid-scroll .naw-grid-table td:nth-child(2) {
  min-width: 500px;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(4),
.legacy-grid-scroll .naw-grid-table td:nth-child(4) {
  min-width: 88px;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(5),
.legacy-grid-scroll .naw-grid-table td:nth-child(5) {
  min-width: 210px;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(6),
.legacy-grid-scroll .naw-grid-table td:nth-child(6) {
  min-width: 160px;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(7),
.legacy-grid-scroll .naw-grid-table td:nth-child(7) {
  min-width: 220px;
  text-align: right;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(8),
.legacy-grid-scroll .naw-grid-table td:nth-child(8) {
  min-width: 52px;
  text-align: center;
}

.legacy-grid-scroll .naw-grid-table th:nth-child(9),
.legacy-grid-scroll .naw-grid-table td:nth-child(9) {
  min-width: 230px;
  text-align: right;
}

.legacy-grid-scroll .muted-row td:not(.marker-col) {
  color: #61716e;
  background: #f4f6f5;
}

.legacy-row-link {
  color: #17211f;
  text-decoration: none;
}

.legacy-row-link:hover {
  color: #0f766e;
  text-decoration: underline;
}

.relatie-detail-window {
  min-height: 100vh;
  background: #d5e3f1;
  color: #12202a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.relatie-window-tabs {
  display: flex;
  align-items: stretch;
  min-height: 48px;
  border-bottom: 1px solid #86a8c8;
  background: #b7cbe2;
}

.relatie-window-tabs a,
.relatie-window-tabs strong {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-width: 180px;
  padding: 0 16px;
  border-right: 1px solid #7da0bf;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.relatie-window-tabs strong {
  min-width: 340px;
  background: #4187bd;
  color: #ffe75a;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.relatie-window-tabs span {
  margin-left: auto;
  color: #000;
  font-weight: 900;
}

.relatie-toolbar {
  display: flex;
  align-items: stretch;
  gap: 18px;
  min-height: 82px;
  padding: 6px 10px 4px;
  border-bottom: 1px solid #b7c8d8;
  background: #fff;
  overflow-x: auto;
}

.relatie-toolbar .legacy-tool {
  min-width: 68px;
  color: #000;
}

.relatie-toolbar button.legacy-tool {
  appearance: none;
}

.relatie-tabs {
  display: flex;
  min-height: 46px;
  border-bottom: 1px solid #8ca6bd;
  background: #4588b8;
  overflow-x: auto;
}

.relatie-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  padding: 0 20px;
  border: 1px solid #d9e2ea;
  border-top-color: #f8fbfd;
  border-bottom: 0;
  background: #f7f9fb;
  color: #173979;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.relatie-tabs a.active {
  background: #fff;
  color: #0f3b63;
  box-shadow: inset 0 3px 0 #2d83bd;
}

.relatie-stage {
  padding: 24px 32px 44px;
}

.save-message {
  margin: 12px 32px 0;
  padding: 10px 12px;
  border: 1px solid #94c9ad;
  border-radius: 6px;
  background: #e9f7ee;
  color: #205334;
  font-size: 13px;
  font-weight: 780;
}

.save-message.error {
  border-color: #e4a2a2;
  background: #fff0f0;
  color: #7c1f1f;
}

.detail-layout {
  display: grid;
  gap: 24px;
}

.contact-layout {
  grid-template-columns: minmax(620px, 860px) minmax(460px, 1fr);
  align-items: start;
}

.admin-layout {
  grid-template-columns: minmax(560px, 680px) minmax(360px, 520px);
  align-items: start;
}

.route-layout {
  grid-template-columns: minmax(420px, 620px) minmax(520px, 780px);
  align-items: start;
}

.detail-section {
  min-width: 0;
  padding: 20px;
  border: 1px solid #c8d7e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 3px rgba(29, 54, 72, 0.08);
}

.detail-section h2 {
  margin: 0 0 16px;
  color: #163851;
  font-size: 18px;
  font-weight: 820;
}

.detail-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 16px;
}

.admin-form {
  grid-template-columns: minmax(0, 1fr);
}

.detail-field {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #13212c;
  font-size: 13px;
  font-weight: 780;
}

.detail-field.span-2,
.notes-field {
  grid-column: 1 / -1;
}

.detail-field > span {
  text-align: right;
}

.detail-field input,
.detail-field textarea,
.detail-field select,
.detail-search-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9c8d5;
  border-radius: 5px;
  background: #fff;
  color: #111b24;
  font: 700 13px/1.25 Inter, ui-sans-serif, system-ui, sans-serif;
}

.detail-field input,
.detail-field select,
.detail-search-row input {
  height: 34px;
  padding: 0 9px;
}

.detail-field select {
  appearance: auto;
}

.detail-field textarea {
  min-height: 120px;
  padding: 9px;
  resize: vertical;
}

.detail-field textarea.small-area {
  min-height: 74px;
}

.detail-field textarea.medium-area {
  min-height: 112px;
}

.detail-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.detail-inline button,
.coordinate-button {
  min-height: 34px;
  border: 1px solid #b7c7d4;
  border-radius: 5px;
  background: #f4f8fb;
  color: #425565;
  font-weight: 800;
}

.postcode-field {
  grid-template-columns: 150px minmax(120px, 190px);
}

.notes-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.notes-field > span {
  text-align: left;
}

.notes-field textarea {
  min-height: 340px;
}

.coordinate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.coordinate-button {
  display: inline-grid;
  justify-items: center;
  gap: 4px;
  min-width: 124px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
}

.coordinate-icon {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 70% 36%, #b9e8a6 0 12%, transparent 13%),
    radial-gradient(circle at 36% 68%, #a6d994 0 18%, transparent 19%),
    #a7d7f2;
  border: 2px solid #78adc9;
}

.coordinate-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.coordinate-grid .detail-field {
  grid-template-columns: 92px minmax(0, 1fr);
}

.detail-check,
.detail-check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #13212c;
  font-size: 13px;
  font-weight: 800;
}

.detail-check input,
.detail-check-grid input {
  width: 18px;
  height: 18px;
  accent-color: #1268a8;
}

.detail-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
}

.admin-meta {
  grid-column: 1 / -1;
  max-width: 680px;
}

.admin-meta .detail-form {
  grid-template-columns: minmax(0, 1fr);
}

.short-field {
  max-width: 320px;
}

.full-grid-section {
  padding: 0;
  overflow: auto;
}

.detail-table {
  min-width: 820px;
  border-collapse: collapse;
  color: #0d1820;
  font-size: 13px;
  font-weight: 720;
}

.detail-table th,
.detail-table td {
  height: 33px;
  max-width: none;
  border: 1px solid #8b9daa;
  padding: 6px 10px;
  white-space: nowrap;
}

.detail-table th {
  border-color: #276189;
  background: #3f85b7;
  color: #fff;
  font-weight: 820;
}

.detail-table td {
  background: #fff;
}

.compact-table {
  min-width: 520px;
}

.detail-empty {
  margin: 16px;
  color: #556875;
  font-weight: 700;
}

.landkaart-section {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 520px);
  gap: 22px;
}

.detail-map {
  position: relative;
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #9db4c6;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(61, 132, 103, 0.16) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(rgba(61, 132, 103, 0.16) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(135deg, #edf5ed, #d9eaf6 45%, #f3efe3);
}

.detail-map::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  background: #ef6161;
  transform: translateY(-38px) rotate(-45deg);
  box-shadow: 0 4px 12px rgba(54, 70, 82, 0.28);
}

.detail-map::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-38px);
}

.detail-map div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  margin-top: 90px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
  box-shadow: 0 2px 10px rgba(45, 68, 83, 0.14);
}

.detail-map p {
  position: absolute;
  right: 16px;
  bottom: 12px;
  margin: 0;
  color: #435767;
  font-weight: 800;
}

.map-fields {
  align-content: start;
}

.detail-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid #b9c8d5;
  background: #edf4f9;
}

.detail-search-row input {
  max-width: 420px;
}

.detail-search-row span {
  color: #435767;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .contact-layout,
  .admin-layout,
  .route-layout,
  .landkaart-section {
    grid-template-columns: 1fr;
  }

  .relatie-stage {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .relatie-window-tabs strong {
    min-width: 260px;
  }

  .detail-form,
  .coordinate-grid {
    grid-template-columns: 1fr;
  }

  .detail-field,
  .coordinate-grid .detail-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .detail-field > span {
    text-align: left;
  }

  .detail-check-grid {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  display: grid;
  min-height: 520px;
  place-items: center;
  color: #60716d;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 160px);
  place-items: center;
}

.login-panel {
  width: min(420px, 100%);
  padding: 24px;
}

.login-panel h1 {
  margin: 0 0 18px;
  font-size: 28px;
}

.login-panel label {
  display: block;
  margin: 14px 0 6px;
  color: #40504c;
  font-weight: 680;
}

.login-panel button {
  margin-top: 18px;
}

.validation {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 8px;
}

.validation ul {
  margin: 0;
  padding-left: 18px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe5e2;
  border-radius: 8px;
  background: #fbfdfc;
}

.timeline-step span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #dff2ed;
  color: #0f766e;
  font-weight: 780;
}

.timeline-step p {
  margin: 0;
}

@media (max-width: 980px) {
  .metric-grid,
  .module-grid,
  .quick-actions,
  .two-column,
  .database-layout {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .nav-inner,
  .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-links {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .page-head h1 {
    font-size: 30px;
  }
}

.relatie-detail-window {
  min-height: 100vh;
  background: #f4f7f6;
  color: #17211f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.relatie-form {
  min-height: 100vh;
}

.relatie-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  border-bottom: 1px solid #dbe6e3;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 45, 43, 0.06);
}

.relatie-title-block {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.relatie-title-block h1 {
  margin: 0;
  overflow: hidden;
  color: #17211f;
  font-size: 24px;
  font-weight: 820;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relatie-back-link {
  width: fit-content;
  color: #0f766e;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.relatie-back-link:hover {
  text-decoration: underline;
}

.relatie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.relatie-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #d2dfdc;
  border-radius: 8px;
  background: #fff;
  color: #263633;
  font: 780 14px Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.relatie-action:hover {
  border-color: #9fc7c0;
  background: #eef8f5;
  color: #0f766e;
}

.relatie-action.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.relatie-action.primary:hover {
  border-color: #0b5f59;
  background: #0b5f59;
  color: #fff;
}

.relatie-action-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.relatie-action-icon.save::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.relatie-action-icon.save::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.relatie-action-icon.close::before,
.relatie-action-icon.close::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
}

.relatie-action-icon.close::before {
  transform: rotate(45deg);
}

.relatie-action-icon.close::after {
  transform: rotate(-45deg);
}

.relatie-action-icon.history::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.relatie-action-icon.history::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 6px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.relatie-tabs {
  display: flex;
  gap: 8px;
  min-height: auto;
  padding: 12px 32px;
  border-bottom: 1px solid #dbe6e3;
  background: #fff;
  overflow-x: auto;
}

.relatie-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #dbe6e3;
  border-radius: 8px;
  background: #fff;
  color: #40524e;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.relatie-tabs a:hover {
  border-color: #b8ccc7;
  background: #f2f7f5;
  color: #0f766e;
}

.relatie-tabs a.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
  box-shadow: none;
}

.relatie-stage {
  padding: 24px 32px 44px;
  background: #f4f7f6;
}

.save-message {
  margin: 16px 32px 0;
  border-radius: 8px;
  font-size: 13px;
}

.detail-layout {
  display: grid;
  gap: 20px;
  max-width: 1480px;
}

.contact-layout {
  grid-template-columns: minmax(560px, 1fr) minmax(360px, 520px);
  align-items: stretch;
}

.admin-layout {
  grid-template-columns: minmax(480px, 680px) minmax(360px, 520px);
}

.route-layout {
  grid-template-columns: minmax(420px, 620px) minmax(520px, 780px);
}

.detail-section {
  min-width: 0;
  padding: 22px;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 45, 43, 0.05);
}

.detail-section h2 {
  margin: 0 0 18px;
  color: #17211f;
  font-size: 17px;
  font-weight: 820;
}

.detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.admin-form,
.admin-meta .detail-form {
  grid-template-columns: minmax(0, 1fr);
}

.detail-field,
.coordinate-grid .detail-field {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 6px;
  min-width: 0;
  color: #17211f;
  font-size: 13px;
  font-weight: 760;
}

.detail-field > span {
  color: #526763;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  text-align: left;
}

.detail-field input,
.detail-field textarea,
.detail-field select,
.detail-search-row input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  background: #fff;
  color: #17211f;
  font: 680 14px/1.3 Inter, ui-sans-serif, system-ui, sans-serif;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.detail-field input,
.detail-field select,
.detail-search-row input {
  height: 42px;
  padding: 0 12px;
}

.detail-field select.detail-multi-select {
  height: 94px;
  padding: 8px 10px;
}

.detail-field textarea {
  min-height: 130px;
  padding: 11px 12px;
  resize: vertical;
}

.detail-field input:focus,
.detail-field textarea:focus,
.detail-field select:focus,
.detail-search-row input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.detail-field.span-2,
.notes-field {
  grid-column: 1 / -1;
}

.detail-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.detail-inline button,
.coordinate-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  background: #f8fbfa;
  color: #40524e;
  font-weight: 780;
}

.detail-inline button:hover {
  border-color: #9fc7c0;
  background: #eef8f5;
  color: #0f766e;
}

.postcode-field {
  grid-template-columns: 1fr;
}

.notes-section {
  display: grid;
  align-content: start;
}

.notes-field {
  gap: 8px;
  margin-top: 0;
}

.notes-field textarea {
  min-height: 440px;
}

.detail-check,
.detail-check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #17211f;
  font-size: 13px;
  font-weight: 760;
}

.detail-check input,
.detail-check-grid input {
  appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  flex: 0 0 22px;
  place-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #8da19d;
  border-radius: 5px;
  background: #fff;
  color: #fff;
  vertical-align: middle;
}

.detail-check input::before,
.detail-check-grid input::before {
  content: "";
  width: 10px;
  height: 6px;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: rotate(-45deg) scale(0);
}

.detail-check input:checked,
.detail-check-grid input:checked {
  border-color: #0f766e;
  background: #0f766e;
}

.detail-check input:checked::before,
.detail-check-grid input:checked::before {
  transform: rotate(-45deg) scale(1);
}

.detail-check input:focus-visible,
.detail-check-grid input:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.detail-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  min-width: 0;
  min-height: 42px;
}

.detail-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-meta {
  grid-column: 1 / -1;
  max-width: 680px;
}

.full-grid-section {
  padding: 0;
  overflow: auto;
}

.detail-table {
  min-width: 820px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #17211f;
  font-size: 13px;
  font-weight: 680;
}

.detail-table th,
.detail-table td {
  height: 38px;
  max-width: none;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #dde6e3;
  border-bottom: 1px solid #e2e9e6;
  white-space: nowrap;
}

.detail-table th {
  background: #28708a;
  color: #fff;
  font-weight: 820;
  text-align: left;
}

.detail-table td {
  background: #fff;
}

.detail-table tbody tr:nth-child(even) td {
  background: #f9fbfa;
}

.detail-table tbody tr:hover td {
  background: #eef7f4;
}

.detail-empty {
  margin: 16px;
  color: #60716d;
  font-weight: 700;
}

.landkaart-section {
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 520px);
  gap: 20px;
}

.detail-map,
.detail-map div {
  border-radius: 8px;
}

.detail-search-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid #dbe6e3;
  background: #f8fbfa;
}

@media (max-width: 1100px) {
  .relatie-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .relatie-actions {
    width: 100%;
  }

  .relatie-action {
    flex: 1;
  }

  .contact-layout,
  .admin-layout,
  .route-layout,
  .landkaart-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .relatie-detail-header,
  .relatie-tabs,
  .relatie-stage {
    padding-left: 16px;
    padding-right: 16px;
  }

  .relatie-title-block h1 {
    white-space: normal;
  }

  .detail-form,
  .coordinate-grid {
    grid-template-columns: 1fr;
  }

  .detail-inline {
    grid-template-columns: 1fr;
  }

  .detail-check-grid {
    grid-template-columns: 1fr;
  }
}

.relations-window {
  min-height: 100vh;
  padding: 28px 32px 32px;
  background: #f4f7f6;
}

.relations-top {
  display: grid;
  gap: 18px;
}

.relations-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.relations-heading h1 {
  margin: 2px 0 0;
  color: #17211f;
  font-size: 30px;
  font-weight: 830;
  line-height: 1.1;
}

.relations-total {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d7e4e0;
  border-radius: 999px;
  background: #fff;
  color: #40524e;
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 1px 3px rgba(31, 45, 43, 0.04);
}

.relations-toolbar.legacy-naw-toolbar {
  display: grid;
  grid-template-columns: auto minmax(280px, 480px) auto;
  align-items: center;
  gap: 14px;
  min-height: auto;
  padding: 14px;
  border: 1px solid #dbe6e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 45, 43, 0.05);
  overflow: visible;
}

.overview-panel-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 0 2px 8px;
  border-bottom: 1px solid #edf3f1;
}

.overview-panel-heading .eyebrow {
  margin: 0;
  color: #40524e;
  font-size: 13px;
  font-weight: 850;
}

.overview-panel-heading .relations-total {
  height: 30px;
  box-shadow: none;
}

.relations-actions,
.relations-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.relations-filters {
  justify-content: end;
}

.relations-toolbar .legacy-tool,
.relations-toolbar .legacy-counter {
  height: 42px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  border-color: #d8e4e1;
  background: #fff;
  color: #263633;
  box-shadow: none;
  font-size: 13px;
}

.relations-toolbar .legacy-tool:hover,
.relations-toolbar .legacy-counter:hover {
  border-color: #abcac4;
  background: #f4faf8;
  color: #0f766e;
  transform: none;
}

.relations-toolbar .legacy-tool b {
  font-size: 13px;
  font-weight: 780;
}

.relations-toolbar .legacy-icon {
  width: 20px;
  height: 20px;
}

.relations-toolbar .icon-menu {
  background:
    linear-gradient(#4f8fb4, #4f8fb4) 2px 5px / 16px 2px no-repeat,
    linear-gradient(#4f8fb4, #4f8fb4) 2px 10px / 16px 2px no-repeat,
    linear-gradient(#4f8fb4, #4f8fb4) 2px 15px / 16px 2px no-repeat;
}

.relations-toolbar .icon-new::before {
  left: 2px;
  top: 4px;
  width: 14px;
  height: 12px;
}

.relations-toolbar .icon-new::after {
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  font-size: 12px;
  line-height: 10px;
}

.relations-toolbar .icon-excel::before {
  left: 3px;
  top: 0;
  font-size: 16px;
  line-height: 18px;
}

.relations-toolbar .icon-excel::after {
  right: 3px;
  top: 4px;
  height: 12px;
}

.relations-toolbar .icon-pin::before {
  left: 5px;
  top: 1px;
  width: 11px;
  height: 15px;
}

.relations-toolbar .icon-pin::after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 5px;
}

.relations-toolbar .icon-oval::before {
  left: 1px;
  top: 9px;
  width: 18px;
  height: 7px;
}

.relations-toolbar .icon-users {
  width: 20px;
  height: 20px;
}

.relations-toolbar .icon-users::before {
  left: 4px;
  top: 3px;
  width: 6px;
  height: 6px;
  box-shadow: 7px 0 #f0c47d;
}

.relations-toolbar .icon-users::after {
  left: 1px;
  top: 11px;
  width: 18px;
  height: 7px;
}

.relations-toolbar .legacy-search {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 42px;
  margin: 0;
  padding: 0;
}

.relations-toolbar .legacy-search::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 12px;
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 2px solid #8fa39f;
  border-radius: 50%;
}

.relations-toolbar .legacy-search::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 25px;
  z-index: 1;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: #8fa39f;
  transform: rotate(45deg);
}

.relations-toolbar .legacy-search input {
  height: 42px;
  padding: 0 14px 0 42px;
  border-radius: 8px;
  background: #fbfdfc;
  font-size: 14px;
  font-weight: 680;
}

.relations-toolbar .legacy-search input::placeholder {
  color: #6a7f7a;
  font-weight: 700;
}

.relations-toolbar .legacy-filter.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.relations-toolbar .legacy-counter {
  min-width: 72px;
  background: #f8fbfa;
}

.relations-table-shell.legacy-grid-scroll {
  min-height: calc(100vh - 212px);
  max-height: calc(100vh - 212px);
  margin: 20px 0 0;
  border: 1px solid #dbe6e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 45, 43, 0.05);
  overflow: auto;
}

.relations-table-shell .relations-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
  color: #17211f;
  font-size: 13px;
  font-weight: 650;
}

.relations-table-shell .relations-table th,
.relations-table-shell .relations-table td {
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #edf3f1;
  color: #17211f;
  line-height: 20px;
  white-space: nowrap;
}

.relations-table-shell .relations-table th {
  top: 0;
  height: 46px;
  border-bottom: 1px solid #dce8e4;
  background: #fbfdfc;
  color: #526763;
  font-size: 12px;
  font-weight: 780;
  text-align: left;
  box-shadow: 0 1px 0 rgba(31, 45, 43, 0.04);
}

.relations-table-shell .legacy-sort-link {
  color: #526763;
}

.relations-table-shell .legacy-sort-link:hover,
.relations-table-shell .legacy-sort-link.active {
  color: #0f766e;
}

.relations-table-shell .legacy-sort-link span {
  color: #0f766e;
}

.relations-table-shell .relations-table td {
  background: #fff;
}

.relations-table-shell .relations-table tbody tr:nth-child(even) td {
  background: #fbfdfc;
}

.relations-table-shell .relations-table tbody tr:hover td {
  background: #f1f8f6;
}

.relations-table-shell .relations-table tbody tr:last-child td {
  border-bottom: 0;
}

.relations-table-shell .muted-row td {
  color: #697a76;
  background: #f7f9f8;
}

.relations-table-shell .relation-name-cell {
  font-weight: 780;
}

.relations-table-shell .relation-name-cell .contact-marker {
  width: 8px;
  height: 8px;
  margin-right: 9px;
  background: #f28c28;
  box-shadow: 0 0 0 3px #fff1df;
}

.relations-table-shell .legacy-row-link {
  color: #17211f;
  text-decoration: none;
}

.relations-table-shell .legacy-row-link:hover {
  color: #0f766e;
  text-decoration: none;
}

.relations-table-shell .relations-table th:nth-child(1),
.relations-table-shell .relations-table td:nth-child(1) {
  min-width: 420px;
}

.relations-table-shell .relations-table th:nth-child(2),
.relations-table-shell .relations-table td:nth-child(2) {
  min-width: 250px;
}

.relations-table-shell .relations-table th:nth-child(3),
.relations-table-shell .relations-table td:nth-child(3) {
  min-width: 104px;
}

.relations-table-shell .relations-table th:nth-child(4),
.relations-table-shell .relations-table td:nth-child(4) {
  min-width: 170px;
}

.relations-table-shell .relations-table th:nth-child(5),
.relations-table-shell .relations-table td:nth-child(5) {
  min-width: 160px;
}

.relations-table-shell .relations-table th:nth-child(6),
.relations-table-shell .relations-table td:nth-child(6) {
  min-width: 210px;
  text-align: right;
}

.relations-table-shell .relations-table th:nth-child(7),
.relations-table-shell .relations-table td:nth-child(7) {
  min-width: 62px;
  text-align: center;
}

.relations-table-shell .relations-table th:nth-child(8),
.relations-table-shell .relations-table td:nth-child(8) {
  min-width: 210px;
  text-align: right;
}

.relations-table-shell .relations-table th:nth-child(9),
.relations-table-shell .relations-table td:nth-child(9),
.relations-table-shell .relations-table th:nth-child(10),
.relations-table-shell .relations-table td:nth-child(10) {
  min-width: 170px;
}

.relations-table-shell .relations-table th:nth-child(11),
.relations-table-shell .relations-table td:nth-child(11) {
  min-width: 320px;
}

.relations-table-shell .relations-table th:nth-child(12),
.relations-table-shell .relations-table td:nth-child(12) {
  min-width: 100px;
}

@media (max-width: 1100px) {
  .relations-window {
    padding: 20px;
  }

  .relations-heading {
    align-items: start;
    flex-direction: column;
  }

  .relations-toolbar.legacy-naw-toolbar {
    grid-template-columns: 1fr;
  }

  .relations-actions,
  .relations-filters {
    flex-wrap: wrap;
    justify-content: start;
  }

  .relations-table-shell.legacy-grid-scroll {
    min-height: calc(100vh - 300px);
    max-height: calc(100vh - 300px);
  }
}

.page-subtitle {
  max-width: 620px;
  margin: 8px 0 0;
  color: #5f706c;
  font-size: 14px;
  line-height: 1.5;
}

.automaten-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.automaten-metric,
.automaten-panel {
  border: 1px solid #d9e5e2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 43, 39, 0.05);
}

.automaten-metric {
  position: relative;
  min-height: 104px;
  padding: 18px;
  overflow: hidden;
}

.automaten-metric::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(55, 103, 148, 0.12));
}

.automaten-metric span,
.automaten-metric small {
  display: block;
  color: #627470;
}

.automaten-metric span {
  font-size: 13px;
  font-weight: 720;
}

.automaten-metric strong {
  display: block;
  margin: 6px 0 4px;
  color: #142320;
  font-size: 30px;
  line-height: 1;
}

.automaten-metric small {
  font-size: 12px;
}

.automaten-panel {
  padding: 18px;
}

.automaten-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 116px auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
}

.automaten-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.automaten-toolbar label span {
  color: #4f625d;
  font-size: 12px;
  font-weight: 750;
}

.automaten-toolbar input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #cbd9d5;
  border-radius: 8px;
  background: #fbfdfc;
  color: #17211f;
  font: inherit;
  font-weight: 650;
}

.automaten-toolbar input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: 0;
}

.automaten-title {
  align-items: end;
  margin: 6px 0 12px;
}

.automaten-title p {
  margin: 4px 0 0;
  color: #637470;
  font-size: 13px;
}

.automaten-table-shell {
  max-height: calc(100vh - 360px);
  min-height: 520px;
  overflow: auto;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #fff;
}

.automaten-table {
  width: 100%;
  min-width: 1380px;
  border-collapse: separate;
  border-spacing: 0;
  color: #17211f;
  font-size: 13px;
}

.automaten-table th,
.automaten-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #edf3f1;
  border-right: 1px solid #edf3f1;
  text-align: left;
  vertical-align: top;
}

.automaten-table th:last-child,
.automaten-table td:last-child {
  border-right: 0;
}

.automaten-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf9;
  color: #50635e;
  font-size: 12px;
  font-weight: 780;
}

.automaten-table tbody tr:nth-child(even) td {
  background: #fbfdfc;
}

.automaten-table tbody tr:hover td {
  background: #f1f8f6;
}

.automaten-table tbody tr:last-child td {
  border-bottom: 0;
}

.machine-cell {
  min-width: 250px;
}

.machine-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.machine-number {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  background: #e7f2ef;
  color: #0f766e;
  font-weight: 800;
}

.machine-status,
.route-chip,
.placement-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.machine-status.is-active {
  background: #e4f4ed;
  color: #0e6f43;
}

.machine-status.is-muted {
  background: #f1f3f3;
  color: #62706c;
}

.machine-status.is-neutral {
  background: #eef3f6;
  color: #376794;
}

.machine-cell strong,
.machine-location strong,
.config-cell strong,
.money-cell strong,
.payment-cell strong {
  display: block;
  color: #16231f;
  font-weight: 800;
  line-height: 1.35;
}

.machine-cell small,
.machine-location small,
.config-cell small,
.money-cell small,
.payment-cell small {
  display: block;
  margin-top: 4px;
  color: #687a76;
  line-height: 1.35;
}

.machine-location {
  min-width: 320px;
}

.machine-location span {
  display: block;
  margin-top: 4px;
  color: #273633;
  font-weight: 700;
  line-height: 1.35;
}

.place-cell {
  min-width: 140px;
  font-weight: 740;
}

.route-chip {
  background: #fff4df;
  color: #8a5a08;
}

.placement-chip.is-customer {
  background: #e4f4ed;
  color: #0e6f43;
}

.placement-chip.is-storage {
  background: #fff4df;
  color: #8a5a08;
}

.placement-cell small {
  display: block;
  margin-top: 5px;
  color: #687a76;
}

.config-cell {
  min-width: 170px;
}

.date-cell,
.placement-cell,
.money-cell,
.payment-cell {
  min-width: 150px;
}

.money-cell strong {
  font-variant-numeric: tabular-nums;
}

.payment-cell {
  max-width: 210px;
}

.automaten-empty {
  height: 180px;
  color: #627470;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .automaten-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .automaten-toolbar {
    grid-template-columns: 1fr 120px;
  }

  .automaten-toolbar .btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .automaten-metrics,
  .automaten-toolbar {
    grid-template-columns: 1fr;
  }

  .automaten-table-shell {
    max-height: calc(100vh - 420px);
  }
}

.automaten-window {
  padding: 18px 24px 24px;
}

.automaten-top {
  gap: 12px;
}

.automaten-overview-toolbar.relations-toolbar.legacy-naw-toolbar {
  grid-template-columns: auto minmax(180px, 1fr) 92px minmax(170px, 230px) minmax(150px, 210px) auto;
  gap: 10px;
  padding: 10px;
}

.automaten-actions {
  flex-wrap: nowrap;
}

.automaten-overview-toolbar .legacy-tool,
.automaten-overview-toolbar .legacy-counter {
  height: 40px;
  min-height: 40px;
  padding: 0 10px;
}

.automaten-overview-toolbar .legacy-tool.is-muted {
  opacity: 0.68;
}

.automaten-filter-search {
  min-width: 160px;
}

.automaten-count-field,
.automaten-select {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.automaten-count-field span,
.automaten-select span {
  color: #263633;
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
}

.automaten-count-field input,
.automaten-select select {
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd9d5;
  border-radius: 6px;
  background: #fbfdfc;
  color: #17211f;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.automaten-filters {
  flex-wrap: nowrap;
  justify-content: end;
}

.automaten-check {
  position: relative;
}

.automaten-check input,
.automaten-counter input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.automaten-check.active,
.automaten-counter:has(input:checked) {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.automaten-counter {
  min-width: 64px;
  cursor: pointer;
}

.legacy-icon.icon-grid {
  border: 2px solid #9aacb0;
  background:
    linear-gradient(#9aacb0, #9aacb0) 50% 33% / 100% 2px no-repeat,
    linear-gradient(#9aacb0, #9aacb0) 50% 66% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 31%, #9aacb0 31%, #9aacb0 37%, transparent 37%, transparent 63%, #9aacb0 63%, #9aacb0 69%, transparent 69%);
}

.legacy-icon.icon-warehouse {
  border: 2px solid #7ca5bb;
  border-top: 0;
  background: linear-gradient(#dbe9ef, #dbe9ef);
}

.legacy-icon.icon-warehouse::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -6px;
  width: 14px;
  height: 14px;
  border-left: 2px solid #7ca5bb;
  border-top: 2px solid #7ca5bb;
  background: #f4faf8;
  transform: rotate(45deg);
}

.legacy-icon.icon-scale::before,
.legacy-icon.icon-scale::after {
  content: "";
  position: absolute;
  background: #d6a636;
}

.legacy-icon.icon-scale::before {
  left: 8px;
  top: 2px;
  width: 3px;
  height: 17px;
}

.legacy-icon.icon-scale::after {
  left: 3px;
  top: 5px;
  width: 14px;
  height: 2px;
  box-shadow: -3px 9px 0 #d6a636, 3px 9px 0 #d6a636;
}

.legacy-icon.icon-warning {
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 20px solid #e86d70;
}

.legacy-icon.icon-zero {
  border: 3px solid #e86d70;
  border-radius: 50%;
}

.legacy-icon.icon-refresh {
  border: 3px solid #e86d70;
  border-radius: 50%;
}

.legacy-icon.icon-refresh::after {
  content: "24";
  position: absolute;
  inset: 1px 0 0;
  color: #e86d70;
  font-size: 10px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}

.automaten-table-shell.relations-table-shell.legacy-grid-scroll {
  min-height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  margin-top: 10px;
}

.relations-table-shell .automaten-stock-table {
  min-width: 1760px;
  font-size: 13px;
}

.relations-table-shell .automaten-stock-table th,
.relations-table-shell .automaten-stock-table td {
  height: 28px;
  padding: 0 8px;
  border-right: 1px solid #d9e2df;
  border-bottom: 1px solid #d9e2df;
  font-weight: 740;
  line-height: 18px;
}

.relations-table-shell .automaten-stock-table th {
  height: 30px;
  background: #2f7fa8;
  color: #fff;
  font-size: 12px;
}

.relations-table-shell .automaten-stock-table .legacy-sort-link,
.relations-table-shell .automaten-stock-table .legacy-sort-link span {
  color: #fff;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) td {
  background: #fbfdfc;
}

.relations-table-shell .automaten-stock-table tbody tr:hover td {
  background: #eef7f5;
}

.relations-table-shell .automaten-stock-table .muted-row td {
  color: #697a76;
}

.relations-table-shell .automaten-stock-table th:nth-child(1),
.relations-table-shell .automaten-stock-table td:nth-child(1) {
  min-width: 78px;
}

.relations-table-shell .automaten-stock-table th:nth-child(2),
.relations-table-shell .automaten-stock-table td:nth-child(2) {
  min-width: 250px;
}

.relations-table-shell .automaten-stock-table th:nth-child(3),
.relations-table-shell .automaten-stock-table td:nth-child(3) {
  min-width: 145px;
}

.relations-table-shell .automaten-stock-table th:nth-child(4),
.relations-table-shell .automaten-stock-table td:nth-child(4) {
  min-width: 230px;
}

.relations-table-shell .automaten-stock-table th:nth-child(5),
.relations-table-shell .automaten-stock-table td:nth-child(5),
.relations-table-shell .automaten-stock-table th:nth-child(6),
.relations-table-shell .automaten-stock-table td:nth-child(6),
.relations-table-shell .automaten-stock-table th:nth-child(7),
.relations-table-shell .automaten-stock-table td:nth-child(7) {
  min-width: 110px;
}

.relations-table-shell .automaten-stock-table th:nth-child(8),
.relations-table-shell .automaten-stock-table td:nth-child(8),
.relations-table-shell .automaten-stock-table th:nth-child(9),
.relations-table-shell .automaten-stock-table td:nth-child(9) {
  min-width: 120px;
}

.relations-table-shell .automaten-stock-table th:nth-child(n+10),
.relations-table-shell .automaten-stock-table td:nth-child(n+10) {
  min-width: 86px;
  text-align: center;
}

.relations-table-shell .automaten-stock-table .stock-cell.total {
  background: #f7aebd;
}

.relations-table-shell .automaten-stock-table .stock-cell.fris {
  background: #b7dce8;
}

.relations-table-shell .automaten-stock-table .stock-cell.overig {
  background: #f7a51c;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) .stock-cell.total,
.relations-table-shell .automaten-stock-table tbody tr:hover .stock-cell.total {
  background: #f5a7b8;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) .stock-cell.fris,
.relations-table-shell .automaten-stock-table tbody tr:hover .stock-cell.fris {
  background: #acd5e2;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) .stock-cell.overig,
.relations-table-shell .automaten-stock-table tbody tr:hover .stock-cell.overig {
  background: #f3a010;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent {
  font-weight: 850;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-low {
  color: #8f1d2d;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-medium {
  color: #6f4700;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-good {
  color: #173d2d;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-empty {
  color: transparent;
}

.relations-table-shell .automaten-stock-table .stock-head.total {
  background: #2f7fa8;
}

.relations-table-shell .automaten-stock-table .stock-head.fris {
  background: #2f7fa8;
}

.relations-table-shell .automaten-stock-table .stock-head.overig {
  background: #2f7fa8;
}

@media (max-width: 1280px) {
  .automaten-overview-toolbar.relations-toolbar.legacy-naw-toolbar {
    grid-template-columns: 1fr;
  }

  .automaten-actions,
  .automaten-filters {
    flex-wrap: wrap;
    justify-content: start;
  }

  .automaten-table-shell.relations-table-shell.legacy-grid-scroll {
    min-height: calc(100vh - 260px);
    max-height: calc(100vh - 260px);
  }
}

.automaten-window {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 28px 32px 32px;
  background: #f4f7f6;
  row-gap: 20px;
}

.automaten-top {
  gap: 18px;
}

.automaten-heading .relations-total {
  min-width: 0;
}

.automaten-overview-toolbar.relations-toolbar.legacy-naw-toolbar {
  grid-template-columns: auto minmax(520px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.automaten-actions {
  flex-wrap: wrap;
}

.automaten-overview-toolbar .legacy-tool,
.automaten-overview-toolbar .legacy-counter {
  height: 42px;
  min-height: 42px;
  padding: 0 13px;
}

.automaten-overview-toolbar .legacy-tool.is-muted {
  opacity: 0.64;
}

.automaten-toolbar-fields {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 92px minmax(156px, 210px) minmax(132px, 190px);
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.automaten-filter-search {
  min-width: 0;
}

.automaten-count-field,
.automaten-select {
  box-sizing: border-box;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.automaten-count-field span,
.automaten-select span {
  color: #526763;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.automaten-count-field input,
.automaten-select select {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d8e4e1;
  border-radius: 8px;
  background: #fbfdfc;
  color: #17211f;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: 0;
}

.automaten-count-field input:focus,
.automaten-select select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.automaten-filters {
  flex-wrap: wrap;
  justify-content: end;
  max-width: 720px;
}

.automaten-check {
  position: relative;
}

.automaten-check input,
.automaten-counter input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.automaten-check.active,
.automaten-counter:has(input:checked) {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.automaten-check.active .icon-warehouse,
.automaten-counter:has(input:checked) .legacy-icon {
  border-color: currentColor;
}

.automaten-counter {
  min-width: 72px;
  cursor: pointer;
}

.automaten-table-shell.relations-table-shell.legacy-grid-scroll {
  min-height: 0;
  max-height: none;
  height: 100%;
  margin: 0;
  border: 1px solid #dbe6e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 45, 43, 0.05);
}

.relations-table-shell .automaten-stock-table {
  min-width: 1820px;
  table-layout: fixed;
  color: #17211f;
  font-size: 13px;
  font-weight: 650;
}

.relations-table-shell .automaten-stock-table th,
.relations-table-shell .automaten-stock-table td {
  height: 48px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid #edf3f1;
  box-sizing: border-box;
  color: #17211f;
  font-weight: 650;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relations-table-shell .automaten-stock-table th {
  height: 46px;
  border-bottom: 1px solid #dce8e4;
  background: #fbfdfc;
  color: #526763;
  font-size: 12px;
  font-weight: 780;
  text-align: left;
  box-shadow: 0 1px 0 rgba(31, 45, 43, 0.04);
}

.relations-table-shell .automaten-stock-table .legacy-sort-link {
  min-width: 0;
  color: #526763;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relations-table-shell .automaten-stock-table .legacy-sort-link span,
.relations-table-shell .automaten-stock-table .legacy-sort-link:hover,
.relations-table-shell .automaten-stock-table .legacy-sort-link.active {
  color: #0f766e;
}

.relations-table-shell .automaten-stock-table td {
  background: #fff;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) td {
  background: #fbfdfc;
}

.relations-table-shell .automaten-stock-table tbody tr:hover td {
  background: #f1f8f6;
}

.relations-table-shell .automaten-stock-table .muted-row td {
  color: #697a76;
  background: #f7f9f8;
}

.relations-table-shell .automaten-stock-table .date-cell {
  min-width: 0;
  text-align: left;
}

.relations-table-shell .automaten-stock-table th:nth-child(1),
.relations-table-shell .automaten-stock-table td:nth-child(1) {
  width: 116px;
  min-width: 116px;
}

.relations-table-shell .automaten-stock-table th:nth-child(2),
.relations-table-shell .automaten-stock-table td:nth-child(2) {
  width: 310px;
  min-width: 310px;
}

.relations-table-shell .automaten-stock-table th:nth-child(3),
.relations-table-shell .automaten-stock-table td:nth-child(3) {
  width: 132px;
  min-width: 132px;
}

.relations-table-shell .automaten-stock-table th:nth-child(4),
.relations-table-shell .automaten-stock-table td:nth-child(4) {
  width: 230px;
  min-width: 230px;
}

.relations-table-shell .automaten-stock-table th:nth-child(5),
.relations-table-shell .automaten-stock-table td:nth-child(5) {
  width: 90px;
  min-width: 90px;
}

.relations-table-shell .automaten-stock-table th:nth-child(6),
.relations-table-shell .automaten-stock-table td:nth-child(6) {
  width: 100px;
  min-width: 100px;
}

.relations-table-shell .automaten-stock-table th:nth-child(7),
.relations-table-shell .automaten-stock-table td:nth-child(7) {
  width: 120px;
  min-width: 120px;
}

.relations-table-shell .automaten-stock-table th:nth-child(8),
.relations-table-shell .automaten-stock-table td:nth-child(8) {
  width: 126px;
  min-width: 126px;
}

.relations-table-shell .automaten-stock-table th:nth-child(9),
.relations-table-shell .automaten-stock-table td:nth-child(9) {
  width: 88px;
  min-width: 88px;
}

.relations-table-shell .automaten-stock-table th:nth-child(10),
.relations-table-shell .automaten-stock-table td:nth-child(10),
.relations-table-shell .automaten-stock-table th:nth-child(12),
.relations-table-shell .automaten-stock-table td:nth-child(12),
.relations-table-shell .automaten-stock-table th:nth-child(14),
.relations-table-shell .automaten-stock-table td:nth-child(14) {
  width: 86px;
  min-width: 86px;
  text-align: center;
}

.relations-table-shell .automaten-stock-table th:nth-child(11),
.relations-table-shell .automaten-stock-table td:nth-child(11) {
  width: 102px;
  min-width: 102px;
  text-align: center;
}

.relations-table-shell .automaten-stock-table th:nth-child(13),
.relations-table-shell .automaten-stock-table td:nth-child(13) {
  width: 98px;
  min-width: 98px;
  text-align: center;
}

.relations-table-shell .automaten-stock-table th:nth-child(15),
.relations-table-shell .automaten-stock-table td:nth-child(15) {
  width: 104px;
  min-width: 104px;
  text-align: center;
}

.relations-table-shell .automaten-stock-table .stock-cell.total {
  background: #fde8ef;
}

.relations-table-shell .automaten-stock-table .stock-cell.fris {
  background: #e5f5fa;
}

.relations-table-shell .automaten-stock-table .stock-cell.overig {
  background: #fff0cf;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) .stock-cell.total,
.relations-table-shell .automaten-stock-table tbody tr:hover .stock-cell.total {
  background: #fbdce6;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) .stock-cell.fris,
.relations-table-shell .automaten-stock-table tbody tr:hover .stock-cell.fris {
  background: #d7eff7;
}

.relations-table-shell .automaten-stock-table tbody tr:nth-child(even) .stock-cell.overig,
.relations-table-shell .automaten-stock-table tbody tr:hover .stock-cell.overig {
  background: #ffe7ad;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent {
  font-weight: 820;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-low {
  color: #9f1239;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-medium {
  color: #8a5a08;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-good {
  color: #14532d;
}

.relations-table-shell .automaten-stock-table .stock-cell.percent.is-empty {
  color: transparent;
}

.relations-table-shell .automaten-stock-table .stock-head.total,
.relations-table-shell .automaten-stock-table .stock-head.fris,
.relations-table-shell .automaten-stock-table .stock-head.overig {
  background: #fbfdfc;
}

.automaten-number-cell {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.automaten-number-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.automaten-row-number {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.automaten-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.automaten-row-action {
  position: relative;
  display: inline-flex;
  width: 24px;
  height: 24px;
  border: 1px solid #d4e2df;
  border-radius: 7px;
  background: #fff;
  color: #0f766e;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(31, 45, 43, 0.05);
}

.automaten-row-action:hover {
  border-color: #0f766e;
  background: #eaf7f4;
}

.automaten-row-action.edit::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(42deg);
}

.automaten-row-action.edit::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 4px;
  width: 9px;
  height: 2px;
  border-radius: 2px;
  background: #7ea6a0;
}

.automaten-row-action.nayax::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-sizing: border-box;
}

.automaten-row-action.nayax::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow:
    4px 0 0 currentColor,
    0 4px 0 currentColor,
    4px 4px 0 currentColor;
}

.automaat-detail-window {
  background: #f3f6f5;
}

.automaat-detail-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px 30px;
}

.automaat-detail-header .relatie-title-block {
  gap: 8px;
}

.automaat-title-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #526763;
  font-size: 13px;
  font-weight: 720;
}

.automaat-title-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #dae7e3;
  border-radius: 999px;
  background: #f8fbfa;
}

.automaat-tabs {
  position: sticky;
  top: 83px;
  z-index: 9;
  gap: 7px;
  padding: 10px 30px;
  scrollbar-width: thin;
}

.automaat-tabs a {
  height: 34px;
  border-radius: 999px;
}

.automaat-stage {
  min-height: calc(100vh - 150px);
  padding: 22px 30px 38px;
}

.automaat-stage.is-schachten-stage,
.automaat-stage:has(.schachten-overview) {
  min-height: 0;
  padding-bottom: 22px;
}

.change-log-panel {
  margin: 18px 0 0;
  padding: 0;
  overflow: hidden;
}

.change-log-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.change-log-panel summary::-webkit-details-marker {
  display: none;
}

.change-log-panel summary > span:first-child {
  display: grid;
  gap: 2px;
}

.change-log-panel summary strong {
  color: #17211f;
  font-size: 15px;
  font-weight: 850;
}

.change-log-panel summary small {
  color: #60716d;
  font-size: 12px;
  font-weight: 720;
}

.change-log-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef8f5;
  color: #0f766e;
  font-size: 12px;
  font-weight: 850;
}

.change-log-body {
  border-top: 1px solid #e3ece9;
  background: #fff;
}

.change-log-table-wrap {
  overflow: auto;
}

.change-log-table {
  min-width: 900px;
}

.change-log-table td {
  vertical-align: middle;
}

.change-log-value {
  max-width: 320px;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.automaat-gegevens-layout {
  grid-template-columns: minmax(640px, 980px) minmax(360px, 520px);
  align-items: start;
  max-width: 1540px;
}

.automaat-main-panel,
.automaat-data-panel {
  padding: 0;
  overflow: hidden;
}

.automaat-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e3ece9;
  background: #fbfdfc;
}

.automaat-section-heading h2 {
  margin: 0;
}

.automaat-section-heading p {
  margin: 4px 0 0;
  color: #60716d;
  font-size: 12px;
  font-weight: 700;
}

.automaat-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d9e5e1;
  border-radius: 999px;
  background: #fff;
  color: #40524e;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.automaat-status-chip.is-good {
  border-color: #b7dfce;
  background: #ecf9f2;
  color: #166534;
}

.automaat-status-chip.is-warning {
  border-color: #f0d9a3;
  background: #fff8e4;
  color: #8a5a08;
}

.automaat-field-groups {
  display: grid;
  gap: 20px;
  padding: 20px;
}

.automaat-field-group {
  min-width: 0;
}

.automaat-field-group h3 {
  margin: 0 0 12px;
  color: #263633;
  font-size: 14px;
  font-weight: 840;
}

.automaat-detail-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.automaat-detail-form .inline-check {
  box-sizing: border-box;
  align-self: end;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #f8fbfa;
}

.automaat-detail-form input[readonly] {
  background: #f8fbfa;
  color: #40524e;
}

.automaat-form .notes-section {
  align-content: stretch;
}

.automaat-form .notes-field {
  padding: 20px;
}

.automaat-form .notes-field textarea {
  min-height: 430px;
  font-weight: 720;
  line-height: 1.5;
}

.automaat-nayax-modern {
  display: grid;
  gap: 0;
  max-width: none;
}

.automaat-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.automaat-kpi {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 45, 43, 0.05);
}

.automaat-kpi span {
  color: #60716d;
  font-size: 12px;
  font-weight: 760;
}

.automaat-kpi strong {
  color: #17211f;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.automaat-kpi.is-good strong {
  color: #166534;
}

.automaat-kpi.is-warning strong {
  color: #9f1239;
}

.automaat-nayax-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 16px;
  min-height: 0;
  align-items: start;
}

.automaat-table-wrap {
  overflow: auto;
}

.automaat-nayax-modern .automaat-data-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 230px);
}

.automaat-nayax-modern .automaat-table-wrap {
  max-height: calc(100vh - 310px);
}

.automaat-tab-table {
  min-width: 760px;
}

.automaat-nayax-layout .automaat-tab-table {
  min-width: 600px;
}

.automaat-stage .automaat-tab-table,
.automaat-modern-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.automaat-stage .automaat-tab-table th,
.automaat-stage .automaat-tab-table td,
.automaat-modern-table th,
.automaat-modern-table td {
  height: 44px;
  border-right: 0;
  border-bottom: 1px solid #edf3f1;
  padding: 9px 14px;
}

.automaat-stage .automaat-tab-table th,
.automaat-modern-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbfa;
  color: #526763;
  font-size: 12px;
  font-weight: 820;
  text-transform: none;
}

.automaat-stage .automaat-tab-table td {
  background: #fff;
}

.automaat-stage .automaat-tab-table tbody tr:nth-child(even) td,
.automaat-modern-table tbody tr:nth-child(even) td {
  background: #fbfdfc;
}

.automaat-stage .automaat-tab-table tbody tr:hover td,
.automaat-modern-table tbody tr:hover td {
  background: #f0f7f5;
}

.automaat-nayax-modern .automaat-modern-table {
  font-size: 12px;
}

.automaat-nayax-modern .automaat-modern-table th,
.automaat-nayax-modern .automaat-modern-table td {
  height: 23px;
  padding: 2px 8px;
  line-height: 17px;
  vertical-align: middle;
}

.automaat-nayax-modern .automaat-modern-table th {
  height: 26px;
}

.automaat-nayax-modern .automaat-modern-table tfoot td {
  height: 24px;
  border-top: 1px solid #dce8e4;
  background: #f8fbfa;
  color: #17211f;
  font-weight: 850;
}

.automaat-value-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f4;
  color: #40524e;
  font-size: 12px;
  font-weight: 850;
}

.automaat-value-pill.is-good {
  background: #ecf9f2;
  color: #166534;
}

.automaat-value-pill.is-warning {
  background: #fff1f2;
  color: #9f1239;
}

.automaat-empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 260px;
  padding: 30px;
  color: #60716d;
  text-align: center;
}

.automaat-empty-state strong {
  color: #263633;
  font-size: 16px;
  font-weight: 850;
}

.automaat-empty-state span {
  max-width: 360px;
  font-size: 13px;
  font-weight: 700;
}

.schachten-overview {
  display: block;
  min-height: 0;
}

.schachten-board-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.schachten-list-panel {
  display: none;
}

.schachten-control-strip {
  display: grid;
  grid-template-columns: minmax(280px, 0.4fr) minmax(720px, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e3ece9;
  background: #fff;
}

.schijf-summary-card,
.schachten-editor-panel {
  min-width: 0;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #f8fbfa;
  box-shadow: 0 1px 3px rgba(31, 45, 43, 0.04);
}

.schijf-summary-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
}

.schijf-pie {
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid #b9c9c5;
  border-radius: 50%;
  background: conic-gradient(
    #228b45 0 var(--schijf-end),
    #2f80ed var(--schijf-end) var(--dag-end),
    #c92a2a var(--dag-end) 100%
  );
  box-shadow: inset 0 0 0 6px #fff;
}

.schijf-summary-card strong,
.schachten-editor-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #17211f;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schijf-summary-card span,
.schachten-editor-title span {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 4px;
  color: #526763;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schachten-editor-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  padding: 7px 10px;
}

.schachten-editor-product {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.schachten-editor-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #fff;
}

.schachten-editor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.schachten-editor-thumb.is-missing .schacht-image-placeholder {
  display: grid;
  font-size: 10px;
}

.compact-action {
  height: 30px;
  padding: 0 11px;
  font-size: 11px;
}

.schachten-editor-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(84px, 0.7fr) minmax(92px, 0.8fr);
  gap: 6px;
  align-items: end;
}

.schachten-editor-grid .detail-field {
  gap: 3px;
  font-size: 10px;
}

.schachten-editor-grid .detail-field > span {
  font-size: 10px;
}

.schachten-editor-grid input {
  height: 27px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 780;
}

.schachten-editor-check {
  justify-content: start;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #fff;
}

.schachten-editor-check input {
  width: 15px;
  height: 15px;
  padding: 0;
}

.schachten-editor-status {
  min-width: 0;
  color: #0f766e;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
}

.schachten-editor-status.is-error {
  color: #b42318;
}

.schachten-shelves {
  display: grid;
  grid-template-rows: repeat(var(--shelf-rows), 126px);
  gap: 10px;
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 12px 16px 12px 12px;
  background: #f4f7f6;
  scrollbar-gutter: stable;
}

.schachten-shelf-row {
  overflow: hidden;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
  min-height: 0;
  min-width: 100%;
}

.schachten-row-label {
  display: grid;
  place-items: center;
  border: 1px solid #d9e6e2;
  border-radius: 8px;
  background: #fff;
  color: #0f766e;
  font-size: 16px;
  font-weight: 850;
}

.schachten-row-track {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(var(--shelf-columns), minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce7e3;
}

.schacht-card {
  box-sizing: border-box;
  display: grid;
  grid-row: 1;
  grid-template-rows: minmax(0, 1fr) 26px;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce8e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 45, 43, 0.05);
  cursor: pointer;
}

.schacht-card.has-verschil {
  border-color: #dce8e4;
  background: #fff;
}

.schacht-card.is-selected {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.16), 0 6px 16px rgba(31, 45, 43, 0.08);
}

.schacht-card-image,
.schachten-article-thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fbfdfc;
}

.schacht-card-image {
  min-height: 0;
  padding: 12px 10px 8px;
  border-bottom: 1px solid #edf3f1;
}

.schacht-card-image img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.nutrition-badge {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 880;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(31, 45, 43, 0.16);
}

.nutrition-badge.category-0 {
  background: #228b45;
}

.nutrition-badge.category-1 {
  background: #2f80ed;
}

.nutrition-badge.category-2 {
  background: #c92a2a;
}

.schacht-image-placeholder {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #90a19d;
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.schacht-card-image.is-missing .schacht-image-placeholder,
.schachten-article-thumb.is-missing .schacht-image-placeholder {
  display: grid;
}

.schacht-card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 3px 7px;
  background: #fff;
}

.schacht-card-body strong {
  display: block;
  color: #17211f;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.schacht-card-body > div > span {
  display: none;
}

.schacht-card-body span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #40524e;
  font-size: 11px;
  font-weight: 730;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schacht-card-meta {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.schacht-card-meta span {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef5f3;
  color: #47605b;
  font-size: 11px;
  font-weight: 820;
  line-height: 20px;
}

.schachten-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 205px);
}

.schachten-article-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.schachten-article-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf3f1;
  background: #fff;
}

.schachten-article-row:nth-child(even) {
  background: #fbfdfc;
}

.schachten-article-row:hover {
  background: #f0f7f5;
}

.schachten-article-thumb {
  width: 52px;
  height: 52px;
  border: 1px solid #e0ebe7;
  border-radius: 7px;
  background: #fff;
}

.schachten-article-thumb img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.schachten-article-row strong,
.schachten-article-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schachten-article-row strong {
  color: #17211f;
  font-size: 13px;
  font-weight: 820;
}

.schachten-article-row span {
  margin-top: 3px;
  color: #60716d;
  font-size: 12px;
  font-weight: 760;
}

.schachten-overview > .schachten-list-panel {
  display: none;
}

.nayax-info-window {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  background: #f4f7f6;
  overflow: hidden;
}

.nayax-info-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 30px 18px;
  border-bottom: 1px solid #dde8e4;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 45, 43, 0.04);
}

.nayax-info-header h1 {
  margin: 2px 0 0;
  color: #17211f;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.12;
}

.nayax-info-header p {
  margin: 6px 0 0;
  color: #60716d;
  font-size: 13px;
  font-weight: 740;
}

.nayax-info-header .eyebrow {
  margin-top: 10px;
  color: #0f766e;
}

.nayax-info-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 16px;
  min-height: 0;
  padding: 18px 30px 30px;
}

.nayax-info-stage .automaat-data-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: calc(100vh - 150px);
  overflow: hidden;
}

.nayax-info-table-wrap {
  min-height: 0;
  max-height: none;
}

.nayax-info-stage .automaat-modern-table {
  min-width: 620px;
}

.nayax-info-stage .nayax-sales-panel .automaat-modern-table {
  min-width: 560px;
}

@media (max-width: 1400px) {
  .automaat-kpi-strip {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .automaat-gegevens-layout,
  .automaat-nayax-layout,
  .schachten-overview,
  .nayax-info-stage {
    grid-template-columns: 1fr;
  }

  .schachten-list-panel {
    max-height: 420px;
  }

  .schachten-control-strip {
    grid-template-columns: 1fr;
  }

  .schachten-editor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .automaat-form .notes-field textarea {
    min-height: 260px;
  }
}

@media (max-height: 920px) {
  .schachten-shelves {
    grid-template-rows: repeat(var(--shelf-rows), 112px);
    height: auto;
    overflow-y: visible;
  }

  .schacht-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .automaat-detail-header {
    position: static;
    padding: 16px;
  }

  .automaat-tabs {
    position: static;
    padding: 10px 16px;
  }

  .automaat-stage {
    padding: 16px;
  }

  .nayax-info-window {
    overflow: visible;
  }

  .nayax-info-header {
    display: grid;
    padding: 16px;
  }

  .nayax-info-stage {
    padding: 16px;
  }

  .automaat-kpi-strip,
  .schachten-summary-strip,
  .automaat-detail-form {
    grid-template-columns: 1fr;
  }

  .schachten-shelves {
    padding: 12px;
  }

  .schachten-control-strip {
    grid-template-columns: 1fr;
  }

  .schachten-editor-grid {
    grid-template-columns: 1fr;
  }

  .schachten-shelf-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

@media (max-width: 1600px) {
  .automaten-overview-toolbar.relations-toolbar.legacy-naw-toolbar {
    grid-template-columns: auto minmax(420px, 1fr);
  }

  .automaten-filters {
    grid-column: 1 / -1;
    justify-content: start;
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .automaten-window {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 20px;
  }

  .automaten-overview-toolbar.relations-toolbar.legacy-naw-toolbar,
  .automaten-toolbar-fields {
    grid-template-columns: 1fr;
  }

  .automaten-actions,
  .automaten-filters {
    flex-wrap: wrap;
    justify-content: start;
  }

  .automaten-table-shell.relations-table-shell.legacy-grid-scroll {
    min-height: 360px;
    max-height: none;
    height: auto;
    margin: 20px 0 0;
  }
}
