/* Importação das fontes Poppins e Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Temas e Variáveis de Estilo */
:root {
  /* Tema Padrão: Soft Pastel */
  --primary: #9B7BFF;
  --primary-rgb: 155, 123, 255;
  --primary-light: #E8D9FF;
  --primary-light-rgb: 232, 217, 255;
  --accent: #FFD6E7;
  --accent-rgb: 255, 214, 231;
  --accent-dark: #FF9BCA;
  --bg: #FFF5F9;
  --card-bg: #FFFFFF;
  --text-main: #332A4C;
  --text-light: #7E7496;
  --border-color: rgba(155, 123, 255, 0.15);
  --shadow: 0 8px 24px rgba(155, 123, 255, 0.1);
  --shadow-hover: 0 12px 30px rgba(155, 123, 255, 0.16);
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 12px;
  --font-title: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Cores específicas de tratamentos */
  --color-hydration: #4DA1FF;
  --color-nutrition: #FF9F43;
  --color-reconstruction: #FF5252;
}

/* Tema Lavender Dream */
[data-theme="lavender"] {
  --primary: #7E57C2;
  --primary-rgb: 126, 87, 194;
  --primary-light: #E1BEE7;
  --primary-light-rgb: 225, 190, 231;
  --accent: #F8BBD0;
  --accent-rgb: 248, 187, 208;
  --accent-dark: #F06292;
  --bg: #F3E5F5;
  --card-bg: #FFFFFF;
  --text-main: #1D103F;
  --text-light: #6A5D8A;
  --border-color: rgba(126, 87, 194, 0.15);
  --shadow: 0 8px 24px rgba(126, 87, 194, 0.1);
  --shadow-hover: 0 12px 30px rgba(126, 87, 194, 0.16);
}

/* Tema Dark Amethyst */
[data-theme="dark"] {
  --primary: #BB86FC;
  --primary-rgb: 187, 134, 252;
  --primary-light: #3700B3;
  --primary-light-rgb: 55, 0, 179;
  --accent: #CF6679;
  --accent-rgb: 207, 102, 121;
  --accent-dark: #FF8A9A;
  --bg: #121212;
  --card-bg: #1E1E1E;
  --text-main: #FFFFFF;
  --text-light: #A5A2B5;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Reset Geral */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: #ECECEC;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Mockup de Telefone (para telas grandes) */
.phone-mockup {
  width: 100%;
  max-width: 420px;
  height: 90vh;
  min-height: 720px;
  max-height: 860px;
  background-color: var(--bg);
  border-radius: 40px;
  border: 12px solid #1E1E24;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Adaptador para Tela Cheia no Celular */
@media (max-width: 480px) {
  body {
    background-color: var(--bg);
  }
  .phone-mockup {
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
}

/* Container do App */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
}

/* Corpo do App (com scroll) */
.app-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 92px; /* Espaço para a Tab Bar */
  position: relative;
}

/* Ocultar scrollbar visual mantendo funcionamento */
.app-body::-webkit-scrollbar {
  display: none;
}
.app-body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Tab Bar Inferior */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: rgba(var(--card-bg) == #FFFFFF ? 255, 255, 255 : 30, 30, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-bottom: 8px;
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  gap: 4px;
  width: 60px;
  transition: all 0.2s ease;
}

.tab-item svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-light);
  fill: none;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.tab-item.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.tab-item.active svg {
  stroke: var(--primary);
  fill: rgba(var(--primary-rgb), 0.15);
}

/* Telas (Tab Content) */
.tab-content {
  display: none;
  flex-direction: column;
  width: 100%;
  animation: slideFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.active {
  display: flex;
}

/* Animações */
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes checkConfirm {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Elementos Comuns (Botões, Cards, Badges) */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--text-main);
  font-weight: 600;
}

p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 28px;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.25);
  transition: all 0.2s ease;
  width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(var(--primary-rgb), 0.35);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: none;
}

