/* Groupify dashboard: a floating macOS-style window. Compact 13px type, hairline cards, glass sidebar and sheet, label + dot status (never colour alone).
   Inter is bundled so it looks the same off Apple devices; on Apple devices the system font (SF) wins. */
@font-face { font-family: "Inter"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #f2f2f5; --card: #ffffff; --tx: #1d1d1f; --tx2: #6e6e73; --tx3: #a1a1a6; --line: rgba(0, 0, 0, .08); --fill: rgba(0, 0, 0, .05); --fill2: rgba(0, 0, 0, .08);
  --acc: #0a6cff; --red: #e5372e; --green: #1f9d55; --amber: #c77700; --grey: #8e8e93;
  --acc-t: #e8f1ff; --red-t: #fdecea; --green-t: #e6f6ec; --amber-t: #fff3df; --grey-t: #f0f0f3;
  --side: rgba(255, 255, 255, .62); --sheet: rgba(255, 255, 255, .84); --scrim: rgba(235, 236, 244, .55); --ev: rgba(255, 255, 255, .7);
  --win-bg: linear-gradient(135deg, #dfe3ee, #eef0f6 55%, #e8e4f0);
  --win-shadow: 0 30px 80px rgba(20, 20, 50, .22), 0 0 0 1px rgba(0, 0, 0, .06);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 0 0 1px var(--line);
  --font: -apple-system, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e; --card: #2a2a2d; --tx: #f5f5f7; --tx2: #a1a1a6; --tx3: #6e6e73; --line: rgba(255, 255, 255, .1); --fill: rgba(255, 255, 255, .07); --fill2: rgba(255, 255, 255, .12);
    --acc: #3b8bff; --red: #ff6961; --green: #30d158; --amber: #ffb340; --grey: #98989d;
    --acc-t: rgba(59, 139, 255, .18); --red-t: rgba(255, 105, 97, .16); --green-t: rgba(48, 209, 88, .16); --amber-t: rgba(255, 179, 64, .16); --grey-t: rgba(255, 255, 255, .08);
    --side: rgba(40, 40, 44, .66); --sheet: rgba(38, 38, 42, .86); --scrim: rgba(0, 0, 0, .45); --ev: rgba(255, 255, 255, .06);
    --win-bg: linear-gradient(135deg, #0d0d12, #17171f 55%, #14111b); --win-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
    --card-shadow: 0 0 0 1px var(--line); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--win-bg); color: var(--tx); font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; display: flex; align-items: center; justify-content: center; padding: 20px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
b, strong { font-weight: 600; }

/* ---- the window */
.app { position: relative; display: flex; width: min(1600px, 100%); height: calc(100vh - 40px); max-height: 1060px; border-radius: 22px; background: var(--bg); box-shadow: var(--win-shadow); overflow: hidden; }
.side { width: 272px; flex: none; background: var(--side); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border-right: 1px solid var(--line);
        padding: 18px 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.project { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--fill); margin-bottom: 14px; }
.logo { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #0a6cff, #6a5cff); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 13px; flex: none; }
.project { width: 100%; text-align: left; cursor: pointer; } .project b { font-weight: 600; font-size: 13px; display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 178px; }
.project small { color: var(--tx2); font-size: 11px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-weight: 500; transition: background .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--tx2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--fill); }
.nav a[aria-current="page"] { background: rgba(10, 108, 255, .12); color: var(--acc); }
.nav a[aria-current="page"] svg { stroke: var(--acc); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--tx2); background: var(--fill2); border-radius: 10px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.nav .count:empty { display: none; }
.nav .gap { height: 8px; }
.label { font-size: 11px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; }
.side .label { padding: 16px 10px 4px; }
.side #conns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
.conn { display: flex; align-items: center; white-space: nowrap; padding: 2px 10px; color: var(--tx2); font-size: 12px; }
.conn .dot { margin-right: 8px; }
.conn em { margin-left: auto; padding-left: 6px; font-style: normal; font-size: 10.5px; color: var(--tx3); max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tx3); flex: none; display: inline-block; }
.dot.red { background: var(--red); } .dot.blue { background: var(--acc); } .dot.green { background: var(--green); } .dot.orange { background: var(--amber); }
.live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(31, 157, 85, .5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }

/* ---- buttons, pills, segmented control */
.btn { white-space: nowrap; appearance: none; border: 0; border-radius: 10px; padding: 8px 13px; font-weight: 500; font-size: 12.5px; background: var(--fill2); color: var(--tx); cursor: pointer; transition: transform .12s var(--ease), background .15s, opacity .15s; display: inline-block; text-align: center; }
.btn:hover { background: rgba(0, 0, 0, .1); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc); color: #fff; font-weight: 600; } .btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: 6px 11px; font-size: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.side #round { display: block; width: calc(100% - 8px); margin: 6px 4px 0; padding: 9px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 9px; white-space: nowrap; background: var(--grey-t); color: var(--grey); }
.pill.red { background: var(--red-t); color: var(--red); } .pill.blue { background: var(--acc-t); color: var(--acc); } .pill.green { background: var(--green-t); color: var(--green); } .pill.orange { background: var(--amber-t); color: var(--amber); }
.pill .dot { width: 6px; height: 6px; }
.mono { font: 11px var(--mono); background: var(--fill); padding: 1px 6px; border-radius: 5px; color: var(--tx2); }
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 7px; font-weight: 500; font-size: 12px; cursor: pointer; color: var(--tx2); transition: background .15s, color .15s; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--tx); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.seg button[disabled] { opacity: .4; cursor: default; }

