/* ============================================================
   POF Sidebar — visual layer
   Coherent with Missive (compact), Notion (clean),
   and POF Design System (Poppins/Raleway, navy/teal, 8px grid).
   ============================================================ */

:root {
  /* POF tokens (subset, scoped to sidebar) */
  --pof-navy:          #1C1F3B;
  --pof-teal:          #80C7C2;
  --pof-teal-dark:     #2BA595;
  --pof-teal-deep:     #09414A;
  --pof-coral:         #E8546C;
  --pof-steel:         #435D74;
  --pof-light-steel:   #5F7D95;
  --pof-white:         #FFFFFF;
  --pof-body-text:     #3C3C3C;
  --pof-neutral-light: #F9FCFF;
  --pof-neutral-mid:   #EAEBED;
  --pof-gray-400:      #CED4DA;
  --pof-gray-600:      #6C757D;
  --pof-success:       #28A745;
  --pof-warning:       #E5A100;
  --pof-error:         #DC3545;

  /* AI accent — exception to POF DS palette. Reserved STRICTLY for
     AI-sourced content (mail summary, AI-detected fields, "via IA" caption).
     Never use on neutral UI, file-type icons, or status indicators. */
  --pof-ai:            #6B3FBF;
  --pof-ai-soft:       #F1E9FB;

  /* Semantic */
  --bg:           var(--pof-white);
  --bg-soft:      var(--pof-neutral-light);
  --bg-tinted:    #F1F6F8;
  --border:       var(--pof-neutral-mid);
  --border-soft:  #F0F1F3;
  --text:         var(--pof-navy);
  --text-body:    var(--pof-body-text);
  --text-muted:   var(--pof-gray-600);
  --text-xmuted:  #9AA0A6;
  --focus:        var(--pof-teal-dark);

  /* Radii (POF) */
  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 100px;

  /* Sizing */
  --tab-h: 44px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
}

button { font-family: inherit; }

/* ── TABS (segmented control, Notion-style) ────────────── */
.tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 10px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
}

.tabs {
  display: flex;
  background: #F1F1EF;
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 6px;
  border-radius: 5px;
  border: none;
  background: transparent;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.01em;
  transition: background .15s, color .15s, box-shadow .15s;
  line-height: 1;
}

.tab svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.tab:hover { color: var(--text); }

.tab.active {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  box-shadow:
    0 0 0 0.5px rgba(15, 15, 15, 0.05),
    0 1px 2px rgba(15, 15, 15, 0.08);
}

/* ── PANES ──────────────────────────────────────────────── */
.scroll { overflow-y: auto; flex: 1; min-height: 0; }
.pane   { display: none; padding: 16px 14px 28px; }
.pane.active { display: block; }

/* The legacy .sb-footer with a small POF logo was replaced by the new
   action-button footer (see FOOTER ACTIONS section further down). The
   old logo + meta rules were removed in v33. */

/* ── SECTION LABEL (Notion-style small caps) ───────────── */
.label {
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-xmuted);
  margin: 0 0 8px 2px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ── CARD ───────────────────────────────────────────────── */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px;
}

.card + .card { margin-top: 8px; }

/* ── PERSON HEADER ─────────────────────────────────────── */
.person-header { display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pof-navy);
  color: var(--pof-white);
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.person-meta { flex: 1; min-width: 0; }

.person-name {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}

.person-email {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
  margin-top: 1px;
}

/* ── BADGE (Notion-style pill) ─────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.badge svg { width: 11px; height: 11px; stroke-width: 2.2; }

.badge-found {
  background: #E6F4F2;
  color: var(--pof-teal-deep);
}
.badge-folk {
  background: #FFF4DC;
  color: #8A6300;
}
.badge-missing {
  background: #FCE6EA;
  color: #A02333;
}
.badge-loading {
  background: var(--pof-neutral-mid);
  color: var(--text-muted);
}

/* Badge as a clickable link (e.g. "Notion ↗") */
a.badge {
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s;
}
a.badge:hover { filter: brightness(0.96); }
.badge-arrow {
  width: 11px; height: 11px;
  margin-left: 1px;
  margin-right: -2px;
  opacity: 0.7;
  transition: transform .15s, opacity .15s;
}
a.badge:hover .badge-arrow { transform: translate(1px, -1px); opacity: 1; }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.btn svg { width: 13px; height: 13px; stroke-width: 1.8; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--pof-navy);
  color: var(--pof-white);
  border-color: var(--pof-navy);
}
.btn-primary:hover:not(:disabled) { background: #2A2E55; }

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) { border-color: var(--pof-gray-400); background: var(--bg-soft); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

.btn-block { width: 100%; justify-content: center; }

/* ── TEXTAREA ──────────────────────────────────────────── */
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-family: "Raleway", sans-serif;
  font-size: 12.5px;
  color: var(--text-body);
  background: var(--bg);
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
  transition: border-color .15s, box-shadow .15s;
}
textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43,165,149,.15);
}
textarea::placeholder { color: var(--text-xmuted); }

/* Suggested content (AI-prefilled) — italic + muted, cleared on focus */
textarea.is-suggested {
  font-style: italic;
  color: var(--text-muted, #6b7280);
}
textarea.is-suggested::after { content: ""; }

/* ── SAVE BAR ──────────────────────────────────────────── */
.save-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

/* ── FIELD LABEL ───────────────────────────────────────── */
.field-label {
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field-label svg { width: 12px; height: 12px; stroke-width: 1.9; }

/* ── PARTICIPANT ROW ───────────────────────────────────── */
.participant {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .12s;
}
.participant:hover { background: var(--bg-soft); }

.p-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--pof-neutral-mid);
  color: var(--pof-steel);
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.p-status {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--pof-gray-400);
  border: 2px solid var(--bg);
}
.p-status.found   { background: var(--pof-teal-dark); }
.p-status.missing { background: var(--pof-gray-400); }

.p-info { flex: 1; min-width: 0; }
.p-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.p-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.p-arrow {
  color: var(--text-xmuted);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s, transform .12s;
}
.participant:hover .p-arrow { opacity: 1; transform: translateX(2px); }
.p-arrow svg { width: 14px; height: 14px; stroke-width: 1.8; }

/* ── SPINNER / SKELETON ────────────────────────────────── */
.spinner {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--pof-teal-dark);
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY / WAITING ───────────────────────────────────── */
.waiting {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--text-muted);
  text-align: center;
}
.waiting svg { width: 28px; height: 28px; stroke-width: 1.4; color: var(--text-xmuted); }
.waiting .msg { font-size: 12.5px; max-width: 220px; line-height: 1.5; }

/* ── INLINE SEARCH STATUS ──────────────────────────────── */
.search-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 0 2px;
}

/* ── CONV ID ───────────────────────────────────────────── */
.conv-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--text-xmuted);
  word-break: break-all;
  padding: 8px 10px;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-soft);
}

/* ── INTRO TEXT ────────────────────────────────────────── */
.intro {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.55;
}

/* ── ACTION ROW ────────────────────────────────────────── */
.action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ── FADE IN (transform-only, opacity stays 1 so html-to-image
   captures the card even if the animation hasn't progressed) ── */
@keyframes fadeUp {
  from { transform: translateY(4px); }
  to   { transform: translateY(0); }
}
.fade-up { animation: fadeUp .2s ease forwards; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
}

/* ── INLINE NOTION/FOLK LOGO ───────────────────────────── */
.logo-inline { width: 12px; height: 12px; flex-shrink: 0; }

/* ── QUICK ACTIONS (Task pane) ─────────────────────────── */
.quick-actions { display: flex; flex-direction: column; gap: 4px; }

.action-row-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
  line-height: 1.3;
}
.action-row-btn:hover {
  background: var(--bg-soft);
  border-color: var(--pof-gray-400);
}
.action-row-btn:active { transform: translateY(0.5px); }

.action-icon {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pof-teal-dark);
  flex-shrink: 0;
  border-radius: 6px;
  background: #E6F4F2;
}
.action-icon svg { width: 14px; height: 14px; stroke-width: 1.8; }

.action-label { flex: 1; min-width: 0; }
.action-arrow {
  color: var(--text-xmuted);
  flex-shrink: 0;
  transition: transform .15s;
  display: inline-flex;
}
.action-arrow svg { width: 14px; height: 14px; stroke-width: 1.8; }
.action-row-btn.open .action-arrow { transform: rotate(90deg); color: var(--text); }

/* Generative variant: signals "will produce info", not "will navigate".
   No rotation on open, subtle accent color, gentle hover lift. */