.btn-secondary:hover {
  box-shadow: 0 6px 12px rgba(var(--primary-rgb), 0.12);
  background: rgba(var(--primary-rgb), 0.2);
}

/* ---------------- TELA DE BOAS-VINDAS ---------------- */
#welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 24px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg);
  z-index: 200;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#welcome-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.welcome-img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 32px;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow);
  animation: pulse 4s infinite ease-in-out;
}

.welcome-title {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.3;
}

.welcome-subtext {
  margin-bottom: 40px;
  padding: 0 16px;
}

/* ---------------- CONFIGURAÇÃO INICIAL (WIZARD) ---------------- */
#setup-screen {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg);
  z-index: 150;
  overflow-y: auto;
}

#setup-screen.active {
  display: flex;
}

.setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.progress-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-light);
  transition: all 0.3s ease;
}

.dot.active {
  width: 24px;
  border-radius: 5px;
  background-color: var(--primary);
}

.setup-step {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: slideFadeIn 0.3s ease-out;
}

.setup-step.active {
  display: flex;
}

.setup-question {
  font-size: 20px;
  margin-bottom: 8px;
}

.setup-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-card:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.04);
}

.option-card.selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.option-icon {
  font-size: 20px;
}

.input-name {
  width: 100%;
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-name:focus {
  border-color: var(--primary);
}

.setup-nav {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  gap: 12px;
}

/* ---------------- TELA PRINCIPAL (HOME) ---------------- */
.greeting-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.greeting-text h2 {
  font-size: 22px;
}

.today-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--primary-light-rgb), 0.3) 100%);
  border-left: 6px solid var(--primary);
  position: relative;
}

.treatment-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  color: white;
}

.badge-hydration {
  background-color: var(--color-hydration);
}

.badge-nutrition {
  background-color: var(--color-nutrition);
}

.badge-reconstruction {
  background-color: var(--color-reconstruction);
}

.badge-free {
  background-color: var(--text-light);
}

.today-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.today-desc {
  margin-bottom: 20px;
  font-size: 13px;
}

.completed-state {
  display: none;
  align-items: center;
  gap: 8px;
  color: #2ECC71;
  font-weight: 600;
  font-size: 15px;
}

.completed-state svg {
  width: 20px;
  height: 20px;
  stroke: #2ECC71;
  stroke-width: 3;
}

.today-card.completed .completed-state {
  display: flex;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.today-card.completed .btn-complete-today {
  display: none;
}

/* Barra de Progresso do Mês */
.progress-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-header h3 {
  font-size: 15px;
}

.progress-text-percent {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 10px;
  background-color: var(--primary-light);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-dark) 100%);
  border-radius: 5px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.25, 1);
}

/* Rotinas Diárias Checklist */
.routines-card {
  padding-bottom: 12px;
}

.routines-header {
  margin-bottom: 16px;
}

.routines-header h3 {
  font-size: 16px;
}

