:root{
  --bg: #eef2f6;
  --panel: #ffffffea;
  --border: #cbd5e1;
  --muted: #64748b;
  --text: #0f172a;
  --blue: #2563eb;
  --blue-50: #eff6ff;
  --rose: #dc2626;

  /* Ändra loggans storlek här */
  --logo-size: 60px;
}
* { box-sizing: border-box; }
body.bg { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--text); background: linear-gradient(#f1f5f9, var(--bg)); }
.container { max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px){ .container{ grid-template-columns: 1fr 1fr; } }

.left, .right { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px; position: relative; }
.title { margin: 0; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.subtitle { margin: 8px 0 12px; font-size: 18px; }
.left__header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }

.btn { background: var(--blue); color: #fff; border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.btn:hover { background: #1d4ed8; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: #334155; border: 1px solid var(--border); }
.btn--ghost:hover { background: #f8fafc; }

.input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background:#fff; }
.card { border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; padding: 12px; margin: 10px 0; }
.card__title { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 12px; }
.upcase { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }

.grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.grid--2 { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 480px){ .grid{ grid-template-columns: repeat(3,1fr);} }

.thumb { border:1px solid var(--border); background:#fff; border-radius:12px; overflow:hidden; padding:0; display:flex; flex-direction:column; cursor: pointer; }
.thumb__img{ width:100%; aspect-ratio:1/1; object-fit:contain; background:#f1f5f9; }
.thumb__row{ display:flex; justify-content:center; align-items:center; padding:8px; font-weight:600; color:var(--text); }
.thumb--picked{ border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.thumb--disabled{ opacity:.45; cursor:not-allowed; }

.row { display:flex; gap:10px; align-items:center; }
.row.right { justify-content:flex-end; }
.row-between{ display:flex; align-items:center; justify-content:space-between; }

.navbtns { display:flex; gap:8px; }

.dots { display:flex; gap:8px; margin-bottom:12px; }
.dots button { width:12px; height:12px; border-radius:999px; border:none; background:#94a3b8; cursor:pointer; }
.dots button.active { background: var(--blue); }

.finish { margin-top:12px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--border); background:#f1f5f9; border-radius:10px; padding:8px; }
.hidden { display:none; }

.preview { border:1px solid var(--border); border-radius:12px; background:#e5e7eb; padding:8px; }
.preview__canvas { position:relative; width:100%; max-width:700px; margin:0 auto; aspect-ratio:3/2; background:#e2e8f0; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.preview__canvas img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }

.bom { display:flex; flex-direction:column; gap:6px; font-size:14px; }
.bom__line { display:flex; justify-content:space-between; }
.stack { display:flex; flex-direction:column; gap:6px; font-size:14px; }
.link { background:none; border:none; color: var(--blue); cursor:pointer; }
.link--danger { color: var(--rose); }

.logo { position:absolute; right:16px; bottom:12px; color:#94a3b8; font-size:12px; opacity:.85; }
.logo img { height: var(--logo-size); width: auto; opacity: 0.85; }

/* Utskrift: varje sida = en konfiguration */
.print-root { display:none; }
@media print {
  body { background:#fff; }
  .left { display:none !important; }
  .right { border: none; }
  .logo { position:static; }

  .print-root { display:block; }
  .page { page-break-after: always; padding: 16mm; }
  .page__header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8mm; }
  .page__title { font-size: 18px; font-weight: 700; color:#0f172a; }
  .page__logo img { height: 18mm; width:auto; }
  .page__preview { position:relative; width:100%; height:90mm; border:1px solid #e5e7eb; border-radius:6px; overflow:hidden; background:#f1f5f9; }
  .page__preview img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
  .page__bom { margin-top:6mm; font-size:12px; }
  .page__bom-row { display:flex; justify-content:space-between; border-bottom:1px solid #e5e7eb; padding:2mm 0; }
}
