:root {
  /* Base colors */
  --bg-primary: #1a1a2e;
  --bg-card: #252540;
  --accent: #5a5aff;
  --accent-success: #2d5a3d;
  --accent-warning: #8b6914;
  --accent-danger: #5a2d2d;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #666666;

  /* Card variants */
  --card-highlight: linear-gradient(135deg, #252540 0%, #2a2a50 100%);
  --card-achievement: linear-gradient(135deg, #1a2e1a 0%, #2d5a3d 50%, #252540 100%);

  /* Typography */
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', monospace;

  /* Shared table colors - RPE/intensity scale */
  --table-color-rpe6: #2c4177; /* Blue - low intensity */
  --table-color-rpe7: #374b78; /* Light blue */
  --table-color-rpe8: #1f5154; /* Green - target */
  --table-color-rpe9: #634930; /* Orange - high */
  --table-color-rpe10: #622e41; /* Red - max */

  /* Category header */
  --table-category-bg: #252545;
  --table-category-border: rgba(90, 90, 255, 0.3);

  /* Week color coding (Program Editor) */
  --week-1-color: #4a9fff;
  --week-2-color: #5dd39e;
  --week-3-color: #ffb347;

  /* Spacing */
  --field-min-width: 80px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  background: #1a1a2e;
  color: #eee;
  padding: 16px;
  max-width: 500px;
  margin: 0 auto;
}
h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #80d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 16px 0 8px;
  color: #a0a0ff;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(160, 160, 255, 0.2);
}
.section-icon {
  margin-right: 6px;
}
/* Collapsible sections */
.collapsible-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
  transition: all 0.2s ease;
  border-radius: 6px;
  margin: -4px -6px;
  padding: 4px 6px;
}
.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.collapsible-header:active {
  transform: scale(0.99);
}
.collapse-toggle {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #888;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.collapsible-header:hover .collapse-toggle {
  color: #aaa;
  background: rgba(255, 255, 255, 0.05);
}
.collapsible-content {
  overflow: hidden;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.25s ease;
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
}
.collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transform: translateY(-8px);
}
.collapsible-header .collapse-toggle.rotated {
  transform: rotate(-90deg);
}
h3 {
  font-size: 1rem;
  margin: 12px 0 6px;
  color: #80d4ff;
}
.subtitle {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
/* Empty states */
.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: #666;
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state-text {
  font-size: 0.9rem;
  color: #888;
}
.card {
  background: #252540;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.card.card-highlight {
  background: var(--card-highlight);
  border: 1px solid rgba(90, 90, 255, 0.2);
}
.card.card-achievement {
  background: var(--card-achievement);
  border: 1px solid rgba(45, 90, 61, 0.3);
}
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.session-badge {
  background: #4a4a8a;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.rpe-badge {
  background: #2d5a3d;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.exercise {
  background: #1e1e35;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.exercise-name {
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.exercise-name-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.exercise-prescription {
  color: #aaa;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.suggestion {
  color: #80d4ff;
  font-size: 0.85rem;
  margin-bottom: 8px;
  font-style: italic;
}
.sets-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.set-input {
  width: 70px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2a2a4a;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}
.set-input:focus {
  border-color: #80d4ff;
  outline: none;
}
.set-input.completed {
  background: #2d5a3d;
  border-color: #4a8a5a;
}
.set-input.prefilled {
  background: #3a3a5a;
  border-style: dashed;
  color: #aaa;
  cursor: pointer;
  position: relative;
}
.set-input.prefilled:hover {
  background: #4a4a6a;
  border-color: #80d4ff;
}
.set-input.prefilled::placeholder {
  color: #666;
}
.set-input.bodyweight {
  border-color: #6a6a8a;
}
.set-input.bodyweight::placeholder {
  color: #888;
  font-style: italic;
}
.set-input.assisted {
  border-color: #7a6a9a;
}
.set-input.assisted::placeholder {
  color: #a080c0;
}
.rpe-slider {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}
.rpe-segment {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.rpe-segment:first-child {
  border-radius: 4px 0 0 4px;
}
.rpe-segment:last-child {
  border-radius: 0 4px 4px 0;
}
.rpe-segment.half {
  flex: 0.6;
}
button {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.btn-primary {
  background: #5a5aff;
  color: #fff;
  width: 100%;
  margin-top: 16px;
}
.btn-primary:hover {
  background: #7070ff;
}
.btn-primary.is-disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary.saved,
.btn-secondary.saved {
  background: var(--accent-success);
  pointer-events: none;
}
.btn-primary.saved::after,
.btn-secondary.saved::after {
  content: ' ✓';
}
@keyframes btn-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.btn-saving {
  animation: btn-pulse 0.3s ease;
}
.btn-secondary {
  background: #4a4a6a;
  color: #fff;
  margin-right: 8px;
}
.btn-secondary:hover {
  background: #5a5a8a;
}
.btn-danger {
  background: #5a2d2d;
  color: #fff;
  border: 1px solid #7a3d3d;
}
.btn-danger:hover {
  background: #7a3d3d;
  border-color: #9a4d4d;
}
/* Danger Zone styling */
.danger-zone {
  margin-top: 20px;
  padding: 16px;
  background: rgba(90, 45, 45, 0.15);
  border: 1px solid rgba(122, 61, 61, 0.4);
  border-radius: 8px;
}
.danger-zone h4 {
  color: #ff6b6b;
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.danger-zone p {
  color: #888;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

/* Cycle Management Progress */
.cycle-info {
  background: #1e1e35;
  border-radius: 10px;
  padding: 14px;
}
.cycle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cycle-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cycle-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}
.cycle-status {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-restart-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #3a3a5a;
  background: #2a2a4a;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-restart-icon:hover {
  background: #3a3a5a;
  color: #fff;
  border-color: #5a5aff;
  transform: rotate(180deg);
}
.cycle-status.active {
  background: rgba(90, 90, 255, 0.2);
  color: #5a5aff;
}
.cycle-status.completed {
  background: rgba(45, 90, 61, 0.3);
  color: #4ade80;
}
.cycle-status.abandoned {
  background: rgba(90, 45, 45, 0.3);
  color: #888;
}
.cycle-meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 12px;
}
.cycle-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cycle-progress-bar {
  flex: 1;
  height: 8px;
  background: #2a2a4a;
  border-radius: 4px;
  overflow: hidden;
}
.cycle-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5a5aff 0%, #80d4ff 100%);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.cycle-progress-text {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}

/* Next Cycle Program Selector in Settings */
.next-cycle-program-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a2a4a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.next-cycle-label {
  font-size: 0.85rem;
  color: #888;
}
.next-cycle-program-row select {
  flex: 1;
  max-width: 200px;
}

/* Data Management Storage Summary */
.storage-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #1e1e35;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #888;
}
.storage-icon {
  font-size: 1rem;
}
.storage-details {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.storage-stat {
  color: #aaa;
}
.storage-stat strong {
  color: #fff;
  font-weight: 500;
}

/* Celebration animation */
.celebration-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.celebration-particle {
  position: absolute;
  top: -50px;
  animation: confetti-fall 2s ease-out forwards;
}
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(0);
    opacity: 1;
  }
  10% {
    transform: translateY(10vh) rotate(45deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.5);
    opacity: 0;
  }
}
.nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.nav button {
  flex: 1;
  min-width: 80px;
}
.nav button.active {
  background: #5a5aff;
}
.progress-bar {
  height: 10px;
  background: #252540;
  border-radius: 5px;
  margin: 8px 0;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5a5aff, #80d4ff);
  transition: width 0.3s;
  box-shadow: 0 0 8px rgba(128, 212, 255, 0.4);
  border-radius: 5px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stats.stats-two-col {
  grid-template-columns: repeat(2, 1fr);
}
.stat {
  background: #252540;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #80d4ff;
}
.stat-label {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}
.history-item {
  background: #1e1e35;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-date {
  color: #888;
  font-size: 0.8rem;
}
.history-weight {
  color: #80d4ff;
  font-weight: 600;
}
/* Personal Records styling */
.pr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 8px;
}
.pr-icon {
  font-size: 1.5rem;
}
.pr-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pr-info strong {
  color: #fff;
}
.pr-date {
  font-size: 0.75rem;
  color: #888;
}
.pr-weight {
  font-size: 1.2rem;
  font-weight: 700;
  color: #80d4ff;
}
.pr-delta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #34d399;
  margin-left: 6px;
}
.alert {
  background: #5a3d2d;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.tip {
  background: #2d4a5a;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}
.hidden {
  display: none;
}
.notes-input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2a2a4a;
  color: #fff;
  font-size: 0.9rem;
  margin-top: 8px;
  resize: vertical;
}
.checkbox-group {
  position: relative;
  padding: 6px 8px;
  margin: 0 -8px 8px;
  border-radius: 8px;
  transition: background 0.3s ease;
}
.checkbox-group:last-of-type {
  margin-bottom: 0;
}
.checkbox-group.checkbox-saved {
  background: rgba(45, 90, 61, 0.15);
}
.checkbox-group.checkbox-saved::after {
  content: 'Saved';
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 0.7rem;
  color: var(--accent-success);
  opacity: 0;
  animation: fade-in-out 1s ease;
}
@keyframes fade-in-out {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.checkbox-helper {
  font-size: 0.8rem;
  color: #666;
  margin: 4px 0 0 26px;
  line-height: 1.4;
}

/* Username copy button */
.username-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-copy {
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}
.btn-copy:hover {
  background: #333;
  border-color: #666;
}
.btn-copy:active {
  transform: scale(0.95);
}
.btn-copy .copy-icon {
  font-size: 0.85rem;
}
.btn-copy.copied {
  border-color: var(--accent-success);
  background: rgba(45, 90, 61, 0.2);
}

/* Data Management styles */
.data-buttons-row {
  display: flex;
  gap: 8px;
}
.data-buttons-row .btn-data {
  flex: 1;
  justify-content: center;
}
.btn-data {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #2a2a4a;
  border: 1px solid #3a3a5a;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-data:hover {
  background: #333355;
  border-color: #4a4a6a;
  transform: translateY(-1px);
}
.btn-data:active {
  transform: translateY(0);
}
.btn-icon {
  font-size: 1rem;
}
.last-backup-info {
  font-size: 0.8rem;
  color: #666;
  margin-top: 8px;
}
.last-backup-info:empty {
  display: none;
}
.data-tip {
  font-size: 0.8rem;
  color: #888;
  margin: 12px 0;
  line-height: 1.4;
  padding: 10px 12px;
  background: rgba(90, 90, 255, 0.08);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.deload-notice {
  background: #4a3d5a;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* Day Selector */
.day-selector-container {
  margin-bottom: 12px;
  padding: 12px;
  background: #1e1e35;
  border-radius: 8px;
}
.day-selector-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}
.day-selector {
  display: flex;
  gap: 8px;
}
.day-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  border: 2px solid #4a4a6a;
  background: #2a2a4a;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.day-btn:hover:not(.completed):not(.selected) {
  background: #3a3a5a;
  border-color: #5a5aff;
}
.day-btn.selected {
  background: #5a5aff;
  border-color: #7070ff;
  box-shadow: 0 2px 8px rgba(90, 90, 255, 0.3);
}
.day-btn.completed {
  background: #2d5a3d;
  border-color: #4a8a5a;
  opacity: 0.7;
  cursor: default;
}
.day-btn.completed::after {
  content: '\2713';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.7rem;
  color: #8fc;
}

/* Info button styles */
.info-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #5a5aff;
  background: transparent;
  color: #5a5aff;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.info-btn:hover {
  background: #5a5aff;
  color: #fff;
}
.info-btn.no-image {
  border-color: #444;
  color: #444;
  cursor: default;
}
.info-btn.no-image:hover {
  background: transparent;
  color: #444;
}

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: #252540;
  border-radius: 12px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #333;
}
.modal-header h3 {
  margin: 0;
  color: #fff;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #4a4a6a;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: #5a5a8a;
}
.modal-body {
  padding: 16px;
}
.modal-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.modal-cues {
  margin-top: 12px;
  padding: 12px;
  background: #1e1e35;
  border-radius: 8px;
}
.modal-cues h4 {
  color: #80d4ff;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.modal-cues ul {
  margin: 0;
  padding-left: 20px;
  color: #ccc;
  font-size: 0.85rem;
}
.modal-cues li {
  margin-bottom: 4px;
}