.action-arrow-gen { color: var(--pof-teal-dark); }
.action-row-btn.open .action-arrow-gen { transform: none; color: var(--pof-teal-dark); }
.action-row-btn:hover .action-arrow-gen { transform: rotate(-8deg) scale(1.05); }
.action-arrow-gen svg { width: 15px; height: 15px; stroke-width: 1.9; }

/* Inline expansion panel anchored to the action above */
.action-panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 12px;
  margin-top: -7px;
  margin-bottom: 4px;
  position: relative;
  animation: slideDown .18s ease;
}
.action-panel .panel-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.action-row-btn.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  background: var(--bg-soft);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CHIPS (selectable categories) ─────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
  background: #F1F8F7;
}
.chip.selected {
  background: var(--pof-navy);
  color: var(--pof-white);
  border-color: var(--pof-navy);
}
.chip svg { width: 11px; height: 11px; stroke-width: 2.2; }

/* ── FORM FIELDS ───────────────────────────────────────── */
.form-field {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 10px;
}
.form-field:last-of-type { margin-bottom: 4px; }

.form-field-label {
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.required-dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--pof-coral);
}

.form-field input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: "Raleway", sans-serif;
  font-size: 12.5px;
  color: var(--text-body);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43,165,149,.15);
}
.form-field input.invalid {
  border-color: var(--pof-error);
  box-shadow: 0 0 0 3px rgba(220,53,69,.12);
}

.field-error {
  font-size: 11px;
  color: var(--pof-error);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.field-error[hidden] { display: none; }
.field-error svg { width: 12px; height: 12px; stroke-width: 1.8; }

/* ── TOAST (action feedback) ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 60px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--pof-navy);
  color: var(--pof-white);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  z-index: 50;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 13px; height: 13px; stroke-width: 2; }
.toast-success svg { color: var(--pof-teal); }

/* ── TASK LIST ─────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 4px; }

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 10px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .12s, background .12s;
}
.task-item:hover { border-color: var(--pof-gray-400); }
.task-item.done { opacity: 0.55; }
.task-item.done .task-name { text-decoration: line-through; }

.task-check {
  width: 20px; height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--pof-gray-400);
  background: var(--bg);
  cursor: pointer;
  padding: 0;
  margin-top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all .15s;
}
.task-check:hover {
  border-color: var(--pof-teal-dark);
  background: #F1F8F7;
  color: var(--pof-teal-dark);
}
.task-check svg { width: 12px; height: 12px; stroke-width: 2.5; }
.task-item.done .task-check {
  background: var(--pof-teal-dark);
  border-color: var(--pof-teal-dark);
  color: var(--pof-white);
}

.task-info { flex: 1; min-width: 0; }
.task-name {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 4px;
  display: block;
  word-wrap: break-word;
}
.task-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}
.task-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.task-meta svg { width: 11px; height: 11px; stroke-width: 1.9; }
.task-meta .meta-item.overdue { color: var(--pof-error); }

.task-prio {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.task-prio.p0 { background: #FCE6EA; color: #A02333; }
.task-prio.p1 { background: #FFF4DC; color: #8A6300; }
.task-prio.p2 { background: #E6F4F2; color: var(--pof-teal-deep); }
.task-prio.p3 { background: var(--pof-neutral-mid); color: var(--text-muted); }

.task-arrow {
  flex-shrink: 0;
  color: var(--text-xmuted);
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.task-arrow:hover { background: var(--bg-soft); color: var(--text); }
.task-arrow svg { width: 13px; height: 13px; stroke-width: 1.8; }

/* ── NOTION PILL (unified "linked to Notion" indicator) ── */
/* Used wherever an object opens its corresponding Notion page:
   task rows, meeting notes, etc. Same visual everywhere so the
   user can spot sync state at a glance. */
.notion-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px 3px 6px;
  background: var(--pof-neutral-mid);
  color: var(--text-muted);
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.notion-pill .logo-inline {
  width: 10px; height: 10px;
  color: var(--text-muted);
  transition: color .12s;
}
.notion-pill:hover {
  background: #DCDFE3;
  color: var(--text);
}
.notion-pill:hover .logo-inline { color: var(--text); }
.notion-pill .pill-arrow {
  width: 9px; height: 9px;
  margin-left: -1px; margin-right: -2px;
  opacity: 0.7;
  transition: transform .12s, opacity .12s;
}
.notion-pill:hover .pill-arrow { opacity: 1; transform: translate(1px, -1px); }

/* ── NEW TASK FORM ─────────────────────────────────────── */
.task-form {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px;
}
.task-form .form-field input,
.task-form .form-field textarea {
  background: var(--bg);
}
.task-form textarea { min-height: 56px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── SEGMENTED (priority / assignee chips) ─────────────── */
.segmented {
  display: flex;
  background: var(--pof-neutral-mid);
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
}
.segmented .seg {
  flex: 1;
  padding: 5px 6px;
  background: transparent;
  border: none;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: background .12s, color .12s, box-shadow .12s;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1.3;
}
.segmented .seg svg { width: 11px; height: 11px; stroke-width: 1.9; }
.segmented .seg:hover { color: var(--text); }
.segmented .seg.selected {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  box-shadow:
    0 0 0 0.5px rgba(15,15,15,0.05),
    0 1px 2px rgba(15,15,15,0.08);
}
.segmented.prio .seg.selected.p0 { color: #A02333; }
.segmented.prio .seg.selected.p1 { color: #8A6300; }
.segmented.prio .seg.selected.p2 { color: var(--pof-teal-deep); }
.segmented.prio .seg.selected.p3 { color: var(--text); }

/* ── PRE-FILLED HINT ──────────────────────────────────── */
.prefilled-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--pof-teal-dark);
  background: #E6F4F2;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}
.prefilled-hint svg { width: 11px; height: 11px; stroke-width: 1.9; }

/* ════════════════════════════════════════════════════════
   VIP STAR  — DS warning color (#E5A100), no off-palette yellows
   ════════════════════════════════════════════════════════ */
.vip-star {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--pof-gray-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .15s, background .15s, transform .15s;
}
.vip-star svg { width: 16px; height: 16px; stroke-width: 1.7; }
.vip-star:hover { background: #FFF4DC; color: var(--pof-warning); }
.vip-star.is-vip {
  color: var(--pof-warning);
}
.vip-star.is-vip:hover { color: var(--pof-warning); filter: brightness(0.92); }
.vip-star.just-toggled { animation: vipPop .35s ease; }
@keyframes vipPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Small VIP star variant for participant rows */
.p-vip {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--pof-gray-400);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity .15s, color .15s;
}
.p-vip svg { width: 13px; height: 13px; stroke-width: 1.9; }
.p-vip:hover { opacity: 1; color: var(--pof-warning); }
.p-vip.is-vip {
  color: var(--pof-warning);
  opacity: 1;
}

/* ════════════════════════════════════════════════════════
   QUICK ACTIONS — activated state + collapse
   ════════════════════════════════════════════════════════ */
.action-row-btn.activated {
  background: #E6F4F2;
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
}
.action-row-btn.activated .action-icon {
  background: var(--pof-teal-dark);
  color: var(--pof-white);
}
.action-row-btn.activated .action-arrow { color: var(--pof-teal-dark); }
.action-row-btn.is-loading .action-arrow svg { animation: spin .65s linear infinite; }

.action-row-btn.action-done {
  background: #E6F4F2;
  border-color: #C0E5DF;
}
.action-row-btn.action-done .action-icon {
  background: var(--pof-teal-dark);
  color: var(--pof-white);
}
.action-row-btn.action-done .action-arrow svg {
  /* swap to check by overriding via ::before? simpler: handled in JS */
}

.actions-secondary {
  display: contents;
}
.actions-secondary.collapsed > * { display: none; }

.show-more-btn {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px 9px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  text-align: left;
  line-height: 1.3;
}
.show-more-btn:not([hidden]) { display: inline-flex; }
.show-more-btn:hover {
  border-color: var(--pof-gray-400);
  background: var(--bg-soft);
  color: var(--text);
}

.show-more-stack {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  position: relative;
}
.show-more-stack .stack-icon {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #E6F4F2;
  color: var(--pof-teal-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  transition: transform .15s;
}
.show-more-stack .stack-icon:nth-child(1) { left: 0; z-index: 3; }
.show-more-stack .stack-icon:nth-child(2) { left: 12px; z-index: 2; background: #D6ECEA; color: var(--pof-teal-deep); }
.show-more-stack .stack-icon:nth-child(3) { left: 24px; z-index: 1; background: var(--pof-neutral-mid); color: var(--pof-steel); }
.show-more-stack .stack-icon svg { width: 12px; height: 12px; stroke-width: 1.9; }

.show-more-btn:hover .stack-icon:nth-child(1) { transform: translateX(-2px); }
.show-more-btn:hover .stack-icon:nth-child(3) { transform: translateX(2px); }

.show-more-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.show-more-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.show-more-sub {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-xmuted);
  letter-spacing: 0.01em;
}

.show-more-chev {
  width: 14px; height: 14px;
  color: var(--text-xmuted);
  flex-shrink: 0;
  transition: transform .18s;
}
.show-more-btn:hover .show-more-chev { color: var(--text); }
.show-more-btn.expanded .show-more-chev { transform: rotate(180deg); }
.show-more-btn.expanded .show-more-sub { display: none; }
.show-more-btn.expanded .show-more-stack { display: none; }
.show-more-btn.expanded {
  padding: 7px 12px;
  border-style: dashed;
}

/* Ghost action button (for "Créer une tâche personnalisée") */
.action-row-btn.ghost-action {
  border-style: dashed;
  color: var(--text-muted);
  background: transparent;
}
.action-row-btn.ghost-action:hover {
  color: var(--text);
  background: var(--bg-soft);
  border-style: solid;
}
.action-icon-ghost {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px dashed var(--pof-gray-400);
}
.action-row-btn.ghost-action:hover .action-icon-ghost {
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-dark) !important;
  background: #E6F4F2 !important;
}

/* ════════════════════════════════════════════════════════
   LABEL WITH INLINE HINT
   ════════════════════════════════════════════════════════ */
.label-with-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ai-wand {
  /* AI accent — only place purple is allowed (see --pof-ai token). */
  width: 12px; height: 12px;
  flex-shrink: 0;
  color: var(--pof-ai);
}
.hint-inline {
  margin-bottom: 0 !important;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 9.5px;
  padding: 3px 7px;
}

/* ════════════════════════════════════════════════════════
   CONTACT PANE — 2-COLUMN LAYOUT
   ════════════════════════════════════════════════════════ */
.pane#pane-contact {
  container-type: inline-size;
  container-name: contact;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.contact-grid > .contact-main { min-width: 0; }
.contact-grid > .contact-aside { min-width: 0; }

/* Wide enough → 2/3 main + 1/3 participants */
@container contact (min-width: 460px) {
  .contact-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }
  .contact-aside {
    position: sticky;
    top: 8px;
  }
  /* Hide the divider above #others-section in wide mode (it's in its own column) */
  .contact-aside .divider { display: none; }
  .contact-aside .label { margin-top: 0; }
  /* Compact participant cards in narrow side column */
  .contact-aside .participant {
    padding: 6px 6px;
    gap: 7px;
    border: 1px solid transparent;
  }
  .contact-aside .participant:hover {
    border-color: var(--border);
    background: var(--bg);
  }
  .contact-aside .p-avatar {
    width: 22px; height: 22px;
    font-size: 9.5px;
  }
  .contact-aside .p-status {
    width: 8px; height: 8px;
    bottom: -1px; right: -1px;
    border-width: 1.5px;
  }
  .contact-aside .p-name { font-size: 11.5px; }
  .contact-aside .p-email { display: none; }
  .contact-aside .p-arrow { display: none; }
  .contact-aside .p-vip svg { width: 12px; height: 12px; }
}

/* Fallback for browsers without container queries */
@supports not (container-type: inline-size) {
  @media (min-width: 520px) {
    .contact-grid {
      grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }
    .contact-aside .divider { display: none; }
  }
}

/* ════════════════════════════════════════════════════════
   PROPOSED TASKS
   ════════════════════════════════════════════════════════ */
.proposed-list { display: flex; flex-direction: column; gap: 6px; }

.proposed-empty {
  padding: 14px 4px;
  color: var(--text-xmuted);
  font-size: 11.5px;
  text-align: left;
}

.proposed-task {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  position: relative;
  transition: border-color .12s, background .12s, opacity .25s, transform .25s;
}
.proposed-task::before {
  content: none;
}
.proposed-task:hover { border-color: var(--pof-gray-400); }
.proposed-task.dismissed {
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
}
.proposed-task.accepted {
  background: #E6F4F2;
  border-color: var(--pof-teal-dark);
}
.proposed-task.accepted::before { background: var(--pof-teal-dark); }

.proposed-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.proposed-title {
  flex: 1;
  min-width: 0;
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
  word-wrap: break-word;
}
.proposed-actions {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}
.proposed-btn {
  width: 24px; height: 24px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-xmuted);
  transition: all .12s;
}
.proposed-btn svg { width: 13px; height: 13px; stroke-width: 1.9; }
.proposed-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}
.proposed-btn.accept {
  color: var(--pof-teal-dark);
}
.proposed-btn.accept:hover {
  background: var(--pof-teal-dark);
  color: var(--pof-white);
  border-color: var(--pof-teal-dark);
}
.proposed-btn.dismiss {
  color: var(--pof-coral);
}
.proposed-btn.dismiss:hover {
  background: var(--pof-coral);
  color: var(--pof-white);
  border-color: var(--pof-coral);
}

