/* harperscheidt – Verwaltung */
:root {
  --bg: #0d0f14; --bg2: #12151c; --panel: #161a22; --panel2: #1c212b; --line: #262c38; --line2: #323a48;
  --text: #e8ebf1; --muted: #8f98a8; --acc: #7c9cff; --acc2: #00e0a4; --danger: #ff5d6c; --warn: #f5a524; --ok: #2fbf71;
  --t1: #ff9f43; --t2: #00e0a4; --t3: #c6ff00;
  --r: 12px; --f: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--acc); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .8rem; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; } h3 { font-size: .98rem; }
code, .mono { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .center { text-align: center; } .r { text-align: right; } .nowrap { white-space: nowrap; }
.err-txt { color: var(--danger); } .ok-line { color: var(--ok); }
[hidden] { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 1.1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side-brand { display: flex; align-items: center; gap: .7rem; color: var(--text); font-weight: 800; font-size: 1.02rem; padding: .3rem .5rem 1.2rem; text-decoration: none !important; }
.side-brand small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.mark { display: inline-flex; gap: 3px; } .mark i { width: 7px; height: 22px; border-radius: 2px; background: var(--t1); } .mark i:nth-child(2) { background: var(--t2); height: 15px; align-self: end; } .mark i:nth-child(3) { background: var(--t3); }
.side nav { display: grid; gap: 2px; }
.side-group { margin: 1rem .6rem .35rem; font: 700 .68rem/1 var(--f); color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 9px; color: #c3c9d4; font-weight: 500; text-decoration: none; }
.side nav a:hover { background: var(--panel2); color: var(--text); }
.side nav a.on { background: linear-gradient(90deg, rgba(124,156,255,.18), rgba(124,156,255,.04)); color: #fff; box-shadow: inset 2px 0 0 var(--acc); }
.side svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: .9; }
.side-foot { margin-top: auto; padding: 1rem .6rem 0; font-size: .85rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.6rem; border-bottom: 1px solid var(--line); background: rgba(13,15,20,.85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 1.2rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-user { display: flex; align-items: center; gap: .7rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--t1), var(--t2) 50%, var(--t3)); color: #0d0f14; font-weight: 800; text-decoration: none !important; }
.who { display: grid; line-height: 1.2; font-weight: 600; } .who small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; }
.content { padding: 1.6rem; display: grid; gap: 1.2rem; align-content: start; max-width: 1500px; width: 100%; }

/* components */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; min-width: 0; }
.panel.p0 { padding: 0; overflow: hidden; } .pad { padding: 1rem 1.2rem 0; } .panel .pad + .pad { padding-top: .2rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; } .panel-head h2 { margin: 0; }
.panel-highlight { border-color: var(--acc2); box-shadow: 0 0 0 3px rgba(0,224,164,.08); }
details.panel > summary { cursor: pointer; list-style: none; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
details.panel[open] > summary { margin-bottom: 1rem; } details.panel[open] > summary::after { transform: rotate(180deg); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.grid-side { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.grid-side.wide-left { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.grid-side > aside { display: grid; gap: 1.2rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1.05rem; border-radius: 9px; border: 1px solid transparent; background: var(--acc); color: #0b0f1a; font: 700 .88rem/1 var(--f); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.1); } .btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line2); } .btn-ghost:hover { background: var(--panel2); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255,93,108,.4); } .btn-danger:hover { background: rgba(255,93,108,.12); }
.btn-sm { padding: .45rem .75rem; font-size: .8rem; } .btn-xs { padding: .3rem .55rem; font-size: .74rem; border-radius: 7px; }
.btn-block { width: 100%; } .btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.flash { padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); }
.flash-ok { border-color: rgba(47,191,113,.5); background: rgba(47,191,113,.08); } .flash-err { border-color: rgba(255,93,108,.5); background: rgba(255,93,108,.08); } .flash-warn { border-color: rgba(245,165,36,.5); background: rgba(245,165,36,.08); }

/* forms */
label { display: grid; gap: .35rem; font-weight: 600; font-size: .85rem; color: #cfd5df; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); border-radius: 9px; padding: .6rem .75rem; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, [contenteditable]:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(124,156,255,.2); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--acc); }
input[type=range] { padding: 0; accent-color: var(--acc); }
input[type=file] { padding: .5rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500; } .check input { margin-top: .25em; }
.stack { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.1rem; margin-bottom: 1rem; }
.span2 { grid-column: 1 / -1; } .form-actions { grid-column: 1 / -1; display: flex; gap: .6rem; padding-top: .5rem; }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .inline-form input { flex: 1; min-width: 160px; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; } .filters input, .filters select { width: auto; min-width: 140px; padding: .45rem .65rem; }
.otp { font: 700 1.5rem/1 var(--mono); letter-spacing: .35em; text-align: center; }
.switch-list { display: grid; gap: .3rem; margin-bottom: 1rem; }
.switch { padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); align-items: center; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 22px; background: var(--line2); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .2s; border: 0; padding: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked { background: var(--acc2); } .switch input:checked::after { transform: translateX(18px); }
.pw-meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; } .pw-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.pay-box { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0; display: grid; gap: .8rem; }
.pay-box legend { padding: 0 .5rem; font-weight: 900; font-size: 1.1rem; font-style: italic; }
.pp { color: #2a6fdb; } .pp2 { color: #29a3e0; } .wero { background: #1c1c1c; color: #fff200; padding: .1em .45em; border-radius: 5px; font-style: normal; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 700 .7rem/1 var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--bg2); }
.tbl td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover { background: rgba(255,255,255,.015); }
.tbl-compact td { padding: .45rem .8rem; font-size: .84rem; }
.tbl .actions { text-align: right; white-space: nowrap; } .tbl .actions form, .tbl .actions details { display: inline-block; }
.tbl .thumb img { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; }
.tbl .fav { width: 36px; } .tbl .fav img { border-radius: 5px; background: #fff; padding: 2px; }
.noico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: var(--line2); color: var(--muted); font-weight: 700; }
.dim { opacity: .5; } .scroll-x { overflow-x: auto; }
.st { display: inline-block; padding: .22em .6em; border-radius: 999px; font: 700 .7rem/1.3 var(--f); background: var(--line2); color: var(--text); text-transform: lowercase; }
.st-published, .st-paid, .st-done, .st-shipped { background: rgba(47,191,113,.16); color: #5be19a; }
.st-draft, .st-queued, .st-cancelled { background: rgba(143,152,168,.16); color: #b4bccb; }
.st-pending, .st-running, .st-review { background: rgba(245,165,36,.16); color: #ffc25c; }
.st-failed, .st-refunded { background: rgba(255,93,108,.16); color: #ff8a95; }
.tag { padding: .2em .55em; border-radius: 6px; font-size: .78rem; font-weight: 600; background: var(--line2); }
.tag-travel { background: rgba(255,159,67,.16); color: var(--t1); } .tag-security { background: rgba(0,224,164,.14); color: var(--t2); } .tag-bike { background: rgba(198,255,0,.12); color: var(--t3); }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: .6rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a.on { color: var(--text); border-color: var(--acc); }
.tabs-inline { display: flex; gap: .4rem; margin-bottom: 1rem; } .tabs-inline a { flex: 1; text-align: center; padding: .55rem; border: 1px solid var(--line2); border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .85rem; }
.tabs-inline a.on { border-color: var(--acc); color: var(--text); background: rgba(124,156,255,.1); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0 0 1rem; } .dl dt { color: var(--muted); } .dl dd { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
pre.code { background: #0a0c11; border: 1px solid var(--line); border-radius: 9px; padding: .9rem 1rem; overflow-x: auto; font: 12.5px/1.55 var(--mono); color: #c7d2e2; white-space: pre-wrap; word-break: break-word; margin: .5rem 0; }
.secret { font: 600 .95rem/1.5 var(--mono); background: var(--bg2); border: 1px dashed var(--line2); border-radius: 8px; padding: .5rem .7rem; display: inline-block; word-break: break-all; letter-spacing: .04em; }
.secret.block { display: block; cursor: copy; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; }
.inline-details summary { list-style: none; } .inline-details[open] pre { position: absolute; right: 2rem; z-index: 5; max-width: 600px; text-align: left; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; display: grid; gap: .15rem; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--t1), var(--t2), var(--t3)); opacity: .7; }
.kpi span { color: var(--muted); font-size: .78rem; font-weight: 600; } .kpi b { font-size: 1.7rem; letter-spacing: -.02em; } .kpi small { color: var(--muted); }
.kpi-alert { border-color: rgba(255,93,108,.5); } .kpi-alert b { color: var(--danger); }
.chart { width: 100%; height: 220px; display: block; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; } .chart .b1 { fill: rgba(124,156,255,.55); } .chart .b1:hover { fill: var(--acc); } .chart .b2 { fill: var(--acc2); pointer-events: none; } .chart .lbl { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.legend { color: var(--muted); font-size: .8rem; display: flex; gap: .5rem; align-items: center; margin: .5rem 0 0; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .legend .l1 { background: rgba(124,156,255,.55); } .legend .l2 { background: var(--acc2); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.bars li { position: relative; display: flex; justify-content: space-between; gap: .8rem; padding: .38rem .6rem; border-radius: 7px; font-size: .84rem; overflow: hidden; z-index: 0; }
.bars li i { position: absolute; inset: 0 auto 0 0; background: rgba(124,156,255,.12); z-index: -1; border-radius: 7px; width: 0; transition: width .8s cubic-bezier(.2,.7,.1,1); }
.bars .bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bars .bv { font-weight: 700; font-variant-numeric: tabular-nums; }

/* editor */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.editor-main { display: grid; gap: .8rem; min-width: 0; }
.editor-side { display: grid; gap: 1rem; position: sticky; top: 80px; } .editor-side .panel { display: grid; gap: .8rem; padding: 1.1rem; } .editor-side h3 { margin: 0; }
.title-input { font-size: 1.7rem; font-weight: 800; padding: .7rem .9rem; letter-spacing: -.02em; }
.slug-line { display: flex; align-items: center; gap: .2rem; color: var(--muted); font: .85rem var(--mono); } .slug-line input { padding: .3rem .5rem; font: inherit; background: transparent; border-color: transparent; }
.slug-line input:hover, .slug-line input:focus { border-color: var(--line2); }
.block { display: grid; }
.wys { border: 1px solid var(--line2); border-radius: 12px; background: var(--bg2); overflow: hidden; }
.wys.full { position: fixed; inset: 1rem; z-index: 100; display: flex; flex-direction: column; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
.wys-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: .4rem; border-bottom: 1px solid var(--line); background: var(--panel2); position: sticky; top: 0; z-index: 2; }
.wys-bar button, .wys-bar select { background: transparent; border: 1px solid transparent; color: #cfd5df; height: 32px; min-width: 32px; padding: 0 .45rem; border-radius: 7px; cursor: pointer; font: 600 .85rem/1 var(--f); width: auto; }
.wys-bar select { padding: 0 .3rem; border-color: var(--line2); }
.wys-bar button:hover { background: var(--line); color: #fff; } .wys-bar button.on { background: rgba(124,156,255,.2); color: #fff; border-color: rgba(124,156,255,.4); }
.wys-bar .sep { width: 1px; background: var(--line2); margin: 4px 3px; }
.wys-area { min-height: 420px; max-height: 75vh; overflow-y: auto; padding: 1.4rem 1.6rem; font-size: 1.02rem; line-height: 1.7; color: #e9edf3; }
.wys.full .wys-area { max-height: none; flex: 1; }
.wys-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.wys-area h1, .wys-area h2, .wys-area h3, .wys-area h4 { margin: 1.2em 0 .5em; } .wys-area p { margin: 0 0 1em; }
.wys-area img { max-width: 100%; height: auto; border-radius: 8px; } .wys-area img.sel { outline: 3px solid var(--acc); }
.wys-area blockquote { border-left: 4px solid var(--acc); margin: 1em 0; padding: .2em 0 .2em 1em; color: #c3c9d4; font-style: italic; }
.wys-area pre { background: #07090d; padding: 1rem; border-radius: 8px; font: 13px/1.5 var(--mono); white-space: pre-wrap; }
.wys-area table { border-collapse: collapse; width: 100%; } .wys-area td, .wys-area th { border: 1px solid var(--line2); padding: .4rem .6rem; min-width: 60px; }
.wys-area a { color: var(--acc); text-decoration: underline; }
.wys-area .callout { border: 1px solid var(--line2); border-left: 4px solid var(--acc2); padding: .7rem 1rem; border-radius: 8px; background: rgba(0,224,164,.05); }
.wys-area .callout-warn { border-left-color: var(--warn); } .wys-area .lead { font-size: 1.2em; color: #fff; }
.wys-area .align-center { text-align: center; } .wys-area .align-right { text-align: right; } .wys-area .align-justify { text-align: justify; }
.wys-area .img-left { float: left; clear: both; max-width: 45%; margin: 0 1rem .5rem 0; } .wys-area .img-right { float: right; clear: both; max-width: 45%; margin: 0 0 .5rem 1rem; }
.wys-area figure { margin: 1rem 0; } .wys-area figure img { display: block; width: 100%; height: auto; } .wys-area figcaption { font-size: .82rem; font-style: italic; opacity: .75; margin-top: .3rem; }
.wys-area figure.img-left, .wys-area figure.img-right { width: 45%; }
.wys-area .img-xs { width: 26%; max-width: 26%; } .wys-area .img-s { width: 34%; max-width: 34%; } .wys-area .img-m { width: 46%; max-width: 46%; }
.wys-area h2, .wys-area h3, .wys-area h4, .wys-area table, .wys-area blockquote { clear: both; }
.wys-src { width: 100%; min-height: 420px; border: 0; border-radius: 0; font: 13px/1.6 var(--mono); background: #07090d; padding: 1rem; }
.wys-foot { display: flex; justify-content: space-between; padding: .35rem .8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.wys.drag .wys-area { box-shadow: inset 0 0 0 3px var(--acc2); }

/* media */
.dropzone { position: relative; border: 2px dashed var(--line2); border-radius: 14px; padding: 2rem; text-align: center; background: var(--bg2); transition: border-color .2s, background .2s; }
.dropzone.small { padding: 1.1rem; margin-bottom: 1rem; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone.static input[type=file] { position: static; opacity: 1; margin-bottom: .5rem; }
.dropzone.static label { display: block; }
.dropzone.over { border-color: var(--acc2); background: rgba(0,224,164,.06); }
.dropzone label { display: block; color: var(--muted); font-weight: 400; } .dropzone progress { width: 100%; margin-top: 1rem; accent-color: var(--acc2); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.media-grid.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.media-item { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.media-item > a { display: block; aspect-ratio: 4/3; background: var(--bg2); } .media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item figcaption { padding: .6rem; display: grid; gap: .4rem; } .media-item input { padding: .35rem .5rem; font-size: .8rem; }
.file-ico { display: grid; place-items: center; height: 100%; font: 800 1.4rem var(--mono); color: var(--muted); }
.media-field { display: grid; gap: .5rem; } .media-field .lbl { font-weight: 600; font-size: .85rem; color: #cfd5df; }
.media-preview img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.media-preview:empty { display: none; }
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 1.5rem; backdrop-filter: blur(4px); }
.modal-box { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; width: min(1000px, 100%); max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; gap: .6rem; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); } .modal-head strong { flex: 1; }
.modal .media-grid { padding: 1.2rem; overflow-y: auto; }
.modal .media-grid button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--bg2); cursor: pointer; aspect-ratio: 1; }
.modal .media-grid button img { width: 100%; height: 100%; object-fit: cover; } .modal .media-grid button:hover, .modal .media-grid button.on { border-color: var(--acc2); }
.modal-foot { padding: .8rem 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .6rem; }
.gal-items { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.gal-items li { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: .5rem; display: grid; gap: .4rem; cursor: grab; }
.gal-items li.dragging { opacity: .4; } .gal-items li.over { border-color: var(--acc2); }
.gal-items img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; pointer-events: none; } .gal-items input:not([type=checkbox]) { padding: .35rem .5rem; font-size: .8rem; }

/* topics, roles */
.topic-list { display: grid; gap: .8rem; }
.swatch { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.sw-mix { background: conic-gradient(var(--t1) 0 33%, var(--t2) 0 66%, var(--t3) 0); } .sw-travel { background: linear-gradient(135deg, #ffb46b, #d45d40); }
.sw-security { background: linear-gradient(135deg, #0a1a2b, #00ffaa); } .sw-bike { background: repeating-linear-gradient(-45deg, #c6ff00 0 6px, #ff5c00 6px 12px); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.perm-grid .check { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg2); }

/* automation pipeline */
.pipeline { display: grid; gap: .8rem; margin-bottom: 1rem; counter-reset: step; }
.step { border: 1px solid var(--line2); border-radius: 12px; background: var(--bg2); overflow: hidden; position: relative; }
.step + .step::before { content: "↓"; position: absolute; top: -1.15rem; left: 1.4rem; color: var(--muted); }
.step-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; background: var(--panel2); border-bottom: 1px solid var(--line); }
.step-head strong { flex: 1; } .step-head strong::before { counter-increment: step; content: counter(step) ". "; color: var(--acc2); }
.step-body { padding: .9rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.step-body .full { grid-column: 1 / -1; }
.step-body textarea { font: 12.5px/1.5 var(--mono); }

/* profile */
.qr-wrap { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin: .8rem 0 1rem; }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: 220px; height: 220px; } .qr svg { width: 100%; height: 100%; display: block; }
.codes { columns: 2; font: 700 1rem var(--mono); padding-left: 1.4rem; } .codes li { margin: .2rem 0; }
.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem; font-size: .85rem; } .checklist .ok { color: var(--ok); } .checklist .bad { color: var(--danger); }

/* auth screens */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.auth-bg i { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; filter: blur(90px); opacity: .22; animation: float 18s ease-in-out infinite alternate; }
.auth-bg i:nth-child(1) { background: var(--t1); top: -20vmax; left: -10vmax; } .auth-bg i:nth-child(2) { background: var(--t2); bottom: -25vmax; right: -10vmax; animation-delay: -6s; } .auth-bg i:nth-child(3) { background: var(--t3); top: 30%; left: 40%; width: 30vmax; height: 30vmax; opacity: .12; animation-delay: -12s; }
@keyframes float { to { transform: translate(6vmax, 4vmax) scale(1.1); } }
.auth-card { width: min(420px, 100%); background: rgba(22,26,34,.88); border: 1px solid var(--line2); border-radius: 20px; padding: 2rem; display: grid; gap: 1rem; backdrop-filter: blur(16px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.auth-card.wide { width: min(640px, 100%); } .auth-card h1 { font-size: 1.5rem; margin: 0; } .auth-card .side-brand { padding: 0 0 .5rem; }

@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr 1fr; } .editor-layout, .grid-side, .grid-side.wide-left { grid-template-columns: 1fr; } .editor-side { position: static; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .3s; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .side.open { transform: none; } .burger { display: block; } .who { display: none; }
  .grid2, .grid3, .form-grid, .step-body { grid-template-columns: 1fr; } .content { padding: 1rem; }
}
@media print { .side, .top, .btn, form { display: none !important; } body { background: #fff; color: #000; } .panel { border: 0; } }
/* Linkliste: Vorschaubilder */
.tbl .fav:has(.shot-thumb) { width: 92px; }
.tbl td.fav img.shot-thumb { width: 80px; height: 50px; padding: 0; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--border, #ddd); display: block; }

/* ---------- Download-Bereich ---------- */
.dl-panel { margin-top: 1.2rem; }
.crumbs { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: var(--muted); margin: 0 0 1rem; font-size: .9rem; }
.dl-hash { display: inline-block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; cursor: copy; }
.dl-danger summary { cursor: pointer; color: var(--danger); }
.dl-delete { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; } .dl-delete p { flex-basis: 100%; margin: 0; } .dl-delete input { max-width: 260px; }
.dl-scroll { overflow-x: auto; }
.dl-ftbl input[type=text], .dl-ftbl input:not([type]) { width: 100%; min-width: 9rem; }
.dl-ftbl .dl-hash { max-width: 22ch; }

/* Untermenü der Linkliste (nach Topics) + Kategorien */
.side-sub { display: grid; gap: 1px; margin: 2px 0 6px 1.9rem; padding-left: .6rem; border-left: 1px solid var(--line); }
.side nav .side-sub a { padding: .32rem .6rem; font-size: .86rem; font-weight: 400; color: #9aa3b2; border-radius: 7px; }
.side nav .side-sub a.on { color: #fff; background: rgba(124,156,255,.12); box-shadow: none; }
.input-short { max-width: 8rem; }
.cat-current { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.cat-current img, .tbl td.fav img { object-fit: contain; }
.cat-emoji { font-size: 1.4rem; }
.tabs small { margin-left: .25rem; }
.tabs + .grid-side { margin-top: 1rem; }

/* Kategorien (Beiträge) */
.cat-topic .panel-head h2 { display: flex; align-items: center; gap: .55rem; }
.cat-topic .swatch { width: 20px; height: 20px; border-radius: 6px; }
.cat-tree { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .35rem; }
.cat-tree > li { border: 1px solid var(--line2); border-radius: 10px; padding: .5rem .7rem; }
.cat-sub { margin: .45rem 0 .2rem 1.1rem; }
.cat-depth { font: 600 .65rem/1 ui-monospace, monospace; padding: .2em .45em; opacity: .7; vertical-align: middle; }
.cat-sub > li { border-style: dashed; }
.cat-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.cat-row .cat-name { flex: 1; min-width: 180px; }
.cat-row .actions { display: flex; gap: .3rem; align-items: center; }
.cat-row .actions form { display: inline; }
.cat-emoji { font-size: 1.05rem; }
.cat-edit > summary { cursor: pointer; font-size: .8rem; color: var(--muted, #8a93a6); margin-top: .25rem; width: max-content; }
.cat-edit[open] > summary { margin-bottom: .6rem; }
.cat-add > summary { font-size: .9rem; color: inherit; }
.cat-form { margin-bottom: .2rem; }
.cat-pick { display: grid; gap: .4rem; margin-bottom: .6rem; }
.cat-pick-off { opacity: .55; }
.cat-new > summary { cursor: pointer; width: max-content; }
.cat-new[open] { display: grid; gap: .4rem; padding: .5rem .6rem; border: 1px dashed var(--line2); border-radius: 8px; }
.cat-new[open] > summary { margin-bottom: .2rem; }

/* Download-Log & Bot-Erkennung */
.dl-dash { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .dl-dash { grid-template-columns: 1fr; } }
.tag-bot { background: rgba(245,165,36,.16); color: var(--warn); font-weight: 600; }
.bot-stats > summary { cursor: pointer; }
.bot-stats[open] > summary { margin-bottom: .8rem; }
.bot-stats h4 { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }
.bot-stats form { margin-top: .8rem; }
.cat-path { display: block; margin-top: -.2rem; line-height: 1.35; }
.cat-path:empty { display: none; }

/* ---------- Icon-Auswahl (Topics, Kategorien, Linkkategorien) ---------- */
.icon-pick { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; }
.icon-pick-btn { display: inline-flex; align-items: center; gap: .55rem; min-width: 12rem; max-width: 100%; padding: .42rem .7rem; border-radius: 9px;
  border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.icon-pick-btn:hover, .icon-pick-btn[aria-expanded="true"] { border-color: var(--acc); }
.icon-pick-btn:focus-visible, .icon-pick-clr:focus-visible, .ip-item:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.icon-pick-btn .ip-s { width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: 1.25rem; line-height: 1; flex: none; }
.icon-pick-btn .ip-s img { width: 22px; height: 22px; object-fit: contain; }
.icon-pick-btn .ip-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-pick-btn .ip-c { color: var(--muted); font-size: .8rem; }
.ip-nil { color: var(--muted); font-size: 1rem; }
.icon-pick-clr { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line2); background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; }
.icon-pick-clr:hover { color: var(--danger); border-color: var(--danger); }
label > .icon-pick { margin-top: .3rem; }
.icon-pop { position: fixed; z-index: 1000; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r);
  box-shadow: 0 18px 50px rgba(0,0,0,.55); overflow: hidden; }
.ip-head { display: flex; gap: .5rem; padding: .6rem; border-bottom: 1px solid var(--line); }
.ip-head .ip-q { flex: 1; min-width: 0; }
.ip-head .ip-grp { width: auto; max-width: 45%; }
.ip-list { overflow-y: auto; padding: .2rem .6rem .6rem; flex: 1; min-height: 120px; overscroll-behavior: contain; }
.ip-gh { margin: .7rem 0 .35rem; font: 700 .68rem/1 var(--f); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; position: sticky; top: 0; background: var(--panel); padding: .3rem 0; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .3rem; }
.ip-item { display: grid; justify-items: center; gap: .2rem; padding: .45rem .25rem; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; font: inherit; }
.ip-item:hover, .ip-item:focus-visible { background: var(--panel2); border-color: var(--line2); }
.ip-item.on { border-color: var(--acc); background: rgba(124,156,255,.12); }
.ip-item .ip-s { font-size: 1.55rem; line-height: 1.1; height: 1.8rem; display: grid; place-items: center; }
.ip-item .ip-s img { width: 26px; height: 26px; object-fit: contain; }
.ip-item .ip-n { font-size: .72rem; line-height: 1.2; color: #c3c9d4; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.ip-empty { color: var(--muted); padding: 1rem .2rem; margin: 0; }
.ip-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .6rem; border-top: 1px solid var(--line); background: var(--bg2); font-size: .85rem; }
.ip-own-l { display: inline-flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted); }
.ip-own-l .ip-own { width: 5.5rem; padding: .3rem .5rem; }
.ip-foot a { margin-left: auto; }

/* ---------- Einstellungen › Emojis & Icons ---------- */
.ilib .panel-head { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
.ilib .panel-head h2 { margin: 0; }
.ilib-search { max-width: 320px; }
.ilib-tabs { flex-wrap: wrap; }
.ilib-group h3 { margin: 1rem 0 .4rem; color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.ilib-grid { list-style: none; margin: 0; padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem; }
.ilib-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.ilib-item.on { border-color: var(--acc); }
.ilib-item.off { opacity: .5; }
.ilib-sym { width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.ilib-sym img { width: 28px; height: 28px; object-fit: contain; }
.ilib-emoji { font-size: 1.55rem; line-height: 1; }
.ilib-txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ilib-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ilib-act { display: flex; gap: .2rem; }
.ilib-act form { margin: 0; }
.ilib-emoji-input { font-size: 1.3rem; }
.cat-emoji img, .side-sub img, .tabs img, .topic-item summary img, .cat-name img { width: 1.2em; height: 1.2em; object-fit: contain; vertical-align: -.22em; }
.ilib-bulk { margin-top: .8rem; }
.ip-own::placeholder, .ilib-emoji-input::placeholder { opacity: .35; }

/* Kontakt-Nachrichten */
.contact-tbl tr.is-unread td:first-child { box-shadow: inset 3px 0 0 var(--acc); }
.contact-msg { min-width: 22rem; }
.contact-msg summary { cursor: pointer; list-style: none; }
.contact-msg summary::-webkit-details-marker { display: none; }
.contact-msg details[open] summary { margin-bottom: .6rem; }
.contact-body { white-space: normal; line-height: 1.55; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .5rem; max-width: 70ch; overflow-wrap: anywhere; }
.contact-msg .btn-row form { display: inline; }
.contact-purge { margin-top: 1rem; }

/* Download ↔ Artikel */
.dl-pages-list { display: grid; gap: .45rem; margin: .4rem 0 .8rem; }
.dl-page-item { display: grid; grid-template-columns: 1fr auto; gap: .4rem .6rem; align-items: center; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); }
.dl-page-item a { font-weight: 600; overflow-wrap: anywhere; }
.dl-page-item select { width: auto; padding: .3rem .5rem; font-size: .8rem; }
.dl-page-item .check { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }

/* Einstellungen › Kontaktformular */
.subtabs { margin: .2rem 0 1rem; }
.cf-list { display: grid; gap: .5rem; margin-bottom: .6rem; }
.cf-row { border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.cf-row > summary { cursor: pointer; padding: .65rem .9rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; list-style: none; }
.cf-row > summary::-webkit-details-marker { display: none; }
.cf-row[open] > summary { border-bottom: 1px solid var(--line); }
.cf-row .cf-grid { padding: .9rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cf-row .cf-grid .span2 { grid-column: span 2; }
.cf-pos { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--line); font-weight: 700; font-size: .8rem; }
.cf-new { border-style: dashed; } .cf-new .cf-pos { background: var(--acc); color: #111; }
.cf-off > summary strong { opacity: .55; text-decoration: line-through; }
.cf-checks { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.cf-del { color: var(--danger); }
.cf-ai { line-height: 1.5; }
.cf-levels td.on, .cf-levels th.on { background: rgba(255,255,255,.05); font-weight: 700; }
.cf-custom { margin: .8rem 0; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; }
.cf-custom > summary { cursor: pointer; }
@media (max-width: 900px) { .cf-row .cf-grid { grid-template-columns: 1fr 1fr; } }
.contact-fields { margin: 0 0 .6rem; font-size: .85rem; border-collapse: collapse; }
.contact-fields td { padding: .15rem .8rem .15rem 0; vertical-align: top; }
.contact-fields td:first-child { color: var(--muted); white-space: nowrap; }

/* ---- SEO je IT-Tool: aufklappbare Kästen mit Vorschau des Suchergebnisses ---- */
details.seo-tool { margin: 0 0 .8rem; }
details.seo-tool > summary { cursor: pointer; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
details.seo-tool[open] > summary { margin-bottom: 1rem; }
.seo-snippet { display: grid; gap: .15rem; max-width: 640px; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 10px; background: #fff; font-family: Arial, sans-serif; }
.seo-snippet-url { color: #202124; font-size: .78rem; }
.seo-snippet-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-snippet-desc { color: #4d5156; font-size: .85rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