/* ---- main column: the title stays put, the content scrolls */
.main { flex: 1; min-width: 0; overflow-y: auto; padding: 0 28px 28px; position: relative; outline: none; scrollbar-width: thin; scrollbar-color: var(--fill2) transparent; }
.head { position: sticky; top: 0; z-index: 4; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 0 -28px 4px; padding: 20px 28px 12px;
        background: var(--bg); }
.head::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
h1 { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: -.022em; font-weight: 700; }
.sub { margin: 4px 0 0; color: var(--tx2); font-size: 13px; max-width: 70ch; }
h2 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.015em; }
.traj { width: 300px; padding-top: 6px; font-size: 12px; color: var(--tx2); }
.traj .line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 12px; }
.bar { display: flex; height: 8px; border-radius: 5px; background: var(--fill2); overflow: hidden; }
.bar i { display: block; height: 100%; transition: flex-grow .5s var(--ease); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0 14px; }
.chip { text-align: left; background: var(--card); border: 0; border-radius: 14px; padding: 10px 16px; min-width: 128px; cursor: pointer; box-shadow: var(--card-shadow); transition: transform .15s var(--ease), box-shadow .15s; }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--acc); }
.chip b { display: block; font-size: 22px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chip span { font-size: 12px; color: var(--tx2); }
.chip.red b { color: var(--red); } .chip.blue b { color: var(--acc); } .chip.green b { color: var(--green); } .chip.orange b { color: var(--amber); }

/* ---- board */
.cols { display: flex; gap: 18px; align-items: flex-start; }
.cols > :first-child { flex: 1; min-width: 0; }
.rail { width: 290px; flex: none; }
.group { margin-bottom: 14px; }
.group .label, .rail > .label, .cols .label { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .05em; color: var(--tx2); margin: 0 6px 6px; }
.list { background: var(--card); border-radius: 14px; box-shadow: var(--card-shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); transition: background .15s; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--fill); }
.row.sel, .row.sel:hover { background: var(--acc-t); }
.row .mid { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 14px; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { color: var(--tx2); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s b { color: var(--tx); font-weight: 600; }
.row .tags { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row .due { width: 150px; flex: none; text-align: right; font-size: 12px; color: var(--tx2); font-variant-numeric: tabular-nums; }
.row .due b { display: block; color: var(--tx); font-weight: 500; }
.row .due.late span { color: var(--red); font-weight: 600; }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; font-size: 12px; flex: none; }
.av.lg { width: 44px; height: 44px; font-size: 17px; }
.empty { padding: 22px; text-align: center; color: var(--tx2); }

/* ---- activity feed and cards */
.feed { display: flex; flex-direction: column; gap: 8px; }
.item { display: block; background: var(--ev); border-radius: 12px; padding: 9px 12px; box-shadow: 0 0 0 1px var(--line); font-size: 12px; }
a.item:hover { background: var(--card); }
.item small { display: flex; align-items: center; gap: 6px; color: var(--tx3); font-size: 11px; }
.item p { margin: 0; overflow-wrap: anywhere; }
.item p b { font-weight: 600; }
.item .d { color: var(--tx2); margin-top: 2px; }
.item .acts { display: flex; gap: 8px; margin-top: 8px; }
.item.act { box-shadow: 0 0 0 1px var(--line), inset 3px 0 0 var(--red); } .item.look { box-shadow: 0 0 0 1px var(--line), inset 3px 0 0 var(--amber); }
.rail .item small .dot { display: none; }
.more { display: inline-block; margin: 10px 4px 0; color: var(--acc); font-weight: 500; }
.panel { background: var(--card); border-radius: 14px; box-shadow: var(--card-shadow); padding: 2px 14px; margin-bottom: 14px; max-width: 760px; }
.panel .r { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.panel .r:first-child { border-top: 0; }
.panel .r em { margin-left: auto; font-style: normal; color: var(--tx2); text-align: right; font-size: 12px; }
.hint { color: var(--tx3); font-size: 12px; margin: 8px 4px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: stretch; }
.card { background: var(--card); border-radius: 14px; box-shadow: var(--card-shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card .top { display: flex; align-items: center; gap: 12px; }
.card .top b { font-size: 15px; letter-spacing: -.01em; display: block; }
.card .top small { color: var(--tx2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 2px 0; }
.kv > :nth-child(odd) { color: var(--tx2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- report tables */
.tbl-wrap { overflow-x: auto; background: var(--card); border-radius: 14px; box-shadow: var(--card-shadow); margin-bottom: 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tx3); padding: 10px 14px; white-space: nowrap; }
.tbl td { padding: 9px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl td.wrap { white-space: normal; min-width: 180px; }
.tbl .num, .tbl th.num { text-align: right; }
.tbl .good { color: var(--green); font-weight: 600; } .tbl .bad { color: var(--red); font-weight: 600; }

/* ---- the task sheet: glass, inside the window */
.scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); z-index: 20; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; top: 16px; right: 16px; bottom: 16px; width: min(640px, calc(100% - 32px)); z-index: 30; border-radius: 20px; background: var(--sheet);
         -webkit-backdrop-filter: blur(40px) saturate(190%); backdrop-filter: blur(40px) saturate(190%); padding: 26px 28px 30px; overflow-y: auto; overscroll-behavior: contain; outline: none;
         box-shadow: 0 20px 60px rgba(20, 20, 60, .28), 0 0 0 1px rgba(0, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .7);
         transform: translateX(calc(100% + 40px)); transition: transform .45s var(--ease), visibility 0s linear .45s; visibility: hidden; }
.sheet.on { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--fill2); cursor: pointer; font-size: 16px; line-height: 1; color: var(--tx2); }
.sheet h2 { font-size: 24px; letter-spacing: -.02em; line-height: 1.1; font-weight: 700; margin: 0 36px 0 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; color: var(--tx2); font-size: 12px; margin: 8px 0 14px; }
.sec { background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 94%, var(--tx) 6%)); border-radius: 14px; padding: 14px 16px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 12px; }
.sec.two { background: none; box-shadow: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sec > .label, .mini > .label { font-size: 11px; letter-spacing: .06em; color: var(--tx2); margin-bottom: 8px; display: block; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 11px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 10px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 15px; bottom: -3px; width: 1px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .dot { width: 11px; height: 11px; margin-top: 3px; background: var(--acc); box-shadow: 0 0 0 3px var(--acc-t); }
.tl .dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-t); } .tl .dot.orange { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-t); }
.tl b { font-weight: 600; } .tl small { color: var(--tx3); }
.quote { background: var(--grey-t); border-radius: 10px; padding: 8px 11px; margin: 4px 0; font-size: 13px; overflow-wrap: anywhere; }
.mini { background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: 0 0 0 1px var(--line); font-size: 12px; min-width: 0; }
.sec:not(.two) > .mini { background: none; box-shadow: none; padding: 0; }
.mini p { margin: 0; padding: 5px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; } .mini .label + p { border-top: 0; padding-top: 0; }
.mini p small { display: block; color: var(--tx3); }
.chat p { margin: 0; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; overflow-wrap: anywhere; } .chat p:first-child { border-top: 0; }
.chat b { font-weight: 600; margin-right: 6px; } .chat small { color: var(--tx3); margin-left: 6px; }

/* ---- dialog, toast, forms */
dialog { border: 0; border-radius: 18px; padding: 22px; width: min(480px, calc(100vw - 32px)); background: var(--card); color: var(--tx); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog h2 { font-size: 18px; margin-bottom: 4px; }
dialog .list { box-shadow: none; background: var(--fill); margin: 12px 0; }
dialog .acts { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; }
dialog label { display: flex; gap: 8px; align-items: center; color: var(--tx2); font-size: 13px; margin-right: auto; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px); background: rgba(30, 30, 32, .92); color: #fff; padding: 9px 16px; border-radius: 99px; font-weight: 500; font-size: 12.5px; opacity: 0;
         pointer-events: none; transition: opacity .25s, transform .35s var(--ease); z-index: 60; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
input[type="text"], input[type="password"], input[type="datetime-local"], select, textarea, input[list] { width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--fill); font-size: 13px; }
.form { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.form .acts { display: flex; justify-content: flex-end; }
.form-inline { display: flex; gap: 10px; } .form-inline input { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.form label, .fl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--tx2); margin: 0; }
dialog .fl { margin-top: 12px; } dialog fieldset.fl { border: 0; padding: 0; min-width: 0; } dialog legend { padding: 0; margin-bottom: 5px; }
dialog label.fl, dialog fieldset.fl { align-items: stretch; margin-right: 0; text-align: left; }
.checks { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--fill); }
.checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 12.5px; color: var(--tx); margin: 0; }
.panel .r .btn.small + .btn.small { margin-left: 6px; }
.waqr { margin-top: 12px; width: 220px; max-width: 100%; border-radius: 12px; overflow: hidden; background: #fff; }
.waqr svg { display: block; width: 100%; height: auto; }
.paircode { font: 600 34px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; padding: 14px 18px; border-radius: 14px; background: var(--fill); display: inline-block; user-select: all; }
.sandbox { margin: 6px 4px 0; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; line-height: 1.35; font-weight: 500; background: var(--amber-t); color: var(--amber); }
.sandbox[hidden] { display: none; }
.sb-top { display: none; }

/* ---- timeline (gantt) */
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 4px 10px; font-size: 12px; color: var(--tx2); } .g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-sw { width: 14px; height: 10px; border-radius: 3px; background: var(--grey); display: inline-block; } .g-sw.green { background: var(--green); } .g-sw.blue { background: var(--acc); } .g-sw.red { background: var(--red); }
.g-sw.late { background: var(--grey); outline: 2px solid var(--red); outline-offset: -2px; } .g-line { width: 14px; height: 0; border-top: 2px solid; display: inline-block; } .g-line.blue { border-color: var(--acc); } .g-line.red { border-color: var(--red); }
.gantt { display: flex; overflow: auto; background: var(--card); border-radius: 14px; box-shadow: var(--card-shadow); max-width: 100%; margin-bottom: 18px; -webkit-overflow-scrolling: touch; }
.g-names { flex: none; width: 220px; position: sticky; left: 0; z-index: 6; background: var(--card); border-right: 1px solid var(--line); }
.g-in { position: relative; flex: none; }
.g-in svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.g-grid { stroke: var(--line); stroke-width: 1; } .g-day { fill: var(--tx3); font-size: 11px; font-weight: 600; }
.g-mark { stroke-width: 2; } .g-mark.now { stroke: var(--acc); } .g-mark.dl { stroke: var(--red); stroke-dasharray: 5 4; } .g-mark.eta { stroke: var(--amber); stroke-dasharray: 2 4; }
.g-flag { font-size: 10.5px; font-weight: 700; } .g-flag.now { fill: var(--acc); } .g-flag.dl { fill: var(--red); } .g-flag.eta { fill: var(--amber); }
.g-dep { fill: none; stroke: var(--tx3); stroke-width: 1.3; opacity: .7; } .g-arr { fill: var(--tx3); }
.g-ms { position: absolute; left: 0; right: 0; height: 26px; background: var(--fill); }
.g-msn { height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--tx2); background: var(--fill); white-space: nowrap; overflow: hidden; }
.g-msn span { text-transform: none; letter-spacing: 0; color: var(--tx3); font-weight: 500; }
.g-lab { height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 12px 0 14px; font-size: 12.5px; font-weight: 500; }
.g-lab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-bar { position: absolute; height: 24px; border-radius: 7px; background: var(--grey); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); transition: transform .12s var(--ease), box-shadow .15s; z-index: 2; }
.g-bar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.g-bar.green { background: var(--green); } .g-bar.blue { background: var(--acc); } .g-bar.red { background: var(--red); } .g-bar.gray { background: var(--grey); }
.g-bar.late { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px); outline: 2px solid var(--red); outline-offset: -2px; }
.g-due { position: absolute; width: 11px; height: 11px; background: var(--tx); transform: rotate(45deg); border: 2px solid var(--card); border-radius: 2px; z-index: 4; } .g-due.late { background: var(--red); }
.g-tag { position: absolute; font-size: 11.5px; font-weight: 600; color: var(--tx2); white-space: nowrap; z-index: 2; pointer-events: none; }

