/* ── MyWorkload App CSS ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:        #0d1117;
  --bg2:       #161b27;
  --bg3:       #1e2535;
  --bg4:       #252d40;
  --border:    #2a3147;
  --text:      #e8eaf0;
  --text2:     #8b92a5;
  --text3:     #555f78;
  --accent:    #4f7cff;
  --accent2:   #3a5fd4;
  --green:     #2dd4a0;
  --yellow:    #f5c542;
  --red:       #f05252;
  --orange:    #f97316;
  --purple:    #a78bfa;
  --sidebar-w: 220px;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 8px 32px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── LAYOUT ─────────────────────────────────────────── */
#app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .25s;
}
.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff;
  flex-shrink: 0;
}
.logo-mark.lg { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.logo-text { font-weight: 700; font-size: 15px; }
.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(79,124,255,.15); color: var(--accent); }
.chat-unread { color: var(--red); margin-left: auto; font-size: 10px; }
.sidebar-bottom { padding: 12px 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text3); }
.user-info { flex: 1; }
.logout-btn { background: none; border: none; color: var(--text3); cursor: pointer; padding: 4px; }
.logout-btn:hover { color: var(--red); }
.logout-btn svg { width: 16px; height: 16px; }

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  height: 54px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-weight: 600; font-size: 15px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text2); cursor: pointer; }
.sidebar-toggle svg { width: 20px; height: 20px; }

/* ── NOTIFICATIONS ──────────────────────────────────── */
.notif-wrap { position: relative; }
.notif-btn { background: none; border: none; color: var(--text2); cursor: pointer; position: relative; padding: 6px; }
.notif-btn svg { width: 20px; height: 20px; }
.notif-btn:hover { color: var(--text); }
.notif-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: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.notif-dropdown { position: absolute; right: 0; top: 42px; width: 320px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 200; overflow: hidden; }
.notif-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.notif-item:hover { background: var(--bg3); }
.notif-item.unread { background: rgba(79,124,255,.07); }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-body { font-size: 12px; color: var(--text2); }
.notif-time { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── PAGE CONTENT ───────────────────────────────────── */
.page-content { flex: 1; padding: 28px 32px; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-ghost { background: transparent; color: var(--text2); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: rgba(79,124,255,.1); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #d93f3f; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ── FORMS ──────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 9px 12px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none; transition: border-color .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.field-row { display: flex; align-items: center; gap: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); cursor: pointer; }
.select-sm { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; }
.search-input { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; width: 200px; }
.search-input:focus { border-color: var(--accent); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: rgba(45,212,160,.15); border: 1px solid var(--green); color: var(--green); }
.alert-error { background: rgba(240,82,82,.15); border: 1px solid var(--red); color: var(--red); }

/* ── BADGES ─────────────────────────────────────────── */
.badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 20px; }
.badge-seo         { background: rgba(79,124,255,.2); color: var(--accent); }
.badge-website     { background: rgba(167,139,250,.2); color: var(--purple); }
.badge-fix         { background: rgba(240,82,82,.2); color: var(--red); }
.badge-maintenance { background: rgba(245,197,66,.2); color: var(--yellow); }
.badge-design      { background: rgba(45,212,160,.2); color: var(--green); }
.badge-content     { background: rgba(249,115,22,.2); color: var(--orange); }
.badge-ads         { background: rgba(167,139,250,.2); color: var(--purple); }
.badge-other       { background: var(--bg3); color: var(--text2); }
.priority-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 7px; border-radius: 20px; }
.pri-urgent { background: rgba(240,82,82,.2); color: var(--red); }
.pri-high   { background: rgba(249,115,22,.2); color: var(--orange); }
.pri-normal { background: rgba(79,124,255,.15); color: #7fa4ff; }
.pri-low    { background: var(--bg3); color: var(--text3); }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; text-transform: capitalize; }
.status-active    { background: rgba(45,212,160,.15); color: var(--green); }
.status-on-hold   { background: rgba(245,197,66,.15); color: var(--yellow); }
.status-completed { background: rgba(79,124,255,.15); color: var(--accent); }
.status-archived  { background: var(--bg3); color: var(--text3); }
.role-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; }
.role-admin  { background: rgba(240,82,82,.2); color: var(--red); }
.role-worker { background: rgba(79,124,255,.2); color: var(--accent); }
.role-client { background: rgba(249,115,22,.2); color: var(--orange); }
.badge-action { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; margin: 0 4px; }
.badge-created  { background: rgba(45,212,160,.2); color: var(--green); }
.badge-updated  { background: rgba(79,124,255,.2); color: var(--accent); }
.badge-deleted  { background: rgba(240,82,82,.2); color: var(--red); }
.badge-moved    { background: rgba(245,197,66,.2); color: var(--yellow); }
.badge-commented{ background: rgba(167,139,250,.2); color: var(--purple); }
.badge-uploaded { background: rgba(249,115,22,.2); color: var(--orange); }