.routines-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.routine-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  background-color: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.routine-checkbox svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 3;
  fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.routine-label {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Estado Marcado */
.routine-item.checked .routine-checkbox {
  background-color: var(--primary);
  border-color: var(--primary);
  animation: checkConfirm 0.3s ease;
}

.routine-item.checked .routine-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.routine-item.checked .routine-label {
  color: var(--text-light);
  text-decoration: line-through;
}

/* Mensagem Motivacional de Rotinas Completas */
.motivation-banner {
  display: none;
  background: linear-gradient(135deg, #FFD6E7 0%, #E8D9FF 100%);
  padding: 16px;
  border-radius: var(--border-radius-md);
  margin-top: 16px;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.motivation-banner.active {
  display: block;
}

.motivation-banner h4 {
  color: #4A154B;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.motivation-banner p {
  color: #6A3B6B;
  font-size: 12px;
  font-weight: 500;
}

/* ---------------- TELA CALENDÁRIO ---------------- */
.calendar-section-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.calendar-section-desc {
  margin-bottom: 20px;
}

.calendar-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-month-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.calendar-nav-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  color: var(--text-main);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.calendar-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  padding: 4px 0;
}

.calendar-day {
  aspect-ratio: 1;
  background-color: var(--card-bg);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.calendar-day:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.calendar-day.other-month {
  color: #D1CDDD;
  background-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.calendar-day.today {
  border: 2px solid var(--primary);
}

.calendar-day-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
}

.dot-hydration { background-color: var(--color-hydration); }
.dot-nutrition { background-color: var(--color-nutrition); }
.dot-reconstruction { background-color: var(--color-reconstruction); }

.calendar-day.completed {
  background-color: #E8F8F0;
  color: #2E7D32;
}

/* Legenda do Calendário */
.calendar-legend {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Modal Detalhes do Dia */
.modal-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 300;
  justify-content: center;
  align-items: flex-end;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  padding: 24px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-close {
  background: var(--primary-light);
  border: none;
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-treatment-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.modal-treatment-desc {
  margin-bottom: 24px;
}

/* ---------------- TELA DIÁRIO CAPILAR ---------------- */
.diary-header {
  margin-bottom: 20px;
}

.diary-form h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.diary-field {
  margin-bottom: 16px;
}

.diary-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.diary-input-text {
  width: 100%;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

/* Estilo Sliders */
.range-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--primary-light);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.3);
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  width: 32px;
  text-align: right;
}

/* Upload de Imagem */
.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-color);
  background-color: var(--bg);
  padding: 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  gap: 8px;
  transition: all 0.2s ease;
  min-height: 80px;
}

.file-upload-label:hover {
  border-color: var(--primary);
  background-color: rgba(var(--primary-rgb), 0.02);
}

.file-upload-label svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
}

.file-upload-label span {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
}

.photo-preview-container {
  display: none;
  position: relative;
  width: 100%;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-top: 8px;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
}

.photo-preview-container.active {
  display: block;
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* Linha do Tempo do Diário */
.timeline-section {
  margin-top: 24px;
}

.timeline-title {
  font-size: 18px;
  margin-bottom: 16px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--primary-light);
  margin-left: 10px;
  z-index: 10;
  margin-top: 6px;
}

.timeline-content {
  flex: 1;
  background-color: var(--card-bg);
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.timeline-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 12px;
  font-weight: 500;
}

.timeline-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.stat-chip {
  background-color: var(--bg);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  gap: 4px;
}

.timeline-photo {
  width: 100%;
  border-radius: var(--border-radius-sm);
  max-height: 180px;
  object-fit: cover;
  margin-top: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.timeline-photo:hover {
  transform: scale(1.02);
}

/* ---------------- TELA DICAS (BIBLIOTECA) ---------------- */
.tips-header {
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  gap: 12px;
}

.search-box svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-light);
  stroke-width: 2;
  fill: none;
}

.search-input {
  border: none;
  background: none;
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-main);
  outline: none;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-pill.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tip-card {
  cursor: pointer;
}

.tip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tip-card h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.tip-card-arrow {
  transition: transform 0.3s ease;
  width: 20px;
  height: 20px;
  stroke: var(--text-light);
  stroke-width: 2;
  fill: none;
}

.tip-card.expanded .tip-card-arrow {
  transform: rotate(180deg);
  stroke: var(--primary);
}

.tip-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding-top: 0;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.tip-card.expanded .tip-content {
  max-height: 1000px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
  padding-top: 12px;
  border-top: 1px solid rgba(var(--primary-rgb), 0.1);
  margin-top: 12px;
}

.tip-content ul {
  padding-left: 20px;
  margin-top: 8px;
}

.tip-content li {
  margin-bottom: 6px;
}

