/* ============================================================================
   V4 reskin of the AI-reply area (W11): hub, approvals, settings, templates,
   history. Page classes of the mockups 05 to 09 (webapp-v4/seiten) as
   .bl-ki-*, only tokens, scoped under .bl-v4 like v4.css. Nothing here
   matches without the v4_design switch.
   ========================================================================= */

/* ---------- Shared: tabs, page head, empty, pager ---------- */
.bl-v4 .bl-ki-tabs { margin-bottom: 24px; }
.bl-v4 .bl-ki-tabs .bl-ptab .bl-ic { opacity: .8; }
.bl-v4 .bl-ki-tabs .bl-nav-count:empty { display: none; }
.bl-v4 .bl-ki-head .bl-page-title { overflow-wrap: anywhere; }
.bl-v4 .bl-ki-panel > turbo-frame { display: block; }
.bl-v4 .bl-ki-panel .skel { overflow: hidden; }
/* A lazy frame still showing its skeleton loads for the first time: no fade, no bar. */
.bl-v4 turbo-frame.bl-is-refreshing:has(> .skel) > * { opacity: 1; }
.bl-v4 turbo-frame.bl-is-refreshing:has(> .skel)::before { display: none; }

.bl-v4 .bl-ki-empty.bl-empty { padding: 56px 24px; }
.bl-v4 .bl-ki-empty .bl-empty-sub { max-width: 56ch; line-height: 1.55; }
.bl-v4 .bl-ki-empty--done .bl-empty-ic { width: 32px; height: 32px; color: var(--good); }
.bl-v4 .bl-ki-empty--done .bl-empty-title { font-size: 18px; letter-spacing: -.01em; }

