.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.top-grid > .card:last-child,
.container > .card:last-child {
  box-shadow: var(--shadow-xs);
}

#currentCard {
  border-color: rgba(5, 150, 105, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f7fefb 100%);
  box-shadow: var(--shadow-primary);
}

#currentCard h2 {
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 8px;
}

#currentCard .status.current {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.pill {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  margin-right: 6px;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.hero .pill {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.14);
}

.btn {
  border: 0;
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary) 0%, #10b981 100%);
  color: #ffffff;
  min-height: 46px;
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.18);
}

.btn:hover {
  filter: brightness(1.01);
}

.btn.secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.secondary:hover {
  background: #f8fafc;
}

.btn.ghost {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn:disabled {
  background: var(--locked-soft);
  color: var(--locked);
  border: 1px solid var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

#startCurrentWorkoutBtn,
#beginWorkoutBtn,
#detailsStartBtn,
#playPauseBtn {
  background: linear-gradient(135deg, var(--accent) 0%, #fb923c 100%);
  box-shadow: var(--shadow-accent);
}

#completeBtn,
#closeCompletionBtn {
  background: linear-gradient(135deg, var(--primary) 0%, #10b981 100%);
  color: #ffffff;
  border: 0;
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.18);
}

#skipBtn {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-row.full-width .btn {
  width: 100%;
  justify-content: center;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.stat-value {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

.settings-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-card h4 {
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
}

.switch input {
  display: none;
}

.slider {
  width: 48px;
  height: 28px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: var(--transition-fast);
  flex: 0 0 auto;
}

.slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  transition: var(--transition-fast);
  box-shadow: 0 1px 3px rgba(15,23,42,0.18);
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::after {
  transform: translateX(20px);
}

.data-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.data-actions .btn {
  font-size: 13px;
  padding: 10px 14px;
  min-height: 40px;
}

.import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  background: #ffffff;
  color: var(--text);
  transition: var(--transition-fast);
}

.import-label:hover {
  background: #f8fafc;
}

#importFileInput {
  display: none;
}

.compact-select {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
  min-width: 220px;
  box-shadow: var(--shadow-xs);
}

.admin-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
}

.wakelock-badge {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--success);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  border: 1px solid rgba(22, 163, 74, 0.16);
}

.wakelock-badge.active {
  display: inline-flex;
}

.wakelock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.badge {
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.adjustment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft-2);
  color: var(--accent-dark);
  border: 1px solid rgba(249, 115, 22, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.callout {
  border: 1px solid rgba(5, 150, 105, 0.12);
  background: var(--primary-soft-2);
  border-radius: 18px;
  padding: 13px 14px;
  margin-top: 10px;
}

#prestartAdjustment {
  border-color: rgba(249, 115, 22, 0.12);
  background: var(--accent-soft-2);
}

.status {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.status.current {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status.completed {
  background: var(--success-soft);
  color: var(--success);
}

.status.locked {
  background: #f1f5f9;
  color: #64748b;
}

@media (max-width: 960px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat {
    padding: 12px 10px;
  }

  .stat-value {
    font-size: 22px;
  }

  .compact-select {
    width: 100%;
    min-width: 0;
  }

  .settings-card > div:last-child {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .pill {
    font-size: 11px;
    padding: 6px 9px;
  }

  .btn,
  .btn.secondary,
  .btn.ghost {
    width: 100%;
  }

  /* Do not let header action buttons stretch full width on mobile */
  .player-header .btn,
  .player-header .btn.secondary,
  .player-header .btn.ghost {
    width: auto;
  }

  .btn-row {
    width: 100%;
  }

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

  .stats {
    gap: 8px;
  }

  .stat {
    border-radius: 16px;
  }

  .stat-value {
    font-size: 20px;
  }
}
