* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f4f6f8;
  color: #333;
  font-size: 14px;
}

.top-note {
  font-style: italic;
  color: #9aa3ad;
  padding: 8px 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

header {
  background-color: #1f5f3b;
  color: white;
  padding: 20px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
}

.header-content h1 {
  margin: 0;
}

main {
  padding: 20px;
}

.data {
  overflow-x: auto;
}

button {
  padding: 8px 14px;
  cursor: pointer;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.status {
  display: none;
}

.loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #4b5563;
  font-weight: 600;
}

.loader[hidden] {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cfd6dd;
  border-top-color: #1f5f3b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.menu {
  position: relative;
}

.menu-toggle {
  width: 40px;
  height: 34px;
  border: 1px solid #999;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #333;
}

.menu-panel {
  position: absolute;
  left: 0;
  top: 42px;
  min-width: 180px;
  background: #fff;
  border: 1px solid #cfd6dd;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  z-index: 10;
  display: none;
}

.menu.is-open .menu-panel {
  display: block;
}

.menu-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.menu-option {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  cursor: pointer;
}

.search-input {
  min-width: 260px;
  padding: 8px 10px;
  border: 1px solid #cfd6dd;
  border-radius: 4px;
}

.search-btn {
  padding: 8px 12px;
  border: 1px solid #cfd6dd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: #1b4b8a;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-content {
  position: relative;
  max-width: 720px;
  width: min(92vw, 720px);
  background: #fff;
  margin: 10vh auto 0;
  padding: 20px 22px;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.modal-content-wide {
  max-width: 900px;
  width: min(94vw, 900px);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 0;
  background: #e9eef3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.modal-body {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.login-form input[type="password"] {
  padding: 8px 10px;
  border: 1px solid #cfd6dd;
  border-radius: 4px;
}

.login-remember {
  display: flex;
  gap: 8px;
  align-items: center;
  font-style: normal;
}

.login-error {
  color: #9b1c1c;
  margin-top: 10px;
}

.modal-list {
  margin: 0;
  padding-left: 18px;
}

.file-modal-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.file-modal-count {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

.file-preview {
  display: grid;
  gap: 12px;
}

.file-preview img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 6px;
  background: #f3f4f6;
}

.file-preview .file-link {
  font-weight: 600;
}

.priority-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}

.priority-high {
  background: #ffe6e6;
  color: #9b1c1c;
}

.priority-medium {
  background: #fff4d6;
  color: #8a4b00;
}

.priority-low {
  background: #e9f6ec;
  color: #1e6b35;
}

.top-note-right {
  text-align: right;
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  table-layout: fixed;
}

th, td {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.main-row td {
  border-bottom: 0;
}

thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  text-align: left;
}

td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  width: 60px;
  white-space: nowrap;
}

th:nth-child(3),
td:nth-child(3) {
  width: 26%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 16%;
}

th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6) {
  width: 11%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 90px;
}

th:nth-child(8),
td:nth-child(8) {
  width: 130px;
}

th:nth-child(9),
td:nth-child(9) {
  width: 60px;
}

th:nth-child(10),
td:nth-child(10) {
  width: 70px;
}

.remark-row td {
  white-space: normal;
  background: #fafafa;
  border-bottom: 2px solid #cfd6dd;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.remark-row td::before {
  content: "Opmerking: ";
  font-weight: 600;
}

tr.is-expired {
  opacity: 0.55;
}

.main-row.is-alt td,
.remark-row.is-alt td,
.files-row.is-alt td {
  background: #f2f4f7;
}

tr.main-row.is-urgent td {
  background: rgba(255, 120, 120, 0.28) !important;
}

tr.main-row.is-warning td {
  background: rgba(255, 193, 120, 0.28) !important;
}

.files-row td {
  background: inherit;
  padding-top: 0;
  padding-bottom: 10px;
}

.files-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