/* ── PROGRESS ───────────────────────────────────────── */
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-wrap.mini { max-width: 120px; }
.progress-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s; }
.progress-pct { font-size: 11px; color: var(--text3); min-width: 30px; text-align: right; font-family: 'DM Mono', monospace; }

/* ── MEMBER AVATARS ─────────────────────────────────── */
.member-stack { display: flex; }
.mini-avatar { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; margin-left: -6px; }
.mini-avatar:first-child { margin-left: 0; }
.mini-avatar.md { width: 32px; height: 32px; font-size: 11px; }

/* ── TOOLBAR ────────────────────────────────────────── */
.page-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.filter-group { display: flex; gap: 8px; }
.view-toggle { display: flex; gap: 2px; }
.view-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.view-btn svg { width: 14px; height: 14px; }
.view-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── SECTION HEADER ─────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 15px; font-weight: 700; }
.link-sm { font-size: 12px; color: var(--accent); }

/* ── DASHBOARD ──────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-number { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text2); margin-top: 3px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dash-col { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* ── TASK LIST SIMPLE ───────────────────────────────── */
.task-list-simple { display: flex; flex-direction: column; gap: 6px; }
.task-simple-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--bg3); border-radius: var(--radius-sm); cursor: pointer; gap: 10px; }
.task-simple-item:hover { background: var(--bg4); }
.task-simple-left { display: flex; align-items: center; gap: 10px; }
.task-simple-title { font-size: 13px; font-weight: 500; }
.task-simple-meta { font-size: 11px; color: var(--text3); }
.due-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: rgba(79,124,255,.15); color: var(--accent); white-space: nowrap; }
.due-chip.overdue { background: rgba(240,82,82,.15); color: var(--red); }

/* ── ACTIVITY FEED ──────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 10px; max-height: 400px; overflow-y: auto; }
.activity-feed.full { max-height: none; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; }
.activity-item.full { padding: 14px 0; border-bottom: 1px solid var(--border); }
.activity-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; }
.activity-user { font-weight: 600; font-size: 13px; }
.activity-body { font-size: 13px; color: var(--text2); }
.activity-project { color: var(--accent); font-size: 12px; }
.activity-time { font-size: 11px; color: var(--text3); margin-top: 3px; }
.activity-meta { display: flex; align-items: center; gap: 12px; margin-top: 4px; }

/* ── PROJECTS GRID ──────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card { display: block; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: border-color .15s, transform .1s; }
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.project-card-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.project-card-client { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.project-card-desc { font-size: 12px; color: var(--text3); margin-bottom: 10px; line-height: 1.5; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.project-card-due { font-size: 11px; color: var(--text3); margin-top: 10px; }
.project-card-due.overdue { color: var(--red); }
.empty-full { text-align: center; padding: 48px; color: var(--text2); }
.empty-state { text-align: center; color: var(--text3); font-size: 13px; padding: 20px 0; }
.text-red { color: var(--red); }

/* ── DATA TABLE ─────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.td-title { font-weight: 600; }
.table-row:hover td { background: var(--bg2); cursor: pointer; }

/* ── KANBAN BOARD ───────────────────────────────────── */
.project-board-page { padding-bottom: 40px; }
.board-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 12px; }
.board-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-header-right { display: flex; align-items: center; gap: 10px; }
.back-link { font-size: 13px; color: var(--text2); }
.back-link:hover { color: var(--text); }
.board-title-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-desc { color: var(--text2); font-size: 14px; margin-bottom: 20px; max-width: 700px; line-height: 1.6; }