.proposed-meta {
  display: none;
}
.proposed-task.expanded .proposed-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  margin-top: 6px;
}
.proposed-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.proposed-meta svg { width: 11px; height: 11px; stroke-width: 1.9; }

.proposed-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
  display: none;
}
.proposed-task.expanded .proposed-desc { display: block; }

/* ════════════════════════════════════════════════════════
   CONTACT EXTRA FIELDS (read-only)
   ════════════════════════════════════════════════════════ */
.contact-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.contact-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-body);
  line-height: 1.4;
}
.contact-field.is-readonly { background: rgba(0,0,0,0.015); }
.cf-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pof-light-steel);
  margin-top: -1px;
}
.cf-icon svg { width: 14px; height: 14px; stroke-width: 1.7; }
.cf-body { flex: 1; min-width: 0; }
.cf-label {
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-xmuted);
  margin-bottom: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cf-value {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  word-break: break-word;
}
.cf-value.muted { color: var(--text-muted); font-weight: 400; }
.cf-value a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .12s, color .12s;
}
.cf-value a:hover { color: var(--pof-teal-dark); border-bottom-color: currentColor; }

/* Tags row */
.cf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.cf-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  background: var(--pof-neutral-mid);
  color: var(--pof-steel);
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.5;
}

/* Phone row with WhatsApp action */
.phone-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.phone-number {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.phone-number.ai-found {
  color: var(--text-muted);
  font-style: italic;
  position: relative;
}
.phone-number.ai-found::before {
  content: '~';
  margin-right: 2px;
  opacity: 0.6;
}
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #25D366;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.whatsapp-link:hover {
  background: #25D366;
  color: var(--pof-white);
  border-color: #25D366;
}
.whatsapp-link svg { width: 13px; height: 13px; }

.add-to-notion-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  border: 1px dashed var(--pof-gray-400);
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
}
.add-to-notion-btn:hover {
  border-color: var(--pof-teal-dark);
  border-style: solid;
  color: var(--pof-teal-deep);
  background: #E6F4F2;
}
.add-to-notion-btn svg { width: 11px; height: 11px; stroke-width: 2; }

.ai-found-badge {
  /* AI-detected hint badge — reserved purple accent (--pof-ai). */
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--pof-ai-soft);
  color: var(--pof-ai);
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ai-found-badge svg { width: 10px; height: 10px; stroke-width: 2; }

/* Meetings list */
.cf-meetings {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.cf-meeting {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-body);
  font-size: 12px;
  transition: background .12s;
}
.cf-meeting:hover { background: var(--bg); }
.cf-meeting-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
}
.cf-meeting-date {
  font-size: 10.5px;
  color: var(--text-xmuted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.cf-meeting-arrow {
  color: var(--text-xmuted);
  opacity: 0;
  transition: opacity .12s;
  flex-shrink: 0;
  display: inline-flex;
}
.cf-meeting:hover .cf-meeting-arrow { opacity: 1; }
.cf-meeting-arrow svg { width: 11px; height: 11px; stroke-width: 1.8; }

/* Header right cluster (badge + VIP star) */
.person-header-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}


/* ════════════════════════════════════════════════════════
   TIMELINE PANE
   ════════════════════════════════════════════════════════ */

/* ── Pinned situation note (neutral palette) ───────────── */
.pinned-note {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px 12px;
}

.pn-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.pn-head-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pof-teal-dark);
  flex-shrink: 0;
}
.pn-head-icon svg { width: 12px; height: 12px; stroke-width: 1.9; }
.pn-head-title {
  flex: 1;
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.pn-head-stamp {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-xmuted);
  flex-shrink: 0;
}
.pn-regen {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--text-xmuted);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s, transform .35s;
}
.pn-regen svg { width: 12px; height: 12px; stroke-width: 2; }
.pn-regen:hover { background: var(--bg-soft); color: var(--text); }
.pn-regen.spinning { transform: rotate(360deg); pointer-events: none; }

