* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --bg:#FFFFFF; --sidebar:#F8F9FA; --border:#E8EAED;
  --primary:#4F46E5; --pl:#EEF2FF;
  --text:#111827; --muted:#6B7280; --xs:#9CA3AF;
  --green:#22C55E; --amber:#F59E0B; --red:#EF4444;
  --sw:240px; --hh:80px;
}
body { font-family:-apple-system,'Inter',system-ui,sans-serif; background:var(--bg); color:var(--text); height:100vh; overflow:hidden; display:flex; flex-direction:column; font-size:14px; user-select:none; }

/* HEADER */
header { height:var(--hh); border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 16px 0 18px; gap:10px; flex-shrink:0; background:white; position:relative; }
.brand { display:flex; align-items:center; gap:14px; width:var(--sw); flex-shrink:0; }
.brand-name { font-weight:800; font-size:17px; letter-spacing:.04em; color:var(--text); }
.header-nav { display:flex; gap:2px; margin:0 auto; }
.nav-tab { display:flex; align-items:center; gap:6px; padding:7px 13px; border-radius:8px; font-size:13px; font-weight:500; color:var(--muted); cursor:pointer; transition:all .15s; }
.nav-tab:hover { background:#F3F4F6; color:var(--text); }
.nav-tab.active { color:var(--primary); background:var(--pl); }
.nav-tab.active svg { stroke:var(--primary); }
.header-right { display:flex; align-items:center; gap:6px; }
.energy-btn { position:relative; width:34px; height:34px; border-radius:8px; background:#F3F4F6; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.energy-btn:hover { background:#E5E7EB; }
.energy-pop { display:none; position:absolute; top:40px; right:0; width:220px; background:white; border:1px solid var(--border); border-radius:12px; padding:14px; box-shadow:0 4px 16px rgba(0,0,0,.1); z-index:100; }
.energy-btn:hover .energy-pop { display:block; }
.ep-t { font-size:11px; font-weight:700; color:var(--xs); text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
.ep-row { margin-bottom:7px; }
.ep-lbl { font-size:12px; color:var(--muted); display:flex; justify-content:space-between; }
.ep-note { font-size:10px; color:var(--xs); font-style:italic; margin-top:6px; }
.user-av { width:32px; height:32px; border-radius:50%; background:var(--primary); color:white; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; cursor:pointer; }

/* LAYOUT */
.layout { display:flex; flex:1; overflow:hidden; }

/* SIDEBAR */
aside.sidebar { width:var(--sw); background:var(--sidebar); border-right:1px solid var(--border); display:flex; flex-direction:column; flex-shrink:0; overflow:hidden; }
.sb-inner { flex:1; overflow-y:auto; padding:8px 0 12px; }
.sb-inner::-webkit-scrollbar { width:0; }
.team-item { display:flex; align-items:center; gap:9px; padding:7px 10px; border-radius:8px; margin:0 6px; cursor:pointer; transition:background .12s; }
.team-item:hover { background:#ECEDF0; }
.team-item.active { background:var(--pl); }
.team-icon { width:34px; height:34px; background:linear-gradient(135deg,#6366F1,#8B5CF6); border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.t-name { font-size:13px; font-weight:600; }
.t-sub { font-size:11px; color:var(--muted); }
.sec-hdr { display:flex; align-items:center; justify-content:space-between; padding:13px 14px 4px; }
.sec-lbl { font-size:11px; font-weight:600; color:var(--xs); text-transform:uppercase; letter-spacing:.06em; }
.agent-item { display:flex; align-items:center; gap:8px; padding:5px 10px; border-radius:8px; margin:0 6px; cursor:pointer; transition:background .12s; }
.agent-item:hover { background:#ECEDF0; }
.agent-item.active { background:var(--pl); }
.af { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; position:relative; }
.sdot { position:absolute; bottom:0; right:0; width:8px; height:8px; border-radius:50%; border:2px solid var(--sidebar); }
.sdot.on { background:var(--green); }
.sdot.blink { background:var(--amber); animation:pulse 1.5s infinite; }
.sdot.off { background:#D1D5DB; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }
.ai-info { flex:1; min-width:0; }
.ai-name { font-size:12.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ai-role { font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.score-badge { display:flex; flex-direction:column; align-items:flex-end; flex-shrink:0; }
.score-num { font-size:12px; font-weight:700; color:var(--text); }
.score-delta { font-size:10px; font-weight:600; }
.score-delta.up { color:var(--green); }
.score-delta.down { color:var(--red); }
.score-delta.flat { color:var(--muted); }
.proj-item { display:flex; align-items:center; gap:9px; padding:6px 10px; border-radius:8px; margin:0 6px; cursor:pointer; transition:background .12s; }
.proj-item:hover { background:#ECEDF0; }
.proj-item.active { background:var(--pl); }
.pdot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.pi-n { font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pi-s { font-size:11px; color:var(--muted); }
.loading-placeholder { padding:8px 16px; font-size:12px; color:var(--xs); }

/* CONTENT */
main.content { flex:1; display:flex; overflow:hidden; }
.view { display:none; }
.view.active { display:flex; flex:1; overflow:hidden; }

/* RESIZER */
.resizer { width:4px; cursor:col-resize; background:transparent; flex-shrink:0; transition:background .2s; }
.resizer:hover, .resizer.dragging { background:rgba(79,70,229,.25); }

/* PANELS */
.chat-area { flex:1 1 0; min-width:280px; display:flex; flex-direction:column; overflow:hidden; }
.right-panel { flex:1 1 0; min-width:220px; border-left:1px solid var(--border); display:flex; flex-direction:column; overflow-y:auto; background:white; }
.right-panel::-webkit-scrollbar { width:4px; }
.right-panel::-webkit-scrollbar-thumb { background:#E5E7EB; }

/* CHAT */
.chat-hdr { padding:11px 18px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:11px; background:white; flex-shrink:0; }
.ch-face { font-size:22px; flex-shrink:0; }
.ch-title { font-size:15px; font-weight:600; }
.ch-sub { font-size:12px; color:var(--muted); }
.vis-b { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); background:#F3F4F6; border-radius:20px; padding:3px 10px; font-weight:500; margin-left:auto; }
.clear-btn { background:none; border:1px solid var(--border); border-radius:6px; padding:4px 10px; font-size:11px; color:var(--muted); cursor:pointer; font-family:inherit; margin-left:8px; }
.clear-btn:hover { background:#FEF2F2; color:var(--red); border-color:var(--red); }
.msgs { flex:1; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:3px; user-select:text; }
.msgs::-webkit-scrollbar { width:4px; }
.msgs::-webkit-scrollbar-thumb { background:#E5E7EB; border-radius:2px; }
.msg-empty { font-size:12px; color:var(--xs); text-align:center; margin-top:20px; }
.mg { display:flex; gap:10px; margin-bottom:11px; }
.mg.me { flex-direction:row-reverse; }
.mav { width:30px; height:30px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:16px; margin-top:2px; }
.mav.u { background:var(--primary); color:white; font-size:11px; font-weight:600; }
.mc { max-width:66%; display:flex; flex-direction:column; gap:2px; }
.mg.me .mc { align-items:flex-end; }
.mm { display:flex; align-items:baseline; gap:6px; margin-bottom:2px; }
.mg.me .mm { flex-direction:row-reverse; }
.ms { font-size:11.5px; font-weight:600; }
.mt { font-size:10.5px; color:var(--xs); }
.mb { background:#F3F4F6; border-radius:13px 13px 13px 4px; padding:8px 12px; font-size:13px; line-height:1.55; word-break:break-word; }
.mg.me .mb { background:var(--primary); color:white; border-radius:13px 13px 4px 13px; }
.mb.thinking { color:var(--xs); font-style:italic; background:#F9FAFB; }
.cur { display:inline-block; width:2px; height:13px; background:var(--primary); animation:blink .7s infinite; vertical-align:middle; margin-left:2px; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }
.streaming-text::after { content:''; display:inline-block; width:2px; height:13px; background:var(--primary); animation:blink .7s infinite; vertical-align:middle; margin-left:2px; }
/* ── Markdown rendu dans les bulles de chat ─────────────────────────────── */
.mb.md-content { white-space:normal; }
.mb.md-content p { margin:0 0 6px; }
.mb.md-content p:last-child { margin-bottom:0; }
.mb.md-content ul, .mb.md-content ol { margin:4px 0 6px 18px; padding:0; }
.mb.md-content li { margin-bottom:2px; }
.mb.md-content h1,.mb.md-content h2,.mb.md-content h3 { font-size:13px; font-weight:700; margin:8px 0 4px; }
.mb.md-content a { color:var(--primary); }
.mb.md-content strong { font-weight:700; }
.mb.md-content em { font-style:italic; }
/* Inline code */
.mb.md-content code { font-family:'SF Mono','Fira Code',monospace; font-size:12px; background:rgba(0,0,0,.07); padding:1px 5px; border-radius:4px; }
.mg.me .mb.md-content code { background:rgba(255,255,255,.25); }
/* Code blocks — style Claude Code */
.mb.md-content pre { background:#1E1E2E; border-radius:8px; padding:0; margin:6px 0; overflow:hidden; }
.mb.md-content pre code { background:none; padding:0; border-radius:0; color:#CDD6F4; font-size:12px; display:block; padding:10px 12px; overflow-x:auto; white-space:pre; }
/* Copy button on pre */
.mb.md-content pre { position:relative; }
.mb.md-content pre::before { content:attr(data-lang); position:absolute; top:6px; right:8px; font-size:10px; color:#6C7086; font-family:inherit; text-transform:uppercase; }
/* Blockquote */
.mb.md-content blockquote { border-left:3px solid var(--primary); margin:6px 0; padding:4px 10px; color:var(--muted); background:rgba(79,70,229,.05); border-radius:0 6px 6px 0; }
/* Table */
.mb.md-content table { border-collapse:collapse; font-size:12px; margin:6px 0; }
.mb.md-content th,.mb.md-content td { border:1px solid var(--border); padding:4px 8px; }
.mb.md-content th { background:#F3F4F6; font-weight:600; }
/* Horizontal rule */
.mb.md-content hr { border:none; border-top:1px solid var(--border); margin:8px 0; }
.input-w { border-top:1px solid var(--border); padding:11px 14px; background:white; flex-shrink:0; }
.iw { display:flex; align-items:flex-end; gap:7px; background:#F8F9FA; border:1.5px solid var(--border); border-radius:11px; padding:7px 9px; transition:border-color .15s; }
.iw:focus-within { border-color:var(--primary); }
textarea.ci { flex:1; border:none; background:none; outline:none; font-size:13px; color:var(--text); resize:none; max-height:100px; line-height:1.5; padding:2px 0; font-family:inherit; }
select.msel { border:1px solid var(--border); background:white; border-radius:6px; font-size:11.5px; color:var(--muted); padding:4px 7px; cursor:pointer; outline:none; font-weight:500; align-self:flex-end; font-family:inherit; }
.send { width:30px; height:30px; background:var(--primary); color:white; border:none; border-radius:7px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; align-self:flex-end; transition:background .15s; }
.send:hover { background:#4338CA; }
.send:disabled { background:#C7D2FE; cursor:not-allowed; }

/* ORG CHART */
.org-hdr { padding:12px 16px 8px; border-bottom:1px solid var(--border); flex-shrink:0; }
.org-hdr-t { font-size:13px; font-weight:600; }
.org-hdr-s { font-size:11px; color:var(--muted); }
.org-inner { padding:20px 16px; display:flex; flex-direction:column; align-items:center; }
.oc-node { display:flex; flex-direction:column; align-items:center; gap:2px; background:white; border:1.5px solid var(--border); border-radius:10px; padding:10px 12px; cursor:pointer; transition:all .15s; min-width:86px; text-align:center; }
.oc-node:hover { border-color:var(--primary); box-shadow:0 2px 8px rgba(79,70,229,.1); }
.oc-node.ceo { border-color:var(--primary); background:var(--pl); }
.oc-face { font-size:22px; position:relative; display:inline-block; }
.oc-face .oc-s { position:absolute; bottom:-1px; right:-3px; width:9px; height:9px; border-radius:50%; border:2px solid white; }
.oc-name { font-size:12px; font-weight:600; }
.oc-role { font-size:10px; color:var(--muted); }
.oc-score { font-size:11px; font-weight:700; margin-top:3px; padding:2px 6px; border-radius:4px; background:#F3F4F6; }
.oc-score.top { background:#D1FAE5; color:#065F46; }
.oc-score.low { background:#FEF3C7; color:#92400E; }
.oc-vl { width:2px; height:18px; background:#E8EAED; margin:0 auto; }
.lb-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #F3F4F6; }
.lb-row:last-child { border-bottom:none; }
.lb-rank { font-size:13px; font-weight:700; color:var(--muted); width:18px; text-align:center; }
.lb-face { font-size:20px; }
.lb-info { flex:1; }
.lb-name { font-size:13px; font-weight:500; }
.lb-role { font-size:11px; color:var(--muted); }
.lb-score { text-align:right; }
.lb-pts { font-size:14px; font-weight:700; }
.lb-d { font-size:11px; font-weight:600; }

/* AGENT SETTINGS */
.sp-profile { padding:18px 16px; display:flex; flex-direction:column; align-items:center; gap:5px; border-bottom:1px solid var(--border); }
.sp-face { font-size:48px; }
.sp-name { font-size:16px; font-weight:700; }
.sp-role-t { font-size:12px; color:var(--muted); }
.sp-status { display:flex; align-items:center; gap:5px; font-size:12px; font-weight:500; }
.sp-dot { width:6px; height:6px; border-radius:50%; }
.sp-score-big { display:flex; align-items:baseline; gap:6px; margin-top:4px; }
.sp-pts { font-size:28px; font-weight:800; color:var(--text); }
.sp-pts-lbl { font-size:12px; color:var(--muted); }
.sp-delta { font-size:13px; font-weight:700; padding:2px 8px; border-radius:6px; }
.sp-delta.up { background:#D1FAE5; color:#065F46; }
.sp-delta.down { background:#FEE2E2; color:#B91C1C; }
.sp-delta.flat { background:#F3F4F6; color:var(--muted); }
.edit-btn { font-size:12px; color:var(--primary); background:var(--pl); border:none; border-radius:6px; padding:5px 12px; cursor:pointer; font-weight:500; font-family:inherit; }
.edit-btn:hover { background:#E0E7FF; }
.sp-tabs { display:flex; border-bottom:1px solid var(--border); }
.spt { flex:1; padding:10px 4px; text-align:center; font-size:11.5px; font-weight:500; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; transition:all .15s; }
.spt.active { color:var(--primary); border-bottom-color:var(--primary); }
.tc { display:none; }
.tc.active { display:block; }
.sec { padding:13px 16px; border-bottom:1px solid var(--border); }
.sec:last-child { border-bottom:none; }
.sec-l { font-size:11px; font-weight:600; color:var(--xs); text-transform:uppercase; letter-spacing:.06em; margin-bottom:9px; }
.mpills { display:flex; gap:5px; }
.mpill { flex:1; text-align:center; padding:5px 0; border-radius:7px; font-size:12px; font-weight:500; cursor:pointer; border:1.5px solid var(--border); color:var(--muted); transition:all .15s; background:white; }
.mpill.active { border-color:var(--primary); background:var(--pl); color:var(--primary); }
.sta { width:100%; border:1.5px solid var(--border); border-radius:8px; padding:8px 11px; font-size:12.5px; color:var(--text); background:#FAFAFA; resize:none; outline:none; font-family:inherit; line-height:1.5; }
.sta:focus { border-color:var(--primary); background:white; }

/* PERFORMANCE */
.perf-score-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.perf-total { font-size:26px; font-weight:800; }
.perf-rank { font-size:12px; color:var(--muted); font-weight:500; }
.spark { display:flex; align-items:flex-end; gap:3px; height:36px; }
.spark-bar { flex:1; border-radius:2px; background:var(--primary); opacity:.7; }
.spark-bar.today { opacity:1; }

/* PROJECT */
.pv { flex:1; overflow-y:auto; padding:22px; }
.pv::-webkit-scrollbar { width:4px; }
.pv-hdr { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:14px; }
.pv-t { font-size:21px; font-weight:700; }
.ptag { font-size:12px; font-weight:600; padding:4px 11px; border-radius:20px; }
.ptag.prog { background:#DBEAFE; color:#1D4ED8; }
.ptag.done { background:#D1FAE5; color:#065F46; }
.pg2 { display:grid; grid-template-columns:1fr 1fr; gap:13px; margin-bottom:13px; }
.pcard { border:1px solid var(--border); border-radius:11px; padding:14px; }
.pcard-l { font-size:11px; font-weight:600; color:var(--xs); text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; }
.pb-t { background:#F3F4F6; border-radius:4px; height:7px; overflow:hidden; }
.pb-f { height:100%; border-radius:4px; background:var(--primary); }
.pb-p { font-size:20px; font-weight:700; margin-bottom:5px; }

/* RESSOURCES */
.res-v { flex:1; overflow-y:auto; padding:22px; }
.res-g { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; }
.rc { border:1px solid var(--border); border-radius:11px; padding:15px; cursor:pointer; transition:all .15s; }
.rc:hover { border-color:var(--primary); }
.rc-i { font-size:26px; margin-bottom:7px; }
.rc-n { font-size:13.5px; font-weight:600; }
.rc-c { font-size:11.5px; color:var(--muted); }

/* MODAL */
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.22); z-index:200; align-items:center; justify-content:center; }
.overlay.open { display:flex; }
.mini-chat { width:420px; height:480px; background:white; border-radius:15px; box-shadow:0 8px 40px rgba(0,0,0,.14); display:flex; flex-direction:column; overflow:hidden; }
.mc-h { padding:13px 15px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:9px; }
.mc-n { font-size:14px; font-weight:600; }
.mc-r { font-size:11.5px; color:var(--muted); }
.mc-x { background:none; border:none; cursor:pointer; color:var(--muted); font-size:20px; padding:2px 6px; border-radius:6px; margin-left:auto; }
.mc-x:hover { background:#F3F4F6; }
.mc-msgs { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:9px; }
.mc-inp { border-top:1px solid var(--border); padding:9px 12px; display:flex; gap:7px; }
.mc-ta { flex:1; border:1.5px solid var(--border); border-radius:8px; padding:7px 10px; font-size:12.5px; font-family:inherit; outline:none; resize:none; }
.mc-ta:focus { border-color:var(--primary); }
.mc-s { width:32px; height:32px; background:var(--primary); border:none; border-radius:7px; cursor:pointer; display:flex; align-items:center; justify-content:center; color:white; }

/* PLACEHOLDER */
.ph { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--muted); }
.ph-icon { opacity:.2; }
.ph-t { font-size:15px; font-weight:600; color:var(--text); }

/* ─── Markdown rendered content ─────────────────────────────────────────── */
.md-content p { margin: 0 0 8px; }
.md-content p:last-child { margin-bottom: 0; }
.md-content ul, .md-content ol { margin: 4px 0 8px 18px; padding: 0; }
.md-content li { margin-bottom: 3px; line-height: 1.5; }
.md-content h1, .md-content h2 { font-size: 14px; font-weight: 700; margin: 10px 0 4px; }
.md-content h3, .md-content h4 { font-size: 13px; font-weight: 600; margin: 8px 0 3px; }
.md-content code { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 4px; font-family: monospace; font-size: 0.88em; }
.md-content pre { background: rgba(0,0,0,.05); padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 6px 0; }
.md-content pre code { background: none; padding: 0; }
.md-content strong { font-weight: 600; }
.md-content em { font-style: italic; }
.md-content blockquote { border-left: 3px solid var(--border); padding-left: 10px; margin: 6px 0; color: var(--muted); }
.md-content a { color: var(--primary); text-decoration: none; }
.md-content a:hover { text-decoration: underline; }
.md-content hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }

/* ── Actions ─────────────────────────────────────────────────────────────────── */
.actions-v { display:flex; flex-direction:column; height:100%; overflow:hidden; }
.actions-compose { padding:20px 24px 16px; border-bottom:1px solid var(--border); background:white; flex-shrink:0; }
.ac-hdr { margin-bottom:14px; }
.action-ta { width:100%; padding:11px 14px; border:1.5px solid var(--border); border-radius:10px; font-size:13px; font-family:inherit; resize:vertical; outline:none; line-height:1.5; box-sizing:border-box; color:var(--text); }
.action-ta:focus { border-color:var(--primary); }
.action-send-btn { display:flex; align-items:center; gap:6px; padding:8px 16px; background:var(--primary); color:white; border:none; border-radius:8px; font-size:13px; font-family:inherit; font-weight:600; cursor:pointer; white-space:nowrap; }
.action-send-btn:disabled { opacity:.5; cursor:not-allowed; }
.actions-list { flex:1; overflow-y:auto; padding:16px 24px; display:flex; flex-direction:column; gap:14px; }
.action-card { background:white; border:1px solid var(--border); border-radius:12px; padding:16px; }
.action-card-hdr { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.action-agent-badge { font-size:11px; font-weight:600; color:var(--primary); background:#EEF2FF; padding:2px 8px; border-radius:6px; }
.action-status-badge { font-size:11px; padding:2px 8px; border-radius:6px; font-weight:600; }
.action-status-badge.running { background:#FFF7ED; color:#C2410C; }
.action-status-badge.done { background:#F0FDF4; color:#166534; }
.action-status-badge.error { background:#FEF2F2; color:#B91C1C; }
.action-prompt-t { font-size:13px; color:var(--text); font-weight:500; margin-bottom:8px; }
.action-response { font-size:13px; color:#475569; line-height:1.6; border-top:1px solid var(--border); padding-top:10px; margin-top:4px; }

/* ── Inbox ───────────────────────────────────────────────────────────────────── */
.inbox-badge { position:absolute; top:-4px; right:-6px; background:#EF4444; color:white; font-size:10px; font-weight:700; border-radius:10px; padding:1px 5px; min-width:16px; text-align:center; line-height:1.6; }
.inbox-v { display:flex; flex-direction:column; height:100%; overflow:hidden; }
.inbox-hdr { display:flex; align-items:center; justify-content:space-between; padding:20px 24px 16px; border-bottom:1px solid var(--border); background:white; flex-shrink:0; }
.inbox-list { flex:1; overflow-y:auto; padding:16px 24px; display:flex; flex-direction:column; gap:10px; }
.inbox-item { background:white; border:1px solid var(--border); border-radius:10px; padding:14px 16px; cursor:pointer; transition:background .15s; }
.inbox-item:hover { background:#FAFAFA; }
.inbox-item.unread { border-left:3px solid var(--primary); padding-left:13px; }
.inbox-item-hdr { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.inbox-item-type { font-size:11px; font-weight:600; color:var(--primary); background:#EEF2FF; padding:2px 7px; border-radius:5px; }
.inbox-item-time { font-size:11px; color:var(--muted); margin-left:auto; }
.inbox-item-text { font-size:13px; color:var(--text); line-height:1.5; white-space:pre-wrap; }

/* ── Planning ────────────────────────────────────────────────────────────────── */
.planning-v { display:flex; flex-direction:column; height:100%; overflow:hidden; }
.planning-hdr { padding:20px 24px 16px; border-bottom:1px solid var(--border); background:white; flex-shrink:0; }
.planning-content { flex:1; overflow-y:auto; padding:20px 24px; }
.planning-projects { display:flex; flex-direction:column; gap:12px; margin-bottom:28px; }
.planning-project-card { background:white; border:1px solid var(--border); border-radius:12px; padding:18px 20px; }
.pp-hdr { display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.pp-name { font-size:14px; font-weight:700; flex:1; }
.pp-phase { font-size:11px; font-weight:600; color:var(--primary); background:#EEF2FF; padding:3px 9px; border-radius:6px; }
.pp-schedule { font-size:11px; color:var(--muted); background:#F8FAFC; padding:3px 8px; border-radius:6px; border:1px solid var(--border); }
.pp-footer { display:flex; align-items:center; gap:10px; margin-top:14px; padding-top:12px; border-top:1px solid var(--border); flex-wrap:wrap; }
.sprint-btn { padding:7px 14px; background:var(--primary); color:white; border:none; border-radius:8px; font-size:12px; font-family:inherit; font-weight:600; cursor:pointer; }
.sprint-btn:hover { opacity:.9; }
.planning-sessions-hdr { font-size:13px; font-weight:600; color:var(--text); margin-bottom:12px; }
.planning-sessions { display:flex; flex-direction:column; gap:8px; }
.session-row { display:flex; align-items:center; gap:10px; padding:10px 14px; background:white; border:1px solid var(--border); border-radius:8px; font-size:12px; flex-wrap:wrap; }
.session-phase { font-weight:600; color:var(--primary); min-width:55px; }
.session-project { color:var(--muted); flex:1; }
.session-ok { color:#22C55E; font-weight:600; }
.session-err { color:#EF4444; font-weight:600; }
.session-time { color:var(--muted); white-space:nowrap; font-size:11px; }

/* ── Project v2 layout ───────────────────────────────────────────────────── */
.pv2-layout { display: flex; flex-direction: column; height: 100%; gap: 0; overflow: hidden; }
.pv2-top { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; gap: 16px; align-items: flex-start; flex-shrink: 0; }
.pv2-mid { display: flex; gap: 0; flex: 1; min-height: 0; border-bottom: 1px solid var(--border); }
.pv2-files { width: 220px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 12px; overflow-y: auto; }
.pv2-files-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pv2-preview { flex: 1; min-width: 0; padding: 12px; display: flex; flex-direction: column; overflow: hidden; }
.pv2-preview-content { flex: 1; overflow: auto; }
.pv2-bot { flex-shrink: 0; height: 280px; display: flex; overflow: hidden; }
.pv2-chat { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.pv2-chat-hdr { padding: 8px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }

/* ── Kanban ───────────────────────────────────────────────────────────────── */
.kanban-board { padding: 16px; overflow-x: auto; display: flex; flex-direction: column; gap: 16px; }
.kanban-agent-col { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface); }
.kanban-agent-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.kanban-col { background: #F9FAFB; border-radius: 8px; padding: 8px; min-height: 80px; }
.kanban-col-hdr { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.kanban-count { background: var(--border); border-radius: 10px; padding: 1px 6px; font-size: 10px; }
.kanban-card { background: white; border-radius: 7px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--border); font-size: 12px; cursor: pointer; }
.kanban-card:hover { border-color: var(--primary); }

/* ── Calendar ─────────────────────────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--border); }
.cal-day { border-right: 1px solid var(--border); min-height: 120px; }
.cal-day:last-child { border-right: none; }
.cal-day.today .cal-day-hdr { background: var(--primary); color: white; }
.cal-day.past { opacity: 0.6; }
.cal-day-hdr { padding: 8px; text-align: center; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--border); background: #FAFAFA; }
.cal-day.today .cal-day-hdr { color: white; opacity: 1; }
.cal-day-body { padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-session { font-size: 11px; padding: 4px 6px; border-radius: 5px; display: flex; align-items: center; gap: 4px; }
.past-session { background: #F3F4F6; }

/* ── Ressources tabs ──────────────────────────────────────────────────────── */
.res-tab { padding: 8px 16px; font-size: 13px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500; }
.res-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.res-tab:hover { color: var(--text); }
.res-tab-content { padding: 4px 0; }

/* ── Trait pairs (Personnalité / Comportements) ──────────────────────────── */
.trait-pair { display:flex; align-items:center; gap:8px; }
.tp-l, .tp-r { font-size:11px; color:var(--text); min-width:80px; flex-shrink:0; }
.tp-r { text-align:right; }
.tp-range { flex:1; height:4px; cursor:pointer; accent-color:var(--primary); }

/* ── Icon buttons (chat bar) ─────────────────────────────────────────────── */
.icon-btn { width:32px; height:32px; border-radius:50%; border:none; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#6B7280; flex-shrink:0; }
.icon-btn:hover { background:#F3F4F6; color:#111827; }
.icon-btn.primary { background:#4F46E5; color:white; }
.icon-btn.primary:hover { background:#4338CA; }

/* ===== CALENDRIER v2 (semaine/mois) ===== */
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav-btn {
  background: transparent; border: none;
  border-radius: 8px; width: 32px; height: 32px; cursor: pointer;
  color: var(--text-secondary, #6B7280); font-size: 16px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.cal-nav-btn:hover { background: var(--bg-secondary,#F3F4F6); color: var(--text,#111); }
.cal-period { font-size: 14px; font-weight: 600; min-width: 160px; text-align: center; }
.cal-view-toggle {
  display: flex; background: var(--bg-secondary,#F9FAFB); border-radius: 8px;
  padding: 3px; gap: 2px;
}
.cal-view-btn {
  padding: 4px 12px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: transparent; transition: all 0.15s;
}
.cal-view-btn.active {
  background: white; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Grille semaine */
.cal-week-grid {
  display: grid; grid-template-columns: 48px repeat(7, 1fr);
  overflow-y: auto; max-height: 500px;
}
.cal-week-header {
  display: grid; grid-template-columns: 48px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.cal-week-gutter { background: #F9FAFB; }
.cal-day-hdr2 {
  padding: 8px 4px; text-align: center;
  border-left: 1px solid var(--border);
}
.cal-day-hdr2 .day-name {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); font-weight: 600;
}
.cal-day-hdr2 .day-num {
  font-size: 20px; font-weight: 300; color: var(--muted);
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%; margin: 3px auto 0;
}
.cal-day-hdr2.today .day-num { background: #3B82F6; color: white; font-weight: 600; }
.cal-day-hdr2.today .day-name { color: #3B82F6; }

.cal-time-col {
  display: flex; flex-direction: column;
  background: #F9FAFB; border-right: 1px solid var(--border);
}
.cal-time-slot {
  height: 56px; display: flex; align-items: flex-start;
  justify-content: flex-end; padding: 4px 8px 0 0;
  font-size: 10px; color: var(--muted);
  border-bottom: 1px solid #F3F4F6; flex-shrink: 0;
}
.cal-day-col {
  border-left: 1px solid var(--border); position: relative;
  min-height: 504px;
}
.cal-day-col.today { background: rgba(59,130,246,0.03); }
.cal-hour-bg {
  position: absolute; left: 0; right: 0; height: 56px;
  border-bottom: 1px solid #F3F4F6;
}
.cal-now-line {
  position: absolute; left: 0; right: 0; border-top: 2px solid #EF4444; z-index: 5;
}
.cal-now-line::before {
  content: ''; position: absolute; left: -4px; top: -4px;
  width: 8px; height: 8px; background: #EF4444; border-radius: 50%;
}

/* Blocs d'événements */
.cal-event {
  position: absolute; left: 3px; right: 3px; border-radius: 5px;
  padding: 4px 7px; font-size: 11px; cursor: pointer;
  overflow: hidden; transition: filter 0.1s; z-index: 2;
}
.cal-event:hover { filter: brightness(0.93); }
.cal-event-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-time { font-size: 10px; opacity: 0.75; margin-top: 1px; }
.cal-ev-planned  { background: #EFF6FF; border-left: 3px solid #3B82F6; color: #1D4ED8; }
.cal-ev-done     { background: #F0FDF4; border-left: 3px solid #22C55E; color: #15803D; }
.cal-ev-error    { background: #FEF2F2; border-left: 3px solid #EF4444; color: #B91C1C; }
.cal-ev-running  { background: #FFF7ED; border-left: 3px solid #F59E0B; color: #B45309; }
.cal-ev-recurring { background: #FDF4FF; border-left: 3px solid #A855F7; color: #7C3AED; }

/* Grille mois */
.cal-month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: var(--border); border-radius: 0 0 8px 8px; overflow: hidden;
}
.cal-month-hdr {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.cal-month-day-hdr {
  text-align: center; padding: 6px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.5px;
}
.cal-month-cell {
  background: white; min-height: 80px;
  padding: 4px; display: flex; flex-direction: column; gap: 2px;
}
.cal-month-cell.other-month { background: #F9FAFB; }
.cal-month-cell.today { background: rgba(59,130,246,0.05); }
.cal-month-cell-num {
  font-size: 12px; font-weight: 500; color: var(--muted);
  width: 22px; height: 22px; display: flex; align-items: center;
  justify-content: center; border-radius: 50%; margin-bottom: 2px;
}
.cal-month-cell.today .cal-month-cell-num {
  background: #3B82F6; color: white; font-weight: 600;
}
.cal-month-ev {
  font-size: 10px; font-weight: 500; border-radius: 3px;
  padding: 1px 5px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* ===== PANEL DÉTAIL TÂCHE ===== */
.task-detail-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 380px;
  background: white; border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08); z-index: 9100;
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform 0.2s ease;
}
.task-detail-panel.open { transform: translateX(0); }
.tdp-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.tdp-header h3 { font-size: 15px; font-weight: 700; }
.tdp-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--muted); }
.tdp-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tdp-field { display: flex; flex-direction: column; gap: 4px; }
.tdp-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.tdp-value { font-size: 13px; color: var(--text); line-height: 1.5; }
.tdp-prompt { background: #F9FAFB; border-radius: 8px; padding: 10px 12px; font-size: 12px; font-family: monospace; line-height: 1.6; }
.tdp-executions { display: flex; flex-direction: column; gap: 8px; }
.tdp-exec { background: #F9FAFB; border-radius: 8px; padding: 10px 12px; font-size: 12px; border-left: 3px solid var(--border); }
.tdp-exec.done { border-color: #22C55E; }
.tdp-exec.error { border-color: #EF4444; }
.tdp-exec-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tdp-exec-response { color: var(--muted); line-height: 1.5; max-height: 120px; overflow-y: auto; }
.tdp-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.tdp-btn-run { background: linear-gradient(135deg,#3B82F6,#6366F1); color: white; border: none; border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.tdp-btn-run:hover { opacity: 0.88; }
.tdp-btn-edit { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 12px; cursor: pointer; transition: background 0.15s; }
.tdp-btn-edit:hover { background: var(--bg-secondary,#F3F4F6); }
.tdp-btn-del { margin-left: auto; background: none; color: #EF4444; border: 1px solid #FCA5A5; border-radius: 8px; padding: 8px 14px; font-size: 12px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.tdp-btn-del:hover { background: #FEF2F2; }

/* ===== MODAL CRÉATION TÂCHE ===== */
.task-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 9200; display: none; align-items: center; justify-content: center;
}
.task-modal-overlay.open { display: flex; }
.task-modal {
  background: white; border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  width: 500px; max-height: 90vh; display: flex; flex-direction: column;
  overflow: hidden;
}
.tm-header {
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.tm-header h3 { font-size: 16px; font-weight: 700; }
.tm-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--muted); }
.tm-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.tm-type-toggle {
  display: flex; background: #F9FAFB; border-radius: 10px; padding: 4px; gap: 4px;
}
.tm-type-btn {
  flex: 1; padding: 8px; border-radius: 7px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: transparent; transition: all 0.15s;
}
.tm-type-btn.active {
  background: white; color: var(--text);
  font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.tm-field { display: flex; flex-direction: column; gap: 6px; }
.tm-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.tm-select, .tm-input, .tm-textarea {
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; color: var(--text);
  background: white; outline: none; font-family: inherit;
  transition: border-color 0.15s;
}
.tm-select:focus, .tm-input:focus, .tm-textarea:focus { border-color: #3B82F6; }
.tm-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.tm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tm-days { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-day-pill {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--border); background: white;
  font-size: 11px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.15s;
}
.tm-day-pill.on { background: #3B82F6; border-color: #3B82F6; color: white; }
.tm-btn-ask {
  background: #F0F9FF; border: 1.5px solid #BAE6FD; color: #0284C7;
  border-radius: 8px; padding: 9px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; width: 100%; text-align: center;
}
.tm-chat {
  border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden;
  display: none;
}
.tm-chat.open { display: block; }
.tm-chat-msgs { max-height: 180px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.tm-chat-msg { font-size: 12px; padding: 7px 10px; border-radius: 8px; max-width: 85%; line-height: 1.4; }
.tm-chat-msg.user { background: #EDE9FE; align-self: flex-end; }
.tm-chat-msg.agent { background: #F3F4F6; align-self: flex-start; }
.tm-chat-input { display: flex; border-top: 1px solid var(--border); }
.tm-chat-input input { flex: 1; border: none; padding: 9px 12px; font-size: 12px; outline: none; font-family: inherit; }
.tm-chat-input button { background: none; border: none; padding: 8px 12px; cursor: pointer; color: var(--primary); font-size: 14px; }
.tm-footer { padding: 12px 22px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.tm-btn-cancel { background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: 9px 16px; font-size: 13px; cursor: pointer; color: var(--text-secondary,#6B7280); transition: background 0.15s; }
.tm-btn-cancel:hover { background: var(--bg-secondary,#F3F4F6); }
.tm-btn-submit, .tm-btn-save { background: linear-gradient(135deg,#4F46E5,#6366F1); color: white; border: none; border-radius: 8px; padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.15s, transform 0.1s; }
.tm-btn-submit:hover, .tm-btn-save:hover { opacity: 0.92; transform: translateY(-1px); }
.tm-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== ONGLET BUREAU ===== */
.bureau-canvas {
  position: relative; width: 100%; height: 380px;
  background: linear-gradient(135deg, #F0F9FF 0%, #EFF6FF 100%);
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
}
.bureau-zone {
  position: absolute; border-radius: 12px; border: 1.5px dashed rgba(0,0,0,0.12);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 10px 8px; gap: 8px;
}
.bureau-zone-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--muted); margin-bottom: 4px;
}
.bureau-agent {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: transform 0.15s;
}
.bureau-agent:hover { transform: scale(1.06); }
.bureau-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white;
}
.bureau-agent-name { font-size: 10px; font-weight: 600; color: var(--text); }
.bureau-agent-status {
  font-size: 9px; color: var(--muted); text-align: center;
  max-width: 60px; line-height: 1.3;
}
.bureau-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid white; position: absolute; bottom: 0; right: 0;
}
.bureau-status-dot.online { background: #22C55E; }
.bureau-status-dot.busy { background: #F59E0B; }
.bureau-status-dot.offline { background: #9CA3AF; }

/* Badge non lus sidebar */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; border-radius: 9px;
  background: #22C55E; color: white;
  font-size: 10px; font-weight: 700; padding: 0 4px;
  margin-left: auto; line-height: 1; flex-shrink: 0;
}
.nav-badge.hidden { display: none; }


/* ===== BUREAU 2D — v2 top-down ===== */
#bureau-canvas {
  position: relative;
  width: 100%;
  min-height: 560px;
  background: #E8EBF0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  user-select: none;
}
/* Room floor */
.bur-room {
  position: absolute;
  inset: 20px;
  background: #F2F4F7;
  border-radius: 6px;
  border: 3px solid #B0B8C8;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.04);
}
/* Floor tiles pattern */
.bur-room::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(180,185,200,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,185,200,0.18) 1px, transparent 1px);
  background-size: 40px 40px;
  border-radius: 4px;
}
/* Zones */
.bur-zone {
  position: absolute;
  border-radius: 6px;
  border: 1.5px dashed rgba(140,150,170,0.5);
}
.bur-zone-label {
  position: absolute;
  top: 6px; left: 10px;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: rgba(100,114,140,0.8);
  white-space: nowrap;
}
/* Window on right wall */
.bur-window {
  position: absolute;
  background: linear-gradient(135deg, #BAE6FD 0%, #7DD3FC 50%, #BAE6FD 100%);
  border: 3px solid #94A3B8;
  border-radius: 3px;
}
.bur-window::after {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 2px;
  background: #94A3B8;
}
.bur-window::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: #94A3B8;
}
/* Desk (top-down view) */
.bur-desk {
  position: absolute;
  background: #D4C5A9;
  border-radius: 4px 4px 0 0;
  border: 2px solid #B8A98C;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}
.bur-desk-screen {
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  border-radius: 2px;
  border: 1.5px solid #334155;
  box-shadow: inset 0 0 6px rgba(34,197,94,0.3);
}
.bur-desk-screen::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: linear-gradient(135deg, #0F4C2A 0%, #166534 50%, #14532D 100%);
  border-radius: 1px;
  opacity: 0.7;
}
.bur-desk-screen.on::after {
  background: linear-gradient(135deg, #052E16 0%, #14532D 40%, #16A34A 100%);
  opacity: 1;
  box-shadow: inset 0 0 8px rgba(34,197,94,0.5);
}
/* Chair (top-down circle behind desk) */
.bur-chair {
  position: absolute;
  background: #6B7280;
  border-radius: 50%;
  border: 2px solid #4B5563;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/* Coffee machine in kitchen */
.bur-coffee {
  position: absolute;
  background: #374151;
  border-radius: 4px;
  border: 2px solid #1F2937;
}
.bur-coffee::after {
  content: '';
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: #EF4444;
  border-radius: 50%;
  border: 1px solid #DC2626;
}
/* Small kitchen table */
.bur-ktable {
  position: absolute;
  background: #D4C5A9;
  border-radius: 50%;
  border: 2px solid #B8A98C;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* Sofa (lounge) */
.bur-sofa {
  position: absolute;
  background: #6B7280;
  border-radius: 6px;
  border: 2px solid #4B5563;
}
.bur-sofa::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  background: #9CA3AF;
  border-radius: 4px;
}
/* Coffee table (lounge) */
.bur-ctable {
  position: absolute;
  background: #C4A882;
  border-radius: 4px;
  border: 2px solid #A0856A;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Plant */
.bur-plant {
  position: absolute;
  background: radial-gradient(circle at 40% 40%, #4ADE80 0%, #16A34A 60%, #166534 100%);
  border-radius: 50%;
  border: 2px solid #15803D;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
/* Human silhouette (top-down) */
.bur-agent {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 20;
}
.bur-agent:hover { transform: scale(1.12); }
.bur-agent-body { position: relative; }
.bur-agent-name {
  font-size: 9px;
  font-weight: 700;
  color: #1E293B;
  background: rgba(255,255,255,0.92);
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  white-space: nowrap;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bur-agent-task {
  font-size: 8px;
  color: #64748B;
  background: rgba(255,255,255,0.9);
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 2px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Status ring */
.bur-status-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid transparent;
}
.bur-status-ring.running {
  border-color: #22C55E;
  animation: bur-pulse 1.8s ease infinite;
}
.bur-status-ring.chatting {
  border-color: #3B82F6;
  animation: bur-pulse-blue 1.8s ease infinite;
}
@keyframes bur-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}
@keyframes bur-pulse-blue {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(59,130,246,0); }
}
/* Speech bubble */
.bur-bubble {
  position: absolute;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px 8px 8px 2px;
  padding: 4px 8px;
  font-size: 9px;
  color: #475569;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 30;
  max-width: 100px;
  animation: bur-fadein 0.3s ease;
}
@keyframes bur-fadein { from { opacity:0; transform: scale(0.8); } to { opacity:1; transform: scale(1); } }

/* ===== TASKS GRID CARDS ===== */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  padding: 16px 20px;
}
.task-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.task-card-agent {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.task-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.task-card-agent-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.task-card-proj {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}
.task-card-body {
  flex: 1;
}
.task-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card-preview {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.task-card-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.task-card-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 500;
}
.tag-recur { background: #EEF2FF; color: #4F46E5; }
.tag-once  { background: #F0FDF4; color: #15803D; }
.task-card-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: all 0.12s;
}
.task-card-btn:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
  color: var(--primary);
}
.task-card-btn-del:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #EF4444;
}
/* Actions view full width */
#view-actions .actions-v {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
#view-actions #kanban-board {
  flex: 1;
  overflow-y: auto;
}
