/* Herroepen, retourneren en dossierstatus (Releasegroep A1). Huisstijl: navy #0B2030, crème #FBF8EF, goud #D99A27. Alle klassen beginnen met rt- (geen botsing met mpal-app.css). */
.rt, dialog.rt-dialog { --rt-navy: #0B2030; --rt-cream: #FBF8EF; --rt-gold: #D99A27; --rt-gold-ink: #7a5200; --rt-ink: #1d1712; --rt-muted: #5f554a; --rt-line: #e8dccb; --rt-field: #cdbfa9;
  --rt-ok: #1d7a45; --rt-ok-bg: #e8f3ea; --rt-bad: #b3261e; --rt-bad-bg: #fdecea; --rt-warn-bg: #fff2d6; --rt-info-bg: #eaf1f6; --rt-radius: 18px;
  max-width: 780px; margin: 0 auto; padding: 8px 0 56px; font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--rt-ink); line-height: 1.55; }
.rt *, .rt *::before, .rt *::after { box-sizing: border-box; }
.rt h1, .rt h2, .rt h3 { font-family: Georgia, "Times New Roman", serif; color: var(--rt-navy); line-height: 1.25; margin: 0; }
.rt h1 { font-size: clamp(26px, 5.2vw, 36px); }
.rt h2 { font-size: 20px; }
.rt h3 { font-size: 17px; }
.rt p { margin: 0; }
.rt a { color: var(--rt-navy); text-underline-offset: 3px; }
.rt a:focus-visible, .rt button:focus-visible, .rt input:focus-visible, .rt select:focus-visible, .rt textarea:focus-visible, .rt summary:focus-visible { outline: 3px solid var(--rt-navy); outline-offset: 2px; }
.rt-ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rt-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 0 14px; }
.rt-hero { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 20px; }
.rt-hero-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--rt-navy); color: var(--rt-gold); display: grid; place-items: center; flex: none; }
.rt-hero-ico .rt-ico { width: 26px; height: 26px; }
.rt-sub { color: var(--rt-muted); margin-top: 6px; }

.rt-card { background: #fff; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(11, 32, 48, .04); }
.rt-card > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rt-card > h2 .rt-ico { color: var(--rt-gold-ink); }
.rt-card--cream { background: var(--rt-cream); }

.rt-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; list-style: none; margin: 0 0 18px; padding: 0; counter-reset: s; }
.rt-steps li { background: #fff; border: 1px solid var(--rt-line); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; color: var(--rt-muted); counter-increment: s; }
.rt-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rt-cream); color: var(--rt-navy); font-weight: 700; flex: none; border: 1px solid var(--rt-line); }
.rt-steps li[aria-current="step"] { color: var(--rt-navy); border-color: var(--rt-navy); font-weight: 600; }
.rt-steps li[aria-current="step"]::before { background: var(--rt-navy); color: #fff; border-color: var(--rt-navy); }
.rt-steps li.is-done::before { content: "\2713"; background: var(--rt-ok); color: #fff; border-color: var(--rt-ok); }

.rt-form { display: grid; gap: 16px; }
.rt-field { display: grid; gap: 6px; }
.rt-field label, .rt-legend { font-weight: 600; font-size: 15px; color: var(--rt-navy); }
.rt-hint { font-size: 13.5px; color: var(--rt-muted); }
.rt-req { color: var(--rt-bad); }
.rt-input, .rt-select, .rt-textarea { width: 100%; min-height: 48px; border: 1.5px solid var(--rt-field); border-radius: 12px; padding: 11px 14px; font: inherit; color: var(--rt-ink); background: #fff; }
.rt-textarea { min-height: 96px; resize: vertical; }
.rt-input[aria-invalid="true"], .rt-select[aria-invalid="true"], .rt-textarea[aria-invalid="true"] { border-color: var(--rt-bad); background: #fffafa; }
.rt-error { color: var(--rt-bad); font-size: 14px; display: flex; gap: 6px; align-items: flex-start; }
.rt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.rt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--rt-gold); color: var(--rt-navy); transition: filter .15s; }
.rt-btn:hover { filter: brightness(.96); }
.rt-btn[disabled], .rt-btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.rt-btn--navy { background: var(--rt-navy, #0B2030); color: #fff; } /* terugval: ook buiten .rt (dialogen onder <body>) zichtbaar */
.rt-btn--line { background: #fff; border-color: var(--rt-navy, #0B2030); color: var(--rt-navy, #0B2030); }
.rt-btn--danger { background: #fff; border-color: var(--rt-bad); color: var(--rt-bad); }
.rt-btn--small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.rt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.rt-choice { display: grid; gap: 10px; }
.rt-option { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--rt-field); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; }
.rt-option:has(input:checked) { border-color: var(--rt-navy); background: var(--rt-cream); box-shadow: inset 0 0 0 1px var(--rt-navy); }
.rt-option:has(input:focus-visible) { outline: 3px solid var(--rt-navy); outline-offset: 2px; }
.rt-option input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--rt-navy); flex: none; }
.rt-option strong { display: block; color: var(--rt-navy); }
.rt-option small { color: var(--rt-muted); font-size: 13.5px; }

.rt-lines { list-style: none; margin: 0; padding: 0; }
.rt-lines li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0e6d6; }
.rt-lines li:last-child { border-bottom: 0; }
.rt-lines .rt-lname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rt-lines input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--rt-navy); flex: none; }
.rt-qty { width: 78px; min-height: 42px; text-align: center; border: 1.5px solid var(--rt-field); border-radius: 10px; font: inherit; }
.rt-lines li.is-off .rt-lname { color: var(--rt-muted); }

