/* Werkinstructie Beveiliging — documentlayout (geen formulier-stijl) */

.bv-doc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  --bv-sidebar-w: 300px;
  --bv-shell-gap: 1rem;
  --bv-header-offset: 0px;
}

/* ——— Header ——— */
.bv-doc-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--navy);
  color: #fff;
  padding: 0.55rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
  padding-top: max(0.55rem, env(safe-area-inset-top));
  border-bottom: 3px solid var(--gold);
}

.bv-doc-back {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 0.25rem;
}
.bv-doc-back:hover { color: #fff; }

.bv-doc-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: 1480px;
  margin: 0 auto;
}

.bv-doc-header-start {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 240px;
}

.bv-doc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bv-doc-logo {
  border-radius: 8px;
  background: var(--surface);
  padding: 2px;
}

.bv-doc-org {
  margin: 0;
  font-size: 12px;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

.bv-doc-header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.bv-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bv-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.bv-nav-toggle-bars {
  width: 16px;
  height: 12px;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 50% / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 100% 2px no-repeat;
}

.bv-nav-backdrop {
  display: none;
}

/* ——— Layout: sidebar + inhoud ——— */
.bv-doc-layout {
  display: grid;
  grid-template-columns: var(--bv-sidebar-w) minmax(0, 1fr);
  gap: var(--bv-shell-gap);
  max-width: 1480px;
  margin: 0 auto;
  padding: var(--bv-shell-gap) max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
  min-height: calc(100vh - 72px);
  align-items: start;
}

.bv-doc-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1rem 0.75rem 1.5rem;
  overflow-y: auto;
  position: sticky;
  top: calc(4.5rem + env(safe-area-inset-top, 0px));
  align-self: start;
  max-height: calc(100vh - 5.5rem - env(safe-area-inset-top, 0px));
}

.bv-toc-label {
  margin: 0 0.5rem 0.75rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}

.bv-doc-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 1.75rem 2.5rem;
  min-width: 0;
}

