/* Daily Workout App — custom styles */

* { -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100vh; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #12121a; }
::-webkit-scrollbar-thumb { background: #3a3a48; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #f97316; }

.card {
  background: linear-gradient(160deg, #16161f 0%, #12121a 100%);
  border: 1px solid #24242f;
  border-radius: 1rem;
}

.card-glow {
  box-shadow: 0 0 0 1px rgba(249,115,22,0.15), 0 8px 24px -8px rgba(249,115,22,0.25);
}

.day-pill {
  transition: all .18s ease;
}
.day-pill:active { transform: scale(0.96); }

.set-row {
  transition: background-color .15s ease, border-color .15s ease;
}
.set-row.done {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.35);
}

.checkbox-btn {
  width: 2.25rem; height: 2.25rem; border-radius: 0.6rem;
  border: 2px solid #3a3a48;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease; cursor: pointer; flex-shrink: 0;
}
.checkbox-btn.checked {
  background: #f97316; border-color: #f97316; color: #0b0b0f;
}

input[type=number] {
  background: #1a1a24; border: 1px solid #2c2c38; border-radius: 0.5rem;
  color: #fff; text-align: center; font-weight: 600;
  -moz-appearance: textfield;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.progress-bar-bg { background: #1e1e28; border-radius: 999px; overflow: hidden; }
.progress-bar-fill {
  background: linear-gradient(90deg, #f97316, #fb923c);
  height: 100%; border-radius: 999px; transition: width .3s ease;
}

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.pulse-ring {
  animation: pulseRing 1.6s ease-out infinite;
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(249,115,22,0.5); }
  100% { box-shadow: 0 0 0 12px rgba(249,115,22,0); }
}

.tab-btn.active {
  color: #fff;
  border-bottom: 2px solid #f97316;
}

.bottom-nav {
  backdrop-filter: blur(12px);
  background: rgba(11,11,15,0.9);
}

.confetti-emoji {
  position: fixed; top: -40px; font-size: 1.5rem; pointer-events: none;
  animation: fall linear forwards;
  z-index: 60;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.2; }
}

.rest-timer-ring {
  transition: stroke-dashoffset 1s linear;
}

/* ---------------- PersonalGO-inspired patterns ---------------- */

/* Top bar */
.top-bar {
  backdrop-filter: blur(12px);
  background: rgba(11,11,15,0.85);
}

/* Side drawer */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer-panel {
  position: fixed; top: 0; left: 0; height: 100%; width: 84%; max-width: 320px;
  background: linear-gradient(180deg, #14141c 0%, #0b0b0f 100%);
  border-right: 1px solid #24242f;
  z-index: 201;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.drawer-panel.open { transform: translateX(0); }

.drawer-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  color: #d1d5db; font-weight: 500; font-size: 0.9rem;
  transition: background-color .15s ease;
}
.drawer-item:active, .drawer-item:hover { background: rgba(249,115,22,0.08); }
.drawer-item i.drawer-icon { width: 1.25rem; text-align: center; color: #9ca3af; }
.drawer-divider { height: 1px; background: #24242f; margin: 0.5rem 0; }

/* Badges */
.badge-ia {
  display: inline-flex; align-items: center; font-size: 9px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(168,85,247,0.18); color: #c084fc; letter-spacing: 0.03em;
}
.badge-new {
  display: inline-flex; align-items: center; font-size: 9px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(34,197,94,0.18); color: #4ade80; letter-spacing: 0.03em;
}

/* Quick action grid cards (home) */
.action-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1rem 0.5rem; border-radius: 1rem; text-align: center;
  background: linear-gradient(160deg, #16161f 0%, #12121a 100%);
  border: 1px solid #24242f; position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.action-card:active { transform: scale(0.96); }
.action-card .action-icon {
  width: 2.6rem; height: 2.6rem; border-radius: 0.85rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

/* Onboarding checklist widget */
.onboarding-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0;
  border-bottom: 1px solid #24242f;
}
.onboarding-item:last-child { border-bottom: none; }
.onboarding-check {
  width: 1.5rem; height: 1.5rem; border-radius: 999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 0.65rem;
  border: 2px solid #3a3a48; color: transparent;
}
.onboarding-check.done { background: #22c55e; border-color: #22c55e; color: #0b0b0f; }

/* Segmented tabs (Séries/Comentários, Progresso/Detalhes/Músculos/Equipamentos) */
.seg-tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid #24242f; margin-bottom: 1rem; overflow-x: auto; }
.seg-tab {
  padding: 0.6rem 0.1rem; font-size: 0.85rem; font-weight: 600; color: #6b7280;
  border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer;
}
.seg-tab.active { color: #f97316; border-bottom-color: #f97316; }

/* Set row: achieved / target dual value (PersonalGO style) */
.set-row-v2 {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.5rem;
  border-bottom: 1px solid #1e1e28;
}
.set-row-v2:last-child { border-bottom: none; }
.set-badge {
  width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; flex-shrink: 0;
  background: #1a1a24; border: 1px solid #2c2c38;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #9ca3af;
}
.set-value-col { flex: 1; text-align: center; }
.set-value-achieved { font-weight: 700; font-size: 0.95rem; }
.set-value-achieved.filled { color: #22c55e; }
.set-value-achieved.empty { color: #6b7280; }
.set-value-target { font-size: 0.7rem; color: #6b7280; }
.set-check-circle {
  width: 1.9rem; height: 1.9rem; border-radius: 999px; flex-shrink: 0;
  border: 2px solid #3a3a48; display: flex; align-items: center; justify-content: center;
  transition: all .15s ease; cursor: pointer; color: transparent;
}
.set-check-circle.checked { background: #22c55e; border-color: #22c55e; color: #0b0b0f; }

/* Exercise library detail: media carousel dots */
.carousel-dots { display: flex; gap: 4px; justify-content: center; margin-top: 0.5rem; }
.carousel-dot { width: 5px; height: 5px; border-radius: 999px; background: #3a3a48; }
.carousel-dot.active { background: #f97316; width: 14px; border-radius: 999px; }

/* Promo banner */
.promo-banner {
  background: linear-gradient(135deg, rgba(249,115,22,0.16), rgba(234,88,12,0.06));
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 1rem;
}

.drawer-slide-avatar {
  width: 4.5rem; height: 4.5rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#f97316,#ea580c); color: #fff; font-weight: 800; font-size: 1.5rem;
}
