/* ==========================================================
   kpi studio — task platform
   ========================================================== */
:root {
  --red: #C8102E;
  --red-2: #E3263F;
  --yellow: #FBB701;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --font: 'Geist', 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;

  --s-new: #7C8594;
  --s-in_progress: #F0A500;
  --s-submitted: #3B6FF0;
  --s-revisions: #E3263F;
  --s-done: #12A36B;
}

[data-theme='light'] {
  --bg: #F3F0EB;
  --bg-2: #ECE8E2;
  --surface: #FFFFFF;
  --surface-2: #F8F6F2;
  --surface-3: #F0EDE8;
  --line: rgba(20, 18, 16, .08);
  --line-2: rgba(20, 18, 16, .14);
  --text: #141210;
  --text-2: #4A4540;
  --muted: #8A847C;
  --shadow: 0 1px 2px rgba(20, 18, 16, .04), 0 8px 28px -12px rgba(20, 18, 16, .14);
  --shadow-lg: 0 30px 80px -20px rgba(20, 18, 16, .28);
  --glass: rgba(255, 255, 255, .72);
  --brand: var(--red);
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #0C0B0A;
  --bg-2: #121110;
  --surface: #161513;
  --surface-2: #1C1A18;
  --surface-3: #24221F;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #F4F0EA;
  --text-2: #C4BDB4;
  --muted: #8A837A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 90px -20px rgba(0, 0, 0, .8);
  --glass: rgba(22, 21, 19, .72);
  --brand: var(--red-2);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* hidden scrollbars everywhere (scrolling still works) */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .4s, color .4s;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: #141210; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Logo animations ---------- */
.kpi-logo { display: block; overflow: visible; }
.kpi-logo .lg-red { fill: var(--brand); transition: fill .4s; }
.kpi-logo .lg-ast { fill: var(--yellow); transform-box: fill-box; transform-origin: 50% 50%; }
.kpi-logo .lg { transform-box: fill-box; transform-origin: 50% 100%; }
.kpi-logo .g-idot { transform-origin: 50% 50%; }

.kpi-logo.intro .g-k     { animation: rise 1s var(--spring) both .05s; }
.kpi-logo.intro .g-p     { animation: rise 1s var(--spring) both .15s; }
.kpi-logo.intro .g-istem { animation: rise 1s var(--spring) both .25s; }
.kpi-logo.intro .g-idot  { animation: drop 1.1s both .55s; }
.kpi-logo.intro .studio .lg { animation: pop .6s var(--spring) both; }
.kpi-logo.intro .g-s1 { animation-delay: .75s !important; }
.kpi-logo.intro .g-s2 { animation-delay: .8s !important; }
.kpi-logo.intro .g-s3 { animation-delay: .85s !important; }
.kpi-logo.intro .g-s4 { animation-delay: .9s !important; }
.kpi-logo.intro .g-s5 { animation-delay: .95s !important; }
.kpi-logo.intro .g-s6 { animation-delay: 1s !important; }
.kpi-logo.intro .lg-ast  { animation: spinIn 1.3s var(--spring) both .9s, astIdle 14s linear 2.2s infinite; }
.kpi-logo.idle .lg-ast   { animation: astIdle 14s linear infinite; }

.kpi-logo.wave .g-k     { animation: hop .55s var(--spring); }
.kpi-logo.wave .g-p     { animation: hop .55s var(--spring) .07s; }
.kpi-logo.wave .g-istem { animation: hop .55s var(--spring) .14s; }
.kpi-logo.wave .g-idot  { animation: dotHop .7s var(--spring) .18s; }
.kpi-logo.wave .lg-ast  { animation: astSpin .9s var(--spring); }

@keyframes rise   { 0% { transform: translateY(70%) scaleY(.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes drop   { 0% { transform: translateY(-260%); opacity: 0; } 35% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-45%) scale(1.05, .95); } 65% { transform: translateY(0) scale(1.08, .9); } 78% { transform: translateY(-14%); } 90%, 100% { transform: none; } }
@keyframes pop    { 0% { transform: translateY(40%) scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes spinIn { 0% { transform: rotate(-540deg) scale(0); } 100% { transform: rotate(0) scale(1); } }
@keyframes astIdle { to { transform: rotate(360deg); } }
@keyframes astSpin { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(140deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes hop    { 0%, 100% { transform: none; } 40% { transform: translateY(-10%) scale(1.03, .97); } }
@keyframes dotHop { 0%, 100% { transform: none; } 40% { transform: translateY(-60%); } }

/* standalone asterisk */
.ast { display: inline-block; fill: var(--yellow); width: 1em; height: 1em; }
.ast.spin { animation: astIdle 1s linear infinite; }
.ast.slow { animation: astIdle 12s linear infinite; }

/* ---------- Custom asterisk cursor ---------- */
#cursor { position: fixed; left: 0; top: 0; width: 26px; height: 26px; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity .25s; will-change: transform; }
#cursor .c-in { width: 100%; height: 100%; transition: transform .35s var(--spring); }
#cursor svg { width: 100%; height: 100%; fill: var(--yellow); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
#cursor-dot { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--brand); z-index: 10001; pointer-events: none; opacity: 0; }
body.cursor-on #cursor, body.cursor-on #cursor-dot { opacity: 1; }
body.cursor-on, body.cursor-on a, body.cursor-on button, body.cursor-on label, body.cursor-on select, body.cursor-on .clickable { cursor: none; }
body.cursor-on.c-hover #cursor .c-in { transform: scale(1.7) rotate(90deg); }
body.cursor-on.c-down #cursor .c-in { transform: scale(.7) rotate(60deg); }
body.cursor-on.c-text #cursor { opacity: .35; }
body.cursor-on.c-text #cursor .c-in { transform: scale(.55); }
body.cursor-on.c-busy #cursor .c-in { animation: astIdle .8s linear infinite; }

/* burst particles */
.burst { position: fixed; pointer-events: none; z-index: 9999; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.burst svg { width: 100%; height: 100%; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 560; font-size: 14px; cursor: pointer; transition: transform .25s var(--spring), background .2s, border-color .2s, box-shadow .25s; white-space: nowrap; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-1px); border-color: var(--text-2); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -10px var(--brand); }
.btn.primary:hover { box-shadow: 0 12px 30px -10px var(--brand); }
.btn.yellow { background: var(--yellow); border-color: transparent; color: #141210; box-shadow: 0 8px 24px -10px var(--yellow); }
.btn.dark { background: var(--text); color: var(--bg); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--red-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ast { font-size: 16px; }
.btn.loading > *:not(.ast-load) { opacity: 0; }
.btn .ast-load { position: absolute; inset: 0; display: grid; place-items: center; }
.btn .ast-load .ast { font-size: 20px; animation: astIdle .8s linear infinite; }
.btn.primary .ast-load .ast { fill: #fff; }

svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface-2); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); background: var(--surface); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A847C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.row { display: flex; gap: 12px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* segmented */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-3); gap: 2px; position: relative; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 560; color: var(--muted); cursor: pointer; position: relative; z-index: 1; transition: color .2s; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { color: var(--text); }
.seg .seg-pill { position: absolute; top: 4px; bottom: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); transition: left .4s var(--spring), width .4s var(--spring); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 580; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status { color: var(--sc); background: color-mix(in srgb, var(--sc) 13%, transparent); }
.status .dot { background: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 22%, transparent); }
.status[data-s='in_progress'] .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sc) 0%, transparent); } }
.prio-urgent { color: #fff; background: var(--red-2); }
.prio-high { color: var(--red-2); background: color-mix(in srgb, var(--red-2) 12%, transparent); }
.prio-low { color: var(--muted); }

.avatar { --c: var(--brand); width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--c); flex: none; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface); }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.empty { background: var(--surface-3); color: var(--muted); border: 1.5px dashed var(--line-2); box-shadow: none; }

/* ---------- Boot / loader ---------- */
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; transition: opacity .5s, visibility .5s; }
#boot.gone { opacity: 0; visibility: hidden; }
#boot .ast { font-size: 54px; animation: astIdle 1.2s linear infinite; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-stage { position: relative; overflow: hidden; background: var(--bg-2); display: flex; flex-direction: column; justify-content: space-between; padding: 44px; }
.auth-stage .kpi-logo { width: min(520px, 78%); margin: auto; position: relative; z-index: 2; }
.auth-stage .tag { position: relative; z-index: 2; font-family: var(--display); font-size: clamp(22px, 2.4vw, 34px); line-height: 1.15; max-width: 460px; }
.auth-stage .tag em { font-style: normal; color: var(--brand); }
.auth-stage .top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.float-ast { position: absolute; fill: var(--yellow); opacity: .14; z-index: 1; animation: floaty 18s ease-in-out infinite; }
.float-ast svg { width: 100%; height: 100%; animation: astIdle 30s linear infinite; }
@keyframes floaty { 50% { transform: translate(20px, -30px); } }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; z-index: 0; animation: blob 16s ease-in-out infinite; }
@keyframes blob { 33% { transform: translate(40px, -30px) scale(1.1); } 66% { transform: translate(-30px, 30px) scale(.95); } }

