/*
 * teampulse.css — shared stylesheet for all 6 TeamPulse plate pages
 * (j8k4pn / e5m2qk / b7r4nq / r9k3mw / j4n8pv / p9k3mt)
 * Created: 2026-06-18 07:31 ET
 * Updated: 2026-06-23 — + reopen ↑ on plate recent list
 * Source of truth for plate styling — edit here, republish this one file,
 * and every plate updates. Admin board + audit page keep their own inline CSS.
 */
:root{
  --navy:#000000;
  --teal:#ED3057;
  --green:#ED3057;
  --yellow:#FFD700;
  --bg:#f5f5f6;
  --card:#ffffff;
  --border:#e5e7eb;
  --text:#1a1a1a;
  --muted:#4b5563;
  --shadow:0 2px 12px rgba(0,0,0,0.07);
  --radius:12px;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Inter',system-ui,sans-serif;
  background:var(--bg); color:var(--text);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
#wrap{ max-width:1600px; margin:0 auto; padding:28px 22px 110px; }

/* ── TOP BAR ── */
.topbar{
  background:var(--navy); color:#fff;
  border-radius:var(--radius); box-shadow:var(--shadow);
  padding:22px 26px; display:flex; align-items:center; gap:18px;
  border-top:4px solid var(--teal);
}
.avatar{
  width:56px; height:56px; border-radius:50%;
  background:var(--teal); color:#fff;
  font-family:'Poppins',sans-serif; font-weight:800; font-size:24px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.greeting{ flex:1; min-width:0; }
.greeting-hello{ font-family:'Poppins',sans-serif; font-weight:800; font-size:22px; line-height:1.15; }
.greeting-sub{ font-size:13.5px; opacity:.78; margin-top:4px; }
.brand-pill{
  font-family:'Poppins',sans-serif; font-weight:600; font-size:10px;
  letter-spacing:.5px; text-transform:uppercase;
  background:var(--yellow); color:#000;
  padding:5px 10px; border-radius:999px; white-space:nowrap;
}
.top-refresh{
  border:1px solid rgba(255,255,255,.35); background:rgba(255,255,255,.10); color:#fff;
  font-family:'Inter'; font-size:13px; font-weight:600; padding:10px 15px; border-radius:9px;
  cursor:pointer; white-space:nowrap; flex-shrink:0;
}
.top-refresh:hover{ background:rgba(255,255,255,.18); }
.top-refresh:active{ transform:translateY(1px); }
.top-refresh:disabled{ opacity:.6; cursor:default; }

/* ── SECTION ── */
.section{
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow);
  margin-top:18px; overflow:visible;
}
.section-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:1px solid var(--border);
}
.section-title{ font-family:'Poppins',sans-serif; font-weight:600; font-size:15px; display:flex; align-items:center; gap:8px; }
.refresh-btn{
  border:1px solid var(--border); background:#fff; color:var(--muted);
  font-size:12.5px; padding:6px 12px; border-radius:8px; cursor:pointer; font-family:'Inter';
}
.refresh-btn:hover{ background:#fafafa; }
.section-body{ padding:8px 12px 12px; }

/* ── TASK ITEM ── */
.task{ position:relative; display:flex; align-items:flex-start; gap:13px; padding:15px 12px 32px; border-radius:10px; }
.task + .task{ border-top:1px solid var(--border); }
.task-check{
  width:24px; height:24px; border:2px solid var(--teal); border-radius:7px;
  flex-shrink:0; cursor:pointer; margin-top:2px; background:#fff;
  display:flex; align-items:center; justify-content:center; transition:background .12s;
}
.task-check:hover{ background:#fff5f7; }
.task-main{ flex:1; min-width:0; }
.task-text{ font-size:15px; line-height:1.4; font-weight:600; }
.task-meta{ font-size:12px; color:var(--muted); margin-top:5px; display:flex; flex-wrap:wrap; gap:6px 12px; }
.task-meta .chip{ background:#f3f4f6; padding:2px 9px; border-radius:999px; }
.task-meta .chip.client{ background:#fde7ec; color:#ED3057; }
.task-meta .chip.self{ background:#fef3c7; color:#92660b; }
.task-meta .chip.by{ background:#eef2ff; color:#3730a3; font-weight:600; }

/* ── X (remove) BUTTON on a task ── */
/* ════════════════════════════════════════════════════════════
   TASK ACTION BUTTONS — one unified icon family
   collapse chevron · ⭐ priority · 🚨 alert · × remove
   Same size + shape, equal emoji height, springy hover-lift,
   pressed-in active, and a pop on the on-states. ════════════ */
.task-collapse,.task-priority,.task-flag,.task-x{
  flex-shrink:0; width:34px; height:34px; padding:0; margin-top:1px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--border); border-radius:10px; background:#fff; color:var(--muted);
  cursor:pointer; line-height:1; -webkit-appearance:none; appearance:none;
  transition:transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s ease,
             background .15s ease, border-color .15s ease, filter .15s ease, opacity .15s ease;
}
.task-collapse:hover,.task-priority:hover,.task-flag:hover,.task-x:hover{
  transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,48,73,.16);
}
.task-collapse:active,.task-priority:active,.task-flag:active,.task-x:active{
  transform:translateY(0) scale(.9); box-shadow:0 1px 3px rgba(0,0,0,.12);
}
/* emoji buttons share one font-size so ⭐ and 🚨 sit at exactly the same height */
.task-priority,.task-flag{ font-size:16px; filter:none; opacity:1; }
.task-priority{ background:#FFFCF3; border-color:#D8BE6E; }
.task-priority:hover{ background:#FFF6D9; border-color:#E8C45E; }
.task-flag{ background:#FFF6F8; border-color:#E89DB0; }
.task-flag:hover{ background:#FFE9EF; border-color:var(--teal); }

/* — collapse: clean inline-SVG chevron, rotates open↔closed (replaces the old border-corner trick) — */
.task-collapse svg{ display:block; transition:transform .28s cubic-bezier(.34,1.56,.64,1); }   /* ▾ expanded */
.task-collapse:hover{ color:var(--teal); border-color:var(--teal); background:#fff5f7; }
.task.collapsed .task-collapse svg{ transform:rotate(-90deg); }                                /* ▸ collapsed */

/* — priority ⭐ : warm gold gradient + soft glow when on — */
.task-priority.on{
  filter:none; opacity:1; border-color:#E8C45E;
  background:linear-gradient(145deg,#FFE27A 0%,#FFD700 55%,#E8B400 100%);
  box-shadow:0 2px 10px rgba(232,180,0,.45), inset 0 1px 0 rgba(255,255,255,.6);
}
.task-priority.on:hover{ transform:translateY(-2px); box-shadow:0 6px 16px rgba(232,180,0,.55); }

/* — alert 🚨 : red gradient with a pulsing siren glow when on — */
.task-flag.on{
  filter:none; opacity:1; border-color:var(--teal); color:#fff;
  background:linear-gradient(145deg,#ff5d7d 0%,#ED3057 60%,#c81e42 100%);
  animation:siren 1.4s ease-in-out infinite;
}
.task-flag.on:hover{ transform:translateY(-2px); }
@keyframes siren{
  0%,100%{ box-shadow:0 0 0 0 rgba(237,48,87,.55), 0 2px 8px rgba(237,48,87,.4); }
  50%    { box-shadow:0 0 0 7px rgba(237,48,87,0),  0 2px 8px rgba(237,48,87,.4); }
}

/* — × remove : neutral, snaps to red + quarter-spin on hover — */
.task-x{ font-size:20px; font-weight:400; color:#6b7280; border-color:#c7ccd3; }
.task-x:hover{ border-color:var(--teal); color:var(--teal); background:#fff5f7; transform:translateY(-2px) rotate(90deg); }
.task-x:active{ transform:scale(.9) rotate(90deg); }
.task-x:disabled{ opacity:.4; cursor:default; transform:none; box-shadow:none; }

/* ── PER-TASK NOTE / INSTRUCTIONS BOX ── */
.task-note-wrap{ margin-top:10px; }
.task-note-label{ font-size:11.5px; color:var(--muted); font-weight:600; display:flex; align-items:center; gap:7px; margin:0 2px 5px; }
.task-note-status{ color:var(--green); font-weight:600; opacity:0; transition:opacity .15s; }
.task-note-status.show{ opacity:1; }
.task-note{
  width:100%; min-height:40px; resize:vertical; padding:9px 11px;
  border:1px solid var(--border); border-radius:8px; background:#fafafa;
  font-family:'Inter'; font-size:13.5px; line-height:1.45; color:var(--text);
}
.task-note:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); background:#fff; }
.task-note::placeholder{ color:#6b7280; }

/* ── PER-TASK CHECKLIST ── */
.checklist-wrap{ margin-top:11px; }
.cl-add-first{ border:1px dashed var(--border); background:#fff; color:var(--teal); font-family:'Inter'; font-weight:600; font-size:12.5px; padding:7px 12px; border-radius:8px; cursor:pointer; }
.cl-add-first:hover{ background:#fff5f7; border-color:var(--teal); }
.cl-head{ font-size:11.5px; color:var(--muted); font-weight:600; margin:0 2px 6px; display:flex; align-items:center; gap:8px; }
.cl-count{ background:#f3f4f6; color:var(--muted); border-radius:999px; padding:1px 8px; font-size:11px; }
.cl-items{ display:flex; flex-direction:column; gap:3px; }
.cl-item{ display:flex; align-items:center; gap:9px; padding:6px 8px; border-radius:8px; }
.cl-item:hover{ background:#fafafa; }
.cl-box{ width:19px; height:19px; border:2px solid var(--teal); border-radius:5px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; cursor:pointer; }
.cl-item.done .cl-box{ background:var(--teal); }
.cl-text{ flex:1; font-size:13.5px; cursor:pointer; }
.cl-item.done .cl-text{ text-decoration:line-through; color:var(--muted); }
.cl-edit{ flex-shrink:0; border:none; background:transparent; color:#bcc0c8; font-size:13px; cursor:pointer; padding:0 4px; line-height:1; opacity:.6; transition:opacity .15s, color .15s; }
.cl-edit:hover{ color:var(--teal); }
.cl-item:hover .cl-edit{ opacity:1; }
.cl-edit-input{ flex:1; min-width:0; padding:5px 8px; border:1px solid var(--teal); border-radius:6px; font-family:'Inter'; font-size:13.5px; }
.cl-edit-input:focus{ outline:none; box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.cl-del{ border:none; background:transparent; color:#4b5568; font-size:22px; cursor:pointer; padding:0 7px; line-height:1; }
.cl-del:hover{ color:var(--teal); }
.cl-del:hover{ color:#ED3057; }
.cl-drag{ flex-shrink:0; width:16px; height:20px; padding:0; display:inline-flex; align-items:center; justify-content:center; border:none; background:transparent; color:#bcc0c8; cursor:grab; border-radius:5px; touch-action:none; opacity:.7; transition:color .15s, background .15s, opacity .15s; }
.cl-drag svg{ display:block; pointer-events:none; }
.cl-item:hover .cl-drag{ opacity:1; }
.cl-drag:hover{ color:var(--teal); background:rgba(237,48,87,.10); }
.cl-drag:active{ cursor:grabbing; color:var(--teal); }
.cl-ghost{ opacity:.4; outline:1.5px dashed var(--teal); outline-offset:-2px; background:#fff5f7; }
.cl-chosen{ background:rgba(237,48,87,.05); }
.cl-addrow{ display:flex; align-items:center; gap:7px; margin-top:8px; }
.cl-input{ flex:1; min-width:0; padding:8px 10px; border:1px solid var(--border); border-radius:8px; font-family:'Inter'; font-size:13.5px; }
.cl-input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.cl-add{ border:1px solid var(--teal); background:#fff; color:var(--teal); font-weight:700; font-size:15px; width:36px; height:36px; border-radius:8px; cursor:pointer; flex-shrink:0; }
.cl-add:hover{ background:#fff5f7; }
.cl-import{ font-size:12px; color:var(--muted); border:1px solid var(--border); padding:8px 10px; border-radius:8px; cursor:pointer; white-space:nowrap; }
.cl-import:hover{ background:#fafafa; }

/* ── TOAST ── */
#toast{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); max-width:90%; background:#000000; color:#fff; padding:12px 20px; border-radius:10px; font-size:13.5px; box-shadow:0 10px 30px rgba(0,0,0,.3); z-index:9996; display:none; text-align:center; }
#toast.show{ display:block; }

/* ── PER-TASK FILES ── */
.files-wrap{ margin-top:11px; }
.files-head{ font-size:11.5px; color:var(--muted); font-weight:600; margin:0 2px 7px; display:flex; align-items:center; gap:8px; }
.files-list{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.file-chip{ display:inline-flex; align-items:center; gap:7px; background:#f3f4f6; border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:12.5px; max-width:100%; }
.file-chip a{ color:var(--teal); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:210px; }
.file-chip a:hover{ text-decoration:underline; }
.file-del{ border:none; background:transparent; color:#6b7280; cursor:pointer; font-size:14px; line-height:1; padding:0 2px; }
.file-del:hover{ color:#ED3057; }
.file-drop{ display:block; border:1.5px dashed var(--border); background:#fafafa; color:var(--teal); font-family:'Inter'; font-weight:600; font-size:12.5px; padding:14px 12px; border-radius:10px; cursor:pointer; text-align:center; transition:background .12s, border-color .12s; }
.file-drop:hover{ background:#fff5f7; border-color:var(--teal); }
.file-drop.drag{ background:#fff5f7; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }

/* ── CLAUDE / AI NOTES (separate from deliverable Files) ── */
.ai-wrap{ margin-top:13px; border:1px solid var(--border); border-left:3px solid var(--yellow); border-radius:10px; background:#fffdf3; padding:12px 13px 13px; }
.ai-label{ font-size:11.5px; color:var(--muted); font-weight:700; display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
.ai-hint{ font-weight:500; color:#6b7280; }
.ai-status{ color:var(--green); font-weight:600; opacity:0; transition:opacity .15s; margin-left:auto; }
.ai-status.show{ opacity:1; }
.ai-wrap .ai-note-rte{ background:#fff; min-height:60px; }
.ai-wrap .file-drop{ margin-top:10px; background:#fffdf3; }
.ai-wrap .file-drop:hover, .ai-wrap .file-drop.drag{ background:#fff8e1; border-color:var(--yellow); box-shadow:0 0 0 3px rgba(255,215,0,.18); }

/* ── LOG-HOURS ROW (on each open task) ── */
.task-log{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; }
.hours-input{
  width:78px; padding:8px 10px; border:1px solid #d1d5db; border-radius:8px;
  font-family:'Inter'; font-size:14.5px; text-align:center; color:var(--text); background:#fff;
}
.hours-input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.hours-unit{ font-size:13px; color:var(--muted); }
.log-btn{
  border:1px solid var(--teal); background:#fff; color:var(--teal);
  font-family:'Inter'; font-weight:600; font-size:13px; padding:8px 13px; border-radius:8px; cursor:pointer;
}
.log-btn:hover{ background:#fff5f7; }
.logged-total{ font-size:12.5px; color:var(--green); font-weight:600; margin-left:2px; }
.logged-total.zero{ color:var(--muted); font-weight:500; }

/* ── EMPTY / LOADING ── */
.placeholder{ text-align:center; color:var(--muted); padding:34px 16px; font-size:14.5px; }
.placeholder .big{ font-size:30px; margin-bottom:8px; }

/* ── RECENT ── */
.recent-item{ display:flex; align-items:flex-start; gap:12px; padding:11px 12px; font-size:13.5px; }
.recent-item + .recent-item{ border-top:1px solid var(--border); }
.recent-done{ color:var(--green); flex-shrink:0; font-weight:700; }
.recent-main{ flex:1; min-width:0; }
.recent-main .rt{ color:var(--text); }
.recent-main .rm{ color:var(--muted); font-size:11.5px; margin-top:3px; }
.recent-edit{ flex-shrink:0; border:none; background:transparent; color:#bcc0c8; font-size:13px; cursor:pointer; padding:0 4px; line-height:1; opacity:.6; transition:opacity .15s, color .15s; }
.recent-item:hover .recent-edit{ opacity:1; }
.recent-edit:hover{ color:var(--teal); }
.recent-reopen{ flex-shrink:0; border:none; background:transparent; color:#bcc0c8; cursor:pointer; padding:0 4px; line-height:1; display:flex; align-items:center; opacity:.6; border-radius:6px; transition:opacity .15s, color .15s, background .15s; }
.recent-item:hover .recent-reopen{ opacity:1; }
.recent-reopen:hover{ color:#10B981; background:rgba(16,185,129,.12); }
.recent-item.editing{ display:block; background:#fafafa; border-radius:8px; padding:12px; }
.recent-edit-form{ display:flex; flex-direction:column; }
.recent-edit-form .re-task, .recent-edit-form .re-hours{ width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:8px; font-family:'Inter'; font-size:13.5px; }
.recent-edit-form .re-task:focus, .recent-edit-form .re-hours:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.re-actions{ display:flex; gap:8px; margin-top:10px; }
.re-actions .btn{ flex:1; }
.re-status{ font-size:12px; margin-top:6px; min-height:14px; }
.re-status.err{ color:#dc2626; }
.client-wrap{ margin-top:12px; display:flex; align-items:center; gap:8px; }
.client-wrap label{ font-size:12px; color:var(--muted); font-weight:600; white-space:nowrap; }
.client-wrap .cs-trigger{ flex:1; }

/* ── ADD TASK ── */
.add-row{ padding:6px 8px 4px; }
.field-label{ font-size:12.5px; color:var(--muted); font-weight:600; margin:6px 2px; display:block; }
input[type=text]{
  width:100%; padding:12px 13px; border:1px solid var(--border); border-radius:9px;
  font-family:'Inter'; font-size:15px; color:var(--text); background:#fff;
}
input[type=text]:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.btn{
  width:100%; border:none; border-radius:9px; cursor:pointer;
  font-family:'Poppins',sans-serif; font-weight:600; font-size:15px;
  padding:13px 16px; margin-top:12px;
}
.btn-primary{ background:var(--teal); color:#fff; }
.btn-primary:hover{ background:#c81e44; }
.btn-ghost{ background:#f3f4f6; color:var(--text); }
.note{ font-size:12px; color:var(--muted); text-align:center; margin-top:9px; min-height:16px; }
.note.ok{ color:var(--green); }
.note.err{ color:#dc2626; }

/* ── CUSTOM CLIENT SELECT (eye candy) ── */
.cs-root{ position:relative; }
.cs-trigger{
  width:100%; display:flex; align-items:center; gap:10px;
  padding:10px 13px; border:1px solid var(--border); border-radius:10px;
  background:#fff; cursor:pointer; font-family:'Inter'; font-size:15px; color:var(--text);
  transition:border-color .12s, box-shadow .12s; min-height:50px;
}
.cs-trigger:hover{ border-color:#9aa1ab; }
.cs-trigger.open{ border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.cs-current{ flex:1; display:flex; align-items:center; gap:10px; min-width:0; }
.cs-cur-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.cs-ph{ color:var(--muted); }
.cs-me{ color:var(--muted); font-weight:400; }
.cs-chev{ color:var(--muted); transition:transform .15s; font-size:12px; }
.cs-trigger.open .cs-chev{ transform:rotate(180deg); }
.cs-ava{
  width:30px; height:30px; border-radius:50%; flex-shrink:0; color:#fff;
  font-family:'Poppins'; font-weight:700; font-size:11.5px; letter-spacing:.3px;
  display:flex; align-items:center; justify-content:center;
}
.cs-ava-int{ background:#e5e7eb; font-size:15px; }
.cs-panel{
  display:none; position:absolute; left:0; right:0; top:calc(100% + 7px); z-index:50;
  border:1px solid var(--border); border-radius:12px; background:#fff;
  box-shadow:0 14px 38px rgba(0,0,0,.16); overflow:hidden;
}
.cs-panel.open{ display:block; }
.cs-search{ padding:9px; border-bottom:1px solid var(--border); background:#fafafa; }
.cs-search input{ width:100%; padding:9px 11px; border:1px solid var(--border); border-radius:8px; font-size:14px; font-family:'Inter'; }
.cs-search input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.cs-list{ max-height:248px; overflow:auto; padding:6px; }
.cs-opt{ display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:9px; cursor:pointer; }
.cs-opt:hover{ background:#f3f4f6; }
.cs-name{ flex:1; font-size:14.5px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cs-muted{ color:var(--muted); }
.cs-check{ color:var(--teal); font-weight:800; }
.cs-internal{ border-top:1px solid var(--border); margin-top:5px; padding-top:12px; }
.cs-none{ padding:16px; text-align:center; color:var(--muted); font-size:13.5px; }
.cs-add{ border-top:1px dashed var(--border); margin-top:5px; padding-top:11px; }
.cs-add .cs-name{ color:var(--teal); font-weight:600; }
.cs-ava-add{ background:var(--teal); font-size:18px; line-height:1; }
.cs-addfoot{ border-top:1px solid var(--border); padding:8px; background:#fafafa; }
.cs-addbtn{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px; padding:11px; border:1px dashed var(--teal); border-radius:9px; background:#fff; color:var(--teal); font-family:'Inter'; font-weight:600; font-size:14px; cursor:pointer; }
.cs-addbtn:hover{ background:rgba(237,48,87,.07); }
.cs-addbtn .cs-ava-add{ width:24px; height:24px; font-size:15px; }
.cs-addform{ padding:11px; display:flex; flex-direction:column; gap:9px; }
.cs-addform input{ width:100%; padding:10px 11px; border:1px solid var(--border); border-radius:8px; font-size:14px; font-family:'Inter'; }
.cs-addform input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.cs-addactions{ display:flex; gap:8px; }
.cs-addgo{ flex:1; padding:10px; border:none; border-radius:8px; background:var(--teal); color:#fff; font-weight:700; font-family:'Inter'; font-size:14px; cursor:pointer; }
.cs-addcancel{ padding:10px 14px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--muted); font-family:'Inter'; font-size:14px; cursor:pointer; }

/* ── FOOTER ── */
.footer{ text-align:center; color:var(--muted); font-size:12.5px; margin-top:24px; line-height:1.6; }
.footer b{ color:var(--text); }
.sync-line{ font-size:11.5px; color:var(--muted); text-align:right; padding:4px 6px 0; }
.sync-line .dot{ color:var(--green); }

/* ── PIN GATE ── */
#gate{ position:fixed; inset:0; background:var(--navy); display:flex; align-items:center; justify-content:center; z-index:9998; padding:24px; }
.gate-card{ background:#fff; border-radius:16px; padding:34px 28px; width:100%; max-width:340px; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.gate-avatar{ width:64px; height:64px; border-radius:50%; background:var(--teal); color:#fff; font-family:'Poppins'; font-weight:800; font-size:28px; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
.gate-card h1{ font-family:'Poppins'; font-weight:800; font-size:20px; margin:0 0 4px; color:var(--navy); }
.gate-card p{ font-size:13.5px; color:var(--muted); margin:0 0 20px; }
.pin-input{ width:100%; text-align:center; letter-spacing:10px; font-size:26px; font-family:'Poppins'; padding:14px; border:2px solid var(--border); border-radius:10px; }
.pin-input:focus{ outline:none; border-color:var(--teal); }
.gate-err{ color:#dc2626; font-size:13px; margin-top:12px; min-height:18px; }
.gate-btn{ width:100%; margin-top:16px; padding:14px; border:none; border-radius:10px; background:var(--teal); color:#fff; font-family:'Poppins'; font-weight:700; font-size:16px; cursor:pointer; transition:background .15s, transform .12s; }
.gate-btn:hover{ background:var(--navy); transform:translateY(-1px); }
.gate-btn:active{ transform:translateY(0); }
.gate-btn:disabled{ opacity:.6; cursor:default; transform:none; }

/* ── MODAL ── */
#modal{ position:fixed; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(3px); display:none; align-items:flex-end; justify-content:center; z-index:9997; }
#modal.open{ display:flex; }
.modal-card{ background:#fff; border-radius:18px 18px 0 0; width:100%; max-width:520px; padding:22px 22px 28px; max-height:90vh; overflow:auto; }
@media(min-width:560px){ #modal{ align-items:center; } .modal-card{ border-radius:18px; } }
.modal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.modal-head h2{ font-family:'Poppins'; font-weight:600; font-size:17px; margin:0; }
.modal-close{ border:none; background:#f3f4f6; width:32px; height:32px; border-radius:50%; font-size:18px; cursor:pointer; color:var(--muted); }
.modal-task{ font-size:14px; color:var(--muted); background:#fafafa; border:1px solid var(--border); border-radius:9px; padding:11px 13px; margin:8px 0 4px; }
.logged-banner{ background:#fff5f7; border:1px solid #fad1da; color:#ED3057; border-radius:9px; padding:10px 13px; font-size:13.5px; margin:8px 0 2px; }
.modal-hours-row{ display:flex; align-items:center; gap:10px; }
.modal-hours-row .hours-input{ width:96px; font-size:16px; padding:11px; }

/* ── PRESENCE CLOCK ── */
.clock-row{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 20px; }
.clock-status{ display:flex; align-items:center; gap:13px; min-width:0; }
.clock-dot{ width:13px; height:13px; border-radius:50%; background:#d1d5db; flex-shrink:0; transition:background .15s, box-shadow .15s; }
.clock-dot.on{ background:var(--yellow); box-shadow:0 0 0 5px rgba(255,215,0,.28); }
.clock-state{ font-family:'Poppins',sans-serif; font-weight:600; font-size:16px; }
.clock-sub{ font-size:12.5px; color:var(--muted); margin-top:2px; }
.clock-btn{ border:none; border-radius:9px; cursor:pointer; font-family:'Poppins',sans-serif; font-weight:600; font-size:14.5px; padding:12px 22px; flex-shrink:0; background:var(--teal); color:#fff; transition:background .12s; }
.clock-btn:hover{ background:#c81e44; }
.clock-btn.out{ background:#000000; }
.clock-btn.out:hover{ background:#1a1a1a; }
.clock-btn:disabled{ opacity:.6; cursor:default; }
.clock-today{ border-top:1px solid var(--border); padding:12px 20px 14px; font-size:13px; color:var(--muted); display:none; }
.clock-today.show{ display:block; }
.clock-seg{ display:flex; justify-content:space-between; gap:12px; padding:4px 0; }
.clock-seg .live{ color:var(--green); font-weight:700; }
.clock-total{ margin-top:7px; padding-top:8px; border-top:1px dashed var(--border); color:var(--text); font-weight:600; }

/* ── DRAFT STAMP ── */
.draft-note{ position:fixed; bottom:12px; right:12px; background:#ED3057; color:#fff; padding:6px 14px; border-radius:999px; font-size:11px; font-weight:700; letter-spacing:.5px; z-index:9999; box-shadow:0 2px 8px rgba(0,0,0,.2); }

/* ── ROADBLOCK (waiting on Patrick) ── */
.task.blocked{ outline:2px solid var(--teal); outline-offset:-2px; background:#fff5f7; }
/* .task-flag / .task-flag.on — styled in the unified action-button family above */
.roadblock-wrap{ display:none; margin-top:10px; padding:10px 12px; border:1px solid var(--teal); border-radius:10px; background:#fff5f7; }
.roadblock-wrap.open{ display:block; }
.roadblock-label{ font-size:12.5px; font-weight:700; color:var(--teal); margin-bottom:6px; }
.roadblock-note{ width:100%; min-height:54px; border:1px solid #f3c2cd; border-radius:8px; padding:8px 10px; font-family:'Inter'; font-size:14px; resize:vertical; box-sizing:border-box; }
.roadblock-note:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.roadblock-actions{ display:flex; align-items:center; gap:10px; margin-top:9px; flex-wrap:wrap; }
.roadblock-send{ border:none; border-radius:8px; background:var(--teal); color:#fff; font-family:'Poppins',sans-serif; font-weight:600; font-size:13.5px; padding:9px 16px; cursor:pointer; transition:background .15s, transform .12s; }
.roadblock-send:hover{ background:#c81e44; }
.roadblock-send:active{ transform:scale(.97); }
.roadblock-send:disabled{ opacity:.6; cursor:default; }
.roadblock-status{ font-size:12.5px; font-weight:600; }
.roadblock-status.ok{ color:#16a34a; }
.roadblock-status.err{ color:#dc2626; }

/* ── COLLAPSED STATE — fold a to-do down to its title + chips (button styling lives in the action-button family) ── */
.task.collapsed{ background:#fafafa; padding-top:11px; padding-bottom:28px; }
.task.collapsed .task-main > *:not(.task-head):not(.task-meta){ display:none !important; }
/* ── PRIORITY ROW HIGHLIGHT (⭐ floats it to the top) ── */
.task.priority{ outline:2px solid #F2C94C; outline-offset:-2px; background:#fffdf2; }

/* ── CHECKLIST ITEM DETAIL (per-item rich-text note + attachments) ── */
.cl-expand{ border:none; background:transparent; color:#374151; font-size:16px; cursor:pointer; padding:0 5px; line-height:1; flex-shrink:0; display:flex; align-items:center; gap:6px; }
.cl-expand:hover{ color:var(--text); }
.cl-expand .cl-badges{ font-size:11px; letter-spacing:-1px; }
.cl-expand .cl-chev{ display:inline-block; font-size:20px; font-weight:700; line-height:1; transition:transform .15s; }
.cl-item.expanded .cl-expand .cl-chev{ transform:rotate(180deg); }
.cl-detail{ margin:2px 2px 10px 28px; padding:10px 12px; border:1px solid var(--border); border-left:3px solid var(--teal); border-radius:8px; background:#fafafa; }
.cl-detail-label{ font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin:0 0 6px; }
.rte-toolbar{ display:flex; gap:4px; margin-bottom:6px; flex-wrap:wrap; }
.rte-btn{ border:1px solid var(--border); background:#fff; border-radius:6px; min-width:30px; height:30px; font-size:13px; cursor:pointer; font-family:'Inter'; line-height:1; color:var(--text); }
.rte-btn:hover{ background:#f3f4f6; }
.rte-btn b{ font-weight:800; } .rte-btn i{ font-style:italic; }
.rte{ min-height:52px; border:1px solid var(--border); border-radius:8px; padding:8px 10px; background:#fff; font-family:'Inter'; font-size:13.5px; line-height:1.45; color:var(--text); }
.task-note-rte{ min-height:104px; }
.task-note-save{ margin-top:8px; border:none; background:var(--teal); color:#fff; border-radius:8px; padding:8px 18px; font-family:'Inter'; font-size:13px; font-weight:700; cursor:pointer; line-height:1; }
.task-note-save:hover{ filter:brightness(1.06); }
.task-note-save.saved{ background:#1f9d55; }
.rte:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.12); }
.rte:empty:before{ content:attr(data-ph); color:var(--muted); }
.rte ul, .rte ol{ margin:4px 0 4px 20px; }
.rte a{ color:var(--teal); }
.cl-files-sm{ margin-top:10px; }
.file-drop-sm{ display:block; border:1.5px dashed var(--border); background:#fff; color:var(--teal); font-family:'Inter'; font-weight:600; font-size:12px; padding:9px 10px; border-radius:8px; cursor:pointer; text-align:center; transition:background .12s, border-color .12s; }
.file-drop-sm.drag{ border-color:var(--teal); background:#fff5f7; }


/* ════════════════════════════════════════════════════════════
   STICKY SIDEBAR — AI prompt / code library (My Prompts · My Code · Team Prompts)
   Desktop: two columns, sidebar sticks. Phone (≤900px): drops to the bottom. */
.tp-layout{ display:flex; align-items:flex-start; gap:22px; }
.tp-main{ flex:1; min-width:0; }
.tp-side{ width:330px; flex-shrink:0; position:sticky; top:20px; margin-top:18px; align-self:flex-start; display:flex; flex-direction:column; gap:14px; }
.lib{ background:var(--card); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); overflow:hidden; }
.lib-head{ display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid var(--border); }
.lib-title{ font-family:'Poppins',sans-serif; font-weight:600; font-size:13.5px; color:var(--text); flex:1; display:flex; align-items:center; gap:7px; }
.lib-count{ font-size:11px; font-weight:600; color:#fff; background:var(--teal); border-radius:999px; padding:1px 8px; }
.lib-add{ width:30px; height:30px; flex-shrink:0; border:1px solid var(--border); background:#fff; border-radius:9px; color:var(--muted); font-size:18px; line-height:1; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:transform .15s cubic-bezier(.34,1.56,.64,1), background .15s, border-color .15s, color .15s; }
.lib-add:hover{ color:var(--teal); border-color:var(--teal); background:#fff5f7; transform:translateY(-2px); }
.lib-body{ padding:10px 12px; display:flex; flex-direction:column; gap:9px; max-height:42vh; overflow-y:auto; }
.lib-empty{ font-size:12.5px; color:var(--muted); padding:6px 2px; }

.lib-card{ border:1px solid var(--border); border-radius:11px; background:#fbfbfc; padding:9px 10px; }
.lib-card .lc-top{ display:flex; align-items:center; gap:8px; }
.lib-card .lc-title{ flex:1; min-width:0; font-size:13px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lib-card .lc-by{ font-size:10.5px; color:var(--muted); }
.lib-copy{ flex-shrink:0; border:1px solid var(--teal); color:var(--teal); background:#fff; border-radius:8px; font-size:11.5px; font-weight:600; padding:4px 10px; cursor:pointer; transition:transform .15s cubic-bezier(.34,1.56,.64,1), background .15s, color .15s; }
.lib-copy:hover{ background:var(--teal); color:#fff; transform:translateY(-2px); }
.lib-copy.done{ background:#16a34a; border-color:#16a34a; color:#fff; }
.lib-body .lc-actions{ display:flex; gap:6px; margin-left:auto; }
.lc-mini{ border:none; background:none; color:var(--muted); font-size:12px; cursor:pointer; padding:2px 4px; border-radius:6px; }
.lc-mini:hover{ color:var(--teal); background:#fff5f7; }
.lib-card .lc-body{ display:none; margin-top:8px; font-size:12.5px; line-height:1.5; color:#374151; white-space:pre-wrap; word-break:break-word; background:#fff; border:1px solid var(--border); border-radius:8px; padding:8px 10px; max-height:220px; overflow:auto; }
.lib-card.open .lc-body{ display:block; }
.lib-card.code .lc-body{ font-family:'SFMono-Regular',ui-monospace,Menlo,Consolas,monospace; font-size:12px; }
.lib-card .lc-expand{ font-size:11px; color:var(--muted); cursor:pointer; margin-top:6px; display:inline-block; }
.lib-card .lc-expand:hover{ color:var(--teal); }

/* the add/edit mini-form inside a container */
.lib-form{ display:flex; flex-direction:column; gap:7px; border:1px dashed var(--border); border-radius:11px; padding:10px; background:#fff; }
.lib-form input,.lib-form textarea{ width:100%; border:1px solid var(--border); border-radius:8px; padding:8px 10px; font-family:'Inter'; font-size:13px; box-sizing:border-box; }
.lib-form textarea{ min-height:90px; resize:vertical; }
.lib-form.code textarea{ font-family:'SFMono-Regular',ui-monospace,Menlo,Consolas,monospace; }
.lib-form input:focus,.lib-form textarea:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.lib-form-row{ display:flex; gap:7px; }
.lib-save{ flex:1; background:var(--teal); color:#fff; border:none; border-radius:8px; padding:8px; font-weight:600; font-size:13px; cursor:pointer; }
.lib-cancel{ background:#fff; color:var(--muted); border:1px solid var(--border); border-radius:8px; padding:8px 12px; font-size:13px; cursor:pointer; }

@media (max-width:900px){
  .tp-layout{ flex-direction:column; }
  .tp-side{ width:100%; position:static; }
  .lib-body{ max-height:none; }
}


/* ── EDIT TASK WORDING (pencil) ── */
.task-head{ display:flex; align-items:flex-start; gap:7px; }
.task-head .task-text{ flex:1; min-width:0; }
.task-edit{ flex-shrink:0; border:none; background:none; color:#b4b2a9; cursor:pointer; font-size:13px; line-height:1; padding:3px 5px; border-radius:6px; opacity:0; transition:opacity .12s, color .12s, background .12s; }
.task:hover .task-edit{ opacity:1; }
.task-edit:hover{ color:var(--teal); background:#fff5f7; }
.task-edit-box{ margin-top:7px; display:flex; flex-direction:column; gap:7px; }
.te-input{ width:100%; padding:9px 11px; border:1px solid var(--teal); border-radius:8px; font-family:'Inter'; font-size:15px; box-shadow:0 0 0 3px rgba(237,48,87,.14); box-sizing:border-box; }
.te-input:focus{ outline:none; }
.te-actions{ display:flex; gap:7px; }
.te-save{ background:var(--teal); color:#fff; border:none; border-radius:8px; padding:7px 14px; font-weight:600; font-size:13px; cursor:pointer; }
.te-cancel{ background:#fff; color:var(--muted); border:1px solid var(--border); border-radius:8px; padding:7px 12px; font-size:13px; cursor:pointer; }

/* ── MY SCRATCHPAD (sidebar) ── */
.scratch-area{ width:100%; height:400px; resize:vertical; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font-family:'Inter'; font-size:13px; line-height:1.5; color:var(--text); background:#fff; box-sizing:border-box; }
.scratch-area:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(237,48,87,.14); }
.lib-saved{ font-size:11px; font-weight:600; color:var(--green); opacity:0; transition:opacity .2s; margin-left:auto; }
.lib-saved.show{ opacity:1; }


/* ── RADAR LOADER — overlays the plate while getplate + library + scratch load underneath ──
   Lifted from the FundraisingZone JobPulse command center loader; re-skinned to the
   TeamPulse black/red palette. Markup lives inline in each plate (#tp-loader); the JS
   driver (TPLoader) is the inline boot script. Reveal once data resolves. */
#tp-loader{
  position:fixed; inset:0; z-index:99999;
  background:#0a0a0a;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  transition:opacity .55s ease, visibility .55s ease;
}
#tp-loader.fade-out{ opacity:0; visibility:hidden; }
.tp-loader-radar{ position:relative; width:172px; height:172px; margin-bottom:34px; }
.tp-loader-ring{ position:absolute; inset:0; border-radius:50%; border:1.5px solid rgba(237,48,87,.18); }
.tp-loader-ring:nth-child(2){ inset:21px; }
.tp-loader-ring:nth-child(3){ inset:42px; }
.tp-loader-ring:nth-child(4){ inset:63px; }
.tp-loader-sweep{
  position:absolute; inset:0; border-radius:50%;
  background:conic-gradient(from 0deg, transparent 75%, rgba(237,48,87,.55) 90%, rgba(237,48,87,.08) 100%);
  animation:tp-sweep 1.9s linear infinite;
}
.tp-loader-dot{
  position:absolute; top:50%; left:50%; width:8px; height:8px; border-radius:50%;
  background:#ED3057; box-shadow:0 0 12px #ED3057; transform:translate(-50%,-50%);
}
.tp-loader-ping{
  position:absolute; inset:0; border-radius:50%; border:1px solid rgba(237,48,87,.6);
  animation:tp-ping 1.9s ease-out infinite;
}
@keyframes tp-sweep{ from{ transform:rotate(0deg); } to{ transform:rotate(360deg); } }
@keyframes tp-ping{ 0%{ transform:scale(.3); opacity:.8; } 100%{ transform:scale(1.12); opacity:0; } }
.tp-loader-brand{
  font-family:'Poppins',sans-serif; font-size:23px; font-weight:800; letter-spacing:.02em;
  margin-bottom:6px; color:#fff;
}
.tp-loader-brand span{ color:#ED3057; }
.tp-loader-sub{
  font-size:11px; font-weight:500; color:rgba(255,255,255,.34);
  letter-spacing:.12em; text-transform:uppercase; margin-bottom:30px; text-align:center; padding:0 16px;
}
.tp-loader-bar-wrap{
  width:220px; height:2px; background:rgba(255,255,255,.07);
  border-radius:2px; overflow:hidden; margin-bottom:15px;
}
.tp-loader-bar{
  height:100%; width:0; background:linear-gradient(90deg,#AE0123,#ED3057);
  border-radius:2px; transition:width .4s ease; box-shadow:0 0 8px rgba(237,48,87,.6);
}
.tp-loader-status{
  font-size:11px; font-weight:500; color:rgba(255,255,255,.4);
  letter-spacing:.06em; min-height:16px;
}
@media (max-width:560px){
  .tp-loader-radar{ width:140px; height:140px; margin-bottom:28px; }
  .tp-loader-bar-wrap{ width:180px; }
}
/* ─────────────────────────────────────────────────────────────────────── */


/* ── DRAG-TO-REORDER GRIP — bottom-left of each plate to-do card (Emma's ask) ──
   The little dot-grid handle: grab it with the mouse (or finger) and drag the
   card up/down to reorder the plate. Order persists per person via setorder. */
.task-drag{
  position:absolute; left:9px; bottom:8px;
  width:26px; height:22px; padding:0;
  display:flex; align-items:center; justify-content:center;
  border:none; background:transparent; color:#b6bbc3; cursor:grab;
  border-radius:6px; touch-action:none;
  transition:color .15s, background .15s; opacity:.75;
}
.task-drag svg{ display:block; pointer-events:none; }
.task:hover .task-drag{ opacity:1; }
.task-drag:hover{ color:var(--teal); background:rgba(237,48,87,.10); }
.task-drag:active{ cursor:grabbing; color:var(--teal); }
.task-ghost{ opacity:.35; outline:2px dashed var(--teal); outline-offset:-2px; background:#fff5f7; }
.task-chosen{ box-shadow:0 14px 34px rgba(0,0,0,.22); }
.task-dragging{ cursor:grabbing; }
/* ─────────────────────────────────────────────────────────────────────── */
