/* Egen kod. CRM som webbapp i en enkel webbläsarram. Flödet (objekt i sidomeny, vyer, tavla, postsida som sidopanel, kommandomeny) följer det öppna CRM vi levererar; ingen kod, CSS, ikon eller markup därifrån.
   Ingen webbläsarram: appen fyller bredden och går ut över underkanten, tavlan visar tre kolumner och resten går ut över högerkanten. Arbetsytan som ordmärke, ingen ikon i ruta.
   Referenser: reui Data Grid och tremor (tabell med högerställda belopp, klistrad rubrik och summeringsrad), react-aria Table (aria-sort, tangentbord), cmdk (kommandomeny med grupper),
   beautifului Filter Table (filterchips med kryss, tomt läge), number-flow (siffran glider bara när användaren ändrar), interfaces.rauno.me (tabular-nums, fokusring, rörelse under 200 ms). */
.wc {
  --wc-bg: #FFFFFF;
  --wc-chrome: #ECEBE7;
  --wc-side: #FAFAF8;
  --wc-col: #F6F5F2;
  --wc-ink: #17171A;
  --wc-ink2: #3A3A3C;
  --wc-mute: #6A6966;
  --wc-line: #ECEBE7;
  --wc-line2: #DEDDD8;
  --wc-hover: #F4F3F0;
  --wc-chip: #F1F0EC;
  --wc-sel: rgba(36, 86, 150, 0.07);
  --wc-ember: #245696;
  --wc-ember-t: #245696;
  --wc-ember-tint: rgba(36, 86, 150, 0.09);
  --wc-ok: #1E7A4C;
  --wc-ok-tint: rgba(30, 122, 76, 0.1);
  --wc-wait: #8A5300;
  --wc-wait-tint: rgba(178, 106, 0, 0.11);
  --wc-solid: #17171A;
  --wc-solid-h: #303032;
  --wc-on-solid: #FFFFFF;
  --wc-av: #E9E8E4;
  --wc-shadow: 0 0 0 1px rgba(23, 23, 26, 0.07), 0 1px 1px rgba(23, 23, 26, 0.03), 0 24px 56px -28px rgba(23, 23, 26, 0.22);
  --wc-pop: 0 0 0 1px rgba(23, 23, 26, 0.08), 0 10px 30px -10px rgba(23, 23, 26, 0.22);
  --wc-card-sh: 0 1px 2px rgba(23, 23, 26, 0.05);
  --wc-focus: rgba(36, 86, 150, 0.6);
  --wc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-sizing: border-box;
  container-type: inline-size;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.005em;
  color: var(--wc-ink);
  text-align: left;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
:where(.dark, [data-theme="dark"]) .wc {
  --wc-bg: #121211;
  --wc-chrome: #0A0A09;
  --wc-side: #151514;
  --wc-col: #181817;
  --wc-ink: #F2F1EE;
  --wc-ink2: rgba(242, 241, 238, 0.82);
  --wc-mute: rgba(242, 241, 238, 0.62);
  --wc-line: rgba(255, 255, 255, 0.075);
  --wc-line2: rgba(255, 255, 255, 0.13);
  --wc-hover: rgba(255, 255, 255, 0.045);
  --wc-chip: rgba(255, 255, 255, 0.07);
  --wc-sel: rgba(141, 177, 234, 0.09);
  --wc-ember: #8DB1EA;
  --wc-ember-t: #9DBDEF;
  --wc-ember-tint: rgba(141, 177, 234, 0.12);
  --wc-ok: #3EC27A;
  --wc-ok-tint: rgba(62, 194, 122, 0.12);
  --wc-wait: #E5A954;
  --wc-wait-tint: rgba(229, 169, 84, 0.12);
  --wc-solid: #F2F1EE;
  --wc-solid-h: #FFFFFF;
  --wc-on-solid: #121211;
  --wc-av: rgba(255, 255, 255, 0.1);
  --wc-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 24px 56px -28px rgba(0, 0, 0, 0.8);
  --wc-pop: 0 0 0 1px rgba(255, 255, 255, 0.11), 0 12px 32px -10px rgba(0, 0, 0, 0.7);
  --wc-card-sh: 0 1px 2px rgba(0, 0, 0, 0.3);
  --wc-focus: rgba(141, 177, 234, 0.7);
}
:where(.wc) *, :where(.wc) *::before, :where(.wc) *::after { box-sizing: border-box; }
:where(.wc) :where(button, input, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.wc) :where(button) { background: none; border: 0; margin: 0; padding: 0; cursor: pointer; text-align: inherit; }
:where(.wc) :where(:focus) { outline: none; }
.wc :focus-visible { outline: 2px solid var(--wc-focus); outline-offset: 2px; }
.wc [hidden] { display: none !important; }
:where(.wc) :where(p, h3, h4, dl, dd, ul, ol, fieldset) { margin: 0; padding: 0; }
:where(.wc) :where(ul, ol) { list-style: none; }
.wc-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wc-i--fill { fill: var(--wc-ember); stroke: var(--wc-ember); }
.wc-sr, .wc-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wc-ell { display: block; min-width: 0; overflow-wrap: break-word; }
.wc-mute { color: var(--wc-mute); }
.wc-kbd { font-family: var(--sans); font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 5px; color: var(--wc-mute); background: var(--wc-bg); box-shadow: inset 0 0 0 1px var(--wc-line2); }

/* Webbläsarram: flikrad och adressrad, inga riktiga märken */
.wc { overflow: hidden; height: 560px; }
.wc-br { border-radius: 14px 14px 0 0; overflow: hidden; background: var(--wc-bg); box-shadow: var(--wc-shadow); }
.wc-chrome { padding: 8px 10px 0; }
.wc-tabs { display: flex; height: 34px; }
.wc-tab { display: flex; align-items: center; gap: 8px; width: 248px; max-width: 60%; padding: 0 14px; border-radius: 10px 10px 0 0; background: var(--wc-bg); font-size: 13px; }
.wc-fav { width: 18px; height: 18px; border-radius: 5px; flex: none; display: grid; place-items: center; background: var(--wc-ember); color: var(--wc-bg); }
.wc-fav svg, .wc-ws-m svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.wc-tab-t { font-weight: 500; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-tab-s { color: var(--wc-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-addr { display: flex; align-items: center; gap: 14px; margin: 0 -10px; padding: 7px 14px 8px; background: var(--wc-bg); }
.wc-nav-g { display: flex; gap: 6px; color: var(--wc-mute); }
.wc-nav-g svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wc-nav-g svg:nth-child(2) { opacity: 0.5; }
.wc-url { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--wc-chip); font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; }
.wc-url svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--wc-mute); stroke-width: 1.5; }
.wc-url-p { color: var(--wc-mute); overflow: hidden; text-overflow: ellipsis; }

/* Appen */
.wc-app { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); height: 620px; background: var(--wc-bg); overflow: hidden; }

