/* Settings > Order views (static/order_views.js). Uses the settings panel's
   tokens (app.css, .st): --st-blue, --st-line, --st-inset. */
.ov { --ov-blue: var(--st-blue, #4f7be8); --ov-red: #e5484d; --ov-green: #46a758; --ov-amber: var(--amber-ink, #e0a11e); --ov-violet: #8e7cf0;
  --ov-box: var(--panel, #1a1d24); --ov-dot: rgba(255, 255, 255, .06); --ov-canvas: rgba(0, 0, 0, .28); }
[data-theme="light"] .ov { --ov-dot: rgba(40, 34, 24, .1); --ov-canvas: rgba(40, 34, 24, .07); }

.ov-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ov-head .st-eyebrow { margin-bottom: 0; }
.ov-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ov-tb { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: transparent; color: var(--fg); font-size: 13px; cursor: pointer;
  transition: border-color .12s ease-out, opacity .12s ease-out; }
.ov-tb:hover { border-color: var(--fg-faint); }
.ov-tb:disabled, .ov-save:disabled { opacity: .35; pointer-events: none; }
.ov-tb svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ov-icon { padding: 6px 8px; }
.ov-save { padding: 6px 16px; }
.ov-div { width: 1px; height: 20px; background: var(--line); }
.ov-unsaved { color: var(--ov-amber); font-size: 13px; }
.ov-err { color: var(--ov-red); font-size: 12px; }
.ov-spin { width: 11px; height: 11px; margin-right: 6px; display: inline-block; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: ov-spin .7s linear infinite; vertical-align: -1px; }
@keyframes ov-spin { to { transform: rotate(360deg); } }
.ov-muted { color: var(--fg-faint); font-size: 12px; line-height: 1.5; }
.ov-link { background: none; border: 0; padding: 0; color: var(--ov-blue); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* View chips */
.ov-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ov-chip { padding: 4px 10px; border: 1px solid var(--ov-blue); border-radius: 7px; font-size: 12.5px;
  background: var(--st-blue-fill, rgba(79, 123, 232, .2)); color: var(--fg); }

/* Builder */
.ov-restore { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 12px; border: 1px solid var(--ov-amber);
  border-radius: 8px; font-size: 12.5px; color: var(--fg-dim); }
.ov-restore[hidden] { display: none; }
.ov-builder { display: grid; grid-template-columns: 344px minmax(0, 1fr); column-gap: 24px; margin-top: 16px;
  grid-template-areas: "panel head" "panel canvas" "panel legend" "panel table"; align-items: start; }
/* The left column never makes the builder taller: contain: size drops its
   own height, stretch gives it the right column's, and it scrolls. */
.ov-panel { grid-area: panel; align-self: stretch; contain: size; overflow: hidden auto; }
.ov-flowhead { grid-area: head; padding: 14px 16px 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--st-inset); }
.ov-canvas { grid-area: canvas; }
.ov-legend { grid-area: legend; }
.ov-table { grid-area: table; }
.ov-canvas, .ov-legend, .ov-table { border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--st-inset); }
.ov-table { border-bottom: 1px solid var(--line); border-radius: 0 0 12px 12px; padding: 4px 16px 14px; }
.ov-flowtitle { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--fg); }
.ov-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ov-green); }
.ov-days { margin-left: auto; font-weight: 400; letter-spacing: 0; color: var(--fg-faint); }
.ov-rule { display: flex; gap: 8px; margin: 8px 0 0; font-size: 12.5px; color: var(--fg-dim); }
.ov-rule svg { flex: none; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.ov-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }

/* Canvas */
.ov-canvas { position: relative; overflow: hidden; height: 420px; cursor: default; outline: none; touch-action: none;
  user-select: none; -webkit-user-select: none; background-color: var(--ov-canvas);
  background-image: radial-gradient(var(--ov-dot) 1px, transparent 1px); background-size: 18px 18px; }
/* The diagram itself is never drawn as selected; the selected box shows focus.
   contain keeps its repaints (pan, zoom, wires) from reaching the settings page. */
.ov-canvas, .ov-canvas:focus, .ov-canvas:focus-visible { outline: none; -webkit-tap-highlight-color: transparent; }
.ov-canvas { contain: layout paint; }
.ov-layer > div:focus:not(.is-sel) { outline: none; }
.ov-hint { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--ov-box); font-size: 11.5px; color: var(--fg-dim); pointer-events: none; }
.ov-canvas.is-space, .ov-canvas.is-space .ov-box { cursor: grab; }
.ov-canvas.is-panning, .ov-canvas.is-panning .ov-box { cursor: grabbing; }
/* No permanent will-change: a standing compositor layer under the frosted
   settings header made the page flash while scrolling. */
