/* Stylesheet for PulseTrack - Premium Dark Mode Workout Companion */

:root {
  --bg-primary: hsl(224, 32%, 8%);
  --bg-secondary: hsl(224, 25%, 14%);
  --bg-card: hsla(224, 25%, 16%, 0.7);
  --border-glass: rgba(255, 255, 255, 0.06);
  --shadow-premium: 0 12px 40px -10px rgba(0, 0, 0, 0.5);
  
  /* Vibrant Theme Accents */
  --accent-primary: hsl(150, 84%, 53%); /* Emerald Athletic Green */
  --accent-secondary: hsl(210, 100%, 50%); /* Electric Blue */
  --accent-warning: hsl(36, 100%, 55%); /* Warm Orange */
  --accent-danger: hsl(354, 85%, 60%); /* Coral Red */
  
  /* Text colors */
  --text-primary: hsl(210, 20%, 98%);
  --text-secondary: hsl(218, 16%, 70%);
  --text-muted: hsl(218, 12%, 48%);
  
  /* Spacing & Borders */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 70px;
  --nav-height: 80px;
}

/* Reset and Core Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden; /* Lock scroll to app-viewport */
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  line-height: normal;
}

/* Typography Utilities */
h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.5px; }
h2 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.3px; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.9rem; font-weight: 500; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; }

/* SVG Icon Base Styling */
.icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

/* App Header - Sticky Top Glass */
.app-header {
  height: var(--header-height);
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  position: relative;
  z-index: 100;
  padding-top: env(safe-area-inset-top); /* Notch support on Pixel 10 */
}

.header-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.logo-accent {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Sync Button States */
.sync-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 40px;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sync-btn .sync-text { display: none; }

.sync-btn.synced {
  color: var(--accent-primary);
  border-color: rgba(80, 250, 123, 0.2);
  background: rgba(80, 250, 123, 0.05);
}

.sync-btn.pending {
  color: var(--accent-warning);
  border-color: rgba(255, 184, 108, 0.2);
  background: rgba(255, 184, 108, 0.05);
}

.sync-btn.offline {
  color: var(--text-muted);
  border-color: var(--border-glass);
}

.sync-icon {
  width: 14px;
  height: 14px;
  transition: transform 1s linear;
}

.sync-btn.syncing .sync-icon {
  animation: spin 1s infinite linear;
}

/* Main Viewport for Screens */
.app-viewport {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.2rem;
  padding-bottom: calc(var(--nav-height) + 1.2rem + env(safe-area-inset-bottom));
}

/* Screen Management */
.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  overflow-y: auto;
}

.app-screen.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Card Styling - Glassmorphism */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-premium);
  margin-bottom: 1.2rem;
}

/* Dashboard Hero Header */
.dashboard-hero {
  margin-bottom: 1.5rem;
}

.sub-greeting {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--accent-secondary);
  letter-spacing: 0.8px;
}

.greeting-title {
  margin-top: 0.2rem;
  font-size: 2.1rem;
}

/* Last Workout Card */
.last-workout-card {
  margin-top: 1.2rem;
  background: linear-gradient(135deg, hsla(224, 25%, 16%, 0.7), hsla(224, 30%, 10%, 0.9));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.last-workout-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.card-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}

.last-workout-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.last-workout-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Button & Card Action Grid */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-shadow: var(--shadow-premium);
}

.action-card:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.03);
}

.action-card.primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.08));
  border-color: rgba(16, 185, 129, 0.25);
}

.action-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
}

.action-card.primary .action-card-icon {
  background: var(--accent-primary);
  color: hsl(224, 32%, 8%);
}

.action-card-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.action-card-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Routines & Lists */
.section-title {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.routine-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.routine-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.routine-item:active {
  background: rgba(255, 255, 255, 0.02);
}

.routine-info h4 {
  font-size: 0.95rem;
  text-transform: none;
  color: var(--text-primary);
  letter-spacing: 0;
  font-weight: 600;
}

.routine-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.routine-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

/* Active Workout Views */
.active-workout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.active-workout-meta h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.workout-timer {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-secondary);
  font-variant-numeric: tabular-nums;
  margin-top: 0.2rem;
  text-shadow: 0 0 15px rgba(0, 122, 255, 0.35);
}

