/* ===== IMPORTAÇÃO DE FONTE MODERNA ===== */

/* ===== DESIGN SYSTEM (VARIÁVEIS) ===== */
:root {
  --violet: #8b5cf6;
  --violet-dark: #6d28d9;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --bg-dark: #0f0f13;
  --bg-card: rgba(26, 26, 31, 0.65);
  --bg-input: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: #b8bec7;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  /* 🆕 CORES DAS BARRAS DE MACROS (usadas inline no index.html) */
  --red: #ef4444;
  --yellow: #f59e0b;
  --green: #10b981;
  /* 🆕 FONTE CENTRALIZADA */
  --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --glass-blur: blur(16px);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* 🆕 Controles nativos (calendário, hora, select) no tema escuro */
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 🆕 Scrollbar fina no Firefox (Chrome já usa ::-webkit-scrollbar) */
* { scrollbar-width: thin; scrollbar-color: var(--violet-dark) transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
  padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  /* 🆕 PWA: evita "pull-to-refresh" fantasma no Android */
  overscroll-behavior-y: none;
}

/* 🆕 Seleção de texto com a cor da marca */
::selection { background: rgba(139, 92, 246, 0.45); color: #ffffff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--violet-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

h1 { font-weight: 800; letter-spacing: -0.5px; }
h2 { font-weight: 700; font-size: 1.1rem; }
h3 { font-weight: 600; font-size: 1rem; margin: 16px 0 10px; }
hr { border: none; border-top: 1px solid var(--border-color); margin: 16px 0; }

/* 🆕 ACESSIBILIDADE: foco visível para navegação por teclado */
button:focus-visible,
a:focus-visible,
.card-header:focus-visible,
.body-type-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 🆕 ACESSIBILIDADE: respeita usuários com sensibilidade a movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== MODO CLARO PREMIUM ==================== */
body.light-mode {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-input: rgba(0, 0, 0, 0.05);
  --border-color: rgba(0, 0, 0, 0.1);
  --text-primary: #0f172a;
  --text-secondary: #474e5a;
  --shadow-glow: 0 0 15px rgba(139, 92, 246, 0.15);
  color-scheme: light;
}

/* ==================== LOADING OVERLAY ==================== */
#loading-overlay { position: fixed; inset: 0; background: var(--bg-dark); z-index: 9999; display: flex; justify-content: center; align-items: center; flex-direction: column; transition: opacity 0.5s ease; }
#loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-text { color: var(--text-primary); margin-top: 20px; font-size: 1.1rem; letter-spacing: 2px; font-weight: 500; }

/* ==================== NOTIFICAÇÕES TOAST ==================== */
#notification-container { position: fixed; top: 90px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; max-width: 350px; }
.notification { padding: 16px 20px; border-radius: var(--radius-md); color: white; font-weight: 500; font-size: 0.95rem; box-shadow: 0 8px 24px rgba(0,0,0,0.3); animation: slideIn 0.3s ease; display: flex; align-items: center; gap: 10px; backdrop-filter: var(--glass-blur); }
.notification.success { background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9)); }
.notification.error { background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9)); }
.notification.info { background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9)); }
.notification.achievement { background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9)); animation: slideIn 0.3s ease, achievementGlow 2s ease infinite; }
@keyframes achievementGlow { 0%, 100% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4); } 50% { box-shadow: 0 4px 24px rgba(245, 158, 11, 0.7); } }
.notification.fade-out { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(400px); opacity: 0; } }

/* ==================== HEADER FIXO MODERNO ==================== */
.app-header {
  position: fixed; top: 0; left: 0; width: 100%; padding: 15px 20px;
  background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color); z-index: 1000;
  display: flex; justify-content: space-between; align-items: center; transition: var(--transition);
}
.header-brand h1 { font-size: 1.4rem; background: linear-gradient(135deg, var(--violet), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-brand .slogan { font-size: 0.75rem; color: var(--text-secondary); font-style: italic; }

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

.header-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: var(--transition);
  position: relative;
}
.header-btn:hover { background: var(--violet); border-color: var(--violet); transform: scale(1.05); }

/* Badge de não lidas no header */
#unread-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--error);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulse-badge 2s infinite;
}

