/* Egen kod, idé från affectUI KPI Board (Pro), ingen kod tagen */
.nbkp-root {
  --nbkp-k: 0, 0, 0;
  --nbkp-card: #ffffff;
  --nbkp-soft: #FAFAF8;
  --nbkp-strong: #000000;
  --nbkp-ink: rgba(0, 0, 0, 0.88);
  --nbkp-text: rgba(0, 0, 0, 0.61);
      --nbkp-line: rgba(0, 0, 0, 0.06);
  --nbkp-wash: rgba(0, 0, 0, 0.03);
  --nbkp-tray: #F2F1EE;
  --nbkp-ember: #D9601C;
  --nbkp-ember-ink: #A8460F;
  --nbkp-ember-tint: rgba(217, 96, 28, 0.10);
  --nbkp-ok: #1E7A4C;
  --nbkp-ok-tint: rgba(30, 122, 76, 0.10);
  --nbkp-wait: #8A5200;
  --nbkp-wait-tint: rgba(178, 106, 0, 0.10);
  --nbkp-bad: #B3261E;
  --nbkp-solid: rgba(0, 0, 0, 0.88);
  --nbkp-on-solid: #fcfcfc;
  --nbkp-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 1px 1px -1px rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(var(--nbkp-k), 0.05);
  --nbkp-shadow-hover: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 1px 1px -1px rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(var(--nbkp-k), 0.07);
  --nbkp-focus: rgba(217, 96, 28, 0.4);
  --nbkp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-sizing: border-box;
  container-type: inline-size;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  color: var(--nbkp-ink);
  text-align: left;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* Mörkt läge, samma konvention som affectUI */
:where(.dark, [data-theme="dark"]) .nbkp-root {
  --nbkp-k: 255, 255, 255;
  --nbkp-card: #1C1B1A;
  --nbkp-soft: #201F1E;
  --nbkp-strong: rgba(255, 255, 255, 0.94);
  --nbkp-ink: rgba(255, 255, 255, 0.9);
  --nbkp-text: rgba(255, 255, 255, 0.64);
      --nbkp-line: rgba(255, 255, 255, 0.08);
  --nbkp-wash: rgba(255, 255, 255, 0.04);
  --nbkp-tray: #161615;
  --nbkp-ember: #D9601C;
  --nbkp-ember-ink: #F08A4B;
  --nbkp-ember-tint: rgba(240, 138, 75, 0.14);
  --nbkp-ok: #3EC27A;
  --nbkp-ok-tint: rgba(62, 194, 122, 0.13);
  --nbkp-wait: #F0B232;
  --nbkp-wait-tint: rgba(240, 178, 50, 0.13);
  --nbkp-bad: #F07A6E;
  --nbkp-solid: rgba(255, 255, 255, 0.9);
  --nbkp-on-solid: #161615;
  --nbkp-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.4);
  --nbkp-shadow-hover: 0 0 0 0.5px rgba(255, 255, 255, 0.16), 0 1px 3px rgba(0, 0, 0, 0.5);
  --nbkp-focus: rgba(240, 138, 75, 0.55);
  color-scheme: dark;
}
.nbkp-root *, .nbkp-root *::before, .nbkp-root *::after { box-sizing: border-box; }
.nbkp-root [hidden] { display: none !important; }
:where(.nbkp-root) button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.nbkp-root) input, :where(.nbkp-root) textarea { font: inherit; color: inherit; margin: 0; }
:where(.nbkp-root) svg { display: block; flex: none; }
:where(.nbkp-root) h2, :where(.nbkp-root) h3, :where(.nbkp-root) h4, :where(.nbkp-root) p, :where(.nbkp-root) ul, :where(.nbkp-root) ol, :where(.nbkp-root) dl, :where(.nbkp-root) dd, :where(.nbkp-root) fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
:where(.nbkp-root) ul, :where(.nbkp-root) ol { list-style: none; }
.nbkp-root button:focus-visible, .nbkp-root input:focus-visible, .nbkp-root textarea:focus-visible, .nbkp-root [tabindex]:focus-visible { outline: 2px solid var(--nbkp-focus); outline-offset: 1px; }
.nbkp-sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.nbkp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 28px; padding: 4px 10px; border-radius: 6px;
  background: var(--nbkp-card); box-shadow: var(--nbkp-shadow);
  font-weight: 500; white-space: nowrap; color: var(--nbkp-ink);
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 160ms var(--nbkp-ease), opacity 140ms ease;
}
.nbkp-btn:hover { box-shadow: var(--nbkp-shadow-hover); }
.nbkp-btn:active { transform: scale(0.97); }
.nbkp-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nbkp-btn--solid { background: var(--nbkp-solid); color: var(--nbkp-on-solid); box-shadow: none; }
.nbkp-btn--solid:hover { background: rgba(var(--nbkp-k), 0.8); box-shadow: none; }
.nbkp-btn:disabled { opacity: 0.4; cursor: default; transform: none; }

.nbkp-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: rgba(var(--nbkp-k), 0.045); max-width: 100%; }
.nbkp-seg-opt { height: 26px; padding: 0 11px; border-radius: 6px; font-weight: 500; color: var(--nbkp-text); white-space: nowrap; transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.nbkp-seg-opt:hover { color: var(--nbkp-ink); }
.nbkp-seg-opt[aria-selected="true"], .nbkp-seg-opt[aria-checked="true"] { background: var(--nbkp-card); color: var(--nbkp-strong); box-shadow: var(--nbkp-shadow); }

.nbkp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap;
  background: rgba(var(--nbkp-k), 0.05); color: var(--nbkp-text);
}
.nbkp-pill[data-tone="ok"] { background: var(--nbkp-ok-tint); color: var(--nbkp-ok); }
.nbkp-pill[data-tone="ember"] { background: var(--nbkp-ember-tint); color: var(--nbkp-ember-ink); }
.nbkp-pill[data-tone="wait"] { background: var(--nbkp-wait-tint); color: var(--nbkp-wait); }
@media (prefers-reduced-motion: reduce) {
  .nbkp-root *, .nbkp-root *::before, .nbkp-root *::after { transition: none !important; animation: none !important; }
}