.auth-form { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; animation: up .8s var(--out) both .4s; }
.auth-card h1 { font-size: 34px; }
.auth-card .sub { color: var(--muted); margin: -8px 0 8px; }
.auth-card .btn.primary { height: 48px; font-size: 15px; }
.btn.google { height: 48px; font-size: 15px; background: var(--surface); border-color: var(--line-2); gap: 10px; }
.btn.google:hover { border-color: var(--text-2); box-shadow: var(--shadow); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 2px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; }
.auth-links a { color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--text); }
.demo-box { border: 1px dashed var(--line-2); border-radius: var(--r-md); padding: 12px; font-size: 12.5px; color: var(--muted); }
.demo-box b { color: var(--text); }
.demo-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.demo-people button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: transform .2s var(--spring), border-color .2s; }
.demo-people button:hover { transform: translateY(-2px); border-color: var(--brand); }
.theme-fab { position: absolute; top: 24px; right: 24px; }
.err { color: var(--red-2); font-size: 13px; min-height: 18px; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; border-right: 0; background: var(--bg); z-index: 20; }
.side .brand { padding: 6px 10px 22px; }
.side .brand .kpi-logo { width: 120px; }
.nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px; text-decoration: none; color: var(--text-2); font-weight: 540; position: relative; transition: background .2s, color .2s; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.on { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.nav a.on::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--brand); }
.nav a .count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: #fff; }
.nav a .nav-ast { margin-left: auto; font-size: 13px; opacity: 0; transform: scale(0) rotate(-90deg); transition: all .4s var(--spring); }
.nav a.on .nav-ast { opacity: 1; transform: none; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 18px 12px 6px; font-weight: 650; }
.side .new-btn { margin: 4px 0 10px; height: 46px; width: 100%; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface); border: 0; cursor: pointer; transition: transform .25s var(--spring); }
.side .me:hover { transform: translateY(-2px); }
.side .me .who { min-width: 0; flex: 1; }
.side .me .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .who span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 16px 32px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.search { flex: 1; max-width: 420px; position: relative; }
.search .input { height: 40px; padding-left: 40px; border-radius: 999px; background: var(--surface); }
.search svg { position: absolute; left: 14px; top: 11px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.bell { position: relative; }
.bell .badge { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--bg); animation: pulse 1.6s infinite; --sc: var(--brand); }
.view { padding: 8px 32px 60px; flex: 1; }
.view-enter > * { animation: up .6s var(--out) both; }
.view-enter > *:nth-child(2) { animation-delay: .05s; }
.view-enter > *:nth-child(3) { animation-delay: .1s; }
.view-enter > *:nth-child(4) { animation-delay: .15s; }
.view-enter > *:nth-child(5) { animation-delay: .2s; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 18px 0 26px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; }
.page-head h1 .ast { font-size: .62em; vertical-align: .55em; margin-left: 4px; animation: astIdle 10s linear infinite; }
.page-head p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--surface); border: 0; border-radius: var(--r-lg); padding: 20px; position: relative; overflow: hidden; transition: transform .35s var(--spring), box-shadow .3s, background .35s, color .35s; cursor: pointer; }
.stat .lbl { font-size: 12.5px; color: var(--muted); font-weight: 560; display: flex; align-items: center; gap: 8px; transition: color .35s; }
.stat .lbl .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); transition: background .35s; }
.stat .num { font-family: var(--display); font-size: 46px; font-weight: 700; line-height: 1; margin-top: 14px; letter-spacing: -.03em; }
.stat .bg-ast { position: absolute; right: -24px; bottom: -28px; width: 110px; height: 110px; opacity: .08; transition: transform .8s var(--spring), opacity .35s; }
.stat .bg-ast svg { width: 100%; height: 100%; fill: var(--sc); transition: fill .35s; }
/* the red "active" card: the hero by default, or whichever card the mouse is on */
.stat.hero { background: var(--brand); color: #fff; }
.stat.hero .lbl { color: rgba(255, 255, 255, .85); }
.stat.hero .lbl .dot { background: #fff; }
.stat.hero .bg-ast { opacity: .95; }
.stat.hero .bg-ast svg { fill: var(--yellow); }
@media (hover: hover) {
  .stats:hover .stat.hero:not(:hover) { background: var(--surface); color: var(--text); }
  .stats:hover .stat.hero:not(:hover) .lbl { color: var(--muted); }
  .stats:hover .stat.hero:not(:hover) .lbl .dot { background: var(--sc); }
  .stats:hover .stat.hero:not(:hover) .bg-ast { opacity: .08; }
  .stats:hover .stat.hero:not(:hover) .bg-ast svg { fill: var(--sc); }
  .stat:hover { background: var(--brand); color: #fff; transform: translateY(-4px); box-shadow: 0 18px 40px -18px var(--brand); }
  .stat:hover .lbl { color: rgba(255, 255, 255, .85); }
  .stat:hover .lbl .dot { background: #fff; }
  .stat:hover .bg-ast { opacity: .95; transform: rotate(120deg) scale(1.1); }
  .stat:hover .bg-ast svg { fill: var(--yellow); }
}

.dash { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 0; border-radius: var(--r-lg); padding: 20px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-h h3 { font-size: 18px; }

.trow { display: grid; grid-template-columns: 4px 1fr auto auto; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-md); cursor: pointer; transition: background .2s, transform .3s var(--spring); }
.trow:hover { background: var(--surface-2); transform: translateX(4px); }
.trow .bar { width: 4px; height: 34px; border-radius: 4px; background: var(--cc, var(--line-2)); }
.trow .t { min-width: 0; }
.trow .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t span { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty .ast { font-size: 40px; display: block; margin: 0 auto 10px; animation: astIdle 10s linear infinite; }

.feed-item { display: flex; gap: 12px; padding: 10px 4px; font-size: 13.5px; cursor: pointer; border-radius: 10px; }
.feed-item:hover { background: var(--surface-2); }
.feed-item p { margin: 0; color: var(--text-2); }
.feed-item p b { color: var(--text); font-weight: 600; }
.feed-item time { font-size: 11.5px; color: var(--muted); }

/* ---------- Board ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .select { width: auto; height: 36px; border-radius: 999px; background-color: var(--surface); font-size: 13px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.col { background: var(--bg-2); border-radius: var(--r-lg); padding: 12px; min-height: 300px; scroll-snap-align: start; border: 0; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-weight: 650; font-size: 13.5px; }
.col-h .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); }
.col-h .n { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface); padding: 1px 9px; border-radius: 999px; }
.col-list { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border: 0; border-radius: 16px; padding: 14px; cursor: pointer; position: relative; transition: transform .35s var(--spring), box-shadow .3s, border-color .2s; will-change: transform; }
.card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow); }
.card .cl { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: var(--cc); text-transform: uppercase; letter-spacing: .06em; }
.card .cl .sq { width: 8px; height: 8px; border-radius: 3px; background: var(--cc); }
.card h4 { margin: 8px 0 10px; font-size: 14.5px; font-weight: 620; line-height: 1.35; }
.card .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 12px; color: var(--muted); }
.due { display: inline-flex; align-items: center; gap: 4px; }
.due.over { color: var(--red-2); font-weight: 650; }
.due.soon { color: #D88A00; font-weight: 650; }
.card .round { font-size: 11px; font-weight: 700; color: var(--s-revisions); }
.card.flash { animation: flash 1.2s var(--out); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--yellow); } 30% { box-shadow: 0 0 0 4px var(--yellow); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Overlays: modal & drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8, 7, 6, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; opacity: 0; transition: opacity .35s; }
.scrim.open { opacity: 1; }
.modal { position: fixed; left: 50%; top: 50%; z-index: 101; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-lg); transform: translate(-50%, -46%) scale(.94); opacity: 0; transition: transform .5s var(--spring), opacity .3s; }
.modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal.sm { width: min(440px, calc(100vw - 24px)); }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 6px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.m-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.m-head h2 .ast { font-size: 18px; animation: astIdle 8s linear infinite; }
.m-body { padding: 14px 24px; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 22px; position: sticky; bottom: 0; background: var(--surface); }

.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(720px, calc(100vw - 20px)); z-index: 101; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .6s var(--out); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: none; }
.d-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--line); }
.d-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.d-top .sp { flex: 1; }
.d-head h2 { font-size: 26px; line-height: 1.15; }
.d-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.d-meta > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.d-meta label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin-bottom: 4px; }
.d-meta .v { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-body { flex: 1; overflow: auto; padding: 8px 26px 26px; }
.d-actions { padding: 14px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface-2); }
.d-actions .hint { font-size: 12.5px; color: var(--muted); margin-right: auto; }

/* progress track */
.track { display: flex; align-items: center; gap: 0; margin: 18px 0 4px; }
.track .stp { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.track .stp::before { content: ''; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--line-2); z-index: 0; }
.track .stp:first-child::before { display: none; }
.track .stp.done::before, .track .stp.cur::before { background: var(--brand); }
.track .nd { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); position: relative; z-index: 1; display: grid; place-items: center; transition: all .5s var(--spring); }
.track .stp.done .nd { background: var(--brand); border-color: var(--brand); }
.track .stp.done .nd::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.track .stp.cur { color: var(--text); }
.track .stp.cur .nd { border-color: var(--yellow); background: var(--surface); transform: scale(1.25); }
.track .stp.cur .nd svg { width: 14px; height: 14px; fill: var(--yellow); animation: astIdle 4s linear infinite; }

.sec { margin-top: 22px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-h h3 { font-size: 15px; font-family: var(--font); font-weight: 680; letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
.sec-h h3 .n { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.prose { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; color: var(--text-2); line-height: 1.65; }
.prose.copy { border-left: 3px solid var(--yellow); font-size: 15px; color: var(--text); }
.copybtn { position: relative; }

.links { display: flex; flex-direction: column; gap: 6px; }
.links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-decoration: none; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background .2s; }
.links a:hover { background: var(--surface-3); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.file { border-radius: 14px; background: var(--surface-2); border: 0; overflow: hidden; position: relative; transition: transform .3s var(--spring); }
.file:hover { transform: translateY(-3px); }
.file .th { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--surface-3); overflow: hidden; }
.file .th img, .file .th video { width: 100%; height: 100%; object-fit: cover; }
.file .th .ext { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--muted); }
.file .fn { padding: 8px 10px; font-size: 12px; }
.file .fn b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .fn span { color: var(--muted); font-size: 11px; }
.file .fx { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.file:hover .fx { opacity: 1; }
.file .fx button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: var(--glass); backdrop-filter: blur(8px); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.round-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 8px; display: flex; align-items: center; gap: 8px; }
.round-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 18px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .25s; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--brand); color: var(--text); background: color-mix(in srgb, var(--brand) 6%, var(--surface-2)); }
.drop.over { transform: scale(1.01); }
.drop b { color: var(--brand); }
.pending { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pending .chip button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); display: grid; }

.upl { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.upl i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--yellow)); transition: width .3s; }

