/* Egen kod, idé från affectUI Task Board (Pro), ingen kod tagen */
.nbtb-root {
  --nbtb-k: 0, 0, 0;
  --nbtb-card: #ffffff;
  --nbtb-soft: #FAFAF8;
  --nbtb-strong: #000000;
  --nbtb-ink: rgba(0, 0, 0, 0.88);
  --nbtb-text: rgba(0, 0, 0, 0.61);
      --nbtb-line: rgba(0, 0, 0, 0.06);
  --nbtb-wash: rgba(0, 0, 0, 0.03);
  --nbtb-tray: #F2F1EE;
  --nbtb-ember: #D9601C;
  --nbtb-ember-ink: #A8460F;
  --nbtb-ember-tint: rgba(217, 96, 28, 0.10);
  --nbtb-ok: #1E7A4C;
  --nbtb-ok-tint: rgba(30, 122, 76, 0.10);
  --nbtb-wait: #8A5200;
  --nbtb-wait-tint: rgba(178, 106, 0, 0.10);
  --nbtb-bad: #B3261E;
  --nbtb-solid: rgba(0, 0, 0, 0.88);
  --nbtb-on-solid: #fcfcfc;
  --nbtb-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(--nbtb-k), 0.05);
  --nbtb-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(--nbtb-k), 0.07);
  --nbtb-focus: rgba(217, 96, 28, 0.4);
  --nbtb-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(--nbtb-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"]) .nbtb-root {
  --nbtb-k: 255, 255, 255;
  --nbtb-card: #1C1B1A;
  --nbtb-soft: #201F1E;
  --nbtb-strong: rgba(255, 255, 255, 0.94);
  --nbtb-ink: rgba(255, 255, 255, 0.9);
  --nbtb-text: rgba(255, 255, 255, 0.64);
      --nbtb-line: rgba(255, 255, 255, 0.08);
  --nbtb-wash: rgba(255, 255, 255, 0.04);
  --nbtb-tray: #161615;
  --nbtb-ember: #D9601C;
  --nbtb-ember-ink: #F08A4B;
  --nbtb-ember-tint: rgba(240, 138, 75, 0.14);
  --nbtb-ok: #3EC27A;
  --nbtb-ok-tint: rgba(62, 194, 122, 0.13);
  --nbtb-wait: #F0B232;
  --nbtb-wait-tint: rgba(240, 178, 50, 0.13);
  --nbtb-bad: #F07A6E;
  --nbtb-solid: rgba(255, 255, 255, 0.9);
  --nbtb-on-solid: #161615;
  --nbtb-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.4);
  --nbtb-shadow-hover: 0 0 0 0.5px rgba(255, 255, 255, 0.16), 0 1px 3px rgba(0, 0, 0, 0.5);
  --nbtb-focus: rgba(240, 138, 75, 0.55);
  color-scheme: dark;
}
.nbtb-root *, .nbtb-root *::before, .nbtb-root *::after { box-sizing: border-box; }
.nbtb-root [hidden] { display: none !important; }
:where(.nbtb-root) button { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.nbtb-root) input, :where(.nbtb-root) textarea { font: inherit; color: inherit; margin: 0; }
:where(.nbtb-root) svg { display: block; flex: none; }
:where(.nbtb-root) h2, :where(.nbtb-root) h3, :where(.nbtb-root) h4, :where(.nbtb-root) p, :where(.nbtb-root) ul, :where(.nbtb-root) ol, :where(.nbtb-root) dl, :where(.nbtb-root) dd, :where(.nbtb-root) fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
:where(.nbtb-root) ul, :where(.nbtb-root) ol { list-style: none; }
.nbtb-root button:focus-visible, .nbtb-root input:focus-visible, .nbtb-root textarea:focus-visible, .nbtb-root [tabindex]:focus-visible { outline: 2px solid var(--nbtb-focus); outline-offset: 1px; }
.nbtb-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; }

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

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

