@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root{
  --bg:#09090b;--surface:#111113;--surface2:#18181b;--surface3:#1f1f23;
  --border:#27272a;--border-light:#3f3f46;
  --text:#fafafa;--text2:#a1a1aa;--text3:#71717a;
  --accent:#8b5cf6;--accent-dim:rgba(139,92,246,.12);--accent-border:rgba(139,92,246,.3);
  --green:#22c55e;--green-dim:rgba(34,197,94,.12);
  --red:#ef4444;--red-dim:rgba(239,68,68,.12);
  --yellow:#eab308;--yellow-dim:rgba(234,179,8,.12);
  --blue:#3b82f6;--blue-dim:rgba(59,130,246,.12);
  --purple:#a78bfa;--purple-dim:rgba(167,139,250,.12);
  --orange:#f97316;--orange-dim:rgba(249,115,22,.12);
  --shadow:0 1px 3px rgba(0,0,0,.4),0 1px 2px rgba(0,0,0,.3);
  --shadow-lg:0 10px 30px rgba(0,0,0,.5);
  --radius:8px;--radius-lg:12px;--radius-xl:16px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:13px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:-.01em}
body{background:var(--bg);color:var(--text);min-height:100vh}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:99px}
::-webkit-scrollbar-thumb:hover{background:var(--border-light)}
a{text-decoration:none;color:inherit}
button{cursor:pointer;font-family:inherit}
input,select,textarea{font-family:inherit}

/* ── TOP BAR ─────────────────────────────────────────────────── */
.topbar{background:rgba(9,9,11,.8);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);padding:0 20px;display:flex;align-items:center;height:52px;position:sticky;top:0;z-index:200;gap:12px}
.logo{display:flex;align-items:center;gap:9px;cursor:pointer;flex-shrink:0}
.logo-icon{width:30px;height:30px;background:linear-gradient(135deg,var(--accent),var(--blue));border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;box-shadow:0 2px 8px rgba(139,92,246,.25)}
.logo h1{font-size:14px;font-weight:700;white-space:nowrap;letter-spacing:-.03em}
.topbar-sep{width:1px;height:20px;background:var(--border);flex-shrink:0}
.topbar-nav{display:flex;gap:2px}
.topbar-nav-btn{background:transparent;border:none;color:var(--text2);padding:6px 12px;border-radius:var(--radius);font-size:12px;font-weight:500;transition:all .15s ease;letter-spacing:-.01em}
.topbar-nav-btn:hover{background:var(--surface);color:var(--text)}
.topbar-nav-btn.active{background:var(--accent-dim);color:var(--accent)}
.hod-btn{background:var(--purple-dim)!important;border:1px solid var(--accent-border)!important;color:var(--purple)!important}
.hod-btn:hover{background:rgba(167,139,250,.2)!important}
.creator-credit{font-size:11px;color:var(--text3);padding:5px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface);white-space:nowrap;letter-spacing:-.01em}
.spacer{flex:1}
.avatar{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;flex-shrink:0;cursor:pointer;position:relative;background:var(--surface);border:1px solid var(--border);color:var(--text);transition:all .15s ease}
.avatar:hover{border-color:var(--accent)}
.user-menu{position:absolute;top:calc(100% + 8px);right:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);min-width:200px;z-index:300;box-shadow:var(--shadow-lg);overflow:hidden;padding:4px}
.user-menu-header{padding:12px 14px;border-bottom:1px solid var(--border);margin-bottom:4px}
.user-menu-header .name{font-weight:600;font-size:13px;letter-spacing:-.02em}
.user-menu-header .uname{font-size:11px;color:var(--text3);margin-top:2px}
.user-menu-item{padding:8px 12px;font-size:12px;color:var(--text2);cursor:pointer;transition:all .15s ease;display:flex;align-items:center;gap:8px;border-radius:6px;font-weight:500}
.user-menu-item:hover{background:var(--surface2);color:var(--text)}
.user-menu-item.danger{color:var(--red)}
.user-menu-item.danger:hover{background:var(--red-dim)}

/* ── MAIN ────────────────────────────────────────────────────── */
.view{display:none}
.view.active{display:block}

/* ── HUB ────────────────────────────────────────────────────── */
.hub{padding:32px 28px 48px;max-width:1200px;margin:0 auto}
.hub-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.hub-header h2{font-size:20px;font-weight:700;letter-spacing:-.03em}
.btn-primary{background:var(--accent);color:#fff;border:none;border-radius:var(--radius);padding:8px 16px;font-size:12px;font-weight:600;transition:all .2s ease;letter-spacing:-.01em;box-shadow:0 1px 2px rgba(139,92,246,.3)}
.btn-primary:hover{background:#7c3aed;transform:translateY(-1px);box-shadow:0 4px 12px rgba(139,92,246,.4)}
.btn-secondary{background:var(--surface);border:1px solid var(--border);color:var(--text2);border-radius:var(--radius);padding:6px 12px;font-size:12px;font-weight:500;transition:all .15s ease;letter-spacing:-.01em}
.btn-secondary:hover{border-color:var(--border-light);color:var(--text);background:var(--surface2)}
.btn-danger{background:var(--red-dim);border:1px solid rgba(239,68,68,.3);color:var(--red);border-radius:var(--radius);padding:6px 12px;font-size:12px;font-weight:500;transition:all .15s ease}
.btn-danger:hover{background:var(--red);color:#fff;border-color:var(--red)}
.plans-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-bottom:40px}
.plan-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}
.plan-card:hover{transform:translateY(-2px);border-color:var(--border-light);box-shadow:var(--shadow-lg)}
.plan-card-accent{position:absolute;top:0;left:0;right:0;height:3px;border-radius:var(--radius-lg) var(--radius-lg) 0 0}
.plan-card-emoji{font-size:28px;margin-bottom:12px;display:block}
.plan-card-name{font-size:15px;font-weight:600;margin-bottom:6px;letter-spacing:-.02em}
.plan-card-desc{font-size:12px;color:var(--text2);margin-bottom:14px;line-height:1.6;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.plan-card-meta{display:flex;gap:12px;font-size:11px;color:var(--text3)}
.plan-card-add{border:2px dashed var(--border);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--text3);min-height:140px;transition:all .2s ease;background:transparent}
.plan-card-add:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}
.plan-card-add span{font-size:28px}
.plan-card-add p{font-size:13px;font-weight:500}