.rt-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: 14px; background: var(--rt-navy); color: #fff; }
.rt-pill--wait { background: var(--rt-warn-bg); color: var(--rt-gold-ink); }
.rt-pill--ok { background: var(--rt-ok-bg); color: var(--rt-ok); }
.rt-pill--bad { background: var(--rt-bad-bg); color: var(--rt-bad); }
.rt-pill--neutral { background: #efe9dd; color: var(--rt-navy); }
.rt-badge { display: inline-block; border-radius: 8px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; background: var(--rt-info-bg); color: var(--rt-navy); }
.rt-badge--bad { background: var(--rt-bad-bg); color: var(--rt-bad); }

.rt-note { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; background: var(--rt-info-bg); margin: 12px 0 0; }
.rt-note .rt-ico { margin-top: 2px; }
.rt-note--warn { background: var(--rt-warn-bg); color: #4d3500; }
.rt-note--bad { background: var(--rt-bad-bg); color: #7a1610; }
.rt-note--ok { background: var(--rt-ok-bg); color: #14532d; }

.rt-progress { display: flex; list-style: none; margin: 8px 0 4px; padding: 0; gap: 6px; }
.rt-progress li { flex: 1; text-align: center; font-size: 12.5px; color: var(--rt-muted); position: relative; padding-top: 22px; }
.rt-progress li::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--rt-line); }
.rt-progress li.is-done::before, .rt-progress li.is-now::before { background: var(--rt-gold); }
.rt-progress li.is-now { color: var(--rt-navy); font-weight: 700; }
.rt-progress li.is-done { color: var(--rt-navy); }

.rt-tl { list-style: none; margin: 8px 0 0; padding: 0 0 0 2px; border-left: 2px solid var(--rt-line); }
.rt-tl li { position: relative; padding: 0 0 14px 20px; font-size: 14.5px; }
.rt-tl li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--rt-gold); border: 2px solid #fff; }
.rt-tl small { display: block; color: var(--rt-muted); }

.rt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14.5px; }
.rt-kv dt { color: var(--rt-muted); }
.rt-kv dd { margin: 0; overflow-wrap: anywhere; }

