/* AVIRSO — Company AI Brain · flagship components. Consumes tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg-app); color: var(--text);
  font-family: var(--font-sans); font-size: var(--t-body); line-height: 1.5;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background var(--d2) var(--ease), color var(--d2) var(--ease);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); border-radius: var(--r-sm); }
::selection { background: var(--accent-soft-2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ico.sm { width: 14px; height: 14px; }

/* ---- App shell ---- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }
.sidebar {
  background: var(--bg-raised); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: var(--s5) var(--s4) var(--s4);
}
.brand { display: flex; align-items: center; padding: 2px var(--s2) var(--s6); }
.brand-logo { width: 138px; max-width: 100%; height: auto; display: block; }
[data-theme="dark"] .brand-logo, [data-theme="dark"] .auth-logo { filter: brightness(0) invert(1); }
.auth-logo { height: 38px; width: auto; display: block; margin: 0 auto var(--s5); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-gradient);
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255,255,255,0.25);
}
.brand-mark .ico { width: 19px; height: 19px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; line-height: 1; color: var(--text); }
.brand-name span { display: block; font-family: var(--font-sans); font-weight: 500; font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--text-muted); margin-top: 4px; text-transform: none; }

.cmdk {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; margin-bottom: var(--s5);
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text-muted); font: inherit; font-size: var(--t-sm); cursor: pointer; transition: all var(--d1) var(--ease);
}
.cmdk:hover { border-color: var(--border-strong); color: var(--text-2); background: var(--bg-surface); }
.cmdk .ico { width: 15px; height: 15px; }
.cmdk kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text-muted); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-label { font-size: var(--t-xs); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-muted); padding: 0 11px; margin: var(--s4) 0 var(--s2); }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: var(--r-md);
  color: var(--text-2); font-size: var(--t-body); font-weight: 500; cursor: pointer; user-select: none;
  position: relative; transition: background var(--d1) var(--ease), color var(--d1) var(--ease);
}
.nav-item .ico { color: var(--text-muted); transition: color var(--d1) var(--ease); }
.nav-item:hover { background: var(--bg-subtle); color: var(--text); }
.nav-item:hover .ico { color: var(--text-2); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item.active .ico { color: var(--accent); }

.side-foot { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }
.workspace { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md);
  cursor: pointer; transition: background var(--d1) var(--ease); }
.workspace:hover { background: var(--bg-subtle); }
.ws-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--text-muted); flex: none; box-shadow: 0 0 0 3px transparent; }
.ws-dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.ws-dot.off { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.ws-meta { line-height: 1.3; min-width: 0; }
.ws-name { display: block; font-size: var(--t-sm); font-weight: 600; }
.ws-sub { display: block; font-size: var(--t-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Main / topbar ---- */
.main { overflow-y: auto; height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 var(--s8); background: color-mix(in srgb, var(--bg-app) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border);
}
.crumbs { display: flex; align-items: center; gap: 8px; }
.crumb-root { color: var(--text-muted); font-size: var(--t-sm); font-weight: 500; }
.crumbs .ico { color: var(--text-muted); }
.topbar h1 { margin: 0; font-size: var(--t-h3); font-weight: 600; letter-spacing: var(--tracking-tight); }
.topbar-right { display: flex; align-items: center; gap: var(--s3); }
.status-pill { display: flex; align-items: center; gap: 7px; font-size: var(--t-xs); color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 5px 11px; }
.dot { width: 7px; height: 7px; border-radius: 999px; background: var(--text-muted); }
.dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: all var(--d1) var(--ease); }
.icon-btn:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--border-strong); }

.content { max-width: var(--content-max); margin: 0 auto; padding: var(--s8); animation: rise var(--d3) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid transparent; font: inherit; font-size: var(--t-body); font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-xs);
  transition: transform var(--d1) var(--ease), box-shadow var(--d1) var(--ease), background var(--d1) var(--ease); white-space: nowrap; }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .ico { width: 16px; height: 16px; }