/* Sidomeny */
.wc-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 12px 12px; background: var(--wc-side); border-right: 1px solid var(--wc-line); }
.wc-ws { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; min-width: 0; }
.wc-ws-m { width: 24px; height: 24px; border-radius: 6px; flex: none; display: grid; place-items: center; background: var(--wc-ember); color: var(--wc-bg); }
.wc-ws-n { font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 24px; font-weight: 400; letter-spacing: -0.01em; white-space: nowrap; color: var(--wc-ember-t); }
.wc-ws-n i { font-style: italic; }
.wc-find { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 10px; margin-bottom: 14px; border-radius: 9px; background: var(--wc-bg); box-shadow: inset 0 0 0 1px var(--wc-line2); color: var(--wc-mute); transition: box-shadow 0.12s var(--wc-ease); }
.wc-find:hover { box-shadow: inset 0 0 0 1px var(--wc-mute); }
.wc-find svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.wc-find span { flex: 1; }
.wc-objs { display: flex; flex-direction: column; gap: 2px; }
.wc-obj, .wc-fav-i { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--wc-ink2); min-width: 0; }
.wc-obj .wc-i, .wc-fav-i .wc-i { color: var(--wc-mute); }
.wc-obj:hover, .wc-fav-i:hover { background: var(--wc-hover); }
.wc-obj[aria-current], .wc-fav-i[aria-current] { background: var(--wc-bg); color: var(--wc-ink); font-weight: 500; box-shadow: 0 0 0 1px var(--wc-line), var(--wc-card-sh); }
.wc-obj[aria-current] .wc-i { color: var(--wc-ember); }
.wc-obj-l { flex: 1; }
.wc-obj-n { color: var(--wc-mute); font-size: 13px; font-weight: 400; }
.wc-favs { margin-top: 18px; min-width: 0; }
.wc-side-h { display: block; padding: 0 10px 6px; font-size: 13px; color: var(--wc-mute); }
.wc-fav-l { display: flex; flex-direction: column; gap: 2px; }
.wc-fav-e { padding: 4px 10px; font-size: 13px; color: var(--wc-mute); }
.wc-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--wc-line); min-width: 0; }
.wc-me > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.wc-me b { font-weight: 500; }
.wc-me > span:last-child span { font-size: 13px; color: var(--wc-mute); }