/* My Tasks section */
.section-title{font-size:14px;font-weight:600;margin-bottom:14px;display:flex;align-items:center;gap:8px;letter-spacing:-.02em}
.section-title .badge{background:var(--surface);border:1px solid var(--border);padding:2px 8px;border-radius:999px;font-size:11px;color:var(--text2);font-weight:500}
.mytasks-list{display:flex;flex-direction:column;gap:8px}
.mytask-row{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;display:flex;align-items:center;gap:12px;cursor:pointer;transition:all .15s ease}
.mytask-row:hover{border-color:var(--border-light);background:var(--surface2)}
.mytask-row.overdue{border-left:3px solid var(--red)}
.mytask-check{width:18px;height:18px;border:2px solid var(--border);border-radius:50%;flex-shrink:0;transition:all .2s ease;display:flex;align-items:center;justify-content:center}
.mytask-check:hover{border-color:var(--green);background:var(--green-dim)}
.mytask-title{flex:1;font-size:13px;font-weight:500;letter-spacing:-.01em}
.mytask-plan{font-size:11px;color:var(--text2);background:var(--surface2);border:1px solid var(--border);padding:2px 8px;border-radius:999px;white-space:nowrap;font-weight:500}
.mytask-due{font-size:11px;color:var(--text3);white-space:nowrap;font-weight:500}
.mytask-due.overdue{color:var(--red)}

/* ── BOARD VIEW ─────────────────────────────────────────────── */
.board-wrapper{display:flex;flex-direction:column;height:calc(100vh - 52px)}
.board-topbar{background:var(--surface);border-bottom:1px solid var(--border);padding:10px 20px;display:flex;align-items:center;gap:10px;flex-shrink:0;flex-wrap:wrap}
.board-title{display:flex;align-items:center;gap:8px;cursor:pointer}
.board-title .emoji{font-size:18px}
.board-title h2{font-size:15px;font-weight:700;letter-spacing:-.03em}
.board-tabs{display:flex;gap:2px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:2px}
.board-tab{background:transparent;border:none;color:var(--text2);padding:5px 12px;border-radius:6px;font-size:12px;font-weight:500;transition:all .15s ease;letter-spacing:-.01em}
.board-tab.active{background:var(--accent-dim);color:var(--accent)}
.board-tab:hover:not(.active){color:var(--text)}
.filter-bar{display:flex;gap:8px;align-items:center;flex:1;flex-wrap:wrap}
.search-box{background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:7px 12px;color:var(--text);font-size:12px;font-weight:500;outline:none;width:200px;transition:all .2s ease;letter-spacing:-.01em}
.search-box:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim);width:240px}
.search-box::placeholder{color:var(--text3)}
.filter-select{background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:7px 10px;color:var(--text2);font-size:11px;font-weight:500;outline:none;cursor:pointer;transition:all .15s ease;letter-spacing:-.01em}
.filter-select:focus{border-color:var(--accent);color:var(--text)}
.filter-select option{background:var(--surface);color:var(--text)}

.board-scroll{flex:1;overflow-x:auto;overflow-y:hidden;padding:16px 20px;display:flex;gap:14px;align-items:flex-start;min-height:0}
.bucket-col{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);width:280px;flex-shrink:0;display:flex;flex-direction:column;max-height:100%;overflow:hidden}
.bucket-col.drag-over{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.bucket-header{padding:14px 14px 10px;display:flex;align-items:center;gap:8px;flex-shrink:0}
.bucket-name{font-size:13px;font-weight:600;flex:1;outline:none;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--text);padding:3px 6px;cursor:text;transition:all .15s ease;letter-spacing:-.02em}
.bucket-name:focus{border-color:var(--border);background:var(--surface2)}
.bucket-count{font-size:10px;color:var(--text3);background:var(--surface2);border:1px solid var(--border);padding:2px 7px;border-radius:999px;font-weight:600}
.bucket-menu-btn{background:transparent;border:none;color:var(--text3);font-size:16px;padding:3px 6px;border-radius:6px;opacity:0;transition:all .15s ease}
.bucket-header:hover .bucket-menu-btn{opacity:1}
.bucket-menu-btn:hover{background:var(--surface2);color:var(--text)}
.bucket-tasks{flex:1;overflow-y:auto;padding:4px 10px 10px;display:flex;flex-direction:column;gap:8px;min-height:60px}
.bucket-add-btn{background:transparent;border:none;color:var(--text3);padding:10px 14px;font-size:12px;font-weight:500;text-align:left;width:100%;transition:all .15s ease;border-top:1px solid var(--border);flex-shrink:0;border-radius:0 0 var(--radius-lg) var(--radius-lg)}
.bucket-add-btn:hover{color:var(--accent);background:var(--accent-dim)}
.add-bucket-btn{background:transparent;border:2px dashed var(--border);border-radius:var(--radius-lg);width:280px;flex-shrink:0;color:var(--text3);font-size:12px;font-weight:500;padding:20px;cursor:pointer;transition:all .2s ease;align-self:flex-start}
.add-bucket-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}

