/* Cartões base */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.card--tight {
  padding: 14px;
  border-radius: var(--radius-md);
}

.card-muted {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* Botões e pílulas */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.18s ease, transform 0.15s ease, opacity 0.18s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--success {
  background: var(--success);
  color: var(--text-inverse);
}

.btn--soft {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn--soft:hover {
  background: var(--border-strong);
}

.btn--danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--sm {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 13px;
}

.btn--full {
  width: 100%;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pill-btn--soft {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.link-btn {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.16s ease, transform 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.ui-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.theme-toggle-btn {
  width: 34px;
  height: 34px;
}

.theme-toggle-btn .ui-icon {
  width: 17px;
  height: 17px;
}

/* Seletor segmentado estilo iOS */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 12px;
  gap: 3px;
}

.segmented-btn {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmented-btn.is-active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Campos de busca e formulário */
.search-wrap {
  position: relative;
}

.search-input,
.text-input,
.select-input {
  width: 100%;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input {
  padding-left: 40px;
  padding-right: 40px;
  background: var(--bg-subtle);
  border-color: transparent;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn[hidden] {
  display: none;
}

.search-clear-btn .ui-icon {
  width: 14px;
  height: 14px;
}

.search-input:focus,
.text-input:focus,
.select-input:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Chips de filtro */
.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.chips-row::-webkit-scrollbar {
  display: none;
}

.chips-row--wrap {
  flex-wrap: wrap;
  overflow: visible;
}

.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.16s ease;
}

.chip.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--text-inverse);
}

/* Mídia da receita (cartão elegante quando não há foto + foto real suave) */
.icon-btn.is-fav {
  background: var(--danger-soft);
  color: var(--danger);
}

.media-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(29, 29, 31, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  pointer-events: none;
}
.media-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.media-box--compact {
  aspect-ratio: 4 / 3;
}

.media-fallback {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-fallback-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(29, 29, 31, 0.72);
  background: rgba(255, 255, 255, 0.68);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.media-fallback-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.media-box img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.media-box img.is-loaded {
  opacity: 1;
}

.media-box:has(img.is-loaded) .media-fallback {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Cartão de receita na grade e carrossel */
.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.recipe-card--featured {
  min-width: 236px;
  max-width: 236px;
  flex-shrink: 0;
}

.recipe-card-body {
  padding: 2px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recipe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.recipe-card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.recipe-macros-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.badge--protein {
  background: var(--success-soft);
  color: #1A8A37;
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Anel de meta diária de proteína (Início) */
.protein-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ring-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}

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

.ring-bg {
  fill: none;
  stroke: var(--bg-subtle);
  stroke-width: 8;
}

.ring-progress {
  fill: none;
  stroke: var(--success);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.ring-pct {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.protein-info {
  flex: 1;
  min-width: 0;
}

.protein-numbers {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.protein-numbers span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Botões de atalho na Home */
.quick-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.quick-tile strong {
  font-size: 14px;
  font-weight: 700;
}

.quick-tile span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Detalhe da receita dentro do modal */
.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.macro-box {
  background: var(--bg-app);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.macro-box strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.macro-box span {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

/* Ingredientes com checkbox e botão de substituição */
.ing-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-app);
  border-radius: 12px;
}

.ing-check {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  font-size: 14px;
}

.ing-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.ing-check.is-done span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.swap-chip {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

/* Passos de preparo */
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Planner Semanal */
.day-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.day-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg-app);
  margin-top: 7px;
}

.slot-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.slot-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slot-value {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-value--empty {
  color: var(--text-muted);
  font-weight: 500;
}

/* Lista de Compras */
.aisle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.aisle-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.shop-row:first-of-type {
  border-top: none;
}

.shop-qty {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Guia de 30 substituições */
.sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.sub-arrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

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

/* Logs diários e estado vazio */
.log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  margin-bottom: 4px;
}

/* =========================================================
   UPGRADE VISUAL APPLE & DARK MODE
   ========================================================= */

/* Cartão Fitness Hero (Meta Diária de Proteína) */
.card--fitness-hero {
  background: linear-gradient(145deg, #1D1D1F 0%, #2C2C2E 100%);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .card--fitness-hero {
  background: linear-gradient(145deg, #0A2540 0%, #103766 100%);
  border-color: rgba(255, 255, 255, 0.14);
}

.card--fitness-hero .slot-label,
.card--fitness-hero .protein-numbers span,
.card--fitness-hero .ring-label,
.card--fitness-hero .hero-subtext {
  color: rgba(255, 255, 255, 0.78) !important;
}

.card--fitness-hero .ring-bg {
  stroke: rgba(255, 255, 255, 0.16);
}

.card--fitness-hero .btn--soft {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.card--fitness-hero .btn--soft:hover {
  background: rgba(255, 255, 255, 0.22);
}

.card--fitness-hero .log-row {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.card--fitness-hero .badge {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

/* Foto de ponta a ponta no Modal da Receita */
.modal-hero {
  position: relative;
  width: 100%;
}

.modal-hero .media-box {
  border-radius: 24px 24px 0 0;
  aspect-ratio: 16 / 10;
}

.modal-hero-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 38px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.modal-hero-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.modal-hero-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(28, 28, 30, 0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.18s ease;
}

.modal-hero-btn:active {
  transform: scale(0.92);
}

.modal-hero-btn.is-fav {
  background: rgba(255, 59, 48, 0.86);
  color: #FFFFFF;
}

.modal-body {
  padding: 16px 20px calc(26px + env(safe-area-inset-bottom, 0px));
}

.macro-box-icon {
  color: var(--accent);
  margin-bottom: 3px;
  display: flex;
  justify-content: center;
}

.macro-box-icon .ui-icon {
  width: 15px;
  height: 15px;
}

/* Ajustes específicos para Dark Mode */
[data-theme="dark"] .chip.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #000000;
}

[data-theme="dark"] .step-num {
  background: var(--accent);
  color: #FFFFFF;
}

[data-theme="dark"] .badge--protein {
  color: #4CD964;
}

[data-theme="dark"] .media-fallback-tag {
  color: rgba(245, 245, 247, 0.88);
  background: rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] .app-toast {
  background: rgba(44, 44, 46, 0.96);
  border: 1px solid var(--border-strong);
}

@media (min-width: 640px) {
  .modal-body {
    padding: 18px 24px 28px;
  }
}

/* =========================================================
   UPGRADE UX 2/3 — PLANNER POR DIA, MODO COZINHA E CARRINHO
   ========================================================= */

.day-pills {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 4px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.16s ease;
}

.day-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.day-pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0;
}

.day-pill.has-items .day-pill-dot {
  opacity: 1;
}

.day-pill.is-active .day-pill-dot {
  background: #FFFFFF;
}

.sub-applied-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.cart-details {
  padding: 12px 16px;
}

.cart-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-summary::-webkit-details-marker {
  display: none;
}

.cart-details[open] .cart-summary {
  margin-bottom: 8px;
}

/* =========================================================
   UPGRADE 3/3 — VITRINE ENTREGÁVEIS E ONBOARDING
   ========================================================= */
.deliverable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--bg-app);
  text-align: left;
  transition: transform 0.14s ease, background 0.16s ease;
}

.deliverable-row:active {
  transform: scale(0.985);
}

.deliverable-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.onb-goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.onb-goal-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-app);
  text-align: left;
  transition: all 0.16s ease;
}

.onb-goal-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.onb-goal-card strong {
  display: block;
  font-size: 14px;
}

.onb-goal-card span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =========================================================
   Perfil do Cliente (estilo Apple Health)
   ========================================================= */
.profile-avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid transparent;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}

.profile-avatar-btn.is-active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.profile-avatar-btn:active {
  transform: scale(0.94);
}

.profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile-id-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-lg .ui-icon {
  width: 26px;
  height: 26px;
}

.profile-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.profile-mini-box {
  background: var(--bg-app);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.profile-mini-box strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-mini-box span {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-weight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.profile-weight-col {
  background: var(--bg-app);
  border-radius: 12px;
  padding: 10px;
}

.profile-weight-col span {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.profile-weight-col strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.weight-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.weight-inline-form .text-input {
  flex: 1;
}

.weight-progress-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-app);
  overflow: hidden;
}

.weight-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 0.28s ease;
}

.weight-chart-wrap {
  margin-top: 14px;
  padding: 10px 10px 6px;
  border-radius: 12px;
  background: var(--bg-app);
}

.weight-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.weight-chart-grid {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.weight-chart-area {
  fill: var(--accent-soft);
}

.weight-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weight-chart-dot {
  fill: var(--bg-card);
  stroke: var(--accent);
  stroke-width: 2.2;
}

.weight-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.indicator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.indicator-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.indicator-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

.indicator-val {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ios-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-app);
  cursor: pointer;
}

.ios-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.ios-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.ios-switch:checked {
  background: var(--success);
}

.ios-switch:checked::after {
  transform: translateX(18px);
}

.home-weight-mini {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.14s ease;
}

.home-weight-mini:active {
  transform: scale(0.985);
}

.home-weight-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}