.rt-thread { display: grid; gap: 10px; margin: 8px 0 14px; }
.rt-msg { max-width: 88%; border-radius: 16px; padding: 10px 14px; background: var(--rt-cream); border: 1px solid var(--rt-line); font-size: 14.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.rt-msg--me { margin-left: auto; background: var(--rt-navy); color: #fff; border-color: var(--rt-navy); }
.rt-msg small { display: block; opacity: .75; margin-top: 4px; font-size: 12px; }

.rt-empty { text-align: center; padding: 26px 12px; color: var(--rt-muted); }
.rt-empty .rt-ico { width: 34px; height: 34px; color: var(--rt-gold-ink); display: block; margin: 0 auto 8px; }
.rt-skel { height: 86px; border-radius: 16px; background: linear-gradient(90deg, #f1e9da, #faf5ea, #f1e9da); background-size: 200% 100%; animation: rt-sk 1.3s linear infinite; margin-bottom: 14px; }
@keyframes rt-sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .rt-skel { animation: none; } }

.rt-success { text-align: center; padding: 8px 0; }
.rt-success .rt-bigico { width: 64px; height: 64px; border-radius: 50%; background: var(--rt-ok-bg); color: var(--rt-ok); display: grid; place-items: center; margin: 0 auto 14px; }
.rt-success .rt-bigico .rt-ico { width: 34px; height: 34px; }
.rt-ref { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .06em; background: var(--rt-cream); border: 1px dashed var(--rt-gold); border-radius: 12px; padding: 8px 16px; margin: 10px 0; color: var(--rt-navy); font-weight: 700; }

.rt details { border-top: 1px solid var(--rt-line); padding: 12px 0; }
.rt details:first-of-type { border-top: 0; }
.rt summary { cursor: pointer; font-weight: 600; color: var(--rt-navy); }
.rt details p { margin-top: 8px; color: var(--rt-muted); font-size: 14.5px; }

.rt-list { display: grid; gap: 10px; }
.rt-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--rt-line); border-radius: 14px; padding: 14px 16px; background: #fff; text-decoration: none; color: inherit; }
.rt-row:hover { border-color: var(--rt-navy); }
.rt-row .rt-grow { flex: 1; min-width: 180px; }

dialog.rt-dialog { border: 0; border-radius: 20px; padding: 0; max-width: min(480px, calc(100vw - 32px)); width: 100%; box-shadow: 0 24px 60px rgba(11, 32, 48, .35); font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--rt-ink, #1d1712); }
dialog.rt-dialog::backdrop { background: rgba(11, 32, 48, .55); }
dialog.rt-dialog form { padding: 24px; display: grid; gap: 14px; }
dialog.rt-dialog h2 { font-family: Georgia, "Times New Roman", serif; color: #0B2030; font-size: 21px; margin: 0; }

.rt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .rt-card { padding: 18px 16px; }
  .rt-steps { grid-template-columns: 1fr; }
  .rt-grid2 { grid-template-columns: 1fr; }
  .rt-btn { width: 100%; }
  .rt-btn--small { width: auto; }
  .rt-kv { grid-template-columns: 1fr; gap: 0; }
  .rt-kv dd { margin-bottom: 8px; }
  .rt-progress li { font-size: 11px; }
  .rt-msg { max-width: 96%; }
}
@media (max-width: 360px) { .rt-hero { flex-direction: column; } .rt-qty { width: 64px; } }

/* Staff views (verkoperdashboard en admin) hergebruiken dezelfde bouwstenen */
.rt-staff .rt-card { box-shadow: none; }
.rt-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rt-chip { border: 1.5px solid var(--rt-field); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--rt-navy); min-height: 38px; }
.rt-chip[aria-pressed="true"] { background: var(--rt-navy); color: #fff; border-color: var(--rt-navy); }

.rt.rt-staff { max-width: none; padding: 0; margin: 0; }
.rt-staff .rt-hero { margin-top: 0; }

/* Productveiligheid in het productformulier van de verkoper */
.vsf { border: 1px solid #e8dccb; border-radius: 16px; padding: 16px 18px; margin: 4px 0 0; background: #fffdf8; }
.vsf legend { font-family: Georgia, "Times New Roman", serif; font-size: 18px; color: #0B2030; padding: 0 8px; }
.vsf-req { font: 600 12px Inter, Arial, sans-serif; background: #fff2d6; color: #7a5200; border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: middle; }
.vsf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 10px; }
.vsf-grid.vsf-one { grid-template-columns: 1fr; }
.vsf-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; cursor: pointer; }
.vsf-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: #0B2030; flex: none; }
.vsf-declare { background: #FBF8EF; border: 1px solid #e8dccb; border-radius: 12px; padding: 12px 14px; }
.vsf-status { font-size: 14px; color: #7a5200; margin: 0 0 10px; }
.vsf-status.is-ok { color: #1d7a45; }
.vsf textarea { min-height: 84px; }
@media (max-width: 640px) { .vsf-grid { grid-template-columns: 1fr; } }

/* thema-onafhankelijk: het WoodMart-thema zet knoppen op Title Case */
.rt .rt-btn, dialog.rt-dialog .rt-btn, .rt .rt-chip { text-transform: none; letter-spacing: normal; }
.rt.rt-pdp { max-width: none; padding: 0 0 24px; margin: 0 0 8px; }

/* thema- en dashboardstijlen overrulen waar ze de nieuwe onderdelen verstoren */
dialog.rt-dialog { max-height: calc(100vh - 32px); overflow: auto; }
dialog.rt-dialog label, dialog.rt-dialog .rt-field label, dialog.rt-dialog .rt-option strong { font-size: 15px; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: normal; margin: 0; }
dialog.rt-dialog .rt-option { align-items: flex-start; }
dialog.rt-dialog .rt-option input { width: 20px; height: 20px; margin: 2px 0 0; }
dialog.rt-dialog p { font-size: 15px; line-height: 1.5; margin: 0; }
dialog.rt-dialog input[type=file] { padding: 10px 12px; min-height: 48px; font-size: 14px; }
dialog.rt-dialog input[type=file]::file-selector-button { font: inherit; font-weight: 600; background: #FBF8EF; border: 1.5px solid #0B2030; border-radius: 999px; padding: 6px 14px; margin-right: 10px; cursor: pointer; color: #0B2030; }
#vsf .vsf-check { display: flex !important; align-items: flex-start; gap: 10px; }
#vsf .vsf-check input[type=checkbox] { width: 20px !important; height: 20px !important; min-width: 20px; flex: none; margin: 2px 0 0 !important; padding: 0; }
#vsf .vsf-check span { font-size: 14.5px; line-height: 1.45; }