/* Status line — full-width prose (editable rich-text) */
.pn-status {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-body);
  text-wrap: pretty;
  padding: 8px 10px;
  border-radius: var(--r-md, 8px);
  border: 1px solid transparent;
  transition: border-color .12s, background .12s, box-shadow .12s;
  position: relative;
}
.pn-status[contenteditable="true"] {
  cursor: text;
  outline: none;
}
.pn-status[contenteditable="true"]:hover {
  background: var(--bg-soft);
  border-color: var(--border-soft);
}
.pn-status[contenteditable="true"]:focus {
  background: var(--pof-white, #fff);
  border-color: var(--pof-teal-dark);
  box-shadow: 0 0 0 3px rgba(20, 116, 110, 0.10);
}
.pn-status[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-xmuted);
  font-style: italic;
  pointer-events: none;
}
.pn-status strong { font-weight: 600; color: var(--text); }
.pn-status em { font-style: italic; }
.pn-status p { margin: 0 0 6px; }
.pn-status p:last-child { margin-bottom: 0; }
.pn-status ul,
.pn-status ol {
  margin: 4px 0 6px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pn-status ul li { list-style: disc; }
.pn-status ol li { list-style: decimal; }
.pn-status ul li::marker,
.pn-status ol li::marker { color: var(--text-xmuted); }

/* Keyboard-shortcut hint, shown only while focused */
.pn-status[contenteditable="true"]::after {
  content: "⌘B gras  ·  ⌘I italique  ·  ⌘L liste";
  position: absolute;
  top: 100%;
  right: 4px;
  margin-top: 3px;
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-xmuted);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.pn-status[contenteditable="true"]:focus::after { opacity: 1; }

.pn-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.pn-section-title {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pn-section-title svg {
  width: 11px;
  height: 11px;
  stroke-width: 2;
  flex-shrink: 0;
}
.pn-section-icon {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.pn-section.risks .pn-section-icon { color: var(--pof-coral); }

.pn-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ── Todo items (planned + proposed, differentiated) ───── */
.pn-todo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 4px;
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-body);
  text-decoration: none;
  position: relative;
  transition: background .12s;
}
.pn-todo:hover { background: var(--bg-soft); }

.pn-todo-check {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--pof-gray-400);
  background: var(--bg);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all .15s;
}
.pn-todo-check svg { width: 9px; height: 9px; stroke-width: 3; }
.pn-todo-check:hover {
  border-color: var(--pof-teal-dark);
  background: #F1F8F7;
  color: var(--pof-teal-dark);
}
.pn-todo.done .pn-todo-check {
  background: var(--pof-teal-dark);
  border-color: var(--pof-teal-dark);
  color: var(--pof-white);
}
.pn-todo.done .pn-todo-text {
  text-decoration: line-through;
  color: var(--text-xmuted);
}

/* Proposed task: AI-suggested visual treatment (gris, discret) */
.pn-todo.proposed .pn-todo-check {
  border-style: dashed;
  border-color: var(--pof-gray-400);
  color: var(--text-xmuted);
  cursor: default;
}
.pn-todo.proposed .pn-todo-check:hover {
  background: var(--bg-soft);
}
.pn-todo.proposed .pn-todo-check svg {
  width: 8px;
  height: 8px;
  stroke-width: 2.2;
}
.pn-todo.proposed .pn-todo-text {
  color: var(--text-muted);
}

.pn-todo-text {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
}

.pn-todo-prio {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  flex-shrink: 0;
}
.pn-todo-prio.p0 { background: #FCE6EA; color: #A02333; }
.pn-todo-prio.p1 { background: #FFF4DC; color: #8A6300; }
.pn-todo-prio.p2 { background: #E6F4F2; color: var(--pof-teal-deep); }
.pn-todo-prio.p3 { background: var(--pof-neutral-mid); color: var(--text-muted); }

.pn-todo-actions {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 2px;
}
.pn-todo-btn {
  width: 20px; height: 20px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-xmuted);
  transition: all .12s;
}
.pn-todo-btn svg { width: 11px; height: 11px; stroke-width: 2; }
.pn-todo-btn:hover {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}
.pn-todo-btn.accept { color: var(--pof-teal-dark); }
.pn-todo-btn.accept:hover {
  background: var(--pof-teal-dark);
  color: var(--pof-white);
  border-color: var(--pof-teal-dark);
}
.pn-todo-btn.dismiss:hover {
  background: var(--pof-coral);
  color: var(--pof-white);
  border-color: var(--pof-coral);
}
.pn-todo-link {
  color: var(--text-xmuted);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  text-decoration: none;
  transition: opacity .12s, transform .12s;
}
.pn-todo-link svg { width: 10px; height: 10px; stroke-width: 2; }
.pn-todo:hover .pn-todo-link { opacity: 0.7; }
.pn-todo-link:hover { opacity: 1 !important; color: var(--text); transform: translate(1px, -1px); }

/* "+ Add task" */
.pn-todo-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 4px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.pn-todo-add:hover { background: var(--bg-soft); color: var(--text); }
.pn-todo-add-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px dashed var(--pof-gray-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all .12s;
}
.pn-todo-add:hover .pn-todo-add-icon {
  border-style: solid;
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-dark);
  background: #F1F8F7;
}
.pn-todo-add-icon svg { width: 8px; height: 8px; stroke-width: 2.5; }

/* Risks */
.pn-risk {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 4px;
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-body);
}
.pn-risk-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pof-coral);
  margin-top: 1px;
}
.pn-risk-icon svg { width: 12px; height: 12px; stroke-width: 1.9; }
.pn-risk[data-sev="medium"] .pn-risk-icon { color: #B07A1E; }
.pn-risk[data-sev="low"] .pn-risk-icon { color: var(--text-muted); }

/* ── Upcoming key dates (compact) ──────────────────────── */
.key-dates {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.key-date {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 7px 5px 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background .12s, border-color .12s;
  color: var(--text);
}
.key-date:hover {
  border-color: var(--border);
  background: var(--bg-soft);
}

.kd-day {
  flex-shrink: 0;
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  line-height: 1;
  text-align: center;
}
.kd-day-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.kd-day-mon {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-xmuted);
  margin-top: 1px;
}
.key-date.today .kd-day-num,
.key-date.today .kd-day-mon { color: var(--pof-coral); }
.key-date.imminent .kd-day-mon { color: var(--pof-coral); }

.kd-body { flex: 1; min-width: 0; }
.kd-title {
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kd-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  margin-top: 1px;
}
.kd-meta svg { width: 9px; height: 9px; stroke-width: 1.9; }
.kd-meta .kd-rel {
  color: var(--pof-coral);
  font-weight: 600;
}
.key-date:not(.today):not(.imminent) .kd-meta .kd-rel {
  color: var(--text-muted);
  font-weight: 500;
}

.kd-type-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xmuted);
  opacity: 0.7;
}
.kd-type-icon svg { width: 12px; height: 12px; stroke-width: 1.8; }
.key-date:hover .kd-type-icon { color: var(--pof-teal-dark); opacity: 1; }

/* ── Source-of-data caption ("via Notion") ─────────────── */
/* Neutral muted hint placed next to a label, e.g. "Dates clés · via Notion".
   Pair with .ai-source for AI-sourced data. */
.timeline-source {
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-xmuted);
}

/* ── Timeline (compact) ────────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 2px;
}

/* Vertical rail */
.timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 4px;
  bottom: 4px;
  width: 1.5px;
  background: linear-gradient(to bottom,
    var(--border-soft) 0%,
    var(--border) 12%,
    var(--border) 88%,
    var(--border-soft) 100%);
}

.tl-day-sep {
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-xmuted);
  padding: 8px 0 3px 32px;
  position: relative;
}
.tl-day-sep:first-child { padding-top: 2px; }

.tl-item {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 3px 0;
}

.tl-node {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1.5px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--border);
  z-index: 1;
  margin-top: 1px;
}
.tl-node svg { width: 11px; height: 11px; stroke-width: 1.9; }

