/* Würth Content — editor UI
   Quiet, workshop-plain editor; the live preview pane on the right is the
   one place with weight: it mirrors the eshop so editors see what they ship. */
:root {
  --red: #cc0000;
  --red-dark: #a30000;
  --red-tint: #fbeaea;
  --ink: #1e2124;
  --text: #33383d;
  --muted: #6a7178;
  --line: #d5d9dd;
  --line-soft: #e8ebee;
  --paper: #f6f7f8;
  --panel: #ffffff;
  --graphite: #2b2f33;
  --ok: #1e7a46;
  --ok-tint: #e5f3eb;
  --warn: #8f5000;
  --warn-tint: #fff3df;
  --focus: #0057b8;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--text); background: var(--paper); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 650; }
a { color: var(--red); }
button { font: inherit; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #aeb4ba; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-danger { color: var(--red); }
.icon-btn {
  width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; padding: 0;
}
.icon-btn:hover { color: var(--ink); border-color: #aeb4ba; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 18px;
  padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 15px; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; background: var(--red); border-radius: 3px; position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; left: 5px; right: 5px; top: 10px; height: 2px; background: #fff; }
.sites { display: flex; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; }
.sites button { white-space: nowrap; border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 4px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sites button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
/* ---------- find a page ---------- */
.search { position: relative; flex: 0 1 380px; min-width: 160px; }
.search input {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 64px 0 32px; font: inherit; color: var(--ink); background: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a7178' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center;
}
.search input:focus { outline: none; border-color: var(--focus); background-color: #fff; box-shadow: 0 0 0 3px rgba(0,87,184,.15); }
.search input::-webkit-search-cancel-button { display: none; }
.search-key {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; background: #fff;
}
.search input:focus + .search-key, .search input:not(:placeholder-shown) + .search-key { display: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: 40px; z-index: 30; list-style: none; margin: 0; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(20,25,30,.16); max-height: min(70vh, 520px); overflow-y: auto; min-width: 360px;
}
.search-results li[role=option] {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 4px; cursor: pointer;
}
.search-results li[role=option][aria-selected="true"], .search-results li[role=option]:hover { background: var(--red-tint); }
.search-results .thumb { width: 36px; height: 26px; border-radius: 3px; background: var(--line-soft) center/cover no-repeat; flex: 0 0 auto; }
.search-results .txt { flex: 1 1 auto; min-width: 0; }
.search-results .txt b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .txt small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .kind { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.search-results .head { padding: 8px 9px 4px; font-size: 12px; font-weight: 650; color: var(--muted); }
.search-results .none { padding: 12px 10px; color: var(--muted); }
mark { background: #ffe59a; color: inherit; border-radius: 2px; padding: 0 1px; }
@media (max-width: 1100px) { .search-key { display: none; } }

.status { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-weight: 600; margin-right: 8px; font-size: 12px; }
.pill-draft { background: var(--warn-tint); color: var(--warn); }
.pill-live { background: var(--ok-tint); color: var(--ok); }
.pill-saving { background: var(--line-soft); color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: 40px; min-width: 240px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20,25,30,.12); padding: 6px; display: flex; flex-direction: column;
}
.menu-pop button, .menu-pop a {
  text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 4px; color: var(--ink);
  text-decoration: none; cursor: pointer; width: 100%; font-size: 13px;
}
.menu-pop button:hover, .menu-pop a:hover { background: var(--paper); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line-soft); margin: 6px 0; }
.menu-pop form { margin: 0; }
.menu-user { padding: 6px 10px; font-size: 12px; color: var(--muted); }

.conflict {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px;
  background: var(--warn-tint); color: var(--warn); font-weight: 600; border-bottom: 1px solid #f0d4a8;
}

/* ---------- three panes ---------- */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr) 420px; height: calc(100vh - 56px); }
.side { border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; padding: 12px 0 24px; }
.editor { overflow-y: auto; padding: 24px 32px 80px; outline: none; }
.preview { overflow-y: auto; background: var(--graphite); padding: 18px; color: #c9cfd5; }
@media (max-width: 1280px) { .shell { grid-template-columns: 240px minmax(0, 1fr); } .preview { display: none; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; height: auto; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .top { flex-wrap: wrap; height: auto; padding: 8px 12px; }
  .status { order: 5; flex-basis: 100%; }
}

/* ---------- sidebar ---------- */
.side-group { padding: 8px 12px 4px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px; }
.side-head h2 { font-size: 13px; color: var(--muted); font-weight: 650; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list button {
  width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 4px;
  display: flex; align-items: center; gap: 8px; color: var(--ink); cursor: pointer;
}
.side-list button:hover { background: var(--paper); }
.side-list button[aria-current="true"] { background: var(--red-tint); color: var(--red-dark); font-weight: 600; }
.side-list .lbl { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list .thumb { width: 28px; height: 21px; border-radius: 3px; background: var(--line-soft) center/cover no-repeat; flex: 0 0 auto; }
.side-list .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: 0 0 auto; }
.side-list .sched { font-size: 11px; color: var(--muted); }
.side-search { width: 100%; height: 30px; margin: 2px 0 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }

/* ---------- editor ---------- */
.ed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; max-width: 860px; }
.ed-head h1 { font-size: 22px; line-height: 1.25; word-break: break-word; }
.ed-head p { margin: 4px 0 0; color: var(--muted); }
.ed-head .acts { display: flex; gap: 8px; flex: 0 0 auto; }
.sec { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 6px; margin-bottom: 16px; max-width: 860px; }
.sec > h2 { font-size: 15px; margin-bottom: 4px; }
.sec > .hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 13px; }
.field > small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.field input[type=text], .field input[type=url], .field input[type=date], .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; font: inherit; color: var(--ink); background: #fff;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: #9aa1a8; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(0,87,184,.15); }
.field.bad input, .field.bad textarea { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 600; color: var(--ink); font-size: 13px; }
.inherit { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }

.img-field { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; }
.img-thumb { width: 96px; height: 64px; border-radius: 4px; border: 1px solid var(--line); background: var(--paper) center/cover no-repeat; display: grid; place-items: center; color: #9aa1a8; font-size: 11px; }
.img-ctrl { display: flex; flex-direction: column; gap: 6px; }
.img-ctrl .row { display: flex; gap: 6px; }

/* ordered card list */
.reflist { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.reflist:empty { display: none; }
.refrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--line-soft); background: #fff; }
.refrow:first-child { border-top: 0; }
.refrow.dragging { opacity: .4; }
.refrow.over { box-shadow: inset 0 2px 0 var(--focus); }
.refrow .grip { cursor: grab; color: #9aa1a8; user-select: none; }
.refrow .thumb { width: 48px; height: 32px; border-radius: 3px; background: var(--line-soft) center/cover no-repeat; flex: 0 0 auto; }
.refrow .meta { flex: 1 1 auto; min-width: 0; }
.refrow .meta b { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.refrow .meta small { color: var(--muted); }
.refrow .tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--line-soft); color: var(--muted); }
.refrow .tag.warn { background: var(--warn-tint); color: var(--warn); }
.refrow .acts { display: flex; gap: 4px; }
.addrow { display: flex; gap: 8px; margin-bottom: 14px; }
.addrow select { flex: 1 1 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font: inherit; }
.empty-note { padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); margin-bottom: 12px; font-size: 13px; }

/* offers table */
.drops { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
.drops th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
.drops td { padding: 5px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.drops input { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 5px 7px; font: inherit; min-width: 0; }
.drops td.art { width: 150px; }
.drops td.price { width: 110px; }
.drops td.date { width: 128px; }
.drops td.acts { width: 96px; white-space: nowrap; }
.drops .found { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 11px; color: var(--muted); }
.drops .found img { width: 22px; height: 22px; object-fit: contain; background: #fff; border-radius: 2px; }
.drops .found.miss { color: var(--red); font-weight: 600; }
.drops tr.sched-off td { background: #fafafa; }

.usedby { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.usedby button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 10px; cursor: pointer; font-size: 12px; }
.feeds code { display: block; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 4px; margin: 4px 0 12px; word-break: break-all; }

/* ---------- preview pane (the eshop in miniature) ---------- */
.pv-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pv-head h2 { color: #fff; font-size: 13px; font-weight: 600; }
.pv-head small { color: #8d959d; }
.pv-page { background: #f4f5f7; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.pv-hero { position: relative; min-height: 150px; padding: 18px 16px; color: #fff; background: radial-gradient(120% 140% at 82% 30%, #3a3f45 0%, #1a1d21 55%, #0e1013 100%) center/cover no-repeat; }
.pv-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,17,20,.95) 0%, rgba(15,17,20,.8) 50%, rgba(15,17,20,.3) 100%); }
.pv-hero > * { position: relative; }
.pv-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border: 1px solid rgba(255,255,255,.3); border-radius: 99px; padding: 2px 8px 2px 3px; margin-bottom: 8px; }
.pv-badge i { display: inline-block; height: 14px; min-width: 14px; border-radius: 99px; background: #fff center/contain no-repeat; }
.pv-hero h3 { color: #fff; font-size: 17px; line-height: 1.1; font-weight: 800; }
.pv-hero p { margin: 6px 0 0; font-size: 10px; color: #d6d9dd; max-width: 260px; }
.pv-cta { display: inline-block; margin-top: 8px; background: var(--red); color: #fff; font-size: 9px; font-weight: 700; padding: 4px 8px; border-radius: 3px; }
.pv-search { margin-top: 10px; height: 18px; width: 70%; background: #fff; border-radius: 3px; }
.pv-sec { padding: 10px 12px; }
.pv-sec h4 { margin: 0 0 6px; font-size: 11px; color: #252525; }
.pv-sec h4 em { font-style: normal; color: var(--red); }
.pv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pv-card { position: relative; aspect-ratio: 4/3; background: #dedede center/cover no-repeat; border-radius: 2px; overflow: hidden; }
.pv-card.wide { grid-column: span 2; aspect-ratio: auto; }
.pv-card.thin { grid-column: 1 / -1; aspect-ratio: 16/3; }
.pv-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px; font-size: 7px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); }
.pv-res { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pv-res .r { background: #fff; border: 1px solid #dedede; border-radius: 3px; overflow: hidden; font-size: 8px; color: #252525; }
.pv-res .r.full { grid-column: 1 / -1; }
.pv-res .r i { display: block; aspect-ratio: 876/350; background: #dedede center/cover no-repeat; }
.pv-res .r b { display: block; padding: 3px 5px; font-weight: 600; }
.pv-drops { display: flex; gap: 4px; overflow: hidden; }
.pv-drop { flex: 0 0 22%; background: #fff; border: 1px solid #dedede; border-radius: 2px; padding: 4px; font-size: 7px; color: #252525; }
.pv-drop i { display: block; aspect-ratio: 1; background: #f4f5f7 center/contain no-repeat; margin-bottom: 2px; }
.pv-drop b { color: var(--red); display: block; }
.pv-kam { display: flex; gap: 8px; align-items: center; background: #fff; margin: 8px 12px 0; padding: 6px 8px; border-radius: 3px; border: 1px solid rgba(204,0,0,.28); font-size: 9px; color: #252525; }
.pv-kam i { width: 22px; height: 22px; border-radius: 50%; background: #b9c1ca center/cover no-repeat; flex: 0 0 auto; }
.pv-note { margin-top: 10px; font-size: 12px; color: #8d959d; }

/* ---------- modal + toast ---------- */
.modal { border: 0; border-radius: 8px; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 64px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(20,24,28,.45); }
.modal-in { padding: 22px 24px; }
.modal-in h2 { font-size: 18px; margin-bottom: 6px; }
.modal-in > p { color: var(--muted); margin: 0 0 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.msgs { list-style: none; margin: 0 0 12px; padding: 0; max-height: 260px; overflow-y: auto; }
.msgs li { padding: 6px 10px; border-radius: 4px; margin-bottom: 4px; font-size: 13px; }
.msgs .e { background: var(--red-tint); color: var(--red-dark); }
.msgs .w { background: var(--warn-tint); color: var(--warn); }
.msgs .c { background: var(--paper); color: var(--ink); }
.vlist { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.vlist li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line-soft); }
.vlist li:first-child { border-top: 0; }
.vlist .v { font-weight: 700; color: var(--ink); width: 44px; }
.vlist .m { flex: 1 1 auto; min-width: 0; }
.vlist .m small { display: block; color: var(--muted); }
.vlist .live { font-size: 11px; font-weight: 700; color: var(--ok); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 55vh; overflow-y: auto; }
.media-grid button { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px; cursor: pointer; text-align: left; font-size: 11px; color: var(--muted); }
.media-grid button:hover { border-color: var(--focus); }
.media-grid i { display: block; aspect-ratio: 4/3; background: var(--paper) center/contain no-repeat; margin-bottom: 4px; }
textarea.import { width: 100%; min-height: 220px; font: 12px/1.4 Consolas, "Cascadia Mono", monospace; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.field-inline { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.field-inline input { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font: inherit; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.bad { background: var(--red-dark); }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--graphite); }
.login { background: var(--panel); border-radius: 8px; padding: 32px 32px 28px; width: min(400px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-mark { width: 40px; height: 40px; background: var(--red); border-radius: 5px; position: relative; margin-bottom: 18px; }
.login-mark span { position: absolute; left: 9px; right: 9px; top: 19px; height: 3px; background: #fff; }
.login h1 { font-size: 22px; }
.login-sub { color: var(--muted); margin: 6px 0 20px; }
.login-form label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 14px; font-size: 13px; }
.login-form input { display: block; width: 100%; margin-top: 4px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 10px; font: inherit; }
.login-form .btn { width: 100%; justify-content: center; height: 40px; margin-top: 4px; }
.err { background: var(--red-tint); color: var(--red-dark); padding: 8px 12px; border-radius: 4px; font-weight: 600; margin: 0 0 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- permissions ---------- */
.readonly-note {
  max-width: 860px; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius);
  background: #eef3fa; border: 1px solid #cfdcee; color: #23415f; font-size: 13px;
}
.sec.locked { background: #fbfbfc; }
.sec.locked input, .sec.locked textarea, .sec.locked select { background: var(--paper); color: var(--muted); }
.lock-tag { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--line-soft); border-radius: 99px; padding: 2px 8px; vertical-align: 2px; }
.lockico { font-size: 11px; opacity: .55; flex: 0 0 auto; }
.side-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 0 6px 6px; cursor: pointer; }
.side-empty { padding: 6px 8px; font-size: 12px; color: var(--muted); }
.divs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
input:disabled, textarea:disabled, select:disabled { cursor: not-allowed; }

/* People & access */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-weight: 600; font-size: 13px; color: var(--ink); }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; }
.chip button:hover { background: var(--red-tint); color: var(--red); }
.addrow input[type=text], .addrow input[type=email] { flex: 1 1 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font: inherit; }
table.people { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13px; }
table.people th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
table.people td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.people td.email { font-weight: 600; color: var(--ink); word-break: break-all; min-width: 180px; }
table.people td.c { text-align: center; }
table.people td input[type=text] { width: 100%; min-width: 120px; border: 1px solid var(--line); border-radius: 4px; padding: 5px 7px; font: inherit; }
table.people tr.is-admin td { background: #fffaf3; }
.divpick { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.divpick label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.muted { color: var(--muted); }
.access-foot { max-width: 860px; display: flex; justify-content: flex-end; padding: 4px 0 12px; }
.ed-wide .sec, .ed-wide .ed-head, .ed-wide .access-foot { max-width: 1100px; }

/* ---------- shared cards ---------- */
.shared-warning {
  position: sticky; top: -24px; z-index: 5;
  display: flex; gap: 16px; align-items: flex-start;
  max-width: 860px; margin: 0 0 18px; padding: 18px 20px;
  background: #fff4dc; border: 2px solid #e8a317; border-left-width: 8px; border-radius: var(--radius);
  color: #5c3b00; box-shadow: 0 6px 18px rgba(143, 80, 0, .12);
}
.sw-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: #e8a317; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 24px; line-height: 1;
}
.sw-body { min-width: 0; }
.sw-title { font-size: 19px; font-weight: 750; color: #4a2f00; margin-bottom: 4px; }
.shared-warning p { margin: 0 0 8px; font-size: 14px; }
.sw-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.sw-pages button { border: 1px solid #e3c27a; background: #fff; color: #4a2f00; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.sw-pages button:hover { border-color: #b77a00; }
.sw-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.shared-tag { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: #7a4a00; background: #ffe7b0; border-radius: 99px; padding: 1px 6px; }
.refrow .tag.shared { background: #ffe7b0; color: #7a4a00; font-weight: 700; }
.oci-set { margin: 0; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 4px; color: var(--muted); font-size: 13px; }
.field.locked-field input, .field.locked-field textarea, .field.locked-field select { background: var(--paper); color: var(--muted); }
.pv-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink); font-weight: 600; min-height: 4px; }

/* ---------- card folders (YYYY / MM) ---------- */
.card-tree { display: flex; flex-direction: column; }
.fold-head {
  width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 6px 6px; border-radius: 4px; color: var(--ink); font: inherit; text-align: left;
}
.fold-head:hover { background: var(--paper); }
.fold-head .lbl { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-head .count { font-size: 11px; color: var(--muted); background: var(--line-soft); border-radius: 99px; padding: 0 7px; }
.fold-head .caret { width: 0; height: 0; border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; flex: 0 0 auto; }
.fold-head[aria-expanded="true"] .caret { transform: rotate(90deg); }
.fold-year { font-weight: 700; }
.fold-month { font-weight: 600; font-size: 13px; }
.fold-unfiled { font-weight: 600; color: var(--muted); font-style: italic; }
.fold-year + .fold-body { padding-left: 6px; }
.fold-month + .fold-body, .fold-unfiled + .fold-body { padding-left: 6px; border-left: 1px solid var(--line-soft); margin-left: 8px; }
.folder-pick { display: flex; gap: 8px; }
.field .folder-pick select { width: auto; flex: 0 0 auto; min-width: 140px; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; font: inherit; background: #fff; }
.fold-acct { font-weight: 700; color: var(--ink); }
.fold-acct.fold-all { color: var(--red-dark); }
.fold-acct + .fold-body { padding-left: 6px; }
.file-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.file-list li { padding: 6px 10px; border-top: 1px solid var(--line-soft); }
.file-list li:first-child { border-top: 0; }
.file-list label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.file-list b { color: var(--ink); font-weight: 600; }

/* ---------- Homepage + WAL editors ---------- */
.items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.item-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; }
.item-head { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; border-radius: 4px; }
.item-head:hover { background: var(--paper); }
.item-head .thumb { width: 64px; height: 28px; border-radius: 3px; background: var(--line-soft) center/cover no-repeat; flex: 0 0 auto; }
.item-head .lbl { flex: 1 1 auto; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-head .caret { width: 0; height: 0; border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; flex: 0 0 auto; }
.item-head[aria-expanded="true"] .caret { transform: rotate(90deg); }
.item-head .tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--line-soft); color: var(--muted); }
.item-head .tag.warn { background: var(--warn-tint); color: var(--warn); }
.item .acts { display: flex; gap: 4px; }
.item-body { padding: 10px 14px 2px; border-top: 1px solid var(--line-soft); }
.subsec { border-top: 1px solid var(--line-soft); padding-top: 12px; margin: 4px 0 12px; }
.subsec h3 { font-size: 14px; margin-bottom: 8px; }
.drops td.tag { width: 110px; }
.drops td.tag .feat { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 3px; }
.drops td.note { width: 120px; }
.wal-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.wal-tools input { flex: 0 1 320px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font: inherit; }
.wal-table td.n { width: 36px; color: var(--muted); font-size: 12px; text-align: right; padding-right: 8px; }
.wal-table td.art { width: 140px; }
.wal-table td.price { width: 100px; }
.wal-table td.qty { width: 84px; }
.wal-table td.acts { width: 40px; }
.wal-table td.pname { font-size: 12px; }
.wal-table .found { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.wal-table .found img { width: 24px; height: 24px; object-fit: contain; background: #fff; }
.wal-table .missing { color: var(--red); font-weight: 600; }
.wal-table tr.miss td { background: #fff7f7; }
.pv-slide { height: 70px; background: #2b2f33 center/cover no-repeat; display: flex; align-items: flex-end; padding: 6px; }
.pv-slide span { font-size: 9px; color: #fff; background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 99px; }
.pv-banner { height: 60px; }
.pv-themed { background: radial-gradient(ellipse at 50% 0%, #3a2440 0%, #1c1420 60%); border-top: 3px solid #ff7a1a; border-bottom: 3px solid #ff7a1a; }
.pv-themed h4 { color: #fff; }
.pv-sec small { display: block; margin-top: 4px; font-size: 9px; color: #6a7178; }
.pv-themed small { color: #c9b9d0; }
.pv-wal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pv-wal .pv-drop { flex: none; }
.table-scroll { overflow-x: auto; margin-bottom: 12px; }
.table-scroll .drops { margin-bottom: 0; }
.drops-wide { min-width: 1080px; }

/* ---------- QR codes ---------- */
.qr-ico { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 3px;
  background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 6px 6px; opacity: .55; }
.qr-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; margin-bottom: 8px; }
@media (max-width: 1000px) { .qr-grid { grid-template-columns: 1fr; } }
.qr-art { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 6px; }
.qr-art svg { width: 100%; height: 100%; display: block; }
.row-inline { display: flex; gap: 6px; }
.row-inline input { flex: 1 1 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font: inherit; background: var(--paper); }
.qr-final, .pv-qr code { display: block; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 4px; word-break: break-all; font-size: 12px; }
.qr-nums { display: flex; gap: 28px; margin-bottom: 12px; }
.qr-nums div { display: flex; flex-direction: column; }
.qr-nums b { font-size: 26px; color: var(--ink); line-height: 1.1; }
.qr-nums span { font-size: 12px; color: var(--muted); }
.qr-bars { display: flex; align-items: flex-end; gap: 3px; height: 60px; border-bottom: 1px solid var(--line); }
.qr-bars span { flex: 1 1 0; background: var(--red); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.qr-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 4px 0 10px; }
.pv-qr { background: #fff; border-radius: 4px; padding: 12px; color: var(--ink); font-size: 13px; }
.pv-qr p { margin: 8px 0 4px; }
.pv-qr p:first-child { margin-top: 0; }

/* ---------- Würth A Look versions ---------- */
.wal-vrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wal-vrow h2 { margin-bottom: 2px; }
.wal-vrow .hint { margin: 0; }
.wal-vrow .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.seg button { border: 0; background: transparent; padding: 8px 16px; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 1px; min-width: 150px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button b { font-size: 13px; font-weight: 600; }
.seg button small { font-size: 12px; color: var(--muted); }
.seg button.on { background: var(--red-tint); box-shadow: inset 0 -2px 0 var(--red); }
.seg button:disabled { cursor: pointer; }
.wal-versions .grid2 { margin-top: 14px; }
.wal-versions .readonly-note { margin: 14px 0 0; max-width: none; }
.wal-live { background: #fff6e0; border-color: #f0d590; color: #5c4300; }
.pv-ver { display: block; color: #f2b8b8 !important; }
.import-sum { margin: 10px 0; padding: 0; list-style: none; font-size: 13px; }
.import-sum li { padding: 3px 0; }
.import-sum .warn { color: #8a5a00; }
.import-sum .bad { color: var(--red); }
.modal-in.modal-wide { max-height: calc(100vh - 64px); overflow: auto; }
.when-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px 26px; }
.when-row small { color: var(--muted); font-size: 12px; }
.import-sum details summary { cursor: pointer; }
.import-sum details ul { margin: 6px 0 0 16px; padding: 0; max-height: 180px; overflow: auto; color: var(--ink, #222); font-size: 12px; }

/* ---------- import wizard ---------- */
.wiz-code { min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.wiz-bad { color: var(--red); font-size: 13px; margin: 10px 0 0; }
.wiz-switch { margin-top: 12px; padding: 12px 14px; background: #fff6e0; border: 1px solid #f0d590; border-radius: var(--radius); }
.wiz-switch p { margin: 0 0 8px; color: #5c4300; }
.wiz-switch .row { display: flex; gap: 8px; flex-wrap: wrap; }
.wiz-h { font-size: 13px; font-weight: 600; margin: 16px 0 6px; }
.wiz-list { border: 1px solid var(--line); border-radius: var(--radius); max-height: 300px; overflow: auto; }
.wiz-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.wiz-row:first-child { border-top: 0; }
.wiz-row input[type=checkbox] { flex: 0 0 auto; }
.wiz-row select { flex: 0 0 auto; max-width: 230px; font-size: 12px; }
.wiz-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wiz-main b { font-size: 13px; font-weight: 600; }
.wiz-main small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-thumb { flex: 0 0 64px; height: 30px; border-radius: 3px; background: var(--line-soft) center/cover no-repeat; }
.wiz-tag { flex: 0 0 auto; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 2px 8px; }
.wiz-tag.new { background: #e6f4ea; color: #1e6b34; }
.wiz-tag.old { background: #fff6e0; color: #7a5600; }
.modal-foot .grow { flex: 1 1 auto; }
.modal-foot .btn-ghost { margin-right: auto; }
.side-btns { display: flex; align-items: center; gap: 6px; }
.side-import { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); font: inherit; font-size: 12px; padding: 3px 8px; cursor: pointer; color: var(--muted); }
.side-import:hover { color: var(--red); border-color: var(--red); }
.modal-in.modal-wide .modal-foot { position: sticky; bottom: -22px; background: #fff; margin: 12px -24px -22px; padding: 12px 24px 16px; border-top: 1px solid var(--line-soft); }
.modal-in.modal-wide .wiz-list { max-height: 240px; }

/* ---------- card board (drag and drop) ---------- */
.refgrid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.refgrid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.refgrid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reftile.span-2 { grid-column: span 2; }
.reftile.span-4 { grid-column: span 4; }
.refdrop.span-4 { grid-column: 1 / -1; }
.refdrop.span-2 { grid-column: 1 / -1; }
.reftile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: grab; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .12s, opacity .12s; }
.reftile:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.reftile:active { cursor: grabbing; }
.reftile.dragging { opacity: .35; }
.reftile.missing { border-style: dashed; border-color: var(--red); }
.rt-img { aspect-ratio: 4 / 3; background: var(--line-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
.reftile.span-2 .rt-img { aspect-ratio: 8 / 3; }
.reftile.span-4 .rt-img { aspect-ratio: 1920 / 350; }
.cols-2 .reftile .rt-img { aspect-ratio: 876 / 350; }
.rt-img span { font-size: 11px; color: var(--muted); }
.rt-meta { display: flex; align-items: baseline; gap: 6px; padding: 7px 9px 2px; min-width: 0; flex-wrap: wrap; }
.rt-meta b { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.rt-meta small { flex-basis: 100%; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-n { font-size: 11px; font-weight: 700; color: #fff; background: #6b737b; border-radius: 99px; padding: 0 6px; line-height: 17px; flex: 0 0 auto; }
.rt-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px 9px 8px; }
.rt-tags:empty { display: none; }
.rt-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 3px; opacity: 0; transition: opacity .12s; }
.reftile:hover .rt-acts, .reftile:focus-within .rt-acts { opacity: 1; }
.rt-acts .icon-btn { background: rgba(255,255,255,.95); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.reftile.ins-before::before, .reftile.ins-after::after { content: ""; position: absolute; top: 0; bottom: 0; width: 4px; background: var(--red); border-radius: 2px; z-index: 2; }
.reftile.ins-before::before { left: 0; }
.reftile.ins-after::after { right: 0; }
.refdrop { border: 2px dashed var(--line); border-radius: var(--radius); min-height: 54px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); transition: background .12s, border-color .12s; }
.card-dragging .refdrop:not(.add-tile) { border-color: var(--red); background: var(--red-tint); color: var(--red-dark); }
.refdrop.ins-end { border-color: var(--red); background: var(--red-tint); color: var(--red-dark); }
.side-list li[draggable="true"] { cursor: grab; }
.fold-acct.fold-other { color: var(--muted); }
@media (max-width: 1100px) { .refgrid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reftile.span-4 { grid-column: 1 / -1; } }
@media (hover: none) { .rt-acts { opacity: 1; } }
.toast { pointer-events: none; }   /* never block a drop or a click underneath */
.rt-tags .tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--line-soft); color: var(--muted); }
.rt-tags .tag.warn { background: var(--warn-tint); color: var(--warn); }
.rt-tags .tag.shared { background: #ffe7b0; color: #7a4a00; font-weight: 700; }
.rt-img { max-height: 130px; }   /* keep the board compact; the image is a thumbnail here */

/* ---------- Homepage section boards ---------- */
.refgrid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.refgrid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.itemgrid .reftile { cursor: pointer; }
.itemgrid .rt-img { max-height: 110px; }
.itemgrid.cols-6 .rt-meta b { font-size: 12px; }
.reftile.current { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-tint), 0 2px 10px rgba(0,0,0,.08); }
.reftile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.add-tile { cursor: pointer; min-height: 80px; color: var(--muted); font-weight: 600; }
.add-tile:hover, .add-tile:focus-visible { border-color: var(--red); color: var(--red); background: var(--red-tint); outline: none; }
.add-tile.disabled { display: none; }
.empty-tile { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding: 6px 2px; }
.item-detail { margin-top: 12px; border: 1px solid var(--red); border-radius: var(--radius); padding: 14px 16px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.item-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.item-detail-head b { font-size: 14px; }
@media (max-width: 1100px) { .refgrid.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .refgrid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.itemgrid .rt-meta { flex-wrap: nowrap; padding-bottom: 8px; }
.pname .fallback { color: var(--ink); }
.pname .fallback small { color: #8a5a00; }
.deal-tag, .per-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 1px 6px; vertical-align: 1px; }
.deal-tag { background: var(--red); color: #fff; }
.per-tag { background: var(--line-soft); color: var(--muted); }
.login-kicker { margin: 2px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