/* ---- small screens: the window fills the screen and the sidebar becomes a bar along the bottom */
@media (max-width: 1100px) { .cols { flex-direction: column; align-items: stretch; } .rail { width: 100%; } .head .traj { width: 100%; } }
@media (max-width: 760px) {
  body { padding: 0; display: block; } .sb-top:not([hidden]) { display: block; position: fixed; top: 0; left: 0; right: 0; z-index: 70; margin: 0; border-radius: 0; text-align: center; padding: 4px 10px; font-size: 11px; } .sb-top:not([hidden]) ~ .app { margin-top: 24px; height: calc(100dvh - 24px); }
  .app { width: 100%; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; }
  .side { position: absolute; inset: auto 0 0 0; width: auto; flex-direction: row; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 15; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .side .project, .side .label, .side .conn, .side .grow, .side #round, .side .sandbox, .nav .gap { display: none; }
  .nav { flex-direction: row; } .nav a { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 5px 9px; } .nav .count { display: none; }
  .main { padding: 0 16px 90px; } .head { margin: 0 -16px 4px; padding: 16px 16px 10px; } h1 { font-size: 26px; }
  .row .tags { display: none; } .row .due { width: 96px; } .sec.two { grid-template-columns: 1fr; }
  .sheet { top: auto; height: 88%; right: 0; left: 0; bottom: 0; width: auto; border-radius: 20px 20px 0 0; transform: translateY(105%); } .g-names { width: 140px; } .g-lab { font-size: 12px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .sheet { transform: none; opacity: 0; transition: opacity .2s !important; } .sheet.on { opacity: 1; }
}
@media (prefers-reduced-transparency: reduce) { .side, .sheet, .scrim { -webkit-backdrop-filter: none; backdrop-filter: none; } .side, .sheet { background: var(--card); } }
@media (prefers-contrast: more) { .list, .card, .item, .chip, .panel, .mini, .sec { box-shadow: 0 0 0 1px var(--tx3); } }

/* ---- people cards: every card has the same four rows and the same footer, so a row of them lines up */
.card.person { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 16px; }
.card.person .top { min-width: 0; } .card.person .who { min-width: 0; } .card.person .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.person .rows > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 38px; border-top: 1px solid var(--line); font-size: 12.5px; }
.card.person .rows > div:first-child { border-top: 0; }
.card.person .rows > div > span { color: var(--tx2); }
.card.person .split { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; } .card.person .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card.person .foot { display: flex; gap: 8px; } .card.person .foot .btn { flex: 1; }
.card.person .seg { max-width: 100%; overflow-x: auto; }

/* ---- the project switcher */
button.project { width: 100%; border: 0; text-align: left; cursor: pointer; color: inherit; position: relative; transition: background .15s, transform .15s; } button.project:hover { background: var(--fill2); } button.project:active { transform: scale(.985); }
.project .chev { margin-left: auto; width: 16px; height: 16px; flex: none; fill: none; stroke: var(--tx3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pswitch { position: absolute; left: 14px; top: 66px; width: 244px; z-index: 40; padding: 6px; border-radius: 14px; background: var(--sheet); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); box-shadow: 0 18px 50px rgba(0, 0, 0, .28), 0 0 0 1px var(--line);
           max-height: 70vh; overflow-y: auto; transform-origin: top center; animation: pop .28s cubic-bezier(.32, .72, 0, 1); } .pswitch[hidden] { display: none; } @keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
.pswitch .psh { padding: 6px 8px 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tx3); }
.pswitch button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 9px; text-align: left; cursor: pointer; } .pswitch button:hover { background: var(--fill); } .pswitch button[aria-selected="true"] { background: rgba(10, 108, 255, .12); }
.pswitch i { width: 9px; height: 9px; border-radius: 50%; flex: none; } .pswitch b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; } .pswitch small { display: block; font-size: 11px; color: var(--tx2); }
/* ---- quality checks */
.qbar { height: 5px; border-radius: 3px; background: var(--fill2); overflow: hidden; margin: 6px 0 10px; } .qbar i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .7s cubic-bezier(.32, .72, 0, 1); } .qbar.mini { width: 90px; margin: 0 10px; flex: none; }
.qchecks { display: flex; flex-direction: column; gap: 4px; } .qchk { display: flex; align-items: flex-start; gap: 10px; padding: 6px 4px; border-radius: 10px; } .qchk span { flex: 1; min-width: 0; line-height: 1.35; padding-top: 2px; } .qchk small { display: block; color: var(--tx3); font-size: 11px; } .qchk.on span { color: var(--tx2); }
.tickb { width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--tx3); background: none; cursor: pointer; flex: none; display: grid; place-items: center; padding: 0; transition: background .2s, border-color .2s, transform .15s; } .tickb:active { transform: scale(.88); }
.tickb svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s cubic-bezier(.32, .72, 0, 1); } .qchk.on .tickb { background: var(--green); border-color: var(--green); } .qchk.on .tickb svg { stroke-dashoffset: 0; }

