/* Shadow ToDo - Dark Theme CSS */
:root{--bg-primary:#1a1d23;--bg-secondary:#22252b;--bg-tertiary:#2a2d35;--bg-card:#2a2d35;--bg-hover:#32363e;--text-primary:#e0e0e0;--text-secondary:#a0a0a0;--text-muted:#6b7280;--border-color:#3a3d45;--accent-blue:#4285f4;--accent-green:#34a853;--accent-red:#ea4335;--accent-orange:#e67e22;--status-open:#ea4335;--status-progress:#e67e22;--status-fixed:#2ecc71;--status-closed:#6b7280;--priority-high:#ea4335;--priority-medium:#e67e22;--priority-low:#3498db;--column-green:#34a853;--column-red:#ea4335;--column-blue:#4285f4;--column-pink:#e91e63}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg-primary);color:var(--text-primary);height:100vh;overflow:hidden}
.top-header{display:flex;align-items:center;justify-content:space-between;height:48px;background:var(--bg-secondary);border-bottom:1px solid var(--border-color);padding:0 16px;z-index:100}
.header-left{display:flex;align-items:center;gap:8px}.logo-icon{color:var(--accent-blue);font-size:20px}.app-title{font-size:18px;font-weight:600}
.header-center{flex:1;display:flex;justify-content:center}.header-right{display:flex;align-items:center;gap:12px}
.search-box{display:flex;align-items:center;gap:8px;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:6px;padding:4px 12px}
.search-box input{background:transparent;border:none;color:var(--text-primary);outline:none;width:120px;font-size:13px}
.search-box span{color:var(--text-muted);font-size:12px}
.icon-btn{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:16px;padding:6px;border-radius:4px;position:relative;display:flex;align-items:center;justify-content:center}
.icon-btn:hover{background:var(--bg-hover);color:var(--text-primary)}
.badge{position:absolute;top:0;right:0;background:var(--accent-red);color:white;font-size:9px;width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--accent-blue);color:white;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600;cursor:pointer}
.avatar-sm{width:28px;height:28px;border-radius:50%;background:var(--accent-blue);color:white;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;flex-shrink:0}
.app-container{display:flex;height:calc(100vh - 48px)}
.sidebar{width:260px;background:var(--bg-secondary);border-right:1px solid var(--border-color);overflow-y:auto;padding:12px 0;flex-shrink:0}
.new-task-btn{width:calc(100% - 24px);margin:0 12px 16px;padding:10px;background:var(--accent-blue);color:white;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}
.new-task-btn:hover{background:#3b78e7}
.sidebar-section{margin-bottom:8px}
.section-title{padding:8px 16px 4px;font-size:11px;font-weight:600;color:var(--accent-blue);text-transform:uppercase;display:flex;align-items:center;justify-content:space-between}
.section-actions{display:flex;gap:8px;cursor:pointer}.section-actions i{font-size:12px;color:var(--text-muted)}
.nav-item{padding:8px 16px;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:10px;color:var(--text-secondary);border-left:3px solid transparent}
.nav-item:hover{background:var(--bg-hover)}
.nav-item.active{background:var(--bg-tertiary);color:var(--text-primary);border-left-color:var(--accent-blue)}
.nav-item i{width:16px;text-align:center;font-size:14px}
.count{margin-left:auto;font-size:12px;color:var(--text-muted)}
.group-item{padding:6px 16px 6px 24px;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:8px;color:var(--text-secondary)}
.group-item:hover{background:var(--bg-hover)}
.tag-item{padding:6px 16px;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:8px;color:var(--text-secondary)}
.tag-item:hover{background:var(--bg-hover)}
.tag-dot{width:10px;height:10px;border-radius:2px;flex-shrink:0}
.main-content{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 20px 8px}
.toolbar-left{display:flex;align-items:center;gap:10px}
.view-title{font-size:18px;font-weight:600}
.sort-info{display:flex;align-items:center;gap:8px;font-size:12px}
.sort-badge{background:var(--accent-blue);color:white;padding:2px 8px;border-radius:3px;font-size:10px;font-weight:600}
.sort-direction{color:var(--text-muted)}
.toolbar-right{display:flex;align-items:center;gap:4px}
.toolbar-btn{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:13px;padding:6px 10px;border-radius:4px;display:flex;align-items:center;gap:6px}
.toolbar-btn:hover{background:var(--bg-hover);color:var(--text-primary)}
.view-tabs{display:flex;align-items:center;padding:0 20px 8px;gap:4px;border-bottom:1px solid var(--border-color)}
.view-tab{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:13px;padding:8px 14px;border-radius:4px;display:flex;align-items:center;gap:6px}
.view-tab:hover{color:var(--text-primary)}
.view-tab.active{color:var(--accent-blue);border-bottom:2px solid var(--accent-blue)}
.board-view{flex:1;overflow-x:auto;overflow-y:hidden;padding:0 8px}
.board-columns{display:flex;gap:0;height:100%;min-width:max-content}
.board-column{min-width:300px;flex:1;display:flex;flex-direction:column;border-right:1px solid var(--border-color)}
.column-header{padding:12px 16px;font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px;border-top:3px solid var(--column-green);position:sticky;top:0;background:var(--bg-primary)}
.column-header.delayed{border-top-color:var(--column-green)}.column-header.today{border-top-color:var(--column-red)}.column-header.thisweek{border-top-color:var(--column-pink)}.column-header.thismonth{border-top-color:var(--column-blue)}
.column-count{background:var(--bg-tertiary);padding:1px 8px;border-radius:4px;font-size:12px;color:var(--text-muted)}
.column-body{flex:1;overflow-y:auto;padding:8px 12px}
.task-card{background:var(--bg-card);border:1px solid var(--border-color);border-radius:8px;padding:12px;margin-bottom:8px;cursor:pointer;transition:border-color .2s}
.task-card:hover{border-color:var(--accent-blue)}
.task-card-title{font-size:14px;font-weight:500;margin-bottom:8px;display:flex;align-items:flex-start;gap:6px}
.task-card-meta{display:flex;align-items:center;justify-content:space-between;font-size:12px}
.task-card-status{padding:2px 8px;border-radius:3px;font-size:11px;font-weight:500}
.task-card-status.open{background:rgba(234,67,53,.2);color:var(--status-open)}
.task-card-status.in-progress{background:rgba(230,126,34,.2);color:var(--status-progress)}
.task-card-status.fixed,.task-card-status.completed{background:rgba(46,204,113,.2);color:var(--status-fixed)}
.task-card-status.closed{background:rgba(107,114,128,.2);color:var(--status-closed)}
.task-card-assignee{display:flex;align-items:center;gap:4px;color:var(--text-secondary)}
.task-card-date{color:var(--accent-red);font-size:12px;display:flex;align-items:center;gap:4px;margin-top:6px}
.subtask-count{display:flex;align-items:center;gap:4px;color:var(--text-muted);font-size:12px;margin-top:4px}
.priority-indicator{font-weight:bold;font-size:16px;color:var(--accent-red)}
/* ═══════════════════════════════════════════
   LIST VIEW - Exact column alignment
   Matching reference screenshot layout
   ═══════════════════════════════════════════ */
.list-view{flex:1;overflow-y:auto;overflow-x:hidden}

/* Header row */
.list-header{
  display:flex;align-items:center;
  padding:10px 16px;
  font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;
  border-bottom:1px solid var(--border-color);
  position:sticky;top:0;background:var(--bg-primary);z-index:5;
}
.list-header.compact-header .assignee-col,
.list-header.compact-header .status-col,
.list-header.compact-header .due-date-col,
.list-header.compact-header .created-date-col,
.list-header.compact-header .category-col{display:none}

/* Column sizing — percentage based for precise alignment */
.list-col{padding:0 8px;flex-shrink:0}
.list-col.title-col{width:35%;min-width:200px;display:flex;align-items:center;gap:8px}
.list-col.assignee-col{width:14%;min-width:110px;display:flex;align-items:center;gap:6px}
.list-col.status-col{width:8%;min-width:70px;text-align:center}
.list-col.due-date-col{width:13%;min-width:110px;text-align:left}
.list-col.created-date-col{width:16%;min-width:110px;text-align:center}
.list-col.category-col{width:10%;min-width:70px;text-align:right}

/* Group section header */
.list-group-header{
  display:flex;align-items:center;gap:10px;
  padding:10px 16px;font-size:14px;font-weight:600;
  background:var(--bg-secondary);border-bottom:1px solid var(--border-color);cursor:pointer;
}
.list-group-header .check-circle{
  width:22px;height:22px;border:2px solid var(--border-color);border-radius:50%;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;
}
.list-group-header .group-color{width:20px;height:20px;border-radius:4px;flex-shrink:0}
.group-task-count{
  background:var(--bg-tertiary);padding:1px 8px;border-radius:4px;
  font-size:12px;color:var(--text-muted);font-weight:400;
}

/* Task row */
.list-row{
  display:flex;align-items:center;
  padding:12px 16px;font-size:13px;
  border-bottom:1px solid var(--border-color);cursor:pointer;
  transition:background .15s;
}
.list-row:hover{background:var(--bg-hover)}
.list-row.active-row{background:var(--bg-tertiary);border-left:3px solid var(--accent-blue)}

/* Check circle in rows */
.list-row .check-circle{
  width:22px;height:22px;border:2px solid var(--border-color);border-radius:50%;
  cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);font-size:11px;
}
.list-row .check-circle:hover{border-color:var(--accent-green);color:var(--accent-green)}

