/* ============================================================
   ROTINA GOLD — Estilos Mobile-First
   ============================================================ */

/* ---- VARIÁVEIS ---- */
:root {
  --gold:          #D4921C;
  --gold-light:    #F0C040;
  --gold-bg:       #FFF8EC;
  --green:         #5CB87A;
  --green-dark:    #3E8E5A;
  --orange:        #E8825C;
  --purple:        #9B78C8;
  --blue:          #5B9BD4;
  --red:           #E05C5C;
  --bg:            #FFF5E6;
  --card:          #FFFFFF;
  --border:        #F0E4CC;
  --text:          #2D2D2D;
  --text-light:    #888888;
  --text-muted:    #BBBBBB;
  --shadow-sm:     0 1px 6px rgba(0,0,0,0.07);
  --shadow:        0 2px 14px rgba(0,0,0,0.09);
  --shadow-lg:     0 8px 30px rgba(0,0,0,0.14);
  --radius-sm:     10px;
  --radius:        16px;
  --radius-lg:     24px;
  --nav-h:         68px;
  --header-h:      56px;
  --transition:    0.22s ease;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
img { max-width: 100%; }

/* ---- APP & SCREENS ---- */
#app { position: relative; }

.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 16px);
  overflow-x: hidden;
}
.screen.active { display: block; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Telas sem nav (detalhes, edição) */
.screen-no-nav { padding-bottom: 24px; }

/* ---- HEADER DE TELA ---- */
.screen-header {
  background: var(--card);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.screen-header h2 { font-size: 17px; font-weight: 700; flex: 1; }
.btn-back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg);
  font-size: 18px;
}

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  -webkit-overflow-scrolling: touch;
}
.bottom-nav::-webkit-scrollbar { display: none; }

.nav-item {
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--text-light);
  transition: color var(--transition);
  tap-highlight-color: transparent;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--gold); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.card + .card { margin-top: 10px; }

/* ---- SEÇÕES ---- */
.section { padding: 0 16px; margin-bottom: 16px; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 20px 16px 8px;
}

/* ---- BOTÕES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}
.btn:active { opacity: 0.8; transform: scale(0.98); }

.btn-primary   { background: var(--gold);   color: #fff; }
.btn-green     { background: var(--green);  color: #fff; }
.btn-orange    { background: var(--orange); color: #fff; }
.btn-danger    { background: var(--red);    color: #fff; }
.btn-ghost     { background: var(--bg);     color: var(--text); border: 1px solid var(--border); }
.btn-outline   { background: transparent;   color: var(--gold); border: 1.5px solid var(--gold); }

.btn-full { width: 100%; }
.btn-sm   { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-icon { padding: 8px; border-radius: 50%; font-size: 18px; }
.btn-icon:active { background: var(--bg); }

/* ---- FORMULÁRIOS ---- */
.field-group { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}
.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--gold);
}
.field-textarea { resize: vertical; min-height: 90px; }

/* Stars / Rating */
.rating-row { display: flex; gap: 8px; align-items: center; }
.star-btn {
  font-size: 24px;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity .15s;
}
.star-btn.active { opacity: 1; }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1E1E1E;
  color: #fff;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }
.toast.success { background: var(--green-dark); }

/* ---- BOTTOM SHEET ---- */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: all; }

.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 201;
  padding: 12px 16px 32px;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.bottom-sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.sheet-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

