/* ========================= */
/* CSS Variables - Light Mode */
/* ========================= */
:root {
  --bg: #F8FAFB;
  --surface: #FFFFFF;
  --primary: #5BBD9B;
  --primary-light: #6EC9A8;
  --secondary: #3C4A50;
  --text: #3C4A50;
  --text-muted: #6B7C85;
  --success: #22C55E;
  --recording: #EF4444;
  --error: #EF4444;
  --border: #E2E8ED;
  --input-bg: #F3F5F7;
  --shadow: 0 2px 12px rgba(60, 74, 80, 0.06);
  --shadow-hover: 0 4px 16px rgba(60, 74, 80, 0.1);
  --font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: #1A2024;
  --surface: #2A3338;
  --primary: #6EC9A8;
  --primary-light: #7DDBB5;
  --secondary: #B0C4CE;
  --text: #E8EEF0;
  --text-muted: #8A9BA5;
  --success: #4ADE80;
  --recording: #F87171;
  --error: #F87171;
  --border: #3A4850;
  --input-bg: #1E282E;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* Remove tap highlight on all interactive elements */
button, a, .nav-item, .btn, .play-btn, .share-btn, .recording-action-btn, .mode-pill, .filter-pill, .idea-card, .setting-row, .icon-btn, .load-more-btn {
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ========================= */
/* Screen Layout              */
/* ========================= */
.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1rem;
}

#app-screen {
  justify-content: flex-start;
  min-height: 100dvh;
  padding-bottom: 72px; /* space for bottom nav */
}

/* ========================= */
/* Auth Screen — Split Layout */
/* ========================= */
.auth-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* Dark brand panel (top on mobile, left on desktop) */
.auth-brand {
  background: linear-gradient(160deg, #1E282E 0%, #2A3338 50%, #2F3D44 100%);
  color: #fff;
  padding: 3rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 45dvh;
}
.auth-brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-logo {
  height: 36px;
  width: auto;
  margin-bottom: 1.5rem;
  object-fit: contain;
  align-self: flex-start;
}
.auth-product-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}
.auth-product-desc {
  font-family: 'Inter', sans-serif;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 360px;
}
.auth-trust-badges {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.auth-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'Inter', sans-serif;
}
.auth-badge svg {
  opacity: 0.5;
}