/* Title column inner layout */
.list-task-name{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;
}

/* Subtask & comment count badges in title area */
.list-meta-counts{
  display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0;padding-left:8px;
}
.list-meta-count{
  display:inline-flex;align-items:center;gap:3px;
  color:var(--text-muted);font-size:11px;
}
.list-meta-count i{font-size:12px}

/* Assignee in row */
.list-row .assignee-col{display:flex;align-items:center;gap:6px}
.list-row .assignee-col .avatar-sm{width:24px;height:24px;font-size:10px}

/* Status badge */
.list-row .status-badge{
  padding:3px 12px;border-radius:3px;font-size:11px;font-weight:600;
  display:inline-block;letter-spacing:0.02em;
}
.list-row .status-badge.open{background:rgba(234,67,53,.15);color:var(--status-open)}
.list-row .status-badge.in-progress{background:rgba(230,126,34,.15);color:var(--status-progress)}
.list-row .status-badge.completed,.list-row .status-badge.fixed{background:rgba(46,204,113,.15);color:var(--status-fixed)}
.list-row .status-badge.closed{background:rgba(107,114,128,.15);color:var(--status-closed)}

/* Due date column */
.list-row .due-date-col{color:var(--accent-red);display:flex;align-items:center;gap:4px;font-size:12px}

/* Created date & category */
.list-row .created-date-col{color:var(--text-secondary);font-size:12px}
.list-row .category-col{color:var(--text-secondary);font-size:12px}