/* Exercise Library */
.exercise-library {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.library-item {
  background: #1e1e35;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.library-item:hover {
  background: #2a2a4a;
  border-color: #5a5aff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(90, 90, 255, 0.2);
}
.library-item:active {
  background: #3a3a5a;
  transform: translateY(0);
  box-shadow: none;
}

/* RPE from history indicator - single value glow (no label, just visual cue) */
.rpe-slider.from-history {
  position: relative;
}
/* Only the single historical value glows, not all segments */
.rpe-segment.history-value {
  animation: historyGlow 1.5s ease-in-out infinite;
  box-shadow:
    0 0 12px currentColor,
    0 0 4px currentColor inset;
  position: relative;
  z-index: 1;
}
@keyframes historyGlow {
  0%,
  100% {
    box-shadow:
      0 0 12px currentColor,
      0 0 4px currentColor inset;
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 20px currentColor,
      0 0 8px currentColor inset;
    transform: scale(1.05);
  }
}
.rpe-slider.current-session .rpe-segment {
  animation: none;
  box-shadow: none;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100% - 32px);
}
.toast {
  background: #252540;
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
}
.toast.toast-out {
  animation: toastOut 0.2s ease-in forwards;
}
@keyframes toastIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes toastOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(20px);
    opacity: 0;
  }
}
.toast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.toast-content {
  flex: 1;
}
.toast-title {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}
.toast-message {
  color: #aaa;
  font-size: 0.85rem;
  margin-top: 2px;
}
.toast-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.toast-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.toast.success {
  border-left: 4px solid #4a8a5a;
}
.toast.error {
  border-left: 4px solid #c44;
}
.toast.info {
  border-left: 4px solid #5a5aff;
}
.toast.warning {
  border-left: 4px solid #c90;
}