/* ——— Hero / titelblok ——— */
.bv-nav-home-btn {
  font-weight: 700;
  margin-bottom: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.bv-nav-home-btn:hover {
  background: var(--accent-soft);
}

.bv-nav-home-btn.active {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.bv-doc-hero {
  margin-bottom: 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.bv-version-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.bv-doc-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.bv-doc-lead {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--ink-2);
}

.bv-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ——— Toolbar ——— */
.bv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bv-toolbar-header {
  flex: 1;
  justify-content: flex-end;
  min-width: 200px;
}

.bv-search {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.bv-search::placeholder { color: rgba(255, 255, 255, 0.55); }
.bv-search:focus {
  outline: 2px solid var(--gold-bright);
  background: rgba(255, 255, 255, 0.15);
}

.bv-btn-primary,
.bv-btn-secondary,
.bv-btn-danger {
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.bv-btn-primary {
  background: var(--accent);
  color: #fff;
}
.bv-btn-primary:hover { background: var(--accent-ink); }

.bv-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.bv-btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

.bv-btn-danger {
  background: var(--surface);
  color: var(--gauge-full);
  border: 1px solid color-mix(in srgb, var(--gauge-full) 25%, var(--line));
  font-size: 12px;
  padding: 6px 10px;
}

/* ——— Snel overzicht ——— */
.bv-quick-section {
  margin-bottom: 0;
}

.bv-quick-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 1100px) {
  .bv-quick-split {
    grid-template-columns: 1fr 1fr;
  }
}

.bv-quick-heading {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.bv-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 720px) {
  .bv-quick-grid { grid-template-columns: 1fr; }
}

.bv-quick-card {
  border-radius: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.bv-quick-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bv-quick-card h3 .bv-card-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.bv-quick-allowed h3 .bv-card-icon { background: var(--status-gereed); color: #fff; }
.bv-quick-forbidden h3 .bv-card-icon { background: var(--status-niet-gereed); color: #fff; }
.bv-quick-allowed { border-left: 4px solid var(--status-gereed); }
.bv-quick-forbidden { border-left: 4px solid var(--status-niet-gereed); }
.bv-quick-allowed h3 { color: var(--status-gereed); }
.bv-quick-forbidden h3 { color: var(--status-niet-gereed); }

.bv-quick-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.bv-quick-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.bv-quick-card li + li { margin-top: 8px; }

.bv-picto {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.bv-picto-ok { background: color-mix(in srgb, var(--status-gereed) 14%, var(--surface)); color: var(--status-gereed); border: 1px solid color-mix(in srgb, var(--status-gereed) 35%, var(--line)); }
.bv-picto-ok::before { content: "✓"; }
.bv-picto-no { background: color-mix(in srgb, var(--status-niet-gereed) 12%, var(--surface)); color: var(--status-niet-gereed); border: 1px solid color-mix(in srgb, var(--status-niet-gereed) 35%, var(--line)); }
.bv-picto-no::before { content: "✕"; }

/* ——— Sidebar navigatie ——— */
.bv-section-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bv-nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  min-height: 44px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.12s;
  text-decoration: none;
  box-sizing: border-box;
}

a.bv-nav-btn:visited {
  color: var(--ink-2);
}

.bv-nav-page-link {
  font-weight: 600;
  color: var(--accent-ink);
}

.bv-nav-btn:hover { background: var(--surface-2); }

.bv-nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.bv-nav-group { margin-top: 6px; }

.bv-nav-group:first-child { margin-top: 0; }

.bv-nav-group:not(.expanded) > .bv-nav-sub {
  display: none !important;
}

.bv-nav-group.expanded > .bv-nav-sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bv-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-weight: 600;
  color: var(--navy);
  background: var(--surface-2);
}
.bv-nav-group-toggle:hover { background: var(--surface-2); }
.bv-nav-group-toggle.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: inset 3px 0 0 var(--accent);
}

.bv-nav-chevron {
  flex-shrink: 0;
  font-size: 10px;
  opacity: 0.6;
}
.bv-nav-chevron::before { content: '▸'; }
.bv-nav-group.expanded .bv-nav-chevron::before { content: '▾'; }

.bv-nav-sub {
  margin: 2px 0 4px 8px;
  padding-left: 8px;
  border-left: 2px solid var(--line);
}

.bv-nav-sub-btn {
  font-size: 12px;
  padding: 6px 8px;
  color: var(--ink-2);
}

/* ——— Artikel / sectie-inhoud ——— */
.bv-doc-article {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-height: 320px;
}

.bv-section-panel {
  display: none;
  padding: 1.75rem 2rem 2.25rem;
}

.bv-section-panel.active { display: block; }

.bv-section-panel .bv-body {
  max-width: 75ch;
}

.bv-section-panel .bv-bijlage-pdf,
.bv-section-panel .bv-shift-table-wrap,
.bv-section-panel .bv-wi-steps,
.bv-section-panel table {
  max-width: none;
}

.bv-section-panel h2 {
  margin: 0 0 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--gold-soft);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.bv-body p {
  margin: 0 0 0.85rem;
  line-height: 1.75;
  font-size: 16px;
  color: var(--ink);
}

.bv-body ul,
.bv-body ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  line-height: 1.75;
  font-size: 16px;
  color: var(--ink);
}

.bv-body li + li { margin-top: 0.35rem; }

.bv-bijlage-pdf {
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(26, 43, 66, 0.06);
}

.bv-bijlage-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.bv-bijlage-pdf-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.bv-bijlage-pdf-link:hover {
  text-decoration: underline;
}

.bv-bijlage-pdf-link--download {
  color: var(--ink-2);
}

.bv-bijlage-pdf-viewport {
  position: relative;
  width: 100%;
  height: min(80vh, 960px);
  min-height: 520px;
  background: var(--navy-2);
}

.bv-bijlage-pdf-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--navy-2);
}

.bv-bijlage-pdf--html .bv-bijlage-pdf-viewport {
  height: min(88vh, 1100px);
  min-height: 560px;
  background: var(--surface);
}

.bv-bijlage-pdf--html .bv-bijlage-pdf-frame {
  background: var(--surface);
}

.bv-bijlage-image {
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(26, 43, 66, 0.06);
}

.bv-bijlage-image-viewport {
  padding: 0.75rem;
  background: var(--surface-2);
  overflow: auto;
  max-height: min(88vh, 1100px);
  min-height: 320px;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  cursor: default;
}

.bv-bijlage-image--zoomed .bv-bijlage-image-viewport {
  cursor: grab;
}

.bv-bijlage-image--zoomed .bv-bijlage-image-viewport:active {
  cursor: grabbing;
}

.bv-bijlage-image-stage {
  width: 100%;
  transform-origin: 0 0;
}

.bv-bijlage-image-frame {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(26, 43, 66, 0.08);
  user-select: none;
  -webkit-user-drag: none;
}

.bv-bijlage-image-toolbar {
  justify-content: space-between;
}

.bv-bijlage-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bv-bijlage-zoom-btn {
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.bv-bijlage-zoom-btn--text {
  min-width: auto;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.65rem;
}

.bv-bijlage-zoom-btn:hover {
  background: var(--accent-soft);
  border-color: var(--text-muted);
}

.bv-bijlage-zoom-level {
  min-width: 3.25rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}

.bv-huisregels-content {
  margin-top: 0.5rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.55;
}

.bv-huisregels-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--navy);
}