/* When panel is open, hide extra columns */
.list-view.list-with-panel .list-row .assignee-col,
.list-view.list-with-panel .list-row .status-col,
.list-view.list-with-panel .list-row .due-date-col,
.list-view.list-with-panel .list-row .created-date-col,
.list-view.list-with-panel .list-row .category-col,
.list-view.list-with-panel .list-row .list-meta-counts{display:none}
.list-view.list-with-panel .list-col.title-col{width:100%}
/* Task Detail Panel */
.task-detail-panel{width:480px;background:var(--bg-secondary);border-left:1px solid var(--border-color);display:flex;flex-direction:column;overflow-y:auto;flex-shrink:0}
.detail-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border-color);flex-wrap:wrap;gap:8px}
.detail-header-left{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.detail-header-right{display:flex;align-items:center;gap:4px}
.status-btn{padding:6px 16px;border:2px solid var(--status-open);background:transparent;color:var(--status-open);border-radius:6px;font-size:13px;font-weight:600;cursor:pointer}
.detail-assignee{display:flex;align-items:center;gap:8px}
.detail-date{text-align:center}
.label-sm{font-size:10px;color:var(--text-muted)}
.clickable{cursor:pointer;font-size:13px}
.detail-body{padding:16px;flex:1;overflow-y:auto}
.detail-task-title{font-size:20px;font-weight:600;margin-bottom:12px;outline:none;padding:4px;border-radius:4px}
.detail-task-title:focus{background:var(--bg-tertiary)}
.detail-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:20px;font-size:13px;color:var(--text-muted)}
.meta-btn,.meta-select{background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--text-primary);padding:4px 12px;border-radius:4px;font-size:12px;cursor:pointer}
.priority-btn,.priority-select{background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--accent-orange);padding:4px 12px;border-radius:4px;font-size:12px;cursor:pointer;display:flex;align-items:center;gap:4px}
.reminder-btn{background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--text-secondary);padding:4px 12px;border-radius:4px;font-size:12px;cursor:pointer;display:flex;align-items:center;gap:6px}
.detail-section{margin-bottom:20px}
.section-label{font-size:14px;font-weight:500;margin-bottom:8px;color:var(--text-secondary);display:flex;align-items:center;gap:8px}
.required{color:var(--accent-red)}
.detail-textarea{width:100%;min-height:80px;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:6px;color:var(--text-primary);padding:10px;font-size:13px;font-family:inherit;resize:vertical;outline:none}
.detail-textarea:focus{border-color:var(--accent-blue)}
.add-subtask{display:flex;align-items:center;gap:8px;padding:8px;color:var(--text-muted)}
.add-subtask input{background:transparent;border:none;color:var(--text-primary);font-size:13px;outline:none;flex:1}
.subtask-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-bottom:1px solid var(--border-color);font-size:13px}
.subtask-item .check-circle{width:18px;height:18px;border:2px solid var(--border-color);border-radius:50%;cursor:pointer;flex-shrink:0}
.timeline-list{padding-left:16px}
.timeline-item{display:flex;align-items:flex-start;gap:12px;padding:6px 0;font-size:12px;color:var(--text-muted);border-left:2px solid var(--border-color);padding-left:16px;position:relative}
.timeline-item::before{content:'';position:absolute;left:-5px;top:10px;width:8px;height:8px;border-radius:50%;background:var(--border-color)}
.comment-section{display:flex;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid var(--border-color);position:sticky;bottom:0;background:var(--bg-secondary)}
.comment-input{flex:1;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:20px;color:var(--text-primary);padding:8px 16px;font-size:13px;outline:none}
/* Modal Mode (Board view) */
.task-detail-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:999}
.task-detail-panel.modal-mode{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:750px;max-width:90vw;max-height:85vh;border-radius:12px;border:1px solid var(--border-color);box-shadow:0 20px 60px rgba(0,0,0,0.4);z-index:1000;overflow-y:auto}
.task-detail-panel.modal-mode .detail-header{border-bottom:3px solid var(--accent-blue)}
/* Panel Mode (List view) */
.task-detail-panel.panel-mode{width:calc(100% - 260px - 44px);max-width:600px;min-width:440px;flex-shrink:0}
.list-view.list-with-panel{overflow-x:hidden}
.list-view.list-with-panel .list-header{min-width:auto}
.list-view.list-with-panel .list-row{min-width:auto}
/* Right Sidebar */
.right-sidebar{width:44px;background:var(--bg-secondary);border-left:1px solid var(--border-color);display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:4px;flex-shrink:0}
.sidebar-spacer{flex:1}
/* Modals */
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:1000}
.modal-content{background:var(--bg-secondary);border-radius:12px;border:1px solid var(--border-color);max-height:85vh;overflow-y:auto}
.task-modal{width:720px}.small-modal{width:400px;padding:24px}.small-modal h3{margin-bottom:16px}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border-color);flex-wrap:wrap;gap:8px}
.modal-header-left{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.modal-header-right{display:flex;align-items:center;gap:4px}
.modal-body{padding:20px}
.task-title-input{width:100%;background:transparent;border:none;border-bottom:1px solid var(--border-color);color:var(--text-primary);font-size:18px;font-weight:500;padding:8px 0;outline:none;margin-bottom:12px}
.modal-footer{display:flex;gap:10px;padding:16px 20px;border-top:1px solid var(--border-color)}
.save-btn{padding:8px 24px;background:var(--accent-blue);color:white;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer}
.cancel-btn{padding:8px 24px;background:var(--bg-tertiary);color:var(--text-secondary);border:1px solid var(--border-color);border-radius:6px;font-size:14px;cursor:pointer}
.modal-input{width:100%;background:var(--bg-tertiary);border:1px solid var(--border-color);color:var(--text-primary);padding:10px;border-radius:6px;font-size:14px;outline:none;margin-bottom:16px}
.inline-select,.date-input{background:transparent;border:none;color:var(--text-primary);font-size:13px;outline:none;cursor:pointer}
.color-picker{display:flex;gap:10px;margin-bottom:16px}
.color-dot{width:24px;height:24px;border-radius:50%;cursor:pointer;border:2px solid transparent}
.color-dot.selected{border-color:white}
.dropdown-menu{position:fixed;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:4px;min-width:180px;z-index:2000;box-shadow:0 8px 24px rgba(0,0,0,.3)}
.dropdown-title{padding:8px 12px;font-size:12px;color:var(--text-muted);font-weight:600}
.dropdown-item{padding:8px 12px;font-size:13px;cursor:pointer;border-radius:4px;display:flex;align-items:center;gap:8px}
.dropdown-item:hover{background:var(--bg-hover)}
.dropdown-divider{height:1px;background:var(--border-color);margin:4px 0}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;color:var(--text-muted);text-align:center}
.empty-state i{font-size:48px;margin-bottom:16px;opacity:.3}
/* Light Theme */
body.light-theme{--bg-primary:#f5f6f8;--bg-secondary:#ffffff;--bg-tertiary:#e8eaed;--bg-card:#ffffff;--bg-hover:#e2e4e8;--text-primary:#1f2937;--text-secondary:#4b5563;--text-muted:#9ca3af;--border-color:#d1d5db}
body.light-theme .modal-overlay{background:rgba(0,0,0,0.4)}
body.light-theme .task-detail-modal-overlay{background:rgba(0,0,0,0.35)}
body.light-theme .modal-content{box-shadow:0 20px 60px rgba(0,0,0,0.15)}
body.light-theme .task-detail-panel.modal-mode{box-shadow:0 20px 60px rgba(0,0,0,0.2)}
body.light-theme .dropdown-menu{box-shadow:0 8px 24px rgba(0,0,0,0.12)}
body.light-theme .task-card{box-shadow:0 1px 3px rgba(0,0,0,0.08)}
body.light-theme .avatar,body.light-theme .avatar-sm{box-shadow:0 1px 2px rgba(0,0,0,0.1)}
body.light-theme ::-webkit-scrollbar-thumb{background:#c1c5cc}
body.light-theme .color-dot.selected{border-color:#1f2937}
body.light-theme .new-task-btn{box-shadow:0 1px 3px rgba(66,133,244,0.3)}
::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bg-hover);border-radius:3px}
/* Responsive */
@media(max-width:1400px){.task-detail-panel.panel-mode{max-width:500px}}
@media(max-width:1100px){.task-detail-panel.panel-mode{max-width:420px;min-width:380px}}
@media(max-width:900px){.sidebar{display:none}.right-sidebar{display:none}.task-detail-panel.modal-mode{width:95vw;max-width:95vw}.task-detail-panel.panel-mode{position:fixed;top:48px;right:0;bottom:0;width:100%;max-width:500px;min-width:auto;z-index:50;box-shadow:-4px 0 20px rgba(0,0,0,0.3)}}
@media(max-width:600px){.task-detail-panel.panel-mode{max-width:100%;width:100%}.task-detail-panel.modal-mode{width:98vw;max-width:98vw;max-height:90vh}.detail-header{padding:8px 10px;gap:6px}.detail-header-left{gap:6px;width:100%}.detail-header-right{width:100%;justify-content:flex-end}.status-btn{padding:4px 10px;font-size:12px}.detail-body{padding:10px}.detail-task-title{font-size:16px;margin-bottom:8px}.detail-meta{font-size:11px;gap:4px;margin-bottom:14px}.top-header{padding:0 8px}.search-box{display:none}}


/* ===== NEW FEATURE STYLES ===== */

/* Task tags on cards */
.task-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: #fff;
}
.task-tag .tag-remove {
  cursor: pointer;
  opacity: 0.7;
  font-size: 10px;
}
.task-tag .tag-remove:hover {
  opacity: 1;
}