/* Task card */
.task-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;cursor:pointer;transition:all .15s ease;position:relative;user-select:none}
.task-card:hover{border-color:var(--border-light);box-shadow:var(--shadow)}
.task-card.dragging{opacity:.4;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.task-card.completed-card{opacity:.5}
.task-card-labels{display:flex;gap:4px;margin-bottom:8px;flex-wrap:wrap}
.label-pip{height:5px;border-radius:99px;min-width:24px}
.task-card-title{font-size:13px;font-weight:500;line-height:1.5;margin-bottom:8px;word-break:break-word;letter-spacing:-.01em}
.task-card-title.striked{text-decoration:line-through;color:var(--text3)}
.task-card-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.priority-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.p-urgent{background:var(--orange);box-shadow:0 0 6px rgba(249,115,22,.4)}.p-high{background:var(--red);box-shadow:0 0 6px rgba(239,68,68,.4)}.p-medium{background:var(--yellow);box-shadow:0 0 6px rgba(234,179,8,.4)}.p-low{background:var(--blue);box-shadow:0 0 6px rgba(59,130,246,.4)}
.due-chip{font-size:10px;color:var(--text2);background:var(--surface2);border:1px solid var(--border);padding:2px 7px;border-radius:999px;display:flex;align-items:center;gap:3px;font-weight:500}
.due-chip.overdue{background:var(--red-dim);border-color:rgba(239,68,68,.3);color:var(--red)}
.due-chip.today{background:var(--yellow-dim);border-color:rgba(234,179,8,.3);color:var(--yellow)}
.assignee-stack{display:flex;margin-left:auto}
.assignee-stack .av{width:22px;height:22px;border-radius:50%;border:2px solid var(--surface);font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-left:-6px}
.assignee-stack .av:first-child{margin-left:0}
.checklist-bar{margin-top:8px}
.checklist-bar-track{background:var(--border);height:4px;border-radius:99px;overflow:hidden}
.checklist-bar-fill{height:100%;background:var(--green);border-radius:99px;transition:width .3s ease}
.checklist-bar-text{font-size:10px;color:var(--text3);margin-top:4px;font-weight:500}
.comment-indicator{font-size:10px;color:var(--text3);display:flex;align-items:center;gap:3px;font-weight:500}
.complete-btn{position:absolute;top:10px;right:10px;width:20px;height:20px;border-radius:50%;border:2px solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:center;font-size:10px;opacity:0;transition:all .15s ease;flex-shrink:0;color:transparent}
.task-card:hover .complete-btn{opacity:1}
.complete-btn:hover{border-color:var(--green);background:var(--green-dim);color:var(--green)}
.task-card.completed-card .complete-btn{opacity:1;border-color:var(--green);background:var(--green-dim);color:var(--green)}

/* ── SIDE PANEL ─────────────────────────────────────────────── */
.panel-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:400;display:none;backdrop-filter:blur(2px)}
.panel-overlay.open{display:block}
.side-panel{position:fixed;top:0;right:0;bottom:0;width:480px;background:var(--surface);border-left:1px solid var(--border);z-index:500;display:flex;flex-direction:column;transform:translateX(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);overflow:hidden}
.side-panel.open{transform:translateX(0)}
.panel-header{display:flex;align-items:flex-start;gap:12px;padding:18px 20px 14px;border-bottom:1px solid var(--border);flex-shrink:0}
.panel-close{background:transparent;border:none;color:var(--text2);font-size:18px;padding:4px 8px;border-radius:6px;flex-shrink:0;transition:all .15s ease;margin-top:-2px}
.panel-close:hover{background:var(--surface2);color:var(--text)}
.panel-title-wrap{flex:1;min-width:0}
.panel-title{font-size:16px;font-weight:600;outline:none;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--text);width:100%;padding:4px 8px;line-height:1.4;word-break:break-word;transition:all .15s ease;letter-spacing:-.02em;cursor:text}
.panel-title:hover{border-color:var(--border)}
.panel-title:focus{border-color:var(--border);background:var(--surface2)}
.panel-plan-name{font-size:11px;color:var(--text3);margin-top:4px;padding-left:8px;font-weight:500}
.panel-body{flex:1;overflow-y:auto;padding:18px 20px}
.panel-section{margin-bottom:24px}
.panel-label{font-size:11px;color:var(--text2);font-weight:600;margin-bottom:10px;display:flex;align-items:center;gap:8px;text-transform:uppercase;letter-spacing:.05em}
.panel-row{display:flex;gap:10px;align-items:flex-start;margin-bottom:10px}
.panel-row .panel-label{min-width:100px;margin-bottom:0;padding-top:7px;flex-shrink:0}

/* Assignee picker */
.assignee-list{display:flex;flex-wrap:wrap;gap:6px}
.assignee-chip{display:flex;align-items:center;gap:6px;background:var(--surface2);border:1px solid var(--border);border-radius:999px;padding:4px 10px 4px 4px;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease}
.assignee-chip:hover{border-color:var(--red);background:var(--red-dim)}
.assignee-chip .av{width:22px;height:22px;border-radius:50%;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.assignee-chip .remove{font-size:10px;color:var(--text3);margin-left:2px}
.add-assignee-btn{background:var(--surface2);border:1px dashed var(--border);border-radius:999px;padding:5px 12px;font-size:11px;font-weight:500;color:var(--text3);transition:all .15s ease}
.add-assignee-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}

/* Priority */
.priority-btns{display:flex;gap:6px}
.pri-btn{background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:6px 12px;font-size:11px;font-weight:500;color:var(--text2);transition:all .15s ease;letter-spacing:-.01em}
.pri-btn:hover{border-color:var(--border-light);color:var(--text)}
.pri-btn.active-urgent{background:var(--orange-dim);border-color:rgba(249,115,22,.4);color:var(--orange)}
.pri-btn.active-high{background:var(--red-dim);border-color:rgba(239,68,68,.4);color:var(--red)}
.pri-btn.active-medium{background:var(--yellow-dim);border-color:rgba(234,179,8,.4);color:var(--yellow)}
.pri-btn.active-low{background:var(--blue-dim);border-color:rgba(59,130,246,.4);color:var(--blue)}

/* Labels */
.label-chips{display:flex;gap:6px;flex-wrap:wrap}
.label-chip{border-radius:6px;padding:5px 12px;font-size:11px;font-weight:500;cursor:pointer;border:2px solid transparent;transition:all .15s ease;opacity:.4}
.label-chip.active{opacity:1;border-color:rgba(255,255,255,.3)}

/* Due date */
.due-input{background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:7px 10px;color:var(--text);font-size:12px;font-weight:500;outline:none;transition:all .15s ease}
.due-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}

/* Description */
.desc-area{width:100%;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:10px 14px;color:var(--text);font-size:12px;resize:vertical;min-height:80px;outline:none;line-height:1.6;transition:all .15s ease;letter-spacing:-.01em}
.desc-area:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.desc-area::placeholder{color:var(--text3)}

