/* ===== COVWAY FULL PROTOTYPE — STYLES ===== */

/* Global utility */
.hidden { display: none !important; }

/* --- Design Tokens --- */
:root {
  /* Covway palette — Emily's color spec */
  --color-bg: #ffffff;
  --color-surface: #FAF7F7;
  --color-surface-alt: #F5F2F2;
  --color-border: #e6e2da;
  --color-border-light: #eeebe4;

  --color-text-primary: #1e2a4a;
  --color-text-secondary: #4a5568;
  --color-text-tertiary: #718096;
  --color-text-muted: #a0aec0;

  --color-primary: #41BD8C;
  --color-primary-dark: #359E74;
  --color-primary-light: #E8F7F0;
  --color-primary-surface: #F0FAF5;
  --color-primary-on-dark: #5ED4A4;

  --color-amber: #FEB200;
  --color-amber-bg: #FFF8E5;
  --color-amber-border: #FED980;

  --color-red: #c53030;
  --color-red-file: #b94a3e;
  --color-red-file-dark: #8b3830;

  --color-green: #5D9B82;
  --color-green-light: #edf7f0;

  --color-dark-bg: #000640;

  /* User message / interactive blue */
  --color-user-blue: #0862E1;
  --color-user-blue-light: #EBF3FE;

  /* AI accent (purple stays for Ask/Translator) */
  --color-ai-purple: #6b5ce7;
  --color-ai-purple-light: #f0edfb;

  /* Navigator */
  --color-navigator: #5C2AE4;

  /* Profile circle colors */
  --color-profile-1: #FEB200;
  --color-profile-2: #08BDE1;
  --color-profile-3: #5D9B82;
  --color-profile-4: #0862E1;
  --color-profile-5: #FF6439;

  /* Vibrant icon colors + pastel backgrounds */
  --color-icon-orange: #e87c3e;
  --color-icon-orange-bg: #fef0e6;
  --color-icon-blue: #3b82f6;
  --color-icon-blue-bg: #eff6ff;
  --color-icon-coral: #e85d75;
  --color-icon-coral-bg: #fef0f2;
  --color-icon-cyan: #06b6d4;
  --color-icon-cyan-bg: #ecfeff;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Type */
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.75rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F0EDED;
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px 16px 40px;
}

/* --- Tab Group Navigator (top) --- */
.tab-groups {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
}
.tab-group-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.tab-group-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Sub-screen tabs */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
}
.sub-tab-btn {
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sub-tab-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}

/* --- Phone Frame --- */
.phone-frame {
  width: 375px;
  height: 812px;
  background: var(--color-bg);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.18), 0 0 0 8px #1a1a1a;
  position: relative;
  display: grid;
  grid-template-rows: 40px 1fr 62px;
  padding-bottom: 40px;
}
.phone-notch {
  background: var(--color-bg);
  padding-top: 14px;
  flex-shrink: 0;
  z-index: 10;
}
.phone-notch.dark-notch {
  background: var(--color-dark-bg);
  color: white;
}
.phone-notch.red-notch {
  background: var(--color-red-file);
  color: white;
}
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px 8px;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
}
.status-icons { display: flex; gap: 6px; align-items: center; }

/* --- Screen Container --- */
.screen-container {
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px;
  display: none;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  display: block;
}
.screen.no-pad { padding: 0; }
.scroll-spacer { height: 120px; }
.scroll-spacer-sm { height: 40px; }

/* --- Headers --- */
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0 12px;
}
.page-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}
.page-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.screen-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 4px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Buttons --- */
.btn-icon-primary {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-text-primary {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: none; border: none;
  cursor: pointer;
  padding: 6px 0;
}
.btn-text-secondary {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  background: none; border: none;
  cursor: pointer;
  padding: 6px 8px;
}
.btn-text-cancel {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: none; border: none;
  cursor: pointer;
  padding: 6px 0;
}
.btn-icon-overflow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--color-text-tertiary);
}
.back-btn {
  display: flex; align-items: center; gap: 2px;
  font-family: inherit; font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: none; border: none; cursor: pointer; padding: 6px 0;
}
.back-label-purple { color: var(--color-primary); }

/* Primary full-width button */
.btn-primary-full {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary-full:active { background: var(--color-primary-dark); }
.btn-primary-block {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary-block:active { background: var(--color-primary-dark); }

/* Outlined button */
.btn-outline-full {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: transparent;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.btn-outline-white {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.btn-text-center {
  display: block;
  width: 100%;
  text-align: center;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
}
.btn-text-center-white {
  display: block;
  width: 100%;
  text-align: center;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #8BBBFF;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
}

/* --- Search --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.search-input {
  flex: 1;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  border: none; outline: none;
  background: transparent;
}
.search-input::placeholder { color: var(--color-text-muted); }

/* --- Section Labels --- */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.section-label-purple {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.section-hint {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: -6px;
  margin-bottom: 12px;
}

/* --- Folder Grid --- */
.folder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.folder-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.folder-card:active { background: var(--color-surface-alt); }
.folder-icon { margin-bottom: 8px; }
.folder-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.folder-meta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.folder-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.badge-count {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.badge-attention {
  background: var(--color-amber-bg);
  color: var(--color-amber);
}
.folder-attention {
  border-color: var(--color-amber-border);
}

/* --- Document List --- */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background 0.1s;
}
.doc-row:active { background: var(--color-surface-alt); margin: 0 -20px; padding: 12px 20px; }
.doc-row:last-child { border-bottom: none; }
.doc-row-alert { background: var(--color-amber-bg); margin: 0 -20px; padding: 12px 20px; border-radius: var(--radius-md); border-bottom: none; }
.doc-icon-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-alert { background: var(--color-amber-bg); }
.doc-info { flex: 1; min-width: 0; }
.doc-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}
.doc-meta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-folder-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}
.tag-health { background: var(--color-primary-light); color: var(--color-primary-dark); }
.tag-legal { background: #ede9fe; color: #5b21b6; }
.doc-status {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  white-space: nowrap;
}
.status-approved { background: var(--color-green-light); color: var(--color-green); }
.status-stored { background: var(--color-surface-alt); color: var(--color-text-tertiary); }
.status-alert { background: var(--color-amber-bg); color: var(--color-amber); }
.status-draft { background: var(--color-green-light); color: var(--color-green); }

/* --- Sort & Filter --- */
.sort-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.sort-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.sort-btn {
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
}
.sort-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.filter-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.chip {
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.chip.active {
  background: #EBF3FE;
  color: #0862E1;
  border-color: #0862E1;
}
.folder-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 12px;
}

/* --- Document Detail --- */
.doc-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0 12px;
}
.doc-detail-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-detail-title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
}
.doc-detail-meta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.doc-detail-status {
  margin-left: auto;
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.view-original-link {
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: none; border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
  display: inline-block;
}

/* Permissions */
.permissions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  padding: 6px 12px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

/* --- AI Summary --- */
.ai-summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 20px;
  border-radius: var(--radius-sm);
  background: var(--color-user-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
}
.ai-summary-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.ai-approved-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--color-green-light);
  color: var(--color-green);
}
.ai-reviewed-date {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-bottom: 14px;
}
.summary-section { margin-bottom: 14px; }
.summary-section:last-child { margin-bottom: 0; }
.summary-section h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.summary-section p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.55;
}
.key-date strong { color: var(--color-text-primary); }
.watch-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: 4px;
}

/* Glossary */
.glossary-terms {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.glossary-term {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
}
.term-chevron { transition: transform 0.2s ease; flex-shrink: 0; }
.glossary-term[data-expanded="true"] .term-chevron { transform: rotate(180deg); }
.term-definition {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding: 6px 12px 10px;
}
.term-definition.hidden { display: none; }

/* --- Action Row --- */
.action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
}
.action-primary {
  background: var(--color-primary);
  color: white;
}
.action-secondary {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* --- Empty Folder --- */
.empty-folder-header {
  padding: 4px 0 16px;
}
.empty-folder-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.folder-title-inline {
  font-size: var(--text-lg);
  font-weight: 700;
}
.empty-folder-subtitle {
  font-size: var(--text-xs);
  color: var(--color-amber);
  font-weight: 500;
}
.empty-state-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.empty-state-icon { margin-bottom: 8px; }
.empty-state-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 6px;
}
.empty-state-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* Suggested docs */
.suggested-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}
.suggested-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
  background: none;
  border-top: none; border-left: none; border-right: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.suggested-item:last-child { border-bottom: none; }
.suggested-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.suggested-info { flex: 1; min-width: 0; }
.suggested-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}
.suggested-desc {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
  line-height: 1.4;
}
.empty-ask-link {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  padding: 12px 0;
}
.empty-ask-link a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

/* --- Upload Flow --- */
.upload-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
}
.upload-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}
.upload-area {
  margin-bottom: 20px;
}
.upload-methods {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.upload-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  background: var(--color-surface);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.upload-method-btn span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.upload-method-hint {
  font-size: var(--text-xs) !important;
  font-weight: 400 !important;
  color: var(--color-text-tertiary) !important;
}
.upload-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.upload-divider::before,
.upload-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.upload-divider span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Toggle */
.toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.toggle-info { flex: 1; }
.toggle-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.toggle-desc {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  line-height: 1.4;
}
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* HITL Notice */
.hitl-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* --- Post-Upload --- */
.post-upload-success {
  text-align: center;
  padding: 24px 0 16px;
}
.success-icon { margin-bottom: 8px; }
.post-upload-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
}
.post-upload-detail {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}
.post-upload-reading {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
}
.reading-progress {
  width: 160px;
  height: 3px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin: 0 auto;
  overflow: hidden;
}
.reading-bar {
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  animation: reading-anim 2s ease-in-out infinite;
}
@keyframes reading-anim {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* AI Found Card */
.ai-found-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.ai-found-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 14px;
}
.ai-found-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-found-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-found-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-found-info { flex: 1; min-width: 0; }
.ai-found-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.ai-found-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.btn-small-primary {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-small-outline {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary);
  background: transparent;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.ai-found-confirmed {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-green);
  flex-shrink: 0;
}

/* --- Bottom Nav --- */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 8px 0 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  z-index: 20;
}
.bottom-nav.hidden { display: none; }
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  color: #4a5568;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 52px;
}
.nav-item svg { color: #4a5568; }
.nav-item.active {
  color: #0862E1;
}
.nav-item.active svg { color: #0862E1; }

/* --- Overflow Menu --- */
.overflow-menu.hidden { display: none; }
.overflow-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.overflow-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
}
.overflow-sheet {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 375px;
  padding: 8px 0 34px;
}
.overflow-item {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  background: none;
  border: none;
  padding: 14px 24px;
  text-align: left;
  cursor: pointer;
}
.overflow-item:active { background: var(--color-surface-alt); }
.overflow-danger { color: var(--color-red); }
.overflow-cancel {
  color: var(--color-text-tertiary);
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
}

/* =======================================
   ONBOARDING SCREENS
   ======================================= */

/* Dark screen bg */
.screen-dark {
  background: var(--color-dark-bg);
  color: white;
}

/* Welcome screen */
.ob-welcome { padding-top: 12px; }
.ob-check-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ob-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
}
.ob-body {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}
.ob-bullets {
  list-style: none;
  margin-bottom: 24px;
}
.ob-bullets li {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  padding: 4px 0;
  padding-left: 14px;
  position: relative;
}
.ob-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

/* Navigator card */
.navigator-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 24px;
}
.navigator-card-light {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
}
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.nav-card-text {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}
.nav-card-text-dark {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Progress dots */
.progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.progress-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}
.progress-dot.active { background: var(--color-primary); }
.progress-dot.done { background: var(--color-primary); opacity: 0.5; }

/* Onboarding light screen */
.ob-light-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}
.ob-light-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.plan-context-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* Input fields */
.form-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}
.form-input {
  width: 100%;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  outline: none;
}
.form-input:focus { border-color: var(--color-primary); }

/* Chip groups */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.chip-option {
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.chip-option.selected {
  background: #EBF3FE;
  color: #0862E1;
  border-color: #0862E1;
}
.ob-helper {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Language grid */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}
.lang-card {
  background: var(--color-surface);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  text-align: center;
}
.lang-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-surface);
}
.lang-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.lang-native {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

/* Dark header section */
.ob-dark-header {
  background: var(--color-dark-bg);
  padding: 12px 20px 24px;
  color: white;
}
.ob-dark-header .progress-dots { margin-bottom: 16px; }
.ob-dark-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: white;
  line-height: 1.3;
  margin-bottom: 6px;
}
.ob-dark-subtitle {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Schedule call (OB-7) */
.back-btn-light {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.back-btn-light:active { opacity: 0.6; }
.schedule-navigator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}
.navigator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.navigator-info { flex: 1; }
.navigator-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.navigator-role {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.navigator-available {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-green);
}
.time-slot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.time-slot {
  padding: 10px 0;
  width: calc(50% - 4px);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: center;
}
.time-slot:active { background: var(--color-surface-alt); }
.time-slot.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-surface);
  color: var(--color-primary);
  font-weight: 600;
}

/* Booking confirmation (OB-8) */
.booked-check {
  margin-bottom: 4px;
}
.booked-detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.booked-detail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.booked-detail-row + .booked-detail-row {
  border-top: 1px solid var(--color-border-light);
}
.booked-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.booked-detail-info { flex: 1; }
.booked-detail-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-bottom: 2px;
}
.booked-detail-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.booked-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-top: 16px;
}
.booked-reminder span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
}

/* Selection cards (one question) */
.selection-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}
.selection-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-surface);
}
.selection-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.selection-card-helper {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 6px;
}
.selection-card-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}

/* Feature cards (Tom's Plan) */
.feature-card {
  display: flex;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feature-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}
.feature-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Final onboarding screen */
.ob-final-check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.ob-final-title {
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}
.ob-final-body {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 20px;
  padding: 0 10px;
}
.navigator-card-big {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}
.nav-big-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.nav-big-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
}
.nav-big-role {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
}
.nav-big-quote {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  font-style: italic;
}

/* =======================================
   HOME / DASHBOARD SCREENS
   ======================================= */

.dash-greeting-small {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 4px;
}
.dash-greeting-name {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}
.dash-subtext {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
  margin-bottom: 4px;
}
.dash-last-active {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* Red File dashboard card */
.red-file-card {
  background: var(--color-red-file);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  color: white;
  cursor: pointer;
}
.rf-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 6px;
}
.rf-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rf-card-name {
  font-size: var(--text-base);
  font-weight: 700;
}
.rf-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}
.rf-badge-ready {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.rf-badge-updated {
  font-size: 10px;
  opacity: 0.7;
}
.rf-expand-arrow {
  font-size: 18px;
  opacity: 0.6;
}

/* Red File expanded content */
.rf-expanded {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.rf-exp-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin-bottom: 4px;
}
.rf-exp-text {
  font-size: var(--text-xs);
  line-height: 1.55;
  opacity: 0.85;
  margin-bottom: 12px;
}
.rf-exp-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: white;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
}

/* Watch section */
.watch-section {
  margin-bottom: 16px;
}
.watch-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.watch-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.watch-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 4px;
}
.watch-info { flex: 1; }
.watch-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.watch-detail {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.watch-action {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 4px;
}
.watch-countdown {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-red-file);
  flex-shrink: 0;
}

/* Upcoming deadlines */
.deadline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  cursor: pointer;
}
.deadline-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.deadline-count {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}
.deadline-urgent {
  font-size: 10px;
  font-weight: 600;
  background: var(--color-amber-bg);
  color: var(--color-amber);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Vault summary */
.vault-summary {
  margin-bottom: 16px;
}
.vault-summary-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vault-folder-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vault-folder-mini {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  flex: 1;
  min-width: calc(50% - 4px);
  cursor: pointer;
}
.vault-folder-mini-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
}
.vault-folder-mini-meta {
  font-size: 10px;
  color: var(--color-text-tertiary);
  margin-top: 1px;
}
.vault-folder-mini.attention {
  border-color: var(--color-amber-border);
}
.vault-folder-mini.attention .vault-folder-mini-meta {
  color: var(--color-amber);
}

/* Document upload CTA */
.doc-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  cursor: pointer;
}
.doc-cta-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-cta-text {
  flex: 1;
}
.doc-cta-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.doc-cta-desc {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

/* Compass section */
.compass-section {
  margin-bottom: 16px;
}
.compass-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.compass-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.compass-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.compass-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.4;
}

/* ===== DEADLINE CARDS (home5) ===== */
.dl-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 6px;
}
.dl-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.dl-urgency-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.dl-dot-red { background: var(--color-red); }
.dl-dot-amber { background: var(--color-amber); }
.dl-dot-green { background: var(--color-green); }
.dl-card-info {
  min-width: 0;
}
.dl-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.dl-card-detail {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-card-countdown {
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 10px;
}
.dl-count-red { color: var(--color-red); }
.dl-count-amber { color: var(--color-amber); }
.dl-count-green { color: var(--color-green); }

/* ===== HANDOFF STRIP (home5) ===== */
.handoff-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 16px 0 6px;
}
.handoff-strip-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.handoff-strip-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.handoff-strip-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.handoff-strip-meta {
  font-size: 10px;
  color: var(--color-text-muted);
}
.handoff-strip-btn {
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== ACTIVITY FEED (home5) ===== */
.activity-feed {
  display: flex;
  flex-direction: column;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.activity-icon-view {
  background: #e8f4f8;
  color: #3a8da8;
}
.activity-icon-share {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.activity-icon-message {
  background: var(--color-amber-bg);
  color: var(--color-amber);
}
.activity-icon-doc {
  background: var(--color-green-light);
  color: var(--color-green);
}
.activity-content {
  flex: 1;
  min-width: 0;
}
.activity-text {
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  line-height: 1.45;
}
.activity-text strong {
  font-weight: 600;
}
.activity-time {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ===== QUICK ASK BAR (home5) ===== */
.home-ask-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 16px 0;
  cursor: pointer;
  transition: border-color 0.15s;
}
.home-ask-bar:active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.home-ask-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.home-ask-placeholder {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ===== VAULT COMPACT (home5) ===== */
.vault-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  cursor: pointer;
}
.vault-compact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
}
.vault-compact-left svg {
  color: var(--color-text-muted);
}

/* =======================================
   RED FILE SCREENS
   ======================================= */

.rf-header {
  background: var(--color-red-file);
  padding: 16px 20px 20px;
  color: white;
}
.rf-header-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 2px;
}
.rf-header-subtitle {
  font-size: var(--text-xs);
  opacity: 0.7;
}

/* Identity card */
.rf-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.rf-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.rf-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}
.rf-details {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}

/* Mode toggle */
.rf-mode-toggle {
  display: flex;
  gap: 0;
  padding: 12px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.rf-mode-btn {
  flex: 1;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 10px;
  border: 1.5px solid var(--color-red-file);
  background: transparent;
  color: var(--color-red-file);
  cursor: pointer;
  text-align: center;
}
.rf-mode-btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.rf-mode-btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.rf-mode-btn.active {
  background: var(--color-red-file);
  color: white;
}

/* Red File sections */
.rf-section {
  padding: 16px 20px;
}
.rf-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-red-file);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.rf-section-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.rf-section + .rf-section {
  border-top: 1px solid var(--color-border-light);
}

/* Contact table */
.rf-contacts {
  width: 100%;
}
.rf-contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.rf-contact-row:last-child { border-bottom: none; }
.rf-contact-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.rf-contact-role {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.rf-contact-phone {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

/* Allergy chips */
.rf-allergy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rf-allergy-chip {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: #fef2f0;
  color: var(--color-red-file);
  border: 1px solid rgba(185,74,62,0.2);
}
.rf-allergy-chip.moderate {
  background: var(--color-amber-bg);
  color: var(--color-amber);
  border-color: rgba(196,122,26,0.2);
}

/* Medication table */
.rf-med-table {
  width: 100%;
  border-collapse: collapse;
}
.rf-med-table th {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.rf-med-table td {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding: 8px 4px 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
}
.rf-med-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

/* Red File footer */
.rf-footer {
  padding: 16px 20px 20px;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.rf-footer-text {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-bottom: 12px;
}
.rf-done-btn {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 10px 32px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
}

/* =======================================
   ASK SCREEN
   ======================================= */

.ask-input-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 6px;
}
.ask-input {
  width: 100%;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  border: none;
  outline: none;
  background: transparent;
}
.ask-input::placeholder { color: var(--color-text-muted); }
.ask-scope {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  padding-left: 2px;
}
.ask-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
}
.ask-recent-item:last-child { border-bottom: none; }
.ask-recent-q {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-weight: 500;
}
.ask-recent-time {
  font-size: 10px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* Ask tooltip overlay */
.ask-tooltip-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  padding: 0 16px 20px;
}
.ask-tooltip-bg {
  position: absolute;
  top: -200px; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15) 30%);
}
.ask-tooltip {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--color-text-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.ask-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--color-dark-bg);
}
.ask-tooltip-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 6px;
}
.ask-tooltip-body {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}
.ask-tooltip-gotit {
  width: 100%;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  margin-bottom: 8px;
}
.ask-tooltip-link {
  display: block;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}
