/* Polyrig Tracker (Peters GO 21/10): utseende från Claude Design, web/design_2026-10-21_tracker (README med tokens).
   Mörkt tema som i designen; ljust tema (Peters val) med samma system, växlas med den halvfyllda cirkeln. */
:root {
  --bg:#0a0c0f; --panel:#111419; --raised:#161a20; --chip:#1b2027; --active:#1c2128; --settings:#0e1115;
  --field:#0c0f13; --field-b:#232931; --b1:#1e232a; --b2:#2a3039; --b3:#3d4550; --row-b:#1a1e24; --sel-bg:#1a2027;
  --fg:#e8ebef; --fg2:#cfd5dc; --fg3:#aab2bc; --muted:#8a939e; --faint:#6c7581; --empty:#5d6672; --logo-sub:#7d8794;
  --accent:#29b6e6; --accent-h:#4cc6ef; --link:#3cc4ef; --link-h:#7fd9f5; --on-accent:#06121a;
  --accent-soft:rgba(41,182,230,.12); --glow:rgba(60,196,239,.38);
  --st-all:#8a939e; --st-scouted:#29b6e6; --st-scanned:#34d17a; --st-imported:#a78bfa;
  --k-team:#34d17a; --k-project:#f0b44c; --k-person:#9aa6b2; --ok:#34d17a; --pause:#f0b44c;
  --warn:#f97066; --warn-soft:rgba(249,112,102,.09); --pin:#f04438; --pin-target:#3b82f6;
  --shadow-pop:0 14px 36px rgba(0,0,0,.5); --shadow-modal:0 24px 60px rgba(0,0,0,.6); --shadow-stack:0 28px 70px rgba(0,0,0,.7);
  --backdrop:rgba(5,7,9,.72); --stripes:repeating-linear-gradient(135deg,#151a20 0 6px,#11151a 6px 12px);
  --map-filter:saturate(.75) brightness(.85);
  --font:"Chakra Petch", Helvetica, Arial, sans-serif;
  color-scheme:dark;
}
:root[data-theme="light"] {
  --bg:#f3f4f6; --panel:#fbfbfc; --raised:#ffffff; --chip:#f1f3f5; --active:#e9ecef; --settings:#f6f7f9;
  --field:#f6f7f9; --field-b:#d3d8de; --b1:#e2e5e9; --b2:#d3d8de; --b3:#a9b1bb; --row-b:#eceef1; --sel-bg:#e6f3f8;
  --fg:#11151a; --fg2:#2a3038; --fg3:#3b434c; --muted:#5b6470; --faint:#7d8692; --empty:#9aa2ab; --logo-sub:#6b7480;
  --accent:#0779a3; --accent-h:#0a8fbd; --link:#0779a3; --link-h:#0a8fbd; --on-accent:#ffffff;
  --accent-soft:rgba(7,121,163,.09); --glow:rgba(10,143,189,.30);
  --st-all:#5b6470; --st-scouted:#0a8fbd; --st-scanned:#1f9d5c; --st-imported:#7c5cd6;
  --k-team:#1f9d5c; --k-project:#b7791f; --k-person:#5b6774; --ok:#1f9d5c; --pause:#b7791f;
  --warn:#c4321f; --warn-soft:rgba(196,50,31,.07);
  --shadow-pop:0 12px 32px rgba(17,21,26,.14); --shadow-modal:0 20px 50px rgba(17,21,26,.18); --shadow-stack:0 24px 60px rgba(17,21,26,.22);
  --backdrop:rgba(17,21,26,.35); --stripes:repeating-linear-gradient(135deg,#eef0f3 0 6px,#e6e9ed 6px 12px);
  --map-filter:none; color-scheme:light;
}

html { scrollbar-gutter:stable; }
html, body { margin:0; background:var(--bg); }
* { box-sizing:border-box; }
body { color:var(--fg); font:14px/1.45 var(--font); min-height:100vh; }
a { color:var(--link); text-decoration:none; } a:hover { color:var(--link-h); }
button, input, select, textarea { font:inherit; color:inherit; }
input::placeholder, textarea::placeholder { color:var(--empty); }
select option { background:var(--raised); color:var(--fg); }
input[type=date]::-webkit-calendar-picker-indicator { filter:invert(.6); }
:root[data-theme="light"] input[type=date]::-webkit-calendar-picker-indicator { filter:none; }
input[type=checkbox] { accent-color:var(--accent); margin:0; width:15px; height:15px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.hidden { display:none !important; }
.err { color:var(--warn); }
.muted { color:var(--faint); font-size:12px; }

/* fält och knappar */
.field { height:40px; background:var(--field); border:1px solid var(--field-b); border-radius:10px; padding:0 14px; color:var(--fg); outline:none; min-width:0; }
.field:focus { border-color:var(--accent); }
select.field { padding:0 10px; color:var(--fg3); }
textarea.field { height:auto; padding:10px 14px; resize:vertical; width:100%; }
.field.sm { height:36px; padding:0 12px; }
.field.xs { height:32px; padding:0 10px; }
.btn { height:38px; padding:0 18px; background:transparent; border:1px solid var(--b2); border-radius:19px; color:var(--fg); cursor:pointer; white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.btn:hover { border-color:var(--link); }
.btn.primary { border:none; background:var(--accent); color:var(--on-accent); font-weight:600; padding:0 24px; }
.btn.primary:hover { background:var(--accent-h); }
.btn.primary:disabled, .btn.primary.off { opacity:.45; cursor:default; }
.btn.danger { color:var(--warn); border-color:color-mix(in srgb, var(--warn) 60%, transparent); }
.btn.danger:hover { background:var(--warn-soft); border-color:var(--warn); }
.btn.sm { height:30px; padding:0 12px; border-radius:15px; font-size:13px; }
.btn.sm.primary { padding:0 14px; }
.btn:disabled { opacity:.45; cursor:not-allowed; }
.iconbtn { width:38px; height:38px; border-radius:50%; border:1px solid var(--b2); background:transparent; color:var(--fg2); cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; flex:none; }
.iconbtn:hover { border-color:var(--link); color:var(--link); }
.iconbtn.s26 { width:26px; height:26px; }
.iconbtn.s32 { width:32px; height:32px; font-size:18px; line-height:1; color:var(--fg3); }
.xbtn { width:24px; height:24px; flex:none; border-radius:50%; border:none; background:transparent; color:var(--faint); cursor:pointer; font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center; padding:0 0 2px; }
.xbtn:hover { color:var(--warn); background:var(--warn-soft); }
.label { font-size:11px; font-weight:500; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); margin:0; }

/* sidan */
.page { max-width:1360px; margin:0 auto; padding:24px 24px 80px; display:flex; flex-direction:column; gap:20px; }
.top { display:flex; align-items:center; gap:16px 24px; flex-wrap:wrap; }
.logo { flex:none; display:flex; align-items:center; gap:8px; min-height:38px; }
.logo img { height:19px; width:auto; display:block; }
.logo .logo-light { display:none; }
:root[data-theme="light"] .logo .logo-dark { display:none; }
:root[data-theme="light"] .logo .logo-light { display:block; }
.logo span { font-weight:400; color:var(--logo-sub); font-size:17px; line-height:1; }
.searchgrp { flex:1 1 380px; min-width:0; max-width:760px; margin:0 auto; display:flex; gap:8px; align-items:center; position:relative; }
.searchbox { flex:1; min-width:0; position:relative; }
.searchbox svg { position:absolute; left:14px; top:12px; color:var(--faint); }
.searchbox .field { width:100%; padding-left:38px; }
.filterbtn { height:40px; padding:0 12px 0 14px; flex:none; display:flex; align-items:center; gap:8px; border-radius:10px; cursor:pointer; background:transparent; border:1px solid var(--b2); color:var(--fg); }
.filterbtn:hover, .filterbtn.on { border-color:var(--link); }
.filterbtn.on { background:var(--raised); }
.badge { min-width:18px; height:18px; border-radius:9px; font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; color:var(--on-accent); }
.badge.on { background:var(--accent); }
.topright { display:flex; align-items:center; gap:8px; position:relative; flex:none; }
.acct { height:38px; display:flex; align-items:center; gap:10px; padding:0 12px 0 4px; border-radius:19px; border:1px solid var(--b2); background:transparent; color:var(--fg); cursor:pointer; }
.acct:hover { border-color:var(--link); }
.acct .av { width:30px; height:30px; border-radius:50%; background:var(--active); display:flex; align-items:center; justify-content:center; color:var(--fg2); }
.acct .nm { display:flex; flex-direction:column; align-items:flex-start; line-height:1.1; }
.acct .nm small { font-size:11px; color:var(--muted); }
.scrim { position:fixed; inset:0; z-index:20; }
.pop { position:absolute; right:0; z-index:21; background:var(--raised); border:1px solid var(--b2); border-radius:16px; box-shadow:var(--shadow-pop); }
.filterpop { top:48px; width:300px; max-width:calc(100vw - 48px); max-height:70vh; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:14px; }
.filterpop label.sel { display:flex; flex-direction:column; gap:6px; padding:0 8px; }
.filterpop label.sel .field { height:38px; width:100%; letter-spacing:0; text-transform:none; font-size:14px; }
.filterpop .shows { display:flex; flex-direction:column; gap:8px; padding:0 8px; color:var(--fg2); }
.filterpop .shows label { display:flex; align-items:center; gap:8px; cursor:pointer; }
.filterpop .foot { display:flex; justify-content:space-between; border-top:1px solid var(--b2); padding-top:12px; }
.acctpop { top:46px; width:240px; border-radius:14px; padding:6px; display:flex; flex-direction:column; }
.acctpop .who { padding:8px 10px 10px; border-bottom:1px solid var(--b2); margin-bottom:4px; display:flex; flex-direction:column; gap:2px; }
.acctpop .who small { font-size:12px; color:var(--muted); }
.menuitem { text-align:left; background:none; border:none; color:var(--fg); padding:8px 10px; border-radius:8px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.menuitem:hover { background:var(--accent-soft); color:var(--accent); }
.menuitem.danger { color:var(--warn); } .menuitem.danger:hover { background:var(--warn-soft); }
.menuitem:disabled { opacity:.45; cursor:not-allowed; }
.menuitem small { display:block; color:var(--muted); font-size:12px; line-height:1.35; margin-top:1px; }
.menuhead { font-size:10px; color:var(--faint); padding:6px 10px 3px; text-transform:uppercase; letter-spacing:.14em; }

/* filterchips */
.chiprow { height:32px; display:flex; align-items:center; gap:10px; padding:0 2px; }
.chips { flex:1; min-width:0; height:32px; display:flex; align-items:center; gap:6px; overflow-x:auto; white-space:nowrap; scrollbar-width:none; }
.chips::-webkit-scrollbar { display:none; }
.fchip { display:flex; align-items:center; gap:6px; height:26px; padding:0 3px 0 10px; border:1px solid var(--b2); border-radius:13px; background:var(--raised); font-size:12px; color:var(--fg); flex:none; }
.fchip .k { color:var(--faint); }
.fchip button { width:20px; height:20px; border-radius:50%; border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:14px; line-height:1; display:flex; align-items:center; justify-content:center; padding:0 0 1px; }
.fchip button:hover { background:var(--b2); color:var(--fg); }
.clearall { height:26px; padding:0 10px; border:none; background:transparent; color:var(--link); font-size:12px; cursor:pointer; flex:none; }
.nofilters { font-size:12px; color:var(--empty); }
.summary { flex:none; font-size:12px; color:var(--faint); font-variant-numeric:tabular-nums; }

/* två kolumner */
.cols { display:flex; flex-wrap:wrap; gap:20px; align-items:flex-start; }
.aside { flex:1 1 240px; max-width:260px; position:sticky; top:16px; max-height:calc(100vh - 32px); overflow-y:auto; display:flex; flex-direction:column; gap:18px; background:var(--panel); border:1px solid var(--b1); border-radius:20px; padding:18px 12px; }
@media (max-width:860px) { .aside { position:static; max-width:none; max-height:none; } }
.aside .grp { display:flex; flex-direction:column; gap:2px; }
.aside .head { display:flex; align-items:center; justify-content:space-between; margin:0 4px 8px 10px; height:26px; }
.aside .div { height:1px; background:var(--b1); margin:0 10px; flex:none; }
.item { display:flex; align-items:center; gap:10px; width:100%; height:34px; padding:0 10px; border-radius:10px; border:none; font-size:14px; cursor:pointer; flex:none; background:transparent; color:var(--fg3); text-align:left; }
.item:hover { background:var(--raised); color:var(--fg); }
.item.on { background:var(--active); color:var(--fg); box-shadow:inset 0 0 0 1px var(--b2); }
.item .dot { width:7px; height:7px; border-radius:50%; flex:none; }
.item .lb { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.item .nt { font-size:11px; color:var(--faint); }
.item .n { font-size:12px; color:var(--faint); font-variant-numeric:tabular-nums; min-width:22px; text-align:right; }
.item.dim:not(.on) { color:var(--faint); }
.itemwrap { position:relative; display:flex; align-items:center; }
.itemwrap .more { position:absolute; right:30px; opacity:0; }
.itemwrap:hover .more, .itemwrap .more:focus-visible { opacity:1; }
.more { width:24px; height:24px; flex:none; border-radius:50%; border:1px solid transparent; background:transparent; color:var(--muted); cursor:pointer; font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center; padding:0 0 4px; }
.more:hover { border-color:var(--b2); color:var(--fg); background:var(--raised); }
.ctxmenu { position:fixed; z-index:45; width:260px; background:var(--raised); border:1px solid var(--b2); border-radius:14px; padding:6px; box-shadow:var(--shadow-pop); display:flex; flex-direction:column; }

/* tabellen */
.main { flex:999 1 560px; min-width:0; display:flex; flex-direction:column; gap:8px; }
.tablepanel { overflow-x:auto; background:var(--panel); border:1px solid var(--b1); border-radius:16px; }
.table { min-width:860px; display:flex; flex-direction:column; }
.trow { display:grid; grid-template-columns:96px 40px minmax(160px,2fr) minmax(130px,1.2fr) 120px minmax(110px,1fr) minmax(100px,.9fr); gap:12px; align-items:center; padding:0 12px; }
.thead { height:40px; border-bottom:1px solid var(--b2); }
.thead button { display:flex; align-items:center; gap:6px; height:28px; padding:0; border:none; background:none; font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; cursor:pointer; color:var(--faint); text-align:left; }
.thead button:hover, .thead button.on { color:var(--fg); }
.thead button .ar { width:10px; font-size:10px; color:var(--accent); letter-spacing:0; }
.tbody .trow { min-height:52px; border-bottom:1px solid var(--row-b); cursor:pointer; }
.tbody .trow:hover { background:var(--raised); }
.tbody .trow.sel { background:var(--sel-bg); box-shadow:inset 3px 0 0 var(--accent); }
.c-date { font-size:13px; color:var(--fg2); font-variant-numeric:tabular-nums; white-space:nowrap; }
.c-thumb { width:40px; height:40px; border-radius:8px; overflow:hidden; background:var(--raised); display:flex; align-items:center; justify-content:center; text-align:center; font-size:8px; color:var(--faint); line-height:1.2; }
.c-thumb.has { background:var(--stripes); }
.c-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.c-name { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.c-name .none { color:var(--empty); font-weight:500; }
.c-txt { font-size:13px; color:var(--fg2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.c-txt.empty { color:var(--empty); }
.c-stage { display:flex; align-items:center; gap:7px; min-width:0; font-size:13px; color:var(--fg2); white-space:nowrap; }
.c-stage .dot { width:7px; height:7px; flex:none; border-radius:50%; }
.c-stage .fl { font-size:11px; color:var(--faint); }
.c-rig .no { color:var(--faint); font-size:12px; margin-left:6px; }
.emptybox { border:1px dashed var(--b2); border-radius:14px; padding:28px; text-align:center; color:var(--faint); }

/* sidopanelen */
.side { position:fixed; top:0; right:0; bottom:0; z-index:25; width:420px; max-width:100vw; background:var(--panel); border-left:1px solid var(--b2); box-shadow:-18px 0 48px rgba(0,0,0,.5); display:flex; flex-direction:column; overflow-y:auto; }
:root[data-theme="light"] .side { box-shadow:-18px 0 48px rgba(17,21,26,.12); }
.side .hero { position:relative; flex:none; aspect-ratio:4/3; background:var(--raised); display:flex; align-items:center; justify-content:center; border-bottom:1px solid var(--b1); font-size:12px; color:var(--faint); overflow:hidden; }
.side .hero.has { background:var(--stripes); }
.side .hero img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.side .hero .close { position:absolute; top:14px; right:14px; width:34px; height:34px; border-radius:50%; border:1px solid var(--b2); background:color-mix(in srgb, var(--bg) 75%, transparent); color:var(--fg2); cursor:pointer; font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center; z-index:1; }
.side .hero .close:hover { border-color:var(--link); color:var(--link); }
.side .hero .imgs { position:absolute; left:14px; bottom:14px; background:rgba(0,0,0,.65); color:#e8ebef; font-size:11px; padding:3px 8px; border-radius:6px; z-index:1; }
.side .body { padding:18px 20px 24px; display:flex; flex-direction:column; gap:16px; }
.side h2 { margin:0; font-size:20px; font-weight:600; overflow-wrap:anywhere; }
.badges { display:flex; gap:8px; flex-wrap:wrap; }
.bdg { display:flex; align-items:center; gap:6px; border:1px solid var(--b2); border-radius:8px; padding:1px 8px; font-size:12px; color:var(--fg2); }
.bdg.dim { color:var(--muted); }
.bdg.dash { border-style:dashed; border-color:var(--b3); color:var(--muted); }
.bdg .dot { width:7px; height:7px; border-radius:50%; }
.facts { display:grid; grid-template-columns:96px 1fr; gap:8px 12px; font-size:13px; border-top:1px solid var(--b1); padding-top:14px; }
.facts .k { color:var(--faint); } .facts .v { color:var(--fg2); overflow-wrap:anywhere; }
.tiles2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tiles2 > div { display:flex; flex-direction:column; gap:6px; }
.sqtile { aspect-ratio:1; border-radius:12px; background:var(--field); border:1px dashed var(--b2); display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--faint); position:relative; overflow:hidden; }
.sqtile.has { border-style:solid; border-color:var(--b1); background:var(--stripes); }
.sqtile img.photo { width:100%; height:100%; object-fit:cover; display:block; }
.sqtile .tile { position:absolute; width:256px; height:256px; max-width:none; filter:var(--map-filter); }
.sqtile .pin { position:absolute; left:50%; top:50%; width:14px; height:14px; margin:-7px; border-radius:50%; background:var(--pin); border:2px solid #fff; }
.sqtile .pin.target { background:var(--pin-target); }
.sideacts { display:flex; gap:8px; flex-wrap:wrap; }
.sideacts .btn { flex:1 1 auto; }
.editbox { background:var(--raised); border:1px solid var(--b2); border-radius:16px; padding:16px; display:flex; flex-direction:column; gap:12px; }
.editbox h3 { margin:0 0 2px; font-size:11px; font-weight:500; letter-spacing:.18em; text-transform:uppercase; color:var(--fg2); }
.editbox .grid3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.editbox .field { width:100%; height:42px; }
.editbox .field.xs { height:42px; }
.editbox p { margin:0; color:var(--muted); font-size:12px; line-height:1.45; }
.editbox .row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.note { font-size:12px; color:var(--faint); }

/* popup-fönster */
.modal { position:fixed; inset:0; z-index:30; background:var(--backdrop); display:flex; align-items:flex-start; justify-content:center; padding:8vh 16px 16px; overflow-y:auto; }
.modal.z40 { z-index:40; padding-top:9vh; }
.modal .bg { position:fixed; inset:0; }
.dlg { position:relative; width:100%; background:var(--panel); border:1px solid var(--b2); border-radius:20px; padding:22px; display:flex; flex-direction:column; gap:12px; box-shadow:var(--shadow-modal); }
.dlg.w760 { max-width:760px; } .dlg.w1000 { max-width:1000px; gap:16px; }
.modal.z40 .dlg { border-color:var(--b3); box-shadow:var(--shadow-stack); gap:16px; }
.dlg .dhead { display:flex; align-items:flex-start; gap:12px; }
.dlg .dhead .t { flex:1; display:flex; flex-direction:column; gap:4px; }
.dlg h2.big { margin:0; font-size:22px; font-weight:700; }
.dlg h2.cap { margin:0; font-size:12px; font-weight:500; letter-spacing:.18em; text-transform:uppercase; flex:1; }
.dlg .intro { margin:0; color:var(--muted); font-size:13px; max-width:60ch; }
.dlg .grid4 { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; }
.dlg .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.dlg .foot { display:flex; align-items:center; gap:8px; flex-wrap:wrap; border-top:1px solid var(--b1); padding-top:14px; margin-top:2px; }
.dlg .foot p { margin:0; color:var(--faint); font-size:12px; flex:1 1 260px; }
.filepick { background:var(--field); border:1px solid var(--field-b); border-radius:10px; padding:4px 12px 4px 4px; color:var(--fg3); display:inline-flex; gap:10px; align-items:center; cursor:pointer; }
.filepick span.b { background:var(--active); color:var(--fg2); border:1px solid var(--b2); border-radius:8px; padding:6px 12px; }
#picker { height:300px; border-radius:12px; border:1px solid var(--field-b); }

/* bygg projekt / team */
.build3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; align-items:start; }
.build2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; align-items:start; }
.srccol { background:var(--field); border:1px solid var(--b1); border-radius:16px; padding:12px; display:flex; flex-direction:column; gap:8px; }
.tgtcol { background:var(--raised); border:1px solid var(--b2); border-radius:16px; padding:12px; display:flex; flex-direction:column; gap:8px; }
.colh { margin:0; font-size:11px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); display:flex; justify-content:space-between; align-items:center; height:20px; gap:8px; }
.colh .c { letter-spacing:0; text-transform:none; color:var(--faint); display:flex; align-items:center; gap:8px; }
.srclist { display:flex; flex-direction:column; gap:6px; max-height:260px; overflow-y:auto; }
.stile { display:flex; align-items:center; gap:8px; background:var(--raised); border:1px solid var(--b2); border-radius:12px; padding:7px 6px 7px 8px; cursor:grab; user-select:none; -webkit-user-select:none; touch-action:none; }
.srccol .stile { background:var(--raised); }
.stile:hover { border-color:var(--b3); }
.stile.added { opacity:.6; }
.grip { flex:none; width:6px; height:16px; background:radial-gradient(circle,var(--faint) 1px,transparent 1.4px) 0 0/3px 4px; }
.stile .tx { flex:1; min-width:0; display:flex; align-items:baseline; gap:8px; overflow:hidden; }
.stile .tx b { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stile .tx b.link { cursor:pointer; } .stile .tx b.link:hover { color:var(--link); }
.stile .tx small { font-size:12px; color:var(--muted); white-space:nowrap; }
.addbtn { width:28px; height:28px; flex:none; border-radius:50%; border:1px solid transparent; background:transparent; color:var(--fg2); cursor:pointer; font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center; padding:0; }
.addbtn:hover { border-color:var(--b2); }
.addbtn.done { color:var(--ok); }
.kindlab { display:flex; align-items:center; gap:6px; font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.kindlab i { display:block; width:7px; height:7px; }
.kindlab.project { color:var(--k-project); } .kindlab.project i { width:6px; height:6px; background:var(--k-project); transform:rotate(45deg); border-radius:1px; }
.kindlab.team { color:var(--k-team); } .kindlab.team i { background:var(--k-team); border-radius:2px; }
.kindlab.person { color:var(--k-person); } .kindlab.person i { background:var(--k-person); border-radius:50%; }
.tgttitle { font-weight:600; font-size:16px; min-height:22px; overflow-wrap:anywhere; }
.tgttitle.empty { color:var(--empty); }
.dropzone { min-height:120px; border:1px dashed var(--b2); border-radius:10px; padding:5px; display:flex; flex-direction:column; gap:4px; transition:box-shadow .12s, border-color .12s; }
.dropzone.hot { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent), 0 0 22px 2px var(--glow); }
.dropzone .ph { margin:auto; color:var(--faint); font-size:12px; padding:8px; text-align:center; }
.dropzone .stile { display:none; }
.mitem { display:flex; align-items:flex-start; gap:6px; background:var(--chip); border-radius:8px; padding:5px 4px 5px 8px; }
.mitem.c { align-items:center; min-height:32px; padding:4px 4px 4px 8px; }
.mitem .mt { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.mitem .mt .l { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:500; }
.mitem .mt .l b { font-weight:500; cursor:pointer; } .mitem .mt .l b:hover { color:var(--link); }
.mitem .mt small { font-size:12px; color:var(--muted); }
.leadpill { height:22px; padding:0 8px; flex:none; border-radius:11px; font-size:10px; letter-spacing:.08em; text-transform:uppercase; cursor:pointer; background:transparent; color:var(--faint); border:1px solid var(--b2); }
.leadpill.on { background:var(--accent-soft); color:var(--accent); border-color:color-mix(in srgb, var(--accent) 45%, transparent); }
.leadpill:disabled { cursor:default; }
.statusdd { position:relative; }
.statusbtn { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px; border:1px solid var(--b2); border-radius:8px; font-size:12px; color:var(--fg2); background:transparent; cursor:pointer; }
.statusbtn i { width:7px; height:7px; border-radius:50%; background:var(--ok); }
.statusbtn.inactive i { background:none; box-shadow:inset 0 0 0 1.5px var(--pause); }
.statusbtn.closed i, .statusbtn.off i { background:var(--faint); }
.sortable-ghost { opacity:.35; }
.sortable-fallback { opacity:.95 !important; box-shadow:var(--shadow-pop); transform:rotate(-1.5deg); border-color:var(--accent) !important; }

/* inställningar */
.settings { position:relative; width:100%; max-width:1180px; height:min(88vh,820px); background:var(--settings); border:1px solid var(--b2); border-radius:20px; display:flex; flex-direction:column; overflow:hidden; box-shadow:var(--shadow-modal); }
.modal.settingsm { padding-top:5vh; }
.sthead { flex:none; display:flex; align-items:center; gap:16px; padding:16px 18px; border-bottom:1px solid var(--b1); flex-wrap:wrap; }
.sthead .ti { display:flex; align-items:center; gap:10px; color:var(--link); }
.sthead .ti h2 { margin:0; font-size:12px; font-weight:500; letter-spacing:.18em; text-transform:uppercase; color:var(--fg); }
.seg { display:flex; gap:4px; padding:3px; border:1px solid var(--b1); border-radius:20px; background:var(--bg); }
.seg button { height:30px; padding:0 14px; border-radius:15px; border:none; font-size:13px; cursor:pointer; display:flex; align-items:center; gap:8px; background:transparent; color:var(--muted); }
.seg button small { font-size:11px; color:var(--faint); }
.seg button.on { background:var(--active); color:var(--fg); box-shadow:inset 0 0 0 1px var(--b2); }
.stbody { flex:1; min-height:0; overflow-y:auto; padding:22px 22px 28px; display:flex; flex-direction:column; gap:16px; }
.stbody h1 { margin:0; font-size:22px; font-weight:700; }
.stbody .intro { margin:0; color:var(--muted); font-size:13px; max-width:62ch; }
.stpanel { background:var(--panel); border:1px solid var(--b1); border-radius:16px; padding:14px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.stpanel .ph { display:flex; justify-content:space-between; align-items:center; }
.stpanel .ph small { font-size:12px; color:var(--faint); }
.pgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:8px; }
.ptile { position:relative; display:flex; align-items:center; gap:8px; background:var(--raised); border:1px solid var(--b2); border-radius:12px; padding:8px 6px 8px 8px; min-width:0; }
.ptile:hover { border-color:var(--b3); }
.ptile.off { opacity:.55; }
.ptile .tx { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; cursor:pointer; }
.ptile .tx .l { display:flex; align-items:baseline; gap:8px; min-width:0; }
.ptile .tx .l b { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ptile .tx .l small { font-size:12px; color:var(--muted); white-space:nowrap; }
.ptile .tx .s { font-size:12px; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ptile .tx:hover b { color:var(--link); }
.invite { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.invite .notice { font-size:12px; color:var(--ok); min-height:16px; flex:1 1 100%; }
.pdetail { background:var(--panel); border:1px solid var(--b2); border-radius:18px; padding:16px; display:flex; flex-direction:column; gap:14px; box-shadow:0 0 0 4px var(--accent-soft); }
.pdetail .dh { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; }
.pdetail h3 { margin:0; font-size:19px; font-weight:600; }
.pform { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px; }
.pform label { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--muted); letter-spacing:.02em; }
.pform .roles { display:flex; gap:12px; min-height:40px; align-items:center; flex-wrap:wrap; }
.pform .roles label { flex-direction:row; align-items:center; gap:6px; font-size:13px; color:var(--fg2); }
.confirm { background:var(--warn-soft); border:1px solid color-mix(in srgb, var(--warn) 50%, transparent); border-radius:12px; padding:10px 12px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:13px; }
.lists3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; padding-top:12px; border-top:1px solid var(--b1); }
.lists3 > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.rigtable { overflow-x:auto; margin:0 -6px; }
.rigtable .rt { min-width:980px; display:flex; flex-direction:column; }
.rgrid { display:grid; grid-template-columns:120px minmax(140px,1.2fr) minmax(130px,1fr) minmax(140px,1fr) minmax(160px,1.2fr) minmax(130px,1fr) 128px; gap:12px; align-items:center; padding:0 8px; }
.rgrid.h { height:36px; border-bottom:1px solid var(--b1); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); }
.rgrid.r { min-height:52px; border-bottom:1px solid var(--b1); }
.rgrid.r.ed { background:var(--raised); }
.rgrid .id { font-size:12px; color:var(--fg2); }
.rgrid .nm { font-weight:600; overflow-wrap:anywhere; }
.rgrid .e { color:var(--empty); }
.rgrid .kv { display:flex; align-items:center; gap:6px; min-width:0; }
.rgrid .kv span.v { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rgrid .acts { display:flex; gap:6px; justify-content:flex-end; }
.company label { display:flex; align-items:center; gap:8px; color:var(--fg2); cursor:pointer; }

/* toast och inloggning */
.toast { position:fixed; left:50%; bottom:calc(18px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%); background:var(--fg); color:var(--bg); padding:9px 16px; border-radius:20px; font-size:13px; z-index:60; box-shadow:var(--shadow-pop); max-width:calc(100vw - 32px); }
.toast.err { background:var(--warn); color:#fff; }
#login { max-width:420px; margin:12vh auto; padding:0 16px; }
#login .dlg { gap:14px; }
#login .row { display:flex; gap:8px; }
#login .row .field { flex:1; }

@media (max-width:640px) {
  .page { padding:16px 12px 60px; }
  .side { width:100vw; }
  .editbox .grid3 { grid-template-columns:1fr; }
}
@media (pointer:coarse) {
  .xbtn, .more, .addbtn { width:36px; height:36px; }
  .leadpill { height:30px; padding:0 10px; }
  .item { height:40px; }
}
@media (prefers-reduced-motion:reduce) { .dropzone { transition:none; } }

/* live (B3): pulserande prick och accentfärgad text */
.c-stage .fl.live, .bdg.live { color:var(--accent); }
.bdg.live { border-color:color-mix(in srgb, var(--accent) 45%, transparent); }
.dot.pulse { box-shadow:0 0 0 0 var(--glow); animation:pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow:0 0 0 0 var(--glow); } 100% { box-shadow:0 0 0 7px transparent; } }
@media (prefers-reduced-motion:reduce) { .dot.pulse { animation:none; } }
