:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --border: #e3e7ee;
  --text: #1c2430;
  --muted: #6b7686;
  --primary: #0f6fd6;
  --primary-soft: #e6f0fc;
  --danger: #d0453b;
  --success: #1d9a5b;
  --warning: #d98a0b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar: 224px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

/* layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: #10203a; color: #d5dce8; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { font-weight: 700; font-size: 18px; color: #fff; padding: 6px 10px 18px; letter-spacing: .3px; }
.brand span { color: #6fb1ff; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #c6cfdd; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }
.nav .ico { width: 18px; text-align: center; opacity: .9; }
.sidebar .foot { margin-top: auto; font-size: 12px; color: #8391a7; padding: 10px 12px; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.topbar .search .ico { position: absolute; left: 11px; top: 9px; color: var(--muted); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); max-height: 70vh; overflow: auto; z-index: 50; }
.search-results h5 { margin: 0; padding: 8px 12px 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.search-results a { display: block; padding: 7px 12px; color: var(--text); }
.search-results a:hover { background: var(--primary-soft); text-decoration: none; }
.search-results .sub { color: var(--muted); font-size: 12px; }
.content { padding: 22px 24px 60px; }
.userpick { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.userpick select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }

/* headings & toolbar */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 650; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search], .toolbar input[type=text] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; min-width: 240px; background: var(--panel); }
.toolbar select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.spacer { flex: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f0f3f7; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #0c5db4; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fdecea; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #eef1f5; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { padding: 7px 12px; border: 0; background: transparent; cursor: pointer; }
.seg button.active { background: var(--primary); color: #fff; }

/* cards & grid */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card .card-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card .card-body { padding: 14px 16px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.detail-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .detail-layout { grid-template-columns: 1fr; } .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid.cols-2 { grid-template-columns: 1fr; } .grid.cols-2 > .card[style*="grid-column"] { grid-column: auto !important; } }

.kpi { padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 12.5px; }
.kpi .value { font-size: 24px; font-weight: 650; margin-top: 4px; }
.kpi .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi.warn .value { color: var(--warning); }
.kpi.bad .value { color: var(--danger); }

/* tables */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 600; background: #fafbfd; user-select: none; white-space: nowrap; }
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--text); }
.tbl tr:hover td { background: #fafcff; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .muted { color: var(--muted); }
.tbl tr.clickable { cursor: pointer; }
.tbl td .sub { color: var(--muted); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; color: var(--muted); font-size: 13px; }
.pager .btns { display: flex; gap: 6px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #eef1f5; color: #3a4556; white-space: nowrap; }
.badge.lead { background: #e6f0fc; color: #0f5bb3; }
.badge.opportunity { background: #fff3e0; color: #a55f00; }
.badge.customer { background: #e3f5ea; color: #157a45; }
.badge.won { background: #e3f5ea; color: #157a45; }
.badge.lost { background: #fdecea; color: #b03a31; }
.badge.high { background: #fdecea; color: #b03a31; }
.badge.medium { background: #fff3e0; color: #a55f00; }
.badge.low { background: #eef1f5; }
.badge.type-call { background: #e6f0fc; color: #0f5bb3; }
.badge.type-task { background: #f1e9fd; color: #6a3fb8; }
.badge.type-note { background: #fff8dc; color: #8a6d00; }
.badge.type-email { background: #e3f5ea; color: #157a45; }
.badge.type-meeting { background: #fde8f3; color: #a5216d; }
.avatar { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #dfe6f1; color: #2c3a52; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }

/* definition list */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
.entity-title { display: flex; align-items: center; gap: 14px; }
.entity-title h1 { margin: 0; }
.entity-title .sub { color: var(--muted); }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.tl-item .tl-ico { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: #eef1f5; }
.tl-item .tl-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tl-item .tl-meta { color: var(--muted); font-size: 12px; }
.tl-item .tl-body { white-space: pre-wrap; margin-top: 4px; font-size: 13.5px; color: #2b3442; }
.tl-item.done .tl-title { text-decoration: line-through; color: var(--muted); }
.tl-item.overdue { border-color: #f3c6c2; background: #fff8f7; }
.tl-item .tl-links { font-size: 12px; margin-top: 3px; }
.tl-item .tl-links a { margin-right: 10px; }
.tl-actions { display: flex; gap: 4px; }

/* quick log */
.quicklog { padding: 12px 14px; }
.quicklog textarea { width: 100%; min-height: 64px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.quicklog .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.quicklog select, .quicklog input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }

/* kanban */
/* The board scrolls inside its own box, so the stage headers can stick to the top: a deal can always be dropped on a stage, no matter how far down you are. */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow: auto; max-height: calc(100vh - 215px); padding-bottom: 12px; align-items: stretch; }   /* stretch: every column spans the whole board, so its header stays visible and empty stages stay droppable */
.kcol { background: #eceff4; border-radius: 10px; padding: 0 8px 8px; min-height: 200px; }
.kcol h4 { position: sticky; top: 0; z-index: 2; background: #eceff4; padding: 10px 6px 8px; margin: 0 -8px 8px; border-radius: 10px 10px 0 0; box-shadow: 0 6px 6px -6px rgba(0,0,0,.18); }
.kcol.drag-over h4 { background: var(--primary-soft); }
.kcol.drag-over { outline: 2px dashed var(--primary); }
.kcol h4 { font-size: 13px; display: flex; justify-content: space-between; color: #3a4556; }
.kcol h4 .sum { color: var(--muted); font-weight: 500; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.kcard:active { cursor: grabbing; }
.kcard .t { font-weight: 600; margin-bottom: 3px; }
.kcard .m { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 6px; }
.kcard .amt { font-weight: 600; color: var(--text); }
.kcard.stale { border-left: 3px solid var(--warning); }

/* pipeline bars */
.stagebar { display: flex; flex-direction: column; gap: 6px; }
.stagebar .row { display: grid; grid-template-columns: 200px 1fr 130px; gap: 10px; align-items: center; font-size: 13px; }
.stagebar .bar { height: 10px; background: #eef1f5; border-radius: 5px; overflow: hidden; }
.stagebar .bar i { display: block; height: 100%; background: var(--primary); }
.stagebar .num { text-align: right; color: var(--muted); }

/* forms & modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 25, 45, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow: auto; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 720px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 900px; }
.modal .m-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal .m-head h3 { margin: 0; font-size: 16px; }
.modal .m-body { padding: 16px 18px; }
.modal .m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #bcd6f7; border-color: var(--primary); }
.field.check { display: flex; align-items: center; gap: 8px; padding-top: 20px; }
.field.check input { width: auto; }
.lookup { position: relative; }
.lookup .lk-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 30; max-height: 240px; overflow: auto; }
.lookup .lk-results div { padding: 7px 10px; cursor: pointer; }
.lookup .lk-results div:hover { background: var(--primary-soft); }
.lookup .lk-results .sub { color: var(--muted); font-size: 12px; }
.lookup .clear { position: absolute; right: 6px; top: 26px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.err { color: var(--danger); font-size: 13px; }

/* toast */
.toast { position: fixed; bottom: 20px; right: 20px; background: #1c2430; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 200; opacity: 0; transform: translateY(8px); transition: all .2s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 12.5px; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.checkbox { width: 16px; height: 16px; cursor: pointer; }
.loading { padding: 30px; text-align: center; color: var(--muted); }
.notice { background: #fff8e1; border: 1px solid #f3dd9a; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.notice.error { background: #fdecea; border-color: #f3c6c2; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.badge.recurring { background: #e3f0ff; color: #1b4f9c; border: 1px solid #c5dcf7; }
.badge.partner { background: #fff1e0; color: #8a4b00; border: 1px solid #f5d7ad; }
.badge.agent { background: #eef7e8; color: #2f6b1a; border: 1px solid #cfe6c3; }
.badge.direct { background: #eef1f5; }
.portal-tag { font-size: 11px; font-weight: 600; color: #ffd27a; letter-spacing: .5px; text-transform: uppercase; margin-top: 2px; }
.userpick .who { display: flex; flex-direction: column; line-height: 1.15; }
.userpick .who small { color: var(--muted); font-size: 11.5px; }
.eq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.eq .n { font-size: 20px; font-weight: 700; }
.eq .l { color: var(--muted); font-size: 12px; }
/* booking grid */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bk-day { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.bk-day h4 { margin: 0 0 8px; font-size: 13px; }
.bk-day h4 small { color: var(--muted); font-weight: 500; display: block; }
.bk-slot { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--border); margin-bottom: 5px; font-size: 13px; cursor: pointer; background: #f7fbf8; }
.bk-slot:hover { background: #e3f5ea; border-color: #9fd6b6; }
.bk-slot.busy { background: #f3f4f6; color: var(--muted); cursor: default; text-decoration: line-through; }
.bk-slot.busy:hover { background: #f3f4f6; border-color: var(--border); }
.bk-slot .cnt { font-size: 11px; color: var(--success); }
.log-item { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.log-item .meta { color: var(--muted); font-size: 12px; }
.log-item ul { margin: 4px 0 0; padding-left: 18px; }
.log-item li { margin: 1px 0; }
.log-item .old { color: var(--muted); text-decoration: line-through; margin-right: 6px; }
.readonly-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid.cols-5 { grid-template-columns: repeat(2, 1fr); } }
.lang-sel { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); font-size: 12.5px; }
.login .lang-sel { padding: 2px 6px; font-size: 12px; }

/* ---- knowledge base (Vidensbase) ---- */
.kb { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.kb-tree { position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow: auto; padding: 8px 0; }
.kb-tree .shelf { padding: 10px 14px 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
.kb-tree .book { padding: 6px 14px; font-weight: 650; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.kb-tree .book:hover { background: var(--primary-soft); }
.kb-tree .book .n { flex: 1; }
.kb-tree .chapter { padding: 5px 14px 5px 26px; font-size: 13px; color: var(--muted); font-weight: 600; }
.kb-tree a.page { display: block; padding: 4px 14px 4px 40px; font-size: 13.5px; color: var(--text); border-left: 3px solid transparent; }
.kb-tree a.page.root { padding-left: 26px; }
.kb-tree a.page:hover { background: var(--primary-soft); text-decoration: none; }
.kb-tree a.page.active { background: var(--primary-soft); border-left-color: var(--primary); font-weight: 600; }
.kb-tree .draft { font-size: 11px; color: var(--muted); margin-left: 4px; }
.kb-tree .collapsed .chapter, .kb-tree .collapsed a.page { display: none; }
.kb-page { padding: 18px 26px 30px; }
.kb-page .crumbs { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.kb-page h1 { margin: 0 0 4px; font-size: 24px; }
.kb-page .meta { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }
.kb-content { line-height: 1.6; font-size: 15px; max-width: 920px; }
.kb-content img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); }
.kb-content h1, .kb-content h2, .kb-content h3 { margin: 1.2em 0 .4em; }
.kb-content table { border-collapse: collapse; margin: 10px 0; }
.kb-content td, .kb-content th { border: 1px solid var(--border); padding: 6px 10px; }
.kb-content pre, .kb-content code { background: #f3f5f8; border-radius: 4px; padding: 2px 5px; }
.kb-content blockquote { border-left: 3px solid var(--border); margin: 10px 0; padding: 4px 12px; color: var(--muted); }
.kb-content .callout { padding: 10px 14px; border-radius: 8px; background: var(--primary-soft); margin: 10px 0; }
.kb-editor { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.kb-editor .bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.kb-editor .bar button { border: 1px solid transparent; background: transparent; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.kb-editor .bar button:hover { background: var(--primary-soft); border-color: var(--border); }
.kb-editor [contenteditable] { min-height: 360px; padding: 14px 18px; outline: none; }
.kb-editor textarea.html { width: 100%; min-height: 360px; border: 0; padding: 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.kb-search { margin-bottom: 12px; }
.kb-hit { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.kb-hit:hover { background: #fafcff; }
.kb-hit .snip { color: var(--muted); font-size: 13px; margin-top: 2px; }
@media (max-width: 900px) { .kb { grid-template-columns: 1fr; } .kb-tree { position: static; max-height: none; } }

/* ---- Maacks logo ---- */
.brand { display: flex; align-items: center; gap: 8px; }
.brand img.logo { height: 22px; width: auto; display: block; }
.brand .tag { color: #6fb1ff; font-weight: 700; font-size: 15px; letter-spacing: .4px; }
.brand .portal-tag { width: 100%; }
.login h1.logo-line { display: flex; align-items: center; gap: 10px; }
.login h1.logo-line img { height: 30px; width: auto; display: block; }

/* ---- map (Kort) */
.map { height: calc(100vh - 235px); min-height: 420px; border-radius: 12px; border: 1px solid var(--border); position: relative; z-index: 0; background: #e9eef3; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.map-legend label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 9px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); user-select: none; }
.map-legend label.off { opacity: .45; }
.map-legend input { display: none; }
.map-legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.map-pop { font-size: 13px; line-height: 1.45; min-width: 190px; }
.map-pop a { color: var(--primary); text-decoration: none; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content { margin: 12px 14px; }

/* ---- subscriptions overview (Abonnementer): one clickable chip per customer product line */
.cp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; margin: 2px 4px 2px 0; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); font: inherit; font-size: 13px; color: inherit; cursor: pointer; white-space: nowrap; }
.cp-chip:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(15,111,214,.12); }
.cp-chip.ended { opacity: .5; text-decoration: line-through; }
.cp-chip.add { border-style: dashed; color: var(--muted); background: transparent; }
.cp-chip.add:hover { color: var(--primary); }

/* ---- knowledge base: inline editing directly on the manual page (admin) */
.kb-inline-bar { position: sticky; top: 62px; z-index: 5; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 6px 8px; margin: 0 -8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfd; box-shadow: 0 2px 8px rgba(16,32,58,.08); }
.kb-inline-bar[hidden] { display: none; }
.kb-inline-bar > button:not(.btn) { border: 1px solid transparent; background: transparent; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.kb-inline-bar > button:not(.btn):hover { background: var(--primary-soft); border-color: var(--border); }
.kb-editing #kbBody, .kb-editing #kbName { outline: 2px dashed #9cc3ee; outline-offset: 6px; border-radius: 4px; }
.kb-editing #kbBody { min-height: 200px; }
.kb-editing #kbBody:focus, .kb-editing #kbName:focus { outline-color: var(--primary); }
.btn[hidden] { display: none; }