/* Checklist */
.checklist-items{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.cl-item{display:flex;align-items:center;gap:8px}
.cl-item input[type=checkbox]{width:16px;height:16px;accent-color:var(--green);cursor:pointer;flex-shrink:0;border-radius:4px}
.cl-item-text{flex:1;font-size:12px;line-height:1.5;font-weight:500}
.cl-item-text.done{text-decoration:line-through;color:var(--text3)}
.cl-item input[type=text]{flex:1;background:transparent;border:none;border-bottom:1px solid var(--border);color:var(--text);font-size:12px;outline:none;padding:3px 5px;font-weight:500}
.cl-item input[type=text]:focus{border-color:var(--accent)}
.cl-del{background:transparent;border:none;color:var(--text3);font-size:12px;padding:3px 6px;cursor:pointer;opacity:0;transition:all .15s ease;border-radius:4px}
.cl-item:hover .cl-del{opacity:1}
.cl-del:hover{background:var(--red-dim);color:var(--red)}
.cl-add-input{display:flex;gap:8px;margin-top:6px}
.cl-add-input input{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:7px 12px;color:var(--text);font-size:12px;font-weight:500;outline:none;transition:all .15s ease}
.cl-add-input input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.cl-add-input button{background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:7px 14px;color:var(--text2);font-size:12px;font-weight:500;transition:all .15s ease}
.cl-add-input button:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}

/* Comments */
.comment-list{display:flex;flex-direction:column;gap:14px;margin-bottom:14px}
.comment-item{display:flex;gap:10px}
.comment-item .av{width:28px;height:28px;border-radius:50%;font-size:11px;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.comment-body{flex:1;min-width:0}
.comment-meta{display:flex;align-items:center;gap:6px;margin-bottom:4px}
.comment-author{font-size:12px;font-weight:600;letter-spacing:-.01em}
.comment-time{font-size:10px;color:var(--text3);font-weight:500}
.comment-text{font-size:12px;line-height:1.6;color:var(--text2);word-break:break-word}
.comment-input-row{display:flex;gap:8px;align-items:flex-end}
.comment-textarea{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:10px 12px;color:var(--text);font-size:12px;resize:none;height:64px;outline:none;line-height:1.5;transition:all .15s ease}
.comment-textarea:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim);height:88px}
.comment-textarea::placeholder{color:var(--text3)}

/* Activity */
.activity-list{display:flex;flex-direction:column;gap:8px}
.activity-item{display:flex;gap:8px;font-size:11px;color:var(--text2)}
.activity-time{color:var(--text3);white-space:nowrap;flex-shrink:0;font-weight:500}
.panel-complete-btn{width:100%;background:var(--green-dim);border:1px solid rgba(34,197,94,.3);color:var(--green);border-radius:var(--radius);padding:10px;font-size:12px;font-weight:600;margin-bottom:16px;transition:all .2s ease;letter-spacing:-.01em}
.panel-complete-btn:hover{background:var(--green);color:#000}
.panel-complete-btn.completed{background:var(--surface2);border-color:var(--border);color:var(--text3)}
.panel-delete-btn{width:100%;background:transparent;border:1px solid var(--border);color:var(--text3);border-radius:var(--radius);padding:8px;font-size:11px;font-weight:500;margin-top:10px;transition:all .15s ease}
.panel-delete-btn:hover{border-color:var(--red);color:var(--red);background:var(--red-dim)}

/* ── MODALS ─────────────────────────────────────────────────── */
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:600;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(4px)}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px;width:100%;max-width:440px;box-shadow:var(--shadow-lg)}
.modal h3{font-size:16px;font-weight:700;margin-bottom:18px;letter-spacing:-.03em}
.modal-field{margin-bottom:14px}
.modal-field label{display:block;font-size:12px;color:var(--text2);margin-bottom:6px;font-weight:500}
.modal-field input,.modal-field textarea,.modal-field select{width:100%;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:9px 12px;color:var(--text);font-size:13px;outline:none;font-weight:500;transition:all .15s ease}
.modal-field input:focus,.modal-field textarea:focus,.modal-field select:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.modal-field textarea{resize:vertical;min-height:80px;line-height:1.6}
.modal-field select option{background:var(--surface)}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}
.emoji-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.emoji-btn{font-size:22px;padding:6px 8px;background:transparent;border:1px solid var(--border);border-radius:8px;cursor:pointer;transition:all .15s ease;line-height:1}
.emoji-btn:hover{border-color:var(--border-light);background:var(--surface2)}
.emoji-btn.selected{border-color:var(--accent);background:var(--accent-dim)}
.color-row{display:flex;gap:8px;flex-wrap:wrap}
.color-swatch{width:26px;height:26px;border-radius:50%;cursor:pointer;border:3px solid transparent;transition:all .15s ease}
.color-swatch:hover{transform:scale(1.1)}
.color-swatch.selected{border-color:var(--text);box-shadow:0 0 0 2px var(--accent-dim)}

/* ── MY TASKS VIEW ───────────────────────────────────────────── */
.mytasks-view{padding:32px 28px 48px;max-width:900px;margin:0 auto}
.mytasks-view h2{font-size:20px;font-weight:700;margin-bottom:20px;letter-spacing:-.03em}
.mytasks-section{margin-bottom:32px}

/* ── EMPTY STATES ────────────────────────────────────────────── */
.empty-state{padding:48px 24px;text-align:center;color:var(--text3)}
.empty-state .icon{font-size:40px;margin-bottom:14px;display:block;opacity:.6}
.empty-state p{font-size:13px;font-weight:500}

/* ── DROPDOWN MENU ───────────────────────────────────────────── */
.dropdown{position:absolute;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);min-width:160px;z-index:700;box-shadow:var(--shadow-lg);overflow:hidden;padding:4px}
.dropdown-item{padding:8px 14px;font-size:12px;color:var(--text2);cursor:pointer;transition:all .15s ease;display:flex;align-items:center;gap:8px;border-radius:6px;font-weight:500}
.dropdown-item:hover{background:var(--surface2);color:var(--text)}
.dropdown-item.danger{color:var(--red)}
.dropdown-item.danger:hover{background:var(--red-dim)}

