/* 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 Compacto */
.navbar-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.5rem;
  background: rgba(11, 15, 25, 0.9);
  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.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
}

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

/* Nav Links Reduzidos & Compactos */
.nav-compact-links {
  display: flex;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.nav-compact-links .nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

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

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

.user-auth-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-select-sm {
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
  border: 1px solid var(--glass-border);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-compact-auth {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Layout Compacto */
.app-layout-compact {
  max-width: 1240px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.voice-hero-compact {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.mic-button-sm {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

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

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

.transcript-content {
  font-size: 0.85rem;
  color: var(--text-main);
}

/* Hero Omnibar Input & Chips */
.hero-omnibar-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.hero-omnibar-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.hero-omnibar-input:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.btn-omnibar-send {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.hero-quick-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.quick-chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.quick-chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.5rem 0.95rem;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.hero-response-box {
  margin-top: 0.75rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-response-box.hidden { display: none; }

.hero-response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a5b4fc;
}

.btn-close-resp {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.hero-response-body {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #f1f5f9;
}


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

.glass-card {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
}

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

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

.card-header h3 { font-size: 0.95rem; font-weight: 700; }

/* Player Comparativo de Audios */
.audio-comparison-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.audio-samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.sample-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sample-info display: flex;
.sample-info flex-direction: column;
.sample-info strong { font-size: 0.85rem; color: #fff; }
.sample-info span { font-size: 0.75rem; color: var(--secondary-accent); }

.audio-player {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  outline: none;
}

/* AI Chat Container */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 560px;
  padding: 0;
}

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

.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prompt-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
}

.prompt-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.3rem 0.7rem;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-console {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message { display: flex; gap: 0.75rem; max-width: 85%; }
.chat-message.user { margin-left: auto; flex-direction: row-reverse; }

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

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

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

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

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.75); 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: 14px; width: 100%; max-width: 400px; padding: 1.5rem; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Stripe Pricing Modal & Header Button */
.btn-subscribe-header {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
  font-weight: 700;
  font-size: 0.75rem;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
}

.btn-subscribe-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.pricing-modal-card {
  max-width: 680px;
  background: #0f172a;
}

.pricing-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.plan-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-accent);
}

.plan-card.featured-plan {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(99, 102, 241, 0.15));
  border: 2px solid #6366f1;
}

.plan-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background: #6366f1;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.badge-gold {
  background: #f59e0b;
  color: #0b0f19;
}

.plan-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.plan-price {
  margin-bottom: 1rem;
}

.plan-price .currency {
  font-size: 1rem;
  font-weight: 600;
  color: #a5b4fc;
}

.plan-price .amount {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.plan-price .period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  font-size: 0.8rem;
  color: var(--text-main);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stripe-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   HEALTH & MEDICAL RECORDS (PRONTUÁRIO & EXAMES OCR)
   ========================================================================== */

.health-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.badge-lgpd {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.health-scanner-container {
  margin: 1.5rem 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scanner-drop-zone {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.scanner-drop-zone.dragover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f2fe, #4facfe, transparent);
  box-shadow: 0 0 15px #00f2fe, 0 0 25px #4facfe;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.scanner-drop-zone.scanning .scanner-laser {
  opacity: 1;
  animation: laserScan 1.8s infinite ease-in-out;
}

@keyframes laserScan {
  0% { top: 0%; }
  50% { top: 96%; }
  100% { top: 0%; }
}

.scanner-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.scanner-content-box h4 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem 0;
  color: var(--text-main);
}

.scanner-content-box p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 1.25rem 0;
}

.scanner-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.scanner-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: #60a5fa;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 1rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.quick-samples-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.sample-exam-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 36px;
}

.sample-exam-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #fff;
  transform: translateY(-1px);
}

/* Biomarkers Grid */
.health-biomarkers-section {
  margin-bottom: 2rem;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title-bar h4 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text-main);
}

.last-sync-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.biomarkers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.biomarker-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.biomarker-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.biomarker-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bm-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
}

.status-normal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bm-value-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.bm-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

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

.bm-reference {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.4rem;
}

.bm-history {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Bio-Correlation Card */
.health-correlation-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.correlation-header {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.corr-icon {
  font-size: 1.8rem;
}

.correlation-header h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: var(--text-main);
}

.corr-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.correlation-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.corr-insight-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.corr-insight-item p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #cbd5e1;
}

.corr-badge-ok {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* Exam History Table */
.health-history-box {
  margin-bottom: 1rem;
}

.exam-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.exam-history-table th {
  text-align: left;
  padding: 0.75rem 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.4);
}

.exam-history-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.exam-history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.btn-icon-sm {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-sm:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
}

/* ==========================================================================
   WEARABLES & SENSOR HUB (WHOOP, GARMIN, OURA, CGM)
   ========================================================================== */

.health-wearables-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
}

.wearables-actions {
  display: flex;
  gap: 0.5rem;
}

/* Unified Readiness Banner */
.unified-readiness-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.25rem 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.readiness-gauge-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.gauge-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(#10b981 0% 89%, rgba(255, 255, 255, 0.08) 89% 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
  position: relative;
}

.gauge-circle::before {
  content: '';
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0b0f19;
}

