/* FitPro — 快捷入口子页面（上次训练 / 补水） */

.stack-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 4px 4px 0;
}

.stack-back {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.stack-back:active {
  transform: scale(0.95);
}

.stack-top h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.detail-hero {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.detail-hero-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--brand-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-hero-icon .sport-icon-img {
  width: 32px;
  height: 32px;
}

.detail-hero h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.detail-hero p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.detail-stat {
  padding: 12px 8px;
  border-radius: 14px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.detail-stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
}

.detail-stat span {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.exercise-log-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-hint {
  margin: -8px 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.exercise-log-list li {
  border-radius: 14px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.exercise-log-list li.is-open {
  border-color: rgba(217, 255, 0, 0.25);
}

.exercise-log-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.exercise-log-list .ex-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.exercise-log-list .ex-icon .sport-icon-img {
  width: 20px;
  height: 20px;
}

.exercise-log-list .ex-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.exercise-log-list .ex-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.exercise-log-list .ex-chevron {
  margin-left: 4px;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.exercise-log-list li.is-open .ex-chevron {
  transform: rotate(180deg);
  color: var(--brand);
}

.exercise-sets {
  margin: 0;
  padding: 0 14px 12px 62px;
  list-style: none;
}

.exercise-sets li {
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  border-radius: 0;
}

.exercise-sets li + li {
  border-top: 1px solid var(--border-subtle);
}

.hydration-log .log-amount {
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-family-base);
  cursor: pointer;
}

.hydration-log .log-amount:active {
  opacity: 0.7;
}

.page-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-cta);
  background: var(--brand);
  color: var(--text-on-primary);
  font-family: var(--font-family-base);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

.btn-ghost-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-cta);
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.btn-ghost-block:active {
  transform: scale(0.98);
}

/* 补水页 */
.hydration-card {
  margin-bottom: 16px;
  padding: 24px 20px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.hydration-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
}

.hydration-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.hydration-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}

.hydration-ring-fill {
  fill: none;
  stroke: var(--brand);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

.hydration-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hydration-ring-text strong {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
}

.hydration-ring-text span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.hydration-goal-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.hydration-goal-hint strong {
  color: #f0f0f0;
}

.quick-add-panel {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.quick-add-panel h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.quick-add-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  padding: 14px 6px;
  border-radius: 16px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-family-base);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.quick-add-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-muted);
  border: 1px solid rgba(217, 255, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-add-icon i {
  font-size: 18px;
  color: var(--brand);
}

.quick-add-label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  line-height: 1;
  white-space: nowrap;
}

.quick-add-label strong {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.quick-add-label small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.quick-add-btn:active {
  transform: scale(0.97);
  background: rgba(217, 255, 0, 0.08);
  border-color: rgba(217, 255, 0, 0.28);
  box-shadow: 0 0 0 1px rgba(217, 255, 0, 0.12);
}

.hydration-goal-hint #hydration-goal-status.is-complete {
  color: var(--brand);
}

.hydration-goal-hint #hydration-goal-status.is-complete strong {
  color: var(--brand);
}

.hydration-log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hydration-log li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.hydration-log li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hydration-log .log-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hydration-log .log-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 13px;
}

.hydration-log .log-label {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.hydration-log .log-time {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.hydration-log .log-amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
}

.hydration-log-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.hydration-custom-btn {
  width: 100%;
  margin-top: 12px;
}

.page-toast {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 50;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid var(--border-default);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.page-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: flex-end;
  overflow: hidden;
  border-radius: inherit;
}

.sheet-overlay.is-open {
  display: flex;
}

.sheet-backdrop {
  position: absolute;
  inset: -4px;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px 20px 28px;
  border-radius: 20px 20px 0 0;
  background: var(--surface-card);
  border: none;
  border-top: 1px solid var(--border-default);
  box-sizing: border-box;
  animation: sheet-up 0.28s ease;
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.sheet-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.custom-amount-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.custom-amount-row input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-section);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 18px;
  font-weight: 700;
  outline: none;
}

.custom-amount-row input:focus {
  border-color: rgba(217, 255, 0, 0.4);
}

.custom-amount-row span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