/* ==================== MACROS DASHBOARD ==================== */
.top-summary {
  position: fixed; top: 75px; right: 20px; width: 300px;
  background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 15px;
  z-index: 999; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: var(--transition);
}
.top-summary.hidden { transform: translateY(-20px); opacity: 0; pointer-events: none; }
.macro-item { display: flex; align-items: center; gap: 10px; }
.macro-item .emoji { font-size: 1.2rem; width: 24px; text-align: center; }
.macro-info { flex: 1; display: flex; flex-direction: column; }
.macro-info .val { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.macro-info .lbl { font-size: 0.7rem; color: var(--text-secondary); }
.macro-item .progress-bar { flex: 2; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.macro-item .progress-fill { height: 100%; width: 0%; border-radius: 3px; transition: width 0.5s ease; }

/* ==================== LAYOUT E CARDS (GLASSMORPHISM) ==================== */
.container { max-width: 1400px; margin: auto; padding: 20px; }
.grid-3col { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; align-items: start; }

.card {
  background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition); animation: fadeInUp 0.5s ease backwards;
}
.card:hover { border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.card:nth-child(1) { animation-delay: 0.1s; } .card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; } .card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; } .card:nth-child(6) { animation-delay: 0.35s; }

.card-header {
  padding: 18px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid transparent; transition: var(--transition);
}
.card-header h2 { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.card-toggle-icon { color: var(--text-secondary); font-size: 1.2rem; transition: transform 0.3s ease; }
.card.expanded .card-toggle-icon { transform: rotate(180deg); }
.card.expanded .card-header { border-bottom-color: var(--border-color); }
.card-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out; padding: 0 20px; }
.card.expanded .card-content { max-height: 5000px; padding: 20px; }

/* 🆕 SUBTÍTULO DOS CARDS (usado em vários cards do index.html) */
.subtitle { font-size: 0.85rem; color: var(--text-secondary); font-style: italic; margin-bottom: 12px; }

/* ==================== FORMULÁRIOS E INPUTS ==================== */
label { display: block; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 12px 16px; margin-top: 6px; background: var(--bg-input);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-main); font-size: 0.95rem; transition: var(--transition);
}
input:focus, select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
/* 🆕 Estados desabilitado e somente-leitura */
input:disabled, select:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-glow:disabled { transform: none !important; box-shadow: none; }
input[readonly] { cursor: default; }

/* 🆕 SLIDER (range) com visual premium — usado em Metas e Sintomas */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 6px; padding: 0; border: none;
  background: var(--bg-input); border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--violet); border: 2px solid #fff;
  cursor: pointer; box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--violet); border: 2px solid #fff;
  cursor: pointer; box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

select option {
  background-color: #2a2a30;
  color: #ffffff;
}
body.light-mode select option {
  background-color: #ffffff;
  color: #000000;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.input-group { display: flex; gap: 10px; }
.input-group input { margin-top: 0; }

/* 🆕 CAIXA DE INFORMAÇÃO (descrição do exercício no card de Treinos) */
.info-box {
  background: var(--bg-input); border-left: 3px solid var(--cyan);
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin: 8px 0 12px;
}

/* 🆕 VALOR DO SLIDER DE METAS */
.range-val { text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--violet); margin: -4px 0 10px; }

/* ==================== BOTÕES MODERNOS ==================== */
.btn-glow {
  background: linear-gradient(135deg, var(--violet), var(--violet-dark)); color: white; border: none;
  padding: 14px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; width: 100%; margin-top: 16px; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  transition: var(--transition);
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4); }
.btn-glow:active { transform: translateY(0); }