/* comments */
.thread { display: flex; flex-direction: column; gap: 14px; }
.cm { display: flex; gap: 10px; animation: up .5s var(--out) both; }
.cm .bub { background: var(--surface-2); border-radius: 4px 16px 16px 16px; padding: 10px 14px; flex: 1; min-width: 0; }
.cm .bub .h { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin-bottom: 2px; }
.cm .bub .h b { font-weight: 650; }
.cm .bub .h time { color: var(--muted); font-size: 11.5px; }
.cm .bub p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.cm.revision .bub { background: color-mix(in srgb, var(--red-2) 9%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--red-2) 25%, transparent); }
.cm.revision .tagr { font-size: 10.5px; font-weight: 750; color: var(--red-2); text-transform: uppercase; letter-spacing: .08em; }
.cm.system { align-items: center; font-size: 12.5px; color: var(--muted); padding-left: 6px; }
.cm.system .ast { font-size: 14px; flex: none; }
.cm.system b { color: var(--text-2); }
.compose { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; }
.compose .textarea { min-height: 46px; height: 46px; border-radius: 22px; padding: 12px 16px; resize: none; }

/* ---------- Clients & Team ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ccard { background: var(--surface); border: 0; border-radius: var(--r-lg); padding: 20px; position: relative; overflow: hidden; transition: transform .35s var(--spring), box-shadow .3s; }
.ccard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ccard .sw { width: 44px; height: 44px; border-radius: 14px; background: var(--cc); display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; margin-bottom: 16px; transition: transform .5s var(--spring); }
.ccard:hover .sw { transform: rotate(-8deg) scale(1.08); }
.ccard h3 { font-size: 19px; }
.ccard .nums { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ccard .nums b { color: var(--text); font-size: 15px; }
.ccard .acts { position: absolute; top: 14px; right: 14px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.ccard:hover .acts { opacity: 1; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; transition: transform .3s var(--spring); box-shadow: 0 0 0 2px var(--surface); }
.colors button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); transform: scale(1.1); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr { transition: background .2s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .select { height: 34px; width: auto; min-width: 170px; font-size: 13px; }
.person { display: flex; align-items: center; gap: 10px; }
.person > div b { display: block; font-weight: 600; }
.person > div span { font-size: 12px; color: var(--muted); }

.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .3s; flex: none; padding: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .4s var(--spring); }
.switch.on { background: var(--s-done); border-color: transparent; }
.switch.on::after { transform: translateX(18px); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 560; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .6s var(--spring) both; }
.toast .ast { font-size: 20px; animation: spinIn .9s var(--spring) both; }
.toast.err .ast { fill: var(--red-2); }
.toast.out { animation: toastOut .35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(30px) scale(.8); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(16px) scale(.9); } }

/* celebration */
.celebrate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; pointer-events: none; }
.celebrate .big { width: 220px; height: 220px; animation: celeb 1.6s var(--spring) both; }
.celebrate .big svg { width: 100%; height: 100%; fill: var(--yellow); filter: drop-shadow(0 20px 40px rgba(251, 183, 1, .45)); }
.celebrate .word { position: absolute; font-family: var(--display); font-weight: 800; font-size: 64px; color: var(--text); animation: celebW 1.6s var(--spring) both .15s; letter-spacing: -.03em; }
@keyframes celeb { 0% { transform: scale(0) rotate(-200deg); opacity: 0; } 35% { transform: scale(1.1) rotate(10deg); opacity: 1; } 70% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(1.6) rotate(90deg); opacity: 0; } }
@keyframes celebW { 0% { transform: translateY(40px) scale(.6); opacity: 0; } 35%, 70% { transform: none; opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }

/* menu */
.menu { position: fixed; z-index: 150; min-width: 220px; background: var(--surface); border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; animation: menuIn .35s var(--spring) both; transform-origin: bottom left; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-size: 13.5px; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px; }
.menu .mh { padding: 10px 12px; font-size: 12px; color: var(--muted); }
@keyframes menuIn { from { opacity: 0; transform: scale(.9) translateY(6px); } }
.notif { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; transform-origin: top right; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-stage { min-height: 42vh; padding: 28px; }
  .auth-stage .tag { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); justify-content: space-around; }
  .side .brand, .side .nav-label, .side .new-btn, .side .me .who { display: none; }
  .side .nav { display: contents; }
  .nav a { flex-direction: column; height: auto; padding: 6px 8px; gap: 2px; font-size: 10.5px; }
  .nav a.on { box-shadow: none; background: transparent; color: var(--brand); }
  .nav a.on::before, .nav a .nav-ast { display: none; }
  .nav a .count { position: absolute; top: 0; right: 4px; padding: 0 5px; font-size: 10px; }
  .side .me { margin: 0; padding: 4px; border: 0; background: none; }
  .topbar { padding: 12px 16px; gap: 8px; }
  .topbar .spacer { display: none; }
  .search { min-width: 0; }
  .page-head .btn.primary { display: none; }
  .side .me > svg { display: none; }
  .topbar .mlogo { display: block !important; width: 64px; }
  .view { padding: 4px 16px 110px; }
  .board { margin: 0 -16px; padding-left: 16px; padding-right: 16px; grid-template-columns: repeat(5, 82vw); }
  .d-meta { grid-template-columns: 1fr 1fr; }
  .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .fab { display: grid !important; }
  .table .hide-m { display: none; }
}
@media (max-width: 560px) {
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .stat .num { font-size: 36px; }
  .search { max-width: none; }
  .page-head h1 { font-size: 30px; }
  .modal { top: auto; bottom: 0; left: 0; right: 0; width: 100vw; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
  .modal.open { transform: none; }
  .modal.sm { width: 100vw; }
}
.fab { display: none; position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; border: 0; place-items: center; z-index: 30; box-shadow: 0 14px 30px -10px var(--brand); }
.fab .ast { fill: #fff; font-size: 26px; transition: transform .5s var(--spring); }
.fab:active .ast { transform: rotate(120deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* View-transition theme reveal */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ===================== v2 additions ===================== */
/* quick edit */
.chip.qe { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 580; transition: transform .25s var(--spring); }
.chip.qe:hover { transform: scale(1.06); }
.chip.qe.prio-normal { background: var(--surface-3); color: var(--text-2); }
.qe-cell { position: relative; transition: background .2s, transform .25s var(--spring); }
.qe-cell:hover { background: var(--surface-3) !important; }
.qe-cell:hover label::after { content: ' · change'; color: var(--brand); text-transform: none; letter-spacing: 0; }
.qe-date { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; }
.btn.on-share { color: var(--s-done); }
.cl-ok { color: var(--s-done); background: color-mix(in srgb, var(--s-done) 13%, transparent); }
.cl-no { color: #D88A00; background: color-mix(in srgb, #F0A500 15%, transparent); }

/* revision banner */
.fixbox { margin-top: 18px; border-radius: 18px; padding: 16px 18px; background: color-mix(in srgb, var(--red-2) 9%, var(--surface)); box-shadow: inset 4px 0 0 var(--red-2); animation: up .6s var(--out) both; }
.fx-h { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--red-2); font-size: 14px; margin-bottom: 8px; }
.fx-i { padding: 8px 0; border-top: 1px dashed color-mix(in srgb, var(--red-2) 25%, transparent); }
.fx-i:first-of-type { border-top: 0; }
.fx-i b { font-size: 12.5px; }
.fx-i p { margin: 2px 0 0; white-space: pre-wrap; font-size: 14.5px; }

/* checklist */
.pbar, .mini-prog { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-bottom: 10px; }
.pbar i, .mini-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--s-done), #3ccf8e); border-radius: 6px; transition: width .6s var(--spring); }
.mini-prog { height: 4px; margin: 10px 0 0; }
.checklist { display: flex; flex-direction: column; gap: 4px; }
.ck { display: flex; align-items: center; gap: 10px; border: 0; background: var(--surface-2); padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left; font-size: 14px; transition: background .2s, transform .25s var(--spring); }
.ck:hover:not([disabled]) { transform: translateX(3px); }
.ck[disabled] { cursor: default; }
.ck svg { color: var(--muted); }
.ck.on svg { color: var(--s-done); }
.ck.on span { text-decoration: line-through; color: var(--muted); }
.ckc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ckc svg { width: 14px; height: 14px; }

/* round label download */
.round-label .btn { margin-left: 4px; height: 26px; font-size: 12px; }

/* comments: attachments, mentions */
.cwrap { position: relative; flex: 1; }
.cwrap .textarea { width: 100%; }
.compose .btn.icon.ghost { flex: none; }
.catt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.catt img { max-width: 160px; max-height: 120px; border-radius: 10px; object-fit: cover; }
.catt .chip { border: 0; cursor: pointer; }
.mention { color: var(--brand); font-weight: 650; background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 6px; padding: 0 3px; }
.mention.me { background: var(--yellow); color: #141210; }
.mention-menu { position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 5; animation: menuIn .3s var(--spring) both; transform-origin: bottom left; }
.mention-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 13.5px; text-align: left; }
.mention-menu button .muted { margin-left: auto; font-size: 11.5px; }
.mention-menu button.on, .mention-menu button:hover { background: var(--surface-3); }
.cm.client .bub { background: color-mix(in srgb, var(--yellow) 14%, var(--surface-2)); }
#cpend { margin: 10px 0 -4px; }

/* drag & drop */
.card.dragging { opacity: .4; transform: scale(.97) rotate(-2deg); }
.col { transition: background .2s, box-shadow .2s; }
.col.drop-ok { background: color-mix(in srgb, var(--sc) 12%, var(--bg-2)); box-shadow: inset 0 0 0 2px var(--sc); }
.col.drop-no { background: color-mix(in srgb, var(--red-2) 6%, var(--bg-2)); }

/* list view */
.list-panel { padding: 8px; }
.tlist tbody tr { cursor: pointer; }
.tlist td { vertical-align: middle; }
.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable:hover { color: var(--text); }
.tl-title { display: block; font-weight: 620; }
.tl-sub { font-size: 12px; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--cc); margin-right: 8px; vertical-align: 0; }
.person-s { display: inline-flex; align-items: center; gap: 8px; }

/* calendar */
.cal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-h h3 { font-size: 20px; min-width: 170px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: 0 6px 4px; }
.cal-day { min-height: 112px; background: var(--surface-2); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.out { opacity: .45; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--yellow); }
.cal-n { font-size: 12px; font-weight: 650; color: var(--muted); padding: 2px 4px; }
.cal-day.today .cal-n { color: var(--text); }
.cal-t { border: 0; text-align: left; font-size: 12px; font-weight: 560; padding: 5px 7px; border-radius: 8px; background: color-mix(in srgb, var(--cc) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--cc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: transform .25s var(--spring); color: var(--text); }
.cal-t:hover { transform: translateY(-1px); }
.cal-t.done { opacity: .5; text-decoration: line-through; }
.cal-t.over { color: var(--red-2); }
.cal-more { border: 0; background: none; font-size: 11.5px; color: var(--muted); text-align: left; padding: 2px 6px; cursor: pointer; }

/* archive */
.cgrid.arch { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* reports */
.stat .sub { font-size: 12px; margin-top: 8px; opacity: .7; }
.stat .num small { font-size: 18px; font-weight: 600; margin-left: 2px; }
.rep .num-c { text-align: right; font-variant-numeric: tabular-nums; }
.rep th.num-c { text-align: right; }
.rep .bad { color: var(--red-2); font-weight: 700; }
.wl { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.wl-bar { flex: 1; height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.wl-bar i { display: block; height: 100%; background: var(--brand); border-radius: 8px; transition: width .8s var(--spring); }
.cbar { padding: 10px 2px; }
.cbar-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.cbar-h .muted { font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.cbar-t { display: flex; height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.cbar-t i { display: block; height: 100%; }

/* notification banner */
.nbanner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface); margin-bottom: 18px; font-size: 13.5px; }
.nbanner .ast { font-size: 22px; animation: astIdle 8s linear infinite; }
.nbanner span { flex: 1; }

.toolbar .seg { flex: none; }
@media (max-width: 900px) {
  .cal-day { min-height: 70px; padding: 4px; }
  .cal-t { font-size: 10.5px; padding: 3px 5px; }
  .cal-h h3 { min-width: 0; font-size: 16px; }
  .toolbar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .toolbar .select { flex: none; }
}

.rep td:first-child { min-width: 180px; }
.rep .person-s b { white-space: nowrap; }
.rep th { white-space: nowrap; }

/* profile photos */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.xl { width: 128px; height: 128px; font-size: 40px; box-shadow: 0 0 0 4px var(--surface), 0 18px 40px -16px rgba(0,0,0,.35); }
.ph-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 6px 0 4px; }
.ph-pick { position: relative; border-radius: 50%; cursor: pointer; transition: transform .35s var(--spring); }
.ph-pick:hover { transform: scale(1.04); }
.ph-pick .ph-cam { position: absolute; right: 2px; bottom: 2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--surface); }
.ph-pick.over { transform: scale(1.06); }
.ph-zoom { width: 100%; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.ph-zoom input { flex: 1; accent-color: var(--brand); }
.ph-canvas { width: 220px; height: 220px; border-radius: 50%; touch-action: none; cursor: grab; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--yellow); background: var(--surface-3); }
.ph-canvas:active { cursor: grabbing; }
.team-av { cursor: pointer; border-radius: 50%; display: inline-flex; transition: transform .3s var(--spring); }
.team-av:hover { transform: scale(1.12); }