.btn.secondary { background: var(--bg-surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-xs); }
.btn.secondary:hover { background: var(--bg-subtle); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover { background: var(--bg-subtle); color: var(--text); box-shadow: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--t-sm); }

/* ---- Inputs ---- */
.input, .textarea { width: 100%; padding: 10px 13px; background: var(--bg-surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); font: inherit; font-size: var(--t-body);
  transition: border-color var(--d1) var(--ease), box-shadow var(--d1) var(--ease); }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
select.input { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378828E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }

/* ---- Chips / badges ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; font-size: var(--t-xs); font-weight: 600;
  border-radius: var(--r-pill); background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; font-size: var(--t-xs); font-weight: 600;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-2); }
.badge .swatch, .chip .swatch { width: 7px; height: 7px; border-radius: 2.5px; flex: none; }

/* ---- Cards ---- */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: var(--s5); box-shadow: var(--shadow-sm); }
.card.clickable { cursor: pointer; transition: transform var(--d1) var(--ease), box-shadow var(--d1) var(--ease), border-color var(--d1) var(--ease); }
.card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.section-title { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--text-muted); font-weight: 700; margin: var(--s6) 0 var(--s3); }
.grid { display: grid; gap: var(--s4); }
.grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3,1fr); } .grid.cols-4 { grid-template-columns: repeat(4,1fr); }
@media (max-width: 960px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.stagger > * { animation: rise var(--d3) var(--ease) backwards; }
.stagger > *:nth-child(2) { animation-delay: 40ms; } .stagger > *:nth-child(3) { animation-delay: 80ms; }
.stagger > *:nth-child(4) { animation-delay: 120ms; } .stagger > *:nth-child(5) { animation-delay: 160ms; }

/* ---- Ask ---- */
.ask-layout { display: grid; grid-template-columns: minmax(0,1fr) var(--sources-w); gap: var(--s8); align-items: start; }
@media (max-width: 1040px) { .ask-layout { grid-template-columns: 1fr; } }
.ask-bar { position: relative; margin-bottom: var(--s6); }
.ask-bar .input { height: 54px; font-size: 1rem; padding: 0 56px 0 18px; border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.ask-send { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: var(--r-md); border: none;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; transition: all var(--d1) var(--ease); }
.ask-send:hover { background: var(--accent-hover); transform: scale(1.04); }
.grounding { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-xs); font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill); margin-bottom: var(--s4); color: var(--success); background: var(--success-soft); }
.grounding.warn { color: var(--warning); background: var(--warning-soft); }
.grounding .ico { width: 14px; height: 14px; }
.answer { font-size: 1.0625rem; line-height: 1.75; color: var(--text); max-width: var(--answer-w); }
.answer .cite { font-size: 0.7rem; font-weight: 700; color: var(--accent); cursor: pointer; vertical-align: super;
  padding: 0 4px; border-radius: 4px; transition: background var(--d1) var(--ease); }
.answer .cite:hover { background: var(--accent-soft); }
.answer .cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); margin-left: 2px; vertical-align: text-bottom; border-radius: 2px; animation: blink 1.05s steps(2,end) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.synth-note { margin-top: var(--s4); font-size: var(--t-xs); color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.sources-panel h3 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-muted); font-weight: 700; margin: 0 0 var(--s3); }
.source-card { margin-bottom: 10px; padding: var(--s4); }
.sc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.sc-num { width: 21px; height: 21px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.sc-title { font-weight: 600; font-size: var(--t-sm); line-height: 1.3; }
.sc-snip { color: var(--text-2); font-size: var(--t-sm); line-height: 1.55; }
.sc-foot { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }

/* ---- Table ---- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
thead th { text-align: left; padding: 11px 16px; background: var(--bg-inset); font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--text-muted); font-weight: 700; border-bottom: 1px solid var(--border); }
tbody td { padding: 11px 16px; border-top: 1px solid var(--border); color: var(--text-2); }
tbody tr { transition: background var(--d1) var(--ease); }
tbody tr:hover { background: var(--bg-subtle); }
.mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-feature-settings: "tnum"; }
.verified { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 600; font-size: var(--t-xs); }
.verified .ico { width: 14px; height: 14px; }
.result-ok { color: var(--success); font-weight: 600; } .result-deny { color: var(--danger); font-weight: 600; } .result-empty { color: var(--text-muted); }

/* ---- Stat cards ---- */
.stat { padding: var(--s5) var(--s5) var(--s6); }
.stat .label { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-muted); font-weight: 600; }
.stat .metric { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; margin-top: 8px; line-height: 1; letter-spacing: -0.02em; color: var(--text); }
.bar-row { display: flex; align-items: center; gap: 12px; margin: 11px 0; }
.bar-row .bl { width: 116px; font-size: var(--t-sm); color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.bar-track { flex: 1; height: 8px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width var(--d3) var(--ease); }
.bar-row .bn { width: 30px; text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); font-feature-settings: "tnum"; }