/* ── PEOPLE PICKER ───────────────────────────────────────────── */
.people-picker{position:absolute;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:240px;z-index:700;box-shadow:var(--shadow-lg);overflow:hidden}
.people-picker input{width:100%;background:var(--surface2);border:none;border-bottom:1px solid var(--border);padding:10px 14px;color:var(--text);font-size:12px;font-weight:500;outline:none}
.people-picker input:focus{border-color:var(--accent)}
.people-picker-list{max-height:200px;overflow-y:auto}
.people-picker-item{padding:10px 14px;display:flex;align-items:center;gap:10px;cursor:pointer;transition:all .15s ease}
.people-picker-item:hover{background:var(--surface2)}
.people-picker-item.selected{background:var(--accent-dim)}
.people-picker-item .av{width:26px;height:26px;border-radius:50%;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}

/* Spinner */
.spin-ring{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}
.spin{display:inline-block;width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-top-color:var(--accent);border-radius:50%;animation:spin .6s linear infinite;vertical-align:middle;margin-right:8px}
@keyframes spin{to{transform:rotate(360deg)}}
.loading-center{display:flex;align-items:center;justify-content:center;padding:60px;flex-direction:column;gap:16px;color:var(--text2);font-size:13px}

/* Toast */
.toast-container{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:900;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{background:var(--surface);border:1px solid var(--border);color:var(--text);padding:10px 20px;border-radius:999px;font-size:12px;font-weight:500;box-shadow:var(--shadow-lg);animation:toastIn .25s ease;pointer-events:none;letter-spacing:-.01em}
.toast.success{border-color:rgba(34,197,94,.4);color:var(--green);background:var(--green-dim)}
.toast.error{border-color:rgba(239,68,68,.4);color:var(--red);background:var(--red-dim)}
@keyframes toastIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* Theme system and readability overrides */
html{font-size:13px;line-height:1.5}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;transition:background .2s ease,color .2s ease}
body[data-theme="light"]{
  --bg:#f5f5f5;--surface:#ffffff;--surface2:#eaeaec;--surface3:#d4d4d8;
  --border:#d4d4d8;--border-light:#c0c0c6;
  --text:#18181b;--text2:#3f3f46;--text3:#71717a;
  --accent:#7c3aed;--accent-dim:rgba(124,58,237,.12);--accent-border:rgba(124,58,237,.3);
  --green:#15803d;--green-dim:rgba(21,128,61,.12);
  --red:#b91c1c;--red-dim:rgba(185,28,28,.12);
  --yellow:#a16207;--yellow-dim:rgba(161,98,7,.12);
  --blue:#1d4ed8;--blue-dim:rgba(29,78,216,.12);
  --purple:#7c3aed;--purple-dim:rgba(124,58,237,.12);
  --orange:#c2410c;--orange-dim:rgba(194,65,12,.12);
  --shadow:0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.04);
  --shadow-lg:0 10px 30px rgba(0,0,0,.1);
}
body[data-theme="light"] .topbar{background:rgba(250,250,250,.85)}
body[data-theme="light"] .spin-ring{border-top-color:var(--accent)}
.hub,.mytasks-view{max-width:1200px;margin:0 auto}
.topbar{height:52px;padding:0 20px}
.board-topbar{padding:10px 20px}
.search-box{width:200px;padding:7px 12px}
.search-box:focus{width:240px}
.bucket-col{width:280px}
.bucket-header{padding:14px 14px 10px}
.bucket-name{font-size:13px}
.bucket-tasks{padding:4px 10px 10px;gap:8px}
.task-card{padding:12px;border-radius:var(--radius)}
.task-card-title{font-size:13px;margin-bottom:8px}
.mytask-row{padding:12px 16px}
.side-panel{width:480px}
.panel-header{padding:18px 20px 14px}
.panel-title{font-size:16px;line-height:1.4}
.panel-plan-name{font-size:11px}
.panel-body{padding:18px 20px}
.panel-section{margin-bottom:24px}
.panel-label{font-size:11px;letter-spacing:.05em;text-transform:uppercase}
.activity-list,.activity-feed{display:flex;flex-direction:column;gap:10px}
.activity-item,.activity-feed-item{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);transition:all .15s ease}
.activity-item:hover,.activity-feed-item:hover{border-color:var(--border-light)}
.activity-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.activity-badge{font-size:10px;text-transform:uppercase;letter-spacing:.06em;padding:3px 8px;border-radius:999px;background:var(--blue-dim);color:var(--blue);font-weight:600}
.activity-copy{font-size:12px;color:var(--text);font-weight:500;line-height:1.5}
.activity-detail{font-size:12px;color:var(--text2);margin-top:4px}
.activity-time{color:var(--text3);font-size:10px;white-space:nowrap;font-weight:500}
.activity-side{margin-left:auto;text-align:right;display:flex;flex-direction:column;gap:4px;align-items:flex-end}
.activity-plan{font-size:10px;color:var(--text2);padding:4px 8px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);font-weight:500}
.hub-stack{display:flex;flex-direction:column;gap:24px}
.hero-banner{padding:24px;border:1px solid var(--border);border-radius:var(--radius-xl);background:linear-gradient(135deg,var(--surface),var(--surface2));display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.hero-copy h3{font-size:24px;line-height:1.15;letter-spacing:-.04em;margin-bottom:8px;font-weight:700}
.hero-copy p{font-size:13px;color:var(--text2);max-width:640px;line-height:1.6}
.hero-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.hero-chip{padding:6px 10px;border-radius:999px;background:var(--surface);border:1px solid var(--border);font-size:11px;color:var(--text2);font-weight:500}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;transition:all .15s ease}
.stat-card:hover{border-color:var(--border-light)}
.stat-card .label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text2);margin-bottom:8px;font-weight:600}
.stat-card .value{font-size:28px;font-weight:700;letter-spacing:-.04em}
.stat-card .sub{font-size:12px;color:var(--text2);margin-top:6px}
.content-grid{display:grid;grid-template-columns:1.3fr .9fr;gap:16px}
.dashboard-panel,.settings-card,.settings-table,.schedule-lane{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg)}
.dashboard-panel{padding:18px}
.dashboard-panel h3,.settings-card h3{font-size:15px;margin-bottom:14px;font-weight:600;letter-spacing:-.02em}
.mini-list{display:flex;flex-direction:column;gap:8px}
.mini-row{display:flex;justify-content:space-between;gap:10px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface2);align-items:flex-start;transition:all .15s ease}
.mini-row:hover{border-color:var(--border-light)}
.mini-row-main{display:flex;flex-direction:column;gap:4px}
.mini-row-title{font-size:13px;color:var(--text);font-weight:600;letter-spacing:-.01em}
.mini-row-sub{font-size:11px;color:var(--text2)}
.mini-pill{padding:4px 8px;border-radius:999px;background:var(--surface);border:1px solid var(--border);font-size:11px;color:var(--text2);white-space:nowrap;font-weight:500}
.notif-btn{position:relative}
.notif-badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--red);color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(239,68,68,.3)}
/* ── Settings ─────────────────────────────── */
.settings-view{display:flex;flex-direction:column;gap:16px;height:100%}
.settings-header{display:flex;align-items:center;justify-content:space-between;padding:0 0 8px}
.settings-header h2{font-size:20px;font-weight:700;letter-spacing:-.03em}
.settings-body{display:flex;gap:20px;flex:1;min-height:0}
.settings-sidebar{flex-shrink:0;width:200px;display:flex;flex-direction:column;gap:4px}
.settings-nav-item{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--radius);font-size:13px;font-weight:500;color:var(--text2);cursor:pointer;transition:all .15s;border:none;background:none;text-align:left;width:100%}
.settings-nav-item:hover{background:var(--surface2);color:var(--text)}
.settings-nav-item.active{background:var(--accent);color:#fff;font-weight:600}
.settings-nav-icon{font-size:16px;width:24px;text-align:center}
.settings-content{flex:1;overflow-y:auto;min-height:400px}
.settings-content-inner{display:flex;flex-direction:column;gap:16px;animation:fadeIn .2s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.settings-card{border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;background:var(--surface)}
.settings-card h3{font-size:15px;margin-bottom:16px;font-weight:600;letter-spacing:-.02em}
.settings-card h4{font-size:13px;margin-bottom:12px;font-weight:600;color:var(--text2);letter-spacing:-.01em}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.settings-field{display:flex;flex-direction:column;gap:6px}
.settings-field label{font-size:12px;color:var(--text2);font-weight:600}
.settings-field input,.settings-field textarea,.settings-field select{width:100%;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:9px 12px;color:var(--text);font-size:12px;font-weight:500;outline:none;transition:all .15s ease;font-family:inherit}
.settings-field input:focus,.settings-field textarea:focus,.settings-field select:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.settings-field textarea{min-height:80px;resize:vertical;line-height:1.6}
.settings-field input[type=color]{height:40px;padding:4px;cursor:pointer}
.settings-field input[type=color]:hover{border-color:var(--accent)}
.settings-field .hint{font-size:11px;color:var(--text3);margin-top:2px}
.toggle-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}
.toggle-chip{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface2);transition:all .15s ease;cursor:pointer;font-size:12px;color:var(--text)}
.toggle-chip:hover{border-color:var(--border-light)}
.toggle-chip input{accent-color:var(--accent);width:16px;height:16px;cursor:pointer}
.settings-table{overflow:hidden;border-radius:var(--radius);border:1px solid var(--border)}
.settings-table table{width:100%;border-collapse:collapse}
.settings-table th,.settings-table td{padding:10px 14px;border-bottom:1px solid var(--border);text-align:left;font-size:12px}
.settings-table th{color:var(--text2);font-weight:600;background:var(--surface2);position:sticky;top:0}
.settings-table tr:last-child td{border-bottom:none}
.settings-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-top:14px}
.theme-preview{display:flex;gap:16px;margin-top:14px;flex-wrap:wrap}
.theme-preview-card{flex:1;min-width:160px;padding:20px;border-radius:var(--radius-lg);cursor:pointer;border:2px solid var(--border);transition:all .15s;text-align:center}
.theme-preview-card.active{border-color:var(--accent)}
.theme-preview-card.light{background:#f5f5f5;color:#18181b}
.theme-preview-card.dark{background:#09090b;color:#fafafa}
.theme-preview-card .preview-label{font-size:13px;font-weight:600;margin-bottom:8px}
.theme-preview-card .preview-dot{width:24px;height:24px;border-radius:50%;display:inline-block;margin:4px;border:1px solid rgba(255,255,255,.1)}
.permissions-grid{display:grid;grid-template-columns:80px repeat(4,1fr);gap:6px;align-items:center}
.permissions-grid .perm-header{font-size:11px;font-weight:600;color:var(--text2);text-align:center;padding:6px}
.permissions-grid .perm-label{font-size:12px;color:var(--text);padding:4px 0}
.permissions-grid label{display:flex;align-items:center;justify-content:center;height:32px;cursor:pointer;background:var(--surface2);border-radius:6px;border:1px solid var(--border);transition:all .15s}
.permissions-grid label:hover{border-color:var(--accent)}
.permissions-grid input{width:16px;height:16px;cursor:pointer;accent-color:var(--accent)}
@media (max-width:900px){
  .settings-body{flex-direction:column}
  .settings-sidebar{width:100%;flex-direction:row;overflow-x:auto;padding-bottom:4px}
  .settings-nav-item{white-space:nowrap;flex-shrink:0;font-size:12px;padding:8px 12px}
  .settings-grid{grid-template-columns:1fr}
  .permissions-grid{grid-template-columns:70px repeat(4,1fr);font-size:11px}
}
.schedule-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:16px;flex-wrap:wrap}
.schedule-grid{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:14px;align-items:start}
.schedule-lane{padding:16px}
.schedule-lane h4{font-size:13px;margin-bottom:10px;font-weight:600;letter-spacing:-.02em}
.schedule-card{padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface2);display:flex;flex-direction:column;gap:8px;cursor:pointer;transition:all .15s ease}
.schedule-card:hover{border-color:var(--border-light);background:var(--surface)}
.schedule-card + .schedule-card{margin-top:8px}
.schedule-card-title{font-size:13px;font-weight:600;letter-spacing:-.01em}
.schedule-card-meta{display:flex;gap:6px;flex-wrap:wrap;font-size:11px;color:var(--text2)}
.attachment-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.attachment-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface2);transition:all .15s ease}
.attachment-row:hover{border-color:var(--border-light)}
.attachment-main{display:flex;flex-direction:column;gap:4px;min-width:0}
.attachment-name{font-size:12px;color:var(--text);font-weight:600;word-break:break-word}
.attachment-link{font-size:11px;color:var(--accent);word-break:break-all}
@media (max-width:900px){
  .topbar{padding:0 12px;gap:8px;flex-wrap:wrap;height:auto;min-height:56px}
  .hub,.mytasks-view{padding:20px 14px 32px}
  .board-topbar{padding:10px 14px}
  .bucket-col,.add-bucket-btn{width:280px}
  .side-panel{width:100vw;max-width:100vw;border-left:none;border-top:1px solid var(--border)}
  .activity-item,.activity-feed-item{flex-direction:column}
  .activity-side{margin-left:0;align-items:flex-start}
  .hero-banner{flex-direction:column}
  .content-grid,.schedule-grid{grid-template-columns:1fr}
}
.badge-hod{background:var(--purple-dim);color:var(--purple);padding:2px 8px;border-radius:99px;font-size:11px;font-weight:600}
.badge-admin{background:var(--blue-dim);color:var(--blue);padding:2px 8px;border-radius:99px;font-size:11px;font-weight:600}
.badge-member{background:var(--accent-dim);color:var(--accent);padding:2px 8px;border-radius:99px;font-size:11px;font-weight:600}
.tag-hod-dept{display:inline-flex;align-items:center;background:var(--purple-dim);color:var(--purple);padding:3px 8px;border-radius:6px;font-size:11px;font-weight:500}