/* Huvudyta */
.wc-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 28px 14px; }
.wc-h { display: flex; align-items: baseline; gap: 10px; font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: -0.02em; }
.wc-h-n { font-size: 15px; font-weight: 400; color: var(--wc-mute); letter-spacing: 0; }
.wc-head-a { display: flex; align-items: center; gap: 8px; }
.wc-ib { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--wc-mute); transition: background-color 0.12s var(--wc-ease), color 0.12s var(--wc-ease); }
.wc-ib:hover { background: var(--wc-hover); color: var(--wc-ink); }
.wc-ib svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wc-ib .wc-i--fill { fill: var(--wc-ember); stroke: var(--wc-ember); }
.wc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px 0 11px; border-radius: 8px; background: var(--wc-solid); color: var(--wc-on-solid); font-weight: 500; white-space: nowrap; transition: background-color 0.12s var(--wc-ease); }
.wc-btn:hover { background: var(--wc-solid-h); }
.wc-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wc-btn--sm { height: 30px; padding: 0 12px; font-size: 13px; }
.wc-btn--ghost { background: transparent; color: var(--wc-ink); box-shadow: inset 0 0 0 1px var(--wc-line2); }
.wc-btn--ghost:hover { background: var(--wc-hover); }

/* Vyer och verktyg */
.wc-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--wc-line); }
.wc-views { display: flex; gap: 22px; min-width: 0; }
.wc-view { position: relative; display: flex; align-items: center; gap: 7px; height: 40px; color: var(--wc-mute); white-space: nowrap; }
.wc-view:hover { color: var(--wc-ink); }
.wc-view[aria-selected="true"] { color: var(--wc-ink); font-weight: 500; }
.wc-view[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--wc-ink); }
.wc-view-n { font-size: 13px; font-weight: 400; color: var(--wc-mute); }
.wc-tools { display: flex; gap: 4px; padding-bottom: 5px; }
.wc-pop-w { position: relative; }
.wc-tb { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--wc-mute); }
.wc-tb:hover, .wc-tb[aria-expanded="true"] { background: var(--wc-hover); color: var(--wc-ink); }
.wc-tb.is-on { color: var(--wc-ember-t); }
.wc-tb svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 28px; border-bottom: 1px solid var(--wc-line); }
.wc-fchip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--wc-ember-tint); color: var(--wc-ember-t); font-size: 13px; font-weight: 500; max-width: 100%; }
.wc-fchip button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.wc-fchip button:hover { background: var(--wc-ember-tint); }
.wc-fchip .wc-i { width: 14px; height: 14px; }
.wc-clear { font-size: 13px; color: var(--wc-mute); padding: 4px 6px; border-radius: 6px; }
.wc-clear:hover { color: var(--wc-ink); }

/* Popover och meny */
.wc-pop, .wc-float { position: absolute; z-index: 15; background: var(--wc-bg); border-radius: 12px; box-shadow: var(--wc-pop); }
.wc-pop { right: 0; top: 36px; }
.wc-filter-p { width: 320px; max-height: 452px; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.wc-fq { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--wc-mute); }
.wc-fq input { height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--wc-line2); background: var(--wc-bg); color: var(--wc-ink); font-size: 15px; }
.wc-fq input:focus-visible { outline: none; border-color: var(--wc-ember); box-shadow: 0 0 0 3px var(--wc-ember-tint); }
.wc-filter-p fieldset { border: 0; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.wc-filter-p .wc-fs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4px; }
.wc-filter-p legend { grid-column: 1 / -1; }
.wc-fo .wc-av { width: 22px; height: 22px; }
.wc-filter-p legend { padding: 0 0 4px; font-size: 13px; color: var(--wc-mute); }
.wc-fo { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px 0 4px; border-radius: 7px; cursor: pointer; font-size: 15px; }
.wc-fo:hover { background: var(--wc-hover); }
.wc-fo input { width: 16px; height: 16px; margin: 0; accent-color: var(--wc-ember); }

.wc-sort-p, .wc-float { min-width: 210px; padding: 5px; display: flex; flex-direction: column; }
.wc-sort-p button, .wc-float button { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding: 0 10px; border-radius: 7px; white-space: nowrap; }
.wc-sort-p button:hover, .wc-float button:hover, .wc-float button:focus-visible, .wc-sort-p button:focus-visible { background: var(--wc-hover); outline-offset: -2px; }
.wc-sort-p [aria-checked="true"] { font-weight: 500; }
.wc-sd { font-size: 13px; color: var(--wc-ember-t); font-weight: 400; }
.wc-tick { color: var(--wc-ember); }
.wc-float .wc-own-n, .wc-fo .wc-own-n { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; }
.wc-float button > .wc-av + .wc-own-n { margin-right: auto; margin-left: -6px; }

/* Etikett för steg: en liten tårta som fylls per steg */
.wc-chip { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--wc-chip); font-size: 13px; font-weight: 500; color: var(--wc-ink); white-space: nowrap; }
.wc-pie { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--wc-ember); background: conic-gradient(var(--wc-ember) 0 var(--p), transparent var(--p) 100%); }
.wc-pie--0 { --p: 0%; box-shadow: inset 0 0 0 1.5px var(--wc-mute); }
.wc-pie--1 { --p: 25%; }
.wc-pie--2 { --p: 50%; }
.wc-pie--3 { --p: 75%; }
.wc-pie--4 { --p: 100%; box-shadow: none; background: var(--wc-ok); }