/* ---------------- TELA PERFIL E CONQUISTAS ---------------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(var(--accent-rgb), 0.2) 100%);
}

.profile-avatar-container {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid var(--card-bg);
  box-shadow: var(--shadow);
}

.profile-avatar-edit-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--primary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-bg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-avatar-edit-icon svg {
  width: 12px;
  height: 12px;
  stroke: white;
  stroke-width: 2.5;
  fill: none;
}

.profile-info h3 {
  font-size: 18px;
  margin-bottom: 2px;
}

.profile-info p {
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--border-radius-md);
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Conquistas (Gamificação) */
.achievements-section {
  margin-bottom: 24px;
}

.achievements-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.badge-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--border-radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  opacity: 0.55;
  filter: grayscale(1);
}

.badge-card.unlocked {
  opacity: 1;
  filter: none;
  border-color: rgba(var(--primary-rgb), 0.3);
  background: linear-gradient(180deg, var(--card-bg) 0%, rgba(var(--primary-light-rgb), 0.15) 100%);
}

.badge-icon-container {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  position: relative;
}

.badge-icon-container svg {
  width: 100%;
  height: 100%;
}

.badge-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 10px;
  color: var(--text-light);
}

.badge-status-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background-color: var(--border-color);
  color: var(--text-light);
  font-size: 8px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
}

.badge-card.unlocked .badge-status-tag {
  background-color: var(--primary);
  color: white;
}

/* ---------------- CONFIGURAÇÕES E PREMIUM ---------------- */
.settings-section-title {
  font-size: 16px;
  margin-bottom: 12px;
  margin-top: 24px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.setting-info p {
  font-size: 11px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--primary-light);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Select Dropdown */
.settings-select {
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  outline: none;
}

.settings-time {
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  outline: none;
}

/* Área Premium */
.premium-card {
  background: linear-gradient(135deg, #FFD6E7 0%, #D8C3FF 100%);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(var(--primary-rgb), 0.2);
}

.premium-card::before {
  content: 'EM BREVE';
  position: absolute;
  top: 15px;
  right: -30px;
  background: #FF5252;
  color: white;
  font-family: var(--font-title);
  font-size: 8px;
  font-weight: 800;
  padding: 4px 30px;
  transform: rotate(45deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.premium-title {
  color: #4B0082 !important;
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.premium-feature-list {
  margin: 16px 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.premium-feature-list li {
  font-size: 12px;
  color: #5D3E8C;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.premium-feature-list li svg {
  width: 16px;
  height: 16px;
  stroke: #7B1FA2;
  stroke-width: 2.5;
  fill: none;
}

/* Notification Popup */
.notif-toast {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius-md);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  border-left: 5px solid var(--primary);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  z-index: 400;
  transform: translateY(-120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-toast.active {
  transform: translateY(0);
}

.notif-toast-icon {
  background-color: var(--primary-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-toast-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
}

.notif-toast-body h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.notif-toast-body p {
  font-size: 11px;
}

/* Modal de Edição de Perfil */
.profile-edit-modal-content {
  border-radius: var(--border-radius-lg);
  margin-bottom: 20px;
}

.profile-edit-modal-content h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* ---------------- ESTILIZAÇÃO DO ANALISADOR COM IA ---------------- */
@keyframes scan {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 100%; opacity: 1; }
  100% { top: 0%; opacity: 0.8; }
}

.scanner-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, transparent, #FF5252, #FF9BCA, #9B7BFF, transparent);
  box-shadow: 0 0 12px rgba(155, 123, 255, 0.9);
  animation: scan 2.5s infinite linear;
  z-index: 10;
  pointer-events: none;
}

#ai-result-html h4 {
  font-family: var(--font-title);
  color: var(--primary);
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 14px;
}

#ai-result-html h4:first-child {
  margin-top: 0;
}

#ai-result-html p {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
}

#ai-result-html ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

#ai-result-html li {
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
}

#ai-result-html strong {
  color: var(--primary);
}

/* 11. TELA DE BLOQUEIO DE ACESSO (PAYWALL) */
.paywall-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.paywall-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.paywall-content {
  width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.paywall-lock-icon {
  width: 64px;
  height: 64px;
  background-color: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  animation: pulse-lock 2s infinite ease-in-out;
  flex-shrink: 0;
}

.paywall-lock-icon svg {
  width: 28px;
  height: 28px;
}

@keyframes pulse-lock {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
  }
}

.paywall-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 6px;
}