.btn-ai { background: linear-gradient(135deg, var(--cyan), var(--cyan-dark)) !important; box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3) !important; }
.btn-export { background: linear-gradient(135deg, #475569, #334155) !important; box-shadow: 0 4px 15px rgba(71, 85, 105, 0.3) !important; }
.btn-toggle-sec { background: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); padding: 10px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; width: 100%; margin-top: 12px; transition: var(--transition); }
.btn-toggle-sec:hover { background: var(--bg-input); color: var(--text-primary); }
.btn-water { background: var(--bg-input); border: 1px solid var(--border-color); color: var(--cyan); padding: 10px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-water:hover { background: var(--cyan); color: white; border-color: var(--cyan); }

/* ==================== DICA DIÁRIA ==================== */
.daily-tip-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3); border-radius: var(--radius-md); padding: 18px 20px;
  margin-bottom: 24px; display: flex; align-items: center; gap: 16px; backdrop-filter: var(--glass-blur);
}
.daily-tip-content { flex: 1; }
.daily-tip-content strong { display: block; color: var(--violet); margin-bottom: 4px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.daily-tip-content p { font-size: 0.95rem; line-height: 1.5; color: var(--text-primary); }
.daily-tip-close { background: transparent; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: var(--transition); }
.daily-tip-close:hover { background: rgba(239,68,68,0.2); color: var(--error); }

/* ==================== BARRAS DE PROGRESSO E MACROS ==================== */
.progress-bar { width: 100%; height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; margin: 6px 0; }
.progress-fill { height: 100%; width: 0%; border-radius: 4px; transition: width 0.5s ease; }
.macro-bars { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.macro-bar-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.macro-bar-item .emoji { font-size: 1rem; width: 24px; text-align: center; }
.macro-bar-item .macro-name { width: 90px; flex-shrink: 0; color: var(--text-secondary); }
.macro-bar-item .progress-bar { flex: 1; margin: 0; }
/* 🆕 Largura aumentada para não cortar "185/2497" */
.macro-bar-item .macro-val { width: 84px; text-align: right; flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 🆕 GRÁFICO DE BARRAS DA MÉDIA SEMANAL */
.weekly-chart-bars {
  display: flex; align-items: flex-end; gap: 6px; height: 130px;
  padding: 10px; background: var(--bg-input); border-radius: var(--radius-sm); margin-top: 12px;
}
.weekly-chart-bars > div {
  flex: 1; min-height: 4px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--violet), var(--cyan));
  transition: height 0.5s ease;
}

/* 🆕 MENSAGEM DE META DE ÁGUA ATINGIDA */
.goal-message {
  margin-top: 12px; padding: 12px; border-radius: var(--radius-sm); text-align: center;
  font-weight: 600; background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success); color: var(--success); animation: fadeInUp 0.4s ease;
}

/* ==================== ÁGUA ==================== */
.water-streak { background: rgba(6, 182, 212, 0.1); border: 1px solid var(--cyan); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 16px; text-align: center; font-weight: 600; color: var(--cyan); }
.water-control { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
.water-custom { display: flex; gap: 8px; margin-bottom: 20px; }
.water-custom input { flex: 1; margin-top: 0; }
.water-tank { display: flex; justify-content: center; margin: 20px auto; }
.tank-body { width: 90%; max-width: 200px; height: 180px; background: var(--bg-input); border: 2px solid var(--border-color); border-radius: 100px; position: relative; overflow: hidden; }
.tank-fill { position: absolute; bottom: 0; width: 100%; background: linear-gradient(0deg, var(--cyan), #3b82f6); transition: height 0.5s ease; height: 0%; border-radius: 0 0 97px 97px; }

/* ==================== DIETAS ==================== */
.diet-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; background: var(--bg-input); padding: 4px; border-radius: var(--radius-sm); }
.diet-tab { flex: 1; padding: 8px 12px; border-radius: 8px; border: none; background: transparent; color: var(--text-secondary); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: var(--transition); text-align: center; }
.diet-tab:hover { color: var(--text-primary); }
.diet-tab.active { background: var(--violet); color: white; box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3); }

/* ==================== GÊNIO MODAL (BOTTOM SHEET STYLE) ==================== */
.genius-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.genius-modal-content {
  background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 24px 24px 0 0; width: 100%; max-width: 550px; height: 85vh;
  display: flex; flex-direction: column; border: 1px solid var(--border-color);
  animation: slideUp 0.3s ease;
  /* 🆕 Respeita a barra inferior do iPhone em PWA */
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.genius-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); }
.genius-modal-header h2 { margin: 0; font-size: 1.2rem; }
.genius-close-btn { background: var(--bg-input); border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; padding: 8px 12px; border-radius: 50%; transition: var(--transition); }
.genius-close-btn:hover { background: var(--error); color: white; }
.genius-chat { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.genius-message { padding: 12px 16px; border-radius: 16px; max-width: 85%; line-height: 1.5; font-size: 0.9rem; }
.genius-bot-message { background: var(--bg-input); align-self: flex-start; border-bottom-left-radius: 4px; }
.genius-user-message { background: linear-gradient(135deg, var(--violet), var(--violet-dark)); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.genius-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.genius-suggestion-btn { background: rgba(139, 92, 246, 0.1); border: 1px solid var(--violet); color: var(--violet); padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); }
.genius-suggestion-btn:hover { background: var(--violet); color: white; }
.genius-input-area { display: flex; gap: 10px; padding: 20px; border-top: 1px solid var(--border-color); }
.genius-input-area input { flex: 1; margin-top: 0; }
.genius-input-area .btn-glow { width: auto; margin-top: 0; padding: 12px 24px; }
.genius-credits { text-align: center; padding: 0 20px 20px; font-size: 0.8rem; color: var(--text-secondary); }

/* ==================== COMPONENTES ESPECÍFICOS ==================== */
.results-box { background: var(--bg-input); padding: 16px; border-radius: var(--radius-sm); margin-top: 16px; }
.result-item { display: flex; justify-content: space-between; margin-bottom: 8px; }

.body-types { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.body-type-card { background: var(--bg-input); border: 2px solid transparent; border-radius: var(--radius-md); padding: 12px; text-align: center; cursor: pointer; transition: var(--transition); flex: 1 1 100px; min-width: 100px; max-width: 150px; }
.body-type-card:hover { border-color: var(--violet); }
.body-type-card.selected { border-color: var(--cyan); box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); }
.silhueta { margin-bottom: 8px; display: flex; justify-content: center; height: 80px; }
.silhueta img { max-height: 100%; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.body-type-card p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.3; }

.meal-item, .task-item, .workout-item, .goal-card, .measurement-record { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; transition: var(--transition); }
/* 🆕 Layout interno dos itens de refeição */
.meal-info { flex: 1; min-width: 0; }
.meal-details { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }
.task-item input[type="checkbox"], .workout-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--violet); cursor: pointer; }
.task-delete-btn, .meal-delete-btn, .workout-delete-btn { background: transparent; border: none; color: var(--error); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 6px; transition: var(--transition); margin-left: auto; flex-shrink: 0; }
.task-delete-btn:hover, .meal-delete-btn:hover, .workout-delete-btn:hover { background: rgba(239, 68, 68, 0.1); }