.bv-huisregels-heading {
  margin: 1.35rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.35;
}

.bv-huisregels-list {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

.bv-huisregels-list li {
  margin-bottom: 0.45rem;
}

.bv-huisregels-declaration {
  margin: 0.5rem 0 0;
  padding: 1rem 1.1rem;
  font-weight: 600;
  background: var(--accent-soft);
  border-radius: 8px;
}

.bv-sync-note {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 8px;
  line-height: 1.45;
}

.bv-bezoekers-open-wrap {
  margin: 1.25rem 0 0.5rem;
}

.bv-bezoekers-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.bv-bezoekers-embed {
  margin: 1rem 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.bv-bezoekers-frame {
  display: block;
  width: 100%;
  height: min(92vh, 1100px);
  min-height: 640px;
  border: none;
  background: var(--surface);
}

.bv-subheading {
  margin: 1.35rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.bv-section-panel .bv-subheading:first-child {
  margin-top: 0;
}

/* ——— Werkinstructie-stappen (genummerde blokken) ——— */
.bv-wi-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.25rem;
}

.bv-wi-step {
  padding: 1rem 1.15rem 1.05rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 1px 2px rgba(26, 43, 66, 0.04);
}

.bv-wi-step .bv-subheading {
  margin: 0 0 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.08rem;
  color: var(--navy);
}

.bv-wi-step-body p:last-child,
.bv-wi-step-body ul:last-child,
.bv-wi-step-body ol:last-child {
  margin-bottom: 0;
}

.bv-wi-step-body ul {
  margin-top: 0.35rem;
}

.bv-wi-step-body p + ul,
.bv-wi-step-body p + ol {
  margin-top: -0.25rem;
}

.bv-wi-step--no-title .bv-wi-step-body > p:first-child {
  margin-top: 0;
}

.bv-callout {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.bv-callout--warn {
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  color: var(--accent-ink);
}

.bv-report-colors {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bv-report-color {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bv-report-swatch {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.bv-report-swatch--border {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.bv-report-color-text {
  flex: 1;
  min-width: 0;
}

.bv-body .bv-tab-row {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .bv-wi-step {
    padding: 0.85rem 0.95rem;
  }
}

.bv-empty { color: var(--text-muted); font-style: italic; }
.bv-error { color: var(--gauge-full); padding: 1rem; }

/* ——— Dienstrooster ——— */
.bv-schedule-intro {
  margin: 0 0 1rem;
  font-size: 15px;
  color: var(--ink-2);
}

.bv-schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.bv-schedule-legend-item {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bv-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.bv-schedule-day {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.15rem;
}

.bv-schedule-day--weekend {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.bv-schedule-day-name {
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.bv-schedule-guards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bv-schedule-guard-head {
  margin-bottom: 0.45rem;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.bv-schedule-shifts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bv-schedule-shift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
}

.bv-schedule-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bv-schedule-shift-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.bv-shift-ochtend {
  background: #fef9e7;
  border-color: #f4d03f;
  color: #7d6608;
}

.bv-shift-middag {
  background: #ebf5fb;
  border-color: #85c1e9;
  color: #1a5276;
}

.bv-shift-avond {
  background: #fdf2e9;
  border-color: #f0b27a;
  color: #873600;
}

.bv-shift-nacht {
  background: #eaecee;
  border-color: #aab7b8;
  color: #1b2631;
}

.bv-shift-overig {
  background: #f4f6f7;
  border-color: #d5d8dc;
  color: #2c3e50;
}

.bv-schedule-day--changed {
  box-shadow: inset 0 0 0 2px var(--status-niet-gereed);
}

.bv-schedule-day--changed .bv-schedule-day-name {
  color: var(--gauge-full);
}

/* ——— Recente wijzigingen (48 uur) ——— */
.bv-changes-legend {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  background: color-mix(in srgb, var(--gauge-full) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gauge-full) 28%, var(--line));
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
}

.bv-changed {
  color: var(--gauge-full);
  font-weight: 600;
  background: color-mix(in srgb, var(--gauge-full) 10%, var(--surface));
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.bv-doc-title .bv-changed,
.bv-doc-lead .bv-changed,
.bv-version-badge .bv-changed,
.bv-section-panel h2 .bv-changed {
  background: transparent;
  padding: 0;
}

.bv-picto-text .bv-changed {
  padding: 0 0.15em;
}

@media (max-width: 640px) {
  .bv-schedule-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Bewerkmodus ——— */
.bv-editor-wrap { padding-top: 0.5rem; }

.bv-editor-wrap .bv-btn-primary {
  background: var(--accent);
  color: #fff;
}

.bv-editor-wrap .bv-btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.bv-edit-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.bv-edit-block h3 { margin: 0 0 12px; font-size: 16px; }

.bv-edit-block label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.bv-edit-block input[type="text"],
.bv-edit-block textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.bv-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -6px 0 8px;
  font-weight: normal;
}

.bv-section-edit {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 12px;
}

.bv-section-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 10px;
}

.bv-sec-id-label {
  margin-left: auto;
  margin-right: 0.5rem;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
}

.bv-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#bv-save-status { font-size: 13px; color: var(--text-muted); }

.bv-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10000;
}
.bv-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  body.bv-has-mobile-nav .bv-nav-toggle {
    display: inline-flex;
  }

  body.bv-has-mobile-nav .bv-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 350;
    background: rgba(16, 29, 56, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.bv-has-mobile-nav.bv-nav-open {
    overflow: hidden;
  }

  body.bv-has-mobile-nav.bv-nav-open .bv-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .bv-doc-layout {
    grid-template-columns: 1fr;
    padding-top: 0.65rem;
  }

  body.bv-has-mobile-nav .bv-doc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 320px);
    z-index: 400;
    max-height: none;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  }

  body.bv-has-mobile-nav.bv-nav-open .bv-doc-sidebar {
    transform: translateX(0);
  }

  body:not(.bv-has-mobile-nav) .bv-doc-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0.5rem;
  }

  .bv-doc-main {
    padding: 1rem 1rem 2rem;
  }

  .bv-section-panel { padding: 1.25rem 1rem; }

  .bv-toolbar-header {
    width: 100%;
    justify-content: stretch;
  }

  .bv-search {
    max-width: none;
    flex: 1 1 100%;
  }

  .bv-doc-header-title {
    font-size: 0.95rem;
  }
}

@media print {
  .bv-doc-header,
  .bv-doc-sidebar,
  .bv-toolbar,
  .bv-quick-section,
  #bv-edit-btn,
  #bv-logout-btn { display: none !important; }

  .bv-doc-layout { display: block; }
  .bv-section-panel { display: block !important; page-break-inside: avoid; }
  .bv-doc { background: var(--surface); }
}

/* ——— Loginpoort (beveiliging-auth.js) ——— */
#bv-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(16, 29, 56, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#bv-auth-gate[hidden] { display: none !important; }

.bv-auth-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.bv-auth-box h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy);
}

.bv-auth-box p {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.bv-auth-box label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.bv-auth-box input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  margin-bottom: 14px;
}

.bv-auth-box input[type="password"]:focus {
  outline: 2px solid var(--gold-bright);
  border-color: var(--accent);
}

.bv-auth-box button {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.bv-auth-box button:hover { background: var(--accent-ink); }
.bv-auth-box button:disabled { opacity: 0.6; cursor: not-allowed; }

.bv-auth-err {
  color: var(--status-niet-gereed);
  font-size: 12px;
  margin: 0 0 10px;
  min-height: 18px;
}