.wc-av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; background: var(--wc-av); color: var(--wc-ink2); font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0.01em; }
.wc-av--me { background: var(--wc-ember-tint); color: var(--wc-ember-t); }

/* Tabell */
.wc-body { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.wc-tw { min-width: 0; }
.wc-t { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.wc-t th, .wc-t td { padding: 0 12px; border-bottom: 1px solid var(--wc-line); vertical-align: middle; text-align: left; }
.wc-t th:first-child, .wc-t td:first-child { padding-left: 28px; }
.wc-t th:last-child, .wc-t td:last-child { padding-right: 20px; }
.wc-t thead th { position: sticky; top: 0; z-index: 2; height: 40px; background: var(--wc-bg); font-weight: 400; font-size: 13px; color: var(--wc-mute); white-space: nowrap; }
.wc-t th button { display: inline-flex; align-items: center; gap: 4px; height: 28px; margin-left: -6px; padding: 0 6px; border-radius: 6px; max-width: calc(100% + 12px); }
.wc-t th button:hover { background: var(--wc-hover); color: var(--wc-ink); }
.wc-t th button.is-on { color: var(--wc-ink); font-weight: 500; }
.wc-t th.wc-num { text-align: right; }
.wc-t th.wc-num button { margin-left: 0; margin-right: -6px; }
.wc-sorti { width: 14px; height: 14px; }
.wc-sorti--off { opacity: 0; }
.wc-t th button:hover .wc-sorti--off { opacity: 0.6; }
.wc-t tbody td { height: 50px; }
.wc-t tbody tr:hover td { background: var(--wc-hover); }
.wc-t tbody tr.is-open td { background: var(--wc-sel); }
.wc-t td.wc-num { text-align: right; }
.wc-t--affarer .wc-c-a { width: 130px; }
.wc-t--affarer .wc-c-s { width: 146px; }
.wc-t--affarer .wc-c-o { width: 58px; }
.wc-t--affarer .wc-c-c { width: 19%; }
.wc-t--affarer .wc-c-w { width: 142px; }
.wc-t--personer .wc-c-n { width: 24%; }
.wc-t--personer .wc-c-c { width: 28%; }
.wc-t--personer .wc-c-r { width: 17%; }
.wc-t--personer .wc-c-m { width: 21%; }
.wc-t--personer .wc-c-o { width: 10%; }
.wc-t--foretag .wc-c-n { width: 38%; }
.wc-t--foretag .wc-c-r { width: 16%; }
.wc-t--foretag .wc-c-k { width: 12%; }
.wc-t--foretag .wc-c-a { width: 20%; }
.wc-t--foretag .wc-c-o { width: 14%; }
.wc-open { display: block; max-width: 100%; font-weight: 500; color: var(--wc-ink); border-radius: 4px; }
.wc-open:hover { color: var(--wc-ember-t); }
.wc-cell { display: inline-flex; align-items: center; max-width: calc(100% + 12px); height: 32px; margin: 0 -6px; padding: 0 6px; border-radius: 7px; transition: box-shadow 0.12s var(--wc-ease); }
.wc-cell:hover { box-shadow: inset 0 0 0 1px var(--wc-line2); background: var(--wc-bg); }
.wc-amt { font-weight: 500; }
.wc-cell-in { width: calc(100% + 12px); height: 32px; margin: 0 -6px; padding: 0 6px; border-radius: 7px; border: 0; background: var(--wc-bg); box-shadow: inset 0 0 0 1.5px var(--wc-ember), 0 0 0 3px var(--wc-ember-tint); text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.wc-cell-in:focus-visible { outline: none; }
.wc-c-o { white-space: nowrap; }
.wc-when { color: var(--wc-mute); white-space: nowrap; }
.wc-pn { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.wc-ini { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--wc-av); font-size: 12px; font-weight: 600; color: var(--wc-ink2); }
.wc-ini--sq { border-radius: 7px; }
.wc-t tfoot td { position: sticky; bottom: 0; z-index: 2; height: 46px; background: var(--wc-bg); border-top: 1px solid var(--wc-line2); border-bottom: 0; white-space: nowrap; }
.wc-ft-l { color: var(--wc-mute); font-size: 13px; }
.wc-t tfoot b { font-weight: 600; display: inline-block; }
.wc-ft-avg { margin-left: 18px; }
.wc-ft-n { display: flex; justify-content: space-between; gap: 8px; }
.wc-won { color: var(--wc-ok); }

/* Tomt läge */
.wc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; min-height: 260px; padding: 40px 24px; text-align: center; }
.wc-empty svg { width: 64px; height: 48px; fill: none; stroke: var(--wc-line2); stroke-width: 1.5; stroke-linecap: round; }
.wc-empty p { display: flex; flex-direction: column; gap: 4px; max-width: 300px; }
.wc-empty b { font-weight: 600; font-size: 15px; }
.wc-empty span { color: var(--wc-mute); }

/* Tavla */
.wc-board { display: grid; grid-auto-flow: column; grid-auto-columns: 262px; gap: 8px; height: 100%; padding: 12px; overflow-x: auto; overscroll-behavior-x: contain; }
.wc-col { display: flex; flex-direction: column; min-height: 0; padding: 6px; border-radius: 12px; background: var(--wc-col); transition: box-shadow 0.12s var(--wc-ease), background-color 0.12s var(--wc-ease); }
.wc-col.is-over { background: var(--wc-ember-tint); box-shadow: inset 0 0 0 1.5px var(--wc-ember); }
.wc-col-h { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 10px; white-space: nowrap; min-width: 0; }
.wc-col-t { display: flex; align-items: center; gap: 7px; min-width: 0; }
.wc-col-h b { font-weight: 600; font-size: 13px; }
.wc-col-n { font-size: 13px; color: var(--wc-mute); }
.wc-col-s { display: none !important; align-self: flex-start; padding-left: 18px; font-size: 13px; font-weight: 500; color: var(--wc-mute); display: inline-block; }
.wc-col-l { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow-y: auto; padding: 1px; }
.wc-card { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px; border-radius: 10px; background: var(--wc-bg); box-shadow: 0 0 0 1px var(--wc-line), var(--wc-card-sh); cursor: grab; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; transition: box-shadow 0.12s var(--wc-ease), opacity 0.12s var(--wc-ease); }
.wc-card:hover { box-shadow: 0 0 0 1px var(--wc-line2), var(--wc-card-sh); }
.wc-card.is-open { box-shadow: 0 0 0 1.5px var(--wc-ember); }
.wc-card.is-armed { box-shadow: 0 0 0 1.5px var(--wc-ember), 0 8px 18px -8px rgba(0, 0, 0, 0.3); }
.wc-card.is-src { opacity: 0.35; }
.wc-card-n { font-size: 13px; line-height: 18px; font-weight: 600; overflow-wrap: break-word; text-wrap: balance; }
.wc-card-c { font-size: 13px; color: var(--wc-mute); }
.wc-card-f { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 8px; }
.wc-card-f b { font-weight: 500; white-space: nowrap; }
.wc-card-f .wc-av { margin-left: auto; }
.wc-card-f .wc-av { width: 22px; height: 22px; }
.wc-card-q { align-self: flex-start; margin-top: 6px; font-size: 12px; line-height: 18px; padding: 0 8px; border-radius: 999px; background: var(--wc-wait-tint); color: var(--wc-wait); font-weight: 500; }
.wc-col-e { display: grid; place-items: center; min-height: 92px; padding: 12px; border-radius: 10px; border: 1.5px dashed var(--wc-line2); color: var(--wc-mute); font-size: 13px; text-align: center; }
.wc-ghost { position: absolute; z-index: 30; margin: 0; pointer-events: none; cursor: grabbing; box-shadow: 0 0 0 1px var(--wc-line2), 0 18px 36px -12px rgba(0, 0, 0, 0.35); }
.wc.is-dragging, .wc.is-dragging * { cursor: grabbing; }

/* Uppgifter */
.wc-tasks { padding: 6px 28px 24px; }
.wc-tg { margin: 18px 0 4px; font-size: 13px; font-weight: 500; color: var(--wc-mute); }
.wc-tg span { font-weight: 400; margin-left: 4px; }
.wc-task { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px) 84px 26px; align-items: center; gap: 16px; min-height: 50px; border-bottom: 1px solid var(--wc-line); }
.wc-chk { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.wc-chk input { position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin: -9px 0 0; opacity: 0; cursor: pointer; }
.wc-chk-b { width: 18px; height: 18px; border-radius: 5px; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--wc-mute); color: transparent; transition: background-color 0.12s var(--wc-ease); }
.wc-chk-b .wc-i { width: 13px; height: 13px; stroke-width: 2; }
.wc-chk input:checked + .wc-chk-b { background: var(--wc-solid); box-shadow: none; color: var(--wc-on-solid); }
.wc-chk input:focus-visible + .wc-chk-b { outline: 2px solid var(--wc-focus); outline-offset: 2px; }
.wc-task-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-done .wc-task-t { color: var(--wc-mute); text-decoration: line-through; }
.wc-task-d { min-width: 0; font-size: 13px; color: var(--wc-mute); border-radius: 4px; }
.wc-task-d:hover { color: var(--wc-ember-t); }
.wc-task-due { font-size: 13px; color: var(--wc-mute); white-space: nowrap; }
.wc-task-due.is-due { color: var(--wc-ember-t); font-weight: 500; }

/* Sidopanel med postsidan */
.wc-panel { position: absolute; z-index: 10; top: 0; right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column; background: var(--wc-bg); border-left: 1px solid var(--wc-line); box-shadow: -24px 0 48px -32px rgba(0, 0, 0, 0.35); }
.wc-panel.wc-in { animation: wc-in 0.18s var(--wc-ease); }
@keyframes wc-in { from { opacity: 0; transform: translateX(14px); } }
.wc-p-top { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 14px 0 24px; border-bottom: 1px solid var(--wc-line); flex: none; }
.wc-p-kind { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wc-mute); }
.wc-p-act { display: flex; gap: 2px; }
.wc-p-sc { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 28px; }
.wc-p-title { font-size: 24px; line-height: 26px; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.wc-p-sub { margin-top: 2px; color: var(--wc-mute); overflow-wrap: anywhere; }
.wc-p-f { margin-top: 18px; display: flex; flex-direction: column; }
.wc-p-f > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 38px; }
.wc-p-f dt { font-size: 13px; color: var(--wc-mute); }
.wc-p-f dt label { cursor: pointer; }
.wc-fi { width: calc(100% + 16px); height: 32px; margin-left: -8px; padding: 0 8px; border-radius: 7px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px transparent; color: var(--wc-ink); transition: box-shadow 0.12s var(--wc-ease); }
.wc-fi:hover { box-shadow: inset 0 0 0 1px var(--wc-line2); }
.wc-fi:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--wc-ember), 0 0 0 3px var(--wc-ember-tint); }
.wc-fi--num { font-weight: 500; }
.wc-fb { display: inline-flex; align-items: center; min-height: 32px; margin-left: -8px; padding: 0 8px; border-radius: 7px; }
.wc-fb:hover { box-shadow: inset 0 0 0 1px var(--wc-line2); }
.wc-fb-o { display: inline-flex; align-items: center; gap: 8px; }
.wc-fb-o .wc-own-n, .wc-fo .wc-own-n { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; }
.wc-fv { padding: 0 0; overflow-wrap: anywhere; }

