/* =====================================================================
   ExCo Huddle - styles (no external dependencies; works on an intranet)
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #f4f5f8;
  --bg-2: #eceef3;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f7;
  --line: #e3e6ec;
  --line-2: #d4d8e0;
  --text: #0e1116;
  --text-2: #4b5260;
  --text-3: #7a8191;
  --accent: #2a78d6;
  --accent-2: #6250d6;
  --accent-soft: #e6f0fc;
  --grad: linear-gradient(135deg, #3987e5 0%, #6250d6 100%);
  /* status (always shown with a label) */
  --st-todo: #8a909c;   --st-todo-bg: #eff1f4;
  --st-prog: #2a78d6;   --st-prog-bg: #e6f0fc;
  --st-block: #d63c3b;  --st-block-bg: #fdecec;
  --st-done: #138a5e;   --st-done-bg: #e3f6ee;
  --warn: #b86e00;      --warn-bg: #fff3dc;
  /* sequential (heatmap) */
  --seq-0: #eef1f5; --seq-1: #cde2fb; --seq-2: #86b6ef; --seq-3: #3987e5; --seq-4: #1c5cab;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px -6px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 60px -12px rgba(16, 24, 40, .28);
  --r: 14px;
  --r-sm: 9px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0e12; --bg-2: #12151b; --surface: #161a21; --surface-2: #1b2029; --surface-3: #212733;
    --line: #262c38; --line-2: #313848; --text: #eef0f4; --text-2: #b4bac6; --text-3: #848b99;
    --accent: #4a92ea; --accent-2: #9085e9; --accent-soft: #1a2a40;
    --st-todo: #9aa1ad; --st-todo-bg: #232833; --st-prog: #4a92ea; --st-prog-bg: #182a40;
    --st-block: #ef6b6a; --st-block-bg: #3a1c1f; --st-done: #34c48c; --st-done-bg: #13301f;
    --warn: #f0a730; --warn-bg: #36290f;
    --seq-0: #1d222c; --seq-1: #184f95; --seq-2: #256abf; --seq-3: #3987e5; --seq-4: #86b6ef;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e12; --bg-2: #12151b; --surface: #161a21; --surface-2: #1b2029; --surface-3: #212733;
  --line: #262c38; --line-2: #313848; --text: #eef0f4; --text-2: #b4bac6; --text-3: #848b99;
  --accent: #4a92ea; --accent-2: #9085e9; --accent-soft: #1a2a40;
  --st-todo: #9aa1ad; --st-todo-bg: #232833; --st-prog: #4a92ea; --st-prog-bg: #182a40;
  --st-block: #ef6b6a; --st-block-bg: #3a1c1f; --st-done: #34c48c; --st-done-bg: #13301f;
  --warn: #f0a730; --warn-bg: #36290f;
  --seq-0: #1d222c; --seq-1: #184f95; --seq-2: #256abf; --seq-3: #3987e5; --seq-4: #86b6ef;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav svg, .brand svg { fill: currentColor; stroke: none; }