.paywall-title strong {
  color: var(--primary);
  font-weight: 800;
}

.paywall-subtitle {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
  margin-bottom: 20px;
  max-width: 90%;
}

.paywall-features {
  width: 100%;
  background-color: var(--card-bg);
  border-radius: var(--border-radius-md);
  padding: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.paywall-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.paywall-feature-icon {
  font-size: 18px;
  line-height: 1.2;
}

.paywall-feature-item strong {
  font-size: 12px;
  color: var(--text-main);
  display: block;
}

.paywall-feature-item p {
  font-size: 10.5px;
  color: var(--text-light);
  margin-top: 1px;
  line-height: 1.3;
}

.paywall-btn {
  width: 100%;
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  margin-top: 4px;
}

.paywall-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
  color: white;
}

.paywall-btn:active {
  transform: translateY(0);
}

.paywall-restore-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 14px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.paywall-restore-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ==================================================
   TESTE GRÁTIS E LIMITAÇÕES (TRIAL & LIMITS)
   ================================================== */
.trial-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px; /* Garante que o texto e o botão não colidam */
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.08) 0%, rgba(155, 123, 255, 0.08) 100%) !important;
  border: 1px solid rgba(255, 82, 82, 0.25) !important;
  border-radius: var(--border-radius-md) !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  animation: pulseBorder 3s infinite ease-in-out !important;
}

.trial-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trial-banner-icon {
  font-size: 16px;
  animation: shake 2s infinite ease-in-out;
}

#trial-countdown-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #C2185B;
}

.trial-banner-btn {
  background-color: var(--primary) !important;
  color: white !important;
  border: none !important;
  padding: 6px 14px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 20px !important; /* Botão mais arredondado e elegante */
  cursor: pointer !important;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important; /* Evita quebra de linha de forma absoluta */
  font-family: var(--font-title), sans-serif !important;
}

.trial-banner-btn:hover {
  transform: translateY(-1px) scale(1.03) !important;
  box-shadow: 0 6px 12px rgba(var(--primary-rgb), 0.3) !important;
}

.locked-tip-box {
  background: rgba(var(--primary-rgb), 0.03);
  border: 1px dashed rgba(var(--primary-rgb), 0.25);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
}

@keyframes pulseBorder {
  0%, 100% { border-color: rgba(255, 82, 82, 0.25); }
  50% { border-color: var(--primary); }
}