/* 🆕 Hover nos resultados da busca de alimentos (meals.js) */
.food-result-item:hover { background: var(--bg-input); }

/* 🆕 GRID DE SINTOMAS DO CICLO */
.symptom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.symptom-grid label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 0;
  font-size: 0.85rem; color: var(--text-primary);
  background: var(--bg-input); padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
  transition: var(--transition);
}
.symptom-grid label:hover { border-color: var(--violet); }

.day-selector { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 16px; }
.day-btn { padding: 10px 0; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-input); color: var(--text-secondary); cursor: pointer; font-weight: 600; font-size: 0.85rem; transition: var(--transition); }
.day-btn.active, .day-btn:hover { background: var(--violet); color: white; border-color: var(--violet); }

.rest-timer { background: var(--bg-input); border-radius: var(--radius-md); padding: 16px; margin-top: 20px; text-align: center; border: 1px solid var(--border-color); }
.timer-display { font-size: 2.5rem; font-weight: 800; background: linear-gradient(135deg, var(--violet), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: block; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.timer-controls { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.timer-controls button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); font-weight: 600; cursor: pointer; transition: var(--transition); }
.timer-controls button:hover, .timer-controls button.active { background: var(--violet); color: white; border-color: var(--violet); }

.achievements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.achievement { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 14px; display: flex; align-items: center; gap: 12px; transition: var(--transition); }
.achievement.unlocked { border-color: var(--warning); box-shadow: 0 0 12px rgba(245, 158, 11, 0.2); }
.achievement.locked { opacity: 0.4; filter: grayscale(100%); }
.achievement-icon { font-size: 2rem; }
.achievement-info p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* 🆕 SKELETON LOADING (Onda 4 — percepção de velocidade) */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, rgba(255,255,255,0.08) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==================== TELA DE AUTENTICAÇÃO ==================== */
#auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 9998;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#auth-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.auth-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo h1 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-logo p { font-size: 0.85rem; color: var(--text-secondary); margin-top: 5px; }

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}
.auth-tab.active { background: var(--violet); color: white; }

.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }
.auth-form input, .auth-form select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
}
.auth-select-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 8px; }
.auth-link { text-align: center; color: var(--cyan); font-size: 0.85rem; text-decoration: none; margin-top: 10px; }
.auth-link:hover { text-decoration: underline; }

/* ==================== IMAGENS DA LOGO (GÊNIO) ==================== */

/* Tela de Login (Corpo Inteiro) */
.auth-logo-img {
  width: 150px;
  height: auto;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px var(--violet));
  animation: pulse-logo 3s ease-in-out infinite;
}

/* Tela de Loading (Corpo Inteiro) — 🆕 definição única (antes duplicada) */
.loading-logo-img {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 0 20px var(--violet));
  animation: pulse-logo 2s ease-in-out infinite;
}

/* Botão Flutuante (Rosto) — 🆕 com safe-area do iOS */
.genius-floating-btn {
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom));
  right: calc(30px + env(safe-area-inset-right));
  background: transparent;
  border: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5);
  transition: var(--transition);
  z-index: 1000;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.genius-floating-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}
