/* ═══════════════════════════════════════════════════════════════════
   EXTENSIONS: offer grid · stat tiles · chat · pipeline · voice mic · reflection
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Offer grid on landing ─── */
.offer-section h2 { margin-bottom: 8px; }
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.offer-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 26px;
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.offer-num {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.offer-item h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 8px;
  color: var(--midnight);
}
.offer-item p { font-size: 14px; color: var(--charcoal); margin-bottom: 0; }

/* ─── Stat tracker tiles on dashboard ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-tile {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  border: 1px solid var(--line);
  position: relative;
}
.stat-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--midnight);
  font-weight: 700;
  line-height: 1;
}
.stat-of {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 2px;
}
.stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ─── Quick grid (dashboard shortcuts) ─── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.quick-tile {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  border: 1px solid var(--line);
  position: relative;
  text-decoration: none;
  color: var(--charcoal);
  transition: border-color 0.15s ease, transform 0.15s ease;
  display: block;
  cursor: pointer;
}
.quick-tile:hover { border-color: var(--gold); transform: translateY(-2px); border-bottom: 1px solid var(--gold); }
.quick-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
.quick-title {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--midnight);
  font-weight: 600;
  margin-bottom: 4px;
}
.quick-sub { font-size: 12px; color: var(--muted); }
.quick-arrow {
  position: absolute;
  top: 20px;
  right: 22px;
  color: var(--muted);
  font-size: 18px;
}
.quick-tile:hover .quick-arrow { color: var(--gold); }
.quick-tile-form { display: contents; }
.quick-tile-form button { width: 100%; cursor: pointer; }

/* ─── Chat ─── */
.chat-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
  border-top: 2px solid var(--gold);
}
.chat-scroll {
  min-height: 300px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.chat-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 85%;
}
.chat-user { align-self: flex-end; align-items: flex-end; }
.chat-compass { align-self: flex-start; align-items: flex-start; }
.chat-role {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.chat-user .chat-role { color: var(--sapphire); }
.chat-bubble {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.6;
}
.chat-user .chat-bubble {
  background: var(--sapphire);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-compass .chat-bubble {
  background: var(--pearl-2);
  color: var(--charcoal);
  border-bottom-left-radius: 4px;
}
.chat-bubble p { margin-bottom: 8px; color: inherit; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-time { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.chat-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.chat-form .textarea-wrap { flex: 1; }
.chat-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  background: var(--white);
  outline: none;
  resize: vertical;
}
.chat-form textarea:focus { border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08); }

/* ─── Voice mic button ─── */
.textarea-wrap { position: relative; }
.textarea-wrap textarea { padding-right: 100px; }
.mic-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: var(--pearl-2);
  border: 1px solid var(--line-2);
  color: var(--charcoal);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: var(--font-body);
}
.mic-btn:hover { background: var(--gold); color: var(--midnight); border-color: var(--gold); }
.mic-btn.listening { background: var(--error); color: var(--white); border-color: var(--error); animation: mic-pulse 1.2s ease-out infinite; }
@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(185, 28, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0); }
}
.mic-icon { font-size: 14px; }

/* ─── Pipeline ─── */
.pipeline-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.pipeline-metric {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--sapphire);
  text-align: center;
}
.pm-num { font-family: var(--font-display); font-size: 28px; color: var(--midnight); font-weight: 700; }
.pm-label { font-size: 10px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; margin-top: 4px; }

.pipeline-add-form { margin-top: 12px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 160px;
  gap: 12px;
  margin-bottom: 16px;
}
.field-col label, .field label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.field-col input, .field input[type="text"], .field input[type="date"], .field input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--charcoal);
  background: var(--white);
  outline: none;
}
.field-col input:focus, .field input:focus { border-color: var(--sapphire); }

.pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
.pipeline-row {
  display: grid;
  grid-template-columns: 1fr 140px 150px 100px 32px;
  gap: 12px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  border-left: 3px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.status-contacted { border-left-color: var(--muted); }
.status-replied { border-left-color: var(--sapphire); }
.status-in_conversation { border-left-color: var(--gold); }
.status-won { border-left-color: var(--success); background: rgba(5, 150, 105, 0.03); }
.status-lost { border-left-color: var(--error); opacity: 0.65; }
.status-ghosted { border-left-color: var(--muted); opacity: 0.5; }
.p-name { font-family: var(--font-display); font-weight: 600; color: var(--midnight); font-size: 15px; }
.p-context { font-size: 12px; color: var(--muted); }
.p-date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.p-status-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--white);
  font-size: 12px;
  cursor: pointer;
}
.p-value-form input { width: 100%; padding: 8px 10px; font-size: 12px; }
.p-value-placeholder { width: 100%; }
.p-delete {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.p-delete:hover { border-color: var(--error); color: var(--error); }
.p-notes-row {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  margin-top: 4px;
}
.p-notes { font-size: 13px; color: var(--charcoal); font-style: italic; }

/* ─── Reflection page ─── */
.reflection-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 52px;
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--gold);
  margin-top: 20px;
}
.reflection-body h2 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--midnight);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.reflection-body h3 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 24px;
  margin-bottom: 10px;
}
.reflection-body p { font-size: 15px; color: var(--charcoal); margin-bottom: 8px; }
.reflection-body .ref-bullet { padding-left: 12px; color: var(--charcoal); }
.reflection-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 14px 20px;
  margin: 16px 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 18px;
  background: rgba(201, 169, 97, 0.05);
  border-radius: 0 6px 6px 0;
}

/* ─── Mobile pipeline ─── */
@media (max-width: 900px) {
  .pipeline-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; }
  .field-row { grid-template-columns: 1fr; }
  .p-meta { display: flex; gap: 14px; }
}