@keyframes shake {
  0%, 100% { transform: scale(1); }
  10%, 20% { transform: scale(0.9) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
  40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
}

/* Products Tab Styling */
.products-grid {
  padding-bottom: 80px; /* Evita que o último card seja coberto pela barra inferior */
}

.product-card {
  display: flex;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  position: relative;
  min-height: 104px;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.product-img-container {
  width: 100px;
  height: auto;
  min-height: 104px;
  flex-shrink: 0;
  background-color: #f7f7f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-title {
  font-family: var(--font-title);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  line-height: 1.3;
}

.product-desc {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.btn-buy-product {
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-buy-product:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(var(--primary-rgb), 0.3);
}

.admin-actions {
  display: flex;
  gap: 6px;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.btn-admin-edit, .btn-admin-delete {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  font-size: 10px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-admin-edit {
  color: var(--primary);
}

.btn-admin-delete {
  color: #FF5252;
}

.btn-admin-edit:hover, .btn-admin-delete:hover {
  background-color: white;
  transform: scale(1.05);
}

/* Custom Guidelines Card Premium Optimization */
.profile-guidelines-card {
  position: relative;
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(155, 123, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(155, 123, 255, 0.08) !important;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="dark"] .profile-guidelines-card {
  background: rgba(30, 25, 45, 0.65) !important;
  border-color: rgba(155, 123, 255, 0.15) !important;
}

.guidelines-free-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 95px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 1) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 20px;
  text-align: center;
  z-index: 10;
  backdrop-filter: blur(1px);
}

[data-theme="dark"] .guidelines-free-overlay {
  background: linear-gradient(to bottom, rgba(30, 25, 45, 0) 0%, rgba(30, 25, 45, 0.95) 40%, rgba(30, 25, 45, 1) 100%);
}

.guidelines-blur-content {
  filter: blur(4.5px);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
  margin-top: 10px;
}

.btn-upgrade-guidelines {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
  color: white;
  font-size: 11.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(155, 123, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 10px;
}

.btn-upgrade-guidelines:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(155, 123, 255, 0.45);
}

.guidelines-badge-pro {
  background-color: rgba(46, 204, 113, 0.1);
  color: #2ECC71;
  border: 1px solid rgba(46, 204, 113, 0.2);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 4px;
}



/* ==========================================================================
   ESTILOS PREMIUM: CLÍNICA CAPILAR DIGITAL & GAMIFICAÇÃO
   ========================================================================== */

/* Saudação e Header Home */
.greeting-section-premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 8px 4px;
}
.greeting-section-premium h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.greeting-section-premium p {
  font-size: 13px;
  color: var(--text-light);
}
.greeting-badge-clinical {
  background-color: rgba(39, 201, 63, 0.1);
  color: #27C93F;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(39, 201, 63, 0.2);
}

/* Card AI Message */
.ai-message-card {
  background: linear-gradient(135deg, rgba(155, 123, 255, 0.04) 0%, rgba(255, 214, 231, 0.04) 100%);
  border: 1.5px dashed var(--primary);
  border-radius: var(--border-radius-lg);
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(155, 123, 255, 0.05);
}
.ai-message-card .card-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.ai-message-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

/* Card do Cuidado Premium */
.today-card-premium {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}
.today-card-premium.completed {
  border-color: #27C93F;
  background-color: rgba(39, 201, 63, 0.02);
}
.today-card-premium .card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.today-card-premium .treatment-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  color: white;
}
.today-card-premium .time-badge {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
}
.today-card-premium .today-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}
.today-card-premium .benefit-box {
  background: rgba(155, 123, 255, 0.03);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-main);
  margin-bottom: 10px;
  border-left: 3.5px solid var(--primary);
}
.today-card-premium .importance-box {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 18px;
}
.today-card-premium .completed-state {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #27C93F;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 0;
  border: 1px dashed rgba(39, 201, 63, 0.3);
  border-radius: var(--border-radius-md);
  background: rgba(39, 201, 63, 0.05);
}
.today-card-premium.completed .btn-complete-today {
  display: none !important;
}
.today-card-premium.completed .completed-state {
  display: flex !important;
}

/* Missão do Dia (Duolingo Style) */
.mission-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}
.mission-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.mission-header-row h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}
.reward-tag {
  background: linear-gradient(135deg, #FFD6E7 0%, #E8D9FF 100%);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}
.mission-progress-track {
  width: 100%;
  height: 8px;
  background-color: rgba(155, 123, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.mission-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-dark) 100%);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mission-fraction {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  display: block;
  margin-bottom: 12px;
}
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mission-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(155, 123, 255, 0.02);
  border: 1.5px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
}
.mission-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--primary);
  cursor: pointer;
  accent-color: var(--primary);
}
.mission-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}
.mission-item:has(input:checked) {
  border-color: #27C93F;
  background-color: rgba(39, 201, 63, 0.03);
}
.mission-item:has(input:checked) .mission-label {
  text-decoration: line-through;
  color: var(--text-light);
}