.ask-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  padding: 8px;
  font-size: 10px;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

/* --- Ask input mic icon --- */
.ask-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ask-input-mic {
  position: absolute;
  right: 14px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* =======================================
   ASK VOICE INPUT  (askv1 / askv2)
   =======================================
   The voice input feature lives inside the standard .ask-input-wrap.
   The mic button is a 36px circular button with an 18px icon, wrapped
   in enough padding that the overall tap target clears 44px (iOS HIG).
   Right-padding on the input reserves space so typed text never slides
   under the mic or the send button. All motion respects prefers-reduced-motion.
   ======================================= */

/* Reserve space on the right side of the input for the mic (and optional send). */
.ask-input--with-mic {
  /* 14px wrap padding + 36px mic + 8px breathing room = 58px ≈ 60 */
  padding-right: 50px;
}
.ask-input--with-actions {
  /* When both mic AND send are present: 36 mic + 8 gap + 36 send + buffer */
  padding-right: 96px;
}

/* The mic button itself.
   Visual circle is 36px. Absolute positioning pins it to the right edge
   of the input wrap. We use negative margin + transparent padding tricks
   via generous hit area on the button element to ensure 44x44 tappability. */
.ask-mic-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(61, 122, 95, 0.18);  /* subtle teal hairline */
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  /* The button itself is 36x36; we expand the hit area using a pseudo-
     element so the tappable surface is 44x44 without changing visual size. */
}
.ask-mic-btn::after {
  content: '';
  position: absolute;
  top: -4px; right: -4px; bottom: -4px; left: -4px;
}
.ask-mic-btn:active {
  background: #f3ece1;  /* warm tap feedback that matches cream bg */
}

/* ACTIVE / RECORDING state — solid teal circle with white pulsing dot. */
.askv-mic-active {
  background: #3d7a5f;
  border-color: #3d7a5f;
  position: relative;
  overflow: visible;
}

/* Expanding ripple around the active mic, 2s infinite. */
.askv-mic-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #3d7a5f;
  opacity: 0.5;
  animation: askvPulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes askvPulse {
  0%   { transform: scale(1);    opacity: 0.45; }
  80%  { transform: scale(1.7);  opacity: 0;    }
  100% { transform: scale(1.7);  opacity: 0;    }
}

/* The red recording dot inside the active mic. 10px circle, white ring. */
.askv-mic-rec-dot {
  position: relative;  /* z-order above the .askv-mic-pulse layer */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e54848;  /* recording red — distinct from #b45309 amber warnings */
  box-shadow: 0 0 0 2px #ffffff;
  animation: askvDotBlink 1.2s ease-in-out infinite;
}
@keyframes askvDotBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* Listening placeholder: teal, italic.
   Note: ::placeholder cannot be targeted conditionally via JS without
   a class swap, which is exactly what .askv-listening-input provides. */
.askv-listening-input::placeholder {
  color: #3d7a5f;
  font-style: italic;
  opacity: 1;
}

/* Animated waveform (3 teal bars) shown below the input while recording. */
.askv-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  margin-top: 10px;
}
.askv-wave-bar {
  display: inline-block;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: #3d7a5f;
  animation: askvWave 1.1s ease-in-out infinite;
}
/* Stagger each bar so they feel like real audio levels, not a sine wave. */
.askv-wave-bar:nth-child(1) { animation-delay: 0s;    }
.askv-wave-bar:nth-child(2) { animation-delay: 0.18s; }
.askv-wave-bar:nth-child(3) { animation-delay: 0.36s; }
@keyframes askvWave {
  0%, 100% { height: 6px;  opacity: 0.55; }
  50%      { height: 22px; opacity: 1;    }
}

.askv-tap-to-stop {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 6px;
  margin-bottom: 0;
  letter-spacing: 0.01em;
}

/* Focus dim overlay behind recording screen (10% opacity). */
.askv-dim-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(44, 41, 37, 0.10);  /* 10% of text-primary — warm, on-brand */
  z-index: 1;
  pointer-events: none;
}

/* Teal helper line on askv2 inviting the user to review before sending. */
.askv-edit-helper {
  font-size: 12px;
  color: #3d7a5f;
  margin: 6px 2px 14px;
  font-weight: 500;
}

/* Submit button shown alongside mic on askv2 (paper-plane).
   Sits to the LEFT of the mic because the mic is pinned to right:8px;
   we offset the send so it's right:52px (8 + 36 + 8 gap). */
.askv-submit-btn {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.askv-submit-active {
  background: #3d7a5f;
}
.askv-submit-active:active {
  background: #2f5f4a;
}

/* Respect users who prefer reduced motion: freeze all voice animations. */
@media (prefers-reduced-motion: reduce) {
  .askv-mic-pulse,
  .askv-mic-rec-dot,
  .askv-wave-bar {
    animation: none;
  }
  .askv-mic-rec-dot { opacity: 1; }
  .askv-wave-bar    { height: 14px; opacity: 0.85; }
}

/* --- Ask tooltip extras --- */
.ask-tooltip-icon {
  margin-bottom: 10px;
}
.ask-tooltip-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 14px 0;
}

/* ===== ASK CONVERSATION SCREENS (ask2-ask7) ===== */

/* Conversation header */
.ask-conv-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 16px;
}
.ask-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}
.ask-conv-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}

/* User message bubble */
.ask-msg-user {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.ask-msg-bubble-user {
  background: var(--color-user-blue);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  max-width: 82%;
  line-height: 1.45;
}

/* AI message row */
.ask-msg-ai {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.ask-ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6b5ce7 0%, #8b7cf0 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.ask-msg-bubble-ai {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 16px;
  max-width: calc(100% - 42px);
  flex: 1;
}

/* Thinking dots animation */
.ask-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ask-thinking-dots {
  display: flex;
  gap: 4px;
}
.ask-thinking-dots span {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  opacity: 0.35;
  animation: ask-dot-pulse 1.4s ease-in-out infinite;
}
.ask-thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.ask-thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ask-dot-pulse {
  0%, 60%, 100% { opacity: 0.25; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1.1); }
}
.ask-thinking-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Answer text & list */
.ask-answer-text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.55;
}
.ask-answer-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.ask-answer-list li {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.55;
  padding: 4px 0 4px 16px;
  position: relative;
}
.ask-answer-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

/* Answer disclaimer (bottom of each bubble) */
.ask-answer-disclaimer {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-light);
  line-height: 1.4;
}

/* Source citation card */
.ask-source-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 12px;
  cursor: pointer;
}
.ask-source-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ask-source-info {
  flex: 1;
  min-width: 0;
}
.ask-source-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ask-source-meta {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}
.ask-source-meta.ask-source-stale {
  color: var(--color-amber);
}
.ask-source-chevron {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* Sources group (multi-source) */
.ask-sources-group {
  margin-top: 14px;
}
.ask-sources-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ask-sources-group .ask-source-card {
  margin-top: 6px;
}

/* Stale document warning */
.ask-stale-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef6ee;
  border: 1px solid #f5dfc5;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 12px;
}
.ask-stale-warning svg {
  color: var(--color-amber);
  flex-shrink: 0;
}
.ask-stale-warning span {
  font-size: var(--text-xs);
  color: #8a5a1e;
  font-weight: 500;
  line-height: 1.4;
}

/* Action buttons below answer */
.ask-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}
.ask-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.ask-action-btn:active {
  background: #e2dcf7;
}

/* Feedback thumbs */
.ask-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
}
.ask-feedback-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.ask-feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.ask-feedback-btn.active,
.ask-feedback-btn:active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Persistent disclaimer bar (bottom of ask2-ask7) */
.ask-disclaimer-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px 16px;
  font-size: 10px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

/* Proactive alert card (ask4) */
.ask-proactive-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0edfb;
  border: 1px solid #d8d0f5;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 12px 0;
}
.ask-proactive-icon {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 1px;
}
.ask-proactive-text {
  flex: 1;
}
.ask-proactive-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 2px;
}
.ask-proactive-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.45;
}
.ask-proactive-action {
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

/* ===== SHARE / APPROVE (ask5 — HITL) ===== */
.ask-share-section {
  padding-top: 4px;
}
.ask-share-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.ask-share-recipients {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ask-share-recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.ask-share-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ask-share-role {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* Draft preview */
.ask-share-draft {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.ask-share-draft-text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.5;
  margin-bottom: 8px;
}
.ask-share-draft-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0 0 10px;
}
.ask-share-draft-list li {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.55;
  padding: 2px 0;
}
.ask-share-draft-source {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 10px;
}
.ask-share-draft-disclaimer {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
  font-style: italic;
}

/* Edit before sending */
.ask-share-edit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
}

/* Approve / Cancel buttons */
.ask-share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.ask-share-approve {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.ask-share-approve:active {
  background: var(--color-primary-dark);
}
.ask-share-cancel {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  text-align: center;
}
.ask-share-footer {
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* ===== ESCALATION / NAVIGATOR (ask6) ===== */
.ask-elevated-notice {
  display: flex;
  gap: 10px;
  background: #fef6ee;
  border: 1px solid #f5dfc5;
  border-left: 3px solid var(--color-amber);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 14px;
}
.ask-elevated-notice > svg {
  color: var(--color-amber);
  flex-shrink: 0;
  margin-top: 1px;
}
.ask-elevated-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #8a5a1e;
  margin-bottom: 3px;
}
.ask-elevated-body {
  font-size: var(--text-xs);
  color: #8a5a1e;
  line-height: 1.5;
}

/* Navigator handoff card */
.ask-navigator-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 14px 0;
}
.ask-nav-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ask-nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6b5ce7 0%, #8b7cf0 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ask-nav-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.ask-nav-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.ask-nav-body {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}
.ask-nav-actions {
  display: flex;
  gap: 8px;
}
.ask-nav-btn-primary {
  flex: 1;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  text-align: center;
}
.ask-nav-btn-secondary {
  flex: 1;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  text-align: center;
}

/* ===== EMPTY / NO RESULTS (ask7) ===== */
.ask-empty-state {
  text-align: center;
  padding: 8px 0;
}
.ask-empty-icon {
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.ask-empty-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.ask-empty-body {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Suggested actions for empty state */
.ask-empty-actions {
  margin: 16px 0;
}
.ask-empty-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: border-color 0.15s;
}
.ask-empty-action-btn:active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.ask-empty-action-btn svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* =======================================
   TRANSLATOR SCREENS
   ======================================= */

.tr-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
}
.tr-back {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 2px;
}
.tr-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
}
.tr-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Upload area for translator */
.tr-upload-area {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 20px;
  cursor: pointer;
  background: var(--color-surface);
}
.tr-upload-icon {
  margin-bottom: 8px;
}
.tr-upload-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.tr-upload-hint {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* Translator bullets */
.tr-bullets {
  list-style: none;
  margin-bottom: 20px;
}
.tr-bullets li {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding: 4px 0;
  padding-left: 14px;
  position: relative;
}
.tr-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* Recent translations */
.tr-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.tr-recent-item:last-child { border-bottom: none; }
.tr-recent-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.tr-recent-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--color-green-light);
  color: var(--color-green);
}

/* Processing screen */
.tr-close-btn {
  position: absolute;
  top: 8px; right: 20px;
  font-family: inherit;
  font-size: 18px;
  color: var(--color-text-tertiary);
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.tr-processing-title {
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 4px;
}
.tr-processing-sub {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-align: center;
  margin-bottom: 24px;
}
.tr-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
}
.tr-file-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  flex: 1;
}
.tr-file-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--color-green-light);
  color: var(--color-green);
}

/* Progress checklist */
.tr-progress-list {
  list-style: none;
}
.tr-progress-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.tr-check-done {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--color-green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tr-check-pending {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: pulse-border 1.5s ease-in-out infinite;
}
@keyframes pulse-border {
  0%, 100% { border-color: var(--color-border); }
  50% { border-color: var(--color-primary); }
}

/* Output screen */
.tr-output-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.tr-output-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--color-green-light);
  color: var(--color-green);
  margin-bottom: 16px;
  display: inline-block;
}

/* Summary card for output */
.tr-summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

/* Key dates mini table */
.tr-dates-table {
  width: 100%;
}
.tr-dates-table td {
  font-size: var(--text-xs);
  padding: 4px 0;
  color: var(--color-text-secondary);
}
.tr-dates-table td:last-child {
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: right;
}

/* Share/Approval screen */
.tr-share-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
}
.tr-share-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.tr-share-preview {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
}
.tr-share-doc-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.tr-share-doc-detail {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.tr-circle-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.tr-circle-member:last-child { border-bottom: none; }
.tr-circle-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}
.tr-circle-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tr-circle-check {
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-primary);
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tr-msg-preview {
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
  font-size: var(--text-xs);
  color: var(--color-primary-dark);
  line-height: 1.5;
}

/* ================================================================ */
/* CIRCLE SCREENS                                                    */
/* ================================================================ */

/* Member rows */
.member-list { }
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.member-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.member-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.member-info {
  flex: 1;
  min-width: 0;
}
.member-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text-primary);
}
.member-name-lg {
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-text-primary);
}
.you-label {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.member-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.member-status {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.active { background: var(--color-green); }
.status-dot.inactive { background: var(--color-text-muted); }

/* Role badges */
.role-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.role-guardian {
  background: #0862E1;
  color: white;
}
.role-coguardian {
  background: #EBF3FE;
  color: #0862E1;
  border: 1px solid #0862E1;
}
.role-caretaker {
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.role-selfadvocate {
  background: var(--color-green-light);
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

/* Member profile card (C-2) */
.member-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}
.member-profile-info {
  flex: 1;
  min-width: 0;
}
.member-profile-sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: 3px;
}

/* Pending invitation banner */
.pending-invite-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-amber-bg);
  border: 1px solid var(--color-amber-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 16px 0;
}
.pending-icon { flex-shrink: 0; }
.pending-info { flex: 1; min-width: 0; }
.pending-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.pending-status {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.pending-resend {
  font-size: var(--text-xs) !important;
  padding: 4px 8px !important;
}

/* Activity feed */
.activity-feed { }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.activity-icon {
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}
.activity-text {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.activity-text strong {
  color: var(--color-text-primary);
  font-weight: 600;
}
.activity-time {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Button variants for Circle */
.btn-text-link {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: block;
  text-align: center;
  width: 100%;
}
.btn-text-danger {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
}
.detail-actions {
  margin-top: 20px;
  padding: 12px 0;
  text-align: center;
}
.action-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 4px 0;
}

/* Permissions list (C-2) */
.perm-list { }
.perm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.perm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.perm-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.perm-info { flex: 1; min-width: 0; }
.perm-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}
.perm-level {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 1px;
}
.text-muted { color: var(--color-text-muted); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 12px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Form elements (C-3 invite) */
.form-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
  line-height: 1.25;
}
.form-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.4;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  font-family: inherit;
  font-size: var(--text-base);
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-primary);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus {
  border-color: var(--color-primary);
}
.form-helper {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 6px;
}

/* Role selection cards (C-3) */
.role-selection-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-select-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--color-surface);
}
.role-select-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.role-select-header {
  margin-bottom: 6px;
}
.role-select-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Trust notice purple variant */
.trust-notice-purple {
  background: var(--color-primary-light) !important;
  border-color: var(--color-primary) !important;
}
.trust-notice-purple p {
  color: var(--color-primary-dark) !important;
}

/* Role permissions cards (C-4) */
.role-perm-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.role-perm-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 8px 0 14px;
  line-height: 1.4;
}
.perm-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.perm-check, .perm-x {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
}
.perm-check span { color: var(--color-text-primary); }
.perm-x span { color: var(--color-text-muted); }
.role-perm-note {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 12px;
  font-style: italic;
  line-height: 1.4;
}

/* Empty state (C-5) */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  min-height: 100%;
}
.empty-illustration {
  margin-bottom: 24px;
}
.empty-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}
.empty-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 300px;
}
.empty-role-preview {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.empty-role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  min-width: 90px;
}
.empty-role-text {
  font-size: 10px;
  color: var(--color-text-tertiary);
}
.empty-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* Self-Advocate setup (C-10) */
.sa-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.sa-profile-info {
  flex: 1;
}

/* Invite via Link (C-11) */
.invite-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 20px;
}
.invite-link-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.invite-link-text {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-copy {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-copy:active { opacity: 0.8; }
.perm-value-pill {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface-alt);
  padding: 4px 10px;
  border-radius: 100px;
}
.share-btn-row {
  display: flex;
  gap: 10px;
}
.share-method-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.share-method-btn:active { background: var(--color-surface-alt); }

/* Notification Preferences (C-12) */
.notif-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-top: 16px;
}
.notif-summary span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
}

/* Activity Log (C-13) */
.activity-log-section {
  margin-bottom: 8px;
}
.activity-log-date {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 8px;
}
.activity-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* Bulk Permissions (C-14) */
.bulk-folder-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.bulk-folder-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}
.bulk-folder-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  flex: 1;
}
.bulk-folder-count {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}
.bulk-member-list {
  padding: 4px 0;
}
.bulk-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
}
.bulk-member-row + .bulk-member-row {
  border-top: 1px solid var(--color-border-light);
}
.member-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.bulk-member-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  flex: 1;
}
.toggle-sm .toggle-slider {
  width: 36px;
  height: 20px;
}
.toggle-sm .toggle-slider::before {
  width: 16px;
  height: 16px;
}
.toggle-sm input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

/* Circle links row */
.circle-links-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

/* Remove member confirmation (C-7) */
.remove-confirm-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px 20px;
}
.remove-confirm-icon {
  margin-bottom: 16px;
}
.remove-confirm-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}
.remove-confirm-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 300px;
}
.remove-confirm-details {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 4px 0;
}
.remove-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.remove-confirm-row + .remove-confirm-row {
  border-top: 1px solid var(--color-border-light);
}
.remove-confirm-label {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}
.remove-confirm-value {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-weight: 500;
}
.trust-notice-red {
  background: #fef0ee;
  border: 1px solid #f5d0cb;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.trust-notice-red p {
  font-size: var(--text-xs);
  color: #8a3029;
  line-height: 1.4;
  margin: 0;
}
.btn-danger-block {
  width: 100%;
  padding: 14px;
  background: var(--color-red);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
}
.btn-danger-block:active { background: #9c3d32; }

/* Pending invite detail (C-9) */
.pending-avatar {
  background: #e8e4f0 !important;
  color: #8a80a8;
  border: 2px dashed #c4bdd8;
}
.status-dot.pending {
  background: #FEB200;
}
.pending-detail-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.pending-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef6e8;
  border-bottom: 1px solid #f0e0c0;
}
.pending-detail-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #8a5c10;
}
.pending-detail-rows {
  padding: 4px 0;
}
.pending-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
}
.pending-detail-row + .pending-detail-row {
  border-top: 1px solid var(--color-border-light);
}
.pending-detail-label {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}
.pending-detail-value {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-weight: 500;
}
.pending-detail-amber {
  color: #FEB200;
}
.pending-preview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.pending-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.pending-preview-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.pending-action-buttons {
  margin-bottom: 0;
}
.btn-danger-outline {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--color-red);
  border: 1.5px solid var(--color-red);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
}
.btn-danger-outline:active { background: #fef0ee; }

/* Invite confirmation (C-6) */
.invite-confirm-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px 20px;
}
.invite-confirm-icon {
  margin-bottom: 20px;
}
.invite-confirm-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.invite-confirm-name {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: 24px;
}
.invite-confirm-details {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 4px 0;
}
.invite-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.invite-confirm-row + .invite-confirm-row {
  border-top: 1px solid var(--color-border-light);
}
.invite-confirm-label {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}
.invite-confirm-value {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-weight: 500;
}
.btn-text-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}
.btn-text-link:active {
  opacity: 0.7;
}

/* ================================================================ */
/* HANDOFF SCREENS                                                   */
/* ================================================================ */

/* Shift card */
.shift-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  border-left: 5px solid var(--color-primary);
}
.shift-card-accent {
  display: none;
}
.shift-card-content {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.shift-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shift-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text-primary);
}
.shift-time-info {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.shift-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-green);
}

/* Shift notes */
.shift-notes-list { }
.shift-note {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.shift-note-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 56px;
  padding-top: 2px;
  font-weight: 500;
}
.shift-note-text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Shift tasks */
.shift-tasks { }
.shift-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.shift-task-info { flex: 1; }
.shift-task-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.shift-task-meta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.shift-task.done .shift-task-name {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
}
.task-circle-empty {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
}

/* Summary cards (H-2) */
.summary-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--color-border-light);
}
.summary-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
}
.summary-text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Medication rows */
.med-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.med-row:last-child { border-bottom: none; }
.med-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.med-time {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* Previous handoff context */
.prev-handoff-card {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 16px;
}
.prev-handoff-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}
.prev-handoff-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* --- Proto Footer --- */
.proto-footer {
  margin-top: 24px;
  text-align: center;
}
.proto-footer a {
  font-size: 11px;
  color: var(--color-text-muted);
  text-decoration: none;
}