.genius-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.6);
}
.genius-floating-btn.offline { background: #555; box-shadow: none; cursor: not-allowed; }

/* Ícone da Dica Diária (Rosto) */
.daily-tip-icon-img {
  width: 45px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--violet));
}

/* Animação de "Respirar" (Aura mágica) — 🆕 definição única consolidada */
@keyframes pulse-logo {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--violet)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 25px var(--cyan)); }
}

/* ==================== BADGES E ANIMAÇÕES ==================== */
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==================== MARKETPLACE E CHAT ==================== */

/* Card de Profissional no Marketplace */
.prof-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}
.prof-card:hover { border-color: var(--violet); }
.prof-card-header { display: flex; justify-content: space-between; align-items: center; }
.prof-card-header strong { color: var(--text-primary); font-size: 1rem; }
.prof-card-specialty { font-size: 0.8rem; color: var(--cyan); font-weight: 600; }
.prof-card-rating { color: var(--warning); font-size: 0.85rem; }
.prof-card-price { color: var(--text-secondary); font-size: 0.9rem; }
.prof-card-bio { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; flex: 1; }
.prof-card-actions { margin-top: 8px; }
.prof-card-actions button { width: 100%; padding: 8px; font-size: 0.85rem; cursor: pointer; }

/* Lista de Alunos (Dashboard Prof) */
.student-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.student-info strong { display: block; color: var(--text-primary); }
.student-info span { font-size: 0.8rem; color: var(--text-secondary); }
.student-actions { display: flex; gap: 10px; align-items: center; }
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.status-active { background: rgba(16, 185, 129, 0.2); color: var(--success); }

/* Badges e Mensagens de Chat */
.unread-badge {
  background: var(--error);
  color: white;
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: pulse-badge 2s infinite;
}

.badge-featured {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 8px;
  word-wrap: break-word;
}
.message-sent {
  align-self: flex-end;
  background: var(--violet);
  color: white;
  border-bottom-right-radius: 4px;
}
.message-received {
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.message-time {
  display: block;
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

.prof-card-footer, .student-info .details {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
}

.btn-small {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-small:hover {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}

/* Badge do Marketplace */
#marketplace-unread-badge {
  background: var(--error);
  color: white;
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
  display: none;
}

/* ==================== MODAL DO CHAT ==================== */
#chat-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
}

#chat-modal > div {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 95%;
  height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#chat-messages .message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  word-wrap: break-word;
}

#chat-messages .message-sent {
  align-self: flex-end;
  background: var(--violet);
  color: white;
  border-bottom-right-radius: 4px;
}

#chat-messages .message-received {
  align-self: flex-start;
  background: var(--bg-input);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

#chat-messages .message-time {
  font-size: 0.6rem;
  opacity: 0.7;
  margin-top: 4px;
  display: block;
}

#chat-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

#chat-modal .modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
}

#chat-modal .modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 8px;
}

#chat-modal .chat-input-area {
  padding: 15px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

#chat-modal .chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  margin: 0;
}

#chat-modal .chat-input-area button {
  background: var(--violet);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

#chat-modal .chat-input-area button:hover {
  background: var(--violet-dark);
}

#chat-modal .chat-status {
  padding: 6px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ==================== TOGGLES (SWITCH) ==================== */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  transition: var(--transition);
  border-radius: 50%;
}

.switch input:checked + .slider {
  background: var(--violet);
  border-color: var(--violet);
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
  background: white;
}

