/* View styles owned by the companies/reports/schedule/evidence/settings/admin views. All classes are prefixed vb-. */

/* hidden must win over display rules such as .field { display: flex } */
.content [hidden], .drawer [hidden], .modal [hidden] { display: none !important; }
.vb-co-grid > .card + .card, .vb-sched-grid > .card + .card, .vb-cgrid > .card + .card { margin-top: 0; }

/* ---------- tabs (anchor based) */
.vb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 20px; overflow-x: auto; scrollbar-width: thin; }
.vb-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 8px 8px 0 0; }
.vb-tabs a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.vb-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- shared bits */
.vb-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0 0 14px; min-width: 0; }
.vb-fieldset legend { font-weight: 650; padding: 0 6px; font-size: .9rem; display: inline-flex; align-items: center; gap: 4px; }
.vb-checks { display: grid; gap: 8px; }
.vb-checks-2 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.vb-scroll { max-height: 300px; overflow: auto; padding-right: 6px; }
.vb-indet { position: relative; }
.vb-indet > span { width: 35%; animation: vbIndet 1.2s ease-in-out infinite; }
@keyframes vbIndet { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.vb-linkbtn { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; }
.vb-linkbtn:hover { text-decoration: underline; }
.vb-h3 { margin: 22px 0 8px; font-size: .95rem; }
.vb-plain { list-style: none; padding: 0; margin: 0; }
.vb-plain li { padding: 5px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vb-kv-tight { grid-template-columns: minmax(110px, 160px) 1fr; gap: 6px 12px; font-size: .88rem; }
.vb-pre { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: .76rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-height: 320px; overflow: auto; margin: 6px 0; }
.vb-toolbar { flex-wrap: wrap; }
.vb-toolbar input[type="search"], .vb-toolbar-card input[type="search"] { min-width: 220px; }

/* ---------- companies */
.vb-co { display: flex; flex-direction: column; gap: 14px; }
.vb-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-1); }
.vb-co-head { display: flex; gap: 12px; align-items: flex-start; }
.vb-co-head h3 { font-size: 1.02rem; }
.vb-co-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--navy-700), var(--blue-600)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; letter-spacing: .02em; }
.vb-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vb-sample { display: flex; gap: 8px; align-items: center; background: #fde68a; color: #422006; border-radius: 10px; padding: 6px 10px; font-size: .82rem; }
.vb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.vb-stats dt { color: var(--muted); font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.vb-stats dd { margin: 2px 0 0; font-weight: 650; }
.vb-people select { min-width: 170px; }

/* ---------- reports */
.vb-rep { align-items: center; }
.vb-rep-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.vb-rep-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vb-rep-title a h3 { color: var(--ink); }
.vb-rep-title a:hover h3 { color: var(--accent); }
.vb-rep-actions { flex: none; }
.vb-cmp-form { align-items: end; }
.vb-end { justify-content: flex-end; }
.vb-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vb-flow-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.vb-flow-step p { margin: 6px 0 0; }
.vb-flow-step ul { margin: 6px 0 0; }
.vb-block { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.vb-block > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; font-weight: 650; list-style: none; }
.vb-block > summary::-webkit-details-marker { display: none; }
.vb-block > summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .15s; color: var(--muted); }
.vb-block[open] > summary::before { transform: rotate(90deg); }
.vb-block > summary span:first-child { flex: 1; }
.vb-block[open] { padding-bottom: 12px; }
.vb-block[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.vb-report-frame { width: 100%; height: 72vh; min-height: 480px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.vb-formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- presentation mode */
.vb-present { --brand: #2f6bf0; --brand-2: #22d3ee; outline: none; }
.vb-present .slide { justify-content: flex-start; }
.vb-p-top { height: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); flex: none; }
.vb-p-progress { height: 3px; background: #101a2e; flex: none; }
.vb-p-progress span { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .3s ease; }
.vb-p-inner { width: 100%; max-width: 1240px; margin: auto; animation: fade .25s ease; }
.vb-p-cover h1 { margin: 1.4vh 0 1vh; font-size: clamp(2.2rem, 5vw, 4rem); }
.vb-p-logo { max-height: 11vh; max-width: 28vw; object-fit: contain; background: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 4vh; display: block; }
.vb-p-eyebrow { color: var(--brand-2); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: clamp(.9rem, 1.3vw, 1.15rem); }
.present .vb-p-lead { font-size: clamp(1.25rem, 2.2vw, 1.9rem); color: #e7edf8; line-height: 1.4; }
.present .vb-p-meta { color: #9fb1cf; font-size: clamp(.95rem, 1.3vw, 1.15rem); margin-top: 3vh; }
.present .vb-p-note { border-left: 4px solid var(--brand); padding-left: 1.2vw; margin-top: 2vh; }
.present .vb-p-sample { display: inline-block; background: #fde68a; color: #422006; border-radius: 8px; padding: 4px 12px; font-weight: 700; font-size: clamp(.9rem, 1.2vw, 1.05rem); margin-top: 3vh; }
.vb-p-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.4vh; }
.vb-p-list.vb-p-tight { gap: 1.6vh; }
.vb-p-list li { display: flex; gap: 1.2vw; align-items: flex-start; }
.vb-p-list strong { color: #fff; font-weight: 650; }
.present .vb-p-sub { color: #9fb1cf; font-size: .85em; margin-top: .3vh; }
.present .sev { width: .75em; height: .75em; margin: .45em 0 0; flex: none; }
.vb-sev-critical { background: #f87171; } .vb-sev-high { background: #fb923c; } .vb-sev-medium { background: #facc15; } .vb-sev-low { background: #94a3b8; }
.vb-p-n { width: 2em; height: 2em; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 750; flex: none; }
.vb-p-tag { display: inline-block; margin-top: .8vh; font-size: .72em; color: var(--brand-2); border: 1px solid #2a3a5c; border-radius: 999px; padding: 2px 12px; }
.vb-p-roles { color: var(--brand-2); }
.vb-p-health { display: grid; gap: 1.8vh; }
.vb-p-hrow { display: grid; grid-template-columns: minmax(8em, 15vw) 1fr 4.2em minmax(11em, 22vw); gap: 1.6vw; align-items: center; font-size: clamp(.95rem, 1.5vw, 1.3rem); color: #c3cee2; }
.vb-p-hname { color: #fff; font-weight: 600; }
.vb-p-hbar { height: 1.6vh; min-height: 10px; background: #17233d; border-radius: 999px; overflow: hidden; }
.vb-p-hbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.vb-p-hval { color: #fff; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.vb-p-hmeta { color: #9fb1cf; font-size: .82em; }
.vb-p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; margin-top: 3vh; }
.vb-p-cols h3 { color: #fff; font-size: clamp(1.1rem, 1.8vw, 1.5rem); margin-bottom: 1vh; }
.present .kpis span { display: block; color: #c3cee2; font-size: clamp(.9rem, 1.3vw, 1.15rem); margin-top: .6vh; }
.present .kpis.vb-p-kpis3 { grid-template-columns: repeat(3, 1fr); }
.vb-p-bullets li { margin-bottom: 1.4vh; }
.present .bar-nav { gap: 12px; flex-wrap: wrap; flex: none; }
.vb-p-navgroup { display: flex; gap: 10px; align-items: center; }
.vb-p-count { min-width: 8.5em; text-align: center; color: #c3cee2; font-variant-numeric: tabular-nums; }
.present .bar-nav button[disabled] { opacity: .4; cursor: default; }
.present .bar-nav button:hover:not([disabled]) { background: #1b2a47; }
.present .bar-nav button:focus-visible, .vb-p-dl:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(34, 211, 238, .65); }
.vb-p-dl { background: var(--brand); color: #fff !important; border-radius: 10px; padding: 8px 14px; font-weight: 600; text-decoration: none !important; }
.vb-p-hint { font-size: .8rem; color: #7d90b2; }
@media (max-width: 1100px) { .vb-p-hint { display: none; } }
@media (max-width: 700px) {
  .vb-p-hrow { grid-template-columns: 1fr 3.5em; } .vb-p-hbar, .vb-p-hmeta { grid-column: 1 / -1; }
  .vb-p-cols { grid-template-columns: 1fr; }
  .present .kpis.vb-p-kpis3 { grid-template-columns: 1fr; }
  .present .bar-nav { justify-content: center; }
}

/* ---------- schedule */
.vb-sched { display: flex; flex-direction: column; gap: 12px; }
.vb-sched .card-head { margin-bottom: 0; }
.vb-sched h3 { font-size: 1.05rem; }
.vb-sched p { margin: 4px 0 0; }
.vb-paused { border-style: dashed; }
.vb-next { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.vb-runs { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; gap: 6px; }
.vb-runs li { display: flex; align-items: center; gap: 8px; font-size: .9rem; flex-wrap: wrap; }
.vb-run-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; }
.vb-sched-actions { margin-top: auto; }
.vb-err { max-width: 320px; color: var(--ink-2); }
.vb-preview-box { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.vb-hist td { white-space: normal; }

/* ---------- evidence */
.vb-segs { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; max-height: 360px; overflow: auto; font-size: .86rem; }
.vb-segs li { display: grid; grid-template-columns: 84px 1fr; gap: 4px 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.vb-segs li:last-child { border-bottom: none; }
.vb-segs li > div { grid-column: 2; }
.vb-loc { color: var(--muted); font-size: .74rem; padding-top: 2px; }
.vb-seg-text { word-break: break-word; }
.vb-seg-bad { background: var(--high-soft); }
.vb-seg-flag { color: var(--high); font-weight: 600; }
.vb-seg-flag .ico, .vb-segs .ico { width: 13px; height: 13px; }
.vb-area-row th { background: var(--surface-2); color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: .84rem; }
.vb-key { margin-left: 6px; }
.vb-val { font-weight: 600; word-break: break-word; }
.vb-conflict { margin-bottom: 4px; }
.vb-facts td:first-child { min-width: 220px; }
.vb-fact-hero { display: flex; flex-direction: column; gap: 10px; padding: 0 0 14px; }
.vb-fact-val { font-size: 1.8rem; font-weight: 750; letter-spacing: -.02em; word-break: break-word; line-height: 1.2; }
.vb-obs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.vb-obs > li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.vb-obs-rej { opacity: .7; background: var(--surface-2); }
.vb-obs-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vb-obs .src { border-bottom: none; padding: 6px 0 0; }
.vb-subform { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.vb-subform h3 { margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.vb-conn { display: flex; flex-direction: column; }
.vb-conn .card-head { margin-bottom: 6px; }
.vb-pick { display: grid; gap: 8px; margin-bottom: 14px; }
.vb-pick-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 500; }
.vb-pick-item:hover { border-color: var(--line-2); }
.vb-pick-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.vb-pick-item input { margin-top: 3px; min-height: auto; }

/* ---------- settings */
.vb-rows td { padding: 6px; }
.vb-rows input { width: 100%; min-width: 120px; }
.vb-switch { appearance: none; -webkit-appearance: none; width: 44px; height: 24px; min-height: 0; padding: 0; border: none; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.vb-switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.vb-switch:checked { background: var(--accent); }
.vb-switch:checked::before { transform: translateX(20px); }
.vb-switch[disabled] { opacity: .5; cursor: not-allowed; }
.check .vb-switch { width: 44px; height: 24px; margin-top: 0; }
.vb-switch-wrap { display: flex; align-items: center; gap: 8px; font-weight: 600; flex: none; }
.vb-pack { border-left: 4px solid var(--pack); }
.vb-off { background: var(--surface-2); }
.vb-pack-head { display: flex; gap: 14px; align-items: flex-start; }
.vb-pack-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pack); margin-top: 6px; flex: none; }
.vb-pack-ed { padding: 6px 0 14px; }
.vb-wstack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 6px 0 14px; background: var(--line); }
.vb-wstack span { display: block; height: 100%; transition: width .2s; }
.vb-w0 { background: #3b82f6; } .vb-w1 { background: #06b6d4; } .vb-w2 { background: #f97316; } .vb-w3 { background: #10b981; } .vb-w4 { background: #a855f7; }
.vb-wrow { display: grid; grid-template-columns: minmax(140px, 240px) 1fr 52px; gap: 12px; align-items: center; margin: 6px 0; }
.vb-wrow label { font-weight: 550; display: flex; align-items: center; }
.vb-wrow input[type="range"] { width: 100%; min-height: auto; padding: 0; border: none; background: transparent; accent-color: var(--accent); box-shadow: none; }
.vb-wkey { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 8px; flex: none; }
.vb-wpct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.vb-qlist { list-style: none; padding: 0; margin: 10px 0 0; max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.vb-q { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.vb-q:last-child { border-bottom: none; }
.vb-q input[type="checkbox"] { margin-top: 11px; width: 18px; height: 18px; min-height: auto; flex: none; }
.vb-q .grow input { width: 100%; }
.vb-addq { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 4px; }
.vb-colorrow { display: flex; gap: 8px; align-items: center; }
.vb-color { width: 48px; padding: 2px 4px; height: 40px; cursor: pointer; flex: none; }
.vb-hex { width: 120px; font-family: var(--mono); }
.vb-cover { --c1: #1d4ed8; --c2: #06b6d4; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; position: relative; color: #fff; padding: 7% 8%; display: flex; flex-direction: column; justify-content: center; gap: 6px; box-shadow: var(--shadow-2);
  background: linear-gradient(140deg, #070d19 0%, #0f1829 55%, color-mix(in srgb, var(--c1) 40%, #0b1220) 100%); }
.vb-cover-bar { position: absolute; left: 0; top: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.vb-cover-logo { max-height: 44px; max-width: 40%; object-fit: contain; align-self: flex-start; background: #fff; padding: 6px 8px; border-radius: 8px; margin-bottom: 8px; }
.vb-cover-eyebrow { color: var(--c2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.vb-cover-title { font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 750; line-height: 1.15; }
.vb-cover-sub { color: #c3cee2; font-size: .9rem; }
.vb-cover-meta { color: #9fb1cf; font-size: .78rem; margin-top: 8px; }
.vb-cover-note { color: #c3cee2; font-size: .78rem; border-left: 3px solid var(--c1); padding-left: 8px; margin-top: 6px; }

/* ---------- responsive */
@media (max-width: 1180px) { .vb-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .vb-rep { flex-wrap: wrap; } .vb-rep-actions { width: 100%; padding-left: 54px; }
  .vb-kv-tight { grid-template-columns: 1fr; }
  .vb-report-frame { height: 70vh; }
}
@media (max-width: 520px) {
  .vb-flow { grid-template-columns: 1fr; }
  .vb-segs li { grid-template-columns: 1fr; } .vb-segs li > div { grid-column: 1; }
  .vb-wrow { grid-template-columns: 1fr 52px; } .vb-wrow label { grid-column: 1 / -1; }
  .vb-toolbar input[type="search"], .vb-toolbar-card input[type="search"] { min-width: 0; width: 100%; }
  .vb-rep-actions { padding-left: 0; }
  .vb-pack-head { flex-wrap: wrap; }
}
@media print { .vb-tabs { display: none; } }

/* ---------- fixes found in screenshot review */
.field label > .help { display: block; font-weight: 400; margin-top: 2px; }
.vb-pack-head > .grow, .vb-co-head > .grow, .vb-q > .grow, .vb-sched .grow, .vb-conn .card-head > div:first-child { flex: 1; min-width: 0; }
.field .vb-colorrow input.vb-color { width: 52px; flex: none; }
.field .vb-colorrow input.vb-hex { flex: 1; width: auto; min-width: 0; }
/* .sr-only children of scrolling tables must not widen the page */
.table-wrap { position: relative; }
.vb-caps { list-style: none; padding: 0; margin: 6px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.vb-fieldset > .check + .check, .vb-fieldset > .vb-checks + .check { margin-top: 10px; }