.ov-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.ov-canvas.is-panning .ov-layer { will-change: transform; }
.ov-wires { position: absolute; left: 0; top: 0; overflow: visible; color: var(--fg-faint); pointer-events: none; }
.ov-wires path { fill: none; stroke: currentColor; stroke-width: 1.5; transition: d .2s ease-out; }
.ov-wires path.is-red { stroke: var(--ov-red); stroke-dasharray: 4 3; }
.ov-wires marker path { fill: currentColor; stroke: none; }
.ov-wires #ov-arrow-red path { fill: var(--ov-red); }
.ov-wires path.is-total { stroke: var(--ov-amber); stroke-width: 2; }
.ov-wires path.is-oneoff { stroke: var(--ov-violet); stroke-dasharray: 5 4; }
.ov-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--ov-box); font-size: 12px; color: var(--fg-dim); }
.ov-zoom button { min-width: 28px; height: 28px; border: 0; background: none; color: var(--fg); cursor: pointer; border-radius: 6px; }
.ov-zoom button:hover { background: var(--panel-2); }
.ov-zoom span { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.ov-broken { display: none; position: absolute; inset: 0; place-content: center; text-align: center; gap: 10px; color: var(--fg-dim); font-size: 13px; }
.ov-canvas.is-broken .ov-broken { display: grid; }
.ov-canvas.is-broken .ov-layer { display: none; }

.ov-layer > div { position: absolute; left: 0; top: 0; transition: transform .2s ease-out, opacity .16s ease-out; }
.ov-enter { opacity: 0; }
.ov-leave { opacity: 0; pointer-events: none; }
.ov-root { width: 360px; height: 104px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--ov-box); text-align: center; cursor: pointer; box-sizing: border-box; }
.ov-root .ov-bname { font-size: 14px; }
.ov-rnums { font-size: 12.5px; color: var(--fg-dim); margin: 2px 0 6px; }
.ov-rbar { position: relative; height: 5px; border-radius: 3px; display: flex; gap: 3px; }
.ov-rbar span { background: var(--ov-blue); border-radius: 3px; }
.ov-rbar i { flex: 1; border: 1px dashed var(--fg-faint); border-radius: 3px; }
.ov-rline { margin-top: 6px; font-size: 11px; color: var(--fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-rline b { color: var(--fg); }
.ov-rline a { color: var(--ov-blue); }
.ov-dot, .ov-ring { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ov-blue); margin: 0 3px 0 0; }
.ov-ring { background: none; border: 1px dashed var(--fg-faint); margin-left: 6px; }

.ov-box { width: 184px; height: 112px; box-sizing: border-box; padding: 9px 10px 0; border: 1px solid var(--line);
  border-radius: 10px; background: var(--ov-box); text-align: center; cursor: grab; display: flex; flex-direction: column;
  transition: transform .2s ease-out, opacity .16s ease-out, border-color .12s ease-out, box-shadow .12s ease-out; }
.ov-box:hover { border-color: var(--fg-faint); }
.ov-box.is-ca { cursor: default; }
.ov-box.is-view { border-color: var(--ov-blue); box-shadow: 0 0 0 1px rgba(79, 123, 232, .35), 0 0 18px -4px rgba(79, 123, 232, .55);
  background: linear-gradient(rgba(79, 123, 232, .12), rgba(79, 123, 232, .12)), var(--ov-box); }
.ov-box.is-sep { box-shadow: none; background: linear-gradient(rgba(79, 123, 232, .05), rgba(79, 123, 232, .05)), var(--ov-box); }
.ov-box.is-hidden { border: 1.5px dashed var(--ov-red); background: linear-gradient(rgba(229, 72, 77, .06), rgba(229, 72, 77, .06)), var(--ov-box); }
.ov-box.is-sel { outline: 2px solid var(--fg); outline-offset: 4px; }
.ov-root.is-sel { outline: 2px solid var(--fg); outline-offset: 4px; }
.ov-box.is-dragging { opacity: .35; }
.ov-box.is-zero .ov-bnums { color: var(--fg-faint); }
.ov-box.is-stack { box-shadow: 4px 4px 0 -1px var(--ov-box), 4px 4px 0 0 var(--line), 8px 8px 0 -1px var(--ov-box), 8px 8px 0 0 var(--line); }
.ov-bname { font-size: 13px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-bmatch { font-size: 11px; color: var(--fg-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 16px; }
.ov-bmatch i { font-style: italic; }
.ov-bnums { font-size: 12px; color: var(--fg-dim); margin-top: 3px; height: 17px; font-variant-numeric: tabular-nums; }
.ov-bspend { font-size: 11px; color: var(--fg-faint); height: 16px; }
.ov-bspend.has { color: var(--ov-green); }
.ov-bfoot { margin: auto -10px 0; padding: 5px 10px; border-top: 1px solid var(--st-line); display: flex; align-items: center;
  gap: 6px; font-size: 11px; color: var(--fg-dim); white-space: nowrap; min-width: 0; }
.ov-bstate { margin-left: auto; color: var(--fg-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ov-box.is-hidden .ov-bstate { color: var(--ov-red); }
.ov-tdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ov-amber); margin-right: 5px; vertical-align: 1px; }
.ov-box > * { flex: none; }
.ov-box.is-view .ov-bstate { color: var(--ov-blue); }
.ov-vsw { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; min-height: 20px; flex: none; }
.ov-vsw input { position: absolute; opacity: 0; pointer-events: none; }
.ov-mini { width: 24px; height: 13px; border-radius: 7px; background: var(--panel-3); position: relative; transition: background-color .12s ease-out; }
.ov-mini::after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: #fff; transition: transform .12s ease-out; }
.ov-vsw input:checked + .ov-mini { background: var(--ov-blue); }
.ov-vsw input:checked + .ov-mini::after { transform: translateX(11px); }
/* The pin star (box footer and views table): outlined, filled amber when pinned under Total. */
.ov-star { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px;
  background: none; color: var(--fg-faint); cursor: pointer; }
.ov-star svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
/* The views table's eye: in the Scorecard's view switcher or not (order_views show_as_view). */
.ov-eye { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px;
  background: none; color: var(--fg-faint); cursor: pointer; }
.ov-eye svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ov-eye.is-on { color: var(--ov-blue); }
.ov-eye:hover:not(:disabled) { color: var(--fg); }
.ov-eye:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.ov-eye:disabled { cursor: default; }
.ov-star-gap { display: inline-block; width: 20px; }
.ov-table tr.is-off td { opacity: .5; }
.ov-table tr.is-off td.ov-vord { opacity: 1; }
.ov-star:hover { color: var(--fg); background: var(--st-ctl); }
.ov-star.is-on { color: var(--ov-amber); }
.ov-star.is-on svg { fill: currentColor; }
.ov-star:focus-visible { outline: 2px solid var(--ov-blue); outline-offset: 1px; }
.ov-caret { border: 0; background: none; color: var(--fg-faint); cursor: pointer; padding: 0 4px; font-size: 11px; min-width: 20px; min-height: 20px; }
.ov-nub { position: absolute; left: 50%; bottom: -11px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  border: 1px dashed var(--fg-faint); background: var(--bg, #14161b); color: var(--fg); cursor: pointer; padding: 0;
  display: grid; place-items: center; }
.ov-nub svg, .ov-split-in button svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.ov-nub::before { content: ""; position: absolute; inset: -5px; }
.ov-nub:hover { border-style: solid; border-color: var(--ov-blue); }
.ov-num { position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg);
  color: var(--bg, #14161b); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ov-num--inline { position: static; display: inline-grid; margin-right: 6px; width: 17px; height: 17px; font-size: 10px; }
.ov-badge { display: inline-block; padding: 0 5px; border: 1px solid var(--fg-faint); border-radius: 4px; font-size: 9px;
  font-weight: 700; letter-spacing: .08em; color: var(--fg); margin-right: 6px; }
.ov-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ov-split { width: 0; height: 24px; }
.ov-split-in { position: absolute; left: 0; top: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--ov-box);
  font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--fg-dim); white-space: nowrap; }
.ov-split-in button { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--fg);
  cursor: pointer; padding: 0; position: relative; display: grid; place-items: center; }
.ov-split-in button::before { content: ""; position: absolute; inset: -5px; }
.ov-slot { width: 6px; height: 112px; border-radius: 3px; background: var(--ov-blue); opacity: .35; transition: opacity .1s, width .1s; }
.ov-slot.is-hot { opacity: 1; width: 8px; }
.ov-slot.is-bad { background: var(--ov-red); opacity: .12; }
.ov-slot.is-bad.is-hot { opacity: .6; }
.ov-slot.is-nub { width: 28px; height: 28px; border-radius: 50%; background: none; border: 2px dashed var(--ov-blue); }
.ov-ghost { --ov-box: var(--panel, #1a1d24); --ov-blue: #4f7be8; --st-line: rgba(127, 127, 127, .15); position: fixed; z-index: 1000; pointer-events: none; transform: scale(1.03) !important;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6) !important; cursor: grabbing; }
.ov-inrename { width: 100%; font: inherit; font-size: 13px; font-weight: 600; text-align: center; border: 1px solid var(--ov-blue);
  border-radius: 5px; background: var(--bg); color: var(--fg); padding: 0 4px; }
/* Numbers still loading: the shared skeleton bar (app.css .sk-bone). */
.ov-sk { display: inline-block; width: 110px; height: 9px; vertical-align: middle; }
.ov-sk--s { width: 70px; }

/* Total, fed by the boxes that count toward it */
.ov-totalbox { height: 96px; box-sizing: border-box; padding: 12px 18px; border: 1.5px solid var(--ov-amber); border-radius: 12px;
  background: linear-gradient(rgba(224, 161, 30, .1), rgba(224, 161, 30, .1)), var(--ov-box); cursor: pointer;
  box-shadow: 0 0 22px -8px rgba(224, 161, 30, .6); }
.ov-totalbox.is-off { border-style: dashed; box-shadow: none; }
.ov-totalbox.is-sel { outline: 2px solid var(--fg); outline-offset: 4px; }
.ov-tothead { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; min-width: 0; }
.ov-tothead .ov-bname { font-size: 14px; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 48px; }
.ov-totbadge { padding: 1px 6px; border-radius: 4px; background: var(--ov-amber); color: #1a1405; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; }
.ov-tothid { font-size: 11px; color: var(--fg-faint); }
.ov-totnums { margin-left: auto; font-size: 13px; color: var(--fg); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1000 auto; }
.ov-tothid, .ov-totsp, .ov-totbadge { flex: none; }
.ov-totsp { font-size: 12.5px; color: var(--ov-green); }
.ov-totbar { margin-top: 10px; }
.ov-totbar span { background: var(--ov-amber); }
.ov-dot--amber { background: var(--ov-amber); }
/* One-off views, beside the main flow */
.ov-oocol { box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--st-inset); z-index: 0; }
.ov-layer > .ov-box, .ov-layer > .ov-ooadd { z-index: 1; }
.ov-oohead { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 14px 0; }
.ov-oohead b { font-size: 10.5px; letter-spacing: .12em; color: var(--fg); }
.ov-oohead span { grid-column: 1 / -1; font-size: 11px; line-height: 1.35; color: var(--fg-faint); }
.ov-oohead button { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--fg);
  cursor: pointer; display: grid; place-items: center; }
.ov-oohead button svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.ov-box.is-oneoff { border: 1.5px dashed var(--ov-violet); cursor: pointer; box-shadow: none;
  background: linear-gradient(rgba(142, 124, 240, .08), rgba(142, 124, 240, .08)), var(--ov-box); }
.ov-box.is-oneoff .ov-bstate { color: var(--ov-violet); }
.ov-ooadd { width: 184px; }
.ov-ooadd button { width: 100%; height: 30px; border: 1px dashed var(--ov-violet); border-radius: 8px; background: none; color: var(--fg-dim);
  font-size: 12.5px; cursor: pointer; }
.ov-ooadd button:hover { color: var(--fg); }

/* Legend and table */
.ov-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 16px; border-top: 1px solid var(--st-line);
  font-size: 12px; color: var(--fg-dim); }
.ov-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ov-legend p { flex-basis: 100%; margin: 0; }
.ov-sw { width: 22px; height: 13px; border-radius: 4px; border: 1px solid var(--fg-faint); }
.ov-sw--view { border-color: var(--ov-blue); background: rgba(79, 123, 232, .2); }
.ov-sw--hidden { border: 1.5px dashed var(--ov-red); }
.ov-sw--oneoff { border: 1.5px dashed var(--ov-violet); }
.ov-ln { width: 22px; height: 0; border-top: 2px solid var(--ov-amber); }
.ov-tsum { margin: 12px 0 6px; font-size: 13px; color: var(--fg-dim); }
.ov-tsum b { color: var(--fg); }
.ov-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ov-table th { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); text-align: left; padding: 6px 0; }
.ov-table td { padding: 6px 0; border-top: 1px solid var(--st-line); color: var(--fg); }
.ov-table tr[data-ov-row] { cursor: pointer; }
.ov-table tr[data-ov-row]:hover td, .ov-table tr.is-sel td { background: rgba(79, 123, 232, .07); }
.ov-table .n { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; }
.ov-table .r { text-align: right; }
.ov-table .ov-total td { font-weight: 700; }
.ov-table .ov-vord { width: 1%; white-space: nowrap; padding-right: 10px; }
.ov-table .ov-vord .ov-tb { padding: 1px 6px; font-size: 11.5px; margin-right: 2px; }
.ov-table .ov-vord .ov-star, .ov-table .ov-vord .ov-eye, .ov-table .ov-vord .ov-star-gap { vertical-align: middle; margin-left: 2px; }
.ov-path { color: var(--fg-faint); font-size: 12px; margin-left: 6px; }
.ov-st { font-size: 12px; white-space: nowrap; }
.ov-st::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.ov-st--in::before { background: var(--ov-blue); }
.ov-st--sep::before { border: 1.5px solid var(--ov-blue); }
.ov-st--roll::before { border: 1px dashed var(--fg-faint); }
.ov-st--oneoff::before { background: var(--ov-violet); }
.ov-red { color: var(--ov-red); }
.ov-warn { color: var(--ov-amber); font-size: 12px; line-height: 1.45; margin: 6px 0 0; }
.ov-error { color: var(--ov-red); font-size: 12.5px; margin: 8px 0 0; }

/* Panel */
.ov-ptitle { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--fg); margin-bottom: 8px; }
.ov-ptitle span { font-weight: 400; letter-spacing: 0; color: var(--fg-faint); }
.ov-empty { padding: 28px 18px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; color: var(--fg-faint); line-height: 1.5; }
.ov-pcard { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--st-inset); user-select: text; }
.ov-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.ov-names label, .ov-lab { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; color: var(--fg-faint); }
.ov-names .st-input { margin-top: 5px; }
.ov-sec { padding: 12px 0; border-top: 1px solid var(--st-line); margin-top: 12px; }
.ov-sec + .ov-sec { margin-top: 0; }
.ov-vals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ov-val { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--fg); }
.ov-val button { border: 0; background: none; color: var(--fg-faint); cursor: pointer; padding: 0 3px; min-width: 18px; }
.ov-noord { font-style: normal; color: var(--fg-faint); font-size: 10.5px; }
.ov-or { font-size: 11.5px; color: var(--fg-faint); }
.ov-add { padding: 3px 8px; border: 1px dashed var(--line); border-radius: 6px; background: none; color: var(--fg-dim); font-size: 12px; cursor: pointer; }
.ov-size { font-size: 12.5px; color: var(--fg-dim); margin: 8px 0 0; }
.ov-size b { color: var(--fg); font-weight: 500; }
.ov-help { font-size: 12px; color: var(--fg-dim); line-height: 1.5; margin: 4px 0 0; }
.ov-order { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-dim); }
.ov-order span { margin-right: auto; min-width: 0; }
.ov-order .ov-tb { flex: none; padding: 3px 8px; font-size: 12px; line-height: 1.2; }
.ov-swrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ov-tgrow .ov-tsel { width: 100%; margin-top: 8px; }
.ov-swl { font-size: 13.5px; color: var(--fg); }
.ov-mutedi { font-size: 11px; color: var(--fg-faint); font-weight: 400; }
.ov-spamt { font-size: 13px; color: var(--fg-faint); }
.ov-spamt.has { color: var(--ov-green); }
.ov-rules { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.ov-rules summary { cursor: pointer; font-size: 13px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.ov-adv { margin-left: auto; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 9.5px; letter-spacing: .1em; color: var(--fg-faint); }
/* minmax(0, ...) and min-width 0: .st-select's 220px minimum pushed the
   panel wider than its column and made it scroll sideways. */
.ov-rule-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--st-line); align-items: center; }
.ov-rule-row .st-input { min-width: 0; width: 100%; }
.ov-rule-row .st-select { padding-right: 24px; background-position: right 8px center; text-overflow: ellipsis; }
.ov-rule-row input[type="text"] { grid-column: 2 / -1; }
.ov-rule-row .ov-help { grid-column: 1 / -1; margin: 0; }
.ov-rule-row.is-ex [data-ov-rf="mode"] { color: var(--ov-red); }
.ov-rules { min-width: 0; }
.ov-rules > .ov-add { margin-top: 10px; }
.ov-spchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ov-spchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--fg-dim); font-size: 12px; cursor: pointer; max-width: 100%; }
.ov-spchip:hover { border-color: var(--ov-blue); color: var(--fg); }
.ov-spchip.is-on { border-color: var(--ov-blue); background: var(--st-blue-fill, rgba(79, 123, 232, .2)); color: var(--fg); }
.ov-spchip.is-on::before { content: "✓"; font-size: 11px; }
.ov-spchip .ov-pk-n { margin-left: 0; font-size: 11px; }
/* Tag logic */
.ov-labrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ov-lab--gap { margin-top: 12px; }
.ov-seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 7px; }
.ov-seg button { border: 0; padding: 2px 8px; border-radius: 5px; background: none; color: var(--fg-faint); font-size: 11.5px; cursor: pointer; }
.ov-seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); }
.ov-val.is-not { border-color: rgba(229, 72, 77, .45); text-decoration: line-through; text-decoration-color: rgba(229, 72, 77, .6); }
.ov-val.is-not button { text-decoration: none; }
.ov-any { color: var(--fg-dim); padding-right: 8px; }
.ov-vals[data-ov-drop] { min-height: 30px; border-radius: 8px; transition: background-color .1s, box-shadow .1s; }
.ov-vals.is-drop { background: var(--st-blue-fill, rgba(79, 123, 232, .2)); box-shadow: 0 0 0 1.5px var(--ov-blue); }
.ov-vals.is-nodrop { box-shadow: 0 0 0 1.5px rgba(229, 72, 77, .5); }
.ov-tag { display: inline-block; margin-bottom: 12px; padding: 3px 9px; border-radius: 6px; font-size: 12px; }
.ov-tag--oneoff { border: 1px dashed var(--ov-violet); color: var(--ov-violet); }
.ov-tag--total { border: 1px solid var(--ov-amber); color: var(--ov-amber); }
.ov-names--one { grid-template-columns: 1fr; }
.ov-note { color: var(--ov-violet); }
.ov-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--st-line); }
.ov-danger { color: var(--ov-red); border-color: rgba(229, 72, 77, .5); }
.ov-exlist { list-style: none; padding: 0; margin: 8px 0; font-size: 12.5px; }
.ov-exlist li { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--st-line); color: var(--fg-dim); }
.ov-exlist b { color: var(--fg); font-variant-numeric: tabular-nums; }