/* Update notification banner (PWA updates) */
.update-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #5a5aff;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 14px;
}
.update-btn {
  background: white;
  color: #5a5aff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.update-btn:hover {
  background: #f0f0f0;
}
.update-btn-later {
  background: transparent;
  color: white;
  border: 1px solid white;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.update-btn-later:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Confirmation Modal */
.confirmation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
.confirmation-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.confirmation-modal {
  background: #252540;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: calc(100% - 32px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.2s ease;
}
.confirmation-overlay.visible .confirmation-modal {
  transform: scale(1) translateY(0);
}
.confirmation-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(201, 153, 0, 0.2);
  color: #c90;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.confirmation-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}
.confirmation-message {
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 20px;
}
.confirmation-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0 20px;
  font-size: 0.9rem;
  color: #888;
}
.confirmation-buttons {
  display: flex;
  gap: 12px;
}
.confirmation-buttons button {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #aaa;
}
.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.btn-confirm {
  background: #c90;
  border: none;
  color: #000;
}
.btn-confirm:hover {
  background: #da0;
}

/* Shared Option Picker Styles (used by restart, program-apply, hiatus, export modals) */
.option-picker {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.option-picker:hover {
  background: rgba(255, 255, 255, 0.05);
}
.option-picker.selected {
  background: rgba(90, 90, 255, 0.15);
  border-color: #5a5aff;
}
.option-picker input[type='radio'] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.option-picker-content {
  flex: 1;
}
.option-picker-label {
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}
.option-picker-desc {
  font-size: 0.8rem;
  color: #888;
}
.option-picker .recommended {
  display: inline-block;
  background: #5a5aff;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Specific option picker overrides */
.option-picker.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.option-picker.disabled:hover {
  background: transparent;
}

/* Restart Modal */
.restart-modal-content {
  background: #252540;
  border-radius: 16px;
  max-width: 440px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.restart-header {
  padding: 20px 20px 0;
}
.restart-header h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #fff;
}
.restart-header p {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}
.restart-body {
  padding: 16px 20px;
}
.restart-program-selector {
  margin-bottom: 12px;
}
.restart-program-selector label {
  font-size: 0.85rem;
  color: #bbb;
  display: block;
  margin-bottom: 6px;
}
.restart-program-selector select {
  width: 100%;
}
.restart-program-note {
  font-size: 0.75rem;
  color: #888;
  margin-top: 6px;
}
/* .restart-option inherits from .option-picker */
.restart-footer {
  padding: 16px 20px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #333;
}
.restart-footer button {
  padding: 10px 20px;
}

/* Program Apply Modal */
.program-apply-modal-content {
  background: #252540;
  border-radius: 16px;
  max-width: 460px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.program-apply-header {
  padding: 20px 20px 0;
}
.program-apply-header h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: #fff;
}
.program-apply-header p {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}
.program-apply-body {
  padding: 16px 20px;
}
/* .program-apply-option inherits from .option-picker */
.program-apply-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(201, 144, 0, 0.12);
  color: #f2c14f;
  font-size: 0.85rem;
  border: 1px solid rgba(201, 144, 0, 0.35);
}
.program-apply-footer {
  padding: 16px 20px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #333;
}
.program-apply-footer button {
  padding: 10px 20px;
}

/* Program Library Modal */
.program-library-modal-content {
  background: #252540;
  border-radius: 16px;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.program-library-header {
  padding: 20px 20px 0;
}
.program-library-header h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #fff;
}
.program-library-header p {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}
.program-library-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.program-library-section-title {
  font-size: 0.85rem;
  color: #b7b7d6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 6px 0 2px;
}
.program-library-card {
  position: relative;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 14px;
  background: #1f1f35;
  overflow: hidden;
}
.program-library-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.program-library-card h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #fff;
}
.program-library-card p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #888;
}
.program-library-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
/* Program Library Action Buttons - Labeled for clarity */
.program-library-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #3a3a5a;
  background: #252545;
  color: #ccc;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.program-library-action-btn:hover {
  border-color: #5a5aff;
  background: #2f2f55;
  color: #fff;
}
.program-library-action-btn .btn-icon {
  font-size: 0.85rem;
}
.program-library-action-btn.danger {
  color: #ff8c8c;
  border-color: rgba(255, 140, 140, 0.3);
}
.program-library-action-btn.danger:hover {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  color: #fff;
}
/* Legacy icon-only button (kept for fallback) */
.program-library-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1b1b2f;
  color: #ddd;
  font-size: 0.9rem;
  cursor: pointer;
}
.program-library-icon-btn:hover {
  border-color: #5a5aff;
  color: #fff;
}
.program-library-icon-btn.danger {
  color: #ff8c8c;
  border-color: rgba(255, 140, 140, 0.4);
}
.program-library-icon-btn.danger:hover {
  border-color: #ff6b6b;
  color: #fff;
}
/* Program Library Section Headers */
.program-library-section-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #888;
  margin: 16px 0 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 3px solid #5a5aff;
}
.program-library-section-title:first-child {
  margin-top: 0;
}