.tl-node[data-type="email"]    { color: #3B6FB6; box-shadow: 0 0 0 1.5px #C5D8EF; background: #EAF1FB; }
.tl-node[data-type="whatsapp"] { color: #1E9D52; box-shadow: 0 0 0 1.5px #BDE5CC; background: #E8F6EE; }
.tl-node[data-type="linkedin"] { color: #0A66C2; box-shadow: 0 0 0 1.5px #B8D2EE; background: #E7F1F9; }
.tl-node[data-type="visio"]    { color: var(--pof-teal-deep); box-shadow: 0 0 0 1.5px #BCDED9; background: #E6F4F2; }
.tl-node[data-type="meeting"]  { color: var(--pof-teal-deep); box-shadow: 0 0 0 1.5px #BCDED9; background: #E6F4F2; }
.tl-node[data-type="task"]     { color: #8A6300; box-shadow: 0 0 0 1.5px #ECD9A7; background: #FFF4DC; }
.tl-node[data-type="nda"]      { color: var(--pof-navy); box-shadow: 0 0 0 1.5px var(--pof-gray-400); background: var(--bg-soft); }
.tl-node[data-type="note"]     { color: var(--pof-steel); box-shadow: 0 0 0 1.5px var(--pof-neutral-mid); background: var(--bg-soft); }
.tl-node[data-type="mou"]      { color: #A35A1F; box-shadow: 0 0 0 1.5px #ECC8A4; background: #FAEEDF; }
.tl-node[data-type="contrat"]  { color: #8A6300; box-shadow: 0 0 0 1.5px #ECD9A7; background: #FFF4DC; }

.tl-body {
  flex: 1;
  min-width: 0;
  padding: 2px 4px 4px;
  transition: background .12s;
  border-radius: var(--r-sm);
}
.tl-item:hover .tl-body {
  background: var(--bg-soft);
}

.tl-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tl-title {
  flex: 1;
  min-width: 0;
  font-family: "Poppins", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  word-wrap: break-word;
}
.tl-time {
  flex-shrink: 0;
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-xmuted);
  white-space: nowrap;
}

.tl-summary {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Visio = note Notion → résumé simple, juste un peu plus de poids */
.tl-item.is-note .tl-summary {
  -webkit-line-clamp: 3;
  color: var(--text-body);
}
/* Note Notion = contenu plus riche → on en montre davantage et on l'encadre
   pour signaler que c'est une note longue éditoriale */
.tl-item[data-type="note"] .tl-summary,
.tl-item.is-note .tl-body:has(.tl-title:not(:empty)) .tl-summary {
  -webkit-line-clamp: 6;
}
.tl-item[data-type="note"] .tl-body {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 8px 10px;
  border-left: 3px solid var(--pof-gray-400);
}
.tl-item[data-type="note"]:hover .tl-body {
  background: var(--pof-neutral-mid);
}
.tl-item[data-type="note"] .tl-summary {
  color: var(--text-body);
  font-size: 11.5px;
  line-height: 1.55;
}

.tl-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-xmuted);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  margin-top: 2px;
}
.tl-meta svg { width: 9px; height: 9px; stroke-width: 1.9; }
.tl-author-name {
  color: var(--text-muted);
  font-weight: 500;
}
.tl-link {
  margin-left: auto;
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xmuted);
  border-radius: 3px;
  opacity: 0;
  text-decoration: none;
  transition: opacity .12s, background .12s, color .12s;
}
.tl-link svg { width: 11px; height: 11px; stroke-width: 1.9; }
.tl-item:hover .tl-link { opacity: 0.7; }
.tl-link:hover { opacity: 1 !important; background: var(--border); color: var(--text); }

/* Future events — same compact row as past, with a different time tone
   (no separate date-block). Distinguished by the "À venir" header above. */
.tl-day-sep-future {
  color: var(--pof-teal-deep);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.tl-day-sep-future::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pof-teal-dark);
  margin-right: 6px;
  vertical-align: 1px;
}
.tl-item.future .tl-time {
  color: var(--pof-teal-deep);
  font-weight: 600;
}

.tl-empty {
  padding: 10px 4px;
  color: var(--text-xmuted);
  font-size: 11px;
}

@media (prefers-reduced-motion: no-preference) {
  .tl-item { animation: tlFade .25s ease both; }
}
@keyframes tlFade {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════
   TIMELINE — 2-COLUMN LAYOUT (mirrors Contact pane)
   ════════════════════════════════════════════════════════ */
.pane#pane-timeline {
  container-type: inline-size;
  container-name: timeline;
}
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.timeline-grid > .timeline-main { min-width: 0; }
.timeline-grid > .timeline-aside { min-width: 0; }

/* Wide enough → situation note on left (sticky), historique on right */
@container timeline (min-width: 540px) {
  .timeline-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }
  .timeline-aside {
    position: sticky;
    top: 8px;
  }
  .timeline-aside .label:first-child { margin-top: 0; }
  .timeline-aside .divider { margin: 10px 0; }
}

/* Fallback for browsers without container queries */
@supports not (container-type: inline-size) {
  @media (min-width: 600px) {
    .timeline-grid {
      grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }
    .timeline-aside { position: sticky; top: 8px; }
  }
}


/* ── Status bullets (structured prose) ─────────────────── */
.pn-status .pn-status-headline {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 6px;
  text-wrap: balance;
}
.pn-status-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pn-status-bullets li {
  display: flex;
  gap: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-body);
  position: relative;
  padding-left: 9px;
}
.pn-status-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-xmuted);
}
.pn-status-bullets .pn-status-label {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: var(--text);
  font-size: 11.5px;
  flex-shrink: 0;
  white-space: nowrap;
}
.pn-status-bullets .pn-status-label::after {
  content: ":";
  color: var(--text-xmuted);
  font-weight: 400;
  margin-left: 1px;
}
.pn-status-bullets .pn-status-value {
  flex: 1;
  min-width: 0;
}

/* ── Inline task form (in situation note) ──────────────── */
.pn-task-form {
  display: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 9px 9px;
  margin: 2px 0 4px;
  animation: pnFormSlide .15s ease;
}
.pn-task-form.open { display: block; }
@keyframes pnFormSlide {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pn-task-form input.pn-task-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: "Raleway", sans-serif;
  font-size: 12px;
  color: var(--text-body);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.pn-task-form input.pn-task-input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43,165,149,.15);
}

.pn-task-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.pn-task-prio {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px;
  gap: 0;
}
.pn-task-prio button {
  padding: 2px 6px;
  background: transparent;
  border: none;
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.04em;
  transition: background .12s, color .12s;
}
.pn-task-prio button:hover { color: var(--text); }
.pn-task-prio button.selected.p0 { background: #FCE6EA; color: #A02333; }
.pn-task-prio button.selected.p1 { background: #FFF4DC; color: #8A6300; }
.pn-task-prio button.selected.p2 { background: #E6F4F2; color: var(--pof-teal-deep); }
.pn-task-prio button.selected.p3 { background: var(--pof-neutral-mid); color: var(--text); }

.pn-task-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
}
.pn-task-actions button {
  padding: 4px 9px;
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .12s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.3;
}
.pn-task-actions .pn-task-cancel {
  background: transparent;
  color: var(--text-muted);
}
.pn-task-actions .pn-task-cancel:hover { color: var(--text); background: var(--bg); }
.pn-task-actions .pn-task-save {
  background: var(--pof-navy);
  color: var(--pof-white);
}
.pn-task-actions .pn-task-save:hover { background: #2A2E55; }
.pn-task-actions .pn-task-save:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pn-task-actions .pn-task-save svg { width: 10px; height: 10px; stroke-width: 2.2; }


/* ════════════════════════════════════════════════════════
   FOOTER ACTIONS (4 boutons élégants)
   ════════════════════════════════════════════════════════ */
.sb-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 6px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 3px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: background .12s, color .12s, border-color .12s, transform .1s;
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  min-width: 0;
}
.footer-action svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}
.footer-action:hover {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border-soft);
}
.footer-action:active { transform: scale(0.97); }
.footer-action.active {
  background: #E6F4F2;
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
}
.footer-action.done {
  background: #E6F4F2;
  color: var(--pof-teal-deep);
}
.footer-action.done svg { color: var(--pof-teal-dark); }
.fa-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 8.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ════════════════════════════════════════════════════════
   FOOTER SHEET (slide-up panel for forms)
   ════════════════════════════════════════════════════════ */
.footer-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}
.footer-sheet:not([hidden]) { pointer-events: auto; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 31, 59, 0.18);
  backdrop-filter: blur(1px);
  opacity: 0;
  transition: opacity .18s ease;
}
.footer-sheet:not([hidden]) .sheet-backdrop { opacity: 1; }

