/* Karmenergy app UI. Printed documents (offer, internal calc, contract) are styled in doc.css. */
:root {
  --gold: #b8892a; --gold-d: #96701f; --gold-l: #f6ecd6; --ink: #1c2541; --ink-2: #3a4566;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --bg: #f4f2ed; --panel: #fff; --line: #e5e0d5; --line-2: #efebe3; --muted: #776f61; --text: #22201b;
  --red: #b4372a; --ok: #2d7d4a; --warn: #a06a00; --blue: #2f5bb7;
  --r: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: #1b1a17; color: #d9d2c3; padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.brand { background: #fbf8f3; border-radius: 10px; padding: 6px 10px; }
.brand img { width: 100%; display: block; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav button { all: unset; cursor: pointer; padding: 9px 12px; border-radius: 8px; color: #d9d2c3; display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
nav button .ic { width: 16px; text-align: center; opacity: .7; font-size: 13px; }
nav button:hover { background: #2a2823; }
nav button.active { background: var(--gold); color: #fff; font-weight: 600; }
nav button.active .ic { opacity: 1; }
nav button:focus-visible { outline: 2px solid var(--gold-l); }
.side-foot { margin-top: auto; font-size: 11.5px; color: #9a927f; display: grid; gap: 6px; line-height: 1.35; }
.side-foot .ver { color: #6f6858; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #777; }
.dot.ok { background: #57b06f; } .dot.warn { background: #e0a43a; } .dot.off { background: #8a8270; }
main { padding: 22px 28px 48px; min-width: 0; }
.view { display: none; } .view.active { display: block; }
.top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 23px; letter-spacing: -0.01em; }
h3 { margin: 20px 0 8px; font-size: 13px; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.panel > h3:first-child, .form > h3:first-child { margin-top: 0; }
.step { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; display: inline-grid; place-items: center; letter-spacing: 0; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.mt { margin-top: 10px; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; color: var(--text); font-size: 13.5px; }
.btn:hover { border-color: var(--gold); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn.primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn.primary:hover { background: var(--gold-d); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.panel.flush { padding: 4px 6px; overflow-x: auto; }
.builder { display: grid; grid-template-columns: minmax(440px, 1fr) minmax(480px, 1.05fr); gap: 18px; align-items: start; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
label.full, .full { grid-column: 1 / -1; }
label.chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--text); font-size: 13px; margin: 6px 0; }
label.chk.inline { margin: 0; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-l); border-color: var(--gold); }
input[type=checkbox] { padding: 0; width: 16px; height: 16px; accent-color: var(--gold); }
input.err { border-color: var(--red); background: #fff5f4; }
input.man { background: #fff8e6; border-color: #e7cf94; }
input:disabled { background: #f6f4ef; color: #b3ab9b; }
.wide-in { width: 100%; margin: 10px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pkgrow { display: flex; gap: 8px; align-items: center; }
.pkgrow select { flex: 1; min-width: 0; }
label.inline { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }
label.inline input { width: 64px; }

/* client card */
.cc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fcfbf8; display: grid; gap: 4px; }
.cc-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-act { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.cc.empty-c { border-style: dashed; }
.pick-list { display: grid; gap: 4px; max-height: 380px; overflow: auto; }
.pick-list button { all: unset; cursor: pointer; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; gap: 2px; }
.pick-list button:hover, .pick-list button:focus-visible { background: #fbf5e6; border-color: #ecd9a8; }

/* segmented control */
.seg { display: inline-flex; background: #f1eee7; border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { all: unset; cursor: pointer; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button:focus-visible { outline: 2px solid var(--gold); }
.seg.big { margin: 12px 0; } .seg.big button { padding: 7px 14px; font-size: 13px; }

/* search */
.search { position: relative; }
.search input { width: 100%; }
.results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.14); max-height: 380px; overflow: auto; display: none; }
.results.open { display: block; }
.results > div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f2eee5; display: flex; justify-content: space-between; gap: 12px; }
.results > div:hover, .results > div.hl { background: #fbf5e6; }
.results .none { color: var(--muted); cursor: default; }
.results .rn { min-width: 0; }
.results .rp { text-align: right; white-space: nowrap; display: grid; align-content: start; font-variant-numeric: tabular-nums; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); }
.src { font-family: -apple-system, "Segoe UI", sans-serif; font-weight: 700; font-size: 10.5px; padding: 0 5px; border-radius: 4px; }
.s-enth { background: #e3f1ea; color: #23744a; } .s-darcom { background: #e5ecfa; color: #2f5bb7; } .s-blacksea { background: #e6f2f6; color: #1f6b80; } .s-own { background: #f2ece0; color: #7a6233; }
.st { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; font-style: normal; }
.st.ok { background: #3fa564; } .st.warn { background: #e0a43a; } .st.no { background: #cfc6b5; }

/* offer lines */
#lines { margin-top: 10px; }
.lcat { font-size: 11px; font-weight: 700; color: var(--gold-d); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 2px; }
.lhead, .line { display: grid; grid-template-columns: 1fr 58px 58px 88px 88px 24px; gap: 6px; align-items: center; }
.lhead { font-size: 11px; color: var(--muted); font-weight: 600; text-align: right; margin-top: 10px; }
.lhead span:first-child { text-align: left; }
.line { padding: 6px 0; border-bottom: 1px dashed #ece6d9; }
.line .nm { font-size: 13px; line-height: 1.25; min-width: 0; }
.line .nm .code { display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line input { padding: 5px 6px; text-align: right; width: 100%; font-variant-numeric: tabular-nums; font-size: 13px; }
.line input.nmi { text-align: left; }
.line .tot { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.line .x { border: 0; background: none; color: #b5ad9b; cursor: pointer; font-size: 15px; padding: 4px; border-radius: 6px; }
.line .x:hover { color: var(--red); background: #fbeeec; }
.line.stale { background: linear-gradient(90deg, #fff8e6, transparent 70%); }
.chg { color: var(--warn); }
.stale-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff6df; border: 1px solid #f0dca8; color: #7a5a12; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; margin-bottom: 6px; }
.empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; margin: 10px 0; }
td.empty { border: 0; padding: 26px; }

/* labor */
.labor.on { margin-top: 16px; border: 1px solid #ecd9a8; background: #fffbf2; border-radius: 10px; padding: 12px; }
.lab-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.lab-grid { display: grid; grid-template-columns: 1fr 1.15fr auto; gap: 10px; align-items: end; }
.inrow { display: flex; gap: 6px; align-items: center; }
.inrow input { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.lab-net { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.lab-net b { font-size: 16px; color: var(--ink); }

.totals-mini { margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-variant-numeric: tabular-nums; }
.totals-mini .big { font-size: 18px; font-weight: 700; color: var(--ink); padding-top: 4px; border-top: 1px solid var(--line); }
.totals-mini .pr { font-size: 12px; color: var(--ok); font-weight: 600; margin-top: 4px; }

/* preview */
.preview { position: sticky; top: 16px; padding: 10px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 4px 8px; gap: 10px; }
.sheet-wrap { background: #e7e3da; border-radius: 8px; padding: 12px; overflow: auto; max-height: calc(100vh - 120px); }
#preview, #ct-preview { transform-origin: top left; }
#ct-preview .kpage { margin-bottom: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }

/* tables */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi .v { font-size: 21px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .code { white-space: nowrap; }
.tbl input.pi { width: 100px; text-align: right; padding: 5px 6px; }
.tbl select.pc { padding: 4px 6px; font-size: 12px; max-width: 150px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.b-sent { background: #e8eefb; color: #2d4f9e; } .b-ok { background: #e3f4e8; color: var(--ok); }
.b-warn { background: #fff1d6; color: #8a5c00; } .b-exp { background: #f6e6e3; color: var(--red); }
.b-demo { background: #efece6; color: #6b6458; }
.rowact { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.filters input { width: 280px; }
.banner { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 10px; color: var(--ink-2); }
.note { margin-top: 12px; font-size: 12px; color: var(--muted); }
.pkg { margin-bottom: 14px; }
.pkg h3 { margin: 0 0 4px; text-transform: none; letter-spacing: 0; font-size: 15px; }
.pkg .formula { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--blue); }

/* modal / toast */
.modal { position: fixed; inset: 0; background: rgba(20,18,14,.45); display: flex; align-items: flex-start; justify-content: center; padding: 50px 20px; z-index: 50; overflow: auto;
  opacity: 0; visibility: hidden; transition: opacity 180ms var(--ease-out), visibility 0s linear 180ms; }
.modal.open { opacity: 1; visibility: visible; transition: opacity 200ms var(--ease-out); }
.modal-box { background: #fff; border-radius: 14px; padding: 22px; width: min(760px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(8px) scale(0.97); transition: transform 240ms var(--ease-out), opacity 200ms var(--ease-out); }
.modal.open .modal-box { opacity: 1; transform: none; }
.modal-box h2 { margin: 0 0 6px; font-size: 19px; }
.modal-box h4 { margin: 14px 0 4px; color: var(--ink); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; bottom: 22px; left: 50%; background: #1d1b17; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: min(640px, 90vw);
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out); }
.toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast button { background: none; border: 0; color: #f0c766; font-weight: 700; cursor: pointer; white-space: nowrap; }
#print-root { display: none; }
.olist-doc { font-family: Arial, sans-serif; color: #222; padding: 12mm; width: 210mm; }
.olist-doc table { width: 100%; border-collapse: collapse; margin-bottom: 6mm; }
.olist-doc th, .olist-doc td { border: 1px solid #ccc; padding: 1.5mm 2mm; font-size: 9pt; text-align: left; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .app, .modal, .toast { display: none !important; }
  #print-root { display: block; }
  #print-root .sheet, #print-root .kpage { box-shadow: none; margin: 0; }
  #print-root .kpage { break-after: page; }
}

/* ---------- motion ---------- */
.btn { transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.btn:active:not(:disabled) { transform: scale(0.97); }
nav button { transition: background-color 150ms ease, color 150ms ease; }
input, select, textarea { transition: border-color 150ms ease, background-color 150ms ease; }
.results > div { transition: background-color 120ms ease; }
.seg button { transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.view.active { animation: view-in 220ms var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.kpi { animation: rise 260ms var(--ease-out) both; }
.kpi:nth-child(2) { animation-delay: 35ms; } .kpi:nth-child(3) { animation-delay: 70ms; } .kpi:nth-child(4) { animation-delay: 105ms; } .kpi:nth-child(5) { animation-delay: 140ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.line.enter { animation: line-in 240ms var(--ease-out) both; }
.line.flash { animation: line-in 240ms var(--ease-out) both, flash 1100ms ease-out 120ms; }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes flash { from { background-color: #fbefcc; } to { background-color: transparent; } }
.spin { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: -2px; animation: spin 700ms linear infinite; }
.btn:not(.primary) .spin { border-color: rgba(0,0,0,.15); border-top-color: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

/* off-screen render targets */
.pdf-host { position: fixed; left: -10000px; top: 0; width: 210mm; background: #fff; }
.pdf-host .sheet, .pdf-host .kpage { box-shadow: none; margin: 0; }
.measure { position: fixed; left: -10000px; top: 0; visibility: hidden; }

@media (max-width: 1200px) { .builder { grid-template-columns: 1fr; } .preview { position: static; } .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .view.active, .kpi, .line.enter { animation-name: fade; }
  .line.flash { animation: fade 200ms ease both, flash 1100ms ease-out 120ms; }
  @keyframes fade { from { opacity: 0; } }
  .btn:active:not(:disabled) { transform: none; }
  .toast, .toast.show { transform: translate(-50%, 0); }
  .modal-box { transform: none; }
}

/* ---------- dosar client ---------- */
.link-back { all: unset; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; display: inline-block; }
.link-back:hover { color: var(--ink); }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ds-slot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: border-color 150ms, box-shadow 150ms; }
.ds-slot.over { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .18); }
.ds-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ds-head b { font-size: 14px; color: var(--ink); }
.ds-st { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ds-mini { all: unset; cursor: pointer; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 13px; }
.ds-mini:hover { background: #f1eee7; color: var(--ink); }
.ds-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.ds-files:empty { display: none; }
.ds-file { position: relative; cursor: pointer; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #faf8f4; }
.ds-file:hover { border-color: var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ds-file img, .ds-ext { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #efebe3; }
.ds-ext { display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.ds-fn { font-size: 10.5px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.ds-del { all: unset; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 99px; background: rgba(20,18,14,.6); color: #fff; display: grid; place-items: center; font-size: 13px; cursor: pointer; opacity: 0; transition: opacity 120ms; }
.ds-file:hover .ds-del, .ds-del:focus-visible { opacity: 1; }
.ds-drop { cursor: pointer; border: 1.5px dashed var(--line); border-radius: 8px; padding: 12px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; display: block; }
.ds-drop:hover { border-color: var(--gold); color: var(--ink); background: #fcfbf8; }
.ds-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ds-big { display: block; max-width: 100%; max-height: 70vh; margin: 12px auto 0; border-radius: 8px; }
.ds-chip { all: unset; cursor: pointer; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #f1eee7; color: var(--ink-2); white-space: nowrap; }
.ds-count { font-size: 11px; font-weight: 700; color: var(--muted); background: #f1eee7; border-radius: 99px; padding: 2px 8px; }
.ds-chip:hover { filter: brightness(.96); }
/* quick client (typed directly in the offer) */
.cc.qc { gap: 10px; background: #fff; }
.cc.qc .cc-top { justify-content: space-between; }
.link-btn { all: unset; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--gold-d); }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--gold); border-radius: 4px; }

/* ---------- login (online version) ---------- */
body.locked .app { display: none; }
.login { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; padding: 20px; z-index: 100; }
.login[hidden] { display: none; }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(28, 37, 65, .08); }
.login-logo { width: 190px; justify-self: center; }
.login-card h1 { margin: 0; font-size: 18px; text-align: center; color: var(--ink); }
#lg-form { display: grid; gap: 12px; }
#lg-form[hidden] { display: none; }
.lg-l { display: grid; gap: 4px; }
.big-btn { padding: 11px 14px; font-size: 14.5px; }
#lg-forgot { justify-self: center; }
.lg-msg { font-size: 13px; color: var(--ink-2); text-align: center; min-height: 0; }
.lg-msg.on { padding: 8px 10px; background: var(--gold-l); border-radius: 8px; }
.lg-extra { display: grid; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.lg-extra:empty { display: none; }
.lg-extra p { margin: 0; }
.who { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #cfc8b8; }
.who[hidden] { display: none; }
.who .link-btn { color: var(--gold); }
.team-go { display: flex; align-items: flex-end; }

/* destructive actions */
.btn.danger{background:#b42318;border-color:#b42318;color:#fff}
.btn.danger:hover{background:#912018}
.btn.ghost.danger{background:transparent;color:#b42318;border-color:transparent}
.btn.ghost.danger:hover{background:#fef3f2}
.sp-rule{width:100%;font-family:ui-monospace,monospace}
.modal ul{margin:6px 0 8px 18px}

/* standard system editor */
.pe-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:14px;align-items:start}
.pe-grid h3{margin:0 0 8px;font-size:14px}
.pe-filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:8px}
.pe-filters #pe-q{flex:1 1 220px}
.pe-res{max-height:62vh;overflow:auto;border-top:1px solid var(--line,#e5e2dc)}
.pe-r{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 4px;border-bottom:1px solid var(--line,#e5e2dc)}
.pe-r.in{opacity:.55}
.pe-r .rn{min-width:0}
.pe-more{padding:10px 4px}
.pe-sum{margin-top:10px;font-size:13px}
.pe-foot{display:flex;justify-content:flex-end;gap:8px;margin:14px 0 30px}
.pe-head{margin:0}
@media (max-width:1000px){.pe-grid{grid-template-columns:1fr}}