.nbtb-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(--nbtb-k), 0.05); color: var(--nbtb-text);
}
.nbtb-pill[data-tone="ok"] { background: var(--nbtb-ok-tint); color: var(--nbtb-ok); }
.nbtb-pill[data-tone="ember"] { background: var(--nbtb-ember-tint); color: var(--nbtb-ember-ink); }
.nbtb-pill[data-tone="wait"] { background: var(--nbtb-wait-tint); color: var(--nbtb-wait); }
@media (prefers-reduced-motion: reduce) {
  .nbtb-root *, .nbtb-root *::before, .nbtb-root *::after { transition: none !important; animation: none !important; }
}

/* Uppgiftstavla: fyra kolumner med kort som går att flytta */
.nbtb-root { padding: 0; border-radius: 12px; background: var(--nbtb-card); box-shadow: var(--nbtb-shadow); overflow: hidden; }
.nbtb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding: 0 14px; border-bottom: 0.5px solid var(--nbtb-line); }
.nbtb-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--grey); white-space: nowrap; }
.nbtb-crumbs svg { width: 14px; height: 14px; fill: none; stroke: var(--nbtb-ember); stroke-width: 2; stroke-linecap: round; }
.nbtb-crumbs strong { font-weight: 500; color: var(--nbtb-strong); }
.nbtb-count { font-size: 12px; color: var(--grey); white-space: nowrap; }

.nbtb-tools { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 0.5px solid var(--nbtb-line); }
.nbtb-search { display: flex; align-items: center; gap: 6px; width: 150px; height: 28px; padding: 0 8px; border-radius: 6px; background: var(--nbtb-wash); color: var(--grey); flex: none; }
.nbtb-search svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nbtb-search:focus-within { box-shadow: 0 0 0 2px var(--nbtb-focus); }
.nbtb-q { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--nbtb-ink); }
.nbtb-q::placeholder { color: var(--grey); }
.nbtb-q::-webkit-search-cancel-button { display: none; }
.nbtb-filters { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nbtb-filters::-webkit-scrollbar { display: none; }
.nbtb-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--nbtb-text); white-space: nowrap; box-shadow: var(--nbtb-shadow); transition: background-color 140ms ease, color 140ms ease; }
.nbtb-chip[aria-pressed="true"] { background: var(--nbtb-solid); color: var(--nbtb-on-solid); box-shadow: none; }
.nbtb-root i[data-l] { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.nbtb-root i[data-l="Ekonomi"] { background: var(--nbtb-ember); }
.nbtb-root i[data-l="Bokning"] { background: var(--nbtb-ok); }
.nbtb-root i[data-l="Sajt"] { background: rgba(var(--nbtb-k), 0.55); }
.nbtb-chip[aria-pressed="true"] i[data-l="Sajt"] { background: var(--nbtb-card); }
.nbtb-compact { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 6px; color: var(--nbtb-text); box-shadow: var(--nbtb-shadow); }
.nbtb-compact svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nbtb-compact[aria-pressed="true"] { background: var(--nbtb-solid); color: var(--nbtb-on-solid); box-shadow: none; }

.nbtb-board { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 8px; padding: 10px; background: var(--nbtb-soft); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 10px; min-height: 340px; }
.nbtb-col { display: flex; flex-direction: column; min-width: 0; border-radius: 10px; background: rgba(var(--nbtb-k), 0.03); scroll-snap-align: start; transition: background-color 160ms ease, box-shadow 160ms ease; }
.nbtb-col[data-over] { background: var(--nbtb-ember-tint); box-shadow: inset 0 0 0 1px rgba(217, 96, 28, 0.35); }
.nbtb-root[data-picking] .nbtb-col-h { cursor: pointer; }
.nbtb-root[data-picking] .nbtb-col:not([data-from]) .nbtb-col-name { color: var(--nbtb-ember-ink); }
.nbtb-col-h { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 10px; }
.nbtb-col-name { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-weight: 500; color: var(--nbtb-strong); text-align: left; border-radius: 4px; white-space: nowrap; }
.nbtb-col-name svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--grey); }
.nbtb-col[data-col="done"] .nbtb-col-name svg { color: var(--nbtb-ok); }
.nbtb-col[data-col="doing"] .nbtb-col-name svg { color: var(--nbtb-ember); }
.nbtb-col-n { font-size: 12px; font-weight: 400; color: var(--grey); }
.nbtb-plus { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--grey); }
.nbtb-plus:hover { background: rgba(var(--nbtb-k), 0.05); color: var(--nbtb-ink); }
.nbtb-plus svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nbtb-list { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 0 6px 6px; min-height: 40px; }