/* ============================================================ */
/* P1: ACCOUNT CREATION                                         */
/* ============================================================ */

.acct-toggle {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 3px;
  margin: 20px 0 16px;
}
.acct-toggle-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.acct-toggle-btn.active {
  background: rgba(255,255,255,0.15);
  color: white;
}
.form-input-dark {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: white !important;
}
.form-input-dark::placeholder {
  color: rgba(255,255,255,0.35);
}

.code-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}
.code-digit {
  width: 44px;
  height: 52px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Satoshi', sans-serif;
  text-align: center;
  outline: none;
}
.code-digit:focus {
  border-color: var(--color-primary);
  background: rgba(107,92,231,0.1);
}

/* ============================================================ */
/* P2: RED FILE BUILDER                                         */
/* ============================================================ */

.rfb-progress {
  height: 4px;
  background: #e8e4df;
  border-radius: 2px;
  margin: 12px 0 8px;
  overflow: hidden;
}
.rfb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b94a3e, #d45a4e);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.rfb-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.rfb-photo-upload {
  margin: 16px 0;
}
.rfb-photo-placeholder {
  width: 100%;
  height: 120px;
  border: 2px dashed #d5d0c8;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.rfb-photo-placeholder:hover {
  border-color: var(--color-primary);
}

.rfb-added-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f0edfb;
  border-radius: 10px;
  margin-bottom: 8px;
}
.rfb-item-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
}
.rfb-item-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.rfb-severity {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}
.rfb-severity.severe {
  background: #fde8e8;
  color: #b94a3e;
}
.rfb-severity.mild {
  background: #fef3e2;
  color: #FEB200;
}

.rfb-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.rfb-add-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rfb-med-card {
  padding: 14px;
  background: white;
  border: 1px solid #e8e4df;
  border-radius: 10px;
  margin-bottom: 8px;
}
.rfb-med-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.rfb-med-detail {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.rfb-add-med-btn {
  width: 100%;
  padding: 12px;
  border: 1.5px dashed #d5d0c8;
  border-radius: 10px;
  background: transparent;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.rfb-add-med-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.rfb-skip-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: var(--color-primary-light);
  border-radius: 10px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.rfb-skip-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.rfb-section-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d5d0c8;
  border-radius: 10px;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  color: var(--color-text-primary);
  background: white;
  resize: vertical;
  line-height: 1.5;
  box-sizing: border-box;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Emergency Contacts */
.rfb-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid #e8e4df;
  border-radius: 10px;
  margin-bottom: 8px;
}
.rfb-contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rfb-contact-info {
  flex: 1;
  min-width: 0;
}
.rfb-contact-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.rfb-contact-relation {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 1px;
}
.rfb-contact-phone {
  font-size: 12px;
  color: var(--color-primary);
  margin-top: 2px;
}
.rfb-contact-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Red File Ready (rfb7) */
.rfb-summary-card {
  background: white;
  border: 1px solid #e8e4df;
  border-radius: 12px;
  padding: 16px;
}
.rfb-summary-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}
.rfb-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--color-text-primary);
}
.rfb-summary-row svg {
  flex-shrink: 0;
}

.rfb-lockscreen-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--color-primary-light);
  border-radius: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.rfb-lockscreen-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================ */
/* P3: NAVIGATOR INTERSTITIAL                                   */
/* ============================================================ */

.navigator-interstitial-avatar {
  position: relative;
  display: inline-block;
}
.navigator-stat-row {
  display: flex;
  gap: 16px;
}
.navigator-stat {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.navigator-stat-number {
  font-size: 28px;
  font-weight: 700;
  color: white;
}
.navigator-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  line-height: 1.3;
}
.btn-outline-dark {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: transparent;
  color: white;
  font-family: 'Satoshi', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* ============================================================ */
/* P4: POST-ONBOARDING HOME                                     */
/* ============================================================ */

.red-file-nudge-card {
  background: linear-gradient(135deg, #b94a3e, #8b3a31);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
  color: white;
  position: relative;
}
.rfn-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.rfn-title {
  font-size: 17px;
  font-weight: 700;
}
.rfn-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
  line-height: 1.4;
}
.rfn-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.rfn-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  overflow: hidden;
}
.rfn-progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.3s;
}
.rfn-progress-label {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}
.rfn-start-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.rfn-start-btn:hover {
  background: rgba(255,255,255,0.2);
}

.home-setup-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid #e8e4df;
  border-radius: 12px;
  margin-bottom: 8px;
}
.hsc-icon {
  width: 38px;
  height: 38px;
  background: var(--color-primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hsc-content {
  flex: 1;
  min-width: 0;
}
.hsc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.hsc-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.home-navigator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-primary-light);
  border-radius: 12px;
  margin-top: 12px;
}
.hnc-content {
  flex: 1;
}
.hnc-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.hnc-text strong {
  color: var(--color-primary);
}

/* ============================================================ */
/* P5: CARE PROFILE                                             */
/* ============================================================ */

.cp-section-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 8px;
}
.cp-section-card.cp-done {
  background: white;
  border: 1px solid #e8e4df;
}
.cp-section-card.cp-todo {
  background: var(--color-primary-light);
  border: 1.5px dashed #c9c2e8;
}
.cp-status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
}
.cp-status-icon.done {
  background: #4d9e6b;
  color: white;
}
.cp-status-icon.todo {
  background: rgba(107,92,231,0.15);
  color: var(--color-primary);
}
.cp-section-info {
  flex: 1;
  min-width: 0;
}
.cp-section-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.cp-section-detail {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.cp-powers {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cp-completion-bar {
  height: 6px;
  background: #e8e4df;
  border-radius: 3px;
  margin-top: 16px;
  overflow: hidden;
}
.cp-completion-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 0.3s;
}
.cp-completion-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 8px;
}

/* ============================================================ */
/* WATCH SCREENS                                                */
/* ============================================================ */

/* Watch Hub header */
.watch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.watch-add-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Summary bar */
.watch-summary-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.watch-summary-item {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: center;
}
.wsb-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}
.wsb-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wsb-urgent .wsb-num { color: var(--color-red); }
.wsb-urgent .wsb-label { color: var(--color-red); }
.wsb-upcoming .wsb-num { color: var(--color-amber); }
.wsb-upcoming .wsb-label { color: var(--color-amber); }
.wsb-ontrack .wsb-num { color: var(--color-green); }
.wsb-ontrack .wsb-label { color: var(--color-green); }

/* Filter chips in watch */
.watch-filters {
  margin-bottom: 16px;
}

/* Section labels */
.watch-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-text-secondary);
  margin: 16px 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.watch-section-urgent {
  color: var(--color-red);
}

/* Watch cards */
.watch-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.watch-card-urgent {
  border-left: 3px solid var(--color-red);
}
.watch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.watch-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.watch-card-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.watch-urgency-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}
.wub-red {
  background: #fde8e6;
  color: var(--color-red);
}
.wub-amber {
  background: var(--color-alert-bg);
  color: var(--color-amber);
}
.wub-green {
  background: var(--color-success-bg);
  color: var(--color-green);
}
.watch-card-meta {
  min-width: 0;
}
.watch-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-card-cat {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* Progress row */
.watch-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.watch-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--color-border-light);
  border-radius: 2px;
  overflow: hidden;
}
.watch-progress-fill {
  height: 100%;
  background: var(--color-red);
  border-radius: 2px;
  transition: width 0.3s;
}
.wfill-amber { background: var(--color-amber); }
.wfill-green { background: var(--color-green); }
.watch-progress-text {
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Watch Detail (wd-) ===== */

.wd-urgency-header {
  text-align: center;
  padding: 20px 0 12px;
}
.wd-countdown-big {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}
.wd-countdown-label {
  font-size: var(--text-sm);
  font-weight: 500;
  margin-top: 2px;
}
.wd-urgency-red .wd-countdown-big { color: var(--color-red); }
.wd-urgency-red .wd-countdown-label { color: var(--color-red); }
.wd-urgency-pastdue .wd-countdown-big { color: #8b3830; }
.wd-urgency-pastdue .wd-countdown-label { color: #8b3830; }

.wd-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.wd-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 12px;
}
.wd-meta-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.wd-meta-date {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}
.wd-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 14px;
}

/* Source row */
.wd-source-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-secondary);
  background: var(--color-primary-light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.wd-source-row svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* Section titles */
.wd-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-text-secondary);
  margin: 18px 0 8px;
}

/* Checklist */
.wd-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wd-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}
.wd-check-done {
  opacity: 0.65;
}
.wd-checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.wd-checkbox.checked {
  background: var(--color-green);
  border-color: var(--color-green);
}
.wd-check-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.wd-check-done .wd-check-label {
  text-decoration: line-through;
}
.wd-check-link {
  font-size: 10px;
  color: var(--color-primary);
  margin-top: 2px;
}
.wd-check-hint {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Document cards */
.wd-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 4px;
}
.wd-doc-card svg { flex-shrink: 0; }
.wd-doc-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.wd-doc-meta {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* Resource cards */
.wd-resource-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 4px;
}
.wd-resource-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-resource-info { flex: 1; min-width: 0; }
.wd-resource-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.wd-resource-desc {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}
.wd-resource-arrow {
  color: var(--color-primary);
  font-size: 16px;
  flex-shrink: 0;
}

/* Assigned row */
.wd-assigned-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.wd-assigned-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.wd-assigned-info { flex: 1; }
.wd-assigned-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.wd-assigned-role {
  font-size: 10px;
  color: var(--color-text-muted);
}
.wd-assign-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
}

/* Ask bar (in Watch) */
.wd-ask-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  padding: 10px 14px;
  margin-top: 14px;
  cursor: pointer;
}
.wd-ask-bar svg { color: var(--color-text-muted); flex-shrink: 0; }
.wd-ask-bar span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Alert settings row */
.wd-alert-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  margin-top: 6px;
}
.wd-alert-text {
  font-size: 11px;
  color: var(--color-text-secondary);
  flex: 1;
}
.wd-alert-edit {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

/* ===== AI Detected (w3) ===== */

.wd-ai-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-primary-light);
  border: 1px solid rgba(107,92,231,0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 8px;
}
.wd-ai-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-ai-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.wd-ai-filename {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: 1px;
}

/* Detected date card */
.wd-detected-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 14px;
}
.wd-detected-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--color-primary-light);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
}
.wd-detected-body {
  padding: 12px 14px;
}
.wd-detected-date {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.wd-detected-context {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
  line-height: 1.4;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
.wd-detected-source {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* Suggested Watch item */
.wd-suggest-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.wd-suggest-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.wd-suggest-row:last-child { border-bottom: none; }
.wd-suggest-label {
  font-size: 11px;
  color: var(--color-text-muted);
}
.wd-suggest-value {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}

/* HITL notice */
.wd-hitl-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-top: 14px;
}
.wd-hitl-notice svg { flex-shrink: 0; margin-top: 1px; }
.wd-hitl-notice span {
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

/* Edit/skip links */
.wd-edit-link {
  display: block;
  width: 100%;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: none;
  border: none;
  padding: 10px 0;
  cursor: pointer;
}
.wd-skip-link {
  display: block;
  width: 100%;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
}

/* ===== Add Deadline (w4) ===== */

/* Template grid */
.wd-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.wd-template-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.wd-template-card:active {
  border-color: var(--color-primary);
}
.wd-template-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.wd-tpl-benefits { background: #fde8e6; color: var(--color-red); }
.wd-tpl-legal { background: var(--color-primary-light); color: var(--color-primary); }
.wd-tpl-health { background: var(--color-success-bg); color: var(--color-green); }
.wd-tpl-edu { background: var(--color-alert-bg); color: var(--color-amber); }
.wd-template-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.wd-template-meta {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* Form fields */
.wd-form-group {
  margin-bottom: 14px;
}
.wd-form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 5px;
}
.wd-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-sizing: border-box;
}
.wd-form-input::placeholder { color: var(--color-text-muted); }
.wd-form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(107,92,231,0.15);
}
.wd-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface);
  min-height: 70px;
  resize: vertical;
  box-sizing: border-box;
}
.wd-form-textarea::placeholder { color: var(--color-text-muted); }
.wd-form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(107,92,231,0.15);
}
.wd-category-chips,
.wd-alert-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== Past Due (w5) ===== */

.wd-pastdue-card {
  display: flex;
  gap: 10px;
  background: #fde8e6;
  border: 1px solid rgba(185,74,62,0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.wd-pastdue-icon { flex-shrink: 0; margin-top: 1px; }
.wd-pastdue-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #8b3830;
}
.wd-pastdue-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 4px 0 0;
}

/* Steps */
.wd-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wd-step {
  display: flex;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.wd-step-num {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-step-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.wd-step-desc {
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}

/* ===== Empty State (w6) ===== */

.wd-empty-container {
  text-align: center;
  padding: 28px 16px 8px;
}
.wd-empty-icon {
  margin: 0 auto 12px;
  opacity: 0.6;
}
.wd-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}
.wd-empty-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Getting started cards */
.wd-start-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.wd-start-card:active {
  border-color: var(--color-primary);
}
.wd-start-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-si-template { background: var(--color-primary-light); color: var(--color-primary); }
.wd-si-upload { background: var(--color-success-bg); color: var(--color-green); }
.wd-si-manual { background: var(--color-alert-bg); color: var(--color-amber); }
.wd-start-content { flex: 1; min-width: 0; }
.wd-start-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.wd-start-desc {
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}
.wd-start-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

/* ── Section Label Row (Home → Watch bridge) ── */
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  margin-bottom: 10px;
}
.section-label-row .section-label {
  margin-bottom: 0;
}
.section-see-all {
  background: none;
  border: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  padding: 4px 0;
  letter-spacing: 0.01em;
}
.section-see-all:active {
  opacity: 0.7;
}

/* ── Watch Discovery Card (home4 new-user state) ── */
.watch-discover-card {
  background: linear-gradient(135deg, #f0edfb 0%, #faf5ee 100%);
  border: 1px solid #e6e0f5;
  border-radius: 14px;
  padding: 18px;
  margin-top: 18px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.watch-discover-card:active {
  transform: scale(0.98);
}
.watch-discover-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.watch-discover-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.watch-discover-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.watch-discover-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.watch-discover-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.watch-discover-pill {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: rgba(107, 92, 231, 0.1);
  border-radius: 20px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════
   CARE JOURNAL
   ═══════════════════════════════════════════ */

/* ── J1: Journal Feed ── */
.journal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.journal-report-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}
.journal-report-btn:active { opacity: 0.7; }

.journal-summary-strip {
  display: flex;
  gap: 0;
  margin-top: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.journal-summary-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
}
.journal-summary-stat:not(:last-child) {
  border-right: 1px solid var(--color-border-light);
}
.jss-num {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}
.jss-label {
  font-size: 10px;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

/* Date separator */
.journal-date-sep {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 18px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border-light);
}

/* Journal entry card */
.journal-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: transform 0.12s ease;
}
.journal-entry:active { transform: scale(0.985); }
.journal-entry:last-of-type { border-bottom: none; }

.je-type-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  width: fit-content;
}
.je-type-daily     { background: #e8f0fe; color: #3a6ea5; }
.je-type-medical   { background: #fce8e8; color: #b94a3e; }
.je-type-behavioral{ background: #fef6e8; color: #a86b1d; }
.je-type-activity  { background: #edf7f0; color: #3a7a52; }
.je-type-decision  { background: var(--color-primary-light); color: var(--color-primary-dark); }
.je-type-incident  { background: #fce8e8; color: #c53030; }

.je-content { flex: 1; min-width: 0; }
.je-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.35;
}
.je-preview {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.je-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 10px;
  color: var(--color-text-muted);
}
.je-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color-primary);
  font-weight: 600;
}

/* FAB */
.journal-fab-wrap { display: none; }
.journal-fab {
  position: absolute;
  bottom: 16px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: none;
  box-shadow: 0 4px 16px rgba(107,92,231,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: transform 0.15s ease;
}
.journal-fab.fab-visible {
  display: flex;
}
.journal-fab:active { transform: scale(0.9); }

/* ── J2: Quick Entry ── */
.je-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 20px;
}
.je-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all 0.15s ease;
}
.je-type-option.je-opt-active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.je-opt-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.je-opt-daily     { background: #e8f0fe; color: #3a6ea5; }
.je-opt-medical   { background: #fce8e8; color: #b94a3e; }
.je-opt-behavioral{ background: #fef6e8; color: #a86b1d; }
.je-opt-activity  { background: #edf7f0; color: #3a7a52; }
.je-opt-decision  { background: var(--color-primary-light); color: var(--color-primary-dark); }
.je-opt-incident  { background: #fce8e8; color: #c53030; }

/* Form */
.je-form { margin-top: 0; }
.je-form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 14px;
  margin-bottom: 6px;
}
.je-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-sizing: border-box;
}
.je-form-input::placeholder { color: var(--color-text-muted); }
.je-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-surface);
  color: var(--color-text-primary);
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}
.je-form-textarea::placeholder { color: var(--color-text-muted); }

/* Mood row */
.je-mood-row {
  display: flex;
  gap: 8px;
}
.je-mood {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border-light);
  background: var(--color-surface);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.je-mood.je-mood-active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  transform: scale(1.1);
}

/* Attach row */
.je-attach-row {
  display: flex;
  gap: 8px;
}
.je-attach-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.je-attach-btn:active { background: var(--color-surface-alt); }

/* Share toggles */
.je-share-toggles { display: flex; flex-direction: column; gap: 10px; }
.je-share-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}
.je-share-person { display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); font-weight: 500; }
.je-share-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 9px;
  font-weight: 700;
}
.toggle-track {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--color-border);
  position: relative;
  transition: background 0.2s ease;
}
.toggle-track.toggle-on { background: var(--color-primary); }
.toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.2s ease;
}
.toggle-on .toggle-thumb { left: 18px; }

/* ── J3: Entry Detail ── */
.je-detail-type {
  display: inline-block;
  margin-bottom: 6px;
}
.je-detail-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: 0;
}
.je-detail-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.je-detail-body {
  margin-top: 18px;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.65;
}
.je-detail-body p { margin: 0 0 12px; }
.je-detail-body p:last-child { margin-bottom: 0; }

.je-detail-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
}
.je-detail-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.je-detail-mood {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}
.je-detail-doc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
}
.je-detail-shared-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
}
.je-shared-status {
  margin-left: auto;
  font-size: 10px;
  color: var(--color-green);
  font-weight: 600;
}

.je-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
}
.je-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.je-action-btn:active { background: var(--color-surface-alt); }
.je-action-btn.je-action-danger { color: var(--color-red); border-color: #f0d0d0; }

/* ── J4: Report Builder ── */
.report-builder-hero {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #faf5ee 100%);
  border-radius: var(--radius-lg);
  margin-top: 10px;
}
.rb-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.rb-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.rb-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 6px;
}

.rb-section {
  margin-top: 20px;
}
.rb-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.rb-period-row {
  display: flex;
  gap: 10px;
}
.rb-period-field {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.rb-period-label {
  display: block;
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.rb-period-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.rb-source-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}
.rb-source-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rb-source-journal { background: #e8f0fe; color: #3a6ea5; }
.rb-source-watch   { background: var(--color-primary-light); color: var(--color-primary); }
.rb-source-vault   { background: #edf7f0; color: #3a7a52; }
.rb-source-info { flex: 1; }
.rb-source-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
}
.rb-source-stat {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.rb-checklist { display: flex; flex-direction: column; gap: 8px; }
.rb-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

/* ── J5: Voice Entry ── */
.voice-entry-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0 20px;
}
.voice-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(107, 92, 231, 0.12);
}
.voice-ring-active {
  animation: voicePulse 1.5s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 92, 231, 0.25); }
  50% { box-shadow: 0 0 0 16px rgba(107, 92, 231, 0); }
}
.voice-ring-inner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-status {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 12px;
}
.voice-duration {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.voice-transcript-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 16px;
}
.voice-transcript-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.voice-transcript-text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.6;
  margin: 0;
}

.voice-ai-classify {
  background: var(--color-primary-light);
  border: 1px solid #e0d9f7;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 12px;
}
.voice-ai-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.voice-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.voice-ai-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}

.voice-action-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}
.voice-stop-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.voice-stop-btn:active { background: var(--color-surface-alt); }

/* ── Journal Home Prompt ── */
.journal-home-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  transition: transform 0.12s ease;
}
.journal-home-prompt:active { transform: scale(0.98); }
.jhp-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.jhp-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}


/* ═══════════════════════════════════════════
   THE COMPASS (Resource Discovery)
   ═══════════════════════════════════════════ */

/* ── CO1: Compass Feed ── */
.compass-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.compass-saved-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}
.compass-saved-btn:active { opacity: 0.7; }