/* ---- LOADING ---- */
.loading-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
  flex-direction: column; gap: 12px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center; padding: 50px 24px;
  color: var(--text-light);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; line-height: 1.5; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px;
  gap: 40px;
}
.login-logo { text-align: center; }
.logo-icon { font-size: 72px; margin-bottom: 8px; }
.logo-title { font-size: 32px; font-weight: 800; color: var(--gold); letter-spacing: -0.5px; }
.logo-sub { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.login-form { width: 100%; max-width: 360px; }
.login-error {
  margin-top: 12px; padding: 10px 14px;
  background: #fff0f0; border: 1px solid #ffcccc;
  border-radius: 8px; font-size: 14px; color: var(--red);
}

/* ============================================================
   SELEÇÃO DE PERFIL
   ============================================================ */
.profile-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px;
  text-align: center;
}
.profile-title { font-size: 26px; font-weight: 800; color: var(--text); }
.profile-sub { font-size: 15px; color: var(--text-light); margin-top: 6px; }
.profile-cards { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.profile-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  min-width: 140px;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  text-align: center;
}
.profile-card:hover, .profile-card:active {
  border-color: var(--gold);
  transform: scale(1.04);
  box-shadow: var(--shadow);
}
.profile-avatar { font-size: 56px; margin-bottom: 8px; }
.profile-name { font-size: 18px; font-weight: 700; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-hero {
  background: linear-gradient(135deg, var(--gold) 0%, #F0C040 100%);
  color: #fff;
  padding: 20px 16px 28px;
}
.hero-greeting { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hero-avatar { font-size: 42px; }
.hero-text h2 { font-size: 22px; font-weight: 800; }
.hero-text p  { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.hero-btn-logout { margin-left: auto; opacity: 0.8; font-size: 13px; background: rgba(255,255,255,0.25); padding: 6px 12px; border-radius: 20px; }

.progress-strip {
  display: flex; gap: 8px; margin-top: 4px;
  flex-wrap: nowrap; overflow-x: auto;
}
.progress-chip {
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Motivational phrase */
.motivational {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  padding: 12px 20px;
  font-style: italic;
}

/* Meal cards grid */
.meals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.meal-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  position: relative;
  min-height: 110px;
  display: flex; flex-direction: column;
}
.meal-card:active { transform: scale(0.97); }
.meal-card.done { border-color: var(--green); background: #f4fbf6; }
.meal-card.skipped { border-color: #ddd; opacity: 0.7; }
.meal-card-icon { font-size: 28px; margin-bottom: 6px; }
.meal-card-name { font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.meal-card-recipe { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 4px; flex: 1; }
.meal-card-status {
  font-size: 11px; font-weight: 700;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  align-self: flex-start;
}
.status-done    { background: #d4edda; color: var(--green-dark); }
.status-skipped { background: #e9ecef; color: #666; }
.status-pending { background: #fff3cd; color: #856404; }

/* Habits mini list on dashboard */
.habit-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.habit-row:last-child { border-bottom: none; }
.habit-row-icon { font-size: 22px; flex-shrink: 0; }
.habit-row-name { flex: 1; font-size: 14px; font-weight: 500; }
.habit-check { font-size: 22px; transition: transform .15s; }
.habit-row.done .habit-row-name { text-decoration: line-through; color: var(--text-light); }

/* Workout card */
.workout-card {
  display: flex; align-items: center; gap: 12px;
}
.workout-card-icon { font-size: 36px; }
.workout-card-info { flex: 1; }
.workout-card-info h3 { font-size: 16px; font-weight: 700; }
.workout-card-info p  { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* ============================================================
   REFEIÇÕES
   ============================================================ */
.meal-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.meal-list-item:last-child { border-bottom: none; }
.meal-list-item:active { background: var(--bg); }
.meal-list-icon { font-size: 32px; }
.meal-list-info { flex: 1; }
.meal-list-name { font-size: 16px; font-weight: 700; }
.meal-list-detail { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.meal-list-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
}
.meal-list-arrow { color: var(--text-muted); font-size: 20px; }

/* ---- Detalhe de refeição ---- */
.meal-detail-hero {
  background: linear-gradient(135deg, #f8f3ea, #fff5e0);
  padding: 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.meal-detail-icon  { font-size: 56px; margin-bottom: 8px; }
.meal-detail-title { font-size: 22px; font-weight: 800; }
.meal-detail-date  { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.status-selector { display: flex; gap: 8px; }
.status-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  text-align: center;
  border: 2px solid var(--border);
  transition: all .2s;
}
.status-btn.active-done    { border-color: var(--green); background: #e8f8ee; color: var(--green-dark); }
.status-btn.active-skipped { border-color: #ccc;         background: #f0f0f0; color: #555; }

.recipe-option-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .2s;
}
.recipe-option-item.selected { border-color: var(--gold); background: #fffbe8; }
.recipe-option-name { flex: 1; font-size: 15px; font-weight: 600; }
.recipe-option-meta { font-size: 12px; color: var(--text-light); }

/* ============================================================
   RECEITAS
   ============================================================ */
.recipe-search-bar {
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.recipe-search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 15px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.filter-chips {
  display: flex; gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.filter-chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
@media (min-width: 480px) { .recipe-grid { grid-template-columns: 1fr 1fr 1fr; } }

.recipe-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.recipe-card:active { transform: scale(0.97); box-shadow: var(--shadow); }
.recipe-card-icon   { font-size: 32px; margin-bottom: 8px; }
.recipe-card-name   { font-size: 14px; font-weight: 700; line-height: 1.3; flex: 1; }
.recipe-card-meta   { font-size: 11px; color: var(--text-light); margin-top: 8px; }
.recipe-card-badge  {
  display: inline-block; margin-top: 6px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: var(--gold-bg); color: var(--gold);
}

/* ---- Detalhe de receita ---- */
.recipe-detail-hero {
  background: linear-gradient(160deg, #fffbe8, #fff5d6);
  padding: 24px 16px;
  border-bottom: 1px solid var(--border);
}
.recipe-detail-icon  { font-size: 52px; margin-bottom: 10px; }
.recipe-detail-title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.recipe-meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.recipe-meta-chip {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--text);
}
.recipe-meta-chip span { color: var(--text-light); font-weight: 400; margin-right: 2px; }

.ingredient-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.ingredient-item:last-child { border-bottom: none; }
.ingredient-qty { color: var(--text-light); font-size: 13px; white-space: nowrap; }

.instruction-step {
  display: flex; gap: 12px;
  margin-bottom: 14px;
}
.step-num {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--gold); color: #fff;
  border-radius: 50%;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: 14px; line-height: 1.6; padding-top: 4px; }

.action-buttons { display: flex; flex-direction: column; gap: 10px; }
.action-btn-row { display: flex; gap: 10px; }
.action-btn-row .btn { flex: 1; }

/* ============================================================
   COMPRAS
   ============================================================ */
.shopping-category-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 8px;
}
.shopping-category-header .cat-icon { font-size: 22px; }
.shopping-category-header .cat-name { font-size: 15px; font-weight: 700; flex: 1; }
.shopping-category-header .cat-count { font-size: 12px; color: var(--text-light); }

.shopping-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.shopping-item:last-child { border-bottom: none; }
.shopping-item:active { background: var(--bg); }
.shopping-item.checked .item-name { text-decoration: line-through; color: var(--text-muted); }
.item-check {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all .2s;
}
.shopping-item.checked .item-check { background: var(--green); border-color: var(--green); color: #fff; }
.item-name { flex: 1; font-size: 15px; font-weight: 500; }
.item-qty  { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.item-delete { padding: 4px 8px; color: var(--red); font-size: 18px; }

.add-item-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + 10px);
  padding: 12px 16px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.add-item-bar .field-input { flex: 1; }

/* ============================================================
   TREINOS
   ============================================================ */
.workout-list-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 16px 10px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.workout-list-item:active { transform: scale(0.98); }
.workout-list-item.today-done { border-color: var(--green); background: #f4fbf6; }
.workout-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.workout-title  { font-size: 17px; font-weight: 700; flex: 1; }
.workout-day    { font-size: 12px; color: var(--text-light); }
.workout-day-badge {
  background: var(--gold-bg); color: var(--gold);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 700;
}
.exercise-pill {
  display: inline-block;
  background: var(--bg);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  margin: 2px 4px 2px 0;
  color: var(--text);
}

/* Exercício log */
.exercise-log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.exercise-log-item:last-child { border-bottom: none; }
.exercise-check {
  width: 28px; height: 28px; flex-shrink: 0;
  border: 2px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all .2s;
}
.exercise-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.exercise-info { flex: 1; }
.exercise-name { font-size: 15px; font-weight: 600; }
.exercise-detail { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ============================================================
   HÁBITOS
   ============================================================ */
.habits-header-card {
  background: linear-gradient(135deg, var(--purple), #b89ddf);
  color: #fff;
  padding: 20px 16px;
  margin: 0 0 4px;
}
.habits-header-card h2 { font-size: 22px; font-weight: 800; }
.habits-header-card p  { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.habits-score { font-size: 36px; font-weight: 900; margin: 12px 0 4px; }

.habit-full-item {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.habit-full-item:last-child { border-bottom: none; }
.habit-full-item:active { background: var(--bg); }
.habit-full-icon { font-size: 28px; flex-shrink: 0; }
.habit-full-name { flex: 1; font-size: 16px; font-weight: 600; }
.habit-full-check { font-size: 28px; }
.habit-full-item.done { background: #f4fbf6; }
.habit-full-item.done .habit-full-name { color: var(--text-light); }

/* ============================================================
   PROGRESSO
   ============================================================ */
.progress-header-card {
  background: linear-gradient(135deg, var(--blue), #7fb3e0);
  color: #fff;
  padding: 20px 16px;
}
.progress-header-card h2 { font-size: 22px; font-weight: 800; }

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px;
}
.metric-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1.5px solid var(--border);
  text-align: center;
}
.metric-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.metric-value { font-size: 28px; font-weight: 800; color: var(--text); }
.metric-unit  { font-size: 12px; color: var(--text-light); }

.history-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.history-date { color: var(--text-light); font-size: 13px; }

/* ============================================================
   AJUSTES (SETTINGS)
   ============================================================ */
.settings-section-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 20px 16px 8px;
}
.settings-item {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.settings-item-icon { font-size: 22px; flex-shrink: 0; }
.settings-item-label { flex: 1; font-size: 15px; font-weight: 500; }
.settings-item-arrow { color: var(--text-muted); font-size: 20px; }
.settings-item-value { font-size: 14px; color: var(--text-light); }

/* ============================================================
   CARDÁPIO SEMANAL / PREPARO SEMANAL
   ============================================================ */
.day-column {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 16px 10px;
  border: 1.5px solid var(--border);
}
.day-title {
  font-size: 16px; font-weight: 800;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}

.prep-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 16px 10px;
  border: 1.5px solid var(--border);
}
.prep-item.done { border-color: var(--green); background: #f4fbf6; }
.prep-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.prep-title { font-size: 16px; font-weight: 700; flex: 1; }
.prep-task-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.prep-task-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; flex-shrink: 0;
  transition: all .2s;
}
.prep-task-check.done { background: var(--green); border-color: var(--green); color: #fff; }

/* ============================================================
   UTILITÁRIOS
   ============================================================ */
.flex-row   { display: flex; align-items: center; }
.gap-8      { gap: 8px; }
.gap-12     { gap: 12px; }
.mt-8       { margin-top: 8px; }
.mt-16      { margin-top: 16px; }
.mt-24      { margin-top: 24px; }
.p-16       { padding: 16px; }
.text-sm    { font-size: 13px; }
.text-light { color: var(--text-light); }
.text-bold  { font-weight: 700; }
.text-gold  { color: var(--gold); }
.text-green { color: var(--green-dark); }
.text-red   { color: var(--red); }
.text-center{ text-align: center; }
.divider    { height: 1px; background: var(--border); margin: 12px 0; }
.spacer     { height: 80px; }

/* Tag de perfil */
.tag-both    { background: #e8f4ff; color: #3a7cbf; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.tag-thalita { background: #fce8f4; color: #9e3a7c; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.tag-luiz    { background: #e8f0fc; color: #3a5fbf; border-radius: 4px; padding: 1px 6px; font-size: 11px; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (min-width: 600px) {
  .meals-grid { grid-template-columns: 1fr 1fr 1fr; }
  .login-form { padding: 40px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
}

@media (min-width: 768px) {
  #app { max-width: 480px; margin: 0 auto; }
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
}