/* Countries and order tags to drag onto the diagram */
.ov-lib { margin-top: 18px; }
.ov-lib .ov-ptitle { margin-top: 14px; }
.ov-lchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.ov-lchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 12.5px; color: var(--fg); background: var(--ov-box); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.ov-lchip:hover { border-color: var(--ov-blue); }
.ov-lchip.is-used { color: var(--fg-dim); border-style: dashed; }
.ov-lchip.is-ro { cursor: default; }
.ov-lchip .ov-pk-n { margin-left: 0; font-size: 11.5px; }
.ov-lchip mark { background: rgba(224, 161, 30, .35); color: inherit; border-radius: 2px; }
.ov-grip { width: 6px; height: 10px; flex: none; opacity: .55;
  background: radial-gradient(currentColor 1px, transparent 1.2px) 0 0 / 3px 3.4px; }
.ov-ok { color: var(--fg-faint); font-size: 11px; }
.ov-libq { margin-top: 8px; }
.ov-lib .ov-add { margin-top: 2px; }
.ov-starter { width: 100%; justify-content: center; }

/* Picker */
.ov-picker { position: fixed; z-index: 1200; width: 290px; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel, #1a1d24); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); font-size: 13px; color: var(--fg); }
.ov-pk-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ov-pk-tabs { display: flex; gap: 4px; margin-bottom: 8px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; }
.ov-pk-tabs button { flex: 1; border: 0; padding: 4px; border-radius: 5px; background: none; color: var(--fg-dim); cursor: pointer; font-size: 12.5px; }
.ov-pk-tabs button[aria-selected="true"] { background: rgba(79, 123, 232, .2); color: var(--fg); }
.ov-pk-list { max-height: 272px; overflow: auto; margin: 8px 0; }
.ov-pk-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 4px; border: 0; border-radius: 5px; background: none;
  color: var(--fg); font-size: 12.5px; text-align: left; cursor: pointer; min-height: 28px; }