.compass-personalized {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-primary-dark);
}

.compass-urgency-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-amber-bg);
  border: 1px solid var(--color-amber-border);
  border-radius: var(--radius-md);
  margin-top: 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-amber);
}

/* Resource card (shared: feed + home) */
.compass-resource-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 10px;
  transition: transform 0.12s ease;
}
.compass-resource-card:active { transform: scale(0.985); }
.compass-card-compact { padding: 12px; }
.compass-card-compact .cr-desc { display: none; }

.cr-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cr-category-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.cr-cat-benefits   { background: #edf7f0; color: #3a7a52; }
.cr-cat-financial  { background: #e8f0fe; color: #3a6ea5; }
.cr-cat-legal      { background: var(--color-primary-light); color: var(--color-primary-dark); }
.cr-cat-housing    { background: #fef6e8; color: #a86b1d; }
.cr-cat-education  { background: #f3edf7; color: #7b5ea7; }

.cr-urgency-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.cr-tag-urgent { background: #fce8e8; color: #c53030; }
.cr-new-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.cr-saved-icon { margin-left: auto; }

.cr-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
}
.cr-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.cr-match {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.cr-time {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* ── CO2: Resource Detail ── */
.compass-bookmark-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
}
.compass-bookmark-btn:active { color: var(--color-primary); }

.co-detail-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: 0;
}
.co-detail-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

.co-eligibility-banner {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}
.co-eligible { background: #edf7f0; border: 1px solid #c8e6d0; }
.co-elig-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-elig-content { flex: 1; }
.co-elig-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #2d6a4f;
}
.co-elig-desc {
  font-size: var(--text-xs);
  color: #52796f;
  margin-top: 2px;
  line-height: 1.45;
}
.co-elig-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
}

.co-deadline-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-amber-bg);
  border: 1px solid var(--color-amber-border);
  border-radius: var(--radius-md);
  margin-top: 10px;
  font-size: var(--text-xs);
  color: var(--color-amber);
}
.co-deadline-text { flex: 1; font-size: var(--text-xs); color: var(--color-text-primary); }
.co-deadline-text strong { color: var(--color-amber); }
.co-add-watch-btn {
  background: none;
  border: 1px solid var(--color-amber);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-amber);
  cursor: pointer;
  white-space: nowrap;
}
.co-add-watch-btn:active { opacity: 0.7; }

.co-detail-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
}
.co-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.co-section-text {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: 1.6;
  margin: 0 0 10px;
}
.co-section-text:last-child { margin-bottom: 0; }

.co-covers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.co-cover-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
}

/* Steps */
.co-steps { display: flex; flex-direction: column; gap: 0; }
.co-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.co-step:last-child { border-bottom: none; }
.co-step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-step-content { flex: 1; }
.co-step-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.co-step-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}

/* Doc links */
.co-doc-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
}
.co-doc-link-row:last-child { border-bottom: none; }
.co-doc-link-row.co-doc-missing { color: var(--color-text-secondary); }
.co-doc-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-green-light);
  color: var(--color-green);
}
.co-doc-badge.co-doc-needed {
  background: var(--color-amber-bg);
  color: var(--color-amber);
}

.co-action-row { margin-top: 20px; }
.co-secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  margin-top: 8px;
}
.co-secondary-btn:active { background: var(--color-surface-alt); }

/* ── CO3: Saved Resources ── */
.co-empty-hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── CO4: Eligibility Check ── */
.co-elig-checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 14px;
}
.co-elig-criterion {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.co-elig-criterion:last-child { border-bottom: none; }
.co-elig-check {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-elig-check-unknown { background: var(--color-amber); }
.co-elig-crit-content { flex: 1; }
.co-elig-crit-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.co-elig-crit-source {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.co-elig-pass .co-elig-crit-source { color: var(--color-green); }

.co-elig-result {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #edf7f0;
  border: 1px solid #c8e6d0;
  border-radius: var(--radius-lg);
  margin-top: 16px;
}
.co-elig-result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-elig-result-content { flex: 1; }
.co-elig-result-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #2d6a4f;
}
.co-elig-result-desc {
  font-size: var(--text-xs);
  color: #52796f;
  line-height: 1.5;
  margin-top: 4px;
}


/* ═══════════════════════════════════════════
   ME / ACCOUNT
   ═══════════════════════════════════════════ */

/* ── ME1: Me Hub ── */
.me-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.me-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.me-profile-info { flex: 1; }
.me-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}
.me-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}
.me-edit-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.me-edit-btn:active { background: var(--color-surface-alt); }

.me-plan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  margin-top: 10px;
}
.me-plan-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.me-plan-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
}
.me-plan-status {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.me-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 22px;
  margin-bottom: 8px;
}

.me-menu-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.me-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: none;
  border-bottom: 1px solid var(--color-border-light);
  background: none;
  cursor: pointer;
  text-align: left;
}
.me-menu-item:last-child { border-bottom: none; }
.me-menu-item:active { background: var(--color-surface-alt); }

.me-menu-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-secondary);
}
.me-menu-icon-nav {
  background: none;
  width: auto;
  height: auto;
}
.me-nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.me-menu-text {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.me-menu-text-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.me-menu-subtext {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}
.me-menu-badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-green);
  margin-right: 4px;
}
.me-menu-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.me-app-info {
  text-align: center;
  margin-top: 24px;
  font-size: 10px;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.me-app-info p { margin: 0; }

/* ── ME2: Account Settings ── */
.acct-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}
.acct-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.acct-change-photo {
  background: none;
  border: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  margin-top: 8px;
}

.acct-form {
  display: flex;
  flex-direction: column;
}
.acct-field {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.acct-field:last-child { border-bottom: none; }
.acct-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.acct-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.acct-value {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-weight: 500;
}
.acct-edit-link {
  background: none;
  border: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.acct-danger-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}
.acct-danger-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border: 1px solid #f0d0d0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-red);
  text-align: left;
  cursor: pointer;
}
.acct-danger-btn:active { background: #fef5f5; }

/* ── ME3 & ME4: Notification / Privacy rows ── */
.notif-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.notif-row:last-child { border-bottom: none; }
.notif-info { flex: 1; }
.notif-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}
.notif-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* ── Bottom Nav: Me avatar ── */
.nav-avatar-small {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-text-muted);
  color: white;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.nav-item.active .nav-avatar-small {
  background: var(--color-primary);
}


/* ═══════════════════════════════════════════
   CO5: Compass → Watch Bridge
   ═══════════════════════════════════════════ */
.co5-header {
  text-align: center;
  padding: 16px 0 12px;
}
.co5-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.co5-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.co5-icon-compass { background: var(--color-primary); }
.co5-icon-watch { background: var(--color-amber); }
.co5-arrow { color: var(--color-text-muted); }
.co5-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.co5-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

.co5-deadline-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 14px;
}
.co5-dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.co5-dl-source {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-primary);
}
.co5-dl-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.35;
}
.co5-dl-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-light);
}
.co5-dl-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.co5-dl-countdown {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-amber);
}

.co5-section {
  margin-top: 20px;
}
.co5-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.co5-section-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: 10px;
  font-style: italic;
}

/* Checklist */
.co5-checklist { display: flex; flex-direction: column; gap: 0; }
.co5-check-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.co5-check-item:last-child { border-bottom: none; }
.co5-check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.co5-check-content { flex: 1; }
.co5-check-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.co5-check-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Doc rows */
.co5-doc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.co5-doc-row:last-child { border-bottom: none; }
.co5-doc-name {
  flex: 1;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
}
.co5-doc-missing .co5-doc-name { color: var(--color-text-secondary); }
.co5-doc-status {
  font-size: 9px;
  font-weight: 700;
  color: var(--color-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.co5-doc-needed {
  color: var(--color-amber);
}

/* Alert chips */
.co5-alert-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.co5-alert-chip {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
}
.co5-alert-chip.co5-alert-active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* ── Onboarding Location Field ── */
.ob-location-field {
  margin-top: 6px;
}
.ob-zip-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ob-zip-input {
  width: 110px;
  flex-shrink: 0;
}
.ob-locate-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  white-space: nowrap;
}
.ob-locate-btn:active { background: var(--color-surface-alt); }
.ob-location-result {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-green);
}
.ob-helper-location {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
  margin-bottom: 12px;
  line-height: 1.4;
}


/* ═══════════════════════════════════════════
   CARE PROFILE EXPANSION
   ═══════════════════════════════════════════ */

/* ── CP2: Profile Overview ── */
.cp2-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-top: 8px;
}
.cp2-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cp2-id-info { flex: 1; }
.cp2-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.cp2-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}
.cp2-edit-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  align-self: flex-start;
}

.cp2-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
}
.cp2-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cp2-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.cp2-edit-link {
  background: none;
  border: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.cp2-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cp2-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.cp2-powers-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--color-primary);
}

/* Med table */
.cp2-med-table { display: flex; flex-direction: column; }
.cp2-med-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.cp2-med-row:last-child { border-bottom: none; }
.cp2-med-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.cp2-med-detail {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* Comm preview */
.cp2-comm-grid { display: flex; flex-direction: column; gap: 8px; }
.cp2-comm-item {
  padding: 8px 12px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}
.cp2-comm-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cp2-comm-value {
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  margin-top: 2px;
  font-weight: 500;
}
.cp2-view-full {
  background: none;
  border: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  padding: 8px 0 0;
}

/* Sensory */
.cp2-sensory-grid { display: flex; flex-direction: column; gap: 8px; }
.cp2-sensory-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
}
.cp2-sensory-avoid { background: #fef6e8; }
.cp2-sensory-seeks { background: #edf7f0; }
.cp2-sensory-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.cp2-sensory-avoid .cp2-sensory-label { color: var(--color-amber); }
.cp2-sensory-seeks .cp2-sensory-label { color: var(--color-green); }
.cp2-sensory-value {
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Routines */
.cp2-routine-list { display: flex; flex-direction: column; }
.cp2-routine-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.cp2-routine-item:last-child { border-bottom: none; }
.cp2-routine-time {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  min-width: 56px;
}
.cp2-routine-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Providers */
.cp2-provider-list { display: flex; flex-direction: column; gap: 8px; }
.cp2-provider-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cp2-provider-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cp2-provider-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.cp2-provider-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── CP3: Edit Medications ── */
.cp3-med-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 12px;
}
.cp3-med-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cp3-med-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.cp3-med-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
}
.cp3-med-remove:active { color: var(--color-red); }

.cp3-field-row {
  display: flex;
  gap: 8px;
}
.cp3-field { flex: 1; }
.cp3-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.cp3-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-sizing: border-box;
}
.cp3-input-full { width: 100%; }

.cp3-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}
.cp3-add-btn:active { background: var(--color-primary-light); }

/* ── CP4: Communication Card ── */
.cp4-section {
  margin-top: 18px;
}
.cp4-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.cp4-comm-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
}
.cp4-comm-primary { background: var(--color-primary-light); }
.cp4-comm-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cp4-comm-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-dark);
}
.cp4-comm-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-top: 3px;
}

.cp4-method-list { display: flex; flex-direction: column; gap: 10px; }
.cp4-method {
  display: flex;
  gap: 10px;
}
.cp4-method-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 5px;
  flex-shrink: 0;
}
.cp4-method-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.cp4-method-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 1px;
}

.cp4-understand-list { display: flex; flex-direction: column; gap: 6px; }
.cp4-understand-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 6px 0;
}
.cp4-understand-yes { color: var(--color-green); }
.cp4-understand-no { color: var(--color-text-muted); }

.cp4-tips-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.cp4-tip {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.cp4-tip:last-child { border-bottom: none; }
.cp4-tip-num {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cp4-tip p {
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  line-height: 1.5;
  margin: 0;
}

.cp4-share-row {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.cp4-share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.cp4-share-btn:active { background: var(--color-surface-alt); }

/* ═══════════════════════════════════════════
   POLISH: Red File Expand, Translator Paths
   ═══════════════════════════════════════════ */

/* ── Red File Inline Expansion ── */
.rf-expandable { cursor: pointer; transition: all 0.2s ease; }
.rf-card-toggle { cursor: pointer; }
.rf-expand-arrow {
  transition: transform 0.2s ease;
  font-size: 20px;
}
.rf-expandable.rf-expanded .rf-expand-arrow {
  transform: rotate(90deg);
}

.rf-inline-preview {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 12px;
  padding-top: 12px;
}
.rf-preview-section {
  margin-bottom: 12px;
}
.rf-preview-section:last-of-type { margin-bottom: 0; }
.rf-preview-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.rf-preview-text {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  margin: 0;
}
.rf-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rf-allergy-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}
.rf-allergy-severe {
  background: rgba(255,80,80,0.3);
  color: #ffb0b0;
}
.rf-preview-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.rf-preview-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 0;
  width: 100%;
  font-size: var(--text-xs);
  font-weight: 600;
  color: white;
  cursor: pointer;
  text-align: center;
}
.rf-preview-btn:active { background: rgba(255,255,255,0.25); }

/* ── Vault Translator CTAs ── */
.vault-translate-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  background: var(--color-primary-light);
  border: 1px solid #e0d9f7;
  border-radius: var(--radius-md);
  transition: transform 0.12s ease;
}
.vault-translate-cta:active { transform: scale(0.98); }
.vtc-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vtc-content { flex: 1; }
.vtc-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
}
.vtc-desc {
  font-size: 10px;
  color: var(--color-text-secondary);
  margin-top: 1px;
}

.vault-understand-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #8578ed 100%);
  border-radius: var(--radius-lg);
  transition: transform 0.12s ease;
}
.vault-understand-cta:active { transform: scale(0.98); }
.vuc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vuc-content { flex: 1; }
.vuc-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: white;
}
.vuc-desc {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
  margin-top: 2px;
}


/* ═══════════════════════════════════════════
   MENU HUB
   ═══════════════════════════════════════════ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.menu-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.12s ease;
  text-align: center;
}
.menu-grid-item:active { transform: scale(0.96); }
.menu-grid-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mgi-vault     { background: #e8f7f0; color: var(--color-primary); border: 1px solid rgba(65,189,140,0.5); }
.mgi-journal   { background: #e8f0fe; color: #3a6ea5; border: 1px solid rgba(58,110,165,0.5); }
.mgi-watch     { background: #fef6e8; color: var(--color-amber); border: 1px solid rgba(254,178,0,0.5); }
.mgi-compass   { background: #edf7f0; color: var(--color-green); border: 1px solid rgba(93,155,130,0.5); }
.mgi-handoff   { background: #f3edf7; color: #7b5ea7; border: 1px solid rgba(123,94,167,0.5); }
.mgi-translator{ background: #fce8e8; color: #b94a3e; border: 1px solid rgba(185,74,62,0.5); }

.menu-grid-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-primary);
}
.menu-grid-meta {
  font-size: 9px;
  color: var(--color-text-muted);
  line-height: 1.3;
}
.menu-grid-live { color: var(--color-green); font-weight: 600; }

/* ── Me avatar outline style ── */
.nav-avatar-outline {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 1.8px solid #6b6560;
  color: #4a5568;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.nav-item.active .nav-avatar-outline {
  color: var(--color-primary);
  border-color: var(--color-primary);
}


/* ═══════════════════════════════════════════
   TOM'S VIEW (Care Recipient Integration)
   ═══════════════════════════════════════════ */

/* ── TV Header ── */
.tv-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.tv-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tv-name {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.tv-date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ── Who is with me ── */
.tv-whowithme {
  margin-top: 16px;
  padding: 14px;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
}
.tv-wwm-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.tv-wwm-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tv-wwm-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tv-wwm-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ── Visual Schedule ── */
.tv-schedule-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 20px;
  margin-bottom: 10px;
}
.tv-schedule {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tv-schedule-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tv-time-block {
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}
.tv-time {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.tv-period {
  font-size: 9px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.tv-done .tv-time,
.tv-done .tv-period { color: var(--color-text-muted); }

.tv-activity-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  position: relative;
}
.tv-activity-done {
  background: var(--color-surface-alt);
  opacity: 0.65;
}
.tv-activity-now {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  border-width: 2px;
}
.tv-now-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  color: white;
  background: var(--color-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tv-activity-icon {
  font-size: 24px;
}
.tv-activity-text {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tv-check-done {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Quick Actions ── */
.tv-quick-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.tv-quick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.tv-quick-btn:active { transform: scale(0.95); }
.tv-quick-icon { font-size: 24px; }
.tv-quick-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}

/* ── TV2: Choice Board ── */
.tv-choice-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 8px 0 0;
}
.tv-choice-cats {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 16px;
}
.tv-cat-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.tv-cat-active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.tv-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tv-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 8px;
  background: var(--color-surface);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.tv-choice-card:active { transform: scale(0.95); }
.tv-choice-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.tv-choice-emoji { font-size: 36px; }
.tv-choice-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.tv-choice-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-choice-confirm {
  text-align: center;
  margin-top: 16px;
  padding: 14px;
  background: var(--color-green-light);
  border-radius: var(--radius-lg);
}
.tv-confirm-text {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tv-confirm-sub {
  font-size: var(--text-xs);
  color: var(--color-green);
  margin-top: 4px;
}
.tv-confirm-btn { margin-top: 12px; }

/* ── TV3: Mood / Feelings ── */
.tv-mood-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 4px;
  margin-bottom: 16px;
}
.tv-mood-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tv-mood-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 4px;
  background: var(--color-surface);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tv-mood-card:active { transform: scale(0.93); }
.tv-mood-selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.tv-mood-emoji { font-size: 32px; }
.tv-mood-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ── SDM prompt in Journal (J2) ── */
.sdm-prompt {
  background: var(--color-primary-light);
  border: 1px solid #e0d9f7;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 14px;
}
.sdm-prompt-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}
.sdm-prompt-question {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}
.sdm-options { display: flex; flex-direction: column; gap: 6px; }
.sdm-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  cursor: pointer;
}
.sdm-option.sdm-selected {
  border-color: var(--color-primary);
  background: white;
}
.sdm-radio {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
}
.sdm-selected .sdm-radio {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: inset 0 0 0 3px white;
}

/* ── Tom's View menu card ── */
.tv-menu-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #f0edfb 0%, #edf7f0 100%);
  border: 1px solid #e0d9f7;
  border-radius: var(--radius-lg);
  transition: transform 0.12s ease;
}
.tv-menu-card:active { transform: scale(0.98); }
.tv-menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tv-menu-content { flex: 1; }
.tv-menu-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.tv-menu-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}


/* ═══════════════════════════════════════════
   TV4: Manage Tom's Boards
   ═══════════════════════════════════════════ */
.board-section {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
}
.board-section:first-of-type { border-top: none; margin-top: 14px; }
.board-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.board-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.board-emoji { font-size: 18px; }
.board-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.board-items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.board-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  position: relative;
}
.board-item-supervised {
  border-color: var(--color-amber-border);
  background: #fffcf5;
}
.board-supervised-badge {
  font-size: 7px;
  font-weight: 700;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: -2px;
}
.board-item-emoji { font-size: 22px; }
.board-item-name {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.2;
}
.board-item-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  opacity: 0.6;
}
.board-item-remove:active { opacity: 1; color: var(--color-red); }

.board-item-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 8px;
  background: none;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-primary);
}
.board-item-add:active { background: var(--color-primary-light); }
.board-add-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-item-add .board-item-name {
  color: var(--color-primary);
}

.board-restriction {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--color-amber);
  font-weight: 500;
  line-height: 1.4;
}
.board-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}

.board-insight {
  margin-top: 20px;
  padding: 14px;
  background: var(--color-primary-light);
  border: 1px solid #e0d9f7;
  border-radius: var(--radius-lg);
}
.board-insight-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}
.board-insight-text {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ── CP2 boards preview ── */
.cp2-boards-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cp2-board-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
}