.bl-v4 .bl-ki-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.bl-v4 .bl-ki-pages { display: flex; align-items: center; gap: 4px; }
.bl-v4 .bl-ki-page { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bl-v4 a.bl-ki-page:hover { background: var(--surface-2); }
.bl-v4 .bl-ki-page.bl-is-active { background: var(--btn-bg); color: var(--btn-ink); }
.bl-v4 .bl-ki-page.bl-is-disabled { color: var(--muted-2); }
.bl-v4 .bl-ki-gap { color: var(--muted-2); padding: 0 2px; }

/* ---------- Bulk run pill (layout, all pages; base look in v4_dashboard.css) ---------- */
.bl-v4 .bl-run { max-width: 100%; }
.bl-v4 .bl-run-body .bl-bar { align-self: stretch; margin-top: 2px; }

/* ---------- Approvals (hub tab and own page) ---------- */
.bl-v4 .bl-ki-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 16px; }
.bl-v4 .bl-ki-bar-text { font-size: 14px; color: var(--ink-2); }
.bl-v4 .bl-ki-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 16px; font-size: 13.5px; color: var(--ink-2); }
.bl-v4 .bl-ki-progress:has(> *) { margin-bottom: 20px; }
.bl-v4 .bl-ki-progress .bl-banner-body .bl-bar { margin-top: 8px; height: 6px; }
.bl-v4 .bl-ki-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; color: var(--ink); }
.bl-v4 .bl-ki-progress-top span:last-child { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.bl-v4 .bl-ki-progress .bl-spinner { margin-top: 2px; }

.bl-v4 .bl-ki-queue { display: flex; flex-direction: column; gap: 12px; }
.bl-v4 .bl-ki-appr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; padding: 20px 24px; transition: box-shadow .15s ease; }
.bl-v4 .bl-ki-appr--manual { box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.bl-v4 .bl-ki-appr.bl-is-dirty { box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--accent-line), var(--shadow); }
.bl-v4 .bl-ki-appr-review { padding-right: 24px; border-right: 1px solid var(--line); min-width: 0; }
.bl-v4 .bl-ki-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.bl-v4 .bl-ki-name { font-size: 15px; font-weight: 700; color: var(--ink); min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-ki-loc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.bl-v4 .bl-ki-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bl-v4 .bl-ki-manual { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.bl-v4 .bl-ki-quote { margin-top: 12px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.bl-v4 .bl-ki-quote--none { color: var(--muted); font-style: italic; }
.bl-v4 .bl-ki-appr-draft { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bl-v4 .bl-ki-draft-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.bl-v4 .bl-ki-dirty { font-size: 11.5px; font-weight: 600; color: var(--warn); }
.bl-v4 .bl-ki-appr-draft .bl-textarea { min-height: 112px; font-size: 14px; overflow: hidden; resize: none; }
.bl-v4 .bl-textarea.bl-is-invalid { border-color: var(--bad); }
.bl-v4 .bl-ki-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bl-v4 .bl-ki-actions form { display: contents; }

/* Dialog "Alle freigeben": the drafts that get posted */
.bl-v4 .bl-ki-post-list { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 280px; overflow-y: auto; }
.bl-v4 .bl-ki-post-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; }
.bl-v4 .bl-ki-post-row + .bl-ki-post-row { border-top: 1px solid var(--line); }
.bl-v4 .bl-ki-post-row .bl-ki-name { font-size: 14px; }
.bl-v4 .bl-ki-post-row .bl-tag { margin-left: auto; }
.bl-v4 .bl-ki-stay { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.bl-v4 .bl-ki-stay .bl-ic { margin-top: 2px; color: var(--warn); flex: none; }
.bl-v4 .bl-ki-dialog-btns { margin-top: 20px; justify-content: flex-end; }

/* ---------- Settings ---------- */
.bl-v4 .bl-ki-locs .bl-lrow { padding: 18px 24px; }
.bl-v4 .bl-ki-locs .bl-lrow-ic { color: var(--accent); background: var(--accent-soft); }
.bl-v4 .bl-ki-locs .bl-lrow-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; }
.bl-v4 .bl-ki-locs .bl-lrow-side { flex-wrap: wrap; justify-content: flex-end; }
.bl-v4 .bl-ki-locs .bl-ki-locked .bl-lrow-ic { color: var(--muted); background: var(--surface-2); }
.bl-v4 .bl-ki-locs .bl-ki-locked .bl-lrow-title { color: var(--ink-2); }

.bl-v4 .bl-ki-up { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 28px; margin-bottom: 24px; }
.bl-v4 .bl-ki-up-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.bl-v4 .bl-ki-up-title .bl-ic { color: var(--accent); }
.bl-v4 .bl-ki-up-desc { margin-top: 8px; font-size: 14px; color: var(--ink-2); max-width: 60ch; }
.bl-v4 .bl-ki-ticks { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.bl-v4 .bl-ki-ticks li { display: flex; align-items: flex-start; gap: 10px; }
.bl-v4 .bl-ki-ticks .bl-ic { margin-top: 3px; color: var(--accent); flex: none; }
.bl-v4 .bl-ki-ticks--small { gap: 8px; margin-top: 10px; font-size: 13px; }
.bl-v4 .bl-ki-up-benefits { margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--surface-2); }
.bl-v4 .bl-ki-demo { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); align-self: start; }
.bl-v4 .bl-ki-demo-who { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; }
.bl-v4 .bl-ki-demo-av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; font-size: 10px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.bl-v4 .bl-ki-demo-review { margin-top: 6px; font-size: 13px; line-height: 1.55; font-style: italic; color: var(--ink-2); }
.bl-v4 .bl-ki-demo-reply { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.bl-v4 .bl-ki-demo-reply .bl-owner-label { color: var(--accent-ink); }
.bl-v4 .bl-ki-demo-reply p { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }

.bl-v4 .bl-ki-form { display: flex; flex-direction: column; gap: 16px; }
.bl-v4 .bl-ki-sec { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 28px; scroll-margin-top: 24px; }
.bl-v4 .bl-ki-sec-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.bl-v4 .bl-ki-sec-head p { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.bl-v4 .bl-ki-fields { display: flex; flex-direction: column; gap: 24px; min-width: 0; max-width: 760px; }
.bl-v4 .bl-ki-fields .bl-select { max-width: 384px; }
.bl-v4 .bl-ki-fields .bl-input { width: 100%; height: 44px; padding: 0 14px; }
.bl-v4 .bl-ki-seg { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.bl-v4 .bl-ki-seg label { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.bl-v4 .bl-ki-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bl-v4 .bl-ki-seg label:hover { color: var(--ink); }
.bl-v4 .bl-ki-seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(12, 27, 30, .1), 0 0 0 1px var(--line); }
.dark .bl-v4 .bl-ki-seg label:has(input:checked) { background: var(--line-strong); box-shadow: none; }
.bl-v4 .bl-ki-seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.bl-v4 .bl-ki-itabs { margin-top: -6px; }
.bl-v4 .bl-ki-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--muted-2); }
.bl-v4 .bl-ki-dot--pos { background: var(--accent); }
.bl-v4 .bl-ki-dot--neg { background: var(--bad); }
.bl-v4 .bl-ki-ipanel { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; }
/* tabs_controller toggles Tailwind's .hidden, which sits in a cascade layer and loses to the rule above. */
.bl-v4 .bl-ki-ipanel.hidden, .bl-v4 .bl-ki-panel.hidden { display: none; }
.bl-v4 .bl-ki-ipanel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.bl-v4 .bl-ki-rec { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.bl-v4 .bl-ki-rec--neg { border-left-color: var(--bad); }
.bl-v4 .bl-ki-rec-text { margin-top: 6px; font-size: 14px; line-height: 1.55; font-style: italic; color: var(--ink-2); }
.bl-v4 .bl-ki-ipanel .bl-textarea { min-height: 88px; }

.bl-v4 .bl-ki-choices-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bl-v4 .bl-ki-choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-v4 .bl-ki-choices-4 .bl-choice, .bl-v4 .bl-ki-choices-3 .bl-choice { padding: 14px 16px; }
.bl-v4 .bl-ki-mode .bl-choice-sub { line-height: 1.5; }
.bl-v4 .bl-ki-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--warn); }
.bl-v4 .bl-ki-note .bl-ic { margin-top: 2px; flex: none; }

.bl-v4 .bl-ki-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 16px; padding: 14px 16px 14px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.bl-v4 .bl-ki-save > .bl-inherit { flex: 1 1 auto; min-width: 0; padding: 10px 14px; }
.bl-v4 .bl-ki-save-btns { display: flex; align-items: center; gap: 8px; }

.bl-v4 .bl-ki-targets { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; max-height: 240px; overflow-y: auto; }
.bl-v4 .bl-ki-target { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.bl-v4 .bl-ki-target:hover { background: var(--surface-2); }
.bl-v4 .bl-ki-target:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bl-v4 .bl-ki-target-name { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.bl-v4 .bl-ki-target-addr { display: block; font-size: 12.5px; color: var(--muted); }

.bl-v4 .bl-ki-errors { margin-bottom: 16px; }
.bl-v4 .bl-ki-errors ul { margin-top: 4px; padding-left: 18px; list-style: disc; }
.bl-v4 .bl-ki-k { margin-bottom: 24px; }

/* ---------- Templates ---------- */
.bl-v4 .bl-ki-tpl-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 24px; }
.bl-v4 .bl-ki-tpl-bar .bl-help { font-size: 13.5px; max-width: 60ch; }
.bl-v4 .bl-ki-lock { margin-bottom: 20px; }
.bl-v4 .bl-ki-cats { display: flex; flex-direction: column; gap: 32px; }
.bl-v4 .bl-ki-cat-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; padding: 0 4px; }
.bl-v4 .bl-ki-cat-hint { font-size: 12.5px; color: var(--muted); }
.bl-v4 .bl-ki-tpls .bl-lrow { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px; padding: 20px 24px; }
.bl-v4 .bl-ki-tpls .bl-lrow-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; }
.bl-v4 .bl-ki-tpls .bl-lrow-side { padding-top: 2px; }
.bl-v4 .bl-ki-tpls .bl-lrow-side form { display: contents; }
.bl-v4 .bl-ki-tpl-text { margin-top: 6px; max-width: 78ch; font-size: 14px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bl-v4 .bl-ki-tpl-meta { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.bl-v4 .bl-ki-form-wrap { max-width: 800px; }
.bl-v4 .bl-ki-tform .bl-card-pad { padding: 28px; }
.bl-v4 .bl-ki-tform .bl-form { gap: 28px; }
.bl-v4 .bl-ki-tform .bl-input { width: 100%; max-width: 440px; height: 44px; padding: 0 14px; }
.bl-v4 .bl-ki-tform .bl-textarea { min-height: 156px; }
.bl-v4 .bl-ki-label-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bl-v4 .bl-ki-count { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bl-v4 .bl-ki-cats-choice { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-v4 .bl-ki-cats-choice .bl-choice { padding: 14px 16px; }
.bl-v4 .bl-ki-cats-choice .bl-choice-title { display: flex; align-items: center; gap: 8px; }
.bl-v4 .bl-ki-default { padding-top: 20px; border-top: 1px solid var(--line); }
.bl-v4 .bl-ki-default .bl-check { align-items: flex-start; white-space: normal; }
.bl-v4 .bl-ki-default .bl-check-box { margin-top: 1px; }
.bl-v4 .bl-ki-default-text { display: flex; flex-direction: column; gap: 3px; }
.bl-v4 .bl-ki-default-sub { font-size: 12.5px; font-weight: 500; line-height: 1.45; color: var(--muted); }
.bl-v4 .bl-ki-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------- History ---------- */
/* 4 live values; the K7 slot (W20) adds a 5th column on its own. */
.bl-v4 .bl-ki-metrics { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.bl-v4 .bl-ki-metrics > a { display: block; padding: 14px 16px; background: var(--surface-2); min-width: 0; transition: background-color .15s ease; }
.bl-v4 .bl-ki-metrics > a:hover { background: var(--accent-soft); }
.bl-v4 .bl-ki-metrics > a:hover .bl-ki-mlink { text-decoration-color: currentColor; }
.bl-v4 .bl-ki-metrics .bl-metric-value { margin-top: 6px; }
.bl-v4 .bl-ki-metrics .bl-ki-m--good { color: var(--good); }
.bl-v4 .bl-ki-metrics .bl-ki-m--warn { color: var(--warn); }
.bl-v4 .bl-ki-metrics .bl-ki-m--accent { color: var(--accent-ink); }
.bl-v4 .bl-ki-metrics .bl-ki-m--zero { color: var(--muted-2); }
.bl-v4 .bl-ki-mlink { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--accent-line); }

.bl-v4 .bl-ki-list { margin-top: 24px; }
.bl-v4 .bl-ki-lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.bl-v4 .bl-ki-hfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
/* The global form styles give bare selects a fill and their own arrow; the .bl-field has both already. */
.bl-v4 .bl-ki-hfilter .bl-field select { background: transparent; padding: 0; border: 0; box-shadow: none; }
.bl-v4 .bl-ki-lcount, .bl-v4 .bl-ki-ftoggle { display: none; }
.bl-v4 .bl-ki-hrow { padding: 16px 24px; border-top: 1px solid var(--line); }
.bl-v4 .bl-ki-hrow:first-child { border-top: 0; }
.bl-v4 .bl-ki-hrow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.bl-v4 .bl-ki-hrow .bl-ki-name { font-size: 14.5px; max-width: 180px; }
.bl-v4 .bl-ki-hrow-loc { font-size: 12.5px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-v4 .bl-ki-hrow-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-v4 .bl-ki-hrow-pills .bl-tag { height: 22px; padding: 0 8px; font-size: 11.5px; }
.bl-v4 .bl-ki-hrow-review { margin-top: 8px; font-size: 12.5px; font-style: italic; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-v4 .bl-ki-hrow-reply { max-width: 92ch; margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bl-v4 .bl-ki-hrow-fail { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--bad); }
.bl-v4 .bl-ki-hrow-fail .bl-ic { margin-top: 1px; flex: none; }
.bl-v4 .bl-ki-hrow-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.bl-v4 .bl-ki-hrow-foot b { font-weight: 600; color: var(--ink-2); }
.bl-v4 .bl-ki-posted { font-weight: 600; color: var(--accent-ink); }
.bl-v4 .bl-ki-time { font-variant-numeric: tabular-nums; }

/* ---------- Dark mode fields ----------
   app/assets/tailwind/application.css paints every input/textarea/select in
   dark mode grey with !important (.dark input:not(...)). On these pages the
   V4 tokens win again; the same fix belongs into v4.css for all V4 pages. */
.dark .bl-v4 :is(.bl-ki-form, .bl-ki-tform, .bl-ki-appr, .bl-ki-targets) :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  background-color: var(--surface) !important;
  border-color: var(--line-strong) !important;
  color: var(--ink) !important;
}
.dark .bl-v4 :is(.bl-ki-form, .bl-ki-tform, .bl-ki-appr) :is(input, textarea, select):focus { border-color: var(--accent) !important; }
.dark .bl-v4 :is(.bl-ki-form, .bl-ki-tform, .bl-ki-appr) .bl-is-invalid { border-color: var(--bad) !important; }
.dark .bl-v4 .bl-ki-hfilter .bl-field select { background-color: transparent !important; border-color: transparent !important; color: var(--ink) !important; }

/* ---------- Phone ---------- */
@media (max-width: 1023.98px) {
  .bl-v4 .bl-run { width: 100%; }
  .bl-v4 .bl-ki-hub-head .bl-head-pills,
  .bl-v4 .bl-ki-hub-head .bl-page-sub { display: none; }
  .bl-v4 .bl-ki-tabs { margin: 0 -16px 20px; padding: 0 8px; }
  .bl-v4 .bl-ki-tabs .bl-ptab { padding: 0 12px; gap: 6px; }
  .bl-v4 .bl-ki-tabs .bl-ptab > .bl-ic { display: none; }
  .bl-v4 .bl-ki-head { flex-wrap: wrap; }
  .bl-v4 .bl-ki-head .bl-page-actions { width: 100%; }
  .bl-v4 .bl-ki-head .bl-page-actions .bl-btn { width: 100%; height: 44px; }
  .bl-v4 .bl-ki-pager { justify-content: center; padding: 12px 16px; }
  .bl-v4 .bl-ki-page { min-width: 40px; height: 40px; }

  .bl-v4 .bl-ki-bar .bl-btn { width: 100%; height: 44px; }
  .bl-v4 .bl-ki-filter .bl-textbtn { min-height: 40px; }
  .bl-v4 .bl-ki-appr { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .bl-v4 .bl-ki-appr-review { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .bl-v4 .bl-ki-name { max-width: 180px; }
  .bl-v4 .bl-ki-actions .bl-btn { height: 40px; }
  .bl-v4 .bl-ki-actions .bl-btn-primary { flex: 1 1 100%; height: 44px; }
  .bl-v4 .bl-ki-actions .bl-btn-outline { flex: 1 1 0; }
  .bl-v4 .bl-ki-post-row { min-height: 48px; }
  .bl-v4 .bl-ki-dialog-btns .bl-btn { flex: 1 1 0; height: 44px; }

  .bl-v4 .bl-ki-locs .bl-lrow { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .bl-v4 .bl-ki-locs .bl-lrow-side { grid-column: 1 / -1; justify-content: flex-start; }
  .bl-v4 .bl-ki-locs .bl-lrow-side .bl-btn { width: 100%; height: 44px; }
  .bl-v4 .bl-ki-up { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
  .bl-v4 .bl-ki-sec { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px 16px; }
  .bl-v4 .bl-ki-fields .bl-select { max-width: 100%; }
  .bl-v4 .bl-ki-seg { align-self: stretch; }
  .bl-v4 .bl-ki-seg label { flex: 1 1 0; justify-content: center; height: 40px; padding: 0 10px; }
  .bl-v4 .bl-ki-itabs { margin: -6px -16px 0; padding: 0 8px; }
  .bl-v4 .bl-ki-itabs .bl-ptab { padding: 0 10px; gap: 6px; font-size: 13.5px; }
  .bl-v4 .bl-ki-ipanel-head .bl-check { min-height: 40px; }
  .bl-v4 .bl-ki-choices-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bl-v4 .bl-ki-choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bl-v4 .bl-ki-choices-4 .bl-choice, .bl-v4 .bl-ki-choices-3 .bl-choice { padding: 12px; }
  .bl-v4 .bl-ki-mode { grid-template-columns: minmax(0, 1fr); }
  .bl-v4 .bl-ki-save { flex-direction: column; align-items: stretch; padding: 16px; }
  .bl-v4 .bl-ki-save-btns { width: 100%; }
  .bl-v4 .bl-ki-save-btns .bl-btn { flex: 1 1 0; height: 44px; }
  .bl-v4 .bl-ki-target { min-height: 56px; }

  .bl-v4 .bl-ki-tpl-bar .bl-btn { width: 100%; height: 44px; }
  .bl-v4 .bl-ki-cats { gap: 24px; }
  .bl-v4 .bl-ki-tpls .bl-lrow { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .bl-v4 .bl-ki-tpls .bl-lrow-side { grid-column: 1; padding-top: 0; }
  .bl-v4 .bl-ki-tpls .bl-lrow-side .bl-btn { height: 40px; }
  .bl-v4 .bl-ki-tpls .bl-lrow-side .bl-btn-outline { flex: 1 1 0; }
  .bl-v4 .bl-ki-tform .bl-card-pad { padding: 20px 16px; }
  .bl-v4 .bl-ki-tform .bl-input { max-width: none; }
  .bl-v4 .bl-ki-cats-choice { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bl-v4 .bl-ki-cats-choice .bl-choice { min-height: 52px; padding: 12px 14px; }
  .bl-v4 .bl-ki-default .bl-check { min-height: 40px; }
  .bl-v4 .bl-ki-form-actions .bl-btn { flex: 1 1 0; height: 44px; }

  .bl-v4 .bl-ki-metrics { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-v4 .bl-ki-lhead { flex-wrap: wrap; padding: 12px 16px; }
  .bl-v4 .bl-ki-lcount { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
  .bl-v4 .bl-ki-ftoggle { display: inline-flex; height: 40px; }
  .bl-v4 .bl-ki-hfilter { display: none; flex: 1 1 100%; padding-top: 4px; }
  .bl-v4 .bl-ki-list.bl-is-open .bl-ki-hfilter { display: flex; }
  .bl-v4 .bl-ki-hfilter .bl-field { flex: 1 1 100%; height: 42px; }
  .bl-v4 .bl-ki-hfilter .bl-btn { flex: 1 1 100%; height: 44px; }
  .bl-v4 .bl-ki-hfilter .bl-textbtn { min-height: 40px; }
  .bl-v4 .bl-ki-hrow { padding: 16px; }
  .bl-v4 .bl-ki-hrow-head { align-items: flex-start; }
}