/* Preset vs Custom Program Card Distinction */
.program-library-card.preset {
  background: linear-gradient(135deg, #1f1f38 0%, #252548 100%);
  border: 1px solid rgba(90, 90, 255, 0.2);
}
.program-library-card.preset::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #5a5aff 0%, #80d4ff 100%);
  border-radius: 10px 10px 0 0;
}
.program-library-card.custom {
  background: linear-gradient(135deg, #1e1e32 0%, #232340 100%);
  border: 1px solid rgba(128, 212, 255, 0.15);
}
.program-library-card.custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #4a9fff 0%, #5dd39e 100%);
  border-radius: 10px 10px 0 0;
}
.program-library-card.archived {
  opacity: 0.6;
  background: #1a1a2e;
  border-style: dashed;
}

/* Program Card Type Badge */
.program-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
}
.program-type-badge.preset {
  background: rgba(90, 90, 255, 0.15);
  color: #a0a0ff;
}
.program-type-badge.custom {
  background: rgba(128, 212, 255, 0.15);
  color: #80d4ff;
}
.program-type-badge.archived {
  background: rgba(255, 255, 255, 0.08);
  color: #888;
}

/* Program Preview Stats */
.program-preview {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.program-preview-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.program-preview-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
}
.program-preview-label {
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Empty State Styling */
.program-library-empty {
  text-align: center;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed #333;
  border-radius: 10px;
}
.program-library-empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
}
.program-library-empty-text {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 12px;
}
.program-library-empty-hint {
  font-size: 0.8rem;
  color: #666;
}

.program-library-footer {
  padding: 16px 20px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #333;
}