.sheet-body {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 58px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 10px 30px rgba(15, 15, 15, 0.18);
  transform: translateY(8px);
  opacity: 0;
  transition: transform .2s ease, opacity .18s ease;
  max-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
}
.footer-sheet:not([hidden]) .sheet-body {
  transform: translateY(0);
  opacity: 1;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 9px;
  border-bottom: 1px solid var(--border-soft);
}
.sheet-icon {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #E6F4F2;
  color: var(--pof-teal-dark);
  flex-shrink: 0;
}
.sheet-icon svg { width: 13px; height: 13px; stroke-width: 1.9; }
.sheet-title {
  flex: 1;
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.sheet-close {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background .12s, color .12s;
}
.sheet-close:hover { background: var(--bg-soft); color: var(--text); }
.sheet-close svg { width: 14px; height: 14px; }

.sheet-content {
  padding: 12px;
  overflow-y: auto;
}
.sheet-content .panel-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.sheet-content textarea {
  min-height: 90px;
}
.sheet-content .chips { gap: 6px; }

/* ════════════════════════════════════════════════════════
   SIGNATURE SHEET — actions left, attachments right
   ════════════════════════════════════════════════════════ */
.sig-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 480px) {
  .sig-grid { grid-template-columns: 1fr; }
}

.sig-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sig-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--pof-white, #fff);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md, 8px);
  cursor: pointer;
  text-align: left;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  transition: border-color .12s, background .12s, transform .12s, box-shadow .12s;
  width: 100%;
  min-width: 0;
}
.sig-action:hover {
  border-color: var(--pof-teal-dark);
  background: #F1F8F7;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 2px 8px rgba(14,75,71,0.06);
}
.sig-action:active { transform: scale(0.99); }
.sig-action-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #E6F4F2;
  color: var(--pof-teal-deep);
}
.sig-action-icon svg { width: 14px; height: 14px; stroke-width: 1.9; }
.sig-action-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sig-action-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.sig-action-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 400;
  text-wrap: pretty;
}
.sig-action-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xmuted);
  transition: transform .15s, color .12s;
}
.sig-action-arrow svg { width: 13px; height: 13px; stroke-width: 1.9; }
.sig-action:hover .sig-action-arrow { color: var(--pof-teal-deep); transform: translateX(2px); }