.kanban-wrap { overflow-x: auto; padding-bottom: 16px; }
.kanban-board { display: flex; gap: 16px; align-items: flex-start; min-width: max-content; padding-right: 8px; }
.kanban-column { width: 280px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); flex-shrink: 0; }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.col-header-left { display: flex; align-items: center; gap: 8px; }
.col-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.col-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); }
.col-count { background: var(--bg3); color: var(--text3); font-size: 11px; padding: 1px 7px; border-radius: 10px; }
.add-task-btn { background: transparent; border: none; color: var(--text3); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: var(--radius-sm); }
.add-task-btn:hover { background: var(--bg3); color: var(--accent); }
.kanban-cards { padding: 10px; min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.kanban-cards.drag-over { background: rgba(79,124,255,.07); border-radius: var(--radius-sm); }
.kanban-add-col { align-self: flex-start; padding-top: 4px; }
.add-col-btn { background: transparent; border: 1px dashed var(--border); color: var(--text3); padding: 10px 16px; border-radius: var(--radius); cursor: pointer; font-size: 13px; font-family: 'DM Sans', sans-serif; width: 200px; }
.add-col-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── KANBAN CARD ────────────────────────────────────── */
.kanban-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: grab;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  user-select: none;
}
.kanban-card:hover { border-color: var(--accent); }
.kanban-card.dragging { opacity: .5; transform: rotate(2deg); box-shadow: var(--shadow); }
.kanban-card.drag-placeholder { border: 2px dashed var(--accent); background: rgba(79,124,255,.05); }
.card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.card-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.card-desc { font-size: 12px; color: var(--text2); margin-bottom: 8px; line-height: 1.4; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-due, .card-chk, .card-comments, .card-attach { font-size: 11px; color: var(--text3); }
.card-due.overdue { color: var(--red); }
.card-assignee { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.overdue-chip { font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 20px; background: rgba(240,82,82,.2); color: var(--red); }

/* ── MODAL ──────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.modal-box { position: relative; z-index: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); width: 100%; max-height: 90vh; display: flex; flex-direction: column; }
.modal-sm  { max-width: 440px; }
.modal-md  { max-width: 580px; }
.modal-lg  { max-width: 660px; }
.modal-xl  { max-width: 940px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text2); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 8px; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.task-modal-body { display: grid; grid-template-columns: 1fr 300px; gap: 0; padding: 0 !important; }
.task-modal-left { padding: 24px; overflow-y: auto; }
.task-modal-right { border-left: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }

/* ── CHECKLIST ──────────────────────────────────────── */
.checklist-header { display: flex; align-items: center; justify-content: space-between; }
.chk-meta { font-size: 11px; color: var(--text3); text-transform: none; letter-spacing: 0; font-weight: 400; }
.checklist-progress-bar { height: 3px; background: var(--border); border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
.checklist-progress-fill { height: 100%; background: var(--green); border-radius: 2px; transition: width .3s; }
.checklist-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 13px; }
.checklist-item.done .chk-label { text-decoration: line-through; color: var(--text3); }
.checklist-item input[type=checkbox] { accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.chk-label { flex: 1; }
.chk-del { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.chk-del:hover { color: var(--red); }
.checklist-add { display: flex; gap: 8px; margin-top: 8px; }
.checklist-add input { flex: 1; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; }
.checklist-add input:focus { border-color: var(--accent); }

/* ── ATTACHMENTS ────────────────────────────────────── */
.attach-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 4px; font-size: 12px; }
.attach-name { flex: 1; color: var(--accent); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.attach-size { color: var(--text3); margin: 0 10px; white-space: nowrap; }
.attach-del { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 14px; }
.attach-del:hover { color: var(--red); }
.attach-upload { margin-top: 8px; }

/* ── COMMENTS ───────────────────────────────────────── */
.comments-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); padding: 16px 16px 8px; border-bottom: 1px solid var(--border); }
.comments-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.comment-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.comment-author { font-size: 12px; font-weight: 700; }
.comment-time { font-size: 11px; color: var(--text3); }
.comment-body { font-size: 13px; color: var(--text2); line-height: 1.5; }
.comment-input-wrap { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-shrink: 0; }
.comment-input-inner { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.comment-input-inner textarea { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 8px 10px; border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-size: 13px; resize: none; outline: none; }
.comment-input-inner textarea:focus { border-color: var(--accent); }
.comment-input-inner .btn { align-self: flex-end; }

/* ── CHAT PANEL ─────────────────────────────────────── */
.chat-panel {
  position: fixed; right: 0; bottom: 0;
  width: 340px; height: 480px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow);
  z-index: 150;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-panel.project-chat { right: 360px; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.chat-close { background: none; border: none; color: var(--text2); font-size: 20px; cursor: pointer; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; flex-direction: column; gap: 2px; }
.chat-msg.mine { align-items: flex-end; }
.chat-msg-header { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text3); }
.chat-bubble { max-width: 240px; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; background: var(--bg3); border: 1px solid var(--border); }
.chat-msg.mine .chat-bubble { background: rgba(79,124,255,.2); border-color: rgba(79,124,255,.3); }
.chat-input-wrap { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input-wrap input { flex: 1; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none; }
.chat-input-wrap input:focus { border-color: var(--accent); }
.chat-input-wrap button { background: var(--accent); border: none; border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer; color: #fff; }
.chat-input-wrap button svg { width: 16px; height: 16px; }
.chat-input-wrap button:hover { background: var(--accent2); }

/* ── ASSIGN CHIPS ───────────────────────────────────── */
.assign-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.assign-chip { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 20px; cursor: pointer; font-size: 12px; transition: all .15s; background: var(--bg3); }
.assign-chip.selected { background: rgba(79,124,255,.2); border-color: var(--accent); color: var(--accent); }
.assign-avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; }

/* ── USERS ──────────────────────────────────────────── */
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.user-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; }
.user-card-avatar { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; }
.user-card-name { font-weight: 700; font-size: 14px; }
.user-card-email { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.user-card-info { flex: 1; }
.user-card-actions { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--text3); }

/* ── TOAST ──────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 12px 24px; border-radius: var(--radius); font-size: 13px; z-index: 9999; box-shadow: var(--shadow); }

/* ── LOGIN ──────────────────────────────────────────── */
.login-body { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 420px; padding: 24px; }
.login-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 48px; box-shadow: var(--shadow); }
.login-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.login-title { text-align: center; font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login-sub { text-align: center; color: var(--text2); font-size: 14px; margin-bottom: 28px; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-cols { grid-template-columns: 1fr; }
  .task-modal-body { grid-template-columns: 1fr; }
  .task-modal-right { border-left: none; border-top: 1px solid var(--border); }
  .field-row-2, .field-row-3 { grid-template-columns: 1fr; }
  .chat-panel { width: 100%; border-radius: 0; right: 0; }
  .chat-panel.project-chat { right: 0; top: auto; height: 60vh; }
}
@media (max-width: 600px) {
  .page-content { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}