/* White sign-in panel (bottom on mobile, right on desktop) */
.auth-form {
  background: #fff;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}
.auth-welcome {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #3C4A50;
  margin-bottom: 0.25rem;
}
.auth-subtitle {
  font-family: 'Inter', sans-serif;
  color: #6B7C85;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
  height: 52px;
  border-radius: 14px;
  background: #5BBD9B;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(91, 189, 155, 0.3);
}
.auth-google-btn:hover {
  background: #4AAA87;
  box-shadow: 0 8px 28px rgba(91, 189, 155, 0.4);
  transform: translateY(-1px);
}
.auth-google-btn:active {
  transform: translateY(0) scale(0.98);
}
.auth-google-btn svg {
  flex-shrink: 0;
}
.auth-tagline {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6B7C85;
  opacity: 0.7;
  letter-spacing: 0.02em;
}
.auth-footer {
  margin-top: 2rem;
  font-size: 0.72rem;
  color: #9EADB5;
  font-family: 'Inter', sans-serif;
}

/* Desktop: side-by-side layout */
@media (min-width: 768px) {
  .auth-screen {
    flex-direction: row;
  }
  .auth-brand {
    width: 42%;
    min-height: 100dvh;
    padding: 3rem;
  }
  .auth-form {
    width: 58%;
    min-height: 100dvh;
    padding: 3rem;
  }
}

/* Dark mode auth */
[data-theme="dark"] .auth-form {
  background: var(--surface);
}
[data-theme="dark"] .auth-welcome {
  color: var(--text);
}
[data-theme="dark"] .auth-subtitle {
  color: var(--text-muted);
}
[data-theme="dark"] .auth-tagline {
  color: var(--text-muted);
}
[data-theme="dark"] .auth-footer {
  color: var(--text-muted);
}

/* ========================= */
/* Top Bar                    */
/* ========================= */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.top-bar-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.top-bar-logo {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.top-bar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #E8A040;
  background: rgba(232, 160, 64, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: var(--input-bg);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.icon-btn:hover { background: var(--border); }

/* ========================= */
/* Buttons                    */
/* ========================= */
.btn {
  padding: 9px 18px;
  border: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn:hover { transform: scale(0.98); }
.btn:active { opacity: 0.8; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 2px 8px rgba(192, 139, 139, 0.3);
}

.btn-small {
  background: var(--input-bg);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 8px 14px;
}

.btn-approve {
  background: linear-gradient(135deg, var(--success), #8FBF9F);
  color: white;
  box-shadow: 0 2px 8px rgba(107, 163, 122, 0.3);
}

/* ========================= */
/* Bottom Navigation          */
/* ========================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: rgba(251, 248, 246, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

[data-theme="dark"] .bottom-nav {
  background: rgba(30, 27, 33, 0.85);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s, transform 0.15s;
}

.nav-item:active { transform: scale(0.92); }

.nav-item.active { color: var(--primary); }

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--primary);
  animation: navIndicatorIn 0.25s ease forwards;
}

@keyframes navIndicatorIn {
  from { width: 0; opacity: 0; }
  to { width: 24px; opacity: 1; }
}

.nav-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--recording);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ========================= */
/* Tab Content                */
/* ========================= */
.tab-content {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  overscroll-behavior: contain;
}

.tab-entering {
  animation: tabFadeIn 0.2s ease forwards;
}

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

/* ========================= */
/* Record Tab                 */
/* ========================= */
.record-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 72px);
}

.quick-stats {
  display: flex;
  gap: 10px;
  padding: 0 20px 8px;
  transition: opacity 0.3s, max-height 0.3s;
  overflow: hidden;
  border-radius: 16px;
}

.quick-stats.hidden { opacity: 0; max-height: 0; padding: 0 20px; }

.stat-card {
  flex: 1;
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.record-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Waveform */
.waveform-container {
  width: 100%;
  max-width: 340px;
  height: 100px;
  margin-bottom: 32px;
}

.waveform-canvas {
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

.record-status {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: center;
  transition: color 0.3s;
}

.record-status.recording { color: var(--recording); }

/* Record Button */
.record-btn-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--recording);
  opacity: 0;
  pointer-events: none;
}

.record-btn-wrapper.recording .pulse-ring {
  animation: pulse-out 2s ease-out infinite;
}

.record-btn-wrapper.recording .pulse-ring:nth-child(2) { animation-delay: 0.6s; }
.record-btn-wrapper.recording .pulse-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes pulse-out {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.8); opacity: 0; }
}

.record-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(192, 139, 139, 0.3);
  transition: transform 0.2s, box-shadow 0.3s;
  position: relative;
  z-index: 2;
}

.record-btn:hover { transform: scale(1.05); }
.record-btn:active { transform: scale(0.95); }

.record-btn.recording {
  background: linear-gradient(135deg, var(--recording), #E09590);
  box-shadow: 0 8px 32px rgba(212, 115, 110, 0.4);
}

.mic-icon {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: white;
  display: none;
}

.record-btn.recording .mic-icon { display: none; }
.record-btn.recording .stop-icon { display: block; }

.timer {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 20px;
  color: var(--recording);
  opacity: 0;
  transition: opacity 0.3s;
}

.timer.visible { opacity: 1; }

.record-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
  opacity: 0.7;
}

/* Recent recordings */
.recent-section { padding: 16px 20px 0; }
.recent-section.hidden { display: none; }

.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 4px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.recent-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.recent-info { flex: 1; min-width: 0; }

.recent-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.recent-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(107, 163, 122, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

/* Processing overlay */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.processing-overlay.show { display: flex; }

.processing-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 40px 36px;
  text-align: center;
  box-shadow: 0 16px 60px rgba(0,0,0,0.12);
  max-width: 300px;
  width: 90%;
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.processing-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.processing-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Toast slide-up animation */
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes slideUpBottom {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Success toast */
.success-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--success);
  color: white;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(107, 163, 122, 0.3);
  opacity: 0;
}

.success-toast.show {
  display: flex;
  animation: slideUp 0.3s ease forwards;
}

/* ========================= */
/* Review Tab — Swipe Mode    */
/* ========================= */
.review-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 72px);
}

/* Progress bar */
.progress-section { padding: 0 20px 16px; }

.progress-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.progress-label strong { color: var(--text); }

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

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.time-estimate {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* Swipe card area */
.card-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 20px;
  position: relative;
}

.swipe-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(100, 60, 80, 0.08);
  position: relative;
  cursor: grab;
  user-select: none;
}

.swipe-card:active { cursor: grabbing; }