.nbtb-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 9px 10px; border-radius: 8px; background: var(--nbtb-card); box-shadow: var(--nbtb-shadow); cursor: grab; user-select: none; -webkit-user-select: none; transition: box-shadow 140ms ease, opacity 140ms ease, transform 200ms var(--nbtb-ease); }
.nbtb-card:hover { box-shadow: var(--nbtb-shadow-hover); }
.nbtb-card:focus { outline: none; }
.nbtb-card:focus-visible { box-shadow: 0 0 0 2px var(--nbtb-focus); }
.nbtb-card[aria-pressed="true"] { box-shadow: 0 0 0 1.5px var(--nbtb-ember), 0 4px 10px -4px rgba(217, 96, 28, 0.3); }
.nbtb-card[data-dragging] { opacity: 0.35; }
.nbtb-card[data-new] { animation: nbtb-in 320ms var(--nbtb-ease); }
.nbtb-ghost { position: absolute; left: 0; top: 0; z-index: 50; pointer-events: none; width: 170px; transform: rotate(2deg); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.25), var(--nbtb-shadow); cursor: grabbing; }
.nbtb-id { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--grey); }
.nbtb-av { color: var(--nbtb-text); font-family: var(--sans); font-size: 12px; font-weight: 500; line-height: 1; }
.nbtb-title { font-weight: 500; color: var(--nbtb-strong); overflow-wrap: anywhere; }
.nbtb-col[data-col="done"] .nbtb-title { color: var(--grey); text-decoration: line-through; text-decoration-color: rgba(var(--nbtb-k), 0.25); }
.nbtb-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.nbtb-tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 6px; border-radius: 5px; box-shadow: inset 0 0 0 0.5px rgba(var(--nbtb-k), 0.1); font-size: 12px; line-height: 16px; color: var(--nbtb-text); white-space: nowrap; }
.nbtb-tag[data-late] { background: var(--nbtb-ember-tint); box-shadow: none; color: var(--nbtb-ember-ink); font-weight: 500; }
.nbtb-root[data-compact] .nbtb-meta, .nbtb-root[data-compact] .nbtb-id { display: none; }
.nbtb-root[data-compact] .nbtb-card { padding: 7px 10px; }
.nbtb-root[data-compact] .nbtb-title { font-weight: 400; color: var(--nbtb-ink); }

.nbtb-add { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: var(--nbtb-card); box-shadow: 0 0 0 1.5px rgba(217, 96, 28, 0.45); }
.nbtb-add[hidden] { display: none; }
.nbtb-add-in { width: 100%; border: 0; background: none; outline: none; padding: 2px; }
.nbtb-add-in::placeholder { color: var(--grey); }
.nbtb-add-row { display: flex; justify-content: flex-end; gap: 4px; }
.nbtb-add-row .nbtb-btn { min-height: 24px; padding: 2px 8px; font-size: 12px; }
.nbtb-empty-col { padding: 14px 6px; text-align: center; font-size: 12px; color: var(--grey); }

.nbtb-root[data-drag] { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.nbtb-hint { padding: 8px 14px 10px; font-size: 12px; line-height: 16px; color: var(--grey); border-top: 0.5px solid var(--nbtb-line); }

@keyframes nbtb-in { from { opacity: 0; transform: translateY(-4px); } }

@container (max-width: 600px) {
  .nbtb-board { grid-template-columns: repeat(4, 78%); }
  .nbtb-tools { flex-wrap: wrap; }
  .nbtb-search { flex: 1; width: auto; }
  .nbtb-filters { order: 3; flex-basis: 100%; }
}