.ov-pk-row:hover, .ov-pk-row.is-act { background: var(--panel-2); }
.ov-pk-row.is-off { color: var(--fg-faint); cursor: not-allowed; }
.ov-pk-row input { accent-color: var(--ov-blue); }
.ov-pk-row mark { background: rgba(224, 161, 30, .35); color: inherit; border-radius: 2px; }
.ov-pk-n { margin-left: auto; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.ov-pk-row .ov-link { margin-left: auto; }
.ov-pk-row .ov-link + .ov-pk-n { margin-left: 6px; }
.ov-pk-as { display: grid; gap: 4px; margin: 6px 0; font-size: 12.5px; }
.ov-pk-note, .ov-pk-more { margin: 4px 0; }
.ov-pk-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* Toasts and the leave prompt */
.ov-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1300; display: grid; gap: 8px; }
.ov-toast { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 9px; background: var(--fg); color: var(--bg);
  font-size: 13px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.ov-toast button { border: 0; background: none; color: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.ov-confirm { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 1300; padding: 16px 18px; width: 360px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .6); font-size: 13.5px; color: var(--fg); }
.ov-confirm div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .ov-layer > div, .ov-box, .ov-wires path { transition: opacity .08s linear !important; }
}
@media (max-width: 900px) {
  .ov-builder { grid-template-columns: 1fr; grid-template-areas: "head" "canvas" "legend" "table" "panel"; }
  .ov-panel { contain: none; overflow: visible; margin-top: 16px; }
}