/* ── HOD Dashboard ────────────────────────────────────────────── */
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
@media(max-width:900px){.dash-grid{grid-template-columns:1fr}}
.dash-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.dash-card-header{padding:14px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:8px}
.dash-card-header h3{font-size:13px;font-weight:600;margin:0;display:flex;align-items:center;gap:6px}
.dash-card-body{padding:0}
.dash-card-body.padded{padding:18px}
.dash-table{width:100%;border-collapse:collapse;font-size:12px}
.dash-table th{text-align:left;padding:9px 14px;font-size:10px;font-weight:600;color:var(--text2);text-transform:uppercase;letter-spacing:.05em;background:var(--surface2);border-bottom:1px solid var(--border);white-space:nowrap}
.dash-table td{padding:10px 14px;border-bottom:1px solid var(--border)}
.dash-table tr:last-child td{border-bottom:none}
.dash-table tr:hover td{background:var(--surface2)}
.dash-empty{text-align:center;padding:32px;color:var(--text3);font-size:12px}
.dash-empty .dash-empty-icon{font-size:28px;margin-bottom:8px;opacity:.4}
.progress-bar{background:var(--surface2);border-radius:4px;height:6px;width:80px;overflow:hidden;display:inline-block;vertical-align:middle}
.progress-fill{height:100%;border-radius:4px;transition:width .6s ease}
.workload-bar{background:var(--surface2);border-radius:4px;height:6px;width:80px;overflow:hidden;display:inline-block;vertical-align:middle;margin-right:6px}
.workload-fill{height:100%;border-radius:4px}
.p-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;display:inline-block;vertical-align:middle;margin-right:6px}
.p-dot.high{background:var(--red)}.p-dot.medium{background:var(--yellow)}.p-dot.low{background:var(--blue)}.p-dot.urgent{background:var(--orange)}