.wc-sg { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--wc-line2); }
.wc-sg-l { flex: 1 1 100%; display: flex; flex-direction: column; min-width: 0; }
.wc-sg-l b { font-weight: 500; }
.wc-sg-l span { font-size: 13px; color: var(--wc-mute); overflow-wrap: anywhere; }
.wc-sg-b { flex: 1 1 100%; height: 38px; white-space: normal; text-align: center; line-height: 18px; }
.wc-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.wc-pill .wc-i { width: 15px; height: 15px; }
.wc-pill--wait { background: var(--wc-wait-tint); color: var(--wc-wait); }
.wc-pill--ok { background: var(--wc-ok-tint); color: var(--wc-ok); }
.wc-link { font-size: 13px; color: var(--wc-mute); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wc-line2); border-radius: 4px; }
.wc-link:hover { color: var(--wc-ink); }

.wc-ag { margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--wc-ember-tint); }
.wc-ag-k { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--wc-ember-t); }
.wc-ag-k .wc-i { width: 15px; height: 15px; }
.wc-ag-t { margin-top: 6px; font-size: 15px; font-weight: 600; }
.wc-ag-w { margin-top: 3px; font-size: 13px; line-height: 19px; color: var(--wc-ink2); }
.wc-ag-a { display: flex; gap: 8px; margin-top: 12px; }
.wc-ag-a .wc-btn--ghost { box-shadow: inset 0 0 0 1px var(--wc-line2); background: var(--wc-bg); }
.wc-ag-done { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 2px; font-size: 13px; font-weight: 500; color: var(--wc-ok); }
.wc-ag-done--no { color: var(--wc-mute); }