/* Program Editor Modal */
.program-editor-modal-content {
  background: #252540;
  border-radius: 16px;
  max-width: 760px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.program-editor-header {
  padding: 20px 20px 0;
}
.program-editor-header h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #fff;
}
.program-editor-fields {
  display: grid;
  gap: 8px;
}
.program-editor-fields label {
  font-size: 0.8rem;
  color: #bbb;
}
.program-editor-fields input,
.program-editor-fields textarea {
  width: 100%;
  box-sizing: border-box;
}
.program-editor-fields .set-input {
  text-align: left;
  padding: 10px 12px;
  background: #1f1f35;
  border: 1px solid #333;
  color: #fff;
}
.program-editor-fields textarea.set-input {
  min-height: 70px;
  resize: vertical;
}
.program-editor-body {
  padding: 16px 20px;
}
.program-editor-controls {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #2f2f4a;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.program-editor-blocks,
.program-editor-days {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
/* Enhanced RPE Input Layout */
.program-editor-rpe {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid #2f2f4a;
  flex-wrap: wrap;
}
.program-editor-rpe-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #bbb;
  margin-right: 8px;
}
.program-editor-rpe-inputs {
  display: flex;
  gap: 8px;
  flex: 1;
}
.program-editor-rpe-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.program-editor-rpe-input input {
  width: 56px;
  text-align: center;
}
.program-editor-rpe-input.week-1 input {
  border-color: rgba(74, 159, 255, 0.4);
}
.program-editor-rpe-input.week-1 input:focus {
  border-color: var(--week-1-color);
}
.program-editor-rpe-input.week-2 input {
  border-color: rgba(93, 211, 158, 0.4);
}
.program-editor-rpe-input.week-2 input:focus {
  border-color: var(--week-2-color);
}
.program-editor-rpe-input.week-3 input {
  border-color: rgba(255, 179, 71, 0.4);
}
.program-editor-rpe-input.week-3 input:focus {
  border-color: var(--week-3-color);
}
.program-editor-rpe-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.program-editor-rpe-label.week-1 {
  color: var(--week-1-color);
}
.program-editor-rpe-label.week-2 {
  color: var(--week-2-color);
}
.program-editor-rpe-label.week-3 {
  color: var(--week-3-color);
}
.program-editor-rpe-deload {
  font-size: 0.75rem;
  color: #777;
  margin-left: auto;
  padding: 4px 10px;
  background: rgba(74, 61, 90, 0.3);
  border-radius: 4px;
}
.program-editor-guidance {
  font-size: 0.8rem;
  color: #9aa;
}
/* Enhanced Program Editor Tabs */
.program-editor-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px 6px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1f1f35;
  color: #bbb;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
  min-width: 70px;
}
.program-editor-tab:hover {
  background: #252545;
  border-color: #4a4a6a;
}
.program-editor-tab.active {
  border-color: #5a5aff;
  color: #fff;
  background: rgba(90, 90, 255, 0.15);
}
.program-editor-tab.touched {
  border-color: #5dd39e;
}
.program-editor-tab.touched.active {
  border-color: #5a5aff;
}
.program-editor-tab-label {
  font-weight: 500;
}
.program-editor-tab-count {
  font-size: 0.65rem;
  color: #666;
  font-family: var(--font-mono);
}
.program-editor-tab.active .program-editor-tab-count {
  color: #80d4ff;
}
.program-editor-table {
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.program-editor-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(6, 78px) 60px;
  gap: 6px;
  padding: 8px;
  align-items: center;
  border-bottom: 1px solid #2f2f4a;
  background: #1f1f35;
}
.program-editor-row > :nth-child(4),
.program-editor-row > :nth-child(6) {
  border-left: 1px solid #2f2f4a;
  padding-left: 8px;
  margin-left: 2px;
}
/* Program Editor Header Rows */
.program-editor-header-group {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 156px) 60px;
  gap: 6px;
  background: #1a1a2e;
  border-bottom: 2px solid #333;
}
.program-editor-exercise-header {
  padding: 10px 8px;
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
}
.program-editor-order-header {
  padding: 10px 4px;
  font-size: 0.7rem;
  color: #888;
  text-align: center;
}
.program-editor-week-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  padding: 6px 4px;
  border-radius: 6px 6px 0 0;
}
.program-editor-week-header.week-1 {
  background: rgba(74, 159, 255, 0.15);
  border-bottom: 2px solid var(--week-1-color);
}
.program-editor-week-header.week-2 {
  background: rgba(93, 211, 158, 0.15);
  border-bottom: 2px solid var(--week-2-color);
}
.program-editor-week-header.week-3 {
  background: rgba(255, 179, 71, 0.15);
  border-bottom: 2px solid var(--week-3-color);
}
.program-editor-week-label {
  grid-column: span 2;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 4px;
}
.program-editor-col-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.program-editor-row.header {
  background: #1a1a2e;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aaa;
  padding-top: 10px;
  padding-bottom: 10px;
}
.program-editor-row.header > div {
  text-align: center;
}
.program-editor-row.header > div:first-child {
  text-align: left;
}
.program-editor-row:last-child {
  border-bottom: none;
}
.program-editor-row select,
.program-editor-row input {
  width: 100%;
  padding: 6px;
}
.program-editor-row select {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.program-editor-remove {
  background: transparent;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 1rem;
}
.program-editor-actions {
  margin-top: 12px;
  margin-bottom: 12px;
}
.program-editor-cell-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.program-editor-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #c7c7d9;
}
.program-editor-tag.category {
  background: rgba(90, 90, 255, 0.2);
  color: #cfd2ff;
}
.program-editor-row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.program-editor-row-actions button {
  background: transparent;
  border: 1px solid #333;
  color: #bbb;
  border-radius: 6px;
  cursor: pointer;
  height: 26px;
  width: 26px;
}
.program-editor-row-actions button:hover {
  border-color: #5a5aff;
  color: #fff;
}
.program-editor-drag {
  cursor: grab;
  color: #aaa;
  font-size: 0.9rem;
  user-select: none;
  padding: 2px 4px;
  border: 1px solid #333;
  border-radius: 6px;
}
.program-editor-drag:active {
  cursor: grabbing;
}
.program-editor-row.dragging {
  opacity: 0.6;
}
.program-editor-row.drag-over {
  outline: 2px dashed rgba(90, 90, 255, 0.6);
}
.program-editor-category-row {
  grid-template-columns: 1fr;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #9aa;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.program-editor-library {
  margin-top: 4px;
  border-top: 1px solid #333;
  padding-top: 12px;
}
.program-editor-library h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #fff;
}