/* Deadline items */
.deadline-list{padding:0}
.deadline-item{padding:10px 18px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px;transition:background .1s}
.deadline-item:last-child{border-bottom:none}
.deadline-item:hover{background:var(--surface2)}
.deadline-date{font-size:10px;font-weight:600;padding:3px 8px;border-radius:99px;white-space:nowrap;min-width:50px;text-align:center}
.deadline-date.urgent{background:var(--red-dim);color:var(--red)}
.deadline-date.soon{background:var(--yellow-dim);color:var(--yellow)}
.deadline-date.ok{background:var(--green-dim);color:var(--green)}
.deadline-info{flex:1;min-width:0}
.deadline-info h4{font-size:12px;font-weight:500;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deadline-info .sub{font-size:11px;color:var(--text2)}

/* Member cards */
.members-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;padding:14px}
.member-card{display:flex;gap:10px;padding:12px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);transition:all .15s}
.member-card:hover{border-color:var(--border-light)}
.member-card-selected,.member-card-selected:hover{border-color:var(--accent);background:var(--accent)11;box-shadow:0 0 0 1px var(--accent)}
.member-avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--accent),#6d28d9);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff;flex-shrink:0}
.member-info{flex:1;min-width:0}
.member-info h4{font-size:12px;font-weight:600;margin-bottom:2px}
.member-info .meta{font-size:10px;color:var(--text2);margin-bottom:6px}
.member-stats{display:flex;gap:4px;flex-wrap:wrap}
.member-stat{font-size:10px;padding:2px 7px;border-radius:99px;background:var(--surface);color:var(--text2);border:1px solid var(--border)}
.member-stat.overdue{color:var(--red);border-color:var(--red-dim)}
.member-stat.active{color:var(--yellow);border-color:var(--yellow-dim)}

/* Chart legend */
.chart-area{display:flex;gap:16px;flex-wrap:wrap;align-items:center;padding:14px 18px}
.chart-legend{display:flex;flex-direction:column;gap:6px}
.legend-item{display:flex;align-items:center;gap:6px;font-size:11px}
.legend-dot{width:8px;height:8px;border-radius:3px;flex-shrink:0}
.legend-item span{color:var(--text2)}
.legend-item strong{color:var(--text);min-width:24px;font-size:12px}

