/* RytmoFlow PRO — Modern Design System (Glassmorphism & Voice-First UX/UI) */
:root {
  --bg-color: #0b0f19;
  --panel-bg: rgba(18, 26, 43, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --primary-accent: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-accent: #10b981;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --danger-color: #ef4444;
  --font-family: 'Plus Jakarta Sans', sans-serif;
  --mono-font: 'JetBrains Mono', monospace;
}

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

body.dark-theme {
  background: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Navbar Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--secondary-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--secondary-accent);
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.badge-pro {
  font-size: 0.65rem;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.system-status {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-indicator.online {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--secondary-accent);
  border-radius: 50%;
  margin-right: 4px;
}

/* Nav Links & Tabs */
.nav-links {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* Buttons */
.btn-primary {
  background: var(--primary-accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

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

.btn-sm {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-whatsapp {
  background: #25d366;
  color: #000;
  border: none;
  padding: 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Layout */
.app-layout {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

/* Voice Hero Card */
.voice-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.voice-control-panel {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.mic-trigger-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.mic-button {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mic-button:hover { transform: scale(1.05); }

.mic-button.recording {
  animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.audio-waves {
  display: none;
  gap: 3px;
  align-items: center;
  height: 20px;
}

.mic-button.recording .audio-waves { display: flex; }
.mic-button.recording .mic-icon { display: none; }

.audio-waves span {
  width: 3px;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
}

.audio-waves span:nth-child(2) { animation-delay: 0.2s; }
.audio-waves span:nth-child(3) { animation-delay: 0.4s; }
.audio-waves span:nth-child(4) { animation-delay: 0.6s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 20px; }
}

.mic-label { font-size: 0.85rem; color: var(--text-muted); }

.live-transcription-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dot-red {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--danger-color);
  border-radius: 50%;
  margin-right: 4px;
}

.transcript-content {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Glass Cards & Grid */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.glass-card {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.full-width { grid-column: 1 / -1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* AI Chat Container & Modern UI */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 650px;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--glass-border);
}

.ai-profile-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ai-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.online-ring {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: var(--secondary-accent);
  border-radius: 50%;
  border: 2px solid #0f172a;
}

.ai-name { font-size: 1.05rem; font-weight: 700; }
.ai-status-subtitle { font-size: 0.75rem; color: var(--text-muted); }

/* Quick Prompt Pills Bar */
.prompt-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
}

.pills-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.prompt-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.prompt-pill:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Chat Console Area */
.chat-console {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(11, 15, 25, 0.5);
}

.chat-message {
  display: flex;
  gap: 1rem;
  max-width: 85%;
}

.chat-message.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chat-message.user .msg-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.msg-bubble {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  position: relative;
}

.chat-message.user .msg-bubble {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
  border: none;
}

.msg-sender {
  font-size: 0.75rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 0.3rem;
}

.chat-message.user .msg-sender { color: #e0e7ff; text-align: right; }
.msg-text { font-size: 0.92rem; line-height: 1.5; color: var(--text-main); }

.msg-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-align: right;
}

/* Rich Cards inside Chat Responses */
.rich-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.rich-card-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--secondary-accent);
  margin-bottom: 0.4rem;
}

.rich-card-body { font-size: 0.8rem; color: var(--text-muted); }

/* Chat Input Row */
.chat-input-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid var(--glass-border);
}

.mic-chat-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mic-chat-btn:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.chat-input-container input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
}

.chat-input-container input:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.btn-send-chat { height: 44px; padding: 0 1.25rem; border-radius: 12px; }

/* --- NOVO MÓDULO DE PAUSAS ATIVAS & MICRO-MEDITAÇÃO --- */
.meditation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.breathing-card, .ultradian-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.breathing-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.5rem 0;
}

.breathing-visualizer-wrapper {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.breathing-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(16, 185, 129, 0.3));
  border: 3px solid var(--secondary-accent);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 4s ease-in-out;
}

.breathing-circle.expand {
  transform: scale(1.35);
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(16, 185, 129, 0.6));
}

.breathing-phase { font-size: 0.85rem; font-weight: 700; color: #fff; }
.breathing-timer { font-size: 1.5rem; font-weight: 800; color: var(--secondary-accent); margin-top: 4px; }

.breathing-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ultradian-status {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 1rem 0 0.5rem 0;
  font-size: 0.85rem;
}

.u-title { color: var(--text-muted); }
.u-val { font-weight: 700; color: var(--secondary-accent); }

.u-recommendation {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.4;
}

/* --- NOVO MÓDULO MATRIZ DE EISENHOWER --- */
.eisenhower-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.quadrant {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 1.25rem;
  border: 1px solid var(--glass-border);
}

.quadrant.q1 { border-top: 4px solid #ef4444; }
.quadrant.q2 { border-top: 4px solid #10b981; }
.quadrant.q3 { border-top: 4px solid #f59e0b; }
.quadrant.q4 { border-top: 4px solid #6b7280; }

.q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.q-header h4 { font-size: 0.9rem; font-weight: 700; }
.q-count { font-size: 0.75rem; background: rgba(255, 255, 255, 0.08); padding: 2px 8px; border-radius: 6px; }

.q-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }

.q-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.q-item strong { font-size: 0.85rem; }
.q-item span { font-size: 0.75rem; color: var(--text-muted); }

/* Timeline & Biometrics */
.timeline-list { display: flex; flex-direction: column; gap: 1rem; }
.timeline-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; border-radius: 10px; background: rgba(255, 255, 255, 0.02); border: 1px solid transparent; }
.timeline-item.active { border-color: var(--primary-accent); background: rgba(99, 102, 241, 0.08); }
.time-badge { font-family: var(--mono-font); font-size: 0.8rem; background: rgba(255, 255, 255, 0.08); padding: 4px 8px; border-radius: 6px; }
.timeline-detail { flex: 1; display: flex; flex-direction: column; }
.timeline-detail strong { font-size: 0.9rem; }
.timeline-detail span { font-size: 0.75rem; color: var(--text-muted); }

.tag { font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.tag-sports { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.tag-work { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.tag-finance { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.biometric-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.metric-box { background: rgba(0, 0, 0, 0.2); padding: 1rem; border-radius: 10px; text-align: center; }
.metric-val { display: block; font-size: 1.25rem; font-weight: 800; color: var(--secondary-accent); }
.metric-lbl { font-size: 0.75rem; color: var(--text-muted); }

.progress-bar { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--secondary-accent), #34d399); }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.hidden { display: none; }
.modal-card { background: #111827; border: 1px solid var(--glass-border); border-radius: 16px; width: 100%; max-width: 440px; padding: 2rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-modal-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; margin-bottom: 0.4rem; color: var(--text-muted); }
.form-group input, .form-row input, .form-row select { width: 100%; padding: 0.75rem 1rem; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); border-radius: 8px; color: #fff; }
.full-btn { width: 100%; justify-content: center; margin-top: 0.5rem; }

.divider { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin: 1rem 0; }
.btn-google { background: #fff; color: #000; border: none; padding: 0.75rem; border-radius: 8px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.auth-feedback { margin-top: 1rem; font-size: 0.85rem; text-align: center; }

/* Tabs Logic */
.tab-pane { display: none; }
.tab-pane.active { display: block; }