/* ---- Graph ---- */
.graph-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--s4); height: calc(100vh - 60px - 2*var(--s8)); }
@media (max-width: 1040px) { .graph-layout { grid-template-columns: 1fr; height: auto; } }
#cy { width: 100%; height: 100%; min-height: 440px; background:
  radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 6%, var(--bg-surface)), var(--bg-surface) 60%);
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.graph-side { display: flex; flex-direction: column; gap: var(--s4); }
.legend .lg-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: var(--t-sm); color: var(--text-2); }
.legend .lg-dot { width: 10px; height: 10px; border-radius: 999px; }

/* ---- Command palette ---- */
.palette-overlay { position: fixed; inset: 0; background: rgba(5,28,44,0.35); backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center; z-index: 100; padding-top: 13vh; }
[data-theme="dark"] .palette-overlay { background: rgba(0,0,0,0.6); }
.palette-overlay.open { display: flex; animation: fade var(--d2) var(--ease); }
.palette { width: 580px; max-width: 92vw; background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop var(--d2) var(--ease-spring); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.palette-head { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.palette-head input { flex: 1; border: none; background: transparent; font: inherit; font-size: 1rem; color: var(--text); outline: none; }
.palette-list { max-height: 340px; overflow-y: auto; padding: 8px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; color: var(--text-2); font-size: var(--t-body); }
.palette-item .ico { color: var(--text-muted); }
.palette-item:hover, .palette-item.active { background: var(--accent-soft); color: var(--accent); }
.palette-item:hover .ico, .palette-item.active .ico { color: var(--accent); }
.palette-item .pi-sub { margin-left: auto; font-size: var(--t-xs); color: var(--text-muted); }

/* ---- Hero / onboarding ---- */
.hero { text-align: center; padding: 7vh 0 var(--s8); }
.hero .orb { width: 76px; height: 76px; margin: 0 auto var(--s5); border-radius: 22px; background: var(--brand-gradient);
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255,255,255,0.3); }
.hero .orb .ico { width: 36px; height: 36px; }
.hero h2 { font-family: var(--font-display); font-size: var(--t-display); margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; }
.hero p { color: var(--text-2); max-width: 540px; margin: 0 auto var(--s6); line-height: 1.65; font-size: 1.0625rem; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--r-2xl); padding: var(--s10) var(--s6); text-align: center;
  color: var(--text-2); background: var(--bg-surface); transition: all var(--d2) var(--ease); cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dropzone .dz-orb { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; background: var(--bg-subtle);
  display: grid; place-items: center; color: var(--accent); }
.dropzone .dz-orb .ico { width: 22px; height: 22px; }
.dropzone .dz-main { font-weight: 600; color: var(--text); }
.dropzone .dz-sub { font-size: var(--t-sm); color: var(--text-muted); margin-top: 6px; }

/* ---- Settings ---- */
.field { margin-bottom: var(--s5); }
.field label { display: block; font-size: var(--t-sm); color: var(--text); margin-bottom: 7px; font-weight: 600; }
.field .help { font-size: var(--t-xs); color: var(--text-muted); margin-top: 7px; line-height: 1.5; }

/* ---- Empty / skeleton ---- */
.empty { text-align: center; padding: var(--s12) var(--s4); color: var(--text-muted); }
.empty h2 { font-family: var(--font-display); color: var(--text); font-size: var(--t-h1); margin: 0 0 8px; }
.skeleton { height: 16px; border-radius: 7px; margin: 11px 0; background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-surface) 50%, var(--bg-subtle) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.fade-in { animation: rise var(--d2) var(--ease); }

/* ---- Toast ---- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--bg-surface); border: 1px solid var(--border-strong); color: var(--text); padding: 11px 18px;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); z-index: 200; transition: all var(--d2) var(--ease-spring);
  pointer-events: none; font-size: var(--t-sm); font-weight: 500; display: flex; align-items: center; gap: 9px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-left: 3px solid var(--success); } .toast.err { border-left: 3px solid var(--danger); }

/* ---- Auth view ---- */
.auth-view { position: fixed; inset: 0; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg-app); z-index: 300; padding: var(--s4); }
.auth-card { width: 420px; max-width: 94vw; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: var(--s8); animation: pop var(--d3) var(--ease-spring); }
.auth-brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: var(--s5); }
.auth-brand .brand-mark { width: 38px; height: 38px; }
.auth-brand .t { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: .02em; }
.auth-card h2 { font-family: var(--font-display); text-align: center; font-size: 1.5rem; margin: 0 0 6px; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: var(--t-sm); margin-bottom: var(--s6); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: var(--s2); }
.auth-card .field { margin-bottom: var(--s4); }
.auth-switch { text-align: center; margin-top: var(--s5); font-size: var(--t-sm); color: var(--text-muted); }
.auth-switch a { cursor: pointer; font-weight: 600; }
.auth-err { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-md); padding: 9px 12px; font-size: var(--t-sm); margin-bottom: var(--s4); display: none; }
.auth-err.show { display: block; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: var(--s4) 0; color: var(--text-muted); font-size: var(--t-xs); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- Project switcher ---- */
.project-bar { position: relative; margin-bottom: var(--s4); }
.project-btn { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; color: var(--text); font: inherit; transition: all var(--d1) var(--ease); }
.project-btn:hover { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.project-btn .pj-ico { width: 26px; height: 26px; border-radius: 7px; background: var(--brand-gradient); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.project-btn .pj-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; line-height: 1.3; }
.project-btn .pj-name { display: block; max-width: 100%; font-size: var(--t-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-btn .pj-role { display: block; max-width: 100%; font-size: var(--t-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.project-btn .ico { flex: none; color: var(--text-muted); }
.project-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--bg-surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; display: none; max-height: 320px; overflow-y: auto; }
.project-menu.open { display: block; animation: pop var(--d2) var(--ease-spring); }
.project-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r-md); cursor: pointer; font-size: var(--t-sm); }
.project-row:hover { background: var(--bg-subtle); }
.project-row.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.project-row.new { color: var(--accent); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 11px; }

/* ---- Members + connectors ---- */
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.member-row:first-child { border-top: none; }
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--brand-gradient); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.role-pill { margin-left: auto; font-size: var(--t-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); text-transform: capitalize; }
.invite-link { display: flex; gap: 8px; margin-top: var(--s3); }
.invite-link input { font-family: var(--font-mono); font-size: var(--t-xs); }
.channel-card { display: flex; align-items: center; gap: 14px; }
.channel-card .ch-ico { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--bg-subtle); color: var(--accent); flex: none; }
.channel-card .ch-meta { flex: 1; min-width: 0; }
.channel-card .ch-name { font-weight: 600; }
.channel-card .ch-sub { font-size: var(--t-xs); color: var(--text-muted); margin-top: 2px; }
.kind-tabs { display: flex; gap: 8px; margin-bottom: var(--s4); }
.kind-tab { flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg); text-align: center; cursor: pointer; font-weight: 600; font-size: var(--t-sm); transition: all var(--d1) var(--ease); }
.kind-tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