/* ── CHAT ─────────────────────────────────────────────────── */
.btn-chat{background:transparent;border:none;color:var(--text2);font-size:13px;padding:6px 10px;border-radius:8px;cursor:pointer;position:relative;transition:all .15s ease;display:inline-flex;align-items:center;gap:4px}
.btn-chat:hover{background:var(--surface2);color:var(--text)}
.chat-unread-badge{position:absolute;top:-2px;right:-2px;background:var(--red);color:#fff;font-size:9px;font-weight:700;min-width:16px;height:16px;border-radius:99px;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid var(--bg)}
.chat-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:350;display:none;backdrop-filter:blur(2px)}
.chat-overlay.open{display:block}
.chat-panel{position:fixed;top:0;right:0;bottom:0;width:420px;background:var(--surface);border-left:1px solid var(--border);z-index:450;display:flex;flex-direction:column;transform:translateX(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);overflow:hidden}
.chat-panel.open{transform:translateX(0)}
.chat-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border);flex-shrink:0}
.chat-header-left{display:flex;align-items:center;gap:8px}
.chat-header h3{font-size:15px;font-weight:700;letter-spacing:-.02em}
.chat-back{background:transparent;border:none;color:var(--text2);font-size:16px;padding:2px 6px;border-radius:6px;cursor:pointer;transition:all .15s ease}
.chat-back:hover{background:var(--surface2);color:var(--text)}
.chat-close{background:transparent;border:none;color:var(--text2);font-size:16px;padding:4px 8px;border-radius:6px;cursor:pointer;transition:all .15s ease}
.chat-close:hover{background:var(--surface2);color:var(--text)}
.chat-channels{flex:1;overflow-y:auto;display:flex;flex-direction:column}
.chat-channels-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 8px;font-size:11px;color:var(--text2);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.chat-unread-total{font-size:10px;color:var(--text3);font-weight:500;text-transform:none;letter-spacing:0}
.chat-channel-list{flex:1;overflow-y:auto}
.chat-channel-item{display:flex;align-items:center;gap:10px;padding:10px 16px;cursor:pointer;transition:all .1s;border-left:3px solid transparent}
.chat-channel-item:hover{background:var(--surface2)}
.chat-channel-item.active{background:var(--surface2);border-left-color:var(--accent)}
.chat-channel-icon{font-size:16px;flex-shrink:0}
.chat-channel-info{flex:1;min-width:0}
.chat-channel-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-channel-preview{font-size:11px;color:var(--text3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
.chat-channel-unread{background:var(--red);color:#fff;font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:99px;display:flex;align-items:center;justify-content:center;padding:0 5px;flex-shrink:0}
.chat-messages{flex:1;display:flex;flex-direction:column;overflow:hidden}
.chat-msg-list{flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:8px}
.chat-msg{display:flex;gap:8px;max-width:100%}
.chat-msg-avatar{width:28px;height:28px;border-radius:50%;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px}
.chat-msg-body{flex:1;min-width:0}
.chat-msg-meta{display:flex;align-items:center;gap:6px;margin-bottom:2px}
.chat-msg-author{font-size:12px;font-weight:600;letter-spacing:-.01em}
.chat-msg-time{font-size:10px;color:var(--text3)}
.chat-msg-text{font-size:13px;line-height:1.5;color:var(--text2);word-break:break-word;white-space:pre-wrap}
.chat-msg-text strong{color:var(--text);font-weight:600}
.chat-msg-tags{display:flex;gap:4px;margin-top:4px;flex-wrap:wrap}
.chat-msg-tag{font-size:10px;padding:2px 7px;border-radius:99px;background:var(--surface2);border:1px solid var(--border);color:var(--text2);cursor:pointer;transition:all .1s}
.chat-msg-tag:hover{border-color:var(--accent);color:var(--accent)}
.chat-msg-tag.task{background:var(--blue-dim);border-color:rgba(59,130,246,.2);color:var(--blue)}
.chat-msg-tag.checklist{background:var(--green-dim);border-color:rgba(34,197,94,.2);color:var(--green)}
.chat-msg-tag.attachment{background:var(--yellow-dim);border-color:rgba(234,179,8,.2);color:var(--yellow)}
.chat-msg-reply{border-left:2px solid var(--border);padding:4px 8px;margin:4px 0;font-size:11px;color:var(--text3);background:var(--surface2);border-radius:4px}
.chat-msg-reply .reply-author{font-weight:600;color:var(--text2)}
.chat-system{text-align:center;font-size:11px;color:var(--text3);padding:4px 0;font-style:italic}
.chat-load-more{text-align:center;padding:8px;font-size:11px;color:var(--accent);cursor:pointer}
.chat-load-more:hover{text-decoration:underline}
.chat-input-area{border-top:1px solid var(--border);padding:10px 12px;flex-shrink:0}
.chat-tag-bar{display:flex;align-items:center;gap:6px;margin-bottom:6px;padding:4px 8px;background:var(--surface2);border-radius:6px;font-size:11px}
.chat-tag-label{color:var(--text3);font-weight:500}
.chat-tag-item{color:var(--accent);font-weight:600}
.chat-tag-remove{background:transparent;border:none;color:var(--text3);font-size:12px;cursor:pointer;padding:2px;border-radius:4px}
.chat-tag-remove:hover{background:var(--red-dim);color:var(--red)}
.chat-input-row{display:flex;gap:6px;align-items:flex-end}
.chat-input{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:8px 12px;color:var(--text);font-size:13px;resize:none;outline:none;min-height:36px;max-height:120px;line-height:1.5;transition:all .15s ease}
.chat-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-dim)}
.chat-tag-btn{background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius);padding:6px 10px;color:var(--text2);font-size:14px;cursor:pointer;transition:all .15s ease;height:36px}
.chat-tag-btn:hover{background:var(--accent-dim);border-color:var(--accent);color:var(--accent)}
.chat-send-btn{background:var(--accent);border:none;border-radius:var(--radius);padding:8px 16px;color:#fff;font-size:12px;font-weight:600;cursor:pointer;height:36px;transition:all .15s ease}
.chat-send-btn:hover{opacity:.9}
.chat-tag-results{max-height:200px;overflow-y:auto;margin-top:6px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius)}
.chat-tag-result-item{padding:8px 12px;font-size:12px;cursor:pointer;border-bottom:1px solid var(--border);transition:background .1s}
.chat-tag-result-item:hover{background:var(--surface3)}
.chat-tag-result-item:last-child{border-bottom:none}
.chat-tag-result-item .sub{font-size:10px;color:var(--text3);margin-top:2px}