/* Round Progress */
.round-tracker {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.header-action-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.round-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.round-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.round-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.round-adjust-buttons {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-round-adjust {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-round-adjust:active {
  background: rgba(255, 255, 255, 0.1);
}

.btn-round-adjust:first-child {
  border-right: 1px solid var(--border-glass);
}

.round-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.round-indicator-dots {
  display: flex;
  gap: 0.4rem;
}

.round-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
}

.round-dot.completed {
  background: var(--accent-primary);
}

.round-dot.active {
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary);
}

/* Active Exercise Logging Card */
.active-exercise-card {
  text-align: center;
}

.exercise-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 1px;
}

.exercise-title {
  font-size: 1.6rem;
  margin-top: 0.2rem;
  font-weight: 700;
}

.weight-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 40px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--accent-secondary);
}

.reps-logger-block {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reps-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.reps-control-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.btn-reps {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-reps:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.92);
}

.reps-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reps-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.reps-target-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Roadmap/Grid for Exercises */
.circuit-progress-list h4 {
  margin-bottom: 0.6rem;
}

.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

/* Custom scrollbar for scrollable lists */
.roadmap-list::-webkit-scrollbar,
.builder-exercises-list::-webkit-scrollbar {
  width: 4px;
}
.roadmap-list::-webkit-scrollbar-track,
.builder-exercises-list::-webkit-scrollbar-track {
  background: transparent;
}
.roadmap-list::-webkit-scrollbar-thumb,
.builder-exercises-list::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 2px;
}

.roadmap-item {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  border-left: 3px solid transparent;
}

.roadmap-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--accent-secondary);
}

.roadmap-item.completed {
  border-left-color: var(--accent-primary);
}

.roadmap-check {
  color: var(--text-muted);
}

.roadmap-item.completed .roadmap-check {
  color: var(--accent-primary);
}

/* Cooldown forms */
.cooldown-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.cooldown-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.form-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

input[type="number"], input[type="text"], textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  width: 100%;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(0, 0, 0, 0.35) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat right 0.75rem center;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.3rem 2.2rem 0.45rem 0.75rem !important;
  color: var(--text-primary);
  width: 100%;
  font-size: 0.9rem;
  font-family: inherit;
  height: 38px;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

select option {
  background-color: #161b26;
  color: #f1f5f9;
  padding: 8px 12px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.15);
}

textarea {
  resize: none;
}

/* Custom Rounds Picker */
.rounds-counter-row {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 42px;
}

.rounds-counter-row input {
  border: none;
  background: transparent;
  text-align: center;
  padding: 0;
  height: 42px;
  line-height: 42px;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-counter {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  width: 44px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-counter:active {
  background: rgba(255, 255, 255, 0.12);
}

/* General Buttons */
.btn {
  border-radius: var(--radius-md);
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), hsl(150, 75%, 43%));
  color: hsl(224, 32%, 8%);
  box-shadow: 0 4px 15px rgba(80, 250, 123, 0.2);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.btn-outline:active {
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.cooldown-actions, .builder-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Footer Active Buttons Layout */
.active-footer {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* Equipment Inventory Items Grid */
.inventory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.8rem;
}

.inventory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.inventory-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-card.kettlebell .inventory-icon-wrap {
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-secondary);
}

.inventory-card.dumbbell .inventory-icon-wrap {
  background: rgba(80, 250, 123, 0.1);
  color: var(--accent-primary);
}

.inventory-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 5px;
  transition: var(--transition-smooth);
}

.inventory-delete-btn:hover {
  color: var(--accent-danger);
  background: rgba(255, 100, 100, 0.1);
}

