/* css/activity.css — rep activity capture: quick touch modal, task cards
   (dashboard + record pages) and the Settings → Email sync pane.
   Tokens only (see css/main.css :root); dark mode follows automatically. */

/* ── Touch modal ─────────────────────────────────────────────────────────── */
.act-touch-box { width: 540px; }
.act-touch-body { display: flex; flex-direction: column; }
.act-scope {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 14px;
}
.act-scope:empty { display: none; }
.act-scope strong { color: var(--text-primary); font-weight: 600; }
.act-scope-l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); }
.act-scope-sep { color: var(--text-tertiary); }
.act-scope-change {
  background: none; border: none; padding: 0 2px; font: inherit; font-size: 12px;
  color: var(--brand-primary); cursor: pointer; text-decoration: underline dotted;
}
.act-seg {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.act-seg-btn {
  border: none; background: transparent; padding: 8px 6px; border-radius: calc(var(--radius-md) - 3px);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.act-seg-btn:hover { color: var(--text-primary); }
.act-seg-btn.active { background: var(--bg-surface); color: var(--brand-primary); box-shadow: var(--shadow-sm); }
.act-seg-btn:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.act-fu { border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 2px; }
.act-check {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500;
  color: var(--text-primary); cursor: pointer; margin-bottom: 10px;
}
.act-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-primary); }
.act-kbd-hint { font-size: 11px; color: var(--text-tertiary); }
.act-footer-btns { display: flex; gap: 8px; margin-left: auto; }
.act-ac-kind {
  flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 6px; border-radius: 999px;
  background: rgba(var(--brand-primary-rgb), 0.12); color: var(--brand-primary);
}
.act-ac-kind-ct { background: rgba(var(--brand-accent-rgb), 0.14); color: var(--brand-accent); }

/* ── Record page: "Log a touch" strip ─────────────────────────────────────── */
.act-strip-b { display: flex; gap: 8px; flex-wrap: wrap; }
.act-strip-btn {
  flex: 1 1 0; min-width: 72px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; border-radius: var(--radius-md); border: 1px solid var(--border-default);
  background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}
.act-strip-btn:hover {
  border-color: var(--brand-primary); color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb), 0.05); transform: translateY(-1px);
}
.act-strip-btn .ui-icon { width: 14px; height: 14px; }
.act-strip-btn-note { flex: 0 0 auto; min-width: 0; padding: 9px 11px; color: var(--text-secondary); }

/* ── Task rows (shared by the dashboard card and record card) ──────────────── */
.act-task-list { display: flex; flex-direction: column; gap: 6px; }
.act-task {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-surface);
  transition: opacity 250ms ease, background 120ms ease;
}
.act-task:hover { background: var(--bg-elevated); }
.act-task-done { opacity: 0.45; }
.act-task-done .act-task-title { text-decoration: line-through; }
.act-task-checkwrap { display: flex; align-items: center; padding-top: 2px; cursor: pointer; }
.act-task-check { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-primary); cursor: pointer; }
.act-task-main { flex: 1; min-width: 0; }
.act-task-title { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.35; overflow-wrap: anywhere; }
.act-task-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 11px; color: var(--text-tertiary); }
.act-task-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-task-link { font-size: 11px; }
.act-task-who { color: var(--text-secondary); }
.act-due { font-weight: 600; color: var(--text-tertiary); }
.act-due-overdue { color: var(--status-danger); }
.act-due-today { color: var(--status-warning); }
.act-due-none { font-weight: 400; }
.act-snooze {
  flex-shrink: 0; align-self: center; max-width: 86px; padding: 3px 4px;
  font-family: var(--font-body); font-size: 11px; color: var(--text-tertiary);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer;
}
.act-snooze:hover, .act-snooze:focus {
  color: var(--text-primary); border-color: var(--border-default); background: var(--bg-surface); outline: none;
}
.act-task-list-rec .act-task { padding: 6px 8px; }

/* ── Dashboard "My tasks" card ─────────────────────────────────────────────── */
.act-count {
  font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; text-transform: none; letter-spacing: 0;
  background: rgba(var(--brand-primary-rgb), 0.12); color: var(--brand-primary);
}
.act-count:empty { display: none; }
.act-count-danger { background: rgba(239, 68, 68, 0.12); color: var(--status-danger); }
.act-h-btn {
  margin-left: auto; border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-secondary);
  font-family: var(--font-body); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0;
  padding: 3px 9px; border-radius: 999px; cursor: pointer; transition: color 120ms ease, border-color 120ms ease;
}
.act-h-btn:hover { color: var(--brand-primary); border-color: var(--brand-primary); }
.act-task-add {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; margin-bottom: 10px;
  border: 1px dashed var(--border-default); border-radius: var(--radius-md); background: var(--bg-elevated);
}
.act-task-add-row { display: flex; gap: 8px; }
.act-task-add-due { flex: 0 0 140px; }
.act-task-add-co { flex: 1; min-width: 0; }
.act-task-add-btns { display: flex; gap: 8px; }
.act-team { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-subtle); font-size: 11px; color: var(--text-tertiary); }
.act-muted { font-size: 12px; color: var(--text-tertiary); line-height: 1.4; }
.act-empty { text-align: center; padding: 22px 8px; color: var(--text-tertiary); }
.act-empty .ui-icon { width: 22px; height: 22px; opacity: 0.5; margin-bottom: 6px; }
.act-empty-t { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.act-empty-s { font-size: 12px; margin-top: 2px; }

/* ── Settings → Email sync ─────────────────────────────────────────────────── */
.act-sync-facts { margin: 0 0 18px; padding-left: 18px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.act-sync-facts li { margin-bottom: 4px; }
.act-sync-facts strong { color: var(--text-primary); }
.act-sync-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.act-sync-stat {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-elevated);
}
.act-sync-stat-l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); }
.act-sync-stat-v { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.act-ok { color: var(--status-success); }
.act-warn { color: var(--status-warning); }
.act-hint {
  font-size: 12.5px; line-height: 1.5; padding: 9px 12px; margin-bottom: 10px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-elevated); color: var(--text-secondary);
}
.act-hint:empty { display: none; }
.act-hint-warn { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); color: var(--text-primary); }
.act-hint-ok { border-color: rgba(34, 197, 94, 0.30); background: rgba(34, 197, 94, 0.08); color: var(--text-primary); }
.act-sync-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ── Timeline dots for the new touch types (crm.css only knows note/task/email/quote) ── */
.qd-timeline-dot.crm-dot-call    { background: #8b5cf6; }
.qd-timeline-dot.crm-dot-visit   { background: #0ea5e9; }
.qd-timeline-dot.crm-dot-meeting { background: #14b8a6; }

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .act-touch-box { width: 100%; }
  .act-grid { grid-template-columns: 1fr; gap: 0; }
  .act-seg { grid-template-columns: repeat(2, 1fr); }
  .act-kbd-hint { display: none; }
  .act-footer-btns { width: 100%; }
  .act-footer-btns .btn { flex: 1; }
  .act-task-add-row { flex-direction: column; }
  .act-task-add-due { flex: none; }
  .act-sync-grid { grid-template-columns: 1fr; }
}