/* Order flow & segmentation (forecast/segments.py, the forecast's flag):
   teal means "forecast". The group label's switch, box roles, the group
   panel and the segments summary under the legend. */
.ov { --ov-teal: #2bb5a4; }
.ov-wires path.is-fs { stroke: var(--ov-teal); stroke-width: 2; }
.ov-wires path.is-dash { stroke-dasharray: 4 3; }
.ov-split-in[data-ov-grp] { cursor: pointer; }
.ov-split.is-fon .ov-split-in { border-color: var(--ov-teal); }
.ov-split.is-sel .ov-split-in { outline: 2px solid var(--fg); outline-offset: 3px; }
.ov-split-in .ov-fsw { width: 26px; height: 14px; border-radius: 7px; border: 0; background: var(--panel-3); position: relative;
  display: inline-block; padding: 0; cursor: pointer; transition: background-color .12s ease-out; }
.ov-split-in .ov-fsw i { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  transition: transform .12s ease-out; }
.ov-split-in .ov-fsw.is-on { background: var(--ov-teal); }
.ov-split-in .ov-fsw.is-on i { transform: translateX(12px); }
.ov-split-in .ov-fsw.is-dis { opacity: .4; cursor: not-allowed; }
.ov-split-in .ov-fsw:focus-visible { outline: 2px solid var(--ov-teal); outline-offset: 2px; }
.ov-fstate { font-weight: 500; letter-spacing: 0; font-size: 11px; color: var(--fg-faint); }
.ov-split.is-fon .ov-fstate { color: var(--ov-teal); }
.ov-role { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); padding: 1px 7px; border-radius: 4px; font-size: 9px;
  font-weight: 700; letter-spacing: .08em; white-space: nowrap; line-height: 15px; background: var(--ov-box); }
