/* ============================================================
   GDFG Task Planner v2 — Dedicated Stylesheet
   ============================================================ */

.period-tabs-wrap {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.period-tab-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.period-tab-btn:hover { color: #334155; }
.period-tab-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 600;
}

.period-summary-text {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.4;
  white-space: nowrap;
}

.time-avail-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.time-pills-inline {
  display: flex;
  gap: 4px;
}

.tpi {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid #e2e8f0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.tpi:hover { border-color: #94a3b8; color: #334155; }
.tpi.active { background: #e86040; border-color: #e86040; color: #fff; }

/* Time pills inside the dark nav bar — match period tab sizing */
.p2-section-label-row .time-pills-inline {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 3px;
}
.p2-section-label-row .tpi {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.p2-section-label-row .tpi:hover {
  color: #fff;
}
.p2-section-label-row .tpi.active {
  background: #e86040;
  border-color: #e86040;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.p2-section-label-row .time-avail-label {
  color: rgba(255,255,255,0.5);
}


/* ── Recent Wins grid ────────────────────────────────────── */
.wins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.win-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s, transform 0.15s;
}

.win-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.win-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.win-icon { font-size: 1.6rem; line-height: 1; }

.win-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 99px;
}

.win-stat {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 4px;
}

.win-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.win-detail {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.win-footer {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.win-date {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ── Impact strip bar ────────────────────────────────────── */
.impact-strip-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.impact-strip-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.impact-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.impact-strip::-webkit-scrollbar { display: none; }

.impact-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: border-color 0.15s;
}

.impact-chip:hover { border-color: #94a3b8; }
.ic-icon { font-size: 0.85rem; }
.ic-stat { font-weight: 800; color: #0f172a; }
.ic-label { color: #475569; }
.ic-when { color: #94a3b8; font-size: 0.68rem; }

/* ── Body layout ─────────────────────────────────────────── */
.p2-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p2-row {
  display: grid;
  gap: 12px;
  align-items: start;
}

.p2-row.two-col-6040 { grid-template-columns: 1.5fr 1fr; }
.p2-row.two-col-5050 { grid-template-columns: 1fr 1fr; }
.p2-row.two-col-4060 { grid-template-columns: 2fr auto 3fr; gap: 4px; }

.tasks-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  align-self: center;
  opacity: 0.5;
  flex-shrink: 0;
}

.tasks-separator svg {
  width: 20px;
  height: 36px;
}
.p2-row.row-stretch { align-items: stretch; }
.p2-row.row-stretch > .p2-section-card { height: 100%; display: flex; flex-direction: column; }
.p2-row.row-stretch > .p2-section-card .priority-list-v2 { flex: 1; max-height: none; }

/* ── Section cards ───────────────────────────────────────── */
.p2-section-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
}

.p2-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
  flex-wrap: wrap;
}

.p2-section-header h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1px;
}

.p2-section-header p {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

.data-source-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #059669;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Floating chat popup ─────────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1e1b4b, #4f46e5);
  border: none;
  border-radius: 99px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(79,70,229,0.4);
  z-index: 200;
  transition: transform 0.15s, box-shadow 0.15s;
}

.chat-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(79,70,229,0.5);
}

.chat-fab-icon { font-size: 1.1rem; }

.chat-popup {
  position: fixed;
  bottom: 76px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  z-index: 199;
  overflow: hidden;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-popup.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}

.chat-popup-title-wrap {
  flex: 1;
  min-width: 0;
}

.chat-popup-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.chat-popup-sub {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
}

.chat-popup-close {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-popup-close:hover { background: #e2e8f0; }

/* ── Shared AI avatar ────────────────────────────────────── */
.ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e1b4b, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

/* (Legacy inline card — kept for safety but not used in new layout) */
.ai-focus-card {
  display: none;
}

.ai-live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  max-height: 320px;
}

.chat-scroll::-webkit-scrollbar { width: 3px; }
.chat-scroll::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

.chat-msg {
  max-width: 92%;
  font-size: 0.83rem;
  line-height: 1.55;
}

.chat-msg.ai {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px 12px 12px 12px;
  padding: 10px 14px;
  color: #334155;
  align-self: flex-start;
}

.chat-msg.user {
  background: #1e1b4b;
  color: #e0e7ff;
  border-radius: 12px 4px 12px 12px;
  padding: 10px 14px;
  align-self: flex-end;
}

.chat-msg.ai .ai-insight {
  display: block;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.chat-msg.ai ul {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-msg.ai ul li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font-size: 0.78rem;
  color: #334155;
}

.chat-task-info { flex: 1; }
.chat-task-title { font-weight: 600; color: #0f172a; display: block; }
.chat-task-why   { color: #64748b; font-size: 0.72rem; display: block; margin-top: 1px; }
.chat-task-time  { font-size: 0.68rem; color: #94a3b8; white-space: nowrap; padding-top: 2px; }

.chat-add-btn {
  padding: 3px 8px;
  background: #e86040;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-add-btn:hover { background: #d4512f; }
.chat-add-btn.added { background: #10b981; }

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px 12px 12px 12px;
  align-self: flex-start;
  width: fit-content;
}

.typing-dot {
  width: 5px; height: 5px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
}

.chat-chip {
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.chat-chip:hover { border-color: #e86040; color: #e86040; background: #fff5f2; }

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
}

.chat-input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.83rem;
  font-family: inherit;
  color: #334155;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input:focus { border-color: #6366f1; }

.chat-send {
  width: 36px; height: 36px;
  background: #1e1b4b;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-send:hover { background: #312e81; }

/* ── Impact panel (legacy, hidden) ───────────────────────── */
.impact-panel { display: none; }
.impact-cards-scroll { display: none; }

/* ── Eisenhower Matrix ───────────────────────────────────── */
.ew-axis-labels {
  padding: 0 20px 8px;
}

.ew-axis-x {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.ew-period-label {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 8px;
  background: #f1f5f9;
  border-radius: 99px;
}

.p2-section-card.ew-card {
  display: flex;
  flex-direction: column;
}

.p2-section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #0f172a;
  border-radius: 12px;
  padding: 12px 20px;
  margin-top: 8px;
  min-height: 56px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Decorative circles on the Today's Plan bar */
.plan-bar::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,96,64,0.35) 0%, transparent 70%);
  top: -40px;
  left: 160px;
  pointer-events: none;
}

.plan-bar::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.2) 0%, transparent 70%);
  top: -20px;
  left: 260px;
  pointer-events: none;
}

.p2-section-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
}

.p2-section-label-row .period-tabs-wrap {
  background: rgba(255,255,255,0.1);
}

.p2-section-label-row .period-tab-btn {
  color: rgba(255,255,255,0.6);
}

.p2-section-label-row .period-tab-btn:hover {
  color: #fff;
}

.p2-section-label-row .period-tab-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ew-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e2e8f0;
  margin: 8px 10px 10px;
  border-radius: 10px;
  overflow: hidden;
  flex: 1;
}

.ew-q {
  padding: 0 0 10px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
}

.ew-q.do-now   { background: #fff5f5; }
.ew-q.schedule { background: #f0fdf4; }
.ew-q.delegate { background: #fffbeb; }
.ew-q.drop     { background: #f8fafc; }

/* Quadrant header bands */
.ew-q-header {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px 6px;
  margin-bottom: 6px;
}

.ew-q.do-now   .ew-q-header { background: #fee2e2; border-bottom: 1px solid #fecaca; }
.ew-q.schedule .ew-q-header { background: #dcfce7; border-bottom: 1px solid #bbf7d0; }
.ew-q.delegate .ew-q-header { background: #fef9c3; border-bottom: 1px solid #fde68a; }
.ew-q.drop     .ew-q-header { background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }

.ew-q-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: #0f172a;
}

.ew-q.do-now .ew-q-title { font-size: 0.78rem; color: #991b1b; }

.ew-q-sub {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 500;
}

.ew-task-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
  flex: 1;
}

.ew-empty {
  font-size: 0.75rem;
  color: #cbd5e1;
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

/* ── Priority List v2 ────────────────────────────────────── */
.priority-list-v2 {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 440px;
  overflow-y: auto;
}

.priority-list-v2::-webkit-scrollbar { width: 3px; }
.priority-list-v2::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

/* Rank 1 — maximum prominence */
.pli-item.rank-1 {
  background: linear-gradient(135deg, #fff8f6, #fff5f2);
  border: 1.5px solid #fda89a;
  border-left: 4px solid #e86040;
  padding: 10px 12px;
}

.pli-item.rank-1 .pli-title {
  font-size: 0.9rem;
  color: #1e293b;
}

.pli-item.rank-1 .pli-why-text {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Rank 2-3 — secondary prominence */
.pli-item.rank-2,
.pli-item.rank-3 {
  border-left: 3px solid #f97316;
}

.pli-item.rank-2 .pli-why-text,
.pli-item.rank-3 .pli-why-text { display: none; }

/* Rank 4+ — quiet */
.pli-item.rank-low {
  opacity: 0.8;
}

.pli-item.rank-low .pli-why-text { display: none; }

/* Focus Hero ── */
.focus-hero {
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 45%, #e86040 100%);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px rgba(185, 28, 28, 0.35);
  position: relative;
  overflow: hidden;
}

.focus-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.focus-hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fecaca;
  white-space: nowrap;
  flex-shrink: 0;
}

.focus-hero-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
  min-width: 160px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.focus-hero-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(0,0,0,0.15);
  padding: 4px 10px;
  border-radius: 99px;
}

.focus-hero-why {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  flex-basis: 100%;
  line-height: 1.5;
  margin-top: -4px;
  display: none;
}

.focus-hero-btn {
  padding: 9px 18px;
  background: #fff;
  border: none;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.focus-hero-btn:hover { background: #fff7f5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.focus-hero-btn:disabled { background: rgba(255,255,255,0.3); color: #fff; cursor: default; transform: none; box-shadow: none; }
.focus-hero-btn:disabled::before { content: '✓ '; }

/* ── Today's Plan ────────────────────────────────────────── */
.plan-card { display: flex; flex-direction: column; min-height: 280px; }

/* Drag-to-triage visual feedback (from priority list) */
.is-dragging .ew-card {
  outline: 2px dashed #c7d2fe;
  outline-offset: -2px;
}

/* Drag-to-plan visual feedback */
.is-dragging .plan-card {
  outline: 2px dashed #c7d2fe;
  outline-offset: -2px;
}
.plan-card.plan-drop-target {
  outline: 2px dashed #6366f1;
  outline-offset: -2px;
  background: rgba(99, 102, 241, 0.04);
}


/* Time available row — inside Today's Plan card */
.plan-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sync-cal-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.sync-cal-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

.plan-budget-wrap {
  padding: 10px 14px 16px;
}

.plan-budget-track {
  position: relative;
  height: 36px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.plan-budget-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 10px;
  transition: width 0.5s ease, background 0.4s;
}

.plan-budget-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.01em;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
}

.plan-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.plan-list {
  flex: 1;
  padding: 4px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 80px;
}

.plan-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 20px;
  gap: 8px;
  color: #94a3b8;
}

.plan-list > .plan-empty {
  flex: 1;
}

.plan-empty-illustration {
  width: 140px;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 12px rgba(232,96,64,0.12));
}

.plan-empty-illustration svg {
  width: 100%;
  height: auto;
}

.plan-empty-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
  line-height: 1.4;
}

.plan-autofill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: linear-gradient(135deg, #1e1b4b, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(79,70,229,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  margin: 4px 0 2px;
}

.plan-autofill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79,70,229,0.4);
}

.plan-empty-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
}

.plan-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: box-shadow 0.15s;
}

.plan-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }

/* First plan item gets extra prominence */
.plan-item:first-child {
  border-color: #e86040;
  border-left: 4px solid #e86040;
  background: linear-gradient(135deg, #fff8f6, #fff);
}

.plan-item-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-item:first-child .plan-item-rank {
  background: #e86040;
  color: #fff;
}

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

.plan-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
  line-height: 1.3;
}

.plan-item-why {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 5px;
}

.plan-item-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-item-cat {
  font-size: 0.63rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 99px;
  background: #f1f5f9;
  color: #475569;
}

.plan-item-time {
  font-size: 0.63rem;
  color: #94a3b8;
}

.plan-item-impact {
  font-size: 0.63rem;
  font-weight: 600;
}

.plan-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.plan-item-go {
  display: inline-block;
  padding: 5px 10px;
  background: #1e1b4b;
  color: #fff;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}

.plan-item-go:hover { background: #312e81; transform: translateY(-1px); }

.plan-item:first-child .plan-item-go {
  background: #e86040;
}

.plan-item:first-child .plan-item-go:hover { background: #d4512f; }

.plan-item-remove {
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}

.plan-item-remove:hover {
  border-color: #fca5a5;
  color: #dc2626;
  background: #fee2e2;
}

.plan-fits-section {
  border-top: 1px solid #f1f5f9;
  padding: 8px 8px 10px;
}

.plan-fits-section.plan-fits-full {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fef2f2;
  border-top-color: #fecaca;
}

.plan-fits-section.plan-fits-full .plan-fits-header {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 2px;
}

.plan-fits-section.plan-fits-complete {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0fdf4;
  border-top-color: #bbf7d0;
}

.plan-fits-section.plan-fits-ready {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  border-top-color: #c7d2fe;
}

.plan-fits-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 5px;
  padding: 0 2px;
}

.plan-fits-section.plan-fits-suggestions {
  display: flex !important;
  flex-direction: column;
  background: #f0f9ff;
  border-top-color: #bae6fd;
}

.plan-fits-section.plan-fits-suggestions .plan-fits-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.plan-fits-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

.plan-fits-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plan-fits-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px dashed #e2e8f0;
  background: #fafafa;
  transition: background 0.15s, border-color 0.15s;
}

.plan-fits-item:hover { background: #fff; border-color: #cbd5e1; }

.plan-fits-title {
  flex: 1;
  font-size: 0.75rem;
  color: #475569;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-fits-time {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* ── Add buttons (on Eisenhower + Priority items) ────────── */
.task-add-btn {
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}

.task-add-btn:hover { border-color: #e86040; color: #e86040; background: #fff5f2; }
.task-add-btn.in-plan { background: #f0fdf4; border-color: #86efac; color: #16a34a; cursor: default; }

.priority-item-v2 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  background: #fafafa;
  transition: background 0.15s, border-color 0.15s;
}

.priority-item-v2:hover { background: #fff; border-color: #e2e8f0; }

.priority-rank-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.priority-rank-badge.rank-1 { background: #fef2f2; color: #ef4444; }
.priority-rank-badge.rank-2 { background: #fff7ed; color: #f97316; }
.priority-rank-badge.rank-3 { background: #fefce8; color: #eab308; }
.priority-rank-badge.rank-n { background: #f1f5f9; color: #64748b; }

.priority-item-v2-body { flex: 1; min-width: 0; }

.priority-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 3px;
}

.priority-item-why {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 6px;
}

.priority-item-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.prio-cat-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: #f1f5f9;
  color: #475569;
}

.prio-time-tag {
  font-size: 0.65rem;
  color: #94a3b8;
}

.priority-impact-bar-wrap {
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.priority-impact-bar {
  width: 4px;
  border-radius: 99px;
  background: #10b981;
  transition: height 0.3s ease;
}

.priority-impact-label {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ── Now & Next panel ────────────────────────────────────── */
.now-next-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.now-next-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #f1f5f9;
}

.nn-badge {
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.nn-badge.now  { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.nn-badge.next { background: #f0f9ff; color: #0ea5e9; border: 1px solid #bae6fd; }
.nn-badge.later { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.nn-body { flex: 1; }
.nn-title { font-size: 0.83rem; font-weight: 600; color: #1e293b; margin-bottom: 3px; }
.nn-why   { font-size: 0.73rem; color: #475569; line-height: 1.4; }
.nn-meta  { font-size: 0.68rem; color: #94a3b8; margin-top: 4px; }

/* ── Mini period tabs (inside priority section) ──────────── */
.mini-period-tabs {
  display: flex;
  gap: 2px;
  background: #f8fafc;
  border-radius: 7px;
  padding: 3px;
  flex-shrink: 0;
}

.mpt {
  padding: 4px 10px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.mpt:hover { color: #334155; }
.mpt.active { background: #fff; color: #0f172a; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* ── Top 5 Metrics (human readable) ─────────────────────── */
.metrics5-list {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.metrics5-loading {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

.metric5-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid #f8fafc;
}

.metric5-item:last-child { border-bottom: none; }

.metric5-num {
  width: 20px;
  height: 20px;
  background: #f1f5f9;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.metric5-body { flex: 1; }

.metric5-value {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 2px;
}

.metric5-text {
  font-size: 0.73rem;
  color: #475569;
  line-height: 1.4;
}

.metric5-source {
  font-size: 0.63rem;
  color: #94a3b8;
  margin-top: 2px;
  display: block;
}

/* ── Suggestions v2 ──────────────────────────────────────── */
.suggestions-v2 {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 440px;
  overflow-y: auto;
}

.suggestions-v2::-webkit-scrollbar { width: 3px; }
.suggestions-v2::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }

.suggest-card-v2 {
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fafafa;
  transition: background 0.15s, border-color 0.15s;
}

.suggest-card-v2:hover { background: #fff; border-color: #e2e8f0; }

.suggest-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.suggest-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.suggest-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.suggest-detail {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 10px;
}

.suggest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggest-effort-impact {
  display: flex;
  gap: 6px;
}

.effort-pill, .impact-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.effort-pill { background: #f1f5f9; color: #64748b; }
.impact-pill.high   { background: #ecfdf5; color: #059669; }
.impact-pill.medium { background: #fff7ed; color: #c2410c; }

.suggest-action-btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.suggest-action-btn:hover { background: #1e1b4b; color: #fff; border-color: #1e1b4b; }

/* ── Summary Table v2 ────────────────────────────────────── */
.summary-v2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.summary-v2-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.summary-v2-table th:hover { color: #475569; }

.summary-v2-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #fafafa;
  vertical-align: middle;
  color: #475569;
}

.summary-v2-table tr:last-child td { border-bottom: none; }
.summary-v2-table tbody tr:hover td { background: #fafafa; }

.st-task-name { font-weight: 600; color: #1e293b; display: block; }
.st-task-why  { font-size: 0.72rem; color: #94a3b8; display: block; margin-top: 1px; }

.st-priority-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.st-priority-pill.critical { background: #fef2f2; color: #dc2626; }
.st-priority-pill.high     { background: #fff7ed; color: #c2410c; }
.st-priority-pill.medium   { background: #eef2ff; color: #4338ca; }
.st-priority-pill.low      { background: #f1f5f9; color: #64748b; }

.st-impact-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.st-impact-track {
  width: 48px;
  height: 5px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.st-impact-fill {
  height: 100%;
  border-radius: 99px;
  background: #10b981;
}

.st-period-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.st-status-select {
  font-size: 0.72rem;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 7px;
  background: #fafafa;
  color: #475569;
  cursor: pointer;
}

.table-sort-label {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}

.table-sort-label span { color: #475569; font-weight: 600; }

/* ── Plan body: side-by-side on large screens ───────────── */
@media (min-width: 900px) {
  .plan-body {
    flex-direction: row;
    align-items: stretch;
  }

  .plan-list {
    flex: 1;
    border-right: 1px solid #f1f5f9;
  }

  .plan-fits-section {
    width: 50%;
    flex-shrink: 0;
    border-top: none;
    border-left: 1px solid #f1f5f9;
    padding: 10px 12px;
  }

  .plan-fits-section.plan-fits-full {
    border-left-color: #fecaca;
  }

  .plan-fits-section.plan-fits-complete {
    border-left-color: #bbf7d0;
  }

  .plan-fits-section.plan-fits-ready {
    border-left-color: #c7d2fe;
  }

  .plan-fits-section.plan-fits-suggestions {
    border-left-color: #bae6fd;
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .p2-row.two-col-6040,
  .p2-row.two-col-5050 { grid-template-columns: 1fr; }
  .p2-body { padding: 10px 14px 16px; }
  .period-bar-inner { padding: 8px 14px; }
  .impact-strip-bar { padding: 6px 14px; }
  .chat-popup { width: calc(100vw - 32px); right: 16px; }
  .wins-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
  .p2-row.two-col-4060 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .chat-fab { padding: 12px 20px; font-size: 0.85rem; }
}

@media (max-width: 700px) {
  .wins-grid { grid-template-columns: 1fr; }
  .ew-grid { grid-template-columns: 1fr; margin: 6px 8px 8px; }
  .period-bar-right { display: none; }
  .chat-fab { bottom: 16px; right: 16px; padding: 11px 18px; font-size: 0.8rem; gap: 7px; }
  .chat-fab-icon { font-size: 1rem; }
  .chat-popup { bottom: 66px; right: 16px; height: 70vh; }
}

/* ── Impact card (JS-rendered) ───────────────────────────── */
.impact-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #fafafa;
  transition: background 0.15s, border-color 0.15s;
}
.impact-card:hover { background: #fff; border-color: #e2e8f0; }
.impact-card-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.impact-card-body { flex: 1; min-width: 0; }
.impact-stat-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.impact-stat { font-size: 1.4rem; font-weight: 800; color: #0f172a; letter-spacing: -0.02em; line-height: 1; }
.impact-stat-label { font-size: 0.78rem; font-weight: 600; color: #475569; }
.impact-detail { font-size: 0.75rem; color: #64748b; line-height: 1.5; margin-bottom: 6px; }
.impact-meta { display: flex; align-items: center; gap: 8px; }
.impact-date { font-size: 0.68rem; color: #94a3b8; }
.impact-tag {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: #f1f5f9; color: #475569;
}

/* ── Eisenhower task items (JS-rendered) ─────────────────── */
.ew-task-item {
  background: #fff;
  border-radius: 7px;
  padding: 6px 8px 6px 4px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, opacity 0.15s;
  cursor: grab;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.ew-task-item:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.ew-task-item:active { cursor: grabbing; }
.ew-task-item.dragging { opacity: 0.35; box-shadow: none; }

.ew-drag-handle {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.4;
  flex-shrink: 0;
  user-select: none;
  padding-top: 1px;
}

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

/* Drop zone highlight */
.ew-q.drag-over {
  outline: 2px dashed #6366f1;
  outline-offset: -3px;
  border-radius: 0;
}
.ew-q.drag-over .ew-q-header { opacity: 0.6; }

.ew-drop-hint {
  border: 1px dashed #e2e8f0;
  border-radius: 7px;
  padding: 10px;
  text-align: center;
  font-style: italic;
}
.ew-task-item .ew-task-title {
  font-size: 0.78rem; font-weight: 600; color: #1e293b;
  white-space: normal; overflow: visible; text-overflow: unset;
  display: block; margin-bottom: 4px;
}
.ew-task-meta { display: flex; align-items: center; gap: 6px; }
.ew-task-meta .task-add-btn { margin-left: auto; }
.svc-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ew-task-cat {
  font-size: 0.65rem; font-weight: 600; padding: 2px 6px;
  border-radius: 99px; background: #f1f5f9; color: #475569;
}
.ew-task-time { font-size: 0.65rem; color: #94a3b8; }
.ew-task-item.priority-critical { border-left: 3px solid #ef4444; }
.ew-task-item.priority-high     { border-left: 3px solid #f97316; }
.ew-task-item.priority-medium   { border-left: 3px solid #6366f1; }
.ew-task-item.priority-low      { border-left: 3px solid #cbd5e1; }

/* ── Priority list items (JS-rendered .pli-*) ────────────── */
.pli-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  border: 1px solid #f1f5f9; background: #fafafa;
  transition: background 0.15s, border-color 0.15s;
  cursor: grab;
}
.pli-item:hover { background: #fff; border-color: #e2e8f0; }
.pli-item.dragging { opacity: 0.35; cursor: grabbing; }
.pli-drag-handle {
  color: #cbd5e1; font-size: 1rem; flex-shrink: 0;
  margin-top: 2px; line-height: 1; cursor: grab;
  user-select: none;
}
.pli-rank {
  width: 22px; height: 22px; border-radius: 6px;
  background: #f1f5f9; color: #64748b;
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.pli-body { flex: 1; min-width: 0; }
.pli-title { font-size: 0.85rem; font-weight: 600; color: #1e293b; margin-bottom: 3px; }
.pli-why { font-size: 0.75rem; color: #475569; line-height: 1.4; margin-bottom: 6px; }
.pli-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pli-cat {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: #f1f5f9; color: #475569;
}
.pli-time { font-size: 0.65rem; color: #94a3b8; }
.pli-impact { font-size: 0.65rem; font-weight: 600; }
.pli-priority {
  font-size: 0.65rem; font-weight: 700; padding: 3px 8px;
  border-radius: 99px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.pli-p-critical { background: #fef2f2; color: #dc2626; }
.pli-p-high     { background: #fff7ed; color: #c2410c; }
.pli-p-medium   { background: #eef2ff; color: #4338ca; }
.pli-p-low      { background: #f1f5f9; color: #64748b; }
.priority-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 0.82rem; }

/* ── Now & Next items (JS-rendered .nn-*) ────────────────── */
.nn-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  border: 1px solid #f1f5f9;
  transition: background 0.15s, border-color 0.15s;
}
.nn-item:hover { background: #fafafa; }
.nn-item.nn-now {
  background: #fff5f5; border-color: #fecaca;
}
.nn-badge-wrap { flex-shrink: 0; padding-top: 2px; }
.nn-now-badge {
  display: inline-block; padding: 3px 8px;
  background: #fef2f2; color: #ef4444;
  border: 1px solid #fecaca; border-radius: 99px;
  font-size: 0.65rem; font-weight: 700;
}
.nn-next-badge {
  display: inline-block; padding: 3px 8px;
  background: #f0f9ff; color: #0ea5e9;
  border: 1px solid #bae6fd; border-radius: 99px;
  font-size: 0.65rem; font-weight: 700;
}
.nn-content { flex: 1; min-width: 0; }
.nn-title { font-size: 0.83rem; font-weight: 600; color: #1e293b; margin-bottom: 3px; }
.nn-meta { font-size: 0.68rem; color: #94a3b8; display: flex; gap: 8px; flex-wrap: wrap; }
.nn-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 0.82rem; }

/* ── Top 5 Metrics (JS-rendered .m5-*) ──────────────────── */
.m5-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 8px; border-bottom: 1px solid #f8fafc;
}
.m5-item:last-child { border-bottom: none; }
.m5-rank {
  width: 24px; height: 24px; background: #f1f5f9;
  border-radius: 6px; font-size: 0.7rem; font-weight: 700;
  color: #64748b; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.m5-body { flex: 1; min-width: 0; }
.m5-label { font-size: 0.72rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.m5-value { font-size: 1.3rem; font-weight: 800; color: #0f172a; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 4px; }
.m5-context { font-size: 0.75rem; color: #475569; line-height: 1.45; }
.m5-trend {
  width: 28px; height: 28px; border-radius: 8px;
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 4px;
}
.m5-trend-up     { background: #ecfdf5; color: #059669; }
.m5-trend-down   { background: #fef2f2; color: #dc2626; }
.m5-trend-neutral { background: #f1f5f9; color: #64748b; }

/* ── Suggestion cards (JS-rendered .sc2-*) ───────────────── */
.sc2-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.suggest-card-v2 { display: flex; gap: 10px; }
.sc2-body { flex: 1; min-width: 0; }
.sc2-title { font-size: 0.83rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; line-height: 1.3; }
.sc2-text { font-size: 0.75rem; color: #475569; line-height: 1.5; margin-bottom: 8px; }
.sc2-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.sc2-effort {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: #f1f5f9; color: #64748b;
}
.sc2-impact {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: #ecfdf5; color: #059669;
}
.sc2-tag {
  font-size: 0.65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: #eef2ff; color: #4338ca;
}

/* ── Summary table cells (JS-rendered .st-*) ─────────────── */
.st-title-cell { font-weight: 600; color: #1e293b; max-width: 260px; }
.st-cat-badge {
  font-size: 0.68rem; font-weight: 600; padding: 2px 7px;
  border-radius: 99px; background: #f1f5f9; color: #475569; white-space: nowrap;
}
.st-priority {
  font-size: 0.68rem; font-weight: 700; padding: 3px 8px;
  border-radius: 99px; white-space: nowrap;
}
.st-p-critical { background: #fef2f2; color: #dc2626; }
.st-p-high     { background: #fff7ed; color: #c2410c; }
.st-p-medium   { background: #eef2ff; color: #4338ca; }
.st-p-low      { background: #f1f5f9; color: #64748b; }
.st-impact {
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.st-impact-high   { color: #059669; }
.st-impact-medium { color: #d97706; }
.st-impact-low    { color: #94a3b8; }
.st-quadrant { font-size: 0.72rem; white-space: nowrap; color: #475569; }

/* ── Typing indicator (JS-rendered) ─────────────────────── */
.typing-indicator {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px;
}
.typing-indicator span {
  width: 5px; height: 5px;
  background: #94a3b8; border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* ── Chat text formatting ────────────────────────────────── */
.chat-bullet { color: #e86040; font-weight: 700; }
.chat-num    { color: #6366f1; font-weight: 700; }
