@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
  --primary: #80CBC4;
  --primary-light: #4DB6AC;
  --primary-soft: #26A69A;
  --secondary: #00897B;
  --accent: #E0F2F1;
  --accent-soft: #EEF0FF;
  --success: #16A34A;
  --success-soft: #DCFCE7;
  --warning: #EA580C;
  --warning-soft: #FFF7ED;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --muted: #94A3B8;
  --muted-soft: #F1F5F9;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
}

::selection {
  background: var(--accent);
  color: white;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== APP SHELL ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.header-inner {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.app-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.title-dot {
  color: var(--accent);
}

.app-subtitle {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-add {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

.btn-add:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

/* ===== TAB BAR ===== */
.tab-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 24px;
  gap: 4px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-icon {
  font-size: 1rem;
}

/* ===== MAIN ===== */
.app-main {
  flex: 1;
  padding: 24px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ===== CONTACT LIST ===== */
.list-toolbar {
  margin-bottom: 20px;
}

.search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  opacity: 0.5;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--muted-soft);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-row {
  display: flex;
  gap: 10px;
}

.filter-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== CONTACT CARDS ===== */
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: cardSlideIn 0.35s ease both;
  position: relative;
}

.contact-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.contact-card.urgency-cold {
  border-left: 3px solid var(--warning);
}

.contact-card.urgency-never {
  border-left: 3px solid var(--muted);
}

.contact-card.urgency-warm {
  border-left: 3px solid var(--accent);
}

.contact-card.urgency-fresh {
  border-left: 3px solid var(--success);
}

.card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

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

.card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.card-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card-email {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
}

.days-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-fresh {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warm {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-cold {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-never {
  background: var(--muted-soft);
  color: var(--muted);
}

.card-edit-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.contact-card:hover .card-edit-btn {
  opacity: 0.6;
}

.card-edit-btn:hover {
  opacity: 1 !important;
  background: var(--muted-soft);
}

.list-footer {
  margin-top: 16px;
  text-align: center;
}

.list-count {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ===== SKELETONS ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-row, .skeleton-card {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius);
}

.skeleton-row {
  height: 72px;
  margin-bottom: 8px;
}

.contact-list-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.skeleton-card {
  height: 100px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-light);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--muted-soft);
  color: var(--text);
}

/* ===== FORM ===== */
.contact-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--muted-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--border-light);
  border-color: var(--text-light);
}

.btn-success {
  background: var(--success);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-success:hover {
  background: #15803d;
}

.btn-danger-outline {
  background: none;
  color: var(--danger);
  border: 1px solid var(--danger-soft);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-outline:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ===== DETAIL MODAL ===== */
.detail-modal {
  max-width: 500px;
}

.detail-body {
  padding: 24px;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.detail-identity {
  flex: 1;
}

.detail-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.detail-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.detail-badge {
  display: inline-block;
  margin-top: 6px;
}

.detail-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.detail-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.field-icon {
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.field-content {
  display: flex;
  flex-direction: column;
}

.field-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

.field-value {
  font-size: 0.9rem;
  color: var(--text);
}

.field-link {
  color: var(--accent);
  text-decoration: none;
}

.field-link:hover {
  text-decoration: underline;
}

.detail-notes {
  background: var(--muted-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.notes-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.notes-text {
  font-size: 0.875rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.7;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.confirm-delete {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--danger);
}

/* ===== DASHBOARD ===== */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: cardSlideIn 0.35s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.stat-primary { border-left: 3px solid var(--primary); }
.stat-warning { border-left: 3px solid var(--warning); }
.stat-success { border-left: 3px solid var(--success); }
.stat-accent { border-left: 3px solid var(--accent); }

.stat-icon {
  font-size: 1.5rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-sublabel {
  font-size: 0.65rem;
  color: var(--text-light);
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.empty-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  padding: 20px 0;
}

.company-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.company-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--muted-soft);
}

.company-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.company-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
}

.health-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.health-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.health-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.health-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.health-count {
  color: var(--text-light);
}

.health-track {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.health-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .app-header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .btn-add {
    width: 100%;
    text-align: center;
  }

  .app-main {
    padding: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions button {
    width: 100%;
  }

  .filter-row {
    flex-direction: column;
  }

  .card-edit-btn {
    opacity: 0.5;
  }

  .header-inner {
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}


<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Relay — your personal CRM for managing professional relationships. Let's add your first contact.", "view": "user", "highlight_selector": ".btn-add", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Click 'Add Contact' to open the contact form. Fill in their name, company, role, and contact details.", "view": "user", "highlight_selector": ".btn-add", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Set the 'Last Contact Date' so Relay can track how long it's been since you last reached out.", "view": "user", "highlight_selector": ".form-input[type='date']", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "Your contacts are sorted by who needs attention most — contacts you haven't reached out to in a while appear at the top with orange badges.", "view": "user", "highlight_selector": ".contact-cards", "wait_for": "tap_to_continue"},
  {"step": 5, "narration": "Click any contact card to see their full details. You can mark them as 'Contacted Today' to reset their timer.", "view": "user", "highlight_selector": ".contact-card", "wait_for": "user_interaction"},
  {"step": 6, "narration": "Switch to the Insights tab to see your relationship health — how many contacts are fresh, warm, or going cold.", "view": "user", "highlight_selector": ".tab-btn:nth-child(2)", "wait_for": "user_interaction"},
  {"step": 7, "narration": "Use the search bar and filters to quickly find contacts by name, company, or role. Your network, always at your fingertips.", "view": "user", "highlight_selector": ".search-input", "wait_for": "tap_to_continue"}
]
-->

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg, #fff);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.auth-copy {
  margin: 12px 0 20px;
  color: var(--muted, #667085);
}

.auth-error {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fee4e2;
  color: #b42318;
}

.auth-btn {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.auth-userbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-loading {
  padding: 24px;
  text-align: center;
}

.interaction-section {
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-heading h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.section-heading p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}

.interaction-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-actions {
  padding-top: 0;
  border-top: none;
  justify-content: flex-start;
}

.interaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-item {
  border: 1px solid var(--border);
  background: var(--muted-soft);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.interaction-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.interaction-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
}

.interaction-meeting {
  color: var(--primary);
}

.interaction-call {
  color: var(--success);
}

.interaction-email {
  color: var(--accent);
}

.interaction-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.interaction-inline-input,
.interaction-inline-textarea {
  background: var(--surface);
}

.interaction-inline-textarea {
  min-height: 72px;
}

@media (max-width: 640px) {
  .interaction-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.card-tags {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
  word-break: break-word;
}

@media (max-width: 640px) {
  .filter-row {
    gap: 8px;
  }
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-draft-btn {
  padding: 7px 12px;
  font-size: 0.78rem;
}

.ai-draft-error {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--danger);
}

.ai-draft-status {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ai-draft-status-sent {
  color: var(--success);
}

.ai-draft-status-failed {
  color: var(--danger);
}

.dashboard-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.export-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .dashboard-actions {
    justify-content: stretch;
  }

  .export-btn {
    width: 100%;
  }
}
