/* ═════════════════════════════════════════════════════════════════════
   CuidAí — Premium Glassmorphism Design System & Web Dashboard CSS
   Inspired by Apple/iOS simplicity, depth, and accessibility
   ═════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Biofilic & Natural Palette - UI/UX Refinement */
  --scarab: #23312D;
  --dark-serpent: #173109;
  --green-oasis: #B0B454;
  --celery: #AFC455;
  --sylvan-green: #E7EACB;
  --pale-green: #C6D293;

  /* Brand Colors */
  --green-primary: #0B7A6E;
  --green-secondary: #0E8F81;
  --green-dark: #074E47;
  --green-light: #E6F4F1;
  --green-xlight: #F0F9F7;
  
  /* Semantic Accent Colors */
  --purple-ai: #6C63FF;
  --purple-light: #EEF0FF;
  --purple-glow: rgba(108, 99, 255, 0.25);
  
  --red-heart: #EF4444;
  --red-light: #FEE2E2;
  
  --blue-agenda: #2563EB;
  --blue-light: #EFF6FF;
  
  --orange-diary: #EA580C;
  --orange-light: #FFF7ED;

  /* Neutrals */
  --bg-dark-base: #131C1A; /* Scarab base tint */
  --bg-surface-dark: rgba(35, 49, 45, 0.78); /* Scarab glass surface */
  --bg-card-glass: rgba(231, 234, 203, 0.07); /* Sylvan Green subtle glass */
  --bg-card-glass-hover: rgba(231, 234, 203, 0.12);
  
  --text-primary: #E7EACB; /* Sylvan Green: substitui o #FFFFFF puro para maior conforto visual */
  --text-secondary: rgba(231, 234, 203, 0.76);
  --text-muted: rgba(231, 234, 203, 0.48);
  --text-dark: #111827;

  /* Borders & Dividers */
  --glass-border: 1px solid rgba(231, 234, 203, 0.12);
  --glass-border-strong: 1px solid rgba(231, 234, 203, 0.24);
  --glass-border-accent: 1px solid rgba(176, 180, 84, 0.35);

  /* Glass Effects */
  --glass-blur: blur(24px);
  --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
  --glass-shadow-subtle: 0 8px 24px rgba(0, 0, 0, 0.22);

  /* Radius System */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
  --dur-fast: 150ms;
  --dur-normal: 250ms;
  --dur-slow: 400ms;
}

/* Light theme overrides when toggled */
body.light-theme {
  --bg-dark-base: #F4F6EE; /* Pale Green soft light background */
  --bg-surface-dark: rgba(244, 246, 238, 0.94);
  --bg-card-glass: rgba(238, 242, 230, 0.88); /* Sálvia Biofílica suave - substitui o 100% branco */
  --bg-card-glass-hover: rgba(244, 248, 236, 0.95);
  --text-primary: #172421; /* Dark Scarab tone for text in light theme */
  --text-secondary: #3D4A47;
  --text-muted: #6B7875;
  --glass-border: 1px solid rgba(35, 49, 45, 0.08);
  --glass-border-strong: 1px solid rgba(35, 49, 45, 0.16);
  --glass-shadow: 0 16px 36px rgba(35, 49, 45, 0.08), 0 2px 8px rgba(35, 49, 45, 0.04);
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark-base);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Lexend', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* ═════════════════════════════════════════════════════════════════════
   CAMADAS DE BACKGROUND ATMOSFÉRICO (Section 5)
   ═════════════════════════════════════════════════════════════════════ */
.app-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.app-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('../img/pessoa-01.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  opacity: 0.16;
  filter: saturate(1.2) contrast(1.05);
  mix-blend-mode: luminosity;
  transition: opacity 0.6s ease, background-image 0.6s ease;
}

.app-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(11, 19, 32, 0.4) 0%, rgba(11, 19, 32, 0.88) 100%);
  pointer-events: none;
}

body.light-theme .app-bg-image {
  opacity: 0.10;
  mix-blend-mode: multiply;
}

body.light-theme .app-bg-overlay {
  background: radial-gradient(circle at 50% 30%, rgba(255, 244, 226, 0.45) 0%, rgba(255, 244, 226, 0.92) 100%);
}

.auth-logo-img, .brand-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.halo-green {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 65vw;
  height: 65vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(14, 143, 129, 0.22) 0%, rgba(11, 122, 110, 0.08) 45%, transparent 70%);
  filter: blur(60px);
}

.halo-blue {
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 65%);
  filter: blur(70px);
}

.halo-purple {
  position: absolute;
  top: 40%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.1) 0%, transparent 70%);
  filter: blur(80px);
}

/* ═════════════════════════════════════════════════════════════════════
   SPLASH SCREEN
   ═════════════════════════════════════════════════════════════════════ */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-heart-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.splash-heart-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.35) 0%, transparent 70%);
  animation: pulseGlow 2s infinite ease-in-out;
}

.splash-heart-icon {
  font-size: 64px;
  color: var(--red-heart);
  position: relative;
  z-index: 2;
  animation: heartPulse 1.8s infinite ease-in-out;
  display: inline-block;
  filter: drop-shadow(0 4px 16px rgba(239, 68, 68, 0.45));
}

@keyframes heartPulse {
  0% { transform: scale(1.00); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1.00); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 0.9; transform: scale(1.25); }
}

.splash-title {
  font-size: 36px;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ═════════════════════════════════════════════════════════════════════
   AUTH PAGE (LOGIN & REGISTER)
   ═════════════════════════════════════════════════════════════════════ */
#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(14, 143, 129, 0.15) 0%, var(--bg-dark-base) 80%);
}

.auth-container {
  width: 100%;
  max-width: 1000px;
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.auth-brand-pane {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(11, 122, 110, 0.4) 0%, rgba(9, 107, 97, 0.15) 100%);
  border-right: var(--glass-border);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-brand-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(7,11,20,0.45) 0%, rgba(7,40,36,0.72) 100%);
  z-index: 0;
}

.auth-brand-pane > * { position: relative; z-index: 1; }

.auth-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.auth-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #0E8F81, #0B7A6E);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(14, 143, 129, 0.4);
}