/* ---- people editor (Admin settings, Setup) */
dialog.wide { width: min(560px, calc(100vw - 32px)); }
.chk-row { display: flex; flex-wrap: wrap; gap: 6px 14px; } .chk-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--tx); margin: 0; }
.apps-row { display: flex; flex-wrap: wrap; gap: 6px; } .apps-row .pill button { border: 0; background: none; padding: 0 0 0 4px; cursor: pointer; font-weight: 700; color: inherit; opacity: .7; } .apps-row .pill button:hover { opacity: 1; }
.pswitch .psh.team { color: var(--green); }

/* ---- code browser */
.crumbs { font-size: 12.5px; color: var(--tx2); margin: 0 4px 10px; word-break: break-all; } .crumbs a { color: var(--acc); }
.codebox { margin-top: 10px; max-height: 62vh; overflow: auto; border-radius: 12px; background: var(--fill); padding: 8px 0; font: 12px/1.55 var(--mono); }
.cl { display: flex; min-width: max-content; } .cl i { width: 3px; flex: none; border-radius: 2px; } .cl b { width: 44px; flex: none; text-align: right; padding-right: 12px; color: var(--tx3); font-weight: 400; user-select: none; } .cl span { white-space: pre; padding-right: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---- something is loading: a ring, never a frozen page */
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fill2); border-top-color: var(--acc); animation: spin .8s linear infinite; flex: none; }
.loading { display: flex; align-items: center; gap: 12px; padding: 16px 18px; color: var(--tx2); font-size: 13px; border-radius: 14px; background: var(--card); box-shadow: var(--card-shadow, 0 0 0 1px var(--line)); }
.loading.big { padding: 26px 22px; font-size: 14px; } .loading.big .spin { width: 22px; height: 22px; border-width: 3px; }
.panel .loading, .rail .loading { box-shadow: none; background: none; padding: 12px 4px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid rgba(128, 128, 128, .35); border-top-color: var(--tx); animation: spin .7s linear infinite; }
.btn.primary.busy::after { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin, .btn.busy::after { animation-duration: 2.4s; } }