.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== LOGO NO HEADER ==================== */
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-logo-img {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  filter: drop-shadow(0 0 5px var(--violet));
  animation: pulse-logo 3s ease-in-out infinite;
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 768px) {
  body { padding-top: 70px; }
  .app-header { padding: 10px 15px; }
  .header-brand h1 { font-size: 1.2rem; }
  .header-brand .slogan { font-size: 0.6rem; display: block; }
  .top-summary { top: 65px; right: 10px; left: 10px; width: auto; padding: 12px; }
  .macro-item .emoji { font-size: 1rem; }
  .container { padding: 10px; }
  .grid-3col { grid-template-columns: 1fr; gap: 16px; }
  .card { border-radius: 16px; }
  .genius-modal-content { height: 90vh; border-radius: 16px 16px 0 0; }
  .genius-floating-btn { bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(20px + env(safe-area-inset-right)); width: 56px; height: 56px; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .water-control { grid-template-columns: repeat(3, 1fr); }
  #notification-container { top: 70px; right: 10px; left: 10px; max-width: none; }
  #chat-modal > div { height: 90vh; width: 100%; border-radius: 0; }
  /* 🆕 Valor das macros não quebra em telas pequenas */
  .macro-bar-item .macro-name { width: 74px; }
  .macro-bar-item .macro-val { width: 76px; font-size: 0.78rem; }
}

/* ==================== ANIMAÇÕES GERAIS ==================== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   ANIMAÇÕES DO POLISH PREMIUM (LOTE 1)
   ============================================================ */

/* 🎉 Confetti */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* 🏆 Pop em conquistas */
@keyframes achievement-pop {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
  50% { transform: scale(1.15); box-shadow: 0 0 30px rgba(245, 158, 11, 0.6); }
  100% { transform: scale(1); box-shadow: 0 0 12px rgba(245, 158, 11, 0.2); }
}

/* ============================================================
   🚀 PACOTE DE UPGRADE PREMIUM — 10/09/2026
   (colar no FINAL do arquivo; regras posteriores vencem)
   ============================================================ */

/* 1. CRÍTICO: cores usadas pelas barras do Diário (faltavam!) */
:root {
  --red: #ef4444;
  --yellow: #f59e0b;
  --green: #10b981;
}

/* 2. Botões e campos herdam a fonte Inter (antes usavam a do sistema) */
button, input, select, textarea {
  font-family: 'Inter', system-ui, sans-serif;
}
::placeholder { color: var(--text-secondary); opacity: 0.55; }

/* 3. Números tabulares: macros não "pulam" ao atualizar */
.macro-val, .macro-info .val, .timer-display {
  font-variant-numeric: tabular-nums;
}

/* 4. Acessibilidade: foco visível para navegação por teclado */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* 5. Botão desativado PARECE desativado (ex: "⏳ Salvando...") */
.btn-glow:disabled, .btn-glow[disabled], button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* 6. Ícone do calendário visível no modo escuro */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}
body.light-mode input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* 7. Autofill do Chrome não destrói o tema escuro no login */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px #1a1a1f inset;
  caret-color: var(--text-primary);
  transition: background-color 9999s ease-in-out 0s;
}
body.light-mode input:-webkit-autofill,
body.light-mode input:-webkit-autofill:hover,
body.light-mode input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}

/* 8. Scrollbar no Firefox + seleção de texto com a cor da marca */
html { scrollbar-width: thin; scrollbar-color: var(--violet-dark) transparent; }
::selection { background: rgba(139, 92, 246, 0.45); color: #ffffff; }

/* 9. Textarea só redimensiona na vertical (não quebra o grid) */
textarea { resize: vertical; min-height: 80px; }

/* 10. Clicar no header do card não seleciona o texto */
.card-header { user-select: none; -webkit-user-select: none; }

/* 11. Hover nos resultados da busca de alimentos */
.food-result-item { transition: background 0.2s ease; }
.food-result-item:hover { background: rgba(139, 92, 246, 0.10); }

/* 12. Skeleton loading (sensação de velocidade premium) */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, rgba(255,255,255,0.09) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
body.light-mode .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.05) 75%);
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 13. Conquista desbloqueada dá um "pop" */
@keyframes pop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.achievement.unlocked { animation: pop 0.45s cubic-bezier(0.4, 0, 0.2, 1); }

/* 14. Imagem nunca estoura o container */
img { max-width: 100%; }