/* Detail tags display */
.detail-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* Attachment item */
.attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-primary);
}
.attachment-item .attachment-remove {
  cursor: pointer;
  opacity: 0.5;
  margin-left: auto;
}
.attachment-item .attachment-remove:hover {
  opacity: 1;
  color: #e74c3c;
}

/* Group context menu */
#groupContextMenu {
  min-width: 160px;
}

/* Sidebar active states */
.group-item.active,
.tag-item.active {
  background: var(--bg-secondary);
  border-radius: 6px;
}

/* Bulk checkbox */
.bulk-checkbox {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #4285f4;
}

/* Bulk actions bar */
#bulkActionsBar .bulk-btn {
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Modal overlay common */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Recurrence/Reminder/Filter modals */
#recurrenceModal .modal-content,
#reminderModal .modal-content,
#filterModal .modal-content,
#tagsPickerModal .modal-content,
#copyMoveModal .modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  min-width: 320px;
  color: var(--text-primary);
}

/* Clickable dates in detail panel */
.clickable {
  cursor: pointer;
}
.clickable:hover {
  color: #4285f4;
  text-decoration: underline;
}


/* ═══════════════════════════════════════════
   NEW BOARD COLUMN CLASSES (polished)
   ═══════════════════════════════════════════ */

/* New board column classes matching app.js */
.board-col-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 1;
  border-bottom: 1px solid var(--border-color);
}
.board-col-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.board-col-count {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 22px;
  text-align: center;
}
.col-add-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.col-add-btn:hover {
  color: var(--accent-blue);
  background: var(--bg-hover);
}
.board-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}
.empty-col {
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ═══════════════════════════════════════════
   IMPROVED TASK CARD
   ═══════════════════════════════════════════ */

.task-card-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}
.task-card-status-row {
  margin-bottom: 6px;
}
.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
}

/* Priority dot (small colored dot) */
.priority-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Subtask indent indicator */
.subtask-indent-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-left: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  margin-right: 4px;
  flex-shrink: 0;
  opacity: .6;
}

/* Subtask row styling */
.is-subtask .task-card-title,
.is-subtask .task-title-text {
  font-size: 12px;
  color: var(--text-secondary);
}
.is-subtask.task-card {
  background: var(--bg-tertiary);
  border-style: dashed;
  padding: 8px 12px;
}
.is-subtask.list-row {
  background: var(--bg-tertiary);
}

/* Improved assignee avatar on task card */
.task-card-assignee .assignee-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

/* Task card subtask count */
.task-card-subtasks {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════
   IMPROVED LIST SECTION HEADERS
   ═══════════════════════════════════════════ */

.list-section {
  margin-bottom: 2px;
}
.list-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 1;
}
.list-section-title {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  color: var(--text-primary);
}
.list-section-count {
  background: var(--bg-tertiary);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.list-section-body {}
.list-empty-row {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ═══════════════════════════════════════════
   ASSIGNEE AVATAR in list view
   ═══════════════════════════════════════════ */

.list-row .assignee-col .avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.assignee-name {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* Task title text */
.task-title-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Completed text style */
.completed-text {
  text-decoration: line-through;
  opacity: .6;
}

/* Overdue text in list */
.list-row .due-date-col.overdue {
  color: var(--accent-red);
}
.list-row .due-date-col:not(.overdue) {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   TOOLBAR IMPROVEMENTS
   ═══════════════════════════════════════════ */

#groupByChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   TIMELINE IN DETAIL PANEL
   ═══════════════════════════════════════════ */

.timeline-entry {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  font-size: 12px;
}
.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 4px;
}
.timeline-action { color: var(--text-primary); }
.timeline-time { color: var(--text-muted); font-size: 11px; }
.timeline-empty { color: var(--text-muted); font-size: 12px; padding: 8px 0; }

/* ═══════════════════════════════════════════
   SUBTASK ITEMS IN DETAIL PANEL
   ═══════════════════════════════════════════ */

.subtask-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}
.subtask-check {
  cursor: pointer;
  accent-color: var(--accent-blue);
}
.subtask-title { flex: 1; }
.subtask-del { color: var(--text-muted); }

/* ═══════════════════════════════════════════
   ACTIVE CARD STATE
   ═══════════════════════════════════════════ */

.task-card.active-card {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 1px var(--accent-blue);
}
.list-row.active-row {
  background: var(--bg-tertiary) !important;
  border-left: 3px solid var(--accent-blue);
}

/* ═══════════════════════════════════════════
   BULK CHECKBOX WRAPPER
   ═══════════════════════════════════════════ */

.bulk-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  padding: 0 6px 0 0;
  cursor: pointer;
}


/* ── Task Detail Panel Visibility ─────────────── */
#taskDetailPanel {
  display: none;
}
#taskDetailPanel.open {
  display: flex !important;
}

