/* ─────────────────────────────────────────────────────────────────
   staff.css — Staff features for /ui
   Layered on top of the existing web CSS.
   No touch overrides — those stay in kiosk.css.
   ───────────────────────────────────────────────────────────────── */

/* ── Header: add right-side slot for staff badge */
.header-inner { justify-content: space-between; }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ── Anonymous medewerker login link in header */
.header-staff-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.28);
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.header-staff-login svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.header-staff-login:hover {
  color: #fff;
  background: rgba(255,255,255,.2);
}

/* Hide once staff active */
body.staff-active .header-staff-login { display: none; }


/* ── Staff badge (shown when staff is logged in) */
.staff-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-glow);
  white-space: nowrap;
}

.staff-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--accent);
}

.staff-panel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--accent);
  transition: background 0.15s;
}

.staff-panel-btn:hover { background: var(--accent-glow); }

.staff-panel-btn svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent);
}

/* ── Staff side-drawer panel */
#staffPanel {
  position: fixed;
  top: 56px;
  right: 0;
  width: 300px;
  height: calc(100vh - 56px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 400;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#staffPanel.open { transform: translateX(0); }

.staff-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.staff-panel-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.staff-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sec);
}

.staff-panel-close:hover { background: var(--surface2); }

.staff-panel-section {
  padding: 1rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.staff-label {
  font-size: 0.8rem; /* 12px bij een root van 15px — de ondergrens */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sec);
}

.staff-input,
.staff-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.staff-input:focus,
.staff-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.staff-panel-actions {
  padding: 1.25rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-staff-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-staff-action svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-staff-action:hover { background: var(--surface3); border-color: var(--border-l); }

.btn-staff-reset {
  /* De rand mag de heldere rode blijven; de TEKST niet — die haalde 4,37:1
     en moet 4,5:1 halen (gemeten 02-09-2026). */
  border-color: var(--error);
  color: var(--error-text);
}

.btn-staff-reset:hover { background: rgba(220, 53, 69, 0.08); }

/* ── Staff-only elements: hidden by default, revealed via body.staff-active */
.staff-only { display: none !important; }
body.staff-active .staff-only:not(.hidden) { display: revert !important; }
/* Elements that are specifically flex-based (code bar, badges) need flex restored */
body.staff-active .staff-code-bar:not(.hidden),
body.staff-active .staff-badge:not(.hidden),
body.staff-active #staffPanel:not(.hidden) { display: flex !important; }

/* ── Proposal edit button (staff only) */
.proposal-edit-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.proposal-edit-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Invisible triple-tap trigger zone (bottom-right corner) */
#kioskStaffTrigger {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  z-index: 500;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ── Staff logout button (in staff panel) */
.btn-staff-logout {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-sec);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-staff-logout:hover {
  background: var(--surface2);
  border-color: var(--border-l);
}

/* ── Staff code bar — card above the split landing, staff-only */
.staff-code-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #f0f4f1 0%, #f5f5f5 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.staff-code-bar svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: var(--text-sec);
  opacity: 0.6;
}

.staff-code-bar-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sec);
  white-space: nowrap;
  opacity: 0.8;
}

.staff-code-bar-input-row {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.staff-code-bar-input-row input {
  flex: 1;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.7);
  color: var(--text);
}

.staff-code-bar-input-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: #fff;
}

.staff-code-bar-input-row input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-sec);
  opacity: 0.5;
}

.staff-code-bar-input-row .btn-primary {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

/* ── Code lookup result wrapper */
#codeLookupSection {
  padding: 0 2rem 1.5rem;
}

/* ── Code lookup section */
.lookup-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lookup-body {
  max-width: 700px;
  margin: 0 auto;
}

.lookup-intro {
  text-align: center;
  color: var(--text-sec);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.lookup-input-row {
  display: flex;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}


.lookup-error {
  text-align: center;
  color: var(--error-text);
  font-weight: 500;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(220, 53, 69, 0.06);
}

.lookup-result-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.lookup-result-left {
  min-width: 0;
}

.lookup-result-images {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lookup-result-image {
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface2);
}

.lookup-result-image img {
  width: 100%;
  display: block;
  max-height: 320px;
  object-fit: cover;
}

.lookup-result-details h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.lookup-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lookup-product-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}

.lookup-product-cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
  min-width: 60px;
}