/* 15. Respeita o notch do iPhone (app pronto para PWA) */
.genius-floating-btn { bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
.genius-input-area { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
#chat-modal .chat-input-area { padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 768px) {
  .genius-floating-btn { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* 16. Telas muito pequenas (Galaxy A01, iPhone SE) */
@media (max-width: 480px) {
  .macro-bar-item .macro-name { width: 72px; font-size: 0.75rem; }
  .macro-bar-item .macro-val { width: 62px; font-size: 0.75rem; }
  .timer-display { font-size: 2rem; }
  .auth-container { padding: 28px 20px; }
  .notification { font-size: 0.85rem; padding: 12px 14px; }
}

/* 17. Acessibilidade: usuários sensíveis a movimento (WCAG) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   📸 FOTOS DE EVOLUÇÃO (LOTE 2 - COMPARADOR VIRAL)
   ============================================================ */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 12px 0; }
.photo-card { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-color); aspect-ratio: 3/4; background: var(--bg-input); transition: var(--transition); }
.photo-card:hover { transform: scale(1.03); border-color: var(--violet); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card .photo-date { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; font-size: 0.65rem; padding: 14px 6px 6px; text-align: center; font-weight: 600; }
.photo-card .photo-view-badge { position: absolute; top: 6px; left: 6px; background: rgba(139,92,246,0.85); color: #fff; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.photo-card .photo-del { position: absolute; top: 6px; right: 6px; background: rgba(239,68,68,0.85); color: #fff; border: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 0.7rem; line-height: 1; display: none; align-items: center; justify-content: center; }
.photo-card:hover .photo-del { display: flex; }

.photo-compare-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.photo-compare-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); max-width: 520px; width: 100%; padding: 20px; }
.photo-compare-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.photo-compare-header h3 { margin: 0; }
.photo-compare-header button { background: var(--bg-input); border: none; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; padding: 6px 10px; border-radius: 50%; }
.photo-compare-header button:hover { background: var(--error); color: white; }
.photo-compare-stage { position: relative; width: 100%; aspect-ratio: 3/4; overflow: hidden; border-radius: var(--radius-md); background: var(--bg-input); cursor: ew-resize; }
.photo-compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.compare-after { clip-path: inset(0 0 0 50%); }
.compare-divider { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; left: 50%; box-shadow: 0 0 8px rgba(0,0,0,0.6); pointer-events: none; }
.compare-label { position: absolute; bottom: 8px; font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: rgba(0,0,0,0.65); color: #fff; }
.label-before { left: 8px; }
.label-after { right: 8px; }
.compare-range { width: 100%; margin-top: 12px; accent-color: var(--violet); }
.compare-stats { display: flex; justify-content: space-around; margin-top: 12px; font-size: 0.85rem; color: var(--cyan); font-weight: 600; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   💧 SILHUETA DE HIDRATAÇÃO (CORPO QUE ENCHE) — LOTE 1.5
   ============================================================ */
.hydro-wrap { position: relative; width: 190px; margin: 18px auto 8px; }
.hydro-man {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: var(--bg-input);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%20500'%3E%3Ccircle%20cx='100'%20cy='36'%20r='30'/%3E%3Crect%20x='86'%20y='60'%20width='28'%20height='20'%20rx='6'/%3E%3Crect%20x='62'%20y='76'%20width='76'%20height='138'%20rx='24'/%3E%3Crect%20x='40'%20y='82'%20width='18'%20height='128'%20rx='9'%20transform='rotate(6%2049%2088)'/%3E%3Crect%20x='142'%20y='82'%20width='18'%20height='128'%20rx='9'%20transform='rotate(-6%20151%2088)'/%3E%3Crect%20x='68'%20y='206'%20width='64'%20height='46'%20rx='16'/%3E%3Crect%20x='72'%20y='240'%20width='24'%20height='240'%20rx='11'/%3E%3Crect%20x='104'%20y='240'%20width='24'%20height='240'%20rx='11'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%20500'%3E%3Ccircle%20cx='100'%20cy='36'%20r='30'/%3E%3Crect%20x='86'%20y='60'%20width='28'%20height='20'%20rx='6'/%3E%3Crect%20x='62'%20y='76'%20width='76'%20height='138'%20rx='24'/%3E%3Crect%20x='40'%20y='82'%20width='18'%20height='128'%20rx='9'%20transform='rotate(6%2049%2088)'/%3E%3Crect%20x='142'%20y='82'%20width='18'%20height='128'%20rx='9'%20transform='rotate(-6%20151%2088)'/%3E%3Crect%20x='68'%20y='206'%20width='64'%20height='46'%20rx='16'/%3E%3Crect%20x='72'%20y='240'%20width='24'%20height='240'%20rx='11'/%3E%3Crect%20x='104'%20y='240'%20width='24'%20height='240'%20rx='11'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hydro-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0%;
  border-radius: 0;
  background: linear-gradient(0deg, var(--cyan), #3b82f6);
  transition: height 0.6s ease;
}
/* Ondinhas animadas na superfície da água */
.hydro-fill::before {
  content: '';
  position: absolute;
  top: -10px; left: 0;
  width: 200%; height: 12px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='80'%20height='12'%20viewBox='0%200%2080%2012'%3E%3Cpath%20d='M0%206%20Q10%200%2020%206%20T40%206%20T60%206%20T80%206%20V12%20H0%20Z'%20fill='%2306b6d4'/%3E%3C/svg%3E") repeat-x;
  animation: wave-slide 3s linear infinite;
  opacity: 0.9;
}
@keyframes wave-slide { from { transform: translateX(0); } to { transform: translateX(-80px); } }
.hydro-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.hydro-label strong {
  font-size: 1.7rem; color: var(--text-primary);
  text-shadow: 0 2px 8px rgba(0,0,0,0.65);
  font-variant-numeric: tabular-nums;
}
.hydro-label span {
  font-size: 0.62rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.12em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.65);
}

/* ============================================================
   💧 GARRAFA DE HIDRATAÇÃO INTELIGENTE (LOTE 1.6)
   ============================================================ */
.bottle-wrap { width: 170px; margin: 14px auto 6px; text-align: center; }
.bottle-cap {
  width: 54px; height: 22px; margin: 0 auto;
  background: linear-gradient(180deg, #3f3f46, #27272a);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px 8px 4px 4px;
}
.bottle-neck {
  width: 76px; height: 14px; margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12); border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.bottle-body {
  position: relative;
  width: 150px; height: 270px; margin: 0 auto;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.14);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(6,182,212,0.12), inset 0 0 30px rgba(6,182,212,0.06);
}
.bottle-water {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0%;
  border-radius: 0;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 45%, #06b6d4 100%);
  transition: height 0.6s ease;
}
.water-clip { position: absolute; inset: 0; overflow: hidden; }
/* Ondas duplas na superfície da água */
.bottle-water::before,
.bottle-water::after {
  content: '';
  position: absolute;
  top: -9px; left: 0;
  width: 200%; height: 12px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='80'%20height='12'%20viewBox='0%200%2080%2012'%3E%3Cpath%20d='M0%206%20Q10%200%2020%206%20T40%206%20T60%206%20T80%206%20V12%20H0%20Z'%20fill='%2338bdf8'/%3E%3C/svg%3E") repeat-x;
  animation: wave-slide 3s linear infinite;
}
.bottle-water::after {
  top: -5px;
  opacity: 0.45;
  animation: wave-slide 5s linear infinite reverse;
}
@keyframes wave-slide { from { transform: translateX(0); } to { transform: translateX(-80px); } }
/* Bolhas subindo dentro da água */
.bubble {
  position: absolute; bottom: -10px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  animation: bubble-up 4.5s linear infinite;
}
.bubble.b1 { left: 22%; width: 8px; height: 8px; animation-delay: 0s; }
.bubble.b2 { left: 55%; width: 5px; height: 5px; animation-delay: 1.6s; }
.bubble.b3 { left: 78%; width: 6px; height: 6px; animation-delay: 3s; }
@keyframes bubble-up {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.8; }
  100% { transform: translateY(-280px); opacity: 0; }
}
/* Régua de marcas (25 / 50 / 75) */
.bottle-marks { position: absolute; inset: 0; pointer-events: none; }
.bottle-marks .mark {
  position: absolute; right: 8px;
  display: flex; align-items: center; gap: 5px;
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.bottle-marks .mark i {
  display: block; width: 14px; height: 2px;
  background: rgba(255,255,255,0.35); border-radius: 2px;
}
/* Brilho vertical do vidro */
.bottle-shine {
  position: absolute; top: 18px; bottom: 18px; left: 14px;
  width: 10px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.02));
  pointer-events: none;
}
/* Rótulo central (%) */
.bottle-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  pointer-events: none;
}
.bottle-label strong {
  font-size: 2rem; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
  font-variant-numeric: tabular-nums;
}
.bottle-label span {
  font-size: 0.6rem; color: rgba(255,255,255,0.8);
  text-transform: uppercase; letter-spacing: 0.14em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}
.bottle-hint {
  margin-top: 10px;
  font-size: 0.7rem; color: var(--text-secondary);
}

/* ============================================================
   💧 GARRAFA: BRILHO ESPECIAL AO ATINGIR 100%
   ============================================================ */
.bottle-body.bottle-full {
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 
    0 0 30px rgba(16, 185, 129, 0.35),
    0 10px 40px rgba(6, 182, 212, 0.2),
    inset 0 0 30px rgba(16, 185, 129, 0.12) !important;
  animation: bottle-pulse 2s ease-in-out infinite;
}
@keyframes bottle-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.35), 0 10px 40px rgba(6, 182, 212, 0.2); }
  50% { box-shadow: 0 0 50px rgba(16, 185, 129, 0.55), 0 10px 40px rgba(6, 182, 212, 0.3); }
}
.bottle-body.bottle-full .bottle-water {
  background: linear-gradient(180deg, #34d399 0%, #10b981 45%, #059669 100%);
}