/* ── TV1: Action Cards (replaces quick actions) ── */
.tv-action-cards {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.tv-action-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.tv-action-card:active { transform: scale(0.95); }
.tv-action-emoji { font-size: 36px; }
.tv-action-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}
.tv-action-choose {
  background: linear-gradient(135deg, #fef6e8 0%, #fff8ee 100%);
  border: 2px solid #fcd9a8;
}
.tv-action-choose .tv-action-label { color: #8a5a10; }
.tv-action-feel {
  background: linear-gradient(135deg, #f0edfb 0%, #f7f5fd 100%);
  border: 2px solid #d9d3f5;
}
.tv-action-feel .tv-action-label { color: var(--color-primary-dark); }

/* ── TV2: Edit board link ── */
.tv-edit-board-link {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  padding: 4px 0;
}
.tv-edit-board-link:active { opacity: 0.7; }

/* ── TV4: Self-direction toggle ── */
.board-self-direction {
  margin-top: 14px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.board-sd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.board-sd-info { flex: 1; }
.board-sd-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.board-sd-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.board-sd-alt {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-light);
  font-size: 10px;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.board-sd-alt svg { flex-shrink: 0; margin-top: 1px; }

/* ── Tom's View: Guardian Toggle ── */
.tv-guardian-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
.tv-guardian-toggle:active {
  background: var(--color-surface-alt);
  color: var(--color-primary);
}


/* ═══════════════════════════════════════════
   TV5: My Safety (Guardian-Invisible)
   ═══════════════════════════════════════════ */
.tv5-header {
  text-align: center;
  padding: 12px 0 8px;
}
.tv5-shield {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #4d9e6b 0%, #3a7a52 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.tv5-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.tv5-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.tv5-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.tv5-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease;
}
.tv5-action-card:active { transform: scale(0.97); }
.tv5-card-help {
  background: linear-gradient(135deg, #fef6e8 0%, #fff8ee 100%);
  border: 2px solid #fcd9a8;
}
.tv5-card-unsafe {
  background: linear-gradient(135deg, #fce8e8 0%, #fff0f0 100%);
  border: 2px solid #f0c0c0;
}
.tv5-card-call {
  background: linear-gradient(135deg, #edf7f0 0%, #f0faf3 100%);
  border: 2px solid #c0e0ca;
}
.tv5-action-emoji { font-size: 32px; flex-shrink: 0; }
.tv5-action-label {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
}
.tv5-action-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.tv5-contacts {
  margin-top: 24px;
}
.tv5-contacts-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.tv5-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.tv5-contact-card:last-child { border-bottom: none; }
.tv5-contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tv5-contact-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tv5-contact-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.tv5-privacy {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: #edf7f0;
  border: 1px solid #c8e6d0;
  border-radius: var(--radius-lg);
  margin-top: 20px;
}
.tv5-privacy-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #4d9e6b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tv5-privacy-text {
  font-size: var(--text-xs);
  color: #2d6a4f;
  line-height: 1.6;
}
.tv5-privacy-text strong {
  font-weight: 700;
  color: #1b4332;
}

/* Safety icon on TV1 */
.tv-safety-btn {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  z-index: 5;
  opacity: 0.6;
}
.tv-safety-btn:active {
  opacity: 1;
  color: #4d9e6b;
}


/* ═══════════════════════════════════════════
   H3: Start Shift + H4: Quick Shift Log
   ═══════════════════════════════════════════ */

/* ── H3: Start Shift ── */
.h3-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 14px;
}
.h3-welcome-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-user-blue);
  color: white;
  font-size: var(--text-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.h3-welcome-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.h3-welcome-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.h3-prev-shift {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 4px;
}
.h3-prev-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 10px;
}
.h3-prev-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.h3-prev-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.h3-summary-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.h3-summary-item:last-child { border-bottom: none; }
.h3-summary-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.h3-summary-text {
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  line-height: 1.5;
  margin: 0;
}
.h3-watch-for {
  background: #fef6e8;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 4px;
  border-bottom: none;
}

.h3-tom-data {
  margin-top: 16px;
}
.h3-tom-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.h3-tom-items {
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.h3-tom-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
}

.h3-pending {
  margin-top: 16px;
}
.h3-pending-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.h3-pending-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.h3-pending-task:last-child { border-bottom: none; }
.h3-pending-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.h3-pending-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* ── H4: Quick Shift Log ── */
.h4-quick-chips {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.h4-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.h4-chip-active {
  background: #0862E1;
  color: white;
  border-color: #0862E1;
}

.h4-input-area {
  margin-top: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.h4-time-stamp {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.h4-textarea {
  width: 100%;
  border: none;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-family: inherit;
  resize: none;
  outline: none;
  background: none;
  box-sizing: border-box;
}
.h4-textarea::placeholder { color: var(--color-text-muted); }

.h4-recent-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 20px;
  margin-bottom: 10px;
}

.h4-feed { display: flex; flex-direction: column; }
.h4-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}
.h4-feed-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 48px;
  text-align: right;
  margin-top: 2px;
}
.h4-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  margin-top: 5px;
  flex-shrink: 0;
}
.h4-feed-dot-med { background: var(--color-green); }
.h4-feed-dot-tom { background: var(--color-primary); }
.h4-feed-content {
  flex: 1;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  line-height: 1.5;
}
.h4-feed-content p { margin: 0; }

/* Tom's View data in shift notes */
.shift-note-tom {
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-top: 4px;
}
.shift-note-tom .shift-note-text {
  color: var(--color-primary-dark);
}


/* ═══════════════════════════════════════════
   ME5: My Tools
   ═══════════════════════════════════════════ */

.tools-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 22px;
  margin-bottom: 4px;
}
.tools-section-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.tools-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.tool-row:last-child { border-bottom: none; }

.tool-row-locked {
  background: var(--color-bg);
}

.tool-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-icon-off {
  background: var(--color-border-light);
  color: var(--color-text-muted);
}

.tool-info {
  flex: 1;
  min-width: 0;
}
.tool-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.tool-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin-top: 1px;
}

.tool-always-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  padding: 3px 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
}

.tool-toggle {
  flex-shrink: 0;
}

.toggle-switch {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--color-border);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle-switch.on {
  background: var(--color-primary);
}
.toggle-knob {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch.on .toggle-knob {
  transform: translateX(18px);
}

.tools-footer-note {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
  padding: 0 8px;
}

/* ── Contextual unlock card on Home ── */
.unlock-card {
  background: var(--color-primary-light);
  border: 1px solid rgba(107, 92, 231, 0.15);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 8px;
  position: relative;
}
.unlock-card-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(107, 92, 231, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1;
}
.unlock-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.unlock-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}
.unlock-card-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}
.unlock-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.unlock-card-btn {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.unlock-card-btn-primary {
  background: var(--color-primary);
  color: white;
}
.unlock-card-btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}


/* ═══════════════════════════════════════════
   Platform Improvements — CSS
   ═══════════════════════════════════════════ */

/* ── V7: Vault Upload Error State ── */
.error-state-container {
  text-align: center;
  padding-top: 40px;
}
.error-state-icon {
  margin-bottom: 16px;
}
.error-state-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.error-state-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 6px;
  line-height: 1.5;
  padding: 0 12px;
}
.error-state-details {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-top: 20px;
  text-align: left;
}
.error-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.error-detail-row:last-child { border-bottom: none; }
.error-detail-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.error-detail-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
}
.error-detail-reason {
  color: var(--color-amber);
}
.error-help-note {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 16px;
}

/* ── Next Shift Indicator (H1) ── */
.next-shift-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 8px 16px 10px;
  border-top: 1px solid var(--color-border-light);
}
.next-shift-indicator strong {
  color: var(--color-text-primary);
}

/* ── Journal Search Bar ── */
.journal-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  padding: 9px 14px;
  margin-bottom: 10px;
}
.journal-search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  font-family: inherit;
  outline: none;
}
.journal-search-input::placeholder {
  color: var(--color-text-muted);
}

/* ── Translator Medical Disclaimer ── */
.tr-medical-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding: 8px 12px;
  background: #fef6e8;
  border-radius: var(--radius-md);
  margin-top: 8px;
  margin-bottom: 12px;
}
.tr-medical-disclaimer svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── End Shift Button (distinct styling) ── */
.btn-end-shift {
  background: var(--color-amber) !important;
  border-color: var(--color-amber) !important;
}

/* ═══════════════════════════════════════════
   Prototype Navigation Hint
   ═══════════════════════════════════════════ */

.proto-hint {
  background: #f0edfb;
  border-bottom: 1px solid rgba(107, 92, 231, 0.15);
  padding: 8px 16px;
  position: relative;
  z-index: 100;
}
.proto-hint-content {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 800px;
  margin: 0 auto;
}
.proto-hint-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.proto-hint-text {
  font-size: 12px;
  color: #359E74;
  line-height: 1.4;
  font-family: 'Satoshi', -apple-system, sans-serif;
}
.proto-hint-text strong {
  font-weight: 700;
}
.proto-hint-dismiss {
  background: none;
  border: none;
  font-size: 18px;
  color: #359E74;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  opacity: 0.6;
}
.proto-hint-dismiss:hover {
  opacity: 1;
}
.proto-hint.hidden {
  display: none;
}


/* ═══════════════════════════════════════════
   Color Refresh — Icon Backgrounds
   ═══════════════════════════════════════════ */

/* Home setup card icons with pastel backgrounds */
.hsc-icon[style*="icon-orange-bg"] {
  border-radius: var(--radius-md);
  padding: 8px;
}
.hsc-icon[style*="icon-blue-bg"] {
  border-radius: var(--radius-md);
  padding: 8px;
}
.hsc-icon[style*="icon-coral-bg"] {
  border-radius: var(--radius-md);
  padding: 8px;
}


/* ═══════════════════════════════════════════
   Color Overhaul — Additional Styles
   ═══════════════════════════════════════════ */

/* User message bubbles in Ask — blue */
.ask-msg-bubble-user {
  background: var(--color-user-blue) !important;
  color: white !important;
}

/* AI elements keep purple */
.ask-ai-avatar,
.ask-msg-bubble-ai .ask-source-card,
.ask-proactive-icon {
  /* These reference var(--color-ai-purple) */
}
.ask-ai-avatar {
  background: var(--color-ai-purple) !important;
}

/* Navigator avatar override */
.nav-avatar {
  background: var(--color-primary);
}

/* Compass new-style bubbles — stroke + text #5D9B82, no fill */
.compass-bubble {
  border: 1.5px solid #5D9B82;
  color: #5D9B82;
  background: transparent;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}

/* Override end-shift button with new green CTA */
.btn-end-shift {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

/* Active chip uses new green */
.chip.active, .chip-active {
  background: #EBF3FE !important;
  border-color: #0862E1 !important;
  color: #0862E1 !important;
}

/* Toggle switch uses blue for on state */
.toggle-switch.on {
  background: #0862E1 !important;
}

/* Watch/deadline dot colors */
.deadline-days, .watch-days {
  color: var(--color-amber);
}


/* ═══════════════════════════════════════════
   Red File Share Flow (RFS1, RFS2, RFS3)
   ═══════════════════════════════════════════ */

/* QR Section */
.rfs-qr-section { text-align: center; padding: 20px 0 16px; }
.rfs-qr-code { margin-bottom: 8px; }
.rfs-qr-label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: 600;
  margin-bottom: 10px;
}
.rfs-link-display, .rfs-link-url-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  max-width: 280px;
  margin: 0 auto;
}
.rfs-link-text {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-family: monospace;
}
.rfs-link-url-box span {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-family: monospace;
  flex: 1;
}
.rfs-copy-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-primary);
  background: none;
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* Share options */
.rfs-options-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
}
.rfs-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  cursor: pointer;
}
.rfs-option-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rfs-option-info { flex: 1; }
.rfs-option-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.rfs-option-desc {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.rfs-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
}
.rfs-security-note svg { flex-shrink: 0; margin-top: 1px; }

/* ID Card Preview */
.rfs-card-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.rfs-id-card {
  border: 2px dashed var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  background: white;
  /* Aspect ratio approximates 3.375:2.125 */
  aspect-ratio: 3.375 / 2.125;
  display: flex;
  flex-direction: column;
}
.rfs-card-header {
  background: #b94a3e;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rfs-card-header-text {
  font-size: 8px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rfs-card-body {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  flex: 1;
}
.rfs-card-photo {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-green);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.rfs-card-info { flex: 1; }
.rfs-card-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.rfs-card-detail {
  font-size: 8px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.rfs-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #f8f8f8;
  border-top: 1px solid var(--color-border-light);
}
.rfs-card-scan-text { flex: 1; }

/* Card back */
.rfs-id-card-back {
  padding: 8px 10px;
  font-size: 8px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}
.rfs-card-back-title {
  font-size: 8px;
  font-weight: 800;
  color: #b94a3e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-border-light);
}
.rfs-card-back-row {
  display: flex;
  gap: 6px;
  padding: 3px 0;
  font-size: 7.5px;
}
.rfs-card-back-label {
  font-weight: 700;
  color: var(--color-text-primary);
  min-width: 55px;
  font-size: 7px;
  text-transform: uppercase;
}
.rfs-card-back-note {
  font-size: 6.5px;
  color: var(--color-text-muted);
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--color-border-light);
  line-height: 1.5;
}
.rfs-print-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Placement tips */
.rfs-placement-tips { margin-top: 20px; }
.rfs-placement-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.rfs-placement-item {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.rfs-placement-item:last-child { border-bottom: none; }

/* Link management */
.rfs-link-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  margin-top: 8px;
}
.rfs-link-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}
.rfs-link-status-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.rfs-link-status-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.rfs-link-url-box {
  margin-top: 8px;
  max-width: 100%;
}

/* Access log */
.rfs-log-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 20px 0 8px;
}
.rfs-log-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.rfs-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.rfs-log-item:last-child { border-bottom: none; }
.rfs-log-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rfs-log-icon-view { background: #e8f0fe; color: #3a6ea5; }
.rfs-log-icon-create { background: var(--color-primary-light); color: var(--color-primary); }
.rfs-log-text {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-primary);
}
.rfs-log-meta {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Manage buttons */
.rfs-manage-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.rfs-manage-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
}
.rfs-manage-refresh {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.rfs-manage-revoke {
  background: #fce8e8;
  color: #b94a3e;
}

/* Phone numbers — cyan color */
.rf-contact-phone,
.rfb-contact-phone,
a[href^="tel:"] {
  color: #08BDE1 !important;
  text-decoration: none;
}

/* Text links (not CTA buttons) — blue #0862E1 */
.btn-text-link,
.btn-text-center,
.section-see-all,
.watch-link,
.selection-card-link,
.invite-link-text,
.me-menu-badge,
.journal-report-btn {
  color: #0862E1 !important;
}
.report-btn {
  color: #0862E1 !important;
  border-color: #0862E1 !important;
}
.report-btn svg {
  stroke: #0862E1;
}
/* Keep CTA buttons green — btn-primary-full, btn-primary-block use background */

/* Text links on dark backgrounds — light blue */
.screen-dark .btn-text-link,
.screen-dark .btn-text-center,
.screen-dark .selection-card-link,
.ob-dark-header + div .btn-text-link {
  color: #8BBBFF !important;
}

/* ═══════════════════════════════════════════
   Visual Impact Pass
   ═══════════════════════════════════════════ */

/* ── 1. Card Depth Hierarchy ── */

/* Primary action cards — stronger shadow */
.red-file-nudge-card,
.shift-card,
.watch-discover-card,
.home-navigator-card,
.unlock-card,
.tv-menu-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
}

/* Secondary cards — subtle border only, no shadow */
.home-setup-card,
.me-menu-group,
.journal-stat,
.rfs-option,
.rfs-log-list,
.rfs-link-status,
.tools-group {
  box-shadow: none;
  border: 1px solid var(--color-border-light);
}

/* Interactive cards on hover/press — lift effect */
.home-setup-card:active,
.menu-grid-item:active,
.rfs-option:active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: scale(0.98);
  transition: all 0.12s ease;
}

/* Menu grid cards — consistent subtle depth */
.menu-grid-item {
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

/* ── 2. Consistent Icon Weight ── */
/* All screen content SVG icons use 1.8 stroke weight */
/* Nav and small utility icons use 2.0 */
/* This is already mostly consistent — enforce it */

.screen svg:not(.nav-item svg) {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Menu grid icons — slightly larger for better readability */
.menu-grid-icon {
  width: 44px;
  height: 44px;
}
.menu-grid-icon svg {
  width: 22px;
  height: 22px;
}

/* ── 3. Bottom Nav Refinement ── */

/* Slightly larger touch targets and bolder text */
.nav-item {
  gap: 3px;
  font-weight: 600;
  color: #8896A6;
  padding: 4px 10px;
  transition: color 0.15s ease;
}
.nav-item svg {
  color: #8896A6;
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
  transition: color 0.15s ease;
}

/* Active state — filled background pill behind icon */
.nav-item.active {
  color: #0862E1;
  font-weight: 700;
}
.nav-item.active svg {
  color: #0862E1;
  stroke-width: 2.2;
}

/* Active indicator dot under active tab */
.nav-item.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0862E1;
  margin-top: 2px;
}

/* Nav avatar (Me tab) — active state */
.nav-avatar-outline {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #8896A6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #8896A6;
  transition: all 0.15s ease;
}
.nav-item.active .nav-avatar-outline {
  border-color: #0862E1;
  color: #0862E1;
  background: #EBF3FE;
}

/* Slightly more padding on bottom nav */
.bottom-nav {
  padding: 10px 0 2px;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE — Direct phone viewing
   ═══════════════════════════════════════════ */

@media (max-width: 500px) {
  /* Remove phone frame when viewed on actual phone */
  body {
    background: var(--color-bg);
    padding: 0;
  }
  .proto-hint {
    font-size: 11px;
    padding: 6px 12px;
  }
  .tab-groups {
    display: flex;
    flex-wrap: wrap;
    padding: 6px 8px;
    gap: 4px;
  }
  .tab-group-btn {
    font-size: 10px;
    padding: 4px 8px;
  }
  .sub-tab-container {
    padding: 4px 8px;
  }
  .sub-tab-btn {
    font-size: 9px;
    padding: 3px 6px;
  }
  .phone-frame {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 0;
  }
  .screen {
    min-height: calc(100vh - 200px);
  }
  .scroll-spacer,
  .scroll-spacer-sm {
    height: 20px;
  }

  /* ── Care Profile cards — stack powers badge below ── */
  .cp-section-card {
    flex-wrap: wrap;
    gap: 8px;
  }
  .cp-powers {
    white-space: normal;
    flex-shrink: 1;
    margin-left: 40px; /* align with text after icon */
    font-size: 9px;
  }

  /* ── Home setup cards — prevent squish ── */
  .home-setup-card {
    gap: 10px;
  }
  .hsc-desc {
    font-size: 11px;
  }

  /* ── Menu grid — responsive ── */
  .menu-grid {
    gap: 8px;
  }
  .menu-grid-item {
    padding: 12px 8px;
  }

  /* ── Circle member cards — stack on narrow screens ── */
  .member-card {
    flex-wrap: wrap;
    gap: 8px;
  }
  .role-badge {
    margin-left: 48px;
  }

  /* ── Watch deadline rows ── */
  .deadline-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  /* ── Handoff shift card ── */
  .shift-card-content {
    flex-wrap: wrap;
  }
  .shift-name {
    font-size: 15px;
  }

  /* ── Ask actions — full width ── */
  .ask-action-btn {
    font-size: 12px;
    padding: 10px 12px;
  }

  /* ── Red File Share — QR section ── */
  .rfs-qr-code svg {
    width: 100px;
    height: 100px;
  }
  .rfs-link-display,
  .rfs-link-url-box {
    max-width: 100%;
  }

  /* ── ID Card preview — fit screen ── */
  .rfs-id-card {
    aspect-ratio: auto;
    height: auto;
  }

  /* ── Journal entries ── */
  .je-title {
    font-size: 13px;
  }
  .je-preview {
    font-size: 11px;
  }

  /* ── Compass personalized badge ── */
  .compass-personalized {
    flex-wrap: wrap;
    font-size: 9px;
  }

  /* ── Translator sections ── */
  .tr-plain-section {
    padding: 12px;
  }

  /* ── General text sizing ── */
  .screen-title-sm {
    font-size: 22px;
  }
  .ob-light-title {
    font-size: 20px;
  }
  .page-subtitle {
    font-size: 12px;
  }

  /* ── Bottom nav — stick to bottom on mobile ── */
  .bottom-nav {
    padding: 8px 0 6px;
    font-size: 9px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
  }
  .nav-item {
    min-width: 44px;
  }
  /* Add padding at bottom of screens so content isn't hidden behind fixed nav */
  .screen {
    padding-bottom: 70px;
  }
  .scroll-spacer,
  .scroll-spacer-sm {
    height: 80px;
  }

  /* ── Form inputs — proper sizing ── */
  .form-input,
  .form-select {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 12px;
  }

  /* ── Onboarding dark screens — full bleed ── */
  .screen-dark,
  .screen.no-pad {
    border-radius: 0;
  }
  .ob-dark-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* ── My Tools toggles ── */
  .tool-row {
    gap: 10px;
    padding: 12px;
  }
  .tool-desc {
    font-size: 10px;
  }
}


/* ===============================================
   Red File AI Additions (RFA1-RFA5)
   =============================================== */

/* RFA1: Readiness Score */
.rfa-readiness {
  text-align: center;
  padding: 20px 0 16px;
}
.rfa-readiness-icon { margin-bottom: 8px; }
.rfa-readiness-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.rfa-readiness-sub {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 4px;
  line-height: 1.5;
  padding: 0 8px;
}

.rfa-sections-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 12px 0 8px;
}
.rfa-section-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.rfa-section-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.rfa-section-item:last-child { border-bottom: none; }
.rfa-section-status { flex-shrink: 0; margin-top: 2px; }
.rfa-section-info { flex: 1; min-width: 0; }
.rfa-section-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.rfa-section-meta {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.rfa-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.rfa-badge-complete {
  background: #E8F7F0;
  color: #41BD8C;
}
.rfa-badge-improve {
  background: #FFF8E5;
  color: #C49000;
}

.rfa-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  font-size: 10px;
  color: #1A6BB5;
  line-height: 1.4;
  background: #EBF3FE;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.rfa-suggestion svg { flex-shrink: 0; margin-top: 2px; }

/* RFA2: Improvement Flow */
.rfa-current-label, .rfa-edit-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 16px 0 6px;
}
.rfa-current-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
}