.ov-role--segment { background: var(--ov-teal); color: #0d1f1c; }
.ov-role--rollup { border: 1px solid var(--ov-teal); color: var(--ov-teal); }
.ov-role--scorecard { border: 1px solid var(--ov-blue); color: var(--ov-blue); }
/* A forecast segment or roll-up is its tag (.ov-role) only: the box's state
   (included and shown, included and hidden, excluded) keeps its border and fill. */
.ov-role--inline { position: static; transform: none; display: inline-block; }
.ov-ln--fs { border-top-color: var(--ov-teal); }
.ov-tag--fs { border: 1px solid var(--ov-teal); color: var(--ov-teal); }
.ov-fslist { list-style: none; margin: 8px 0 0; padding: 0; }
.ov-fslist li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg); padding: 2px 0; }
.ov-fslist i { width: 7px; height: 7px; border-radius: 50%; background: var(--ov-teal); flex: none; }
.ov-fslist b { margin-left: auto; font-weight: 400; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.ov-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--fg); cursor: pointer; }
.ov-check input { margin-top: 3px; accent-color: var(--ov-teal); }
.ov-roleline { margin: 0 0 10px; font-size: 12px; color: var(--ov-blue); }
.ov-roleline--segment, .ov-roleline--rollup { color: var(--ov-teal); }
.ov-segsum { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px;
  margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--st-line); }
.ov-segsum .ov-lab span { font-weight: 400; letter-spacing: 0; color: var(--fg-faint); margin-left: 6px; }
.ov-chip--seg { border-color: var(--ov-teal); background: rgba(43, 181, 164, .08); }
.ov-selprev { display: inline-flex; margin: 6px 0; }

/* A dragged country or tag chip over a box: Include (top three quarters), Exclude (tags, bottom quarter). */
.ov-bdrop { position: absolute; inset: -1px; z-index: 3; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden;
  border: 1.5px dashed var(--ov-blue); background: var(--ov-box); cursor: copy; }
.ov-ooadd .ov-bdrop { bottom: auto; height: 112px; border-color: var(--ov-violet); }
.ov-bdrop > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 0;
  font-size: 11.5px; color: var(--fg-dim); transition: background .1s ease-out, color .1s ease-out; }
