/* pm/tasks.css — styling for the Tasks tab (#tasksView).
   Minimal, consistent with the PM app; reuses pm.css variables where possible. */

.tasks-wrap { padding: 20px 24px; max-width: 960px; }

.tasks-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.tasks-title { font-size: 18px; font-weight: 600; margin: 0; }

.tasks-loading,
.tasks-empty {
  padding: 32px; text-align: center; color: #6b7280; font-size: 14px;
}

/* Create form */
.tasks-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px; padding: 12px;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px;
}
.tasks-input {
  padding: 7px 10px; font-size: 13px;
  border: 1px solid #d1d5db; border-radius: 6px; background: #fff;
}
.tasks-form .tasks-input[type="text"] { flex: 1 1 220px; }

/* Buttons */
.tasks-btn {
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; color: #374151;
}
.tasks-btn:hover { background: #f3f4f6; }
.tasks-btn--primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.tasks-btn--primary:hover { background: #1d4ed8; }
.tasks-btn--ghost { background: #fff; border: 1px solid #e5e7eb; color: #b45309; }
.tasks-btn--ghost:hover { background: #fff7ed; border-color: #fdba74; }
.tasks-btn[data-tip] { position: relative; }
.tasks-btn[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: normal; width: 220px; background: #111827; color: #fff; font-size: 11.5px; line-height: 1.35; font-weight: 500; padding: 7px 9px; border-radius: 7px; z-index: 30; box-shadow: 0 4px 12px rgba(0,0,0,.18); pointer-events: none; }
.tasks-btn[data-tip]:hover::before { content: ''; position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #111827; z-index: 30; pointer-events: none; }
.tasks-note { margin: 0 0 12px; padding: 8px 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; font-size: 13px; color: #1e3a8a; }

/* Task list */
.tasks-list { display: flex; flex-direction: column; gap: 8px; }
.tasks-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
}
.tasks-card-main { min-width: 0; }
.tasks-card-title { font-size: 14px; font-weight: 500; color: #111827; }
.tasks-card-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 4px; font-size: 12px; color: #6b7280;
}
.tasks-card-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* Header actions + sections */
.tasks-head-actions { display: flex; gap: 8px; align-items: center; }
.tasks-section { margin-bottom: 24px; }
.tasks-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.tasks-subtitle { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: #374151; }
.tasks-section-head .tasks-subtitle { margin: 0; }
.tasks-card--draft { border-left: 3px solid #f59e0b; }

/* Import-from-meeting panel */
.tasks-import-panel { display: block; }
.tasks-import-loading,
.tasks-import-empty { padding: 8px; font-size: 13px; color: #6b7280; }
.tasks-import-list { display: flex; flex-direction: column; gap: 6px; }
.tasks-import-row {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 8px 10px; cursor: pointer;
  border: 1px solid #e5e7eb; border-radius: 6px; background: #fff;
}
.tasks-import-row:hover { background: #f3f4f6; }
.tasks-import-topic { font-size: 13px; font-weight: 500; color: #111827; }
.tasks-import-sub { font-size: 12px; color: #6b7280; }

/* Inline assignee / owner controls */
.tasks-inline {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #6b7280;
}
.tasks-input--sm { padding: 3px 6px; font-size: 12px; max-width: 160px; }

/* Create-form labeled fields */
.tasks-field {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #6b7280;
}

/* Priority + status chips */
.tasks-pri { text-transform: capitalize; font-weight: 600; }
.tasks-pri--high   { color: #dc2626; }
.tasks-pri--normal { color: #2563eb; }
.tasks-pri--low    { color: #6b7280; }

.tasks-status {
  text-transform: capitalize; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: #f3f4f6; color: #374151;
}
.tasks-status--done      { background: #dcfce7; color: #166534; }
.tasks-status--confirmed { background: #dbeafe; color: #1e40af; }
.tasks-status--blocked   { background: #fee2e2; color: #991b1b; }

/* ── Attachments card grid (task page) ──────────────────────────────────────
   Card grid w/ image/PDF thumbnails, hover-reveal delete, dashed add-tile.
   Rendered by attachmentsBlockHtml() / wireAttachments() in pm/tasks.js. */
.tasks-att-grid { display:grid; grid-template-columns:repeat(auto-fill,156px); justify-content:start; gap:12px; margin-top:6px; }
.tasks-attc { position:relative; background:#fff; border:1px solid #ECEEF2; border-radius:12px; overflow:hidden; cursor:pointer; }
.tasks-attc-thumb { height:104px; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#F8FAFC; position:relative; }
.tasks-attc-img { width:100%; height:100%; object-fit:cover; display:block; }
.tasks-attc-pdf { position:absolute; top:0; left:0; width:100%; height:auto; display:block; }
.tasks-attc-badge { position:absolute; bottom:6px; left:6px; font-size:10px; font-weight:600; color:#A32D2D; background:#FCEBEB; padding:1px 5px; border-radius:3px; }
.tasks-attc-ficon { font-size:12px; font-weight:600; color:#475569; background:#E2E8F0; padding:3px 8px; border-radius:4px; letter-spacing:.04em; }
.tasks-attc-meta { padding:8px 10px; border-top:1px solid #ECEEF2; }
.tasks-attc-name { font-size:13px; color:#0F172A; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tasks-attc-size { font-size:11px; color:#98A2B3; margin-top:2px; }
.tasks-attc-del { position:absolute; top:6px; right:6px; width:22px; height:22px; border-radius:50%; background:#fff; border:1px solid #E2E8F0; color:#64748B; cursor:pointer; font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .12s; }
.tasks-attc:hover .tasks-attc-del { opacity:1; }
.tasks-attc-del:hover { color:#dc2626; border-color:#fca5a5; }
.tasks-attc-add { border:1px dashed #CBD5E1; border-radius:12px; min-height:148px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:#64748B; cursor:pointer; font-size:12px; }
.tasks-attc-add:hover { background:#F8FAFC; }
.tasks-attc-add-plus { font-size:22px; line-height:1; }

/* ── Task-page drag-and-drop file attaching (overlay shown only while dragging files) ──────
   Wired by wireTaskPageDropZone() in pm/tasks.js. .taskpage's other props (max-width/margin/
   padding) live in the embedded style literal in pm/tasks.js; only `position` is added here to
   anchor the overlay. */
.taskpage { position: relative; }
.taskpage--dropping::after {
  content: "Drop files to attach";
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #2563eb;
  background: rgba(37,99,235,0.06);
  border: 2px dashed #2563eb; border-radius: 12px;
  pointer-events: none;
}

/* ── Task-page 3-tab layout + grouped sidebar cards (structure pass) ─────────
   Tabs (Overview/Files/Activity) + grouped sidebar cards. Rendered by
   renderTaskPage() in pm/tasks.js. Styling pass refines visuals. */
.taskpage-tabs{display:flex;gap:20px;border-bottom:1px solid #ECEEF2;margin:14px 0 18px}
.taskpage-tab{background:none;border:none;padding:8px 0;font-size:14px;font-weight:500;color:#6B7280;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.taskpage-tab.active{color:#0F172A;border-bottom-color:#2563EB}
.taskpage-panel{display:none}
.taskpage-panel.active{display:block}
.taskpage-card{background:#fff;border:1px solid #EAEDF2;border-radius:14px;padding:16px 18px;margin-bottom:16px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.taskpage-card-title{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8A93A6;margin-bottom:14px}
.taskpage-header-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}

/* ── Task-page FRAME (header + meta + tab badge + sidebar avatars/priority dot) ──────────
   Header restructure, meta line, People avatars, Files tab count, priority dot.
   New selectors live here; overlapping ones (.tasks-pri*) are scoped under .taskpage-side to
   beat the embedded literal on specificity (the embedded <style> wins on equal specificity). */
.taskpage-headrow{display:flex;justify-content:space-between;align-items:stretch;gap:20px;margin-bottom:18px;background:#fff;border:1px solid #EAEDF2;border-radius:16px;padding:24px 28px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.taskpage-headmain{min-width:0;display:flex;flex-direction:column}
.taskpage-headside{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:14px;flex:0 0 auto}
.taskpage-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:16px;font-size:13px}
.taskpage-meta-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;background:#fff;border:1px solid #E7EAF0;border-radius:9px;padding:7px 12px}
.taskpage-meta-label{color:#94A3B8;font-weight:500}
.taskpage-meta-sep{color:#CBD5E1}
.taskpage-meta-val{color:#1E293B;font-weight:500}
.taskpage-meta-val--accent{color:#2563EB}
.taskpage-meta-time{color:#94A3B8}
.taskpage-meta-ico{color:#94A3B8;display:inline-flex;align-items:center}
.taskpage-ico{display:inline-flex;align-items:center;color:#94A3B8;flex:0 0 auto}
.taskpage-link{display:inline-flex;align-items:center;gap:5px;color:#2563EB;font-weight:500}
.taskpage-extico{flex:0 0 auto}
.taskpage-tab-count{display:inline-block;margin-left:6px;background:#EEF1F5;color:#6B7280;font-size:11px;font-weight:600;border-radius:999px;padding:0 6px;min-width:16px;text-align:center;line-height:18px}
.taskpage-avatar{width:22px;height:22px;border-radius:50%;color:#fff;font-size:9.5px;font-weight:700;letter-spacing:.02em;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.taskpage-person{display:inline-flex;align-items:center;gap:7px;justify-content:flex-end}
.taskpage-person .taskpage-select{max-width:150px}
/* Priority as a colored dot + label (scoped to the sidebar so board chips are unaffected) */
.taskpage-side .tasks-pri{display:inline-flex;align-items:center;gap:7px;background:none;padding:0;border-radius:0;text-transform:capitalize;letter-spacing:0;font-size:13px;font-weight:500;color:#0F172A}
.taskpage-side .tasks-pri::before{content:"";width:8px;height:8px;border-radius:50%;background:#98A2B3}
.taskpage-side .tasks-pri-high::before{background:#DC2626}
.taskpage-side .tasks-pri-normal::before{background:#2563EB}
.taskpage-side .tasks-pri-low::before{background:#98A2B3}

/* ── Task-page BODY: Overview cards, checklist progress bar, comment avatars, activity timeline ──
   New selectors live here; overlapping ones (.tasks-c/.tasks-act/.tasks-activity/checkbox) were
   edited in the embedded literal (which wins on equal specificity). Overview card chrome is scoped
   to [data-panel="overview"] so Files/Activity panels are untouched and it beats the embedded
   .taskpage-block / .taskpage-block-label on specificity. */
.taskpage-panel[data-panel="overview"] .taskpage-block{background:#fff;border:1px solid #EAEDF2;border-left:3px solid #3B82F6;border-radius:16px;padding:22px 24px;margin-bottom:18px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.taskpage-panel[data-panel="overview"] .taskpage-block--comments{border-left-color:#8B5CF6}
.taskpage-panel[data-panel="overview"] .taskpage-block-label{font-size:16px;font-weight:700;color:#0F172A;text-transform:none;letter-spacing:-.01em;margin-bottom:14px}
.taskpage-desc-empty{display:flex;align-items:center;justify-content:space-between;gap:16px}
.taskpage-empty-hint{display:flex;align-items:center;gap:12px;color:#94A3B8;font-size:13px;line-height:1.4}
.taskpage-empty-ico{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:12px;background:#F1F5F9;color:#3B82F6;flex:0 0 auto}
/* Checklist progress bar */
.tasks-cl-progrow{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.tasks-cl-track{flex:1;height:10px;background:#EEF1F5;border-radius:999px;overflow:hidden}
.tasks-cl-fill{height:100%;background:linear-gradient(90deg,#16A34A,#22C55E);border-radius:999px;transition:width .25s ease}
.tasks-cl-pct{font-size:12.5px;font-weight:700;color:#16A34A;flex:0 0 auto;min-width:34px;text-align:right}
/* Comment composer spacing (composer chrome itself is styled in the embedded literal) */
.tasks-c-actions{margin-top:8px}
/* Activity timeline (avatar + kind-dot + subtle left rail; row flex set in embedded literal) */
.tasks-act:not(:last-child)::before{content:"";position:absolute;left:10px;top:24px;bottom:-14px;width:1px;background:#ECEEF2}
.tasks-act-main{display:flex;flex-direction:column;min-width:0}
.tasks-act-text{font-size:12.5px;color:#48536B;line-height:1.45}
.tasks-act-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}
.tasks-act-main .tasks-act-time{margin-left:0;margin-top:2px;display:block}

/* ── Comment composer attach: paperclip trigger, staged pending chips, drag-over state ──
   New class names (no clash with the embedded #tasks-board-styles sheet). Wired in wireComments(). */
.tasks-cc-attach{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:none;background:none;color:#98A2B3;border-radius:7px;cursor:pointer;font-size:15px;line-height:1}
.tasks-cc-attach:hover{background:#F1F5F9;color:#475569}
.tasks-cc-pending{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 6px}
.tasks-cc-pending:empty{display:none}
.tasks-cc-chip{display:inline-flex;align-items:center;gap:6px;max-width:200px;background:#F4F6F8;border:1px solid #E3E7EE;border-radius:7px;padding:3px 6px 3px 9px;font-size:12px;color:#344054}
.tasks-cc-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tasks-cc-chip-x{border:none;background:none;color:#98A2B3;cursor:pointer;font-size:15px;line-height:1;padding:0 2px;border-radius:4px}
.tasks-cc-chip-x:hover{color:#dc2626}
.tasks-c-new.tasks-cc-drop{border-color:#2563EB;border-style:dashed;background:#F5F9FF;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