/* Swipe stamps */
.stamp {
  position: absolute;
  top: 24px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 6px 16px;
  border: 4px solid;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.stamp-approve {
  right: 16px;
  color: var(--success);
  border-color: var(--success);
  transform: rotate(-15deg);
}

.stamp-skip {
  left: 16px;
  color: var(--text-muted);
  border-color: var(--border);
  transform: rotate(15deg);
}

.swipe-card.swiping-right .stamp-approve { opacity: 0.8; }
.swipe-card.swiping-left .stamp-skip { opacity: 0.8; }

/* Card content */
.card-category-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.card-category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 8px;
}

.card-category-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--input-bg);
  color: var(--text-muted);
}

.card-pill.priority-a { background: rgba(212, 115, 110, 0.12); color: var(--recording); }
.card-pill.priority-b { background: rgba(232, 184, 109, 0.12); color: #B08840; }
.card-pill.confidence { background: rgba(107, 163, 122, 0.12); color: var(--success); }

/* AI Priority Suggestion */
.ai-priority-suggestion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.8rem;
}
.suggestion-label { color: var(--text-muted); font-weight: 500; }
.suggestion-priority { font-weight: 700; color: var(--primary); }
.suggestion-reason { color: var(--text-muted); font-style: italic; }

.card-ai-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding: 12px 14px;
  background: var(--input-bg);
  border-radius: 14px;
  margin-bottom: 16px;
}

.card-ai-note strong { color: var(--secondary); font-weight: 600; }

.card-transcript {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  padding: 10px 14px;
  background: var(--input-bg);
  border-radius: 12px;
  margin-bottom: 12px;
  display: none;
}

.card-transcript.open { display: block; }

.card-transcript-toggle {
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.card-transcript-toggle:hover { color: var(--text); }

.card-edit-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.card-edit-btn:hover { background: var(--input-bg); color: var(--text); }

/* Swipe hints */
.swipe-hints {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  max-width: 380px;
  margin: 0 auto;
}

.hint-left, .hint-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hint-right { color: var(--success); }

/* Undo toast */
.undo-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
}

.undo-toast.show {
  display: flex;
  animation: slideUpBottom 0.3s ease forwards;
}

.undo-btn {
  background: none;
  border: none;
  color: var(--primary-light);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

/* All Done screen */
.done-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  flex: 1;
}

.done-screen.show { display: flex; }

.done-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: pop 0.5s ease;
}

@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.done-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.done-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.done-avg-time { font-size: 0.78rem; color: var(--text-muted); opacity: 0.7; margin-bottom: 24px; }

.done-stats { display: flex; gap: 24px; }
.done-stat { text-align: center; }
.done-stat-num { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.done-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1.5rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: 50%;
  line-height: 1;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 280px;
  line-height: 1.45;
}

.empty-state-cta {
  display: inline-block;
  padding: 10px 24px;
  max-width: 240px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(192, 139, 139, 0.3);
}

.empty-state-cta:hover {
  box-shadow: 0 4px 16px rgba(192, 139, 139, 0.4);
  transform: translateY(-1px);
}

.empty-state-cta:active {
  transform: scale(0.97);
}

/* ========================= */
/* Settings Tab               */
/* ========================= */
.settings-scroll {
  padding: 0 20px 20px;
  width: 100%;
}

/* Profile card */
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

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