.lookup-product-name {
  font-weight: 500;
  font-size: 0.9rem;
  flex: 1;
}

.lookup-product-meta {
  font-size: 0.8rem;
  color: var(--text-sec);
}

.lookup-style {
  font-size: 0.9rem;
  color: var(--text-sec);
}

.lookup-date {
  font-size: 0.85rem;
  color: var(--text-sec);
  margin-bottom: 1rem;
}

.lookup-result-actions {
  display: flex;
  gap: 0.75rem;
}

.lookup-result-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lookup-result-actions .btn-primary svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .lookup-result-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Seller proposal management section */

.seller-proposal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.seller-proposal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  min-height: 400px;
}

.seller-render-preview {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface2);
}

.seller-render-preview img {
  width: 100%;
  display: block;
}

.seller-render-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 300px;
  color: var(--text-sec);
}

.seller-render-loading .spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.seller-variant-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
}

.seller-variant-tab {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  font-size: 0.9rem;
  cursor: pointer;
}

.seller-variant-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.seller-articles-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seller-articles-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 500px;
}

.seller-article-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.seller-article-thumb {
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.seller-article-info {
  flex: 1;
  min-width: 0;
}

.seller-article-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-article-meta {
  font-size: 0.8rem;
  color: var(--text-sec);
  text-transform: capitalize;
}

.seller-article-price {
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.15rem;
}

.seller-replace-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.seller-replace-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.seller-replace-btn:hover {
  background: var(--accent);
  color: #fff;
}

.seller-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface2, #f8fafc);
  border-radius: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Product search modal */
.seller-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.seller-search-modal-inner {
  background: var(--surface);
  border-radius: 1rem;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.seller-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.seller-search-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.seller-search-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sec);
}

.seller-search-close:hover { background: var(--surface2); }

#sellerSearchInput {
  margin: 0.75rem 1.25rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
}

#sellerSearchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.seller-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seller-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.seller-search-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.seller-search-info {
  flex: 1;
  min-width: 0;
}

.seller-search-name {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-search-meta {
  font-size: 0.8rem;
  color: var(--text-sec);
}

.seller-search-price {
  font-weight: 600;
  font-size: 0.9rem;
}

.seller-pick-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.seller-pick-btn:hover {
  background: var(--accent-h);
}

@media (max-width: 768px) {
  .seller-proposal-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Staff workspace ─────────────────────────────────────────────── */

.staff-workspace-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.staff-workspace-header h2 {
  margin: 0;
  flex: 1;
}

.staff-ws-code-label {
  font-size: 0.82rem;
  color: var(--text-sec);
  background: var(--surface2);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-family: monospace;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.staff-workspace-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.staff-workspace-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.staff-ws-room-photo {
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.staff-ws-room-photo img,
.staff-ws-room-photo .staff-ws-room-img {
  width: 100%;
  display: block;
  border-radius: 0.75rem;
}

.staff-ws-room-photo .staff-ws-room-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  color: var(--text-sec);
  font-size: 0.85rem;
}

.staff-ws-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-sec);
}

.staff-ws-products {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.staff-ws-product-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  font-size: 0.82rem;
}

.staff-ws-product-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.staff-ws-product-chip-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.staff-ws-product-chip-cat {
  font-size: 12px;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.staff-ws-product-chip-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.staff-ws-result {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.staff-ws-result img {
  width: 100%;
  display: block;
}

.staff-ws-result-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-sec);
  font-size: 0.85rem;
}

.staff-ws-result-spinner .spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.staff-ws-save-intro {
  font-size: 0.82rem;
  color: var(--text-sec);
  margin: 0 0 0.35rem;
}

/* Tabs */
.staff-workspace-main {
  min-width: 0;
}

.staff-ws-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}

.staff-ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-sec);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
  white-space: nowrap;
}

.staff-ws-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.staff-ws-tab:hover:not(.active) {
  color: var(--text);
}

.staff-ws-panel {
  display: none;
}

.staff-ws-panel.active {
  display: block;
}

/* Refinement tab — loading state */
.staff-ws-refine-loading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem 0;
}

.staff-ws-refine-hint {
  font-size: 0.85rem;
  color: var(--text-sec);
  margin: 0;
  max-width: 400px;
  line-height: 1.5;
}

