/* WOF Label Creator – fælles design. Variablerne bruges også af login- og hjælpesiden. */
:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #f0f1f4;
  --accent: #d0102b;
  --accent-hover: #b50d25;
  --accent-soft: #fdecef;
  --accent-ink: #fff;
  --ok: #15803d;
  --ok-bg: #e9f7ee;
  --warn: #a16207;
  --warn-bg: #fef7e0;
  --err: #b91c1c;
  --err-bg: #fdeeee;
  --info-bg: #eef4ff;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.16);
  --topbar-h: 56px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  min-width: 0;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input::placeholder, textarea::placeholder { color: #9ca3af; }
textarea { width: 100%; resize: vertical; min-height: 96px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #d1d5db; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #d0102b22; }
input[type='checkbox'] { accent-color: var(--accent); width: 15px; height: 15px; }
button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
button:hover { border-color: #d1d5db; background: var(--panel-2); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px #d0102b33; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.ok { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
button.ok:hover:not(:disabled) { background: #116b33; border-color: #116b33; }
button.ghost { background: transparent; border-color: #ffffff2a; color: #e5e7eb; box-shadow: none; }
button.ghost:hover { background: #ffffff14; border-color: #ffffff40; }
button.link { border: none; background: none; color: var(--accent); padding: 0; box-shadow: none; font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button.icon { padding: 6px 9px; line-height: 1; }
.hidden { display: none !important; }
a { color: var(--accent); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: #0f1115;
  color: #fff;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff3b55, var(--accent));
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: 0 0 0 1px #ffffff1f inset, 0 4px 12px #d0102b55;
}
.brand span { font-weight: 400; opacity: 0.6; }
.topbar nav { display: flex; gap: 2px; }
.topbar nav button { background: transparent; border: none; color: #9ca3af; padding: 7px 12px; box-shadow: none; border-radius: 8px; }
.topbar nav button:hover { color: #fff; background: #ffffff10; }
.topbar nav button.active { background: #ffffff18; color: #fff; }
.sync { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9ca3af; }
.sync .sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #22c55e33; }
.kbd-hint { display: flex; align-items: center; gap: 6px; color: #9ca3af; background: #ffffff10; border: 1px solid #ffffff1a; border-radius: 8px; padding: 5px 10px; cursor: pointer; box-shadow: none; }
.kbd-hint:hover { color: #fff; background: #ffffff1a; }
.kbd-hint kbd { background: #ffffff1a; border-color: #ffffff26; color: #d1d5db; }
.user-chip { display: flex; align-items: center; gap: 8px; color: #e5e7eb; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #374151; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.help-btn { background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: 0.6px; padding: 7px 14px; border-radius: 8px; text-decoration: none; }
.help-btn:hover { background: var(--accent-hover); }

main { flex: 1; min-height: 0; }
.view { display: none; height: 100%; }
.view.active { display: flex; }
#view-types.active, #view-settings.active, #view-log.active, #view-account.active { display: block; overflow: auto; padding: 24px; }

/* ---------- Vareliste ---------- */
.list-pane {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.filters { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search input { width: 100%; padding-left: 34px; padding-right: 54px; height: 38px; background: var(--panel-2); }
.search input:focus { background: #fff; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.chipbar { display: flex; flex-wrap: wrap; gap: 4px; }
.fchip { font-size: 12px; padding: 3px 10px; border-radius: 99px; box-shadow: none; color: var(--ink-2); background: #fff; }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip .n { opacity: 0.6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.progress { display: flex; flex-direction: column; gap: 5px; }
.progress .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.progress .row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress .bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; display: flex; }
.progress .bar i { display: block; height: 100%; }
.progress .bar .p-ok { background: #22c55e; }
.progress .bar .p-ch { background: #f59e0b; }
.filters .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.small { font-size: 12px; color: var(--muted); }
.list { flex: 1; overflow: auto; padding: 6px; }
.item {
  display: grid;
  grid-template-columns: 18px 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.item + .item { margin-top: 2px; }
.item:hover { background: var(--panel-2); }
.item.selected { background: var(--accent-soft); border-color: #f6c2cb; }
.item .sel { opacity: 0.35; transition: opacity 0.12s; }
.item:hover .sel, .item .sel:checked, .list.selecting .sel { opacity: 1; }
.thumb { width: 38px; height: 38px; border-radius: 8px; background: #fff; border: 1px solid var(--line); object-fit: contain; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); overflow: hidden; }
.item .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.item .sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.item.deleted .nm { text-decoration: line-through; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.ok { background: #22c55e; }
.dot.changed { background: #f59e0b; }
.dot.unverified { background: #cbd5e1; }
.dot.error { background: #ef4444; }
.st { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-unverified { background: #eef0f3; color: #475467; }
.b-changed, .b-warn { background: var(--warn-bg); color: var(--warn); }
.b-error { background: var(--err-bg); color: var(--err); }
.kat { font-size: 10.5px; font-weight: 700; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; color: var(--ink-2); background: #fff; }
.batch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}
.batch input { width: 64px; }

/* ---------- Arbejdsflade ---------- */
.detail-pane { flex: 1; overflow: auto; min-width: 0; position: relative; }
.empty { color: var(--muted); padding: 60px 40px; text-align: center; }
.empty-state { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 40px; }
.empty-state .big { font-size: 42px; margin-bottom: 8px; }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); }
.ws { display: grid; grid-template-columns: minmax(0, 1fr) 420px; min-height: 100%; }
.ws-main { padding: 14px 24px 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ws-head { display: flex; gap: 14px; align-items: center; }
.ws-head .thumb { width: 48px; height: 48px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-sm); }
.ws-title { min-width: 0; flex: 1; }
.ws-title h2 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-eyebrow { font-size: 12.5px; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.status-pill.ok { background: var(--ok-bg); color: var(--ok); }
.status-pill.changed { background: var(--warn-bg); color: var(--warn); }
.status-pill.unverified { background: #eef0f3; color: #475467; }
.status-pill.error { background: var(--err-bg); color: var(--err); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* Fliserne sidder på samme linje som varenavnet */
.ws-head { flex-wrap: wrap; row-gap: 10px; }
.ws-head .ws-title { flex: 1 1 200px; }
.ws-head .tiles { display: flex; gap: 8px; flex: 0 1 auto; min-width: 0; }
.ws-head .tile { padding: 5px 11px; border-radius: 10px; box-shadow: none; min-width: 74px; max-width: 220px; }
.ws-head .tile .k { font-size: 10px; letter-spacing: 0.4px; gap: 8px; }
.ws-head .tile .v { font-size: 14.5px; margin-top: 0; }
.ws-head .tile .v small { font-size: 11px; }
.ws-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ws-eyebrow .status-pill { padding: 1px 9px; font-size: 11.5px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-sm); min-width: 0; }
.tile .k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.tile .v { font-size: 17px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 12px; font-weight: 500; color: var(--muted); }
.tile.missing { border-color: #f5c2c0; background: #fffafa; cursor: pointer; }
.tile.missing .v { color: var(--err); font-size: 14px; }
.tile .src-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; margin-top: 4px; }
.tile .src-dot.manual { background: #f59e0b; }
.canvas-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.canvas-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.canvas-bar .pv-toolbar { flex: 1; margin: 0; }
.hist { display: flex; gap: 4px; }
.hist button { padding: 5px 9px; font-size: 12.5px; }
.preview-wrap {
  background-color: #eef0f3;
  background-image: radial-gradient(#d5d9e0 1px, transparent 1px);
  background-size: 14px 14px;
  padding: 28px 20px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.preview-scale { transform-origin: top left; }
.preview-scale .label { box-shadow: 0 1px 2px #0002, 0 8px 24px #0f172a1f; border-radius: 1px; }
.pv-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); background: var(--panel-2); }
.pv-foot .fitmeter { margin-left: 0; }

/* Tjekliste */
.checks { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.checks-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); }
.checks-head .cnt { margin-left: auto; display: flex; gap: 6px; }
.msgs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.msgs li { padding: 9px 14px 9px 40px; font-size: 13px; position: relative; line-height: 1.45; }
.msgs li + li { border-top: 1px solid var(--line-2); }
.msgs li::before { position: absolute; left: 14px; top: 9px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.msgs li.err { color: #7f1d1d; }
.msgs li.err::before { content: '!'; background: var(--err-bg); color: var(--err); }
.msgs li.warn { color: #713f12; }
.msgs li.warn::before { content: '!'; background: var(--warn-bg); color: var(--warn); }
.msgs li.ok { color: var(--ok); }
.msgs li.ok::before { content: '✓'; background: var(--ok-bg); color: var(--ok); }
.verified-box:empty { display: none; }
.verified-box { background: var(--panel); border: 1px solid #f3d38a; border-radius: var(--radius-lg); padding: 12px 14px; font-size: 13px; }
.verified-box .vb-title { font-weight: 600; color: var(--warn); margin-bottom: 8px; }
.diff { white-space: pre-wrap; font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); padding: 10px; border-radius: 8px; max-height: 200px; overflow: auto; line-height: 1.6; }
.diff ins { background: var(--ok-bg); color: var(--ok); text-decoration: none; padding: 0 3px; border-radius: 4px; }
.diff del { background: var(--err-bg); color: var(--err); padding: 0 3px; border-radius: 4px; }
.diff .gap { color: var(--muted); padding: 0 4px; }

/* Fast handlingsbjælke */
.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 2px -24px 0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(16, 24, 40, 0.06);
}
.ab-status { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; font-size: 13px; color: var(--ink-2); }
.ab-status > span:not(.status-pill) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ab-status > .status-pill, .ab-status > button { flex-shrink: 0; }
.actionbar { container-type: inline-size; }
@container (max-width: 860px) { .ab-status > span:not(.status-pill) { display: none; } }
.ab-status .status-pill { padding: 4px 10px; font-size: 12.5px; }
.ab-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.qty button { border: none; box-shadow: none; border-radius: 0; padding: 6px 10px; font-weight: 700; color: var(--muted); }
.qty input { border: none; border-radius: 0; width: 52px; text-align: center; padding: 6px 0; box-shadow: none !important; -moz-appearance: textfield; font-weight: 600; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty .lbl { font-size: 12px; color: var(--muted); padding: 0 4px 0 10px; }
.shortcuts { font-size: 11.5px; color: var(--muted); padding: 6px 0 16px; }

/* Inspektør */
.inspector {
  background: var(--panel);
  border-left: 1px solid var(--line);
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - var(--topbar-h));
  overflow: auto;
}
.sec { border-bottom: 1px solid var(--line); }
.sec > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  user-select: none;
}
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: '›'; margin-left: auto; color: var(--muted); font-size: 18px; transition: transform 0.15s; }
.sec[open] > summary::after { transform: rotate(90deg); }
.sec > summary:hover { background: var(--panel-2); }
.sec-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.sec-t { display: flex; flex-direction: column; min-width: 0; }
.sec-t b { font-size: 14px; }
.sec-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-body { padding: 2px 18px 18px; }
.sec-body .hint { display: block; }

/* Formularer */
.form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 12px; }
.form > * { min-width: 0; }
.form label > input:not([type='checkbox']), .form label > select, .form label > textarea { width: 100%; }
.form .full { grid-column: 1 / -1; }
.form label, .fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.form label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: 13px; }
.hint { font-weight: 400; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.src { font-size: 11px; font-weight: 600; color: var(--ok); }
.src.manual { color: var(--warn); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.card + .card { margin-top: 16px; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.page { max-width: 1100px; margin: 0 auto; }
.page h2 { margin-top: 0; font-size: 22px; letter-spacing: -0.2px; }
.type-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.type-card .form { grid-template-columns: 2fr repeat(4, 1fr) 1fr; }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 12px 0 16px; flex-wrap: wrap; }
.sticky-save { position: sticky; bottom: 0; background: rgba(243, 244, 246, 0.92); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 8px; }

/* Værktøjslinje over labelen */
.pv-toolbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel-2); padding: 2px; gap: 2px; }
.seg button { border: none; border-radius: 7px; padding: 4px 10px; font-size: 12.5px; background: transparent; box-shadow: none; color: var(--ink-2); }
.seg button:hover { background: #fff; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.seg small { opacity: 0.55; font-size: 10px; font-weight: 500; }
.toggles { display: flex; flex-wrap: wrap; gap: 5px; }
.tog { font-size: 12px; padding: 3px 10px; border-radius: 99px; color: var(--muted); box-shadow: none; }
.tog.on { background: var(--ok-bg); border-color: #bfe3c9; color: var(--ok); }
.tog.custom::after { content: '•'; color: var(--accent); margin-left: 4px; }
.tog.missing { background: var(--warn-bg); border-color: #f0d48a; color: var(--warn); }
.fitmeter { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-left: auto; color: var(--muted); }
.fitmeter .bar { width: 70px; height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.fitmeter i { display: block; height: 100%; background: #22c55e; transition: width 0.15s; }
.fitmeter.warn i { background: #f59e0b; }
.fitmeter.err i { background: #ef4444; }
.fitmeter b { color: var(--ink); min-width: 44px; font-variant-numeric: tabular-nums; }
.fitmeter.err b { color: var(--err); }
.fitmeter .fm-sub { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Hurtigtekster */
.quick { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.quick:empty { display: none; }
.quick-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ql { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); width: 70px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: #fff; box-shadow: none; color: var(--ink-2); }
.chip:hover { border-color: #f3b8c2; color: var(--accent); background: #fff; }
.chip.on { background: var(--accent-soft); border-color: #f3b8c2; color: var(--accent); font-weight: 600; }

/* Redigerbare og låste dele i forhåndsvisningen (gælder ikke print) */
.preview-scale [data-edit] { outline: 0.4px dashed transparent; outline-offset: 0.2mm; cursor: text; border-radius: 0.3mm; transition: outline-color 0.15s; }
.preview-wrap:hover .preview-scale [data-edit] { outline-color: rgba(208, 16, 43, 0.55); }
.preview-scale [data-edit]:hover { background: rgba(208, 16, 43, 0.07); }
.preview-scale [data-edit]:focus { outline: 0.7px solid var(--accent); background: rgba(208, 16, 43, 0.05); }
.preview-scale [data-lock] { cursor: pointer; border-radius: 0.3mm; }
.preview-scale [data-lock]:hover { background: rgba(0, 0, 0, 0.05); }
.pv-pop {
  position: fixed;
  z-index: 60;
  display: none;
  max-width: 300px;
  background: #0f1115;
  color: #fff;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-lg);
}
.pv-pop .link { color: #ff8a9a; margin-top: 6px; display: inline-block; }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px #d0102b66; } 100% { box-shadow: 0 0 0 0 transparent; } }
kbd { font: 11px ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: #fff; color: var(--ink-2); }

/* Faresætninger */
.clp-list { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.clp-row { display: grid; grid-template-columns: 18px 128px 1fr; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 5px 6px; border-radius: 7px; cursor: pointer; }
.clp-row:hover { background: var(--panel-2); }
.clp-row.fixed { cursor: default; color: var(--muted); }
.clp-row.fixed:hover { background: none; }
.clp-row .code { font: 600 11.5px ui-monospace, Menlo, monospace; color: var(--ink); }

/* Hurtigsøgning (Ctrl+K) */
.palette-backdrop { position: fixed; inset: 0; background: rgba(15, 17, 21, 0.4); backdrop-filter: blur(2px); z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette { width: min(640px, calc(100vw - 32px)); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.palette input { width: 100%; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.palette li .thumb { width: 36px; height: 36px; }
.palette li.on { background: var(--accent-soft); }
.palette .pf { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--panel-2); }

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f1115;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 90;
  max-width: 80vw;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
}
.toast.err { background: var(--err); }

#print-root { display: none; }

@media (max-width: 1280px) {
  .ws { grid-template-columns: 1fr; }
  .inspector { position: static; height: auto; border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-head .tiles { flex-wrap: wrap; flex-basis: 100%; }
}
@media (max-width: 760px) {
  .view.active { flex-direction: column; }
  .list-pane { width: 100%; max-height: 45vh; }
  .topbar { flex-wrap: wrap; gap: 8px; height: auto; padding: 8px 12px; }
  .form { grid-template-columns: 1fr; }
  .ws-main { padding: 16px 16px 0; }
  .actionbar { margin: 0 -16px; padding: 12px 16px; }
}

@media print {
  html, body { background: #fff; height: auto; display: block; }
  .no-print, .toast, .palette-backdrop { display: none !important; }
  #print-root { display: block; }
  .print-page { position: relative; overflow: hidden; page-break-after: always; break-after: page; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-page .label.rotated { position: absolute; top: 0; left: 0; transform-origin: top left; }
}