.rfa-ai-label { margin: 16px 0 6px; }
.rfa-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #EBF3FE;
  color: #1A6BB5;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}
.rfa-ai-suggestion {
  background: #F0F7FF;
  border: 1px solid #D0E3F7;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: var(--text-xs);
  color: var(--color-text-primary);
  line-height: 1.55;
}
.rfa-ai-suggestion strong { font-weight: 700; }

.rfa-edit-field {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: var(--text-xs);
  font-family: inherit;
  color: var(--color-text-primary);
  line-height: 1.55;
  resize: none;
  outline: none;
  background: var(--color-surface);
  box-sizing: border-box;
}
.rfa-edit-field:focus { border-color: #1A6BB5; }

.rfa-hitl-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  color: #1A6BB5;
  line-height: 1.5;
  padding: 10px 12px;
  background: #EBF3FE;
  border-radius: var(--radius-md);
  margin-top: 12px;
}
.rfa-hitl-notice svg { flex-shrink: 0; margin-top: 1px; }

.btn-outline-light {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: none;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

/* RFA3: Confirmation */
.rfa-confirm-icon { margin-bottom: 12px; }
.rfa-confirm-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.rfa-confirm-sub {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 4px;
}
.rfa-confirm-summary {
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-top: 20px;
}
.rfa-confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-light);
}
.rfa-confirm-row:last-child { border-bottom: none; }
.rfa-confirm-row svg { flex-shrink: 0; }
.rfa-improved strong { color: #1A6BB5; }
.rfa-confirm-note {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* RFA4: Card Generation Offer */
.rfa-card-offer-icon { margin-bottom: 12px; }
.rfa-card-offer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}
.rfa-card-offer-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 6px;
  line-height: 1.5;
  padding: 0 12px;
}
.rfa-card-offer-preview {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.rfa-mini-card {
  width: 140px;
  height: 88px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.rfa-mini-card-header {
  height: 14px;
  background: #b94a3e;
}
.rfa-mini-card-body {
  display: flex;
  gap: 6px;
  padding: 6px;
}
.rfa-mini-card-photo {
  width: 20px; height: 20px;
  border-radius: 4px;
  background: var(--color-green);
  color: white;
  font-size: 7px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rfa-mini-card-lines { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.rfa-mini-line {
  height: 3px;
  background: var(--color-border-light);
  border-radius: 2px;
}
.rfa-mini-card-qr {
  height: 16px;
  background: #f8f8f8;
  border-top: 1px solid var(--color-border-light);
}

/* RFA5: One-Page Emergency Summary */
.rfa-summary-page {
  border: 2px dashed var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.rfa-summary-header {
  background: #b94a3e;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rfa-summary-body { padding: 12px; }
.rfa-summary-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 10px;
}
.rfa-summary-photo {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--color-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rfa-summary-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.rfa-summary-detail {
  font-size: 8px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.rfa-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rfa-summary-cell {
  padding: 6px;
  background: #FAFAF8;
  border-radius: 4px;
}
.rfa-summary-cell-label {
  font-size: 7px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.rfa-summary-cell-value {
  font-size: 8.5px;
  color: var(--color-text-primary);
  line-height: 1.4;
}
.rfa-summary-footer-note {
  font-size: 7px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
}

/* Placement tips */
.rfa-placement { margin-top: 20px; }
.rfa-placement-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.rfa-placement-item {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.rfa-placement-item:last-child { border-bottom: none; }

.rfa-update-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 16px;
}


/* ===============================================
   Care Recipient Data Rights
   =============================================== */

/* OB12: Consent/Stewardship */
.ob12-question {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 14px;
}
.ob12-option {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.ob12-option-selected {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}
.ob12-option-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ob12-option-content { flex: 1; }
.ob12-option-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
}
.ob12-option-desc {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  line-height: 1.45;
  margin-top: 3px;
}
.ob12-reassurance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
  margin-top: 14px;
}
.ob12-reassurance svg { flex-shrink: 0; margin-top: 1px; }

/* TV6: Tom's Data Rights */
.tv-data-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: 4px;
}
.tv-data-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
  margin-bottom: 16px;
}

.tv-data-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tv-data-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.tv-data-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tv-data-card-info { flex: 1; min-width: 0; }
.tv-data-card-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tv-data-card-who {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}
.tv-data-card-status {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.tv-status-shared {
  background: #E8F7F0;
  color: #41BD8C;
}
.tv-status-private {
  background: #EBF3FE;
  color: #0862E1;
}

/* Flag button */
.tv-data-flag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: #FFF8E5;
  border: 1px solid rgba(254,178,0,0.3);
  border-radius: var(--radius-lg);
  margin-top: 16px;
}
.tv-data-flag-icon { flex-shrink: 0; }
.tv-data-flag-content { flex: 1; }
.tv-data-flag-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tv-data-flag-desc {
  font-size: 10px;
  color: var(--color-text-secondary);
  margin-top: 1px;
}
.tv-data-flag-btn {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: #FEB200;
  color: white;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* Advocate */
.tv-data-advocate { margin-top: 20px; }
.tv-data-advocate-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.tv-data-advocate-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.tv-data-advocate-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.tv-data-advocate-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}
.tv-data-advocate-role {
  font-size: 10px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 1px;
}

.tv-data-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 20px;
  padding: 10px 12px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}
.tv-data-note svg { flex-shrink: 0; margin-top: 1px; }

/* ===== ONBOARDING PROGRESS BAR ===== */
.ob-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 10;
}
.screen-dark .ob-progress-bar {
  background: rgba(255,255,255,0.12);
}
.screen:not(.screen-dark) .ob-progress-bar {
  background: #e8e6e2;
}
.ob-progress-fill {
  height: 100%;
  background: #41BD8C;
  border-radius: 0 2px 2px 0;
  transition: width 0.4s ease;
}

/* ===== EMPTY STATE SCREENS ===== */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 24px;
}
.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.empty-state-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px 0;
}
.empty-state-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0;
  max-width: 300px;
}
.empty-state-preview {
  margin-top: 32px;
  padding: 16px;
  background: var(--color-card-bg, #FAF7F7);
  border-radius: 12px;
  width: 100%;
  max-width: 300px;
}
.empty-state-preview-label {
  font-size: 11px;
  color: #999;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.empty-state-folder {
  padding: 8px 14px;
  background: white;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.empty-state-sample-card {
  padding: 12px;
  background: white;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ===== SKELETON / SHIMMER LOADING ===== */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0eeec 25%, #e8e5e2 50%, #f0eeec 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  margin-bottom: 8px;
}
.skeleton-line:last-child {
  width: 60%;
}
.skeleton-block {
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0eeec 25%, #e8e5e2 50%, #f0eeec 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  margin-bottom: 12px;
}

/* Enhanced thinking dots */
.ask-thinking-dots span {
  animation: pulse-dot 1.4s infinite ease-in-out;
}
.ask-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.ask-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* Translator progress animation */
.tr-check-pending {
  animation: pulse-check 1.5s infinite ease-in-out;
}
@keyframes pulse-check {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ===== COMMUNICATION PROFILE BUILDER ===== */
.cpb-draft-section {
  margin-top: 16px;
  background: #f0faf5;
  border-radius: 12px;
  overflow: hidden;
}
.cpb-draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(65, 189, 140, 0.1);
}
.cpb-draft-label {
  font-size: 13px;
  font-weight: 700;
  color: #2d8a66;
}
.cpb-edit-btn {
  font-size: 12px;
  color: var(--color-primary);
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-weight: 600;
}
.cpb-draft-content {
  padding: 12px 14px;
}
.cpb-draft-content p {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}
.cpb-draft-content ul {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.7;
}
.cpb-draft-content li {
  margin-bottom: 2px;
}

/* Language selection */
.cpb-lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-card-bg, #FAF7F7);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.cpb-lang-option.cpb-lang-selected {
  background: #e8f6f1;
  border: 1.5px solid #41BD8C;
}
.cpb-lang-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #41BD8C;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cpb-lang-unchecked {
  background: transparent;
  border: 2px solid #ccc;
}
.cpb-lang-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}
.cpb-lang-status {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
}
.cpb-lang-approved {
  color: #41BD8C;
}

/* Red File Communication Section (first responder view) */
.rf-comm-section {
  margin: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #1a3a4a;
}
.rf-comm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(65, 189, 140, 0.2);
}
.rf-comm-header span {
  font-size: 13px;
  font-weight: 700;
  color: #41BD8C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rf-comm-body {
  padding: 10px 14px;
}
.rf-comm-item {
  margin-bottom: 10px;
}
.rf-comm-item:last-child {
  margin-bottom: 0;
}
.rf-comm-label {
  font-size: 11px;
  font-weight: 700;
  color: #41BD8C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.rf-comm-avoid .rf-comm-label {
  color: #FF6439;
}
.rf-comm-text {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  margin: 0;
}

/* Gentle spin for processing screen */
@keyframes gentle-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* AI badge small */
.ai-badge-sm {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #e8f6f1;
  color: #2d8a66;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== COMMUNICATION SECTION V2 (First Responder View) ===== */
.rf-comm-section-v2 {
  margin: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #0d2b2b;
  border: 2px solid #3d7a5f;
}
.rf-comm-header-v2 {
  padding: 12px 16px;
  background: #3d7a5f;
  font-size: 15px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
}
.rf-comm-body-v2 {
  padding: 14px 16px;
}
.rf-comm-item-v2 {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(61, 122, 95, 0.25);
}
.rf-comm-item-v2:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.rf-comm-sublabel {
  font-size: 11px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.rf-comm-sublabel-avoid {
  color: #FF6439;
}
.rf-comm-avoid-v2 {
  background: rgba(255, 100, 57, 0.08);
  margin-left: -16px;
  margin-right: -16px;
  margin-bottom: -14px;
  padding: 12px 16px;
  border-radius: 0 0 8px 8px;
}
.rf-comm-text-v2 {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
  margin: 0;
}

/* ===== PROACTIVE RED FILE INTELLIGENCE ===== */
/* Suggestion card on Home Dashboard */
.pri-card {
  background: white;
  border-radius: 12px;
  border-left: 3px solid #3d7a5f;
  padding: 14px 16px;
  margin-top: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.pri-label {
  font-size: 10px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.pri-observation {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0 0 12px 0;
}
.pri-actions {
  display: flex;
  gap: 10px;
}
.pri-btn-review {
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
  background: transparent;
  border: 1.5px solid #3d7a5f;
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
}
.pri-btn-dismiss {
  font-size: 13px;
  font-weight: 500;
  color: #999;
  background: transparent;
  border: none;
  padding: 7px 12px;
  cursor: pointer;
}

/* Review screen panels */
.rfupdate-panel {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.rfupdate-current {
  background: #f5f4f2;
  border: 1px solid #e0dfdc;
}
.rfupdate-new {
  background: #eef8f3;
  border: 1.5px solid #3d7a5f;
}
.rfupdate-panel-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 8px;
}
.rfupdate-label-new {
  color: #3d7a5f;
}
.rfupdate-panel-content {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}
.rfupdate-hitl {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eef8f3;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 16px;
}
.rfupdate-hitl svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.rfupdate-hitl span {
  font-size: 13px;
  color: #3d7a5f;
  line-height: 1.5;
}
.rfupdate-ghost-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #888;
  background: transparent;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}

/* ===== PATTERN OBSERVATIONS (Care Journal) ===== */
.po-card {
  background: white;
  border: 1px solid #e8e6e2;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
}
.po-label {
  font-size: 10px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.po-observation {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0 0 6px 0;
}
.po-context {
  font-size: 10px;
  color: #999;
  margin: 0 0 12px 0;
}
.po-actions {
  display: flex;
  gap: 10px;
}
.po-btn-save {
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.po-btn-dismiss {
  font-size: 13px;
  font-weight: 500;
  color: #999;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.po-card-empty {
  background: white;
}
.po-empty-msg {
  font-size: 13px;
  color: #999;
  line-height: 1.55;
  margin: 0;
}

/* Save observation preview */
.jp-preview-card {
  background: #eef8f3;
  border-left: 3px solid #3d7a5f;
  border-radius: 10px;
  padding: 14px 16px;
}
.jp-preview-text {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0 0 6px 0;
}
.jp-preview-context {
  font-size: 11px;
  color: #888;
  margin: 0;
}

/* ===== TRANSITION INTELLIGENCE CARD ===== */
.ti-card {
  background: white;
  border: 1px solid #e8e6e2;
  border-left: 3px solid #b45309;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 16px;
}
.ti-label {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.ti-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px 0;
}
.ti-body {
  font-size: 13px;
  color: #888;
  line-height: 1.55;
  margin: 0 0 12px 0;
}
.ti-btn {
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ===== SHARED HITL NOTICE BLOCK ===== */
/* Replaces rfupdate-hitl — used by Red File update, Journal patterns, and any future HITL context */
.hitl-notice-block {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eef8f3;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 16px;
}
.hitl-notice-block svg {
  flex-shrink: 0;
  margin-top: 1px;
}
.hitl-notice-block span {
  font-size: 13px;
  color: #3d7a5f;
  line-height: 1.5;
}

/* ===== TOM'S VIEW PRIVACY BAR ===== */
.tv-privacy-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f0edfb;
  font-size: 11px;
  font-weight: 600;
  color: #5C2AE4;
}
.tv-privacy-bar svg {
  color: #5C2AE4;
  stroke: #5C2AE4;
}

/* ===== RED FILE CLOSE BUTTON ===== */
.rf-close-bar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 0;
}
.rf-close-btn-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== JUDGE FEATURES CARD ===== */
.judge-features-card {
  background: white;
  border: 1px solid #e8e6e2;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
}
.judge-feature-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.judge-feature-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--color-card-bg, #FAF7F7);
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}
.judge-feature-btn:active {
  background: #eee;
}

/* ===== CPB3 DELAYED BUTTON ===== */
.cpb3-delayed-btn {
  animation: fadeInBtn 0.6s ease 2.5s forwards;
}
@keyframes fadeInBtn {
  to {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ===== ASK EXPANDED — SUGGESTED CHIPS ===== */
.ask-suggest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.ask-suggest-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: var(--color-card-bg, #FAF7F7);
  border: 1px solid #e8e6e2;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}
.ask-suggest-chip:active {
  background: #eee;
}
.ask-suggest-chip svg {
  flex-shrink: 0;
}
.ask-helper-text {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin: 12px 0 16px;
  line-height: 1.4;
}

/* ===== ASK ANSWER TYPE LABELS ===== */
.ask-type-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ask-type-docs {
  color: #3d7a5f;
}
.ask-type-platform {
  color: #3d7a5f;
}
.ask-type-general {
  color: #999;
}

/* ===== ASK PLATFORM CARD ===== */
.ask-platform-card {
  background: #f0f6f3;
  border-left: 3px solid #3d7a5f;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}
.ask-platform-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.ask-platform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(61,122,95,0.12);
  cursor: pointer;
}
.ask-platform-row:last-of-type {
  border-bottom: none;
}
.ask-platform-row-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ask-platform-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.ask-platform-row-meta {
  font-size: 11px;
  color: #888;
}
.ask-platform-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

/* Schedule avatar in Handoff card */
.ask-schedule-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* Deadline dot in Watch card */
.ask-dl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== ASK PROVIDER CARD (Medical Boundary) ===== */
.ask-provider-card {
  background: white;
  border-left: 3px solid #b45309;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ask-provider-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fef3e8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ask-provider-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}
.ask-provider-role {
  font-size: 11px;
  color: #888;
}
.ask-provider-phone {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #08BDE1;
  text-decoration: none;
}
.ask-provider-source {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

/* Not medical advice label */
.ask-not-medical {
  font-size: 10px;
  color: #999;
  margin: 10px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== ASK FOLLOW-UP CHIPS ===== */
.ask-followup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}
.ask-followup-chip {
  padding: 8px 14px;
  background: transparent;
  border: 1.5px solid #d4d1ca;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #3d7a5f;
  cursor: pointer;
  line-height: 1.3;
}
.ask-followup-chip:active {
  background: #f0f6f3;
}

/* ===== WATCH EXPANDED — CATEGORY BADGES ===== */
.watch-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.watch-badge-appt {
  background: #e8f6f1;
  color: #3d7a5f;
}
.watch-badge-med {
  background: #ede8f5;
  color: #6b4fa5;
  padding: 4px 6px;
}
.watch-chip-appt.chip { color: #3d7a5f; }
.watch-chip-meds.chip { color: #6b4fa5; }

/* Watch appointment and medication cards */
.watch-card-appt { border-left: 3px solid #3d7a5f; }
.watch-card-med { border-left: 3px solid #ede8f5; }
.watch-med-check {
  width: 24px; height: 24px; border-radius: 50%;
  background: #41BD8C; color: white;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.watch-med-pending {
  width: 24px; height: 24px; border-radius: 50%;
  background: #ede8f5; color: #6b4fa5;
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* FAB Bottom Sheet */
.watch-fab-sheet {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-end;
  z-index: 100;
}
.watch-fab-content {
  width: 100%;
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px 28px;
}
.watch-fab-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
}
.watch-fab-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  border-bottom: 1px solid #f0eeec;
  cursor: pointer;
  text-align: left;
}
.watch-fab-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.watch-fab-opt-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.watch-fab-opt-desc {
  font-size: 12px;
  color: #888;
  margin-top: 1px;
}
.watch-fab-cancel {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
}

/* ===== APPOINTMENT ENTRY FORM ===== */
.wa-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wa-type-chip {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-card-bg, #FAF7F7);
  border: 1.5px solid #e0e0e0;
  cursor: pointer;
}
.wa-type-active {
  background: #3d7a5f;
  color: white;
  border-color: #3d7a5f;
}
.wa-autofill-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  background: #eef8f3;
  border-radius: 8px;
  font-size: 12px;
  color: #3d7a5f;
  cursor: pointer;
}
.wa-datetime-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.wa-datetime-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 10px 12px;
  background: var(--color-card-bg, #FAF7F7);
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 13px;
  color: var(--color-text);
  font-weight: 600;
}
.wa-reminder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wa-reminder-chip {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  background: transparent;
  border: 1.5px solid #ddd;
  cursor: pointer;
}
.wa-reminder-active {
  color: #3d7a5f;
  border-color: #3d7a5f;
  background: #eef8f3;
}
.wa-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.wa-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.wa-toggle-sub {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.wa-toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #ddd;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.wa-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.wa-export-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-export-text {
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
}

/* Confirmation summary */
.wa-summary-card {
  background: var(--color-card-bg, #FAF7F7);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  width: 100%;
  max-width: 280px;
}
.wa-cal-export-btn {
  font-size: 12px;
  font-weight: 600;
  color: #3d7a5f;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* Detail actions */
.wa-mark-done-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #3d7a5f;
  background: transparent;
  border: 1.5px solid #3d7a5f;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}
.wa-delete-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #b94a3e;
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
}

/* ===== MEDICATION SCREENS ===== */
.wm-caregiver-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.wm-caregiver-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.wm-cg-active {
  border-color: #6b4fa5;
  background: #f8f5fc;
}
.wm-cg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
}
.wm-confirm-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: #3d7a5f;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
}
.wm-note-expand {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #3d7a5f;
  background: none;
  border: none;
  cursor: pointer;
}
.wm-skip-link {
  margin-top: 24px;
  font-size: 13px;
  font-weight: 500;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
}
.wm-skip-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  background: transparent;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}

/* Red File visit rows */
.rf-visit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* Dashboard medication row */
.dl-card-med {
  border-left: 3px solid #ede8f5;
}

/* Watch section labels */
.watch-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== RED FILE FINDABILITY SYSTEM ===== */

/* RFF-1 Header */
.rff-header {
  background: #3d7a5f;
  padding: 32px 24px 24px;
  text-align: center;
}
.rff-header-shield {
  margin-bottom: 12px;
}
.rff-header-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0 0 4px;
}
.rff-header-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

/* Explanation card */
.rff-explain-card {
  background: white;
  border: 1px solid #e8e6e2;
  border-radius: 12px;
  padding: 14px 16px;
}
.rff-explain-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}
.rff-explain-body {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin: 0;
}

/* Section label */
.rff-section-label {
  font-size: 10px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 16px 0 10px;
}

/* Placement option cards */
.rff-option-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: white;
  border: 1px solid #e8e6e2;
  border-left: 3px solid #3d7a5f;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.rff-option-coming {
  border-left-color: #ddd;
  border-style: dashed;
  opacity: 0.7;
}
.rff-option-left {
  display: flex;
  gap: 12px;
  flex: 1;
}
.rff-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e8f6f1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rff-option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}
.rff-option-desc {
  font-size: 11px;
  color: #888;
  line-height: 1.5;
}
.rff-option-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 6px;
}
.rff-badge-important {
  background: #e8f6f1;
  color: #3d7a5f;
}
.rff-badge-phase2 {
  background: #f0f0f0;
  color: #999;
}
.rff-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.rff-checked {
  background: #3d7a5f;
  border-color: #3d7a5f;
}

/* RFF-2 Generating */
.rff-gen-list {
  width: 100%;
  max-width: 280px;
}
.rff-gen-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0eeec;
}
.rff-gen-row:last-child { border-bottom: none; }
.rff-gen-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3d7a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rff-gen-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}
.rff-gen-badge {
  font-size: 11px;
  font-weight: 700;
  color: #41BD8C;
}

/* RFF-3 Material cards */
.rff-material-card {
  background: white;
  border: 1px solid #e8e6e2;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.rff-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.rff-preview-sticker {
  background: #3d7a5f;
}
.rff-preview-inner-sticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.rff-preview-fridge {
  background: #f8f7f5;
}
.rff-preview-inner-fridge {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 10px;
  width: 120px;
}
.rff-preview-wallet {
  background: #1a2a3a;
}
.rff-preview-inner-wallet {
  background: #2a3a4a;
  border-radius: 6px;
  padding: 8px 10px;
  width: 160px;
}
.rff-preview-qr-sm {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin-top: 4px;
  background-image: repeating-conic-gradient(rgba(255,255,255,0.5) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
}
.rff-material-info {
  padding: 12px 14px;
}
.rff-material-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}
.rff-material-placement {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 10px;
}
.rff-material-placement svg { flex-shrink: 0; margin-top: 2px; }
.rff-download-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
  background: transparent;
  border: 1.5px solid #3d7a5f;
  border-radius: 8px;
  cursor: pointer;
}