.muted { color: var(--text-3); }
.tiny { font-size: 12px; }
[hidden] { display: none !important; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(98, 80, 214, .6); }
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--text-3); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.side-link { font-size: 13px; color: var(--text-3); }
.side-link:hover { color: var(--accent); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 11px; border-radius: 99px; background: var(--st-done-bg); color: var(--st-done); font-size: 12px; font-weight: 600; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.live-pill.off { background: var(--st-block-bg); color: var(--st-block); }
.live-pill.flash { animation: flash .9s; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes flash { 30% { transform: scale(1.12); } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 28px; background: var(--bg); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.top-title h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.top-title span { font-size: 13px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--text-3); }
.search input, .search input:focus { border: 0; outline: 0; box-shadow: none; background: transparent; width: 100%; height: 36px; padding: 0; color: var(--text); }
.view { padding: 8px 28px 48px; outline: none; }
.icon-btn.only-mobile { display: none; }

/* ------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .08s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { border: 0; color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px rgba(74, 70, 220, .8); }
.btn-primary:hover { box-shadow: 0 8px 22px -8px rgba(74, 70, 220, .95); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-danger { color: var(--st-block); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; }
input[type=text], input[type=password], input[type=date], input[type=email], input:not([type]), select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 22px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip .sw { width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--text-3)); }
.chip-btn { cursor: pointer; border: 1px solid var(--line); background: var(--surface); }
.chip-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* status badge: icon + label, never color alone */
.st { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st svg { width: 12px; height: 12px; stroke-width: 2.6; }
.st-todo { background: var(--st-todo-bg); color: var(--st-todo); }
.st-in_progress { background: var(--st-prog-bg); color: var(--st-prog); }
.st-blocked { background: var(--st-block-bg); color: var(--st-block); }
.st-done { background: var(--st-done-bg); color: var(--st-done); }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.prio svg { width: 12px; height: 12px; }
.prio-critical { color: var(--st-block); }
.prio-high { color: var(--warn); }

.avatar { --c: #2a78d6; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; font-size: 14px; flex: none; box-shadow: 0 0 0 2px var(--surface); letter-spacing: 0; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 19px; }
.avatar.xl { width: 92px; height: 92px; font-size: 38px; }

.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar.done > i { background: var(--st-done); }
.bar.blocked > i { background: var(--st-block); }

/* ------------------------------------------------------------- cards / dashboard */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.card-h h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.card-h .sub { color: var(--text-3); font-size: 12px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 10px 18px 18px; }
.grid { display: grid; gap: 18px; }
.g-kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-2 { grid-template-columns: 1.55fr 1fr; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section { margin-top: 18px; }

.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 22px 26px; border-radius: 18px; color: #fff; background: radial-gradient(1200px 300px at 0% 0%, #4f9cf0 0%, transparent 60%), radial-gradient(800px 300px at 100% 100%, #7c5ce6 0%, transparent 60%), linear-gradient(120deg, #1f5fb8, #4b3bb8); box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M40 0H0v40' fill='none' stroke='white' stroke-opacity='.07'/></svg>"); pointer-events: none; }
.hero h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.hero p { margin: 0; opacity: .88; }
.hero .hero-r { margin-left: auto; display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.hero .btn { background: #fff; color: #2b3bb0; border: 0; height: 42px; padding: 0 18px; }
.hero .stack { display: flex; }
.hero .stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); position: relative; }
.hero .stack .avatar.pending { filter: grayscale(1) opacity(.55); }
.hero .stack .avatar.ok::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: #34c48c; border: 2px solid #fff; }
.hero-l { position: relative; z-index: 1; }

.kpi { position: relative; padding: 16px 18px; overflow: hidden; }
.kpi .k-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.kpi .k-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.kpi .k-ico svg { width: 15px; height: 15px; }
.kpi .k-val { margin-top: 10px; font-size: 32px; font-weight: 750; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .k-foot { margin-top: 8px; font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.kpi.bad .k-ico { background: var(--st-block-bg); color: var(--st-block); }
.kpi.bad .k-val { color: var(--st-block); }
.kpi.good .k-ico { background: var(--st-done-bg); color: var(--st-done); }
.kpi.info .k-ico { background: var(--st-prog-bg); color: var(--st-prog); }
.kpi.warn .k-ico { background: var(--warn-bg); color: var(--warn); }
.kpi.clickable { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.kpi.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.delta-up { color: var(--st-done); font-weight: 700; }
.delta-down { color: var(--st-block); font-weight: 700; }

/* member pulse cards */
.g-members { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.member { padding: 16px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; }
.member:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.member .m-top { display: flex; align-items: center; gap: 11px; }
.member .m-name { font-weight: 700; }
.member .m-role { font-size: 12px; color: var(--text-3); }
.member .m-badge { margin-left: auto; }
.badge-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--st-done); background: var(--st-done-bg); padding: 3px 8px; border-radius: 99px; }
.badge-wait { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg); padding: 3px 8px; border-radius: 99px; }
.badge-ok svg, .badge-wait svg { width: 11px; height: 11px; stroke-width: 3; }
.m-stack { display: flex; height: 10px; gap: 2px; margin: 14px 0 8px; }
.m-stack i { display: block; height: 100%; border-radius: 3px; min-width: 4px; }
.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: left; }
.m-stats div { font-size: 11px; color: var(--text-3); }
.m-stats b { display: block; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.m-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--text-3); }
.m-foot .od { color: var(--st-block); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; fill: initial; stroke: none; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis-t { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .val-t { fill: var(--text-2); font-size: 11px; font-weight: 700; font-family: var(--font); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .bar-m { transition: opacity .15s; }
.chart .grp:hover .bar-m { opacity: .8; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; }
.tip.on { opacity: 1; }
.tip b { font-weight: 700; }

.heat { display: grid; gap: 4px; align-items: center; font-size: 12px; }
.heat .hn { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat .hc { height: 26px; border-radius: 6px; background: var(--seq-0); cursor: default; transition: transform .1s; }
.heat .hc:hover { transform: scale(1.12); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--text-3); }
.heat .hd { text-align: center; color: var(--text-3); font-size: 10.5px; }
.heat .hc.today { box-shadow: inset 0 0 0 2px var(--accent); }
.seq-scale { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); }
.seq-scale i { width: 16px; height: 10px; border-radius: 3px; display: inline-block; }

.stream-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stream-row:last-child { border-bottom: 0; }
.stream-row .sname { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.stream-row .sname em { font-style: normal; color: var(--text-3); font-weight: 500; }
.stream-row .snum { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.stream-row .bar { grid-column: 1 / -1; height: 8px; }

/* lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 11px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover .li-t { color: var(--accent); }
.li-t { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.li-m { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.li-r { margin-left: auto; text-align: right; flex: none; }
.empty { padding: 26px 10px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty svg { width: 32px; height: 32px; display: block; margin: 0 auto 8px; opacity: .5; }

.feed { max-height: 520px; overflow: auto; margin-right: -8px; padding-right: 8px; }
.fi { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fi:last-child { border-bottom: 0; }
.fi .ft { color: var(--text-2); line-height: 1.4; }
.fi .ft b { color: var(--text); }
.fi .ft a { color: var(--text); font-weight: 600; cursor: pointer; }
.fi .ft a:hover { color: var(--accent); }
.fi .fn { margin-top: 4px; padding: 7px 10px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; white-space: pre-wrap; }
.fi .fw { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.fi.new { animation: newin 1.4s ease-out; }
@keyframes newin { 0% { background: var(--accent-soft); } 100% { background: transparent; } }

/* ------------------------------------------------------------- board */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 16px; }
.toolbar .sp { flex: 1; }
.toolbar select { width: auto; max-width: 220px; height: 34px; }
.board { display: flex; flex-direction: column; gap: 14px; }
.cols-head { position: sticky; top: 66px; z-index: 5; display: grid; grid-template-columns: 200px repeat(4, minmax(220px, 1fr)); gap: 12px; padding: 8px 0; background: var(--bg); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.col-h .n { margin-left: auto; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.col-h::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--c); }
.lane { display: grid; grid-template-columns: 200px repeat(4, minmax(220px, 1fr)); gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.lane-h { position: sticky; top: 126px; align-self: start; display: flex; flex-direction: column; gap: 10px; padding: 6px; }
.lane-h .who { display: flex; gap: 10px; align-items: center; }
.lane-h .who b { display: block; font-size: 14px; }
.lane-h .who small { color: var(--text-3); font-size: 12px; }
.lane-h .lstats { font-size: 12px; color: var(--text-3); display: flex; flex-direction: column; gap: 6px; }
.lane.collapsed .cell { display: none; }
.lane.collapsed { grid-template-columns: 1fr; }
.lane.collapsed .lane-h { position: static; flex-direction: row; align-items: center; }
.cell { min-height: 90px; display: flex; flex-direction: column; gap: 8px; padding: 4px; border-radius: 12px; transition: background .15s, box-shadow .15s; }
.cell.drop { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.add-ghost { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; color: var(--text-3); font-size: 13px; cursor: pointer; border: 1px dashed transparent; opacity: 0; transition: opacity .15s; }
.lane:hover .add-ghost, .add-ghost:focus { opacity: 1; }
.add-ghost:hover { border-color: var(--line-2); color: var(--accent); background: var(--surface); }
.add-ghost svg { width: 14px; height: 14px; }

.tcard { position: relative; padding: 11px 12px 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s, box-shadow .15s, border-color .15s; }
.tcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sc, transparent); }
.tcard:hover { box-shadow: var(--shadow); border-color: var(--line-2); transform: translateY(-1px); }
.tcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.tcard[draggable=true] { cursor: grab; }
.tcard .tt { font-weight: 600; font-size: 13.5px; line-height: 1.35; word-break: break-word; }
.tcard .tm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.tcard .tn { margin-top: 8px; font-size: 12px; color: var(--text-2); background: var(--surface-3); padding: 6px 8px; border-radius: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; max-height: calc(2.9em + 12px); }
.tcard .tp { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tcard .tp .bar { flex: 1; }
.due { display: inline-flex; align-items: center; gap: 4px; }
.due svg { width: 12px; height: 12px; }
.due.late { color: var(--st-block); font-weight: 700; }
.due.soon { color: var(--warn); font-weight: 700; }
.help-flag { display: inline-flex; align-items: center; gap: 3px; color: var(--st-block); font-weight: 700; }
.help-flag svg { width: 12px; height: 12px; }
.tcard.fresh { animation: newin 1.6s ease-out; }
.tcard.done .tt { color: var(--text-2); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; }
.kanban .kcol { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.kanban .cell { min-height: 300px; }
.tcard .owner { display: inline-flex; align-items: center; gap: 5px; }

/* ------------------------------------------------------------- my update */
.my-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.checkin { position: sticky; top: 80px; }
.checkin .card-b { display: flex; flex-direction: column; gap: 12px; }
.ci-done { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--st-done-bg); color: var(--st-done); font-weight: 600; font-size: 13px; }
.mood { display: flex; gap: 6px; }
.mood button { flex: 1; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-2); }
.mood button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.draft-btn { align-self: flex-start; font-size: 12px; }
.progress-ring { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring .ring-t { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.urow { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); transition: background .3s; }
.urow:last-child { border-bottom: 0; }
.urow.saved { background: var(--st-done-bg); }
.urow .u-t { font-weight: 600; cursor: pointer; }
.urow .u-t:hover { color: var(--accent); }
.urow .u-m { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.urow .u-last { margin-top: 8px; font-size: 12px; color: var(--text-2); }
.urow .u-ctrl { display: flex; flex-direction: column; gap: 8px; }
.urow .u-prog { display: flex; align-items: center; gap: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.urow .u-prog b { width: 36px; text-align: right; }
.urow .u-note { display: flex; gap: 6px; }
.urow .u-note input { height: 34px; }
.urow .u-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.upd-today { display: inline-flex; align-items: center; gap: 4px; color: var(--st-done); font-weight: 700; }
.upd-today svg { width: 12px; height: 12px; stroke-width: 3; }
.group-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.group-h:first-child { border-radius: var(--r) var(--r) 0 0; }

/* ------------------------------------------------------------- modal */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 20, .5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2,.8,.2,1); }
.modal.sm { width: min(460px, 100%); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-h h3 { margin: 0; font-size: 17px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 20px 22px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.modal-f .left { margin-right: auto; display: flex; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.task-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; font-size: 13px; }
.tl::before { content: ""; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c, var(--line-2)); }
.tl .tl-w { font-size: 11px; color: var(--text-3); }
.tl .tl-n { margin-top: 4px; padding: 7px 10px; background: var(--surface-3); border-radius: 8px; white-space: pre-wrap; color: var(--text-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* dropdown & toasts */
.me-menu { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 40; }
.dropdown .dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dropdown .dd-head small { display: block; color: var(--text-3); }
.dropdown button, .dropdown a { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 13.5px; }
.dropdown button:hover, .dropdown a:hover { background: var(--surface-3); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 14px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .2s; }
.toast.err { background: var(--st-block); color: #fff; }
.toast svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------- huddle mode */
.huddle { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; color: #eef0f4; background: radial-gradient(900px 500px at 10% -10%, rgba(57,135,229,.35), transparent 60%), radial-gradient(900px 600px at 110% 110%, rgba(98,80,214,.35), transparent 60%), #0a0d13; overflow: hidden; }
.huddle .h-top { display: flex; align-items: center; gap: 16px; padding: 16px 28px; border-bottom: 1px solid rgba(255,255,255,.08); }
.huddle .h-top .brand b { color: #fff; }
.huddle .h-top .brand small { color: #9aa3b5; }
.h-people { display: flex; gap: 6px; margin: 0 auto; }
.h-person { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid transparent; cursor: pointer; color: #b9c0cd; font-size: 13px; font-weight: 600; transition: all .2s; }
.h-person .avatar { width: 26px; height: 26px; font-size: 12px; box-shadow: none; }
.h-person.on { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.h-person.past { opacity: .5; }
.h-ctrl { display: flex; gap: 8px; align-items: center; }
.h-ctrl .icon-btn, .huddle .btn:not(.btn-primary) { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #e6e9ef; }
.h-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: #9aa3b5; font-size: 13px; }
.h-stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 0; }
.h-main { padding: 26px 34px; overflow: auto; animation: slidein .35s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } }
.h-side { border-left: 1px solid rgba(255,255,255,.08); padding: 22px; display: flex; flex-direction: column; gap: 18px; overflow: auto; background: rgba(255,255,255,.02); }
.h-who { display: flex; align-items: center; gap: 22px; }
.h-who h2 { margin: 0; font-size: 40px; letter-spacing: -.03em; line-height: 1.05; }
.h-who p { margin: 6px 0 0; color: #9aa3b5; font-size: 15px; }
.h-who .avatar { box-shadow: 0 0 0 4px rgba(255,255,255,.12), 0 20px 40px -10px var(--c); }
.h-kpis { display: flex; gap: 10px; margin-left: auto; }
.h-kpi { min-width: 96px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.h-kpi b { display: block; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.h-kpi span { font-size: 12px; color: #9aa3b5; }
.h-kpi.red b { color: #ff8a89; }
.h-kpi.green b { color: #5be0a8; }
.h-ci { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.h-box { padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.h-box h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #9aa3b5; display: flex; align-items: center; gap: 8px; }
.h-box h4 i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.h-box .txt { white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: #e6e9ef; }
.h-box .none { color: #6f7889; font-style: italic; }
.h-box.blk { border-color: rgba(239,107,106,.35); background: rgba(239,107,106,.08); }
.h-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.h-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.h-item:last-child { border-bottom: 0; }
.h-item .t { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.h-item .m { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; color: #9aa3b5; }
.h-item .m .bar { flex: 1; background: rgba(255,255,255,.1); }
.h-item .n { margin-top: 6px; font-size: 13px; color: #c3c9d4; }
.h-item .due.late { color: #ff8a89; }
.timer { position: relative; width: 190px; height: 190px; margin: 4px auto 0; }
.timer svg { width: 190px; height: 190px; transform: rotate(-90deg); }
.timer .tt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer .tt b { font-size: 44px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.timer .tt span { font-size: 12px; color: #9aa3b5; margin-top: 6px; }
.timer.over .tt b { color: #ff8a89; }
.timer-ctrl { display: flex; justify-content: center; gap: 8px; }
.h-side h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #9aa3b5; }
.h-side textarea, .h-side select { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }
.h-side select option { color: #000; }
.h-notes { display: flex; flex-direction: column; gap: 8px; }
.h-note { padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 13px; color: #dfe3ea; }
.h-note .ty { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-right: 6px; }
.ty-decision { color: #b4abff; } .ty-action { color: #ffc65c; } .ty-note { color: #8fbdf4; }
.h-foot { display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-top: 1px solid rgba(255,255,255,.08); color: #9aa3b5; font-size: 12px; }
.h-foot kbd { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); font-family: inherit; font-size: 11px; color: #dfe3ea; }
.h-foot .h-prog { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.h-foot .h-prog i { display: block; height: 100%; background: var(--grad); transition: width .4s; }
.h-intro { display: grid; place-items: center; text-align: center; height: 100%; }
.h-intro h2 { font-size: 52px; margin: 0; letter-spacing: -.03em; }
.h-intro p { color: #9aa3b5; font-size: 17px; }
.h-roll { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 30px 0; }
.h-roll .r { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; font-size: 13px; font-weight: 600; }
.h-roll .r small { font-weight: 700; font-size: 11px; }
.h-roll .r.ok small { color: #5be0a8; } .h-roll .r.no small { color: #ffc65c; }
.h-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0; width: min(900px, 100%); }

/* ------------------------------------------------------------- admin / tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; background: var(--c); cursor: pointer; }
.swatches button.on { border-color: var(--text); }

/* ------------------------------------------------------------- login */
.login-body { min-height: 100vh; display: grid; place-items: center; overflow: hidden; background: #0a0d13; color: #eef0f4; }
.login-aurora span { position: fixed; width: 60vw; height: 60vw; border-radius: 50%; filter: blur(90px); opacity: .45; animation: drift 18s ease-in-out infinite alternate; }
.login-aurora span:nth-child(1) { background: #2a78d6; left: -20vw; top: -25vw; }
.login-aurora span:nth-child(2) { background: #6250d6; right: -20vw; bottom: -30vw; animation-delay: -6s; }
.login-aurora span:nth-child(3) { background: #1baf7a; left: 30vw; top: 40vh; width: 30vw; height: 30vw; opacity: .18; animation-delay: -12s; }
@keyframes drift { to { transform: translate(6vw, 4vh) scale(1.1); } }
.login-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 400px; gap: 60px; align-items: center; width: min(1060px, 100% - 32px); padding: 40px 0; }
.brand-lg img { width: 46px; height: 46px; border-radius: 13px; }
.brand-lg b { font-size: 18px; color: #fff; }
.brand-lg small { color: #9aa3b5; }
.login-hero h1 { font-size: 52px; line-height: 1.05; letter-spacing: -.035em; margin: 36px 0 16px; }
.login-hero .grad { background: linear-gradient(90deg, #6fb1ff, #b4abff); -webkit-background-clip: text; background-clip: text; }
.login-hero p { color: #b4bac6; font-size: 17px; max-width: 470px; margin: 0; }
.login-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 10px; color: #dfe3ea; }
.login-points i { font-style: normal; color: #5be0a8; margin-right: 8px; font-size: 10px; }
.login-card { display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 20px; background: rgba(22, 26, 33, .72); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.login-card h2 { margin: 0; font-size: 24px; }
.login-card p { margin: 0; }
.login-card label { color: #b4bac6; }
.login-card input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; height: 44px; }
.login-card .btn { height: 46px; margin-top: 6px; }
.alert { padding: 10px 12px; border-radius: 10px; background: rgba(239,107,106,.15); color: #ff9c9b; border: 1px solid rgba(239,107,106,.3); font-size: 13px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .h-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .g-2, .g-3, .my-grid { grid-template-columns: 1fr; }
  .checkin { position: static; }
  .h-stage { grid-template-columns: 1fr; }
  .h-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .task-split { grid-template-columns: 1fr; }
  .board-wrap { overflow-x: auto; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .icon-btn.only-mobile { display: inline-grid; }
  .search { display: none; }
  .topbar, .view { padding-left: 16px; padding-right: 16px; }
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero .hero-r { margin-left: 0; flex-wrap: wrap; gap: 14px; }
  .hero h2 { font-size: 22px; }
  .main { overflow-x: hidden; }
  .urow { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  #newTaskBtn span { display: none; }
  .login-wrap { grid-template-columns: 1fr; gap: 24px; }
  .login-hero h1 { font-size: 34px; }
  .h-ci, .h-cols, .h-sum { grid-template-columns: 1fr; }
  .h-people { display: none; }
  .h-who { flex-wrap: wrap; }
  .h-kpis { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar { display: none; } .app { display: block; } }