.wc-ptabs { display: flex; gap: 18px; margin-top: 24px; border-bottom: 1px solid var(--wc-line); overflow-x: auto; scrollbar-width: none; }
.wc-ptabs::-webkit-scrollbar { display: none; }
.wc-ptabs button { position: relative; display: flex; align-items: center; gap: 5px; height: 38px; font-size: 13px; color: var(--wc-mute); white-space: nowrap; flex: none; }
.wc-ptabs button:hover { color: var(--wc-ink); }
.wc-ptabs [aria-selected="true"] { color: var(--wc-ink); font-weight: 500; }
.wc-ptabs [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--wc-ink); }
.wc-ptabs button span { font-weight: 400; color: var(--wc-mute); }
.wc-pp { padding-top: 14px; }
.wc-tl li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; }
.wc-tl li::before { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: var(--wc-line2); }
.wc-tl li:last-child::before { display: none; }
.wc-tl .wc-i { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--wc-chip); color: var(--wc-mute); }
.wc-tl li.is-new .wc-i { background: var(--wc-ember-tint); color: var(--wc-ember-t); }
.wc-tl p { display: flex; flex-direction: column; padding-top: 4px; min-width: 0; overflow-wrap: anywhere; }
.wc-tl small, .wc-nt small, .wc-mails small { font-size: 12px; line-height: 18px; color: var(--wc-mute); }
.wc-ptasks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--wc-line); }
.wc-pe { color: var(--wc-mute); padding: 4px 0 10px; }
.wc-add { margin-top: 10px; }
.wc-add input, .wc-note textarea { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--wc-line2); background: var(--wc-bg); color: var(--wc-ink); font-size: 15px; }
.wc-add input { height: 36px; }
.wc-note { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.wc-note textarea { resize: vertical; min-height: 72px; line-height: 20px; }
.wc-add input:focus-visible, .wc-note textarea:focus-visible { outline: none; border-color: var(--wc-ember); box-shadow: 0 0 0 3px var(--wc-ember-tint); }
.wc-nt { padding: 10px 0; border-top: 1px solid var(--wc-line); overflow-wrap: anywhere; }
.wc-nt p { white-space: pre-wrap; }
.wc-mails li { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--wc-line); }
.wc-mails p { display: flex; justify-content: space-between; gap: 10px; }
.wc-mails b { font-weight: 500; }
.wc-mails li > span { font-size: 13px; color: var(--wc-ink2); line-height: 19px; }