/* ── App Layout with Panel Open ──────────────── */
.app-container.panel-open {
  gap: 0;
}

/* =============================================================
   Shadow ToDo - Agenda View styles
   Added with Agenda View module (agenda-view.js)
   ============================================================= */
.agenda-view { padding: 12px 0 32px; }
.agenda-view__header {
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0 18px;
  padding: 0 4px;
  color: var(--text-primary, #202124);
  letter-spacing: -0.01em;
}

/* ---- Sections (List view) ---------------------------------- */
.agenda-section { margin-bottom: 20px; }
.agenda-section__header {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: var(--bg-subtle, #f8f9fa);
  border-radius: 4px;
}
.agenda-section__title {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-primary, #202124);
}
.agenda-section__count {
  font-size: 12px; color: var(--text-muted, #70757a);
  background: var(--bg-default, #fff);
  border: 1px solid var(--border-light, #dadce0);
  border-radius: 10px; padding: 1px 8px; min-width: 22px; text-align: center;
}
.agenda-section__body { display: flex; flex-direction: column; }

/* ---- Task Row (List view) ---------------------------------- */
.agenda-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light, #ececec);
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.agenda-row:hover { background: var(--hover-bg, #f1f3f4); }
.agenda-row:focus-within { background: var(--hover-bg, #f1f3f4); }
.agenda-row--overdue .agenda-row__due { color: var(--accent-red, #ea4335); font-weight: 500; }
.agenda-row--done .agenda-row__title {
  text-decoration: line-through; color: var(--text-muted, #9aa0a6);
}

.agenda-row__check { position: relative; display: inline-flex; cursor: pointer; flex: 0 0 18px; }
.agenda-row__check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.agenda-check__box {
  width: 18px; height: 18px; border: 2px solid var(--border-dark, #9aa0a6);
  border-radius: 4px; display: inline-block; transition: background 0.12s, border-color 0.12s;
}
.agenda-row__check input:checked + .agenda-check__box {
  background: var(--accent-green, #34a853);
  border-color: var(--accent-green, #34a853);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8l3 3 7-7' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: center;
}
.agenda-row__check:hover .agenda-check__box { border-color: var(--text-primary, #202124); }

.agenda-row__priority {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.agenda-row__priority[data-priority="None"] { opacity: 0.35; }

.agenda-row__main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agenda-row__title {
  font-size: 14px; color: var(--text-primary, #202124);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1 1 auto; min-width: 0;
}
.agenda-row__list-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--tag-bg, #e8f0fe); color: var(--tag-fg, #1967d2);
  flex: 0 0 auto; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agenda-row__due {
  font-size: 12px; color: var(--text-muted, #5f6368);
  flex: 0 0 auto; white-space: nowrap;
}

/* ---- Empty state ------------------------------------------- */
.agenda-empty {
  padding: 10px 12px; font-size: 13px; color: var(--text-muted, #9aa0a6);
  font-style: italic;
}
.agenda-empty--col { text-align: center; padding: 20px 8px; }

/* ---- Board View -------------------------------------------- */
.agenda-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.agenda-col {
  background: var(--bg-subtle, #f8f9fa);
  border-radius: 6px;
  display: flex; flex-direction: column;
  min-width: 220px;
}
.agenda-col__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-top-left-radius: 6px; border-top-right-radius: 6px;
}
.agenda-col__title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.agenda-col__count {
  font-size: 12px; color: var(--text-muted, #70757a);
  background: var(--bg-default, #fff);
  border-radius: 10px; padding: 1px 8px; min-width: 22px; text-align: center;
}
.agenda-col__body { padding: 8px; display: flex; flex-direction: column; gap: 8px; }

.agenda-card {
  background: var(--bg-default, #fff);
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}
.agenda-card:hover { background: var(--hover-bg, #f1f3f4); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.agenda-card--overdue { border-left: 3px solid var(--accent-red, #ea4335); }
.agenda-card--done .agenda-card__title {
  text-decoration: line-through; color: var(--text-muted, #9aa0a6);
}

.agenda-card__top { display: flex; align-items: center; gap: 8px; }
.agenda-card__title {
  font-size: 14px; color: var(--text-primary, #202124);
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.agenda-card__meta {
  margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.agenda-card__due { font-size: 11px; color: var(--text-muted, #5f6368); }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 1100px) {
  .agenda-board { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
}
@media (max-width: 760px) {
  .agenda-board { grid-template-columns: 1fr; }
  .agenda-row__list-tag { max-width: 120px; }
  .agenda-row__due { display: none; }
  .agenda-view__header { font-size: 18px; }
}
@media (max-width: 480px) {
  .agenda-row { gap: 8px; padding: 8px 6px; }
  .agenda-row__title { font-size: 13px; }
}


/* =======================================================================
   My Day View  (myday-view.js module)
   Focused, single-list daily dashboard.
   ======================================================================= */

.myday-view {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  font: inherit;
  color: var(--text-primary, #222);
}
.myday-header {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light, #e6e6e6);
}
.myday-title-h1 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.myday-date {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
}

.myday-quickadd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--surface-alt, #f7f7f8);
  border: 1px solid var(--border-light, #e6e6e6);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.myday-quickadd:focus-within {
  border-color: var(--accent, #3b82f6);
  background: var(--surface, #fff);
}
.myday-quickadd__icon {
  font-size: 18px;
  color: var(--text-muted, #6b7280);
  width: 20px;
  text-align: center;
  user-select: none;
}
.myday-quickadd__input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: inherit;
  padding: 2px 0;
}

.myday-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-light, #eaeaea);
  border: 1px solid var(--border-light, #eaeaea);
  border-radius: 8px;
  overflow: hidden;
}
.myday-list--done { opacity: 0.85; }

.myday-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface, #fff);
  cursor: pointer;
  transition: background 0.12s;
  min-height: 40px;
}
.myday-row:hover { background: var(--surface-hover, #f5f7fb); }
.myday-row--done { opacity: 0.65; }
.myday-row--done .myday-title {
  text-decoration: line-through;
  color: var(--text-muted, #6b7280);
}

.myday-check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1.5px solid var(--border-strong, #9ca3af);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.myday-check:hover { border-color: var(--accent, #3b82f6); }
.myday-row--done .myday-check {
  background: #22c55e;
  border-color: #22c55e;
}

.myday-pri {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
}
.myday-title {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
  cursor: text;
}
.myday-title-edit {
  flex: 1 1 auto;
  font: inherit;
  font-size: 14px;
  padding: 4px 6px;
  border: 1px solid var(--accent, #3b82f6);
  border-radius: 4px;
  background: var(--surface, #fff);
  color: inherit;
  outline: none;
}
.myday-parent {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--chip-bg, #eef2ff);
  color: var(--chip-text, #4338ca);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.myday-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted, #9ca3af);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.55;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
}
.myday-row:hover .myday-remove { opacity: 1; }
.myday-remove:hover {
  background: var(--surface-hover, #eef2ff);
  color: var(--accent, #3b82f6);
}

.myday-completed {
  margin-top: 20px;
  border-top: 1px solid var(--border-light, #eaeaea);
  padding-top: 14px;
}
.myday-completed__summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  padding: 6px 4px;
  user-select: none;
  list-style: revert;
}
.myday-completed__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 11px;
  background: var(--chip-bg, #eef2ff);
  color: var(--chip-text, #4338ca);
  border-radius: 10px;
}
.myday-completed .myday-list {
  margin-top: 10px;
}

.myday-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  gap: 10px;
  color: var(--text-muted, #6b7280);
  text-align: center;
}
.myday-empty__icon {
  font-size: 40px;
  line-height: 1;
  opacity: 0.6;
}
.myday-empty__text {
  font-size: 15px;
  font-style: italic;
}
.myday-empty--inline {
  padding: 20px;
  background: var(--surface, #fff);
}

.myday-board { padding: 16px; }
.myday-board__col { max-width: 820px; margin: 0 auto; }

/* Responsive */
@media (max-width: 760px) {
  .myday-view { padding: 16px 12px 80px; }
  .myday-title-h1 { font-size: 22px; }
  .myday-parent { max-width: 100px; }
}
@media (max-width: 480px) {
  .myday-parent { display: none; }
  .myday-row { gap: 8px; padding: 8px 10px; }
  .myday-quickadd { padding: 8px 10px; }
}


/* ============================================================ */

/* ============================================================
   Created by Me — Zoho-style Board/List + detail panel/modal
   ============================================================ */
.cbm-wrap { padding: 0 28px 24px; }
.cbm-header { display: flex; align-items: flex-end; justify-content: space-between; margin: 6px 0 14px; flex-wrap: wrap; gap: 12px; }
.cbm-title-block h2 { margin: 0; font-size: 22px; font-weight: 600; }
.cbm-sub { color: #6b7280; font-size: 13px; margin-top: 2px; }
.cbm-tabs { display:inline-flex; background:#f3f4f6; padding:4px; border-radius:10px; }
.cbm-tab { background:transparent; border:0; padding:6px 14px; font-size:13px; color:#475569; border-radius:8px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.cbm-tab.active { background:#fff; color:#0f172a; box-shadow:0 1px 2px rgba(0,0,0,0.08); font-weight:500; }
.cbm-tab-count { background:#e5e7eb; border-radius:10px; padding:1px 7px; font-size:11px; color:#374151; }
.cbm-tab.active .cbm-tab-count { background:#e0e7ff; color:#3730a3; }

.cbm-empty { padding:60px 20px; text-align:center; color:#6b7280; }
.cbm-empty i { font-size:32px; color:#cbd5e1; display:block; margin-bottom:10px; }

/* --- Board --- */
.cbm-board { display:grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap:14px; overflow-x:auto; padding-bottom:10px; }
.cbm-col { background:#f8fafc; border-radius:10px; display:flex; flex-direction:column; min-height: 160px; }
.cbm-col-head { position:relative; padding:12px 14px 10px; border-bottom:1px solid #e5e7eb; display:flex; justify-content:space-between; align-items:center; }
.cbm-col-head::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; border-top-left-radius:10px; border-top-right-radius:10px; }
.cbm-col[data-status="Open"] .cbm-col-head::before { background:#ef4444; }
.cbm-col[data-status="In Progress"] .cbm-col-head::before { background:#f59e0b; }
.cbm-col[data-status="Pending Review"] .cbm-col-head::before { background:#8b5cf6; }
.cbm-col[data-status="Completed"] .cbm-col-head::before { background:#10b981; }
.cbm-col-title { font-size:14px; font-weight:600; color:#1f2937; }
.cbm-col-count { background:#fff; border:1px solid #e5e7eb; border-radius:6px; padding:1px 8px; font-size:12px; color:#475569; }
.cbm-col-body { padding:10px; flex:1; display:flex; flex-direction:column; gap:8px; min-height:80px; }
.cbm-col-body.cbm-drop-target { background:#eef2ff; border-radius:8px; }
.cbm-drop-end { min-height:10px; }
.cbm-drop-indicator { height:3px; background:#6366f1; border-radius:2px; margin:-2px 0; animation: cbmPulse 1s ease-in-out infinite; }
@keyframes cbmPulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
.cbm-card { background:#fff; border:1px solid #e5e7eb; border-radius:8px; padding:10px 12px; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,0.03); transition:box-shadow 0.15s, transform 0.1s; }
.cbm-card:hover { box-shadow:0 2px 8px rgba(0,0,0,0.08); }
.cbm-card.cbm-dragging { opacity:0.4; transform: scale(0.98); }
.cbm-card-title { font-size:13px; font-weight:500; color:#111827; line-height:1.35; margin-bottom:6px; }
.cbm-card-tag { display:inline-block; background:#eef2ff; color:#4f46e5; padding:1px 8px; font-size:11px; border-radius:4px; margin-bottom:6px; }
.cbm-card-foot { display:flex; justify-content:space-between; align-items:center; gap:6px; }
.cbm-card-right { display:flex; align-items:center; gap:5px; color:#4b5563; font-size:12px; }
.cbm-card-name { font-size:12px; color:#4b5563; }
.cbm-card-meta { display:flex; align-items:center; gap:10px; margin-top:6px; color:#6b7280; font-size:11px; }
.cbm-meta-ico { display:inline-flex; align-items:center; gap:4px; }
.cbm-meta-due { display:inline-flex; align-items:center; gap:4px; margin-left:auto; }
.cbm-meta-due.overdue { color:#dc2626; }

.cbm-pill { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:500; line-height:1.5; }
.cbm-avatar { display:inline-flex; align-items:center; justify-content:center; border-radius:50%; color:#fff; font-weight:600; vertical-align:middle; flex-shrink:0; }
.cbm-pri-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:#94a3b8; margin-right:4px; }
.cbm-pri-dot.pri-high { background:#ef4444; }
.cbm-pri-dot.pri-medium { background:#f59e0b; }
.cbm-pri-dot.pri-low { background:#94a3b8; }

/* --- List --- */
.cbm-list { background:#fff; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; }
.cbm-list-head, .cbm-row { display:grid; grid-template-columns: minmax(280px, 3fr) 1.2fr 0.9fr 1fr 1fr 1fr; gap:8px; align-items:center; padding:10px 14px; font-size:12.5px; }
.cbm-list-head { background:#fafafa; color:#6b7280; font-weight:500; font-size:11px; letter-spacing:0.05em; text-transform:uppercase; border-bottom:1px solid #e5e7eb; }
.cbm-lh { }
.cbm-list-section { border-bottom:1px solid #f1f5f9; }
.cbm-list-section:last-child { border-bottom:0; }
.cbm-sec-head { display:flex; align-items:center; gap:8px; padding:8px 14px; background:#fff; cursor:pointer; user-select:none; border-bottom:1px solid #f1f5f9; }
.cbm-sec-caret { transition:transform 0.15s; color:#6b7280; }
.cbm-list-section.collapsed .cbm-sec-caret { transform: rotate(-90deg); }
.cbm-list-section.collapsed .cbm-sec-body { display:none; }
.cbm-sec-dot { width:10px; height:10px; border-radius:2px; }
.cbm-sec-title { font-weight:500; color:#1f2937; font-size:13px; }
.cbm-sec-count { background:#f1f5f9; color:#475569; padding:1px 8px; border-radius:4px; font-size:11px; font-weight:500; }
.cbm-row { border-bottom:1px solid #f8fafc; cursor:pointer; color:#374151; }
.cbm-row:hover { background:#f9fafb; }
.cbm-row.cbm-dragging { opacity: 0.4; }
.cbm-sec-body.cbm-drop-target { background:#eef2ff; }
.cbm-row-drop { height:8px; }
.cbm-rc { display:flex; align-items:center; gap:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.cbm-rc.c-title { gap:8px; }
.cbm-row-check { color:#9ca3af; cursor:pointer; }
.cbm-row-check:hover { color:#10b981; }
.cbm-row-pri { color:#ef4444; font-weight:700; }
.cbm-row-title { overflow:hidden; text-overflow:ellipsis; }
.cbm-row-title.done { text-decoration: line-through; color:#9ca3af; }
.cbm-row-ico { color:#6b7280; font-size:11px; display:inline-flex; align-items:center; gap:3px; }
.c-due { color:#6b7280; }
.c-due.overdue { color:#dc2626; }
.c-created { color:#6b7280; }
.c-cat { color:#6366f1; }

/* --- Detail Panel (List view right-slide) --- */
.cbm-panel { position:fixed; top:0; right:-640px; width:640px; max-width:100vw; height:100vh; background:#fff; box-shadow:-8px 0 24px rgba(0,0,0,0.12); z-index:9999; transition:right 0.25s ease; overflow-y:auto; }
.cbm-panel.open { right:0; }
.cbm-panel-inner { padding:0; }

/* --- Detail Modal (Board view centered) --- */
.cbm-modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,0.42); z-index:9999; display:none; align-items:flex-start; justify-content:center; padding:60px 20px; overflow-y:auto; }
.cbm-modal-backdrop.open { display:flex; }
.cbm-modal { background:#fff; border-radius:10px; width:min(820px, 95vw); box-shadow:0 20px 60px rgba(0,0,0,0.25); max-height:calc(100vh - 80px); overflow-y:auto; }

/* --- Detail Shared --- */
.cbm-d-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:20px 24px 12px; border-bottom:1px solid #f1f5f9; }
.cbm-d-head-left { display:flex; flex-wrap:wrap; gap:18px; align-items:center; }
.cbm-d-head-right { display:flex; gap:6px; }
.cbm-d-icon { background:transparent; border:0; width:32px; height:32px; border-radius:6px; cursor:pointer; color:#6b7280; }
.cbm-d-icon:hover { background:#f3f4f6; color:#111827; }
.cbm-d-assigned, .cbm-d-dates { display:flex; flex-direction:column; gap:2px; font-size:13px; color:#111827; }
.cbm-d-assigned { flex-direction:row; align-items:center; gap:8px; }
.cbm-d-assigned .cbm-d-lbl, .cbm-d-dates .cbm-d-lbl { font-size:11px; color:#9ca3af; margin-right:4px; }
.cbm-d-aname { font-weight:500; }
.cbm-d-body { padding:18px 24px 80px; }
.cbm-d-title { font-size:20px; font-weight:600; margin:0 0 10px; outline:none; padding:4px 0; }
.cbm-d-title:focus { background:#fff9db; border-radius:4px; padding:4px 8px; }
.cbm-d-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; color:#6b7280; font-size:13px; margin-bottom:18px; }
.cbm-d-chip { background:#f3f4f6; color:#374151; padding:3px 10px; border-radius:4px; font-size:12px; }
.cbm-d-chip.pri { background:#fee2e2; color:#dc2626; font-weight:500; }
.cbm-d-section { margin:16px 0; }
.cbm-d-sec-title { display:flex; align-items:center; gap:8px; font-size:13px; color:#475569; margin-bottom:8px; font-weight:500; }
.cbm-d-placeholder { color:#9ca3af; font-size:13px; padding:8px 0; border-top:1px dashed #e5e7eb; }
.cbm-d-subs { list-style: none; padding:0; margin:0; }
.cbm-d-subs li { padding:6px 0; font-size:13px; border-top:1px solid #f1f5f9; }
.cbm-d-timeline { display:flex; gap:10px; align-items:flex-start; font-size:13px; color:#374151; }
.cbm-d-tl-dot { width:10px; height:10px; border-radius:50%; border:2px solid #10b981; margin-top:3px; flex-shrink:0; }
.cbm-d-time { color:#9ca3af; margin-left:6px; font-size:12px; }
.cbm-d-cmt { background:#f9fafb; border-radius:6px; padding:8px 12px; margin:6px 0; font-size:13px; }
.cbm-d-commentbox { position:sticky; bottom:0; left:0; right:0; background:#fff; padding:12px 0; border-top:1px solid #f1f5f9; margin-top:16px; }
.cbm-d-commentbox input { width:100%; border:1px solid #e5e7eb; border-radius:8px; padding:10px 12px; font-size:13px; outline:none; }
.cbm-d-commentbox input:focus { border-color:#6366f1; }

/* --- Toast --- */
.cbm-toast { position:fixed; top:24px; left:50%; transform:translate(-50%, -16px); background:#111827; color:#fff; padding:10px 18px; border-radius:8px; font-size:13px; box-shadow:0 6px 20px rgba(0,0,0,0.2); opacity:0; pointer-events:none; transition:opacity 0.2s, transform 0.2s; z-index:10000; }
.cbm-toast.show { opacity:1; transform:translate(-50%, 0); }

/* --- Responsive --- */
@media (max-width: 900px) {
  .cbm-list-head, .cbm-row { grid-template-columns: 2fr 1fr 0.7fr 1fr; }
  .cbm-lh.c-created, .cbm-rc.c-created, .cbm-lh.c-cat, .cbm-rc.c-cat { display:none; }
  .cbm-panel { width:100vw; right:-100vw; }
}
@media (max-width: 640px) {
  .cbm-wrap { padding:0 14px 14px; }
  .cbm-board { grid-auto-columns: minmax(220px, 85vw); }
  .cbm-header { flex-direction:column; align-items:flex-start; }
  .cbm-list-head { display:none; }
  .cbm-row { grid-template-columns: 1fr; gap:4px; padding:10px 12px; }
  .cbm-rc { white-space:normal; }
}

/* =========================================================================
   feature/shared-with-me: invitee bar, invite modal, toast, notif dropdown
   v2: use real theme tokens; respect [hidden] on .badge
   ========================================================================= */

/* Fix pre-existing .badge rule overriding [hidden] attribute */
.badge[hidden] { display: none !important; }

/* --- Invitee bar ------------------------------------------------------ */
.invitee-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}
.invitee-bar .invitee-dot { color: var(--text-muted); font-size: 10px; }
.invitee-add-btn { color: var(--accent-blue); }
.invitee-refuse-btn { color: var(--accent-orange); }

/* --- Invite User modal ----------------------------------------------- */
.invite-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.invite-modal {
  width: 520px; max-width: 92vw;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px 22px;
  color: var(--text-primary);
}
.invite-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.invite-modal-header h3 { margin: 0; color: var(--text-primary); font-size: 16px; }
.invite-toggle { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; color: var(--text-primary); }
.invite-toggle strong { color: var(--text-primary); display: block; }
.invite-toggle small { display: block; color: var(--text-secondary); font-size: 12px; }
.invite-list-label { font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.invite-search-row { display: flex; gap: 8px; }
.invite-search-wrap { position: relative; flex: 1; }
.invite-search-wrap input {
  width: 100%; padding: 8px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
}
.invite-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px; max-height: 280px; overflow: auto;
  list-style: none; margin: 4px 0 0; padding: 4px; z-index: 10;
  color: var(--text-primary);
}
.invite-suggestions li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 6px; cursor: pointer;
}
.invite-suggestions li:hover { background: var(--bg-hover); }
.invite-suggestions .avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.invite-suggestions .u-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.invite-suggestions .u-email { font-size: 11px; color: var(--text-secondary); }
.invite-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.invite-chip {
  background: var(--bg-hover); color: var(--text-primary);
  padding: 4px 8px; border-radius: 14px; font-size: 12px;
  display: flex; gap: 6px; align-items: center;
}
.invite-chip .x { cursor: pointer; opacity: .7; }
.invite-chip .x:hover { opacity: 1; }

.primary-btn {
  background: var(--accent-blue); color: #fff; border: none;
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 500;
}
.primary-btn:hover { filter: brightness(1.1); }

/* --- Success toast --------------------------------------------------- */
.toast-success {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: #0f5132; color: #d1fae5;
  padding: 10px 18px; border-radius: 6px; z-index: 2000;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 8px;
}

/* --- Notifications dropdown ----------------------------------------- */
.notif-wrap { position: relative; }
.notif-wrap .badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent-red); color: #fff;
  border-radius: 10px; min-width: 16px; height: 16px;
  font-size: 10px; line-height: 16px; padding: 0 4px; text-align: center;
}
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-height: 460px; overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  z-index: 900;
  color: var(--text-primary);
}
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border-color);
  font-weight: 600; font-size: 13px;
  color: var(--text-primary);
}
.notif-header-actions { display: flex; gap: 10px; }
.link-btn {
  background: none; border: 0; color: var(--accent-blue);
  cursor: pointer; font-size: 12px; padding: 0;
}
.link-btn:hover { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 4px 0; }
.notif-item {
  display: flex; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-primary);
}
.notif-item.unread { background: rgba(66,133,244,0.10); }
.notif-item:hover { background: var(--bg-hover); }
.notif-item .n-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-hover); display: flex; align-items: center; justify-content: center;
  color: var(--accent-blue); font-size: 12px; flex: none;
}
.notif-item .n-body { font-size: 13px; line-height: 1.35; color: var(--text-primary); }
.notif-item .n-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
