/* ============================================================
   COMPONENTE — UI interna do App (todas as telas)
   Edite aqui para mudar o visual dentro do iPhone
============================================================ */

/* ---------- Tela base ---------- */
.app-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0d0d0f 0%, #111 100%);
  padding: 52px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity .35s var(--ease);
  font-size: 11px;
  color: #e0e0e0;
  overflow: hidden;
}

.app-screen.active {
  opacity: 1;
  position: relative;
}

/* Status bar */
.app-time {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}

.app-status-icons {
  position: absolute;
  top: 17px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.app-status-icons span { font-size: 10px; color: #fff; font-weight: 600; }

/* ---------- HOME ---------- */
.app-greeting {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.app-greeting span {
  color: var(--accent);
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 3px;
}

/* Anel de atividade */
.app-ring-row { display: flex; align-items: center; gap: 14px; margin: 4px 0; }

.app-ring {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}
.app-ring svg { width: 68px; height: 68px; transform: rotate(-90deg); }
.app-ring-track {
  fill: none;
  stroke: rgba(48,209,88,.15);
  stroke-width: 7;
}
.app-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 170;
  stroke-dashoffset: 42;
  transition: stroke-dashoffset 1s var(--ease-out);
}
.app-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.app-ring-pct { font-size: 14px; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; }
.app-ring-lbl { font-size: 8px; color: #888; font-weight: 500; letter-spacing: .02em; }

.app-ring-stats { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.app-stat-row   { display: flex; align-items: center; gap: 7px; }
.app-stat-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.app-stat-info  { display: flex; flex-direction: column; }
.app-stat-val   { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.1; }
.app-stat-key   { font-size: 9px; color: #666; font-weight: 500; letter-spacing: .02em; }

/* Card genérico */
.app-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 10px 12px;
}
.app-card-label {
  font-size: 9px;
  color: #888;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.app-card-title { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: -.02em; margin-bottom: 2px; }
.app-card-sub   { font-size: 10px; color: #666; }

/* Mini gráfico de barras */
.app-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 36px;
  padding-top: 4px;
}
.app-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: rgba(48,209,88,.25);
  transition: height .6s var(--ease-out);
}
.app-bar.active-bar { background: var(--accent); }
.app-bar-days { display: flex; gap: 5px; margin-top: 3px; }
.app-bar-day  { flex: 1; text-align: center; font-size: 7.5px; color: #555; font-weight: 500; }

/* ---------- TREINOS ---------- */
.app-section-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.04em;
  margin-bottom: 8px;
}

.app-workout-today {
  background: linear-gradient(135deg, rgba(48,209,88,.18), rgba(48,209,88,.06));
  border: 1px solid rgba(48,209,88,.25);
  border-radius: 14px;
  padding: 12px;
}
.app-workout-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--accent);
  color: #000;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.app-workout-name { font-size: 14px; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 2px; }
.app-workout-meta { font-size: 10px; color: rgba(48,209,88,.8); font-weight: 500; }

.app-exercise-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.app-exercise {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
}
.app-ex-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}
.app-ex-check.done { background: var(--accent); color: #000; font-weight: 800; }
.app-ex-check.todo { background: rgba(255,255,255,.08); color: transparent; }
.app-ex-name       { font-size: 11px; color: #ddd; font-weight: 500; flex: 1; }
.app-ex-sets       { font-size: 10px; color: #555; font-weight: 500; }

/* ---------- DIETA ---------- */
.app-cal-row { display: flex; align-items: center; gap: 14px; margin: 4px 0; }

.app-cal-ring { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.app-cal-ring svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.app-cal-track {
  fill: none;
  stroke: rgba(255,149,0,.12);
  stroke-width: 7;
}
.app-cal-fill {
  fill: none;
  stroke: #ff9500;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 180;
  stroke-dashoffset: 49;
}
.app-cal-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.app-cal-num { font-size: 13px; font-weight: 800; color: #fff; line-height: 1; }
.app-cal-lbl { font-size: 7px; color: #666; font-weight: 500; letter-spacing: .02em; }

.app-macros    { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.app-macro-row { display: flex; align-items: center; gap: 6px; }
.app-macro-label  { font-size: 9px; color: #888; width: 40px; flex-shrink: 0; font-weight: 500; }
.app-macro-bar-bg {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.app-macro-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .8s var(--ease-out);
}
.app-macro-val { font-size: 9px; color: #666; width: 28px; text-align: right; font-weight: 500; }

.app-meals { display: flex; flex-direction: column; gap: 5px; }
.app-meal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.app-meal-name { font-size: 10px; color: #ccc; font-weight: 600; }
.app-meal-cal  { font-size: 10px; color: #888; font-weight: 500; }

.app-water {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(0,122,255,.1);
  border: 1px solid rgba(0,122,255,.2);
}
.app-water-label { font-size: 10px; color: #6eb8ff; font-weight: 600; }
.app-water-val   { font-size: 10px; color: #6eb8ff; font-weight: 700; }

/* ---------- PROGRESSO ---------- */
.app-progress-nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.app-prog-card {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
}
.app-prog-label {
  font-size: 8px;
  color: #666;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.app-prog-val   { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; }
.app-prog-delta { font-size: 9px; font-weight: 600; margin-top: 1px; }
.app-prog-delta.neg { color: #30d158; }
.app-prog-delta.pos { color: #ff6b6b; }

.app-chart-wrap {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 10px;
}
.app-chart-svg { width: 100%; height: 50px; }

/* ---------- PERFIL ---------- */
.app-profile-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 12px;
}
.app-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #30d158, #248a3d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #000;
  margin-bottom: 8px;
}
.app-profile-name  { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.02em; line-height: 1.1; }
.app-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 3px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(48,209,88,.2), rgba(48,209,88,.08));
  border: 1px solid rgba(48,209,88,.25);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .03em;
}

.app-achievements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.app-achieve {
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.app-achieve-icon { font-size: 18px; }
.app-achieve-val  { font-size: 12px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.app-achieve-lbl  { font-size: 8px; color: #666; font-weight: 500; }

.app-settings-list { display: flex; flex-direction: column; gap: 3px; }
.app-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.app-settings-name  { font-size: 10px; color: #ccc; font-weight: 500; }
.app-settings-arrow { font-size: 10px; color: #555; }

/* ---------- Tab Bar ---------- */
.app-tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  padding: 0 8px 8px;
  background: rgba(20,20,20,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  z-index: 10;
}

.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  flex: 1;
  background: none;
  border: none;
  color: #555;
}
.app-tab svg  { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-tab span { font-size: 8px; font-weight: 600; letter-spacing: .01em; }
.app-tab.active { color: var(--accent); }
.app-tab:hover  { color: #aaa; }
