:root {
  --btn-bg: #1e3a8a;
  --btn-bg-hover: #1e40af;
  --btn-text: #ffffff;
  --table-row-even-bg: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  margin: 24px;
  background: #f7f8fa;
  color: #1f2937;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.topbar a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 12px;
  font-size: 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-company {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 15px;
}

.brand-product {
  font-weight: bold;
  color: #93c5fd;
  font-size: 15px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

h1, h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
}

table tbody tr:nth-child(even) {
  background: var(--table-row-even-bg);
}

button.btn,
a.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.25;
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid var(--btn-bg);
  text-decoration: none;
  vertical-align: middle;
}

button.btn-primary,
a.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

button.btn-primary:hover:not(:disabled),
a.btn-primary:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
}

.flash-error { color: #b91c1c; }
.flash-success { color: #065f46; }
.small { color: #6b7280; font-size: 12px; }
.row { display: flex; gap: 16px; align-items: flex-start; }
.col { flex: 1; }

.form-actions {
  margin-top: 14px;
}

.role-cell .role-list {
  margin: 0;
  padding-left: 1.25rem;
}

.role-cell .role-list li {
  margin: 0.15em 0;
}

/* RMA-detail: titel + primaire actie op één lijn */
.transition-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 12px;
}
.transition-section-head h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.transition-section-head .btn-primary {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* RMA-detail: stapel waarin verplichte velden via flex order naar boven gaan */
.transition-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
}

/* RMA-detail: velden voor gekozen statusovergang (verplicht = accent) */
.transition-field {
  border-radius: 6px;
  padding: 10px 12px;
  margin: 6px 0 0;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.transition-field.transition-field--required {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left: 4px solid #d97706;
}
.transition-field.transition-field--required > label:first-child {
  font-weight: 600;
  color: #92400e;
}
.transition-field.transition-field--required input,
.transition-field.transition-field--required select,
.transition-field.transition-field--required textarea {
  border-color: #d97706;
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.25);
}
.transition-hint {
  font-size: 13px;
  color: #6b7280;
  margin: 8px 0 0;
}
.transition-hint strong {
  color: #b45309;
}

/* RMA-detail: status-pills + eindrapport-knop direct na “Afgesloten” */
.status-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 14px;
}
.status-overview-report-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.status-node {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}
.status-node--done {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.status-node--current {
  border-color: #f59e0b;
  background: #ffedd5;
  color: #9a3412;
}

.inline-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.inline-meta-row > strong {
  flex: 0 0 130px;
}

.inline-meta-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}

.compact-input {
  width: min(520px, 60vw);
  margin-top: 0;
  padding: 10px;
}

.compact-select {
  width: min(520px, 60vw);
  margin-top: 0;
  padding: 10px;
}

.btn-compact {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.25;
}

.sortable-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort-arrows {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

.sort-btn {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1;
  padding: 0 3px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.8;
}

.save-change-btn {
  background: #bfdbfe;
  color: #1e3a8a;
  border-color: #93c5fd;
}

.save-change-btn:hover:not(:disabled) {
  background: #93c5fd;
  border-color: #60a5fa;
}

.save-change-btn--active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

.save-change-btn--active:hover:not(:disabled) {
  background: #1e40af;
  border-color: #1e40af;
}