.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 0.95rem; font-weight: 700; }
.profile-email { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.profile-signout {
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--input-bg);
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-signout:hover { background: var(--error); color: white; }

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.bento-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.bento-card.wide { grid-column: span 2; }

.bento-icon { font-size: 1.3rem; margin-bottom: 8px; }
.bento-value { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.bento-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* Settings groups */
.settings-section { margin-bottom: 20px; }

.settings-group {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.setting-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  min-height: 50px;
  cursor: pointer;
  transition: background 0.15s;
}

.setting-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.setting-row:hover { background: var(--input-bg); }

.setting-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.setting-icon.purple { background: rgba(184, 169, 201, 0.2); }
.setting-icon.pink { background: rgba(192, 139, 139, 0.2); }
.setting-icon.green { background: rgba(107, 163, 122, 0.2); }
.setting-icon.amber { background: rgba(232, 184, 109, 0.2); }
.setting-icon.blue { background: rgba(120, 160, 210, 0.2); }
.setting-icon.red { background: rgba(212, 115, 110, 0.2); }

.setting-content { flex: 1; min-width: 0; }
.setting-label { font-size: 0.88rem; font-weight: 600; }
.setting-description { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.setting-value {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.setting-chevron { color: var(--text-muted); opacity: 0.4; font-size: 0.9rem; flex-shrink: 0; }

/* Learning progress bar */
.learning-progress {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.learning-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7BC8A4);
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Slider in settings */
.setting-row-vertical {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

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

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 2px 46px;
}

.slider-input {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(192, 139, 139, 0.3);
}

.slider-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  min-width: 28px;
  text-align: right;
}

/* Expandable */
.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.expandable-content.open { max-height: 600px; }

.expand-inner { padding: 0 16px 14px; }

.columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.column-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  padding: 6px 0;
}

.column-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Danger zone */
.danger-btn {
  width: 100%;
  padding: 14px;
  border: none;
  background: transparent;
  color: var(--error);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.danger-btn:hover { background: rgba(212, 115, 110, 0.08); }

/* Bento chart */
.bento-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
  margin-top: 10px;
}

.bento-bar {
  flex: 1;
  background: linear-gradient(to top, var(--primary), var(--secondary));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.bento-bar:hover { opacity: 1; }

.bento-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.bento-chart-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* App version */
.app-version {
  text-align: center;
  padding: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: 20px;
}

/* ========================= */
/* Edit Form (inline on card) */
/* ========================= */
.edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
  padding: 20px;
}

.edit-overlay.show { display: flex; }

.edit-form {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.12);
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.edit-form-title {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.edit-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.875rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
}

.edit-input:focus { outline: none; border-color: var(--primary); }
select.edit-input { cursor: pointer; }
textarea.edit-input { resize: vertical; min-height: 64px; }

/* Section toggles in edit form */
.section-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  cursor: pointer;
  user-select: none;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.section-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

.section-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: inline-block;
}

.section-toggle.open .section-arrow { transform: rotate(90deg); }

.section-content { display: none; padding-top: 8px; }
.section-content.open { display: block; }

.edit-form .item-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ========================= */
/* List view fallback          */
/* ========================= */
.list-view { padding: 0 20px; }

.list-item-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.list-item-actions .btn {
  font-size: 0.72rem;
  padding: 6px 12px;
}

/* ========================= */
/* Accessibility              */
/* ========================= */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.icon-btn:focus-visible,
.play-btn:focus-visible,
.mode-pill:focus-visible,
.filter-pill:focus-visible,
.setting-row:focus-visible,
.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.edit-input:focus-visible,
.idea-input:focus-visible {
  outline: none;
  border-color: var(--primary);
}

/* Ensure 44px minimum touch targets */
.icon-btn {
  min-width: 44px;
  min-height: 44px;
}

.recording-action-btn {
  min-height: 44px;
}

.load-more-btn {
  min-height: 44px;
}

.slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(192, 139, 139, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================= */
/* GHL Sync Status            */
/* ========================= */
.card-sync-status {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
}
.card-sync-status.ghl-synced {
  background: rgba(78, 205, 196, 0.15);
  color: #4ECDC4;
}
.card-sync-status.ghl-error {
  background: rgba(255, 107, 107, 0.15);
  color: #FF6B6B;
}
.sync-icon {
  font-weight: bold;
  margin-right: 4px;
}

/* ========================= */
/* Recording Log              */
/* ========================= */
.recording-item {
  background: var(--surface);
  border-radius: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.recording-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  cursor: pointer;
}

.recording-item-row:active {
  transform: scale(0.98);
}

.recording-item.processing {
  border: 1px solid transparent;
  background-image: linear-gradient(var(--surface), var(--surface)),
                    linear-gradient(135deg, var(--primary), var(--secondary));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Play/Pause button */
.play-btn {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
}

.play-btn:active { transform: scale(0.95); }

.play-btn svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.play-btn.playing {
  background: linear-gradient(135deg, var(--recording), #E09590);
}

/* Share button */
.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.share-btn:active {
  transform: scale(0.9);
  background: color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Processing spinner */
.recording-spinner {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recording-spinner::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Recording info */
.recording-info { flex: 1; min-width: 0; }

.recording-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recording-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Status badge */
.recording-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.recording-status.done {
  color: var(--success);
  background: rgba(107, 163, 122, 0.1);
}

.recording-status.processing-status {
  color: var(--primary);
  background: rgba(192, 139, 139, 0.1);
}

.recording-status.error-status {
  color: var(--error);
  background: rgba(196, 114, 110, 0.1);
}

.recording-status.obsidian-status {
  color: var(--secondary);
  background: rgba(168, 130, 150, 0.1);
}

/* Status dots animation */
.status-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Upload progress bar */
.upload-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 14px 8px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Expandable transcript */
.recording-transcript {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 14px;
}

.recording-transcript.open {
  max-height: 300px;
  padding: 0 14px 12px;
  overflow-y: auto;
}

.transcript-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 10px 14px;
  background: var(--input-bg);
  border-radius: 10px;
  white-space: pre-wrap;
}

.transcript-text.streaming { color: var(--text); }

.transcript-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--primary);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

.transcript-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px 8px;
  cursor: pointer;
}

.transcript-chevron {
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.5;
  transition: transform 0.3s;
}

.recording-item.expanded .transcript-chevron {
  transform: rotate(180deg);
}

/* Error action buttons */
.recording-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
}

.recording-action-btn {
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.recording-action-btn:active { transform: scale(0.95); }

.btn-retry {
  background: rgba(192, 139, 139, 0.12);
  color: var(--primary);
}

.btn-retry:hover { background: var(--primary); color: white; }

.btn-delete {
  background: rgba(196, 114, 110, 0.1);
  color: var(--error);
}

.btn-delete:hover { background: var(--error); color: white; }

/* Load more */
.load-more {
  display: flex;
  justify-content: center;
  padding: 14px;
}

.load-more-btn {
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.load-more-btn:active { transform: scale(0.97); }

/* Delete toast */
.delete-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
}

.delete-toast.show {
  display: flex;
  animation: slideUpBottom 0.3s ease forwards;
}

/* ========================= */
/* Mode Selector              */
/* ========================= */
.mode-selector {
  display: flex;
  gap: 6px;
  padding: 0 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mode-selector::-webkit-scrollbar { display: none; }

.mode-pill {
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mode-pill:active { transform: scale(0.95); }

.mode-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
}

/* ========================= */
/* Obsidian Modes Settings    */
/* ========================= */
.mode-edit-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-add-mode {
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px dashed var(--border);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.btn-add-mode:hover {
  background: rgba(192, 139, 139, 0.08);
  border-color: var(--primary);
}

/* ========================= */
/* Ideas Log                 */
/* ========================= */

.ideas-screen {
  padding: 0 16px 80px;
  max-width: 600px;
  margin: 0 auto;
}

.ideas-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ideas-filters::-webkit-scrollbar { display: none; }

.filter-pill {
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.ideas-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ideas-stats::-webkit-scrollbar { display: none; }

.idea-stat-card {
  flex: 1;
  min-width: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.idea-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.idea-stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ideas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idea-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(100, 60, 80, 0.04);
}

.idea-card:hover {
  box-shadow: 0 4px 16px rgba(100, 60, 80, 0.08);
}

.idea-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(100, 60, 80, 0.04);
}

.idea-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.idea-stage-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.idea-confidence {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.idea-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.idea-card-problem {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.idea-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.idea-card-meta span {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-muted);
}

.idea-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.idea-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(184, 169, 201, 0.15);
  color: var(--secondary);
}

.idea-revenue-actual {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.idea-card-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Ideas Edit Overlay */
.idea-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.idea-edit-overlay.open {
  display: flex;
}

.idea-edit-panel {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 85dvh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

.idea-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  z-index: 1;
}

.idea-edit-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.idea-edit-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.idea-edit-save {
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  background: var(--primary);
  border: none;
  padding: 6px 16px;
  border-radius: 14px;
  cursor: pointer;
}

.idea-edit-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.idea-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.idea-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.idea-input {
  font-family: var(--font-family);
  font-size: 0.85rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.idea-input:focus {
  border-color: var(--primary);
}

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

.idea-edit-actions {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.idea-delete-btn {
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--error);
  background: none;
  border: 1px solid var(--error);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.idea-delete-btn:hover {
  background: rgba(196, 114, 110, 0.1);
}

/* Floating Action Button */
.fab-btn {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(100, 60, 80, 0.2);
  cursor: pointer;
  z-index: 50;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.fab-btn:active { transform: scale(0.9); box-shadow: 0 2px 8px rgba(100, 60, 80, 0.15); }
.fab-btn:hover { box-shadow: 0 6px 24px rgba(100, 60, 80, 0.25); }

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--input-bg) 25%,
    var(--border) 50%,
    var(--input-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(
    90deg,
    var(--input-bg) 25%,
    var(--border) 50%,
    var(--input-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-text.skeleton-text--short { width: 40%; height: 10px; }
.skeleton-text.skeleton-text--medium { width: 75%; }
.skeleton-text.skeleton-text--tall { height: 16px; width: 50%; }

.skeleton-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}

.skeleton-card .skeleton-avatar {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(
    90deg,
    var(--input-bg) 25%,
    var(--border) 50%,
    var(--input-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* ========================= */
/* Onboarding Modal           */
/* ========================= */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.onboarding-overlay.hidden {
  display: none !important;
}

.onboarding-modal {
  background: var(--surface);
  border-radius: 28px;
  padding: 40px 28px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: tabFadeIn 0.3s ease forwards;
}

.onboarding-slides {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.onboarding-slide.active {
  display: flex;
  animation: tabFadeIn 0.3s ease forwards;
}

.onboarding-icon-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.onboarding-icon {
  font-size: 3rem;
  z-index: 2;
  position: relative;
  line-height: 1;
}

.onboarding-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: onboardingRipple 2.4s ease-out infinite;
}

.onboarding-ripple:nth-child(2) {
  animation-delay: 0.8s;
}

.onboarding-ripple:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes onboardingRipple {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.onboarding-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.onboarding-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 300px;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 20px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  transition: all 0.3s ease;
}

.onboarding-dot.active {
  width: 24px;
  background: var(--primary);
}

.onboarding-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(192, 139, 139, 0.3);
}

.onboarding-btn:hover {
  box-shadow: 0 8px 28px rgba(192, 139, 139, 0.4);
  transform: translateY(-1px);
}

.onboarding-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ========================= */
/* First Recording Guide      */
/* ========================= */
.first-recording-guide {
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: firstRecordingPulse 2s ease-in-out infinite;
  z-index: 10;
}

.first-recording-guide::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}

@keyframes firstRecordingPulse {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.85;
    transform: translateX(-50%) translateY(4px);
  }
}

/* ========================= */
/* Achievement Toast          */
/* ========================= */

.achievement-toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.achievement-toast.show {
  top: 24px;
}

.achievement-toast-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: var(--shadow-hover);
  min-width: 240px;
}

.achievement-toast-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.achievement-toast-text {
  display: flex;
  flex-direction: column;
}

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

.achievement-toast-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ========================= */
/* Confetti                   */
/* ========================= */

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  animation: confettiFall 2.5s ease-in forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ========================= */
/* Badges Row (Settings)      */
/* ========================= */

.badges-row {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.badges-row::-webkit-scrollbar {
  display: none;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.badge-item.locked {
  opacity: 0.3;
  filter: grayscale(1);
}

.badge-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.badge-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

/* ========================= */
/* Upgrade Button & Wall     */
/* ========================= */

.upgrade-btn {
  background: linear-gradient(135deg, var(--primary), var(--recording));
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
  white-space: nowrap;
}
.upgrade-btn:active { transform: scale(0.95); }
.upgrade-btn:disabled { opacity: 0.6; cursor: default; }

.upgrade-wall {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.upgrade-wall-content {
  background: var(--surface);
  border-radius: 24px;
  padding: 40px 28px;
  text-align: center;
  max-width: 340px;
  width: 100%;
}
.upgrade-wall-content h3 { margin: 16px 0 8px; font-size: 1.2rem; color: var(--text); }
.upgrade-wall-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* ========================= */
/* Weekly Digest Card         */
/* ========================= */
.digest-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 16px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.digest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}
.digest-dismiss {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}
.digest-summary {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 10px;
}
.digest-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.digest-cat {
  padding: 3px 10px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
}
.digest-patterns { margin-bottom: 8px; }
.digest-pattern {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 0;
}
.digest-unreviewed {
  font-size: 0.8rem;
  color: var(--recording);
  font-weight: 500;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ========================= */
/* Similar Task Warning       */
/* ========================= */
.similar-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  background: color-mix(in srgb, #F5C542 12%, transparent);
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
}
.similar-icon { flex-shrink: 0; }

/* ========================= */
/* Recurring Pattern Insights */
/* ========================= */
.insights-container { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.insight-card {
  padding: 14px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 3px solid #F5C542;
}
.insight-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; font-weight: 600; color: #F5C542; margin-bottom: 6px;
}
.insight-dismiss { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }
.insight-pattern { font-size: 0.85rem; color: var(--text); margin: 0 0 4px; }
.insight-suggestion { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin: 0; }