/* Right aside : attachment picker */
.sig-aside {
  padding: 10px 0 0;
  border-left: 1px solid var(--border-soft);
  padding-left: 12px;
}
@media (max-width: 480px) {
  .sig-aside { border-left: 0; padding-left: 0; padding-top: 6px; border-top: 1px solid var(--border-soft); }
}
.sig-aside-label {
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.sig-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sig-empty {
  font-size: 11px;
  color: var(--text-xmuted);
  font-style: italic;
  padding: 6px 0;
}
.sig-att {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm, 4px);
  background: var(--pof-white, #fff);
  cursor: pointer;
  transition: border-color .12s, background .12s;
  min-width: 0;
}
.sig-att:hover { border-color: var(--pof-gray-400); background: var(--bg-soft); }
.sig-att:has(input:checked) {
  border-color: var(--pof-teal-dark);
  background: #EAF6F4;
}
.sig-att input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--pof-gray-400);
  border-radius: 3px;
  background: var(--pof-white, #fff);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all .12s;
}
.sig-att input[type="checkbox"]:checked {
  background: var(--pof-teal-dark);
  border-color: var(--pof-teal-dark);
}
.sig-att input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 7px;
  height: 4px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg);
}
.sig-att-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--pof-neutral-mid);
}
.sig-att-icon[data-type="pdf"] { background: #FCE6EA; color: #A02333; }
.sig-att-icon[data-type="doc"] { background: #EAF1FB; color: #3B6FB6; }
.sig-att-icon[data-type="xls"] { background: #E8F6EE; color: #1E9D52; }
.sig-att-icon[data-type="ppt"] { background: #FFF4DC; color: #8A6300; }
.sig-att-icon[data-type="img"] { background: var(--pof-neutral-mid); color: var(--pof-steel); }
.sig-att-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: "Poppins", sans-serif;
}
.sig-att-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.sig-att-size {
  font-size: 9.5px;
  font-weight: 400;
  color: var(--text-xmuted);
}

/* ════════════════════════════════════════════════════════
   CONTENT PANE — Mail summary
   ════════════════════════════════════════════════════════ */
.mail-summary {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 10px 12px;
  position: relative;
}

.ai-source {
  /* Caption tag for AI-generated/sourced data. Uses the reserved purple
     accent (--pof-ai) — pair with .timeline-source for Notion-sourced
     data so the two channels are visually distinct. */
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--pof-ai);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ai-source::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pof-ai);
  flex-shrink: 0;
}

.mail-summary-text {
  font-size: 12.5px;
  color: var(--text-body);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ════════════════════════════════════════════════════════
   ATTACHMENTS
   ════════════════════════════════════════════════════════ */
.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment {
  display: flex;
  gap: 10px;
  padding: 10px 10px 10px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .12s;
}
.attachment:hover { border-color: var(--pof-gray-400); }

.att-icon {
  flex-shrink: 0;
  width: 32px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  position: relative;
}
.att-icon[data-type="pdf"] { background: #FCE6EA; color: #A02333; }
.att-icon[data-type="doc"] { background: #EAF1FB; color: #3B6FB6; }
.att-icon[data-type="xls"] { background: #E8F6EE; color: #1E9D52; }
.att-icon[data-type="ppt"] { background: #FFF4DC; color: #8A6300; }
.att-icon[data-type="img"] { background: var(--pof-neutral-mid); color: var(--pof-steel); }
.att-icon[data-type="other"] { background: var(--pof-neutral-mid); color: var(--text-muted); }

.att-body { flex: 1; min-width: 0; }

.att-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.att-name {
  flex: 1;
  min-width: 0;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.att-name:hover { color: var(--pof-teal-deep); }
.att-size {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  color: var(--text-xmuted);
  flex-shrink: 0;
}

.att-summary {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.att-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.att-foot .notion-pill { margin-left: auto; }
.att-podcast {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .12s;
}
.att-podcast:hover {
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
  background: #F1F8F7;
}
.att-podcast.done {
  background: #E6F4F2;
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
}
.att-podcast svg { width: 11px; height: 11px; stroke-width: 1.9; }

/* ════════════════════════════════════════════════════════
   SOURCES (LinkedIn / web)
   ════════════════════════════════════════════════════════ */
.source-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 7px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  transition: border-color .12s, background .12s;
}
.source-item:hover { border-color: var(--border); background: var(--bg-soft); }

.src-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-muted);
}
.src-icon svg { width: 14px; height: 14px; }
.src-icon[data-type="linkedin"] {
  background: #E7F1F9;
  color: #0A66C2;
}
.src-icon[data-type="web"] {
  background: var(--pof-neutral-mid);
  color: var(--pof-steel);
}

.src-body { flex: 1; min-width: 0; }
.src-name {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.src-name:hover { color: var(--pof-teal-deep); }
.src-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.src-meta {
  font-size: 10px;
  color: var(--text-xmuted);
  margin-top: 1px;
}

.src-action {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px 4px 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.src-action:hover {
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
  background: #F1F8F7;
}
.src-action.watched {
  background: #E6F4F2;
  border-color: var(--pof-teal-dark);
  color: var(--pof-teal-deep);
}
.src-action svg { width: 11px; height: 11px; stroke-width: 1.9; }


/* ════════════════════════════════════════════════════════
   ASK button (situation note header)
   ════════════════════════════════════════════════════════ */
.pn-podcast-btn {
  margin-right: 2px;
}
.pn-podcast-btn svg { stroke-width: 2; }
.pn-ask {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  background: var(--pof-navy);
  color: var(--pof-white);
  border: none;
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .12s, transform .1s;
}
.pn-ask:hover { background: #2A2E55; }
.pn-ask:active { transform: scale(0.97); }
.pn-ask svg { width: 11px; height: 11px; stroke-width: 2; }

/* ASK sheet */
.ask-input-wrap {
  position: relative;
}
.ask-input-wrap textarea { padding-right: 38px; }
.ask-mic {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.ask-mic:hover { background: var(--pof-navy); color: var(--pof-white); border-color: var(--pof-navy); }
.ask-mic svg { width: 13px; height: 13px; stroke-width: 1.9; }
.ask-mic.listening {
  background: var(--pof-coral);
  color: var(--pof-white);
  border-color: var(--pof-coral);
  animation: askPulse 1s ease infinite;
}
@keyframes askPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 84, 108, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(232, 84, 108, 0); }
}

/* ════════════════════════════════════════════════════════
   EXPANDABLE TASK ITEMS (situation note)
   ════════════════════════════════════════════════════════ */
.pn-todo {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md, 8px);
  background: var(--pof-white, #fff);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.pn-todo + .pn-todo { margin-top: 6px; }
.pn-todo:hover {
  background: var(--pof-white, #fff);
  border-color: var(--pof-gray-400);
}
.pn-todo.expanded {
  border-color: var(--pof-teal-dark);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 2px 8px rgba(14,75,71,0.06);
}
.pn-todo.proposed {
  border-style: dashed;
  background: var(--bg-soft);
}
.pn-todo.proposed:hover {
  background: var(--bg-soft);
  border-color: var(--pof-gray-400);
}
.pn-todo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-md, 8px);
  transition: background .12s;
}
.pn-todo-row:hover { background: transparent; }
.pn-todo.expanded .pn-todo-row {
  border-bottom: 1px solid var(--border-soft);
  border-radius: var(--r-md, 8px) var(--r-md, 8px) 0 0;
}

.pn-todo-expand {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-xmuted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.pn-todo-expand:hover { background: var(--bg-soft); color: var(--text); }
.pn-todo-chev {
  width: 11px;
  height: 11px;
  stroke-width: 2;
  transition: transform .15s;
}
.pn-todo.expanded .pn-todo-chev { transform: rotate(180deg); }

.pn-todo-edit {
  display: none;
  padding: 10px 12px 12px;
  font-size: 11px;
  border-radius: 0 0 var(--r-md, 8px) var(--r-md, 8px);
  animation: pnFormSlide .15s ease;
}
.pn-todo.expanded .pn-todo-edit { display: block; }

.pn-todo-desc {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
  text-wrap: pretty;
}

.pn-todo-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}

.pn-todo-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.pn-todo-field > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  flex-shrink: 0;
}
.pn-todo-field > span svg { width: 11px; height: 11px; stroke-width: 1.9; }

.pn-todo-field input[type="date"] {
  flex: 1;
  padding: 3px 6px;
  font-family: "Raleway", sans-serif;
  font-size: 11.5px;
  color: var(--text-body);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  text-transform: none;
}
.pn-todo-field input[type="date"]:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(43,165,149,.15);
}

.pn-todo-assignee {
  display: inline-flex;
  gap: 1px;
  padding: 1px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  flex: 1;
}
.pn-todo-assignee button {
  flex: 1;
  padding: 3px 8px;
  background: transparent;
  border: none;
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-transform: none;
  letter-spacing: 0;
  transition: background .12s, color .12s;
}
.pn-todo-assignee button svg { width: 11px; height: 11px; stroke-width: 1.9; }
.pn-todo-assignee button:hover { color: var(--text); }
.pn-todo-assignee button.selected {
  background: var(--pof-navy);
  color: var(--pof-white);
}

/* The edit-mode prio segment matches the inline create form's look */
.pn-todo-edit .pn-task-prio { flex: 1; }
.pn-todo-edit .pn-task-prio button { font-size: 10px; padding: 3px 7px; }

/* Stacked fields (title, description) — label above input */
.pn-todo-field-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 8px;
}
.pn-todo-field-stack > span {
  width: auto;
  font-size: 9.5px;
}
.pn-todo-field-stack input[type="text"],
.pn-todo-field-stack textarea {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm, 4px);
  font-family: "Raleway", -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-body);
  transition: border-color .12s, background .12s;
  resize: vertical;
}
.pn-todo-field-stack input[type="text"]:focus,
.pn-todo-field-stack textarea:focus {
  outline: none;
  background: var(--pof-white, #fff);
  border-color: var(--pof-teal-dark);
}
.pn-todo-field-stack textarea { min-height: 44px; }

/* ════════════════════════════════════════════════════════
   MINI PODCAST BUTTON (Contenu mail-summary header)
   ════════════════════════════════════════════════════════ */
.mini-podcast-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  background: var(--bg);
  color: var(--pof-teal-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  transition: all .12s;
}
.mini-podcast-btn svg { width: 11px; height: 11px; stroke-width: 1.9; }
.mini-podcast-btn:hover {
  background: #F1F8F7;
  border-color: var(--pof-teal-dark);
}
.mini-podcast-btn.done {
  background: #E6F4F2;
  border-color: var(--pof-teal-dark);
}

/* ════════════════════════════════════════════════════════
   SOURCE — open-link button (visit URL even without watching)
   ════════════════════════════════════════════════════════ */
.src-open {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  background: transparent;
  text-decoration: none;
  transition: background .12s, color .12s, transform .12s;
}
.src-open:hover {
  background: var(--bg-soft);
  color: var(--pof-teal-deep);
  transform: translate(1px, -1px);
}
.src-open svg { width: 12px; height: 12px; stroke-width: 1.9; }


/* ════════════════════════════════════════════════════════
   AI-found text fields (titre, société) — same look as phone
   ════════════════════════════════════════════════════════ */
.cf-text-value {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.cf-text-value.ai-found {
  color: var(--text-muted);
  font-style: italic;
  position: relative;
}
.cf-text-value.ai-found::before {
  content: '~';
  margin-right: 2px;
  opacity: 0.6;
}


/* ════════════════════════════════════════════════════════
   AGENT CHAT DOCK (between scroll and footer)
   ════════════════════════════════════════════════════════ */
.agent-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* Collapsed pill on top of composer */
.agent-thread-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 0 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  text-align: left;
  width: 100%;
  color: var(--text-muted);
  transition: color .12s;
}
.agent-thread-toggle:hover { color: var(--text); }

.agent-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pof-coral);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(232, 84, 108, 0.18);
}

.agent-thread-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.agent-thread-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  flex-shrink: 0;
}
.agent-thread-preview {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  color: var(--text-xmuted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-thread-count {
  flex-shrink: 0;
  background: var(--pof-coral);
  color: var(--pof-white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: var(--r-pill);
}
.agent-thread-chev {
  width: 11px;
  height: 11px;
  stroke-width: 2;
  flex-shrink: 0;
  color: var(--text-xmuted);
  transition: transform .15s;
}
.agent-dock[data-state="open"] .agent-thread-chev { transform: rotate(180deg); }

/* Collapsed state — hide the composer too so the dock takes minimal space.
   Only the toggle pill is visible; clicking it expands thread + composer. */
.agent-dock[data-state="collapsed"] .agent-composer { display: none; }
.agent-dock[data-state="collapsed"] .agent-thread-toggle {
  padding: 9px 12px;
}
.agent-dock[data-state="collapsed"] .agent-thread-toggle:hover {
  background: var(--bg-soft);
}

/* Thread (expanded) */
.agent-thread {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  padding: 8px 12px 4px;
  overflow-y: auto;
  border-bottom: 1px solid var(--border-soft);
}
.agent-thread:empty,
.agent-thread:has(.agent-messages:empty) {
  display: none;
}

.agent-thread-empty {
  padding: 14px 8px 10px;
  font-size: 11.5px;
  color: var(--text-xmuted);
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

.agent-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
  animation: agentFade .2s ease both;
}
@keyframes agentFade {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.agent-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.agent-msg-bubble {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  background: var(--bg-soft);
  color: var(--text-body);
  border: 1px solid var(--border-soft);
  word-wrap: break-word;
  text-wrap: pretty;
}
.agent-msg.user .agent-msg-bubble {
  background: var(--pof-navy);
  color: var(--pof-white);
  border-color: var(--pof-navy);
  border-bottom-right-radius: 3px;
}
.agent-msg.agent .agent-msg-bubble {
  border-bottom-left-radius: 3px;
}

.agent-msg-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 1px;
}
.agent-msg.agent .agent-msg-avatar {
  background: var(--pof-coral);
  color: var(--pof-white);
}
.agent-msg.user .agent-msg-avatar {
  background: var(--bg-soft);
  color: var(--text);
}
.agent-msg-avatar svg { width: 11px; height: 11px; stroke-width: 2; }

.agent-msg.thinking .agent-msg-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.agent-typing {
  display: inline-flex;
  gap: 3px;
}
.agent-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-xmuted);
  animation: agentBounce 1.2s ease infinite;
}
.agent-typing span:nth-child(2) { animation-delay: 0.15s; }
.agent-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes agentBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

/* Composer */
.agent-composer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 8px 8px 12px;
}

.agent-composer textarea {
  flex: 1;
  min-height: 28px;
  max-height: 100px;
  padding: 5px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  font-family: "Raleway", sans-serif;
  font-size: 12.5px;
  color: var(--text-body);
  resize: none;
  line-height: 1.4;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.agent-composer textarea:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43,165,149,.15);
}