/* Nyckeltal: tre trendkort, en översikt och ett fokuskort */
.nbkp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.nbkp-h { font-size: 14px; font-weight: 500; color: var(--nbkp-strong); }
.nbkp-seg-opt { height: 24px; font-size: 12px; padding: 0 9px; }
.nbkp-trends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nbkp-bottom { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.nbkp-card { display: flex; flex-direction: column; min-width: 0; padding: 12px 12px 10px; border-radius: 10px; background: var(--nbkp-card); box-shadow: var(--nbkp-shadow); }
.nbkp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.nbkp-v { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--nbkp-strong); white-space: nowrap; }
.nbkp-d { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--nbkp-ember-ink); white-space: nowrap; }
.nbkp-d[data-good] { color: var(--nbkp-ok); }
.nbkp-d svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nbkp-sub { margin-top: 0; }
.nbkp-l { font-size: 12px; line-height: 16px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbkp-read { font-size: 12px; line-height: 16px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbkp-read[data-on] { color: var(--nbkp-ink); font-weight: 500; }
.nbkp-spark { position: relative; height: 54px; margin: 10px 0 4px; }
.nbkp-chart { position: relative; flex: 1; min-height: 150px; margin: 10px 0 4px; }
.nbkp-spark svg, .nbkp-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.nbkp-ax { font-size: 12px; line-height: 16px; color: var(--grey); }
.nbkp-line { fill: none; stroke: var(--nbkp-ember); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.nbkp-line--prev { stroke: rgba(var(--nbkp-k), 0.22); stroke-dasharray: 3 3; }
.nbkp-area { fill: rgba(217, 96, 28, 0.07); }
.nbkp-base { stroke: var(--nbkp-line); stroke-width: 1; }
.nbkp-grid line { stroke: rgba(var(--nbkp-k), 0.045); stroke-width: 1; }
.nbkp-cross { stroke: rgba(var(--nbkp-k), 0.25); stroke-width: 1; }
.nbkp-dot { fill: var(--nbkp-card); stroke: var(--nbkp-ember); stroke-width: 1.8; }
.nbkp-dot--prev { stroke: rgba(var(--nbkp-k), 0.35); }
.nbkp-hover { opacity: 0; transition: opacity 120ms ease; }
.nbkp-hover[data-on] { opacity: 1; }

.nbkp-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--grey); white-space: nowrap; }
.nbkp-legend i { display: inline-block; width: 10px; height: 2px; border-radius: 1px; }
.nbkp-legend i[data-s="now"] { background: var(--nbkp-ember); }
.nbkp-legend i[data-s="prev"] { margin-left: 6px; background: repeating-linear-gradient(90deg, rgba(var(--nbkp-k), 0.3) 0 3px, transparent 3px 6px); }
.nbkp-over-v { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
.nbkp-big { font-size: 22px; line-height: 30px; font-weight: 500; letter-spacing: -0.015em; color: var(--nbkp-strong); white-space: nowrap; }
.nbkp-big--s { font-size: 18px; line-height: 26px; }

.nbkp-focus { gap: 0; }
.nbkp-focus-h { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 0.5px solid var(--nbkp-line); }
.nbkp-tile { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 7px; box-shadow: var(--nbkp-shadow); color: var(--nbkp-text); }
.nbkp-tile svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.nbkp-focus-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nbkp-focus-t b { font-weight: 500; color: var(--nbkp-strong); }
.nbkp-focus-t small { font-size: 12px; line-height: 16px; color: var(--grey); }
.nbkp-setup { min-height: 24px; padding: 2px 8px; font-size: 12px; }
.nbkp-setup[aria-pressed="true"] { background: var(--nbkp-ok-tint); color: var(--nbkp-ok); box-shadow: none; }
.nbkp-focus-body { flex: 1; padding-top: 10px; }
.nbkp-spark--focus { height: 46px; }
.nbkp-cmp { font-size: 12px; line-height: 16px; color: var(--grey); }
.nbkp-cmp b { font-weight: 500; color: var(--nbkp-ink); }
.nbkp-all { width: 100%; margin-top: 10px; }

@container (max-width: 600px) {
  .nbkp-trends { grid-template-columns: minmax(0, 1fr); }
  .nbkp-trend { display: grid; grid-template-columns: minmax(0, 1fr) 38%; grid-template-rows: auto auto; column-gap: 12px; }
  .nbkp-trend > .nbkp-row:first-child { grid-column: 1; grid-row: 1; flex-wrap: wrap; justify-content: flex-start; gap: 0 8px; }
  .nbkp-trend > .nbkp-sub { align-self: start; }
  .nbkp-trend > .nbkp-sub { grid-column: 1; grid-row: 2; }
  .nbkp-trend > .nbkp-spark { grid-column: 2; grid-row: 1 / 3; height: 40px; margin: 0; align-self: center; }
  .nbkp-trend > .nbkp-ax { display: none; }
  .nbkp-trend .nbkp-read { display: none; }
  .nbkp-bottom { grid-template-columns: minmax(0, 1fr); }
}