.ov-bdrop b { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.ov-bdrop-in { flex: 3; }
.ov-bdrop-ex { flex: 1; border-top: 1px dashed var(--ov-red); color: var(--ov-red) !important; }
.ov-bdrop-in.is-hot { background: var(--st-blue-fill, rgba(79, 123, 232, .2)); color: var(--fg); }
.ov-bdrop-ex.is-hot { background: rgba(229, 72, 77, .16); }
@media (prefers-reduced-motion: reduce) { .ov-bdrop > div { transition: none; } }

/* Forecast by orders (forecast/order_driven.py) */
.ov-role--orders { background: rgba(167, 139, 250, .9); color: #1a1430; }
.ov-ord-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; margin-right: 5px; vertical-align: 1px; }
.ov-ncby { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 6px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.ov-ncby-opt { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 28px; border-radius: 6px;
  border: 1px solid transparent; background: none; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.ov-ncby-opt.is-on { background: rgba(167, 139, 250, .2); border-color: rgba(167, 139, 250, .7); color: #fff; font-weight: 600; }
.ov-ncby-opt:disabled { opacity: .45; cursor: not-allowed; }
.ov-off { opacity: .42; pointer-events: none; }
.ov-offtag { margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 500;
  background: rgba(167, 139, 250, .16); color: #c9b9ff; }
[data-theme="light"] .ov-ncby-opt.is-on { color: #2a1d5c; }

/* Data sources (forecast/sources.py): the tile's icon strip and the Selected box card.
   No backdrop-filter and no shadow transitions here (hover flicker work, Nov 2026). */
.ov-root.has-src { height: 146px; }
.ov-srcs { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.ov-si { position: relative; display: inline-flex; }
.ov-si.is-off { opacity: .5; }
.ov-ssep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.ov-smore { font-size: 11px; color: var(--fg-dim); padding: 0 4px; }
/* No tile behind a source: the logo (sources.LOGOS) or, without one, the bare letter.
   Logos fit an 86% box in the slot, untouched; a halo (dark) or drop shadow (light), static. */
.ov-slogo { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none;
  font-size: 13px; font-weight: 700; color: var(--fg); }
.ov-slogo--lg { width: 32px; height: 32px; font-size: 16px; }
.ov-slogo img { display: block; width: 22px; height: 22px; object-fit: contain; filter: drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.45)); }
.ov-slogo--lg img { width: 28px; height: 28px; }
[data-theme="light"] .ov-slogo img { filter: drop-shadow(0 1px 1.2px rgba(20, 30, 50, 0.16)); }
.ov-hd { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-faint); }
.ov-si .ov-hd { position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; box-sizing: border-box; border: 2px solid var(--ov-box); }
.ov-hd--green { background: var(--ov-green); } .ov-hd--amber { background: var(--ov-amber); }
.ov-hd--red { background: var(--ov-red); } .ov-hd--blue { background: var(--ov-blue); }
.ov-c--green { color: var(--ov-green); } .ov-c--amber { color: var(--ov-amber); } .ov-c--red { color: var(--ov-red); }
.ov-c--blue { color: var(--ov-blue); } .ov-c--grey { color: var(--fg-dim); }
.ov-srcp { margin-bottom: 14px; }
.ov-srcp-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ov-srcp-h b { font-size: 14px; }
.ov-spills { display: flex; gap: 4px; flex-wrap: wrap; }
.ov-spill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; color: var(--fg-dim); }
.ov-sgh { display: flex; justify-content: space-between; margin: 14px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--fg-dim); }
.ov-sgh span { font-weight: 400; letter-spacing: 0; color: var(--fg-faint); }
.ov-src { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--ov-box); }
.ov-src.is-off { opacity: .6; }
.ov-src-r1 { display: flex; align-items: center; gap: 10px; }
.ov-src-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ov-src-id b { font-size: 13px; font-weight: 600; }
.ov-src-id span { font-size: 12px; color: var(--fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-src-sw { display: flex; gap: 8px; }
.ov-ssw { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9.5px; letter-spacing: .08em; color: var(--fg-faint); }
.ov-ssw .st-switch { width: 28px; height: 16px; cursor: default; opacity: .75; }
.ov-ssw .st-switch::after { width: 10px; height: 10px; }
.ov-ssw .st-switch:checked::after { left: calc(100% - 12px); }
.ov-ssw .ov-sw-pause:checked { background: var(--ov-amber); border-color: var(--ov-amber); }
.ov-src-r2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 8px 0 7px; font-size: 12px; color: var(--fg-dim); }
.ov-src-note { margin: -3px 0 7px; font-size: 11px; color: var(--fg-faint); }
.ov-snew { margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: 10px; font-weight: 600; color: var(--fg); background: color-mix(in srgb, var(--accent, #4f8cff) 22%, transparent); }
.ov-src-st { min-width: 0; }
.ov-src-st .ov-hd { margin-right: 5px; }
.ov-src-st a { color: var(--ov-blue); }
.ov-src-vol { flex: none; color: var(--fg); }
.ov-sbar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ov-sbar span { display: block; height: 100%; border-radius: 2px; }
.ov-sbar--orders span { background: var(--ov-blue); }
.ov-sbar--spend span { background: var(--ov-green); }
.ov-src-add { display: block; margin-top: 12px; padding: 11px; border: 1px solid var(--ov-blue); border-radius: 9px; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--ov-blue); background: color-mix(in srgb, var(--ov-blue) 12%, transparent); text-decoration: none;
  transition: background .12s ease-out; }
.ov-src-add:hover { background: color-mix(in srgb, var(--ov-blue) 20%, transparent); }
.ov-src-add:focus-visible { outline: 2px solid var(--ov-blue); outline-offset: 2px; }

/* Data rules: the button on Sales and Ad Channel Sources and its window
   (static/order_views.js openDr). Theme tokens only, so light and dark follow. */
.ov-drbtn { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 12px 14px; text-align: left;
  border: 1px solid var(--ov-amber); border-radius: 10px; background: color-mix(in srgb, var(--ov-amber) 9%, transparent);
  color: var(--fg); cursor: pointer; transition: background .12s ease-out; }
.ov-drbtn:hover { background: color-mix(in srgb, var(--ov-amber) 15%, transparent); }
.ov-drbtn:focus-visible { outline: 2px solid var(--ov-amber); outline-offset: 2px; }
.ov-drico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--ov-amber) 18%, transparent); color: var(--ov-amber); flex: none; }
.ov-drico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.ov-drtxt { flex: 1; display: grid; gap: 2px; }
.ov-drtxt b { font-size: 14px; font-weight: 600; }
.ov-drtxt small { font-size: 12px; color: var(--fg-dim); }
.ov-drchev { color: var(--fg-dim); font-size: 18px; }
.ov-drl { position: fixed; inset: 0; z-index: 1250; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .45); }
.ov-drw { width: min(1080px, 100%); max-height: calc(100vh / var(--zf, 1) - 48px); display: flex; flex-direction: column; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); color: var(--fg); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .6); outline: none; }
.ov-drh { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.ov-drh h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 19px; font-weight: 600; }
.ov-drh .ov-help { max-width: 68ch; font-size: 13px; }
.ov-drdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ov-amber); }
.ov-drbrand { font-size: 13.5px; font-weight: 400; color: var(--fg-dim); }
.ov-drpill { font-size: 11.5px; font-weight: 400; padding: 2px 10px; border: 1px solid var(--ov-amber); border-radius: 999px; color: var(--ov-amber); }
.ov-drflow { margin: 14px 24px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--st-inset); }
.ov-drflown { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--fg-dim); flex-wrap: wrap; }
.ov-drflown b { color: var(--fg); font-variant-numeric: tabular-nums; }
.ov-drbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1.15fr 1fr;
  margin-top: 14px; border-top: 1px solid var(--line); }