.gauge-value {
  position: relative;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.gauge-unit {
  position: relative;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.gauge-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gauge-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 600;
}

.gauge-state-text {
  font-size: 1rem;
  font-weight: 700;
  color: #34d399;
}

.telemetry-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-telemetry {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* Wearables Grid */
.wearables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.wearable-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}

.wearable-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.brand-whoop:hover { border-color: rgba(245, 158, 11, 0.5); }
.brand-garmin:hover { border-color: rgba(6, 182, 212, 0.5); }
.brand-oura:hover { border-color: rgba(139, 92, 246, 0.5); }
.brand-apple:hover { border-color: rgba(244, 63, 94, 0.5); }
.brand-google:hover { border-color: rgba(16, 185, 129, 0.5); }
.brand-freestyle:hover { border-color: rgba(249, 115, 22, 0.5); }

.wearable-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.brand-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.device-icon {
  font-size: 1.6rem;
}

.brand-badge-wrapper strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.device-type {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.conn-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
}

.conn-pill.connected {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.conn-pill.disconnected {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.conn-pill.syncing {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.wearable-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.wm-item {
  display: flex;
  flex-direction: column;
}

.wm-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.wm-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.wearable-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-toggle-device {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle-device:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
}

/* Modal Extensions */
.modal-lg {
  max-width: 540px;
}

.device-modal-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.device-modal-buttons {
  margin-top: 1rem;
}

/* ==========================================================================
   CENTRAL DE ALERTAS PROATIVOS & WHATSAPP
   ========================================================================== */

.health-alerts-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
}

.alerts-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.alerts-phone-bar {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.phone-icon {
  font-size: 1.3rem;
}

.phone-input-wrapper label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.phone-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  width: 200px;
}

.phone-status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.3rem 0.65rem;
  border-radius: 12px;
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.alert-trigger-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.alert-trigger-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
}

.alert-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.alert-icon-title {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.alert-badge-icon {
  font-size: 1.6rem;
}

.alert-icon-title strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.alert-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Switch Toggle */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 24px;
}

.slider-toggle:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider-toggle {
  background-color: #6366f1;
}

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

.alert-action-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #cbd5e1;
}

.action-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 0.25rem;
}

.alert-action-box p {
  margin: 0;
}

.alert-live-feedback {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 0.85rem;
  color: #e0e7ff;
  line-height: 1.5;
}

/* ==============================================================================
   Homologação Especialista, Onboarding, Atendimento (CX) & Janela de Ajustes
   ============================================================================== */

.btn-compact-nav {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  border: none;
}
.btn-warning:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Auth Modal Tabs */
.modal-auth-tabs {
  max-width: 480px;
}

.auth-tab-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.25rem;
  gap: 0.25rem;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.5rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.auth-tab-btn.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.forgot-link {
  font-size: 0.75rem;
  color: #60a5fa;
  text-decoration: underline;
}

/* Password Strength Meter */
.pw-strength-container {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pw-bar-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.pw-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s, background-color 0.3s;
}

.pw-bar-fill.weak { width: 33%; background-color: #ef4444; }
.pw-bar-fill.medium { width: 66%; background-color: #f59e0b; }
.pw-bar-fill.strong { width: 100%; background-color: #10b981; }

.pw-strength-lbl {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Onboarding Card (Dashboard) */
.onboarding-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.onboarding-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
}

.onboarding-title-area h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #f8fafc;
}

.onboarding-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0.25rem 0 0 0;
}

.onboarding-progress-wrapper {
  min-width: 220px;
}

.progress-text {
  font-size: 0.75rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 0.35rem;
  text-align: right;
}

.progress-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #10b981);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.onboarding-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.onboarding-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
}

.onboarding-step.active {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.08);
}

.onboarding-step.completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #e2e8f0;
}

.onboarding-step.completed .step-num {
  background: #10b981;
  color: #ffffff;
}

.onboarding-step.active .step-num {
  background: #6366f1;
  color: #ffffff;
}

.step-content {
  flex: 1;
}

.step-content strong {
  display: block;
  font-size: 0.85rem;
  color: #f1f5f9;
}

.step-content p {
  margin: 0.15rem 0 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}

.step-status.done {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.onboarding-footer {
  margin-top: 1rem;
  text-align: right;
}

.btn-text-dismiss {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}
.btn-text-dismiss:hover {
  color: #94a3b8;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.faq-question {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-question:hover {
  background: rgba(255, 255, 255, 0.05);
}

.faq-answer {
  padding: 0 1rem 0.75rem 1rem;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  display: none;
}
.faq-item.open .faq-answer {
  display: block;
}

/* Homologation Drawer */
.homologation-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 640px;
  max-width: 95vw;
  height: 100vh;
  background: #0d1322;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.homologation-drawer.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.7);
}

.drawer-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #f8fafc;
}

.drawer-sub {
  font-size: 0.78rem;
  color: #94a3b8;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
}
.close-drawer-btn:hover {
  color: #ffffff;
}

.drawer-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.agent-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.agent-kpi-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.kpi-score {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: #10b981;
}

.kpi-lbl {
  font-size: 0.65rem;
  color: #94a3b8;
  line-height: 1.2;
}

.journey-detail-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.human-adjustments-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
}

.human-adjustments-box h4 {
  margin: 0;
  color: #fbbf24;
  font-size: 0.95rem;
}

.adjustments-textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  resize: vertical;
}

.adjustments-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.save-status-msg {
  font-size: 0.78rem;
  color: #34d399;
}





