/* views-os2 — VENDRA OS: members & KYC, purchase orders, delivery runs, disputes, finance, capital. Prefix: .o2- */

/* ---------- shared ---------- */
.o2-tabs-wrap { padding: 4px 14px 0; }
.o2-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.o2-filters select.input.sm { width: auto; min-width: 130px; max-width: 220px; }
.o2-search { position: relative; flex: 0 1 300px; min-width: 200px; }
.o2-search .ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.o2-search .input { padding-left: 30px; }
.o2-table td { vertical-align: top; }
.o2-table td .chip { margin-top: 1px; }
.o2-table .sub { margin-top: 1px; }
.o2-table .mono { white-space: nowrap; }
.o2-list th:first-child { min-width: 250px; }
.o2-list th:nth-child(2) { min-width: 150px; }
.o2-name { font-weight: 620; color: var(--text); }
.o2-name:hover { color: var(--brand); }
.o2-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.o2-foot { padding: 10px 16px 14px; margin: 0; border-top: 1px solid var(--border); }
.o2-mb { margin-bottom: 4px; }
.o2-sep { border-top: 1px solid var(--border); }
.o2-h3 { margin-bottom: 2px; }
.o2-empty-line { padding: 6px 18px 16px; margin: 0; }
.o2-ul { margin: 0; padding-left: 18px; }
.o2-ul li + li { margin-top: 2px; }
.o2 .card-head .small.muted { flex: none; }
.o2-mini-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.o2-mini { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: inherit; flex-wrap: wrap; }
.o2-mini:hover { border-color: var(--brand-line); background: var(--surface-2); text-decoration: none; }
.o2-mini .grow { flex: 1; min-width: 180px; }
.o2-mini > .ic { color: var(--faint); }

/* ---------- member detail ---------- */
.o2-headcard .card-body { padding-top: 14px; }
.o2-badges { gap: 8px; margin-bottom: 12px; }
.o2-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
@media (max-width: 760px) { .o2-facts { grid-template-columns: 1fr; } }
.o2-factors { display: flex; flex-direction: column; gap: 10px; }
.o2-factor-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.o2-factor-val { white-space: nowrap; font-variant-numeric: tabular-nums; }
.o2-factor .progress { height: 6px; }