.ov-drcol { padding: 16px 24px; }
.ov-drcol + .ov-drcol { border-left: 1px solid var(--line); }
@media (max-width: 820px) { .ov-drbody { grid-template-columns: 1fr; } .ov-drcol + .ov-drcol { border-left: 0; border-top: 1px solid var(--line); } }
.ov-drsec { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--st-line); }
.ov-drlab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); }
.ov-drlab--gap { margin-top: 18px; }
.ov-drn { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--fg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-drn.is-zero, .ov-drn.is-load { font-weight: 400; color: var(--fg-faint); }
.ov-drchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ov-drchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 13px; background: var(--st-ctl); }
.ov-drchip.is-seed { border-color: color-mix(in srgb, var(--ov-green) 55%, transparent); }
.ov-drchip:not(:has(button)) { padding-right: 10px; }
.ov-drchip button { border: 0; background: none; color: var(--fg-faint); font-size: 14px; line-height: 1; padding: 2px 5px; border-radius: 5px; cursor: pointer; }
.ov-drchip button:hover { color: var(--fg); background: var(--st-line); }
.ov-drad { padding: 3px 10px; border: 1px dashed var(--fg-faint); border-radius: 7px; background: none; color: var(--fg-dim); font-size: 13px; cursor: pointer; }
.ov-drad:hover { color: var(--fg); border-color: var(--fg-dim); }
.ov-drin { width: 160px; padding: 3px 8px; font-size: 13px; }
.ov-drnone { margin: 0; }
.ov-drsw { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--st-line); }
.ov-drbuilt { grid-template-columns: 1fr auto; border-bottom: 0; }
.ov-drvals { display: grid; grid-template-columns: 1fr auto; margin: 0; font-size: 13.5px; }
.ov-drvals dt, .ov-drvals dd { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--st-line); }
.ov-drvals dt { color: var(--fg-dim); }
.ov-drvals dd { text-align: right; }
.ov-drg { margin-top: 8px; border: 1px solid var(--line); border-radius: 9px; }
.ov-drg summary { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; list-style: none; }
.ov-drg summary::-webkit-details-marker { display: none; }
.ov-drg summary small { color: var(--fg-faint); font-size: 12px; }
.ov-drg ul { margin: 0; padding: 0 14px 10px 30px; font-size: 13px; line-height: 1.5; color: var(--fg-dim); }
.ov-drg li + li { margin-top: 6px; }
.ov-drfoot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.ov-drfoot > .ov-help { margin: 0 auto 0 0; }
.ov-drfoot .ov-error { flex-basis: 100%; text-align: right; margin: 0; }

/* Retargeting, in the selected box's panel (static/order_views.js rtHtml). */
.ov-rtcard { margin-bottom: 12px; }
.ov-rtcard .ov-rt { border-top: 0; padding-top: 0; margin-top: 0; }
.ov-rtbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; margin: 2px 0 6px; background: var(--st-line); }
.ov-rtbar span { background: var(--ov-green); }
.ov-rtbar i { background: #e0672a; }
.ov-rtlegend { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--fg-dim); margin-bottom: 12px; }
.ov-rtlegend b { color: var(--fg); font-variant-numeric: tabular-nums; }
.ov-rtlegend .is-zero { opacity: .6; }
.ov-rtdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--ov-green); }
.ov-rtdot--rem { background: #e0672a; }
.ov-rthead { margin-top: 4px; }
.ov-rttag { margin-left: 6px; padding: 1px 7px; border: 1px solid #e0672a; border-radius: 999px; color: #e0672a; font-size: 10px; letter-spacing: .08em; vertical-align: 1px; }
.ov-rtch { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.ov-rtchh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ov-rtname { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.ov-rtsw { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-dim); }
.ov-rtrule { display: grid; grid-template-columns: 108px 1fr 24px; gap: 6px; align-items: center; margin-top: 10px; }
.ov-rtrule .st-input { font-size: 12.5px; padding: 5px 8px; min-width: 0; }
.ov-rtm { grid-column: 2 / -1; margin: 0; }
.ov-rtamt { color: #e0672a; font-weight: 600; }
.ov-rtch > .ov-add { margin-top: 10px; }
.ov-rtkept { margin-top: 6px; }
.ov-rtsum { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 9px 12px;
  border: 1px solid color-mix(in srgb, #e0672a 45%, transparent); border-radius: 9px; background: color-mix(in srgb, #e0672a 7%, transparent); font-size: 13px; }
.ov-rtsum .ov-link { color: #e0672a; text-decoration: none; font-size: 13px; }
.ov-rtlist { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; }
.ov-rtlist li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; }
.ov-rtlist li + li { border-top: 1px solid var(--st-line); }
.ov-rtlist li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-rtlist b { font-variant-numeric: tabular-nums; }
.ov-rtt { margin-top: 14px; }
.ov-rtfoot { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 10px; }
.ov-rtfoot .ov-help { margin: 0; }
.ov-rtfoot .ov-help { flex: 1; }
.ov-rtfoot .ov-rtcopy { flex: none; width: 46%; font-size: 12px; padding: 4px 8px; }