/* Kommandomeny */
.wc-cmd { position: absolute; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: flex-start; padding: 64px 16px 16px; background: rgba(23, 23, 26, 0.16); }
:where(.dark, [data-theme="dark"]) .wc-cmd { background: rgba(0, 0, 0, 0.5); }
.wc-cmd-box { width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--wc-bg); border-radius: 14px; box-shadow: var(--wc-pop), 0 30px 60px -20px rgba(0, 0, 0, 0.3); overflow: hidden; }
.wc-cmd-in-a .wc-cmd-box { animation: wc-pop 0.14s var(--wc-ease); }
.wc-cmd-in { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--wc-line); flex: none; }
.wc-cmd-in > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--wc-mute); stroke-width: 1.5; stroke-linecap: round; }
.wc-cmd-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 15px; color: var(--wc-ink); }
.wc-cmd-in input::placeholder { color: var(--wc-mute); }
.wc-cmd-in input:focus-visible { outline: none; }
.wc-cmd-l { overflow-y: auto; padding: 6px; max-height: 360px; }
.wc-cmd-g { padding: 10px 12px 4px; font-size: 12px; color: var(--wc-mute); }
.wc-cmd-o { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px; cursor: pointer; min-width: 0; }
.wc-cmd-o .wc-i { color: var(--wc-mute); }
.wc-cmd-o > span { flex: 0 1 auto; }
.wc-cmd-o small { flex: 1 1 0; font-size: 13px; color: var(--wc-mute); text-align: right; }
.wc-cmd-o[aria-selected="true"] { background: var(--wc-hover); }
.wc-cmd-o[aria-selected="true"] .wc-i { color: var(--wc-ember); }
.wc-cmd-e { padding: 28px 16px; text-align: center; color: var(--wc-mute); }

/* Rörelse bara efter klick */
.wc-pop-in { animation: wc-pop 0.12s var(--wc-ease); transform-origin: top right; }
.wc-float.wc-pop-in { transform-origin: top left; }
@keyframes wc-pop { from { opacity: 0; transform: scale(0.98) translateY(-3px); } }
.wc-roll { animation: wc-roll 0.18s var(--wc-ease); }
@keyframes wc-roll { from { opacity: 0.2; transform: translateY(45%); } }
.wc-card.is-landed { animation: wc-land 0.18s var(--wc-ease); }
@keyframes wc-land { from { box-shadow: 0 0 0 1.5px var(--wc-ember), 0 10px 24px -10px rgba(0, 0, 0, 0.3); } }
@media (prefers-reduced-motion: reduce) {
  .wc *, .wc *::before, .wc *::after { animation: none !important; transition: none !important; }
}