.inventory-card-weight {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 0.8rem;
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.weight-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.inventory-card-qty {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
}

/* Builder Toolbar & Metadata Compact Header */
.builder-meta-toolbar {
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.builder-meta-toolbar .meta-field {
  display: flex;
  flex-direction: column;
}

.builder-meta-toolbar .meta-field label {
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.builder-meta-toolbar .meta-field-name {
  flex: 2;
  min-width: 180px;
}

.builder-meta-toolbar .meta-field-rounds {
  flex: 0 0 auto;
}

.builder-meta-toolbar .meta-field-rest {
  flex: 0 0 110px;
}

.builder-meta-toolbar input[type="text"],
.builder-meta-toolbar input[type="number"] {
  padding: 0.65rem 0.75rem;
}

/* Header Left & Toggle Button */
.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-toggle-add {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* Builder Exercises */
.builder-exercises-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
  min-height: 50px;
  max-height: 520px;
  max-height: calc(100vh - 340px);
  overflow-y: auto;
  padding-right: 0.3rem;
}

.builder-exercise-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: border-color var(--transition-smooth), background var(--transition-smooth);
}

.builder-exercise-item.dragging {
  opacity: 0.4;
  border-style: dashed;
  border-color: var(--accent-primary);
}

.builder-exercise-item.drag-over {
  border-top: 2px solid var(--accent-primary) !important;
  background: rgba(80, 250, 123, 0.04);
}

.drag-handle {
  cursor: grab;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.drag-handle:hover {
  color: var(--text-primary);
}

.reorder-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arrow-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  padding: 2px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}

.arrow-btn:hover:not(:disabled) {
  color: var(--accent-primary);
}

.arrow-btn:disabled {
  opacity: 0.15;
  cursor: not-allowed;
}

.builder-ex-info {
  flex-grow: 1;
}

.builder-ex-info h4 {
  text-transform: none;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: 0;
}

.builder-ex-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exercise-count {
  font-size: 0.8rem;
  color: var(--accent-secondary);
  font-weight: 600;
}

/* Add Exercise Single Row Form */
.add-exercise-card {
  padding: 0.8rem 1rem;
  margin-top: 0.8rem;
  margin-bottom: 1rem;
  transition: all var(--transition-smooth);
}

.add-exercise-inline-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.add-exercise-inline-form .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.add-exercise-inline-form label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}

.add-exercise-inline-form select {
  height: 38px;
  padding: 0.3rem 2.2rem 0.45rem 0.75rem !important;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.add-exercise-inline-form input {
  height: 38px;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.flex-exercise-name {
  flex: 2;
  min-width: 210px;
}

.flex-weight {
  flex: 1.8;
  min-width: 175px;
}

.flex-reps {
  flex: 0 0 85px;
}

.flex-action {
  flex: 0 0 auto;
}

.flex-action button {
  height: 42px;
  padding: 0 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.invisible-label {
  visibility: hidden;
  user-select: none;
}

/* Tab Bar Navigation at Bottom */
.app-nav-bar {
  height: var(--nav-height);
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom); /* Pixel 10 Gesture Bar cushion */
}

.nav-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  height: 100%;
  transition: var(--transition-smooth);
}

.nav-tab .icon {
  width: 22px;
  height: 22px;
}

.nav-tab.active {
  color: var(--accent-primary);
}

.nav-tab.active .icon {
  stroke: var(--accent-primary);
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 2rem 1.2rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* History logs list view */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.8rem;
}

.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.history-card-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
}

.history-card-title h4 {
  text-transform: none;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: 0;
  font-weight: 700;
}

.history-card-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.history-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.history-card-badge.cooldown {
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-secondary);
}

.history-card-body {
  border-top: 1px solid var(--border-glass);
  padding: 1rem;
  background: rgba(0, 0, 0, 0.1);
  display: none;
}

.history-card.expanded .history-card-body {
  display: block;
}

.history-exercise-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}

.history-exercise-row:last-child {
  border-bottom: none;
}

.history-ex-name {
  font-weight: 500;
}

.history-ex-reps {
  color: var(--text-secondary);
}

.history-bike-details {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-glass);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.history-notes {
  margin-top: 0.6rem;
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  border-radius: 4px;
}

/* Summary stats grid */
.stats-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  text-align: center;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.15rem;
  font-weight: 600;
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  bottom: calc(var(--nav-height) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 13, 22, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  padding: 0.6rem 1.2rem;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.toast-notification.hidden {
  opacity: 0;
  transform: translate(-50%, 10px);
}

/* Helper utilities */
.hidden { display: none !important; }

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Pulse animation for active timer */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.95; }
  100% { transform: scale(1); opacity: 1; }
}