.agent-mic,
.agent-send {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s, transform .1s;
}
.agent-mic {
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.agent-mic:hover { background: var(--pof-navy); color: var(--pof-white); border-color: var(--pof-navy); }
.agent-mic.listening {
  background: var(--pof-coral);
  color: var(--pof-white);
  border-color: var(--pof-coral);
  animation: askPulse 1s ease infinite;
}
.agent-mic svg { width: 13px; height: 13px; stroke-width: 1.9; }
.agent-send {
  background: var(--pof-navy);
  color: var(--pof-white);
}
.agent-send:hover { background: #2A2E55; }
.agent-send:active { transform: scale(0.95); }
.agent-send:disabled { opacity: 0.4; cursor: not-allowed; }
.agent-send svg { width: 13px; height: 13px; }


/* ════════════════════════════════════════════════════════
   EMPTY SHELL — sidebar state when no conversation is selected
   ════════════════════════════════════════════════════════ */
.empty-shell {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 32px 18px 22px;
  overflow-y: auto;
}

body.no-conversation .tabs-wrap,
body.no-conversation .scroll,
body.no-conversation .sb-footer { display: none !important; }
body.no-conversation .empty-shell { display: flex; }

/* ── HERO ── */
.es-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 4px 6px 18px;
}
.es-art {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tinted);
  color: var(--pof-steel);
}
.es-art svg { width: 30px; height: 30px; }
.es-title {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-top: 4px;
}
.es-sub {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 250px;
  text-wrap: balance;
}

/* ── CTA + hint ── */
.es-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.es-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px 12px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--pof-navy);
  background: var(--pof-navy);
  color: var(--pof-white);
  font-family: "Poppins", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .15s, transform .08s, box-shadow .15s, opacity .2s;
  box-shadow: 0 1px 0 rgba(28,31,59,.06), 0 4px 14px -8px rgba(28,31,59,.5);
}
.es-cta:hover { background: #2A2E55; }
.es-cta:active { transform: translateY(0.5px); }
.es-cta:disabled { opacity: 0.6; cursor: progress; }

.es-cta-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--pof-teal);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.es-cta-icon svg { width: 17px; height: 17px; stroke-width: 1.9; }

.es-cta-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.es-cta-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
}
.es-cta-sub {
  font-size: 10.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  line-height: 1.4;
}

.es-cta-arrow {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: transform .15s, color .15s;
}
.es-cta-arrow svg { width: 14px; height: 14px; stroke-width: 2; }
.es-cta:hover .es-cta-arrow { transform: translateX(2px); color: var(--pof-teal); }

.es-cta.is-loading .es-cta-arrow svg { animation: spin .65s linear infinite; }
.es-cta.is-done {
  background: var(--pof-teal-deep);
  border-color: var(--pof-teal-deep);
}
.es-cta.is-done .es-cta-icon {
  background: rgba(255,255,255,0.16);
  color: var(--pof-white);
}

.es-action-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-xmuted);
  line-height: 1.45;
  padding: 0 2px;
}
.es-action-hint svg {
  width: 11px; height: 11px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke-width: 1.8;
}

/* ── Spacer pushes report toward the bottom on tall viewports ── */
.es-spacer { flex: 1; min-height: 24px; }

/* ── Last triage report card ── */
.es-report-wrap { margin-top: 8px; }

.es-report-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.es-report-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  padding: 12px 13px 11px;
  transition: border-color .15s, background .15s, transform .08s;
}
.es-report-card:hover {
  border-color: var(--pof-teal-dark);
  background: #F4FAF9;
}
.es-report-card:active { transform: translateY(0.5px); }

.es-report-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 10px;
}
.es-report-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}
.es-report-ext {
  width: 11px; height: 11px;
  color: var(--text-xmuted);
  flex-shrink: 0;
  transition: color .15s, transform .15s;
}
.es-report-card:hover .es-report-ext {
  color: var(--pof-teal-dark);
  transform: translate(1px, -1px);
}
.es-report-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.es-report-date svg {
  width: 10px; height: 10px;
  color: var(--text-xmuted);
}

/* Stats row */
.es-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.es-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 4px;
  position: relative;
}
.es-stat + .es-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 14%;
  width: 1px; height: 72%;
  background: var(--border);
}
.es-stat-num {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.es-stat-archive .es-stat-num { color: var(--pof-steel); }
.es-stat-prio .es-stat-num { color: var(--pof-coral); }
.es-stat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pof-coral);
  box-shadow: 0 0 0 3px rgba(232,84,108,0.14);
}
.es-stat-label {
  font-family: "Poppins", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════
   V3 — Conv. fused : podcast include toggle + editable summary
   ════════════════════════════════════════════════════════ */

/* "Include in podcast briefing" checkbox chip.
   Single visual treatment shared between:
   - .pod-include   → section-label level (résumé)
   - .att-pod-toggle → attachment row level
   Both classes are aliases so the markup stays semantic but the look is
   strictly identical (same chip size, checkbox size, label format). */
.pod-include,
.att-pod-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 5px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  background: var(--pof-white, #fff);
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color .12s, color .12s, background .12s;
}
.pod-include:hover,
.att-pod-toggle:hover { border-color: var(--pof-teal-dark); color: var(--pof-teal-deep); }
.pod-include input[type="checkbox"],
.att-pod-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--pof-gray-400);
  border-radius: 3px;
  background: var(--pof-white, #fff);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
  flex-shrink: 0;
}
.pod-include input[type="checkbox"]:checked,
.att-pod-toggle input[type="checkbox"]:checked {
  background: var(--pof-teal-dark);
  border-color: var(--pof-teal-dark);
}
.pod-include input[type="checkbox"]:checked::after,
.att-pod-toggle input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 4px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translate(0px, -1px);
}
.pod-include:has(input:checked),
.att-pod-toggle:has(input:checked) {
  color: var(--pof-teal-deep);
  border-color: var(--pof-teal-dark);
  background: #EAF6F4;
}

/* Editable summary block */
.summary-edit {
  margin-top: 2px;
}
.summary-edit textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md, 8px);
  background: var(--bg-soft);
  font-family: "Raleway", -apple-system, sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-body);
  resize: vertical;
  transition: border-color .12s, background .12s;
}
.summary-edit textarea:focus {
  outline: none;
  border-color: var(--pof-teal-dark);
  background: var(--pof-white, #fff);
}
.intro-podcast-hint {
  margin-top: 6px;
  font-size: 10.5px;
  font-style: italic;
  color: var(--text-xmuted);
}

/* Attachment row in v3 mode — checkbox replaces per-item podcast button.
   Visual rules live in the shared .pod-include / .att-pod-toggle block above. */

/* V3 attachment row : podcast checkbox aligned right in the foot,
   small arrow button on the right of the name (replaces file size). */
.attachment.v3 .att-foot {
  justify-content: flex-end;
}
.attachment.v3 .att-pod-toggle {
  margin-left: auto;
}
.att-open {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  background: transparent;
  text-decoration: none;
  transition: background .12s, color .12s, transform .12s;
}
.att-open:hover {
  background: var(--bg-soft);
  color: var(--pof-teal-deep);
  transform: translate(1px, -1px);
}
.att-open svg { width: 12px; height: 12px; stroke-width: 1.9; }

/* Big unified "Launch podcast briefing" button —
   Same visual family as .es-cta (inbox triage CTA): navy solid + teal accent
   icon. Keeps the two big AI CTAs visually consistent across the product. */
.podcast-launch {
  margin-top: 18px;
}
.btn-podcast-big {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 12px;
  background: var(--pof-navy);
  color: var(--pof-white);
  border: 1px solid var(--pof-navy);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  transition: background .15s, transform .08s, box-shadow .15s, opacity .2s;
  box-shadow: 0 1px 0 rgba(28,31,59,.06), 0 4px 14px -8px rgba(28,31,59,.5);
}
.btn-podcast-big:hover:not(:disabled) { background: #2A2E55; }
.btn-podcast-big:active { transform: translateY(0.5px); }
.btn-podcast-big:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-podcast-big.done {
  background: var(--pof-teal-deep);
  border-color: var(--pof-teal-deep);
}
.bpb-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--pof-teal);
}
.bpb-icon svg { width: 16px; height: 16px; stroke-width: 1.9; }
.bpb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bpb-title {
  font-family: "Poppins", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
}
.bpb-sub {
  font-family: "Poppins", sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}
.bpb-sub span { color: var(--pof-white); font-weight: 500; }
.bpb-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: transform .15s, color .15s;
}
.bpb-arrow svg { width: 14px; height: 14px; stroke-width: 2; }
.btn-podcast-big:hover .bpb-arrow { transform: translateX(2px); color: var(--pof-teal); }