/* ---------- purchase orders ---------- */
.o2-statusbar { display: flex; gap: 6px; padding: 12px 16px 10px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--border); }
.o2-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 104px; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: left; flex: none; }
.o2-stat span { font-size: 12px; color: var(--muted); font-weight: 560; white-space: nowrap; }
.o2-stat b { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.o2-stat:hover { border-color: var(--border-strong); background: var(--surface-2); }
.o2-stat.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.o2-stat.active span { color: var(--brand); }
.o2-sumrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.o2-sumrow > div { padding: 11px 16px; border-right: 1px solid var(--border); min-width: 0; }
.o2-sumrow > div:last-child { border-right: 0; }
.o2-sumrow span { display: block; font-size: 12px; color: var(--muted); font-weight: 560; }
.o2-sumrow b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o2-sumrow em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.o2-sumrow .good b { color: var(--good); }
@media (max-width: 900px) { .o2-sumrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .o2-sumrow > div { border-bottom: 1px solid var(--border); } }
.o2-po td { padding-top: 8px; padding-bottom: 8px; }
.o2-po td:nth-child(2) { min-width: 180px; }
.o2-clip { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- delivery runs ---------- */
.o2-flow { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.o2-mapcol { position: sticky; top: 72px; }
@media (max-width: 1100px) { .o2-flow { grid-template-columns: 1fr; } .o2-mapcol { position: static; order: -1; } }
@container page (max-width: 1180px) { .o2-flow { grid-template-columns: minmax(0, 1fr); } .o2-mapcol { position: static; order: -1; } }
.o2-map { height: 420px; background: var(--surface-3); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 10px; z-index: 0; }
.o2-mapcard .card-body { padding: 12px 16px; }
.o2-legend { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.o2-legend > div > i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.o2-legend .chip { margin-left: 6px; }
.o2-pin-wrap { background: none; border: 0; }
.o2-pin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c, #2a78d6); color: #fff; font: 700 12px/1 var(--sans); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.o2-pin.done { background: #fff; color: var(--c, #2a78d6); border-color: var(--c, #2a78d6); }
.o2-sec { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 8px; font-size: 15px; }
.o2-day { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.o2-day h4 { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.o2-day-date { font-weight: 500; color: var(--muted); }
.o2-day-n { font-weight: 500; color: var(--faint); font-size: 12px; }
.o2-run { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.o2-run.today { border-left: 4px solid var(--brand); }
.o2-run.sel { border-color: var(--brand-line); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }
.o2-run.today.sel { border-left-color: var(--brand); }
.o2-run > summary { list-style: none; cursor: pointer; }
.o2-run > summary::-webkit-details-marker { display: none; }
.o2-run > summary:hover { background: var(--surface-2); }
.o2-run-head { display: grid; grid-template-columns: 112px minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 12px 16px; }
.o2-run-id { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.o2-run-id b { font-size: 14.5px; }
.o2-run-meta { font-size: 13.5px; min-width: 0; }
.o2-run-sup { font-weight: 560; }
.o2-run-prog { display: flex; flex-direction: column; gap: 5px; }
.o2-run-prog .progress { height: 6px; }
@media (max-width: 760px) { .o2-run-head { grid-template-columns: 1fr auto; } .o2-run-meta, .o2-run-prog { grid-column: 1 / -1; } }
.o2-run .table-wrap { border-top: 1px solid var(--border); }
.o2-stops th { background: var(--surface-2); }
.o2-seq { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); font-size: 11.5px; font-weight: 700; }

/* ---------- disputes ---------- */
.o2-table tr.o2-hot td { background: #fff8f7; }
.o2-table tr.o2-hot td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.o2-note { min-width: 230px; max-width: 320px; }
.o2-resp { min-width: 220px; max-width: 300px; }
.o2-dbox { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }

/* ---------- finance ---------- */
.o2-kpis7 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.o2-kpis7 .kpi-value { font-size: 20px; }
.o2-drcr { display: inline-block; min-width: 18px; font-size: 11px; font-weight: 650; color: var(--muted); }
.o2-jes { border-top: 1px solid var(--border); margin-top: 6px; }
.o2-je { border-bottom: 1px solid var(--border); }
.o2-je:last-child { border-bottom: 0; }
.o2-je > summary { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 120px 16px; gap: 12px; align-items: center; padding: 8px 18px; cursor: pointer; list-style: none; font-size: 13px; }
.o2-je > summary::-webkit-details-marker { display: none; }
.o2-je > summary:hover { background: var(--surface-2); }
.o2-je > summary .num { text-align: right; }
.o2-je > summary > .ic { color: var(--faint); transition: transform .15s; }
.o2-je[open] > summary > .ic { transform: rotate(180deg); }
.o2-je[open] > summary { background: var(--surface-2); }
.o2-je-no { color: var(--text-2); }
.o2-je-memo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o2-je .table { margin: 2px 0 0; background: var(--surface); }
.o2-je .table th, .o2-je .table td { padding-left: 126px; }
.o2-je .table th + th, .o2-je .table td + td { padding-left: 10px; }
.o2-je-ref { padding: 4px 18px 10px 126px; }
@media (max-width: 760px) { .o2-je > summary { grid-template-columns: 1fr auto; } .o2-je > summary > :nth-child(3), .o2-je > summary > .ic { display: none; } .o2-je .table th, .o2-je .table td, .o2-je-ref { padding-left: 18px; } }

/* ---------- capital ---------- */
.o2-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; }
.o2-steps > div { position: relative; padding: 0 18px 0 0; }
.o2-steps > div + div { padding-left: 18px; border-left: 1px solid var(--border); }
.o2-steps b { display: block; margin: 6px 0 3px; font-size: 14px; }
.o2-steps p { font-size: 12.5px; color: var(--muted); margin: 0; }
.o2-step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; }
.o2-model-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 1000px) { .o2-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; } .o2-steps > div:nth-child(3) { padding-left: 0; border-left: 0; } }
@media (max-width: 600px) { .o2-steps { grid-template-columns: 1fr; } .o2-steps > div, .o2-steps > div + div { padding: 0; border-left: 0; } }
.o2-clip2 { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o2-cstep { margin-bottom: 18px; max-width: 640px; }
.o2-cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
@media (max-width: 760px) { .o2-cgrid { grid-template-columns: 1fr; } }
.o2-cnote { margin: 14px 0 0; }
.o2-packhead h2 { margin-bottom: 2px; }
.o2-paygrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.o2-paygrid span { display: block; font-size: 12px; color: var(--muted); font-weight: 560; }
.o2-paygrid b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.o2-paygrid em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
@media (max-width: 600px) { .o2-paygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.o2-dec { min-width: 170px; max-width: 280px; }
.o2-dec-v { margin-top: 4px; font-size: 13px; }
.o2-act { margin-top: 8px; }