/* Chatbot Especialista Hair AI */
.assistant-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius-lg);
  padding: 20px;
}
.assistant-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.assistant-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.assistant-header-row h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}
.assistant-status {
  font-size: 10px;
  color: #27C93F;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.assistant-status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #27C93F;
  border-radius: 50%;
}
.chat-window {
  height: 180px;
  background-color: rgba(155, 123, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  overflow-y: auto;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-size: 12px;
  line-height: 1.5;
}
.chat-message.bot {
  background-color: #FFFFFF;
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  border: 1px solid rgba(155, 123, 255, 0.1);
}
.chat-message.user {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-rgb) 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input-row {
  display: flex;
  gap: 8px;
}
.chat-input-row input {
  flex: 1;
  background-color: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-row input:focus {
  border-color: var(--primary);
}
.btn-send-chat {
  background-color: var(--primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(155, 123, 255, 0.2);
  transition: all 0.2s ease;
}
.btn-send-chat:hover {
  transform: scale(1.05);
}

/* Timeline do Plano Personalizado */
.plan-header {
  margin-bottom: 20px;
}
.plan-header h2 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}
.plan-header p {
  font-size: 12.5px;
  color: var(--text-light);
}
.plan-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  padding-left: 12px;
}
.plan-timeline-container::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 15px;
  bottom: 15px;
  width: 2px;
  background-color: var(--border-color);
  z-index: 1;
}
.timeline-week {
  position: relative;
  z-index: 2;
}
.timeline-week-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.week-indicator-dot {
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  border: 4px solid var(--primary-light);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--card-bg);
}
.timeline-week-title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}
.timeline-week-goal {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 11.5px;
  color: var(--text-light);
  margin-left: 32px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.timeline-days-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 32px;
}
.timeline-day-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card-bg);
  border: 1.5px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
.timeline-day-card.completed {
  border-color: #27C93F;
  background-color: rgba(39, 201, 63, 0.02);
}
.day-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.day-number-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
  background-color: rgba(155,123,255,0.06);
  padding: 4px 8px;
  border-radius: 8px;
}
.day-card-info h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}
.day-card-info p {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.day-card-status-icon {
  font-size: 16px;
  color: var(--text-light);
}
.timeline-day-card.completed .day-card-status-icon {
  color: #27C93F;
}

/* Saúde Capilar e Circular Gauges */
.health-stats-card h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.health-card-row {
  display: flex;
  gap: 20px;
  align-items: center;
}
.radial-score-container-sm {
  width: 90px;
  height: 90px;
  position: relative;
  flex-shrink: 0;
}
.radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.radial-bg {
  fill: none;
  stroke: rgba(155, 123, 255, 0.08);
  stroke-width: 8;
}
.radial-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-dasharray: 251.2;
  transition: stroke-dashoffset 0.8s ease-out;
  stroke-linecap: round;
}
.radial-label-box-sm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.radial-percent-sm {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}
.health-grid-sub {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.sub-bar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.sub-bar-name {
  width: 80px;
  font-weight: 600;
  color: var(--text-main);
}
.bar-bg {
  flex: 1;
  height: 6px;
  background-color: rgba(155, 123, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}
.bar-fill.purple {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-rgb) 100%);
}
.bar-fill.pink {
  background: linear-gradient(90deg, var(--accent-dark) 0%, #FF6080 100%);
}
.sub-bar-val {
  width: 25px;
  text-align: right;
  font-weight: 700;
  color: var(--text-light);
}

/* Sua Transformação (Gallery Grid) */
.transformation-card h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.transformation-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.trans-photo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.trans-photo-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
}
.trans-photo-frame {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  background-color: rgba(155, 123, 255, 0.03);
  border: 1.5px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.trans-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mood Selector & Ranges */
.mood-selector-container {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
}
.mood-btn {
  flex: 1;
  background-color: var(--card-bg);
  border: 1.5px solid var(--border-color);
  padding: 8px 4px;
  border-radius: var(--border-radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}
.mood-btn.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Análise por Foto (Clinical tab) */
.ai-header {
  margin-bottom: 20px;
}
.ai-header h2 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}
.ai-header p {
  font-size: 12.5px;
  color: var(--text-light);
}
.ai-card-premium {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 24px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}
.file-upload-label-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--primary);
  border-radius: var(--border-radius-md);
  background-color: rgba(155, 123, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}