/* Inline Quantity Adjusters */
.qty-adjuster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.qty-btn:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.9);
}

.qty-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Mobile Screen optimization for Google Pixel 10 aspect ratio */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  .app-viewport {
    padding: 0.9rem;
  }
  .app-screen {
    padding: 0.9rem;
  }
  .card {
    padding: 1rem;
  }
}

/* Quick Start Component & Pre-Start Preview Styles */
.quickstart-container {
  margin-bottom: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-premium);
}

.quickstart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.primary-tag {
  background: rgba(80, 250, 123, 0.15);
  color: var(--accent-primary);
}

.default-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.default-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.default-toggle-btn.active {
  background: rgba(255, 184, 108, 0.18);
  border-color: var(--accent-warning);
  color: var(--accent-warning);
}

.quickstart-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.quickstart-select:focus {
  border-color: var(--accent-primary);
}

.quickstart-preview-card {
  background: rgba(9, 13, 22, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.preview-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border-glass);
  padding-bottom: 0.5rem;
}

.preview-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.preview-rounds-tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

.preview-exercise-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preview-ex-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.preview-ex-name {
  font-weight: 600;
  color: var(--text-primary);
}

.preview-ex-meta {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.default-badge {
  background: rgba(255, 184, 108, 0.2);
  color: var(--accent-warning);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Round Circuit Card (Active Round Mode) */
.round-circuit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-premium);
}

.round-circuit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-glass);
}

.round-circuit-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.round-circuit-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.round-circuit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition-smooth);
}

.round-circuit-item.done {
  border-color: rgba(80, 250, 123, 0.3);
  background: rgba(80, 250, 123, 0.04);
}

.round-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.round-ex-info {
  flex: 1;
}

.round-ex-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.round-ex-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* End-of-Round Batch Rep & Equipment Logger */
.batch-log-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-premium);
}

.batch-log-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.batch-log-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.batch-log-item {
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.55rem;
}

.batch-item-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.batch-item-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 1;
}

.batch-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.equipment-badge-btn {
  background: rgba(80, 250, 123, 0.12);
  border: 1px solid rgba(80, 250, 123, 0.3);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: var(--transition-smooth);
}

.equipment-badge-btn:hover {
  background: rgba(80, 250, 123, 0.22);
  border-color: var(--accent-primary);
}

/* Compact Single-Line Rep Adjuster {reps} / {target} */
.batch-reps-adjuster-compact {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.2rem 0.4rem;
  flex-shrink: 0;
}

.batch-rep-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.batch-rep-btn-sm:active {
  background: rgba(80, 250, 123, 0.2);
  transform: scale(0.92);
}

.batch-rep-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-primary);
  min-width: 54px;
  text-align: center;
}


.batch-eq-dropdown-container {
  background: rgba(9, 13, 22, 0.8);
  border: 1px dashed rgba(80, 250, 123, 0.3);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  margin-top: 0.6rem;
  animation: fadeIn 0.2s ease-in-out;
}

  min-width: 28px;
  text-align: center;
  color: var(--accent-primary);
}

.inline-eq-select {
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  width: 100%;
}

/* Post-Round Rest Timer Card */
.rest-timer-card {
  background: var(--bg-card);
  border: 1px solid rgba(80, 250, 123, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.2rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(80, 250, 123, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rest-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.rest-time-display {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--accent-primary);
  line-height: 1;
  margin: 0.6rem 0 1.2rem 0;
  letter-spacing: -1px;
}

.rest-controls-row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  max-width: 320px;
}

.btn-rest-adjust {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-rest-adjust:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-delete-workout {
  border-color: rgba(255, 71, 87, 0.3);
  color: var(--accent-danger);
  background: rgba(255, 71, 87, 0.05);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  transition: var(--transition-smooth);
}

.btn-delete-workout:hover {
  background: rgba(255, 71, 87, 0.18);
  border-color: var(--accent-danger);
  color: #ff6b81;
}