.auth-logo-text {
  font-size: 26px;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.02em;
}

.auth-brand-body {
  margin: 40px 0;
}

.auth-tagline {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: #FFF;
  margin-bottom: 16px;
}

.auth-tagline span {
  color: #4ECDC4;
}

.auth-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.auth-heart-float {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  border: var(--glass-border);
  width: fit-content;
}

.auth-form-pane {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 6px;
}

.auth-form-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-google {
  width: 100%;
  height: 50px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  border: none;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: transform var(--dur-fast), box-shadow var(--dur-normal);
  margin-bottom: 24px;
}

.btn-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  height: 48px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  border: var(--glass-border);
  padding: 0 16px;
  color: #FFF;
  font-size: 15px;
  outline: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.form-input:focus {
  border-color: var(--green-secondary);
  background: rgba(255, 255, 255, 0.1);
}

.auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}

.btn-link {
  background: none;
  border: none;
  color: #4ECDC4;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

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

.btn-primary-glass {
  width: 100%;
  height: 50px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #0E8F81 0%, #0B7A6E 100%);
  color: #FFF;
  border: none;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Lexend', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(11, 122, 110, 0.4);
  transition: transform var(--dur-fast), box-shadow var(--dur-normal);
}

.btn-primary-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 122, 110, 0.55);
}

.btn-primary-glass:active {
  transform: scale(0.98);
}

/* ═════════════════════════════════════════════════════════════════════
   MAIN DASHBOARD SHELL & LAYOUT
   ═════════════════════════════════════════════════════════════════════ */
#app-layout {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* SIDEBAR (CAMADA 3) */
.sidebar {
  width: 280px;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
  transition: width var(--dur-normal) var(--ease-spring);
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 20px 8px;
  border-bottom: var(--glass-border);
  margin-bottom: 20px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #0E8F81, #0B7A6E);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(11, 122, 110, 0.35);
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFF;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav-group {
  margin-bottom: 16px;
}

.sidebar-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFF;
  transform: translateX(3px);
}

.nav-link.active {
  background: rgba(14, 143, 129, 0.22);
  color: #4ECDC4;
  font-weight: 600;
  border: var(--glass-border-accent);
}

.nav-link-icon {
  font-size: 20px;
  width: 24px;
  display: flex;
  justify-content: center;
}

/* Sidebar Footer & Family Plan Card */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: var(--glass-border);
}

.family-plan-card {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.25) 0%, rgba(14, 143, 129, 0.15) 100%);
  border: var(--glass-border-strong);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform var(--dur-fast);
}

.family-plan-card:hover {
  transform: translateY(-2px);
}

.family-plan-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFF;
}

.family-plan-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.user-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0E8F81, #0B7A6E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #FFF;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info {
  flex: 1;
  margin: 0 10px;
  overflow: hidden;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* MAIN CONTENT AREA */
.main-viewport {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* TOP HEADER */
.top-header {
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-dark);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  z-index: 50;
}

.header-greeting h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.header-greeting p {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.assisted-selector {
  background: rgba(231, 234, 203, 0.08);
  border: var(--glass-border);
  border-radius: var(--r-full);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.icon-btn-glass {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(231, 234, 203, 0.08);
  border: var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast), transform var(--dur-fast);
}

.icon-btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.notif-badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-heart);
}

/* CONTENT CANVAS & SECTIONS */
.content-canvas {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.dashboard-view {
  display: none;
  animation: fadeInTranslate 0.35s ease forwards;
}

.dashboard-view.active {
  display: block;
}

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

/* ═════════════════════════════════════════════════════════════════════
   CARDS GLASS (CAMADA 4) & COMPONENTS (Seção 2 & 15)
   ═════════════════════════════════════════════════════════════════════ */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: transform 250ms var(--ease-spring), box-shadow 250ms ease, border-color 250ms ease, background 250ms ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.16);
}

/* SUMMARY CARDS GRID & STAGGERED ENTRY (Seção 7 & 15) */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.summary-grid > .glass-card {
  animation: fadeInTranslate 350ms ease forwards;
}