.file-upload-label-premium span {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 6px;
}
.photo-preview-container-premium {
  width: 100%;
  max-height: 250px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-preview-premium {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-line-premium {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #FF6080, var(--primary), transparent);
  animation: scan 2s linear infinite;
  box-shadow: 0 0 10px rgba(155,123,255,0.8);
}
.photo-remove-btn-premium {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-run-ai-tab {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--border-radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 12px rgba(155,123,255,0.25);
  transition: all 0.2s ease;
}
.btn-run-ai-tab:disabled {
  background-color: rgba(126, 87, 194, 0.2);
  color: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}
.clinical-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(155,123,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}
.ai-detailed-gauges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gauge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.gauge-row span:first-child {
  width: 80px;
  font-weight: 600;
  color: var(--text-main);
}
.gauge-val {
  width: 60px;
  text-align: right;
  font-weight: 700;
  color: var(--text-light);
}
.status-tag {
  background-color: rgba(255, 82, 82, 0.1);
  color: #FF5252;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 82, 82, 0.15);
}

/* Level e Streak (Gamification view) */
.level-streak-card {
  box-shadow: var(--shadow);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 20px;
}
.level-tag {
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}
.streak-badge-pwa {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 159, 67, 0.1);
  color: #FF9F43;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 159, 67, 0.2);
}
.xp-progression-bar-wrapper {
  width: 100%;
  height: 8px;
  background-color: rgba(155, 123, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-dark) 100%);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}
.profile-stats {
  display: flex;
  justify-content: space-around;
  background-color: rgba(155, 123, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  margin-top: 16px;
}
.stat-item {
  flex: 1;
  text-align: center;
}
.stat-number {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}
.stat-title {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* Custom Medal Styling */
.badge-card {
  position: relative;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.badge-card.unlocked {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(155, 123, 255, 0.02) 0%, rgba(255, 214, 231, 0.02) 100%);
}
.badge-icon-container {
  width: 48px;
  height: 48px;
  background-color: rgba(155,123,255,0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--text-light);
  transition: all 0.3s ease;
}
.badge-card.unlocked .badge-icon-container {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: scale(1.05);
}
.badge-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.badge-desc {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.3;
  margin-bottom: 8px;
}
.badge-status-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-light);
}
.badge-card.unlocked .badge-status-tag {
  background-color: rgba(39, 201, 63, 0.1);
  color: #27C93F;
}

/* Animations */
@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}





/* Custom override to hide 'EM BREVE' from active AI advice card */
.ai-message-card::before {
  display: none !important;
}

/* --- NATIVE APP POLISH ON MOBILE --- */
body, html {
  overscroll-behavior-y: contain; /* Bloqueia pull-to-refresh e bouncing elástico */
  user-select: none; /* Bloqueia seleção de textos e popups irritantes de cópia */
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; /* Remove overlay azul de clique no Chrome/Safari */
}

/* Garante que inputs e textareas permitam seleção normal para digitação */
input, textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Ajuste de tab-bar para notched phones */
.tab-bar {
  height: calc(76px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
}

/* Espaçamento compensatório da área de rolagem */
.app-body {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  padding-top: calc(24px + env(safe-area-inset-top));
}

/* Toque responsivo com micro-escala simulando app nativo */
.tab-item:active {
  transform: scale(0.92);
  transition: transform 0.1s ease;
}
.btn-complete-today:active, 
.photo-upload-label:active, 
.btn-primary:active,
.btn-secondary:active,
.mood-btn:active {
  transform: scale(0.97);
  transition: transform 0.05s ease;
}

/* Ajustes finos adicionais para celular */
@media (max-width: 480px) {
  .app-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}