#exercise-modal {
  z-index: 4000;
}
.program-editor-actions {
  margin-top: 12px;
}
.program-editor-footer {
  padding: 16px 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #333;
  margin-bottom: 12px;
}
.program-editor-footer button {
  padding: 10px 16px;
  min-width: 140px;
}
.program-editor-footer .btn-primary {
  width: auto;
  margin-top: 0;
}
/* Unsaved changes indicator */
.program-editor-footer .btn-primary.has-changes {
  position: relative;
}
.program-editor-footer .btn-primary.has-changes::before {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background: #ffb347;
  border-radius: 50%;
  border: 2px solid #252540;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}
.unsaved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #ffb347;
  margin-right: auto;
}
.unsaved-indicator::before {
  content: '●';
  animation: pulse-dot 1.5s infinite;
}

/* Hiatus Modal */
.hiatus-modal-content {
  background: #252540;
  border-radius: 16px;
  max-width: 440px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.hiatus-header {
  padding: 20px 20px 0;
}
.hiatus-header h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  color: #fff;
}
.hiatus-header p {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}
.hiatus-body {
  padding: 16px 20px;
}
/* .hiatus-option inherits from .option-picker */
.hiatus-adjustment {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}
.hiatus-adjustment-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}
.hiatus-adjustment select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2a2a4a;
  color: #fff;
  font-size: 0.9rem;
}
.hiatus-note {
  margin-top: 12px;
  padding: 12px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #80d4ff;
}
.hiatus-footer {
  padding: 16px 20px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #333;
}
.hiatus-footer button {
  padding: 10px 20px;
}

/* Export Modal */
.export-modal-content {
  background: #1e1e2e;
  border-radius: 16px;
  padding: 20px;
  max-width: 420px;
  width: 90%;
  border: 1px solid #3a3a5c;
}
.export-option {
  background: #2a2a3a;
  border: 1px solid #3a3a5c;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.export-option.selected {
  border-color: #5a5aff;
  background: #2f2f4f;
}
.export-option select {
  margin-left: auto;
  background: #1e1e2e;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.85rem;
}
.export-footer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Profile Setup Modal */
.profile-setup-modal-content {
  background: #252540;
  border-radius: 16px;
  max-width: 440px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.profile-setup-header {
  padding: 24px 24px 0;
  text-align: center;
}
.profile-setup-header h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  color: #fff;
}
.profile-setup-header p {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}
.profile-setup-body {
  padding: 20px 24px;
}
.profile-field {
  margin-bottom: 16px;
}
.profile-field-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-field-row .profile-field {
  margin-bottom: 0;
}
.profile-field-half {
  flex: 1;
  min-width: 0;
}
.profile-field-third {
  flex: 1;
  min-width: var(--field-min-width);
}
.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08) 0%, rgba(74, 222, 128, 0.04) 100%);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 10px;
  font-size: 0.82rem;
  color: rgba(74, 222, 128, 0.9);
  margin-bottom: 20px;
  line-height: 1.4;
}
.privacy-notice .privacy-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.profile-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 6px;
}
.profile-field .set-input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}
.field-hint {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}
.field-error {
  font-size: 0.8rem;
  color: #ff6b6b;
  margin-top: 4px;
  min-height: 1.2em;
}
.optional-label {
  font-weight: 400;
  color: #555;
  font-size: 0.7rem;
  text-transform: lowercase;
  margin-left: 4px;
}
.profile-field-third label {
  white-space: nowrap;
  font-size: 0.85rem;
}
.migration-notice {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #80d4ff;
}
.profile-setup-footer {
  padding: 16px 24px 24px;
}

/* Profile Settings Section */
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #1e1e35;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: background 0.3s ease;
}
.profile-header.profile-saved {
  background: rgba(45, 90, 61, 0.2);
}
.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5a5aff 0%, #80d4ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 16px rgba(90, 90, 255, 0.3);
}
.profile-identity {
  flex: 1;
  min-width: 0;
}
.profile-displayname-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 2px 0;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.profile-displayname-input:hover {
  border-bottom-color: #444;
}
.profile-displayname-input:focus {
  border-bottom-color: var(--accent);
}
.profile-displayname-input::placeholder {
  color: #666;
}
.profile-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.profile-username {
  font-size: 0.85rem;
  color: #888;
}
.profile-stats-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.profile-stat-field {
  flex: 1;
}
.profile-stat-field label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 4px;
}
.profile-stat-field .set-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.95rem;
}
.profile-field-display label,
.profile-field-edit label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 4px;
}
.profile-value {
  font-size: 1rem;
  color: #fff;
  padding: 8px 0;
}

/* Profile & Users merged section */
.manage-users-header {
  margin-top: 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
}
.manage-users-header:hover {
  color: #aaa;
}
.manage-users-count {
  font-weight: 400;
  color: #666;
  margin-left: 4px;
}
.switch-user-empty {
  font-size: 0.85rem;
  color: #666;
  padding: 12px;
  text-align: center;
  background: #1e1e35;
  border-radius: 8px;
  margin-bottom: 8px;
}
.profile-danger-zone {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 107, 107, 0.2);
}
.danger-text {
  font-size: 0.8rem;
  color: #888;
  margin: 0 0 10px;
}

.inline-edit {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-edit .set-input {
  flex: 1;
}
.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
  background: #5a5aff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-small:hover {
  background: #6b6bff;
}