.summary-grid > .glass-card:nth-child(1) { animation-delay: 0ms; }
.summary-grid > .glass-card:nth-child(2) { animation-delay: 50ms; }
.summary-grid > .glass-card:nth-child(3) { animation-delay: 100ms; }
.summary-grid > .glass-card:nth-child(4) { animation-delay: 150ms; }

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon-wrap.green { background: rgba(14, 143, 129, 0.18); color: #4ECDC4; }
.stat-icon-wrap.blue { background: rgba(37, 99, 235, 0.18); color: #60A5FA; }
.stat-icon-wrap.purple { background: rgba(108, 99, 255, 0.18); color: #A78BFA; }
.stat-icon-wrap.red { background: rgba(239, 68, 68, 0.18); color: #F87171; }

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

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #FFF;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.stat-trend.positive {
  color: #10B981;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.14);
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 6px;
}

.stat-status-badge.normal {
  color: #10B981;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.14);
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 6px;
}

/* HEADER CARD ICON BADGES */
.card-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header-icon.green { background: rgba(14, 143, 129, 0.18); color: #4ECDC4; }
.card-header-icon.blue { background: rgba(37, 99, 235, 0.18); color: #60A5FA; }
.card-header-icon.purple { background: rgba(108, 99, 255, 0.18); color: #A78BFA; }
.card-header-icon.orange { background: rgba(234, 88, 12, 0.18); color: #FB923C; }

/* DASHBOARD MAIN GRID */
.dash-grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  font-size: 17.5px;
  font-weight: 700;
  color: #FFF;
}

/* ITEM LISTS & MEDICATION STATUS (Seção 8) */
.med-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 12px;
  transition: background 200ms ease, border-color 200ms ease;
}

.med-item-row:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.med-item-row.med-row-taken {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.18);
}

.med-info-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.med-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pending { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.status-taken { background: #10B981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.status-delayed { background: #EF4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }

.med-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.med-status-pill.taken {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.med-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.med-status-pill.delayed {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.med-name {
  font-size: 15px;
  font-weight: 600;
  color: #FFF;
}

.med-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Check Button with Microinteraction (Seção 8 & 15) */
.btn-take-med {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--ease-spring);
}

.btn-take-med:hover {
  border-color: rgba(78, 205, 196, 0.6);
  color: #4ECDC4;
  background: rgba(78, 205, 196, 0.1);
}

.btn-take-med.taken {
  background: #10B981;
  border-color: #10B981;
  color: #FFF;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.anim-pop {
  animation: checkPop 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes checkPop {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* AGENDA INTERACTIVE CALENDAR & CONSULTATIONS */
.calendar-widget {
  width: 100%;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast);
}

.cal-day-cell:hover:not(.header-cell) {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}

.cal-day-cell.header-cell {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: default;
}

.cal-day-cell.active-day {
  background: var(--green-primary);
  color: #FFF;
  font-weight: 700;
}

.cal-day-cell.has-event::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #60A5FA;
  position: absolute;
  bottom: 4px;
}

/* CUIDAÍ IA ASSISTANT CARD (Section 22) */
.ai-assistant-card {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.18) 0%, rgba(17, 24, 39, 0.8) 100%);
  border: 1px solid rgba(108, 99, 255, 0.35);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.15);
}

.ai-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ai-chip-btn {
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: #FFF;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}

.ai-chip-btn:hover {
  background: rgba(108, 99, 255, 0.3);
  transform: translateY(-1px);
}

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE (Section 14 & 42-44)
   ═════════════════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 20px 10px;
  }
  .sidebar .brand-title, .sidebar .sidebar-group-label, .sidebar .nav-link-text, .sidebar .family-plan-sub, .sidebar .user-info {
    display: none;
  }
  .sidebar .nav-link {
    justify-content: center;
    padding: 14px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .top-header {
    height: auto;
    min-height: 72px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
  }
  .header-greeting h2 {
    font-size: 18px;
  }
  .header-greeting p {
    font-size: 12px;
  }
  .header-actions {
    gap: 8px;
    flex-wrap: wrap;
  }
  .assisted-selector {
    padding: 5px 12px;
    font-size: 12px;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .content-canvas {
    padding: 16px;
    padding-bottom: 110px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .auth-container {
    grid-template-columns: 1fr;
  }
  .auth-brand-pane {
    display: none;
  }
  
  /* Bottom Navigation Mobile */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: var(--glass-border);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
  }
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
  }
  .mobile-nav-item.active {
    color: #4ECDC4;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.mobile-menu-btn {
  display: none;
}

/* Mobile Menu Drawer Modal */
.mobile-drawer-container {
  max-width: 380px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px 24px;
}

.mobile-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.mobile-drawer-body .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-body .nav-link-text {
  display: inline-block !important;
  color: inherit;
}

.mobile-drawer-body .nav-link:hover,
.mobile-drawer-body .nav-link.active {
  background: rgba(78, 205, 196, 0.12);
  border-color: rgba(78, 205, 196, 0.3);
  color: #4ECDC4;
}

.mobile-drawer-body .nav-link-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(78, 205, 196, 0.15);
  color: #4ECDC4;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-theme .mobile-drawer-body .nav-link {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(35, 49, 45, 0.08);
  color: #172421;
}

body.light-theme .mobile-drawer-body .nav-link-icon {
  background: rgba(14, 143, 129, 0.12);
  color: #0E8F81;
}

body.light-theme .mobile-bottom-nav {
  background: rgba(255, 251, 242, 0.94);
  border-top: 1px solid rgba(35, 49, 45, 0.12);
}

body.light-theme .mobile-nav-item {
  color: #6B7280;
}

body.light-theme .mobile-nav-item.active {
  color: #0E8F81;
}

/* ═════════════════════════════════════════════════════════════════════
   MODALS (GLASS DIALOGS)
   ═════════════════════════════════════════════════════════════════════ */
.glass-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.glass-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.glass-modal-container {
  width: 100%;
  max-width: 540px;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border-strong);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--glass-shadow);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease-spring);
}

.glass-modal-overlay.active .glass-modal-container {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFF;
}

/* ═══════════════════════════════════════════════════════════════
   TABS ROW
   ═══════════════════════════════════════════════════════════════ */
.tabs-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: var(--r-full);
  border: var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.tab-btn:hover { background: rgba(255,255,255,0.1); color: #FFF; }
.tab-btn.active {
  background: rgba(14,143,129,0.22);
  color: #4ECDC4;
  border-color: rgba(14,143,129,0.4);
}

/* ═══════════════════════════════════════════════════════════════
   CALENDAR WIDGET
   ═══════════════════════════════════════════════════════════════ */
.cal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-month-label {
  font-size: 16px;
  font-weight: 700;
  color: #FFF;
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: var(--glass-border);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--dur-fast);
}

.cal-nav-btn:hover { background: rgba(255,255,255,0.15); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-weekday {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 0;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.cal-day:hover { background: rgba(255,255,255,0.1); color: #FFF; }
.cal-day.empty { cursor: default; }
.cal-day.today { background: rgba(14,143,129,0.2); color: #4ECDC4; font-weight: 700; }
.cal-day.selected { background: var(--green-primary); color: #FFF; font-weight: 700; }
.cal-day.has-event::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #60A5FA;
  position: absolute;
  bottom: 3px;
}
.cal-day.selected.has-event::after { background: rgba(255,255,255,0.7); }

/* ═══════════════════════════════════════════════════════════════
   VITALS HISTORY LIST
   ═══════════════════════════════════════════════════════════════ */
.vital-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.04);
  border: var(--glass-border);
  margin-bottom: 10px;
  transition: background var(--dur-fast);
}

.vital-history-item:hover { background: rgba(255,255,255,0.07); }

.vital-history-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.vital-history-item:hover .vital-history-actions { opacity: 1; }

.btn-icon-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.btn-icon-sm:hover { background: rgba(255,255,255,0.15); color: #FFF; }
.btn-icon-sm.danger:hover { background: rgba(239,68,68,0.2); color: #F87171; border-color: rgba(239,68,68,0.3); }

/* ═══════════════════════════════════════════════════════════════
   ADHERENCE CHART BARS
   ═══════════════════════════════════════════════════════════════ */
.adherence-chart-wrap {
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-md);
  border: var(--glass-border);
}

.adherence-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
}

.adherence-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.adherence-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s var(--ease-spring);
}

.adherence-bar.high { background: #10B981; }
.adherence-bar.mid { background: #F59E0B; }
.adherence-bar.low { background: #EF4444; }

.adherence-label {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   DOCUMENTS VIEW
   ═══════════════════════════════════════════════════════════════ */
.doc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.05);
  border: var(--glass-border);
  margin-bottom: 12px;
  transition: background var(--dur-fast);
}

.doc-card:hover { background: rgba(255,255,255,0.09); }

.doc-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon-wrap.exames { background: rgba(37,99,235,0.18); color: #60A5FA; }
.doc-icon-wrap.receitas { background: rgba(14,143,129,0.18); color: #4ECDC4; }
.doc-icon-wrap.outros { background: rgba(108,99,255,0.18); color: #A78BFA; }

.doc-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.doc-card:hover .doc-actions { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   FAMILY VIEW
   ═══════════════════════════════════════════════════════════════ */
.family-member-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.05);
  border: var(--glass-border);
  margin-bottom: 12px;
  transition: background var(--dur-fast);
}

.family-member-card:hover { background: rgba(255,255,255,0.09); }

.family-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0E8F81, #0B7A6E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #FFF;
  flex-shrink: 0;
}

.family-avatar.admin {
  background: linear-gradient(135deg, #6C63FF, #4F46E5);
}

.family-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.family-member-card:hover .family-actions { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   PERSON PROFILE
   ═══════════════════════════════════════════════════════════════ */
.person-hero-card {
  background: linear-gradient(135deg, rgba(14,143,129,0.35), rgba(11,122,110,0.2));
  border: var(--glass-border-accent);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.person-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0E8F81, #0B7A6E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #FFF;
  border: 3px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.person-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.person-info-item {
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-md);
  border: var(--glass-border);
}

.person-info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.person-info-value {
  font-size: 15px;
  font-weight: 600;
  color: #FFF;
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS VIEW
   ═══════════════════════════════════════════════════════════════ */
.settings-section {
  margin-bottom: 28px;
}

.settings-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 4px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.05);
  border: var(--glass-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.settings-item:hover { background: rgba(255,255,255,0.09); }

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle-switch input { display: none; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.25s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFF;
  top: 3px;
  left: 3px;
  transition: transform 0.25s var(--ease-spring);
}

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

/* AI Result Card */
.ai-result-card {
  background: linear-gradient(135deg, rgba(108,99,255,0.2), rgba(17,24,39,0.8));
  border: 1px solid rgba(108,99,255,0.4);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

/* Badge variants */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.bg-green { background: rgba(16,185,129,0.15); color: #10B981; border: 1px solid rgba(16,185,129,0.3); }
.bg-blue { background: rgba(37,99,235,0.15); color: #60A5FA; border: 1px solid rgba(37,99,235,0.3); }
.bg-red { background: rgba(239,68,68,0.15); color: #EF4444; border: 1px solid rgba(239,68,68,0.3); }
.bg-orange { background: rgba(245,158,11,0.15); color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }
.bg-purple { background: rgba(108,99,255,0.15); color: #A78BFA; border: 1px solid rgba(108,99,255,0.3); }

.ai-reminder-box {
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 12px;
}

.med-card-detailed { margin-bottom: 16px; }
.med-card-taken { border-color: rgba(16,185,129,0.25) !important; }


/* ── Beta Code Screen ── */
#beta-code-screen { display: none; }
#beta-code-screen.visible { display: flex; }

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

/* ── Pricing Cards ── */
.pricing-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s, border-color 0.2s;
}
.pricing-card.featured {
  border-color: rgba(14,143,129,0.5);
  background: rgba(14,143,129,0.07);
  transform: scale(1.03);
}
.pricing-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 8px;
}
.pricing-name {
  font-size: 16px;
  font-weight: 700;
  color: #FFF;
}
.pricing-price {
  font-size: 32px;
  font-weight: 800;
  color: #FFF;
  line-height: 1.1;
  margin: 6px 0;
}
.pricing-price span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.pricing-features {
  list-style: none;
  margin: 12px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pricing-features li {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  padding-left: 18px;
  position: relative;
}
.pricing-features li::before { content: "✓"; position: absolute; left: 0; color: #10B981; font-weight: 700; }
.pricing-features li.disabled { color: var(--text-muted); }
.pricing-features li.disabled::before { content: "✕"; color: rgba(255,255,255,0.2); }
.pricing-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.pricing-btn:active { transform: scale(0.97); }
.pricing-btn.primary { background: linear-gradient(135deg,#0E8F81,#0B7A6E); color: #FFF; }
.pricing-btn.secondary { background: rgba(108,99,255,0.25); color: #A78BFA; border: 1px solid rgba(108,99,255,0.4); }
.pricing-btn.current { background: rgba(255,255,255,0.06); color: var(--text-muted); cursor: default; }
.pricing-btn:not(.current):hover { opacity: 0.85; }

/* ══════════════════════════════════════════════════════════════════
   MODO DIA — Light Theme — Overrides completos
   ══════════════════════════════════════════════════════════════════ */

/* Fundo e overlay */
body.light-theme {
  --text-primary: #172421;
  --text-secondary: #3D4A47;
  --text-muted: #6B7875;
  background-color: #F4F6EE;
}
body.light-theme .app-bg-overlay {
  background: linear-gradient(160deg, rgba(244,246,238,0.92) 0%, rgba(235,239,226,0.96) 100%);
}

/* Sidebar */
body.light-theme .sidebar {
  background: rgba(255, 248, 232, 0.96);
  border-right: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(20px);
}
body.light-theme .brand-title,
body.light-theme .nav-link-text,
body.light-theme .sidebar-group-label { color: #374151; }
body.light-theme .sidebar-group-label { color: #9CA3AF; }
body.light-theme .nav-link { color: #4B5563; }
body.light-theme .nav-link:hover { background: rgba(11,122,110,0.08); color: #0B7A6E; }
body.light-theme .nav-link.active { background: linear-gradient(135deg,rgba(11,122,110,0.15),rgba(14,143,129,0.1)); color: #0B7A6E; }
body.light-theme .nav-link.active .nav-link-icon { color: #0B7A6E; }
body.light-theme .family-plan-card { background: rgba(11,122,110,0.08); border-color: rgba(11,122,110,0.2); }
body.light-theme .family-plan-title,
body.light-theme .family-plan-sub { color: #0B7A6E; }
body.light-theme .sidebar-footer { border-top-color: rgba(0,0,0,0.08); }
body.light-theme .user-name { color: #111827; }
body.light-theme .user-role { color: #6B7280; }

/* Header */
body.light-theme .top-header,
body.light-theme .main-header {
  background: rgba(244, 246, 238, 0.94);
  border-bottom: 1px solid rgba(35, 49, 45, 0.08);
}
body.light-theme .header-greeting h2 { color: #172421; }
body.light-theme .header-greeting p { color: #6B7875; }
body.light-theme .icon-btn-glass {
  background: rgba(35, 49, 45, 0.05);
  border-color: rgba(35, 49, 45, 0.08);
  color: #172421;
}
body.light-theme .icon-btn-glass:hover { background: rgba(35, 49, 45, 0.09); }
body.light-theme .assisted-selector {
  background: rgba(35, 49, 45, 0.04);
  border-color: rgba(35, 49, 45, 0.08);
  color: #172421;
}

/* Cards de vidro — Sálvia Biofílica */
body.light-theme .glass-card {
  background: rgba(238, 242, 230, 0.88);
  border: 1px solid rgba(35, 49, 45, 0.08);
  box-shadow: 0 4px 20px rgba(35, 49, 45, 0.05), 0 1px 4px rgba(35, 49, 45, 0.03);
}
body.light-theme .glass-card:hover {
  background: rgba(244, 248, 236, 0.96);
  border-color: rgba(35, 49, 45, 0.14);
}

/* Textos gerais hardcoded */
body.light-theme .card-title,
body.light-theme .stat-value,
body.light-theme .med-name,
body.light-theme .modal-title,
body.light-theme h1, body.light-theme h2,
body.light-theme h3, body.light-theme h4 { color: #172421; }

body.light-theme .stat-label,
body.light-theme .med-sub,
body.light-theme .card-sub { color: #6B7875; }

/* Stat cards */
body.light-theme .stat-card {
  background: rgba(238, 242, 230, 0.90);
  border: 1px solid rgba(35, 49, 45, 0.08);
}

/* Tabs */
body.light-theme .tabs-row { background: rgba(35, 49, 45, 0.04); border-color: rgba(35, 49, 45, 0.07); }
body.light-theme .tab-btn { color: #6B7875; }
body.light-theme .tab-btn:hover { background: rgba(35, 49, 45, 0.06); color: #172421; }
body.light-theme .tab-btn.active { background: #EEF2E6; color: #0B7A6E; box-shadow: 0 2px 8px rgba(35, 49, 45, 0.08); }

/* Calendário */
body.light-theme .cal-header-row { color: #111827; }
body.light-theme .cal-month-label { color: #111827; }
body.light-theme .cal-nav-btn { color: #374151; background: rgba(0,0,0,0.05); }
body.light-theme .cal-nav-btn:hover { background: rgba(0,0,0,0.1); }
body.light-theme .cal-weekday { color: #9CA3AF; }
body.light-theme .cal-day { color: #374151; }
body.light-theme .cal-day:hover { background: rgba(11,122,110,0.1); color: #0B7A6E; }
body.light-theme .cal-day.today { background: rgba(11,122,110,0.12); color: #0B7A6E; }
body.light-theme .cal-day.selected { background: #0B7A6E; color: #FFF; }

/* Histórico de vitais */
body.light-theme .vital-history-item { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
body.light-theme .vital-history-item:hover { background: rgba(0,0,0,0.06); }
body.light-theme .btn-icon-sm { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: #374151; }
body.light-theme .btn-icon-sm:hover { background: rgba(0,0,0,0.1); color: #111827; }
body.light-theme .btn-icon-sm.danger:hover { background: rgba(239,68,68,0.12); color: #EF4444; }

/* Documentos */
body.light-theme .doc-card { background: rgba(255,250,238,0.92); border-color: rgba(0,0,0,0.07); }
body.light-theme .doc-card:hover { background: #FFFAF2; }

/* Família */
body.light-theme .family-member-card { background: rgba(255,250,238,0.88); border-color: rgba(0,0,0,0.07); }
body.light-theme .family-member-card:hover { background: #FFFAF2; }

/* Perfil do assistido */
body.light-theme .person-hero-card { background: linear-gradient(135deg,rgba(11,122,110,0.1),rgba(14,143,129,0.08)); border-color: rgba(11,122,110,0.2); }
body.light-theme .person-info-item { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); }
body.light-theme .person-info-label { color: #9CA3AF; }
body.light-theme .person-info-value { color: #111827; }

/* Configurações */
body.light-theme .settings-section-title { color: #9CA3AF; }
body.light-theme .settings-item { border-bottom-color: rgba(0,0,0,0.06); }
body.light-theme .settings-item:hover { background: rgba(0,0,0,0.03); }
body.light-theme .settings-item-icon { filter: brightness(0.9); }

/* Toggle switch visível no modo claro */
body.light-theme .toggle-slider {
  background: rgba(0,0,0,0.18);
}
body.light-theme .toggle-slider::before {
  background: #FFF;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
body.light-theme .toggle-switch input:checked + .toggle-slider {
  background: #0B7A6E;
}

/* Formulários */
body.light-theme .form-input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #111827;
}
body.light-theme .form-input:focus { border-color: #0B7A6E; background: #FFFAF2; }
body.light-theme .form-input::placeholder { color: #9CA3AF; }
body.light-theme .form-label { color: #374151; }
body.light-theme select.form-input {
  color: #172421 !important;
  background-color: #EEF2E6 !important;
  border-color: rgba(35, 49, 45, 0.2) !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23172421' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

body.light-theme select.form-input option {
  background-color: #FFFFFF !important;
  color: #172421 !important;
}

select.form-input option {
  background-color: #1F2937;
  color: #FFFFFF;
}

/* Modais */
body.light-theme .glass-modal-container {
  background: rgba(255, 251, 242, 0.98);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
}
body.light-theme .glass-modal-overlay { background: rgba(0,0,0,0.3); }

/* Med cards */
body.light-theme .med-item-row { border-bottom-color: rgba(0,0,0,0.06); }
body.light-theme .med-item-row:hover { background: rgba(0,0,0,0.03); }

/* AI result card */
body.light-theme .ai-result-card {
  background: rgba(108,99,255,0.06);
  border-color: rgba(108,99,255,0.2);
}

/* Pricing cards */
body.light-theme .pricing-card {
  background: rgba(255,250,238,0.92);
  border-color: rgba(0,0,0,0.08);
}
body.light-theme .pricing-card.featured {
  background: rgba(11,122,110,0.06);
  border-color: rgba(11,122,110,0.3);
}
body.light-theme .pricing-name { color: #111827; }
body.light-theme .pricing-price { color: #111827; }
body.light-theme .pricing-price span { color: #6B7280; }
body.light-theme .pricing-features li { color: #374151; }
body.light-theme .pricing-features li.disabled { color: #9CA3AF; }
body.light-theme .pricing-features li.disabled::before { color: rgba(0,0,0,0.18); }
body.light-theme .pricing-btn.current { background: rgba(0,0,0,0.06); color: #9CA3AF; }
body.light-theme .pricing-btn.secondary { background: rgba(108,99,255,0.12); color: #6C63FF; border-color: rgba(108,99,255,0.3); }

/* Mobile nav */
body.light-theme .mobile-nav {
  background: rgba(255, 248, 232, 0.97);
  border-top: 1px solid rgba(0,0,0,0.08);
}
body.light-theme .mobile-nav-item { color: #6B7280; }
body.light-theme .mobile-nav-item.active { color: #0B7A6E; }

/* Notificações drawer */
body.light-theme .notifications-drawer {
  background: rgba(255, 251, 242, 0.99);
  border-left: 1px solid rgba(0,0,0,0.08);
}

/* Aderência / chart bars */
body.light-theme .adherence-chart-wrap { background: rgba(0,0,0,0.03); }

/* Badges e Anéis no light */
body.light-theme .badge { opacity: 0.9; }
body.light-theme .ring-percent { color: #172421 !important; }

/* Texto inline hardcoded em style="" — reset global */
body.light-theme [style*="color:#FFF"],
body.light-theme [style*="color: #FFF"] { color: #111827 !important; }
body.light-theme [style*="color:rgba(255,255,255,0.85)"],
body.light-theme [style*="color:rgba(255,255,255,0.75)"],
body.light-theme [style*="color:rgba(255,255,255,0.7)"] { color: #374151 !important; }
body.light-theme [style*="color:var(--text-secondary)"] { color: #6B7280 !important; }
body.light-theme [style*="color:var(--text-muted)"] { color: #9CA3AF !important; }
body.light-theme [style*="background:rgba(255,255,255,0.05)"],
body.light-theme [style*="background: rgba(255,255,255,0.05)"],
body.light-theme [style*="background:rgba(255,255,255,0.04)"],
body.light-theme [style*="background:rgba(255,255,255,0.06)"],
body.light-theme [style*="background:rgba(255,255,255,0.07)"] {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.07) !important;
}

/* ═══════════════════════════════════════════════════════
   PAINEL DE CONTROLE - REFINAMENTO DE UI/UX (ESPECIFICAÇÕES DA REQUISIÇÃO)
   ═══════════════════════════════════════════════════════ */

/* 1. SEÇÃO CENTRAL: MEDICAMENTOS DE HOJE */
.med-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(244, 246, 238, 0.65);
  border: 1px solid rgba(35, 49, 45, 0.07);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.med-item-row:last-child {
  margin-bottom: 0;
}

.med-item-row:hover {
  transform: translateY(-2px);
  background: rgba(244, 246, 238, 0.95);
  border-color: rgba(11, 122, 110, 0.25);
  box-shadow: 0 6px 18px rgba(35, 49, 45, 0.05);
}

.med-item-row.med-row-taken {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.18);
}

.med-item-row.med-row-delayed {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.18);
}

.med-info-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.med-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.med-status-indicator.status-taken {
  background: #10B981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.med-status-indicator.status-pending {
  background: #F59E0B;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.med-status-indicator.status-delayed {
  background: #EF4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.med-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.med-sub {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.med-time-tag {
  font-weight: 700;
  color: #0B7A6E;
  display: inline-flex;
  align-items: center;
}

.med-dot-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

.med-stock-text {
  font-size: 12px;
  color: var(--text-muted);
}

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

/* Status Pills com Ícone + Texto + Cor (Acessibilidade WCAG AA) */
.med-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
}

.med-status-pill.taken {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.med-status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.med-status-pill.delayed {
  background: rgba(239, 68, 68, 0.12);
  color: #B91C1C;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Botão de Confirmação Confortável (Área Clicável >= 44px) */
.btn-take-med {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid rgba(11, 122, 110, 0.3);
  background: rgba(11, 122, 110, 0.08);
  color: #0B7A6E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-take-med:hover {
  background: #0B7A6E;
  color: #FFFFFF;
  border-color: #0B7A6E;
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(11, 122, 110, 0.3);
}

.btn-take-med.taken {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-take-med.taken:hover {
  background: #059669;
  border-color: #059669;
}

/* 2. CUIDAÍ IA - ASSISTENTE REFINADO */
.ai-assistant-card {
  padding: 24px 28px;
  border-radius: 16px;
}

.ai-reminder-box {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.20);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}

.ai-chips-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ai-chip-btn {
  background: rgba(11, 122, 110, 0.08);
  border: 1px solid rgba(11, 122, 110, 0.18);
  color: #0B7A6E;
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ai-chip-btn:hover {
  background: #0B7A6E;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 122, 110, 0.2);
}

/* 3. PRÓXIMA CONSULTA & DIÁRIO */
.consultation-card {
  padding: 24px 28px;
  border-radius: 16px;
}

.diary-card-editorial {
  padding: 24px 28px;
  border-radius: 16px;
}

/* ═══════════════════════════════════════════════════════
   FASE 1: SEGURANÇA VITAL & URGÊNCIA (P0 - CRÍTICA)
   ═══════════════════════════════════════════════════════ */

/* 1. BOTÃO FLUTUANTE DE EMERGÊNCIA (SOS) */
.btn-sos-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF !important;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.55), 0 0 0 4px rgba(220, 38, 38, 0.2);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  animation: sosPulse 2.5s infinite ease-in-out;
}

.btn-sos-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.75), 0 0 0 6px rgba(220, 38, 38, 0.3);
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.btn-sos-float:active {
  transform: scale(0.96);
}

@keyframes sosPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(220, 38, 38, 0.55), 0 0 0 4px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 14px 38px rgba(220, 38, 38, 0.75), 0 0 0 10px rgba(220, 38, 38, 0.35); }
}

/* 2. MODAL DE EMERGÊNCIA SOS */
.sos-modal-card {
  max-width: 560px !important;
  border: 2px solid rgba(239, 68, 68, 0.4) !important;
  background: rgba(24, 15, 18, 0.95) !important;
  backdrop-filter: blur(28px) !important;
}

body.light-theme .sos-modal-card {
  background: rgba(254, 242, 242, 0.98) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.sos-call-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FFF;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.sos-call-btn:hover {
  background: #DC2626;
  color: #FFF !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
}

/* 3. MODAL DE TRAVA DE SOBREDOSAGEM */
.warning-modal-card {
  max-width: 520px !important;
  border: 2px solid rgba(245, 158, 11, 0.4) !important;
  background: rgba(26, 21, 15, 0.95) !important;
}

body.light-theme .warning-modal-card {
  background: rgba(254, 252, 232, 0.98) !important;
}

/* 4. TRIPLA CODIFICAÇÃO VISUAL (COR + ÍCONE + TEXTO) */
.triple-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.triple-code-badge.normal {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

body.light-theme .triple-code-badge.normal {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.triple-code-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

body.light-theme .triple-code-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #B45309;
}

.triple-code-badge.alert {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

body.light-theme .triple-code-badge.alert {
  background: rgba(239, 68, 68, 0.15);
  color: #B91C1C;
}

/* ═══════════════════════════════════════════════════════
   FASE 2: ERGONOMIA & ROTINA DIÁRIA DO CUIDADOR (P1 - ALTA)
   ═══════════════════════════════════════════════════════ */

/* 1. CARD DE PASSAGEM DE PLANTÃO (SHIFT HANDOFF) */
.shift-handoff-card {
  background: linear-gradient(135deg, rgba(14, 143, 129, 0.12) 0%, rgba(108, 99, 255, 0.08) 100%);
  border: 1px solid rgba(14, 143, 129, 0.28);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(14, 143, 129, 0.08);
}

body.light-theme .shift-handoff-card {
  background: linear-gradient(135deg, rgba(11, 122, 110, 0.08) 0%, rgba(108, 99, 255, 0.05) 100%);
  border-color: rgba(11, 122, 110, 0.22);
}

.shift-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1f));
  gap: 12px;
  margin-top: 16px;
}

.shift-metric-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.light-theme .shift-metric-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.shift-metric-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.shift-metric-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

/* 2. RASTREADOR DE HIDRATAÇÃO E ELIMINAÇÕES */
.hydration-widget {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

body.light-theme .hydration-widget {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.18);
}

.hydration-progress-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  margin: 12px 0 16px 0;
}

body.light-theme .hydration-progress-bar-bg {
  background: rgba(0, 0, 0, 0.08);
}

.hydration-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6 0%, #60A5FA 100%);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-quick-water {
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-quick-water:hover {
  background: #3B82F6;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}

.btn-quick-elimination {
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.15);
  color: #A855F7;
  border: 1px solid rgba(168, 85, 247, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-quick-elimination:hover {
  background: #A855F7;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35);
}

/* 3. DITADO POR VOZ (SPEECH-TO-TEXT) */
.btn-voice-dictate {
  min-height: 52px;
  min-width: 52px;
  border-radius: 14px;
  background: rgba(14, 143, 129, 0.15);
  color: #0E8F81;
  border: 1px solid rgba(14, 143, 129, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-dictate:hover {
  background: #0E8F81;
  color: #FFFFFF !important;
  transform: scale(1.04);
}

.btn-voice-dictate.recording {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  border-color: #EF4444 !important;
  animation: voiceMicPulse 1.2s infinite ease-in-out;
}

@keyframes voiceMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.15); }
}

/* 4. ALVOS DE TOQUE CONFORTÁVEIS (TOUCH TARGETS 56PX FOR CAREGIVERS) */
.touch-target-56 {
  min-height: 56px !important;
  min-width: 56px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  font-size: 15px !important;
  border-radius: 14px !important;
}

/* ═══════════════════════════════════════════════════════
   FASE 3: GRÁFICOS DE SAÚDE & ADESÃO (P2 - MÉDIA)
   ═══════════════════════════════════════════════════════ */

/* 1. ANÉIS RADIAIS DE METAS DA ROTINA */
.routine-rings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1f));
  gap: 16px;
}

.radial-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.radial-ring-item:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 143, 129, 0.4);
}

.ring-svg-container {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-in-out;
}

.ring-fill.blue   { stroke: #3B82F6; }
.ring-fill.green  { stroke: #10B981; }
.ring-fill.purple { stroke: #8B5CF6; }
.ring-fill.orange { stroke: #F59E0B; }

.ring-center-content {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-percent {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.ring-icon {
  font-size: 14px;
  line-height: 1;
}

.ring-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ring-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.ring-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

/* 2. HEATMAP SEMANAL DE ADESÃO MEDICAMENTOSA */
.heatmap-grid-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 8px;
  align-items: center;
}

.heatmap-row-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.heatmap-cell {
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
}

.heatmap-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.heatmap-cell.status-green  { background: rgba(16, 185, 129, 0.25); border-color: rgba(16, 185, 129, 0.5); color: #34D399; }
.heatmap-cell.status-yellow { background: rgba(245, 158, 11, 0.25); border-color: rgba(245, 158, 11, 0.5); color: #FBBF24; }
.heatmap-cell.status-red    { background: rgba(239, 68, 68, 0.25);  border-color: rgba(239, 68, 68, 0.5);  color: #F87171; }
.heatmap-cell.status-gray   { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); color: var(--text-muted); }

/* Dots de legenda */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.green  { background: #10B981; }
.dot.yellow { background: #F59E0B; }
.dot.red    { background: #EF4444; }
.dot.gray   { background: rgba(255, 255, 255, 0.3); }

/* 3. FILTROS DE PERÍODO DOS GRÁFICOS */
.btn-period-pill {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-period-pill.active, .btn-period-pill:hover {
  background: var(--brand-teal, #0E8F81);
  color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════
   VARREDURA & AJUSTES DE RESPONSIVIDADE MOBILE (TELAS DE CELULAR)
   ═══════════════════════════════════════════════════════ */

/* 1. Paywall Grid Responsivo (Fix da Imagem 2) */
.paywall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  /* Travar vazamento horizontal na página */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .content-canvas {
    padding: 12px 10px 100px 10px !important;
    overflow-x: hidden;
  }

  /* Modais no Mobile (Fix do Modal Paywall) */
  .glass-modal-overlay {
    padding: 12px !important;
  }

  .glass-modal-container {
    padding: 20px 14px !important;
    max-width: 100% !important;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
  }

  .paywall-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Medicamentos de Hoje no Mobile (Fix da Imagem 1) */
  .card-header-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .med-item-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .med-info-group {
    width: 100%;
    align-items: flex-start;
  }

  .med-sub {
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 11.5px !important;
  }

  .med-actions-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    margin-top: 4px;
  }

  .btn-take-med {
    min-width: 44px;
    min-height: 44px;
  }

  /* Header Superior no Mobile */
  .top-header {
    padding: 10px 12px !important;
  }

  .assisted-selector {
    max-width: 160px !important;
    font-size: 11px !important;
  }

  /* Botão de Adicionar Medicamento / Registrar Vital */
  .btn-primary-glass {
    font-size: 12.5px !important;
    padding: 8px 12px !important;
  }
}

/* ═══════════════════════════════════════════════════════
   MODO IDOSO — ACESSIBILIDADE ELEVADA (+25% FONTE & TOUCH TARGETS)
   ═══════════════════════════════════════════════════════ */
body.elderly-mode {
  font-size: 18px !important;
}

body.elderly-mode .nav-link-text {
  font-size: 16px !important;
  font-weight: 700 !important;
}

body.elderly-mode .brand-title {
  font-size: 22px !important;
}

body.elderly-mode .header-greeting h2 {
  font-size: 26px !important;
  font-weight: 800 !important;
}

body.elderly-mode .header-greeting p {
  font-size: 15px !important;
}

body.elderly-mode .card-title {
  font-size: 19px !important;
  font-weight: 800 !important;
}

body.elderly-mode .card-sub {
  font-size: 14.5px !important;
}

body.elderly-mode .stat-value {
  font-size: 30px !important;
  font-weight: 800 !important;
}

body.elderly-mode .stat-label {
  font-size: 14.5px !important;
  font-weight: 700 !important;
}

body.elderly-mode .med-name {
  font-size: 18.5px !important;
  font-weight: 800 !important;
}

body.elderly-mode .med-sub {
  font-size: 14px !important;
}

body.elderly-mode .med-time-badge {
  font-size: 14px !important;
  padding: 6px 14px !important;
  font-weight: 800 !important;
}

body.elderly-mode .btn {
  font-size: 16px !important;
  padding: 14px 24px !important;
  min-height: 48px !important;
  font-weight: 800 !important;
}

body.elderly-mode .form-input,
body.elderly-mode select.form-input {
  font-size: 16px !important;
  padding: 12px 16px !important;
  min-height: 48px !important;
}

body.elderly-mode .form-label {
  font-size: 15px !important;
  font-weight: 700 !important;
}

body.elderly-mode .tab-btn {
  font-size: 15.5px !important;
  padding: 10px 18px !important;
  font-weight: 800 !important;
}

body.elderly-mode .modal-title {
  font-size: 22px !important;
  font-weight: 800 !important;
}

body.elderly-mode .modal-body {
  font-size: 16px !important;
  line-height: 1.6 !important;
}

body.elderly-mode .ring-percent {
  font-size: 16px !important;
  font-weight: 900 !important;
}

body.elderly-mode .ring-label {
  font-size: 15px !important;
  font-weight: 800 !important;
}

body.elderly-mode .ring-subtext {
  font-size: 13px !important;
}

body.elderly-mode .vital-history-item {
  font-size: 16px !important;
  padding: 14px 18px !important;
}

body.elderly-mode .settings-section-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
}

body.elderly-mode .settings-item-title {
  font-size: 17px !important;
  font-weight: 800 !important;
}

body.elderly-mode .settings-item-desc {
  font-size: 13.5px !important;
}

body.elderly-mode .sos-btn-inner {
  font-size: 16px !important;
  padding: 12px 20px !important;
}

/* ══════════════════════════════════════════════
   Tutorial Acessível de Boas-Vindas para Idosos
══════════════════════════════════════════════ */
.tutorial-tab-btn {
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #94A3B8;
  font-family: 'Nunito', 'Lexend', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tutorial-tab-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.05);
}
.tutorial-tab-btn.active {
  color: #4ECDC4;
  border-bottom-color: #4ECDC4;
  background: rgba(78, 205, 196, 0.12);
  font-weight: 800;
}
.tut-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.tut-card p {
  font-size: inherit;
  line-height: 1.65;
  color: #CBD5E1;
  margin: 0;
}
.tut-card strong {
  color: #F8FAFC;
}
.tutorial-senior-font {
  font-family: 'Nunito', 'Lexend', 'Segoe UI', sans-serif !important;
  font-size: 17px;
}
.tutorial-senior-font.font-size-sm { font-size: 15px !important; }
.tutorial-senior-font.font-size-md { font-size: 17.5px !important; }
.tutorial-senior-font.font-size-lg { font-size: 20px !important; }
.tutorial-senior-font.font-size-xl { font-size: 23px !important; }