/* RFF-4 Summary */
.rff-summary-card {
  background: var(--color-card-bg, #FAF7F7);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  max-width: 280px;
}
.rff-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid #f0eeec;
}
.rff-summary-row:last-child { border-bottom: none; }

/* RFAW-1 First Responder Awareness */
.rfaw-fullscreen {
  background: #3d7a5f;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 28px;
}
.rfaw-shield {
  margin-bottom: 24px;
}
.rfaw-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin: 0 0 16px;
  line-height: 1.3;
}
.rfaw-body {
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  margin: 0 0 32px;
  max-width: 320px;
}
.rfaw-cta {
  padding: 16px 40px;
  font-size: 17px;
  font-weight: 700;
  color: #3d7a5f;
  background: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
}
.rfaw-footer {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 40px;
  max-width: 280px;
  line-height: 1.5;
}

/* Home5 materials warning */
.rf-materials-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
}
.rf-materials-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b45309;
  flex-shrink: 0;
}

/* RFA1 materials row */
.rfa-materials-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: #fef8f0;
  border-radius: 10px;
  border: 1px solid #f0e4d0;
}
.rfa-materials-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.rfa-materials-status {
  display: block;
  font-size: 11px;
  color: #b45309;
}

/* ===== ASK COMMAND INTERFACE ===== */

/* Command chip on ask1 */
.ask-cmd-chip {
  border-color: #3d7a5f !important;
}

/* Command label */
.ask-cmd-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Command confirmation card */
.ask-cmd-card {
  background: white;
  border-left: 3px solid #3d7a5f;
  border-radius: 12px;
  padding: 14px;
  margin-top: 4px;
}
.ask-cmd-text {
  font-size: 14px;
  color: #2c2925;
  line-height: 1.55;
  margin: 0 0 14px 0;
}
.ask-cmd-primary {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  background: #3d7a5f;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
}
.ask-cmd-secondary {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6b6560;
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
}

/* Success state */
.ask-cmd-success {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #e6f7ed;
  border-radius: 10px;
  padding: 14px;
}
.ask-cmd-success svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.ask-cmd-success-text {
  font-size: 14px;
  color: #2c2925;
  line-height: 1.5;
  margin: 0;
}

/* Role clarification chips */
.ask-cmd-role-chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ask-cmd-role-chip {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #3d7a5f;
  background: transparent;
  border: 1.5px solid #3d7a5f;
  border-radius: 20px;
  cursor: pointer;
}
.ask-cmd-role-chip:active {
  background: #e8f6f1;
}

/* Editable text field */
.ask-cmd-editable {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #2c2925;
  line-height: 1.5;
  background: #f7f6f2;
  border: 1.5px solid #3d7a5f;
  border-radius: 8px;
  resize: none;
  min-height: 56px;
  box-sizing: border-box;
}
.ask-cmd-meta {
  font-size: 11px;
  color: #6b6560;
  margin: 8px 0 14px 0;
}

/* ===== UPDATE 1A: RED FILE GAP CARD ===== */
.rf-gap-card {
  display: flex;
  gap: 12px;
  background: white;
  border-left: 3px solid #b94a3e;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rf-gap-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fdf0ef;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rf-gap-content { flex: 1; }
.rf-gap-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c2925;
  margin-bottom: 2px;
}
.rf-gap-sub {
  font-size: 12px;
  color: #6b6560;
  line-height: 1.5;
  margin-bottom: 10px;
}
.rf-gap-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rf-gap-primary {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: #3d7a5f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.rf-gap-dismiss {
  font-size: 12px;
  font-weight: 500;
  color: #6b6560;
  background: none;
  border: none;
  cursor: pointer;
}

/* ===== UPDATE 2: ASK COMMAND CHIP V2 ===== */
.ask-cmd-chip-v2 {
  border-color: #3d7a5f !important;
  background: #f0f7f4 !important;
  flex-direction: row !important;
  gap: 8px !important;
}
.ask-cmd-chip-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.ask-cmd-badge {
  font-size: 9px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== UPDATE 3: TOM'S VIEW WARM OVERHAUL ===== */
.tv-warm-screen {
  background: #fffdf5 !important;
}
.tv-warm-screen .scroll-content {
  background: #fffdf5;
}
.tv-privacy-bar-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff5e6;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
}
.tv-privacy-bar-v2 svg {
  stroke: #b45309;
}
.tv-header-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 16px;
}
.tv-avatar-v2 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #b45309;
  color: white;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.tv-greeting-v2 {
  font-size: 28px;
  font-weight: 700;
  color: #2c2925;
  margin: 0 0 2px;
}
.tv-date-v2 {
  font-size: 16px;
  color: #6b6560;
  margin: 0;
}
.tv-back-guardian {
  padding: 12px 16px;
  position: sticky;
  bottom: 0;
  background: #fffdf5;
}
.tv-back-guardian-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #6b6560;
  background: white;
  border: 1.5px solid #e0dcda;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
}

/* Tom's View warm overrides for action cards */
.tv-warm-screen .tv-action-card {
  background: white;
  border: 1px solid #f0ece8;
}
.tv-warm-screen .tv-action-label {
  font-size: 16px;
}
.tv-warm-screen .tv-wwm-label {
  font-size: 16px;
}

/* ===== UPDATE 5: DEMO PATH BAR ===== */
.demo-path-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
  background: #f7f6f2;
  overflow-x: auto;
}
.demo-path-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.demo-path-chips {
  display: flex;
  gap: 6px;
}
.demo-path-chip {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: #3d7a5f;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
}
.demo-path-chip:active {
  background: #2d5a45;
}

/* ===== TOM'S VIEW — VISUAL SCHEDULE TIMELINE ===== */
.tv-timeline {
  position: relative;
  padding-left: 0;
}
.tv-tl-item {
  display: grid;
  grid-template-columns: 64px 24px 1fr;
  gap: 0;
  align-items: center;
  min-height: 64px;
  margin-bottom: 4px;
}
.tv-tl-time {
  font-size: 14px;
  font-weight: 600;
  color: #6b6560;
  text-align: right;
  padding-right: 8px;
}
.tv-tl-time-now {
  color: #3d7a5f;
  font-weight: 700;
}
.tv-tl-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  height: 100%;
  justify-content: center;
}
.tv-tl-dot-wrap::before {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #e0dcda;
}
.tv-tl-item:first-child .tv-tl-dot-wrap::before { top: 50%; }
.tv-tl-item:last-child .tv-tl-dot-wrap::before { bottom: 50%; }
.tv-tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e0dcda;
  border: 2px solid #fffdf5;
  position: relative;
  z-index: 1;
}
.tv-tl-dot-done {
  background: #b8d4c8;
}
.tv-tl-dot-now {
  background: #3d7a5f;
  width: 14px;
  height: 14px;
  box-shadow: 0 0 0 4px rgba(61,122,95,0.15);
}
.tv-tl-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: white;
  border-radius: 12px;
  margin-left: 8px;
  border: 1px solid #f0ece8;
}
.tv-tl-card-now {
  border-color: #3d7a5f;
  background: #f0f7f4;
  box-shadow: 0 2px 8px rgba(61,122,95,0.1);
}
.tv-tl-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tv-tl-label {
  font-size: 16px;
  font-weight: 600;
  color: #2c2925;
}
.tv-tl-now-badge {
  margin-left: auto;
  padding: 3px 10px;
  background: #3d7a5f;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tv-tl-past .tv-tl-label {
  color: #b0aaa5;
}
.tv-tl-past .tv-tl-card {
  opacity: 0.7;
}
.tv-tl-future .tv-tl-label {
  color: #2c2925;
}

/* ===== TIER 1: CRITICAL UX IMPROVEMENTS ===== */

/* 1.1 Onboarding value preview */
.obv-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.obv-preview-row:last-child { border-bottom: none; }
.obv-preview-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.obv-preview-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  text-align: left;
}

/* 1.2 Red File allergy alert badge */
.rf-allergy-alert {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: #b94a3e;
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

/* 1.3 Emergency contact phone number sizing */
.rf-contact-phone {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #08BDE1 !important;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  text-decoration: none;
}

/* 1.4 Reviewed by Amber badge */
.reviewed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #e6f7ed;
  border-radius: 8px;
  margin: 12px 16px;
}
.reviewed-badge span {
  font-size: 12px;
  font-weight: 600;
  color: #38a169;
}

/* 1.5 Touch target minimum enforcement */
.pri-btn-dismiss,
.po-btn-dismiss,
.po-btn-save,
.rf-gap-dismiss,
.ask-cmd-secondary,
.btn-text-link,
.btn-text-center,
.wa-delete-btn,
.wm-skip-link,
.wm-note-expand,
.ask-followup-chip,
.chip,
.wa-type-chip,
.wa-reminder-chip,
.ask-suggest-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Ensure filter chips have minimum tap target */
.watch-filters .chip,
.journal-filters .chip {
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* =================================================================== */
/* TOM'S VIEW EXPANSION (tv7 – tv11)                                   */
/* =================================================================== */
/* Emotional check-in flow + Tom's participation in Mom's decisions.   */
/* All screens use the existing .tv-warm-screen base (#fffdf5 cream    */
/* background) plus the amber privacy bar from tv1. New components    */
/* below extend that vocabulary with bigger touch targets and gentler */
/* pacing tuned for Tom's cognitive needs.                            */
/* =================================================================== */

/* ── Shared ─────────────────────────────────────────────── */

/* "Hi," small lead-in above the big "Tom" name on tv7. Mirrors the    */
/* dash-greeting-small pattern but stays inside the warm header.       */
.tv7-hi {
  font-size: 16px;
  color: #6b6560;
  margin: 0 0 -2px;
  font-weight: 500;
}

/* Headline + subtitle pair used by tv7/tv8/tv9/tv10. Centered.        */
.tv7-prompt,
.tv8-prompt,
.tv9-prompt,
.tv10-prompt {
  padding: 8px 16px 16px;
  text-align: center;
}
.tv7-prompt-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c2925;
  margin: 0 0 8px;
  line-height: 1.2;
}
.tv7-prompt-sub {
  font-size: 16px;
  color: #6b6560;
  margin: 0;
  line-height: 1.4;
}

/* ── TV-7  Tom's Home: 2x2 feeling tiles ─────────────────── */

.tv7-tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}
.tv7-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  /* 156px tall × 156px wide (on a 375px viewport) gives a 64px emoji
     plenty of room and clears the 44px touch-target floor by ~3.5x. */
  min-height: 156px;
  padding: 20px 14px;
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.12s ease;
  font-family: inherit;
}
.tv7-tile:active { transform: scale(0.96); }
.tv7-tile-emoji {
  font-size: 56px;
  line-height: 1;
}
.tv7-tile-label {
  font-size: 17px;
  font-weight: 700;
  color: #2c2925;
  text-align: center;
  line-height: 1.25;
}
/* Calm, distinct tints for each tile so Tom can recognize them by color
   as well as label. All are soft, warm, low-saturation. No alarm signals. */