/* User List in Settings */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #1e1e35;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.user-item:hover {
  background: #2a2a4a;
  transform: translateX(2px);
}
.user-item.active {
  background: rgba(90, 90, 255, 0.15);
  border: 1px solid #5a5aff;
}
.user-item-radio {
  display: none;
}
.user-item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a4a8a 0%, #5a5aff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.user-item.active .user-item-avatar {
  background: linear-gradient(135deg, #5a5aff 0%, #80d4ff 100%);
  box-shadow: 0 0 12px rgba(90, 90, 255, 0.4);
}
.user-item-info {
  flex: 1;
  min-width: 0;
}
.user-item-name {
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-item-username {
  font-size: 0.8rem;
  color: #888;
}
.user-item-active-badge {
  font-size: 0.7rem;
  color: #5a5aff;
  background: rgba(90, 90, 255, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Program Page Header */
.program-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a4a;
}
.program-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.program-header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.program-header-title .program-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3a3a6a 0%, #2a2a4a 100%);
  color: #8a8aff;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.program-header-subtitle {
  font-size: 0.8rem;
  color: #888;
  margin: 0;
}
.program-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.program-next-cycle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.program-next-cycle-label {
  font-size: 0.75rem;
  color: #888;
  white-space: nowrap;
}
.program-header-right select {
  min-width: 160px;
  font-size: 0.8rem;
}
.program-manage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #3a3a5a;
  background: #252545;
  color: #ccc;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.program-manage-btn:hover {
  border-color: #5a5aff;
  background: #2a2a5a;
  color: #fff;
}
.program-manage-btn .btn-icon {
  font-size: 0.9rem;
}

/* Legacy styles - keep for compatibility */
.program-current {
  display: none; /* Hidden - replaced by program-header */
}
.program-selector {
  display: none; /* Hidden - replaced by program-header */
}
.program-selector-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.program-selector label {
  font-size: 0.85rem;
  color: #bbb;
}
.program-selector select {
  min-width: 220px;
}
.program-selector .program-selector-note {
  font-size: 0.75rem;
  color: #888;
}
.program-grid-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.program-grid {
  display: grid;
  grid-template-columns: 140px repeat(36, minmax(48px, 1fr));
  gap: 1px;
  background: #1a1a2e;
  min-width: max-content;
}
.program-cell {
  background: #252540;
  padding: 6px 4px;
  font-size: 0.75rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}
.program-cell.exercise-name {
  position: sticky;
  left: 0;
  z-index: 20;
  background: #1a1a2e;
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  padding-left: 8px;
  font-weight: 500;
  border-right: 2px solid #0f0f1a;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.5);
}
.exercise-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.program-cell.exercise-name .weight-stats {
  display: block;
  font-size: 0.65rem;
  color: #888;
  font-weight: 400;
  margin-top: 2px;
}
.program-cell.header {
  background: #1e1e35;
  font-weight: 600;
  color: #a0a0ff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.program-cell.week-header {
  grid-column: span 3;
  font-size: 0.8rem;
  display: block;
  line-height: 1.3;
}
.program-cell.day-header {
  font-size: 0.7rem;
  color: #888;
}
.program-cell.current {
  box-shadow: inset 0 0 0 2px #5a5aff;
  z-index: 2;
}
.program-cell.deload {
  background: #2a2540 !important;
  border-left: 2px solid #4a3d5a;
}
.program-cell.deload.header {
  background: #1e1830 !important;
  color: #b090c0;
}
.program-cell.completed {
  background: #3a3a5c;
}
.program-cell.future {
  color: #666;
}
/* RPE Ratio color classes - using shared table color variables */
.program-cell.ratio-under {
  background: var(--table-color-rpe6);
} /* Blue tint - < 0.75 ratio */
.program-cell.ratio-low {
  background: var(--table-color-rpe7);
} /* Light blue tint - 0.75-0.90 ratio */
.program-cell.ratio-target {
  background: var(--table-color-rpe8);
} /* Green tint - 0.90-1.10 ratio (target) */
.program-cell.ratio-high {
  background: var(--table-color-rpe9);
} /* Orange tint - 1.10-1.25 ratio */
.program-cell.ratio-over {
  background: var(--table-color-rpe10);
} /* Red tint - > 1.25 ratio */
.program-cell.empty {
  background: #1e1e35;
}
/* Row striping for better readability - only when no status color */
.program-cell.odd-row:not(.completed):not(.skipped):not(.current):not(.ratio-under):not(
    .ratio-low
  ):not(.ratio-target):not(.ratio-high):not(.ratio-over) {
  background: #2a2a4a;
}
.program-cell.odd-row.empty {
  background: #222238;
}
.program-cell.odd-row.exercise-name {
  background: #1e1e38;
}
.program-cell.skipped {
  background: #1b1b2e;
  color: #555;
}

/* Category header for Gantt chart */
.program-cell.category-header {
  background: var(--table-category-bg);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border-bottom: 2px solid var(--table-category-border);
  min-height: 36px;
}
.program-cell.category-header.exercise-name {
  text-align: left;
  justify-content: flex-start;
  padding-left: 8px;
  background: var(--table-category-bg);
}