.staff-ws-refine-spinner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-sec);
  font-size: 0.875rem;
}

.staff-ws-refine-spinner .spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Chat panel header */
.staff-ws-chat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-sec);
  background: var(--surface);
  flex-shrink: 0;
}

.staff-ws-chat-header svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent);
  flex-shrink: 0;
}

.staff-ws-chat-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sec);
  opacity: 0.7;
}

/* Chat input disabled state */
.refinement-input-row textarea:disabled {
  background: var(--surface2);
  color: var(--text-sec);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Refinement footer (render & save button) */
.refinement-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .staff-workspace-layout {
    grid-template-columns: 1fr;
  }

  .staff-workspace-sidebar {
    position: static;
  }

  .staff-result-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Staff result section ─────────────────────────────────────── */
#staffResultSection { width: 100%; }

.staff-result-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

.staff-result-left {
  min-width: 0;
}

.staff-result-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1rem;
}

.staff-result-articles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.staff-result-save-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Staff login modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(360px, 92vw);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-sec);
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.modal-close:hover { background: var(--accent-glow); }

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.modal-title svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.modal-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-sec);
  margin-bottom: 0.4rem;
}

.modal-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
  margin-bottom: 0.75rem;
}

.modal-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Wachtwoordveld met toon/verberg-knop ernaast (Victor, 29-08-2026). De wrap
   houdt de knop binnen het veld; het veld houdt rechts ruimte vrij zodat de
   knop nooit over de ingetypte tekst valt. */
.modal-input-wrap {
  position: relative;
}

.modal-input-wrap .modal-input {
  padding-right: 5.25rem;
}

.modal-input-toggle {
  position: absolute;
  right: 0.4rem;
  top: 0.6rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.2;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-sec);
  cursor: pointer;
}

.modal-input-toggle:hover {
  color: var(--text);
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--text-sec);
  margin: 0.75rem 0 0;
}

.modal-error {
  font-size: 0.85rem;
  color: #e53e3e;
  margin-bottom: 0.75rem;
}

.modal-error.hidden { display: none; }

.modal-submit {
  width: 100%;
}

/* ── Resultaten nav link in header ── */
/* ── History dropdown wrapper ── */
.staff-history-wrap {
  position: relative;
}

.staff-history-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.staff-history-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.staff-history-link:hover,
.staff-history-link[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ── History dropdown panel ── */
.history-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  max-height: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.history-dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2, var(--surface));
  flex-shrink: 0;
}

.history-search-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
}
.history-search-row svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--text-sec);
  opacity: 0.6;
}
.history-search-row input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.83rem;
  font-family: inherit;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.history-search-row input::placeholder { color: var(--text-sec); opacity: 0.6; }

.history-sort-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-sec);
  font-size: 12px;
  font-family: inherit;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  align-self: flex-start;
}

.history-dropdown-list {
  overflow-y: auto;
  flex: 1;
}

.history-loading,
.history-empty {
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-sec);
  opacity: 0.7;
}

/* ── History item ── */
.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--accent-glow, #f0f8f1); }

.history-item-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface2);
  flex-shrink: 0;
}
.history-item-thumb-placeholder {
  width: 56px;
  height: 42px;
  border-radius: 4px;
  background: var(--surface2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-item-thumb-placeholder svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-sec);
  opacity: 0.35;
}

.history-item-info {
  flex: 1;
  min-width: 0;
}
.history-item-code {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-family: monospace;
  letter-spacing: 0.03em;
}
.history-item-meta {
  font-size: 12px;
  color: var(--text-sec);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-date {
  font-size: 12px;
  color: var(--text-sec);
  flex-shrink: 0;
  opacity: 0.7;
  white-space: nowrap;
}

/* ── Staff workspace render history tabs */
.staff-ws-render-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.staff-ws-render-tab {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, border-color 0.15s;
}
.staff-ws-render-tab:hover {
  background: var(--surface-hover, #f0f0f0);
}
.staff-ws-render-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.render-tab-current {
  font-size: 12px;
  opacity: 0.8;
}


/* ── Print: hide staff UI elements */
@media print {
  #staffPanel,
  #staffLoginModal,
  #kioskStaffTrigger,
  #codeLookupSection,
  #sellerProposalSection,
  #staffWorkspace,
  #staffResultSection,
  .header-staff-login { display: none !important; }
}