.tv7-tile-good     { background: #e8f4ec; border-color: #c7e3d2; }
.tv7-tile-notgreat { background: #f4ebe1; border-color: #e6d6c0; }
.tv7-tile-question { background: #ecefe2; border-color: #d3dac0; }
.tv7-tile-need     { background: #f4e9e9; border-color: #e6cfcf; }

/* "My day" tappable card below the grid */
.tv7-myday-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 16px 16px 0;
  padding: 16px;
  background: white;
  border: 1px solid #f0ece8;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.tv7-myday-emoji  { font-size: 28px; line-height: 1; flex-shrink: 0; }
.tv7-myday-text   { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tv7-myday-title  { font-size: 16px; font-weight: 700; color: #2c2925; }
.tv7-myday-sub    { font-size: 14px; color: #6b6560; }
.tv7-myday-chev   { flex-shrink: 0; }

/* ── TV-8  Naming a Feeling: 3x2 feeling grid ────────────── */

.tv8-feeling-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.tv8-feeling {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 110px;
  padding: 14px 6px;
  background: white;
  border: 1.5px solid #ece6dd;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s ease;
  font-family: inherit;
}
.tv8-feeling:active { transform: scale(0.95); }
.tv8-feeling-emoji  { font-size: 36px; line-height: 1; }
.tv8-feeling-label {
  font-size: 13px;
  font-weight: 600;
  color: #2c2925;
  text-align: center;
  line-height: 1.25;
}
/* Persisted-selection state: thicker teal border + soft teal fill +
   checkmark badge in the upper-right corner. Demonstrates AI memory. */
.tv8-feeling-selected {
  border: 2.5px solid #3d7a5f;
  background: #e8f1eb;
  box-shadow: 0 2px 8px rgba(61,122,95,0.12);
}
.tv8-feeling-check {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3d7a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fffdf5;
}

/* Continue button: full-width primary CTA, teal */
.tv8-continue-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 24px 16px 8px;
  padding: 18px;
  background: #3d7a5f;
  color: white;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}
.tv8-continue-btn:active { background: #2f5f4a; }

/* ── TV-9  Voice Expression ──────────────────────────────── */

.tv9-mic-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Generous vertical room so the pulse rings have space to expand */
  padding: 28px 0 16px;
}

/* The mic itself: 150px circle with rich teal gradient.
   Rings live behind it via z-index. */
.tv9-mic-btn {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 30%, #5a9a7b 0%, #3d7a5f 60%, #2f5f4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(61,122,95,0.28);
  font-family: inherit;
}
.tv9-mic-btn:active { transform: scale(0.97); }
.tv9-mic-emoji {
  position: relative;
  z-index: 2;
  font-size: 56px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
}

/* Pulse rings: 3 expanding rings staggered across a 6s loop so it never
   feels frantic. Each ring is positioned absolute, scaled from 1 to 1.6,
   and faded out as it grows. pointer-events: none so they don't block taps. */
.tv9-mic-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(61,122,95,0.35);
  animation: tv9MicPulse 2.4s ease-out infinite;
  pointer-events: none;
}
.tv9-mic-ring-1 { animation-delay: 0s; }
.tv9-mic-ring-2 { animation-delay: 0.8s; }
.tv9-mic-ring-3 { animation-delay: 1.6s; }
@keyframes tv9MicPulse {
  0%   { transform: scale(1);    opacity: 0.45; }
  80%  { transform: scale(1.65); opacity: 0;    }
  100% { transform: scale(1.65); opacity: 0;    }
}

.tv9-status {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #2c2925;
  margin: 8px 0 4px;
}
.tv9-hint {
  text-align: center;
  font-size: 15px;
  color: #6b6560;
  margin: 0 0 20px;
}

/* 9-bar waveform centered. Each bar uses scaleY animation with a unique
   delay to look like real audio levels rather than a uniform sine wave. */
.tv9-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 48px;
  padding: 0 16px;
  margin-bottom: 24px;
}
.tv9-bar {
  display: inline-block;
  width: 5px;
  height: 32px;
  border-radius: 3px;
  background: #3d7a5f;
  transform-origin: center;
  animation: tv9Wave 1.2s ease-in-out infinite;
}
.tv9-bar:nth-child(1) { animation-delay: 0s;    }
.tv9-bar:nth-child(2) { animation-delay: 0.10s; }
.tv9-bar:nth-child(3) { animation-delay: 0.22s; }
.tv9-bar:nth-child(4) { animation-delay: 0.05s; }
.tv9-bar:nth-child(5) { animation-delay: 0.18s; }
.tv9-bar:nth-child(6) { animation-delay: 0.32s; }
.tv9-bar:nth-child(7) { animation-delay: 0.14s; }
.tv9-bar:nth-child(8) { animation-delay: 0.26s; }
.tv9-bar:nth-child(9) { animation-delay: 0.08s; }
@keyframes tv9Wave {
  0%, 100% { transform: scaleY(0.35); opacity: 0.7; }
  50%      { transform: scaleY(1.1);  opacity: 1;   }
}

/* Alt path card (type or pick pictures). Same shape as tv7-myday-card. */
.tv9-altpath-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 16px;
  background: white;
  border: 1px solid #f0ece8;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.tv9-altpath-emoji { font-size: 26px; line-height: 1; flex-shrink: 0; }
.tv9-altpath-text  { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tv9-altpath-title { font-size: 15px; font-weight: 700; color: #2c2925; }
.tv9-altpath-sub   { font-size: 13px; color: #6b6560; }

/* ── TV-10  AI Confirmation ──────────────────────────────── */

.tv10-card {
  margin: 8px 16px 16px;
  padding: 18px;
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 18px;
}
.tv10-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
/* Tiny round Covway mark (the C). Reuses brand teal. */
.tv10-cv-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3d7a5f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.tv10-card-caption {
  font-size: 12px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Verbatim quote: italic, teal left border, soft cream fill */
.tv10-quote {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-left: 4px solid #3d7a5f;
  background: #f7f3e8;
  font-size: 17px;
  font-style: italic;
  line-height: 1.5;
  color: #2c2925;
}

.tv10-summary-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.tv10-summary {
  margin: 0 0 14px;
  font-size: 15px;
  color: #2c2925;
  line-height: 1.5;
}

/* Recipient pill: teal-tinted card-within-card. */
.tv10-recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #e8f1eb;
  border-radius: 12px;
}
.tv10-recipient-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FEB200;       /* Amber's persona color (already used in prototype) */
  color: white;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tv10-recipient-name { font-size: 14px; font-weight: 700; color: #2c2925; }
.tv10-recipient-sub  { font-size: 12px; color: #6b6560; margin-top: 2px; }

/* Stacked action buttons — primary teal, secondary white */
.tv10-btn-primary {
  display: block;
  width: calc(100% - 32px);
  margin: 4px 16px 8px;
  padding: 18px;
  background: #3d7a5f;
  color: white;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}
.tv10-btn-primary:active { background: #2f5f4a; }
.tv10-btn-secondary {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 16px;
  background: white;
  color: #6b6560;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid #e0dcda;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* ── TV-11  Decision Review ──────────────────────────────── */

.tv11-eyebrow {
  margin: 4px 16px 4px;
  font-size: 13px;
  font-weight: 700;
  color: #b45309;            /* Amber persona color, mirrors privacy bar treatment */
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tv11-title {
  margin: 0 16px 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #2c2925;
}

.tv11-context-card {
  margin: 0 16px 20px;
  padding: 14px 16px;
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tv11-context-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tv11-context-emoji   { font-size: 24px; line-height: 1.2; flex-shrink: 0; }
.tv11-context-text    { flex: 1; }
.tv11-context-primary { font-size: 15px; font-weight: 600; color: #2c2925; line-height: 1.35; }
.tv11-context-sub     { font-size: 13px; color: #6b6560; margin-top: 2px; }

.tv11-options-heading {
  margin: 4px 16px 4px;
  font-size: 18px;
  font-weight: 700;
  color: #2c2925;
}
.tv11-options-sub {
  margin: 0 16px 12px;
  font-size: 14px;
  color: #6b6560;
}

.tv11-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  padding: 18px;
  background: white;
  border: 1.5px solid #ece6dd;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.12s ease;
}
.tv11-option:active { transform: scale(0.98); }
.tv11-option-emoji  { font-size: 36px; line-height: 1; flex-shrink: 0; }
.tv11-option-text   { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.tv11-option-title  { font-size: 16px; font-weight: 700; color: #2c2925; }
.tv11-option-sub    { font-size: 13px; color: #6b6560; line-height: 1.35; }
.tv11-option-chev   { flex-shrink: 0; }

/* ── Reduced motion: freeze pulses & waveform ────────────── */
@media (prefers-reduced-motion: reduce) {
  .tv9-mic-ring,
  .tv9-bar {
    animation: none;
  }
  .tv9-mic-ring { opacity: 0; }
  .tv9-bar      { transform: scaleY(0.7); opacity: 0.85; }
}

/* Tom's View status card on home5 (Amber's returning-user dashboard).
   Visually distinguished from caregiver action cards with an amber
   left accent matching Tom's persona color. */
.home-tomsview-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  padding: 14px 14px 14px 16px;
  background: #fffaef;
  border: 1px solid #f5e4c4;
  border-left: 4px solid #FEB200;
  border-radius: 14px;
}
.home-tomsview-status-card .htsc-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.home-tomsview-status-card .htsc-content { flex: 1; }
.home-tomsview-status-card .htsc-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.home-tomsview-status-card .htsc-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.3;
}
.home-tomsview-status-card .htsc-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: #6b6560;
  line-height: 1.4;
}

/* =================================================================== */
/* AGENTIC HANDOFFS (ah1 – ah4)                                        */
/* =================================================================== */
/* AI-powered medical-record handoff for new providers/transitions.    */
/* Shares the prototype's caregiver-side voice (denser than Tom's View */
/* but still warm). Lavender accents on entry points signal "AI does   */
/* work for you" without competing with the teal CTA / amber Tom       */
/* persona color elsewhere.                                            */
/* =================================================================== */

/* ── Shared headers ──────────────────────────────────────── */
.ah-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #5C2AE4;          /* lavender — agentic-feature accent */
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 6px;
}
.ah-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.25;
  margin: 0 0 8px;
}
.ah-subtitle {
  font-size: 15px;
  color: #6b6560;
  line-height: 1.5;
  margin: 0 0 18px;
}

/* Primary CTA reused across ah1, ah3, ah4 */
.ah-primary-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  background: #3d7a5f;
  color: white;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.ah-primary-btn:active { background: #2f5f4a; }

/* ── AH-1  Trigger: NL input quote + parsed chips + suggestions ── */
.ah1-input-card {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f3eee0;     /* warm cream — Amber's said-this surface */
  border: 1px solid #ece6dd;
  border-radius: 14px;
}
.ah1-input-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.ah1-quote {
  margin: 0 0 12px;
  padding: 0;
  font-size: 16px;
  font-style: italic;
  line-height: 1.5;
  color: #2c2925;
}
/* AI's parsed entities, surfaced inline. */
.ah1-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ah1-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: white;
  border: 1px solid #e0d8c8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #2c2925;
}

.ah1-prep-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 4px 0 10px;
}

/* Suggestion cards: tappable, with checkbox-like toggle on the right.
   "On" state shows the soft teal border + filled teal toggle. */
.ah1-suggest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  padding: 14px;
  background: white;
  border: 1.5px solid #ece6dd;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.12s ease;
}
.ah1-suggest-card:active { transform: scale(0.98); }
.ah1-suggest-on {
  border-color: #c7e1d3;
  background: #fbfdfb;
}
.ah1-suggest-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ah1-suggest-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ah1-suggest-title { font-size: 15px; font-weight: 700; color: #2c2925; }
.ah1-suggest-sub   { font-size: 13px; color: #6b6560; line-height: 1.35; }
.ah1-suggest-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3d7a5f;
  color: white;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── AH-2  AI Working: animated orb + step list ──────────── */
.ah2-orb-stage {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 16px auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Conic-gradient ring rotating slowly behind the orb. */
.ah2-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(61,122,95,0.05) 0deg, rgba(61,122,95,0.7) 90deg, rgba(61,122,95,0.05) 180deg, rgba(61,122,95,0.7) 270deg, rgba(61,122,95,0.05) 360deg);
  animation: ah2OrbRing 4s linear infinite;
  filter: blur(2px);
  opacity: 0.6;
}
@keyframes ah2OrbRing { to { transform: rotate(360deg); } }
/* The orb itself: radial teal gradient with gentle float. */
.ah2-orb {
  position: relative;
  z-index: 2;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(circle at 65% 65%, #5a9a7b 0%, #3d7a5f 55%, #2f5f4a 100%);
  box-shadow: 0 12px 32px rgba(61,122,95,0.30);
  animation: ah2OrbFloat 4s ease-in-out infinite;
}
@keyframes ah2OrbFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

.ah2-steps { display: flex; flex-direction: column; gap: 8px; }

.ah2-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: #faf7f0;     /* completed/pending base — soft cream */
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.ah2-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 700;
}
.ah2-step-icon-done    { background: #3d7a5f; color: white; }
.ah2-step-icon-pending { background: #ece6dd; color: #9b958d; }
.ah2-step-icon-active  {
  background: #3d7a5f;
  position: relative;
}
.ah2-step-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ah2-step-title { font-size: 14px; font-weight: 700; color: #2c2925; line-height: 1.35; }
.ah2-step-sub   { font-size: 13px; color: #6b6560; line-height: 1.4; }

/* Active step: elevated teal-tinted background + thicker border. */
.ah2-step-active {
  background: #e8f1eb;
  border-color: #3d7a5f;
  cursor: pointer;
}
.ah2-step-active .ah2-step-title { color: #2f5f4a; }

/* Pulsing dot inside the active icon — heartbeat scale 1 → 1.05. */
.ah2-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  animation: ah2HeartbeatScale 1.5s ease-in-out infinite;
}
@keyframes ah2HeartbeatScale {
  0%,100% { transform: scale(1);    opacity: 1;   }
  50%     { transform: scale(1.25); opacity: 0.7; }
}

/* Pending step: muted */
.ah2-step-pending .ah2-step-title { color: #6b6560; }
.ah2-step-pending .ah2-step-sub   { color: #9b958d; }

/* ── AH-3  Review: package + sections ────────────────────── */
.ah3-explainer {
  margin: 4px 0 16px;
  padding: 12px 14px;
  background: #e8f1eb;
  border-left: 3px solid #3d7a5f;
  border-radius: 10px;
  font-size: 14px;
  font-style: italic;
  color: #2f5f4a;
  line-height: 1.5;
}

.ah3-package {
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 16px;
  overflow: hidden;          /* clip the divider lines neatly */
}
.ah3-package-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f5efe2;
  border-bottom: 1px solid #ece6dd;
}
.ah3-package-icon {
  font-size: 22px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ece4f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ah3-package-title { font-size: 16px; font-weight: 700; color: #2c2925; }
.ah3-package-sub   { font-size: 13px; color: #6b6560; margin-top: 2px; }

/* Each section is a button so taps and chevrons read as drill-in. */
.ah3-section {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px 36px 14px 16px;     /* right padding leaves room for chevron */
  background: white;
  border: none;
  border-bottom: 1px solid #f0ece4;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.ah3-section-last { border-bottom: none; }
.ah3-section:active { background: #faf7f0; }
.ah3-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.ah3-section-chev {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.ah3-dx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ah3-dx-chip {
  display: inline-block;
  padding: 5px 10px;
  background: #e8f1eb;
  color: #2f5f4a;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}

.ah3-meds { display: flex; flex-direction: column; gap: 6px; }
.ah3-med  { font-size: 14px; color: #2c2925; line-height: 1.4; }
.ah3-med strong { font-weight: 700; }

.ah3-clinical-text {
  margin: 0;
  font-size: 14px;
  color: #2c2925;
  line-height: 1.5;
}

.ah3-attachments { display: flex; flex-direction: column; gap: 6px; }
.ah3-attach {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #2c2925;
}
.ah3-attach-emoji { font-size: 14px; }

/* ── AH-4  Sent: success + audit trail ──────────────────── */
.ah4-success-stage {
  text-align: center;
  padding: 32px 0 24px;
}
.ah4-check-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #3d7a5f;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Layered glow — three decreasing-opacity shadows for warmth */
  box-shadow:
    0 0 0 8px rgba(61,122,95,0.10),
    0 0 0 18px rgba(61,122,95,0.06),
    0 12px 28px rgba(61,122,95,0.22);
  animation: ah4CheckPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes ah4CheckPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.ah4-title {
  font-size: 22px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.25;
  margin: 0 0 10px;
}
.ah4-sub {
  font-size: 14px;
  color: #6b6560;
  line-height: 1.5;
  margin: 0;
  padding: 0 8px;
}

.ah4-receipt {
  margin-top: 20px;
  padding: 6px 0;
  background: #f5efe2;
  border: 1px solid #ece6dd;
  border-radius: 14px;
}
.ah4-receipt-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #ebe4d2;
}
.ah4-receipt-row:last-child { border-bottom: none; }
.ah4-receipt-emoji {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ah4-receipt-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.ah4-receipt-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ah4-receipt-value { font-size: 14px; color: #2c2925; line-height: 1.35; }

/* ── Home5 entry-point card ─────────────────────────────── */
.home-agentic-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 12px;
  padding: 14px 14px 14px 16px;
  background: #f6f3ff;       /* lavender-tinted to match agentic accent */
  border: 1px solid #d9cefa;
  border-left: 4px solid #5C2AE4;
  border-radius: 14px;
}
.home-agentic-card .hac-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ece4f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-agentic-card .hac-content { flex: 1; }
.home-agentic-card .hac-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #5C2AE4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.home-agentic-card .hac-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.3;
}
.home-agentic-card .hac-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b6560;
  line-height: 1.45;
}

/* ── h3 upgrade-path banner ─────────────────────────────── */
.h3-agentic-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 14px 0;
  padding: 12px 14px;
  background: #f6f3ff;
  border: 1px solid #d9cefa;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.h3-agentic-icon { font-size: 20px; flex-shrink: 0; }
.h3-agentic-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.h3-agentic-title { font-size: 14px; font-weight: 700; color: #2c2925; }
.h3-agentic-sub   { font-size: 12px; color: #5C2AE4; line-height: 1.4; }

/* ── Reduced motion: freeze orb, ring, pulse, check pop ─── */
@media (prefers-reduced-motion: reduce) {
  .ah2-orb,
  .ah2-orb-ring,
  .ah2-pulse-dot,
  .ah4-check-circle {
    animation: none;
  }
  .ah4-check-circle { transform: scale(1); opacity: 1; }
}

/* =================================================================== */
/* AMBIENT VOICE (vc1 – vc4)                                           */
/* =================================================================== */
/* Voice-first capture turning 30s of speech into structured updates.  */
/* All animations CSS-only and reduced-motion aware.                   */
/* =================================================================== */

/* Shared headline for the feature (used on vc1 and vc3). */
.vc-title {
  font-size: 26px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.2;
  margin: 0 0 16px;
}
.vc-primary-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  background: #3d7a5f;
  color: white;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.vc-primary-btn:active { background: #2f5f4a; }

/* ── VC-1  Capture Entry ─────────────────────────────────── */
.vc1-date {
  font-size: 13px;
  color: #6b6560;
  margin: 4px 0 8px;
  font-weight: 500;
}
.vc1-context-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #e8f1eb;
  border: 1px solid #c7e0d2;
  border-radius: 12px;
  margin-bottom: 28px;
}
.vc1-context-card svg { flex-shrink: 0; margin-top: 1px; }
.vc1-context-card span {
  font-size: 14px;
  line-height: 1.45;
  color: #2c2925;
}

/* Mic stage centers the big button with breathing room. */
.vc1-mic-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 4px;
}
.vc1-mic-btn {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 65% 65%, #5a9a7b 0%, #3d7a5f 55%, #2f5f4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Layered glow: progressively wider and dimmer for a soft halo */
  box-shadow:
    0 0 0 12px rgba(61,122,95,0.06),
    0 0 0 26px rgba(61,122,95,0.04),
    0 16px 36px rgba(61,122,95,0.30);
  animation: vc1MicFloat 4s ease-in-out infinite;
  font-family: inherit;
}
.vc1-mic-btn:active { transform: scale(0.97); }
@keyframes vc1MicFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

.vc1-tap-label {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #2c2925;
  margin: 22px 0 6px;
}
.vc1-tap-hint {
  text-align: center;
  font-size: 14px;
  color: #6b6560;
  line-height: 1.5;
  margin: 0 0 22px;
  padding: 0 8px;
}

.vc1-recent-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.vc1-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 6px;
  padding: 12px 14px;
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.vc1-recent-time {
  font-size: 12px;
  color: #9b958d;
  font-weight: 500;
  flex-shrink: 0;
  width: 80px;
}
.vc1-recent-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #2c2925;
}

/* ── VC-2  Listening / Recording ─────────────────────────── */
.vc2-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;            /* amber accent — matches active/listening signals */
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 4px 0 6px;
}
.vc2-headline {
  font-size: 24px;
  font-weight: 700;
  color: #2c2925;
  margin: 0 0 6px;
}
.vc2-time {
  font-size: 36px;
  font-weight: 700;
  color: #2c2925;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}

/* Orb stage with two outward ripples + breathing orb */
.vc2-orb-stage {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 6px auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vc2-orb {
  position: relative;
  z-index: 3;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(circle at 65% 65%, #5a9a7b 0%, #3d7a5f 55%, #2f5f4a 100%);
  box-shadow:
    0 0 0 10px rgba(61,122,95,0.07),
    0 0 0 22px rgba(61,122,95,0.04),
    0 14px 32px rgba(61,122,95,0.28);
  animation: vc2OrbBreathe 3s ease-in-out infinite;
}
@keyframes vc2OrbBreathe {
  0%,100% { transform: scale(1);    }
  50%     { transform: scale(1.05); }
}
/* Two ripple rings, staggered. Border-only so they don't fill the screen. */
.vc2-ripple {
  position: absolute;
  inset: 30px;            /* sit just outside the orb's resting size */
  border-radius: 50%;
  border: 2px solid #3d7a5f;
  opacity: 0.5;
  animation: vc2Ripple 2.5s ease-out infinite;
  pointer-events: none;
}
.vc2-ripple-1 { animation-delay: 0s;   }
.vc2-ripple-2 { animation-delay: 0.8s; }
@keyframes vc2Ripple {
  0%   { transform: scale(0.85); opacity: 0.5; }
  80%  { transform: scale(1.5);  opacity: 0;   }
  100% { transform: scale(1.5);  opacity: 0;   }
}

/* Live transcript card */
.vc2-transcript {
  position: relative;
  text-align: left;
  margin: 0 0 24px;
  padding: 14px 16px 18px;
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 14px;
  max-height: 160px;
  overflow: hidden;
}
.vc2-transcript-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.vc2-transcript-text {
  margin: 0;
  font-size: 15px;
  color: #2c2925;
  line-height: 1.55;
}
/* Blinking cursor ▍ — pure CSS, no JS */
.vc2-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #3d7a5f;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: vc2CursorBlink 1s steps(2, end) infinite;
}
@keyframes vc2CursorBlink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0; }
}
/* Bottom fade on the transcript suggests more content streaming in. */
.vc2-transcript-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), white 92%);
  pointer-events: none;
  border-radius: 0 0 14px 14px;
}

/* Stop button: coral red circle. */
.vc2-stop-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: #e54848;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(229,72,72,0.32);
  font-family: inherit;
}
.vc2-stop-btn:active { transform: scale(0.95); background: #c93a3a; }

/* ── VC-3  Structured Output Review ──────────────────────── */
.vc3-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #3d7a5f;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 6px;
}
.vc3-quote-card {
  margin: 4px 0 18px;
  padding: 14px 16px;
  background: #f5efe2;
  border-left: 4px solid #3d7a5f;
  border-radius: 10px;
}
.vc3-quote-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.vc3-quote {
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: #2c2925;
  line-height: 1.55;
}

.vc3-list-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 8px 0 10px;
}

.vc3-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  padding: 14px;
  background: white;
  border: 1.5px solid #ece6dd;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.vc3-item:active { background: #faf7f0; }
.vc3-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
/* Color-coded icon containers — distinguishes the 4 module types. */
.vc3-icon-med  { background: #e3edf9; }   /* blue tint    — medications  */
.vc3-icon-appt { background: #e8f1eb; }   /* teal tint    — appointment  */
.vc3-icon-ref  { background: #fff3d9; }   /* gold/amber   — referral     */
.vc3-icon-flag { background: #fde8e8; }   /* red tint     — pattern flag */

.vc3-item-body { flex: 1; min-width: 0; }
.vc3-item-label {
  font-size: 10px;
  font-weight: 700;
  color: #6b6560;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.vc3-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.35;
}
.vc3-item-sub {
  font-size: 13px;
  color: #6b6560;
  margin-top: 2px;
  line-height: 1.4;
}
.vc3-item-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #38a169;       /* existing green token */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── VC-4  Pattern Insight ───────────────────────────────── */
.vc4-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 6px;
}
.vc4-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.25;
  margin: 0 0 8px;
}
.vc4-subtitle {
  font-size: 14px;
  color: #6b6560;
  line-height: 1.5;
  margin: 0 0 18px;
}

.vc4-insight-card {
  padding: 16px;
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 16px;
  margin-bottom: 18px;
}
.vc4-insight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.vc4-insight-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fde8e8;       /* matches the upward-trend amber/red */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.vc4-insight-label {
  font-size: 13px;
  font-weight: 700;
  color: #2c2925;
}
.vc4-insight-body {
  margin: 0 0 14px;
  font-size: 16px;
  color: #2c2925;
  line-height: 1.5;
}

/* Mini bar chart */
.vc4-chart {
  background: #faf7f0;
  border-radius: 12px;
  padding: 12px 12px 8px;
}
.vc4-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 88px;
  padding: 0 4px;
}
.vc4-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}
.vc4-bar-base { background: #a3c9b6; }    /* muted teal — baseline period */
.vc4-bar-up   { background: #d97757; }    /* warm coral — recent uptick   */
.vc4-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  color: #9b958d;
  font-weight: 600;
}
.vc4-chart-labels span { flex: 1; text-align: center; }
.vc4-chart-caption {
  margin: 10px 0 0;
  font-size: 11px;
  color: #9b958d;
  font-style: italic;
}

/* Three action cards */
.vc4-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  padding: 14px;
  background: white;
  border: 1px solid #ece6dd;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.vc4-action:active { background: #faf7f0; }
.vc4-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vc4-action-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #2c2925;
}

/* ── Floating Action Button (dashboard FABs) ────────────── */
.voice-fab {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(circle at 65% 65%, #5a9a7b 0%, #3d7a5f 55%, #2f5f4a 100%);
  display: none;            /* hidden by default; shown on home4/home5 only */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(61,122,95,0.34), 0 4px 8px rgba(0,0,0,0.08);
  z-index: 60;              /* above bottom nav, below modal sheets */
  font-family: inherit;
}
.voice-fab.fab-visible { display: flex; }
.voice-fab:active { transform: scale(0.92); }

/* Inline contextual capture chip (used on Watch — w1) */
.vc-inline-capture {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f3eee0;
  border: 1px solid #e6dcc4;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.vc-inline-capture:active { background: #ece5d0; }
.vc-inline-mic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3d7a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vc-inline-text {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #2c2925;
}

/* ── Reduced motion: freeze every voice animation ───────── */
@media (prefers-reduced-motion: reduce) {
  .vc1-mic-btn,
  .vc2-orb,
  .vc2-ripple,
  .vc2-cursor {
    animation: none;
  }
  .vc2-cursor  { opacity: 1; }
  .vc2-ripple  { opacity: 0; }
}

/* Loop-closure card on home5: "Tom is reviewing your decision".
   Quietly active styling — pulsing amber dot signals "in progress"
   without being alarming. Matches Tom's persona color (#FEB200). */
.home-tom-decision-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px 14px 14px 16px;
  background: #fffaef;
  border: 1px solid #f5e4c4;
  border-radius: 14px;
  position: relative;
}
.home-tom-decision-card .htdc-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FEB200;
  flex-shrink: 0;
  margin-top: 6px;
  animation: htdcPulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(254, 178, 0, 0.4);
}
@keyframes htdcPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 178, 0, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(254, 178, 0, 0); }
}
.home-tom-decision-card .htdc-content { flex: 1; }
.home-tom-decision-card .htdc-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.home-tom-decision-card .htdc-title {
  font-size: 15px;
  font-weight: 700;
  color: #2c2925;
  line-height: 1.3;
}
.home-tom-decision-card .htdc-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b6560;
  line-height: 1.45;
}
@media (prefers-reduced-motion: reduce) {
  .home-tom-decision-card .htdc-pulse-dot { animation: none; }
}