/* Smal skärm: kortlista, toppmeny, panel i full bredd */
@container (max-width: 759px) {
  .wc-chrome { padding: 0; }
  .wc-tabs, .wc-nav-g { display: none; }
  .wc-addr { margin: 0; padding: 8px 10px; background: var(--wc-chrome); }
  .wc-url { max-width: none; justify-content: center; background: var(--wc-bg); }
  .wc { height: 600px; }
  .wc-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 640px; }
  .wc-side { flex-direction: row; align-items: center; gap: 0; padding: 8px 8px; border-right: 0; border-bottom: 1px solid var(--wc-line); }
  .wc-ws, .wc-find, .wc-favs, .wc-me { display: none; }
  .wc-objs { flex-direction: row; flex: 1; gap: 2px; min-width: 0; }
  .wc-obj { flex: 1 1 0; justify-content: center; gap: 0; padding: 0 4px; height: 34px; font-size: 13px; min-width: 0; }
  .wc-obj .wc-i, .wc-obj-n { display: none; }
  .wc-obj-l { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wc-head { padding: 14px 16px 10px; }
  .wc-h { font-size: 18px; line-height: 24px; }
  .wc-bar { padding: 0 12px 0 16px; gap: 6px; }
  .wc-views { gap: 16px; }
  .wc-view .wc-i { display: none; }
  .wc-tb { padding: 0 7px; }
  .wc-tb span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wc-chips { padding: 8px 16px; }
  .wc-bar { position: relative; }
  .wc-pop-w { position: static; }
  .wc-pop { top: calc(100% + 4px); left: 12px; right: 12px; }
  .wc-filter-p { width: auto; max-height: 420px; }
  .wc-sort-p { left: auto; }

  .wc-t, .wc-t tbody, .wc-t tfoot { display: block; }
  .wc-t thead { display: none; }
  .wc-t tr { display: grid; }
  .wc-t td, .wc-t th { display: block; width: auto !important; height: auto !important; padding: 0 !important; border: 0; background: none !important; }
  .wc-t--affarer tbody tr { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "n n a" "c c c" "s o w"; align-items: center; gap: 2px 8px; padding: 12px 16px; border-bottom: 1px solid var(--wc-line); }
  .wc-t--affarer tbody tr.is-open { background: var(--wc-sel); }
  .wc-t--affarer .wc-c-n { grid-area: n; min-width: 0; }
  .wc-t--affarer .wc-c-a { grid-area: a; }
  .wc-t--affarer .wc-c-c { grid-area: c; color: var(--wc-mute); font-size: 13px; min-width: 0; }
  .wc-t--affarer .wc-c-s { grid-area: s; margin-top: 6px; }
  .wc-t--affarer .wc-c-o { grid-area: o; margin-top: 6px; }
  .wc-t--affarer .wc-c-w { grid-area: w; margin-top: 6px; text-align: right; font-size: 13px; }
  .wc-t--affarer .wc-c-s .wc-cell { margin-left: -4px; padding: 0 4px; }
  .wc-t--personer tbody tr, .wc-t--foretag tbody tr { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--wc-line); align-items: center; }
  .wc-t--personer td:not(:first-child):not(.wc-c-o), .wc-t--foretag td:not(:first-child):not(.wc-c-o) { grid-column: 1; font-size: 13px; color: var(--wc-mute); padding-left: 36px !important; }
  .wc-t--personer .wc-c-o, .wc-t--foretag .wc-c-o { grid-column: 2; grid-row: 1; }
  .wc-t--foretag td.wc-num { text-align: left; }
  .wc-t tfoot { position: sticky; bottom: 0; z-index: 2; background: var(--wc-bg); border-top: 1px solid var(--wc-line2); }
  .wc-t tfoot tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 10px 16px; }
  .wc-t tfoot td { position: static; white-space: nowrap; }
  .wc-t tfoot td.wc-num { text-align: left; }
  .wc-ft-avg { display: none; }

  .wc-board { grid-auto-columns: 78%; padding: 12px 16px; gap: 10px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
  .wc-col { scroll-snap-align: start; }
  .wc-tasks { padding: 0 16px 20px; }
  .wc-task { grid-template-columns: minmax(0, 1fr) auto 26px; grid-template-areas: "t t t" "d due av"; gap: 2px 10px; padding: 10px 0; }
  .wc-task .wc-chk { grid-area: t; }
  .wc-task-d { grid-area: d; padding-left: 30px; }
  .wc-task-due { grid-area: due; }
  .wc-task > .wc-av { grid-area: av; width: 24px; height: 24px; }
  .wc-panel { width: 100%; border-left: 0; box-shadow: none; }
  .wc-p-sc { padding: 18px 16px 24px; }
  .wc-p-top { padding: 0 8px 0 16px; }
  .wc-p-f > div { grid-template-columns: 92px minmax(0, 1fr); }
  .wc-cmd { padding-top: 16px; }
  .wc-cmd-o small { display: none; }
}
@container (max-width: 380px) {
  .wc-views { gap: 12px; }
  .wc-view-n { display: none; }
}

/* Ägare som text, inga initialcirklar */
.wc .wc-own { flex: none; font-size: 13px; color: var(--wc-mute); white-space: nowrap; }
.wc .wc-own--me { color: var(--wc-ember-t); font-weight: 500; }
.wc .wc-card-f .wc-own { margin-left: auto; font-size: 12px; }