/* Cycle Selector */
.cycle-selector-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cycle-selector-label {
  font-size: 0.85rem;
  color: #888;
}
.cycle-selector {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2a2a4a;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}
.cycle-selector:focus {
  border-color: #5a5aff;
  outline: none;
}
.cycle-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
}
.cycle-badge.active {
  background: #3b82f6;
  color: #fff;
}
.cycle-badge.abandoned {
  background: #f97316;
  color: #fff;
}
.cycle-badge.completed {
  background: #10b981;
  color: #fff;
}
.history-cycle-divider {
  margin: 12px 0 6px;
  padding: 6px 10px;
  background: #1a1a2e;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive: Mobile portrait - show 3 columns */
@media (max-width: 480px) {
  .program-grid {
    grid-template-columns: 100px repeat(36, minmax(44px, 1fr));
  }
  .program-cell {
    font-size: 0.7rem;
    padding: 4px 2px;
  }
  .program-cell.exercise-name {
    font-size: 0.7rem;
  }
}
/* Tablet / Landscape */
@media (min-width: 481px) and (max-width: 1024px) {
  .program-grid {
    grid-template-columns: 120px repeat(36, minmax(52px, 1fr));
  }
}
/* Desktop: expand viewport */
@media (min-width: 1025px) {
  #program-view .card {
    max-width: none;
  }
  .program-grid {
    grid-template-columns: 160px repeat(36, minmax(60px, 1fr));
  }
}

/* ==========================================
   RPE-Weight Table Styles
   ========================================== */
.rpe-table-wrapper {
  overflow-x: auto;
  margin: 8px 0;
}

.rpe-weight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
  table-layout: fixed;
}

.rpe-weight-table th,
.rpe-weight-table td {
  padding: 8px 4px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  height: 40px;
  box-sizing: border-box;
}

/* Fixed column widths */
.rpe-weight-table th:first-child,
.rpe-weight-table td:first-child {
  width: 140px;
}

/* Sticky first column (exercise name) */
.rpe-weight-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #2a2a4a;
  border-right: 2px solid #0f0f1a;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.5);
}

.rpe-weight-table th:last-child,
.rpe-weight-table td:last-child {
  width: 60px;
}

.rpe-weight-table th {
  background: rgba(90, 90, 255, 0.2);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.rpe-weight-table .exercise-name {
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  padding-left: 12px;
  line-height: 1.4;
  /* Sticky column */
  position: sticky;
  left: 0;
  background: var(--bg-card);
  z-index: 1;
  border-right: 2px solid #0f0f1a;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.5);
}

.rpe-weight-table .group-header td {
  background: var(--table-category-bg);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--table-category-border);
}

/* Make group header first cell also sticky */
.rpe-weight-table .group-header td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid #0f0f1a;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.5);
}

.rpe-weight-table .rpe-cell {
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.4;
  white-space: nowrap;
  font-size: 0.75rem;
}

.rpe-weight-table .last-used {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.rpe-weight-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   Weight Chart Styles
   ========================================== */
#weight-chart-container {
  position: relative;
  height: 250px;
  margin: 12px 0;
}

#chart-exercise-selector {
  margin-bottom: 12px;
}

#chart-exercise-selector select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* ==========================================
   Expandable Session Rows
   ========================================== */
.history-item-wrapper {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-item-wrapper:last-child {
  border-bottom: none;
}

.history-item.expandable {
  cursor: pointer;
  transition: background 0.2s ease;
}

.history-item.expandable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.expand-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition:
    transform 0.2s ease,
    color 0.2s ease;
  width: 12px;
  text-align: center;
}

.expand-arrow.expanded {
  color: var(--accent);
}

.session-detail {
  background: rgba(0, 0, 0, 0.2);
  padding: 12px 16px 12px 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.session-exercise-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.session-exercise-row .exercise-name {
  color: var(--text-primary);
  font-size: 0.85rem;
}

.session-exercise-row .exercise-detail {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.session-rpe {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 4px;
}

/* ==========================================
   Quick Actions - Industrial Card Design
   ========================================== */

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

.action-card {
  position: relative;
  background: linear-gradient(165deg, #2a2a48 0%, #1e1e36 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 10px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

/* Top accent bar - color coded by action type */
.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--action-accent, #5a5aff);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

/* Subtle corner glow on hover */
.action-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    var(--action-accent, #5a5aff) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(var(--action-accent-rgb, 90, 90, 255), 0.15);
}

.action-card:hover::before {
  opacity: 1;
}

.action-card:hover::after {
  opacity: 0.04;
}

.action-card:active {
  transform: translateY(0) scale(0.98);
}

/* Action icon */
.action-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}

.action-card:hover .action-icon {
  transform: scale(1.1);
}

/* Action label */
.action-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Action description - hidden by default, shown on larger screens */
.action-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: none;
}

/* Color variants */
.action-card--copy {
  --action-accent: #4a9fff;
  --action-accent-rgb: 74, 159, 255;
}

.action-card--skip {
  --action-accent: #ffb347;
  --action-accent-rgb: 255, 179, 71;
}

.action-card--cycle {
  --action-accent: #5dd39e;
  --action-accent-rgb: 93, 211, 158;
}

/* Responsive: Stack on very small screens */
@media (max-width: 340px) {
  .quick-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .action-card {
    flex-direction: row;
    text-align: left;
    padding: 12px 14px;
    gap: 12px;
  }

  .action-icon {
    font-size: 1.3rem;
  }

  .action-label {
    font-size: 0.8rem;
  }
}

/* Larger screens: Show descriptions */
@media (min-width: 400px) {
  .action-desc {
    display: block;
  }

  .action-card {
    padding: 16px 12px 14px;
    gap: 8px;
  }

  .action-icon {
    font-size: 1.6rem;
  }

  .action-label {
    font-size: 0.78rem;
  }
}