/* ---- activity by chat */
.chatgrp { margin: 0 0 14px; } .chatgrp > summary { display: flex; align-items: center; gap: 10px; padding: 8px 6px; cursor: pointer; list-style: none; font-size: 13px; } .chatgrp > summary::-webkit-details-marker { display: none; }
.chatgrp > summary em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--tx3); }
.chatgrp > summary::before { content: '›'; color: var(--tx3); transition: transform .2s; display: inline-block; } .chatgrp[open] > summary::before { transform: rotate(90deg); }
.chip-ch { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--fill2); color: var(--tx2); } .chip-ch.grp { background: var(--acc-t); color: var(--acc); }
.item.has-acts { position: relative; display: block; } .item.has-acts .ibody { display: block; color: inherit; }
.item .iacts { display: flex; gap: 6px; position: absolute; right: 10px; top: 8px; opacity: 0; transition: opacity .15s; } .item:hover .iacts, .item:focus-within .iacts, .item.is-hidden .iacts { opacity: 1; } @media (hover: none) { .item .iacts { opacity: 1; } }
.item.is-hidden { opacity: .6; }
.aliaspick { width: auto; max-width: 150px; margin-left: 6px; padding: 2px 6px; font-size: 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--fill); }

/* ---- activity: channel badges, search, threads */
.chb { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; background: var(--fill2); color: var(--tx2); text-transform: none; }
.chb.whatsapp { background: rgba(37, 211, 102, .16); color: #138a45; } .chb.telegram { background: rgba(42, 171, 238, .16); color: #1887c0; } .chb.discord { background: rgba(88, 101, 242, .16); color: #4a55d6; }
.chb.slack { background: rgba(224, 30, 90, .12); color: #c2154c; } .chb.email { background: rgba(255, 159, 10, .16); color: #b36a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chb.whatsapp { color: #4fe08a; } :root:not([data-theme="light"]) .chb.telegram { color: #5bc4f5; } :root:not([data-theme="light"]) .chb.discord { color: #99a2ff; } :root:not([data-theme="light"]) .chb.slack { color: #ff7ba5; } :root:not([data-theme="light"]) .chb.email { color: #ffbe5c; } }
:root[data-theme="dark"] .chb.whatsapp { color: #4fe08a; } :root[data-theme="dark"] .chb.telegram { color: #5bc4f5; } :root[data-theme="dark"] .chb.discord { color: #99a2ff; } :root[data-theme="dark"] .chb.slack { color: #ff7ba5; } :root[data-theme="dark"] .chb.email { color: #ffbe5c; }
.acttools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; max-width: 820px; }
.acttools input[type=search] { flex: 1 1 220px; min-width: 0; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--tx); font: inherit; font-size: 13px; }
.chipbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; max-width: 820px; }
.chipbar .chipb { border: 0; background: var(--fill); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--tx2); cursor: pointer; } .chipbar .chipb.on { background: var(--tx); color: var(--bg); }
.tnode { position: relative; } .tkids { margin: 4px 0 8px 18px; padding-left: 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.tkids .item { background: var(--fill); box-shadow: none; }
.chin { padding-left: 14px; border-left: 2px solid var(--line); margin-left: 6px; }
.chatgrp > summary .chb { flex: none; }
