/* 
  IRONCLAD KETTLEBELLS - PREMIUM DESIGN SYSTEM
  Colors: 
    - Bg Deep: #0A0C10
    - Bg Panel: #151A22
    - Bg Card: rgba(26, 33, 44, 0.6)
    - Primary Accent (Orange): #FF5733
    - Primary Accent Glow: rgba(255, 87, 51, 0.3)
    - Tech Cyan Accent: #66FCF1
    - Tech Cyan Glow: rgba(102, 252, 241, 0.25)
    - High contrast text: #F1F3F5
    - Muted text: #9AA0A6
*/

:root {
  --bg-deep: #0A0C10;
  --bg-panel: #151A22;
  --bg-card: rgba(26, 33, 44, 0.6);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: #66FCF1;
  
  --primary-accent: #FF5733;
  --primary-accent-rgb: 255, 87, 51;
  --secondary-accent: #66FCF1;
  --secondary-accent-rgb: 102, 252, 241;
  
  --text-primary: #F1F3F5;
  --text-secondary: #9AA0A6;
  --text-muted: #5F6368;
  
  --font-family-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-display: 'Space Grotesk', var(--font-family-sans);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-accent);
}

/* Utility Layouts */
.main-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

section {
  padding: 4rem 0;
}
section.alternate-bg {
  position: relative;
}
section.alternate-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50vw;
  right: -50vw;
  height: 100%;
  background: linear-gradient(180deg, #11151B 0%, #0A0C10 100%);
  z-index: -1;
  pointer-events: none;
}

/* Accent lines and icons */
.section-header {
  margin-bottom: 3rem;
  position: relative;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}

.section-title-wrap h2 {
  font-family: var(--font-family-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.accent-bar {
  width: 6px;
  height: 36px;
  background: var(--primary-accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px rgba(var(--primary-accent-rgb), 0.5);
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 700px;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

.btn-md {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--primary-accent-rgb), 0.4);
}
.btn-primary:hover:not(:disabled) {
  background: #ff6a4d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-accent-rgb), 0.6);
}
.btn-primary:disabled {
  background: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-accent {
  background: transparent;
  color: var(--secondary-accent);
  border: 1px solid var(--secondary-accent);
  box-shadow: 0 0 10px rgba(var(--secondary-accent-rgb), 0.15);
}
.btn-accent:hover:not(:disabled) {
  background: var(--secondary-accent);
  color: #000;
  box-shadow: 0 0 20px rgba(var(--secondary-accent-rgb), 0.4);
  transform: translateY(-2px);
}

.btn-text {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0;
}
.btn-text:hover {
  color: var(--secondary-accent);
}

.btn-danger-text {
  background: transparent;
  color: #ff4d4d;
  border: none;
}
.btn-danger-text:hover {
  color: #ff8080;
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.2);
}

.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-circle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--secondary-accent);
  transform: scale(1.05);
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(21, 26, 34, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

/* Header Styles */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  fill: var(--primary-accent);
  filter: drop-shadow(0 0 5px rgba(var(--primary-accent-rgb), 0.4));
}
.logo-icon-sm {
  width: 24px;
  height: 24px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-display);
}

.logo-primary {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1.5px;
  line-height: 1.1;
  color: var(--text-primary);
}

.logo-secondary {
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  color: var(--secondary-accent);
}

.app-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-family-display);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  padding: 0.35rem 0.5rem;
  position: relative;
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link.active {
  color: var(--secondary-accent);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--secondary-accent);
  border-radius: var(--radius-full);
}

.db-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(102, 252, 241, 0.08);
  border: 1px solid rgba(102, 252, 241, 0.2);
  color: var(--secondary-accent);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.header-badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.live-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 87, 51, 0.08);
  border: 1px solid rgba(255, 87, 51, 0.25);
  color: var(--primary-accent);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(255, 87, 51, 0.4);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 87, 51, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 87, 51, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 87, 51, 0);
  }
}

/* Hero Section */
.hero-banner {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 4rem 0;
}

.hero-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(var(--primary-accent-rgb), 0.25)) drop-shadow(0 0 15px rgba(var(--secondary-accent-rgb), 0.1));
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

.hero-glow {
  position: absolute;
  top: -10%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(var(--primary-accent-rgb), 0.15) 0%, rgba(var(--secondary-accent-rgb), 0.03) 70%, transparent 100%);
  z-index: -1;
  pointer-events: none;
  animation: glowPulse 8s infinite alternate ease-in-out;
}

@keyframes glowPulse {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.2) translate(-20px, 20px); opacity: 1; }
}

.hero-content {
  max-width: 800px;
  text-align: left;
}

.hero-title {
  font-family: var(--font-family-display);
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
}

.highlight-text {
  color: var(--primary-accent);
  text-shadow: 0 0 20px rgba(var(--primary-accent-rgb), 0.2);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.hero-feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hero-feature-item .feature-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.hero-feature-item h4 {
  font-family: var(--font-family-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.hero-feature-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-feature-item .color-main {
  color: var(--secondary-accent);
}

.hero-feature-item .color-warm {
  color: var(--primary-accent);
}

.hero-feature-item .color-cool {
  color: #9b59b6;
}

/* Search and Filters Section */
.filter-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  width: 20px;
  height: 20px;
}

.search-box input[type="text"] {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(10, 12, 16, 0.6);
  color: var(--text-primary);
  font-size: 1.05rem;
  transition: var(--transition-smooth);
}
.search-box input[type="text"]:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(102, 252, 241, 0.2);
  background: rgba(10, 12, 16, 0.9);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-label i {
  width: 16px;
  height: 16px;
  color: var(--secondary-accent);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}
.filter-btn.active {
  background: rgba(102, 252, 241, 0.1);
  border-color: var(--secondary-accent);
  color: var(--secondary-accent);
  font-weight: 600;
}

.filter-active-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 1.5rem;
  padding-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Workouts Grid */
.workouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

@media (max-width: 480px) {
  .workouts-grid {
    grid-template-columns: 1fr;
  }
}

/* Workout Card */
.workout-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}
.workout-card:hover {
  transform: translateY(-5px);
  border-color: rgba(102, 252, 241, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.card-header-gradient {
  height: 6px;
  background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
}

.card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-level-beginner { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.badge-level-intermediate { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.badge-level-advanced { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

.badge-time { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.badge-gear { background: rgba(102, 252, 241, 0.08); color: var(--secondary-accent); }
.badge-custom { background: rgba(155, 89, 182, 0.15); color: #9b59b6; }

.workout-card h3 {
  font-family: var(--font-family-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.workout-card h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.workout-card p.desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
}

.card-goal {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.card-action-text {
  color: var(--secondary-accent);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.workout-card:hover .card-action-text {
  gap: 8px;
}
.card-action-text i {
  width: 16px;
  height: 16px;
  transition: var(--transition-fast);
}

/* Loading & Empty States */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-panel);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102, 252, 241, 0.1);
  border-radius: 50%;
  border-top-color: var(--secondary-accent);
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--text-secondary);
  max-width: 400px;
}

/* Workout Creator Container */
.creator-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .creator-container {
    grid-template-columns: 1fr;
  }
}

.planner-card, .preview-card {
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.card-title {
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.card-title i {
  color: var(--primary-accent);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

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

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(10, 12, 16, 0.4);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 8px rgba(102, 252, 241, 0.15);
  background: rgba(10, 12, 16, 0.7);
}

/* Custom Radio Toggle buttons */
.radio-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.radio-toggle input[type="radio"] {
  display: none;
}
.radio-toggle label {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin: 0;
  transition: var(--transition-fast);
}
.radio-toggle input[type="radio"]:checked + label {
  background: rgba(255, 87, 51, 0.15);
  color: var(--primary-accent);
  font-weight: 700;
}

.exercise-picker {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.sub-title {
  font-family: var(--font-family-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-title i {
  color: var(--secondary-accent);
}

/* Custom Workout Live Preview Sheet */
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.preview-tag {
  background: var(--border-color);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.preview-doc {
  background: #fff;
  color: #1a1a1a;
  border-radius: var(--radius-md);
  padding: 2rem;
  min-height: 500px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.preview-doc-header {
  border-bottom: 2px solid #FF5733;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.preview-doc-header h2 {
  font-family: var(--font-family-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.5rem;
}

.prev-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.prev-desc-text {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

.prev-section {
  margin-bottom: 1.5rem;
}

.prev-section-title {
  font-family: var(--font-family-display);
  font-size: 1rem;
  font-weight: 700;
  color: #FF5733;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}
.prev-section-title i {
  width: 14px;
  height: 14px;
}

.prev-table-wrapper {
  overflow-x: auto;
}

.prev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.prev-table th {
  text-align: left;
  padding: 6px;
  background: #f5f5f5;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #ddd;
}

.prev-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  color: #222;
}

.prev-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.text-muted {
  color: #777 !important;
  font-style: italic;
}

.preview-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delete-row-btn {
  background: transparent;
  border: none;
  color: #ff4d4d;
  cursor: pointer;
  padding: 2px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: var(--transition-fast);
}
.delete-row-btn:hover {
  opacity: 1;
  background: rgba(255, 77, 77, 0.1);
}

/* Detail Drawer/Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border: 1px solid var(--border-color);
  animation: slideUp 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-header-left h2 {
  font-family: var(--font-family-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-header-left p {
  font-size: 1rem;
  margin-top: 4px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-card i {
  color: var(--secondary-accent);
  width: 24px;
  height: 24px;
}
.stat-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card strong {
  font-family: var(--font-family-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .modal-body-layout {
    grid-template-columns: 1fr;
  }
}

.modal-col-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-desc-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.phase-block {
  margin-bottom: 2rem;
}

.phase-block h3 {
  font-family: var(--font-family-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-warm { color: var(--primary-accent); }
.color-main { color: var(--secondary-accent); }
.color-cool { color: #9b59b6; }

.phase-table-wrapper {
  overflow-x: auto;
}

.phase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.phase-table th {
  text-align: left;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.phase-table td {
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  line-height: 1.4;
}

.phase-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.sticky-panel-card {
  position: sticky;
  top: 100px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sticky-panel-card h3 {
  font-family: var(--font-family-display);
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tips-list li {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-secondary);
  position: relative;
  padding-left: 20px;
}
.tips-list li::before {
  content: '👉';
  position: absolute;
  left: 0;
  top: 2px;
}

.modal-target-muscles h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.muscle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.muscle-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.modal-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Essential Form Guides CSS */
.guides-tabs-container {
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.guides-tabs-header {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.guide-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-family-display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-tab-btn i {
  width: 18px;
  height: 18px;
}
.guide-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.guide-tab-btn.active {
  background: rgba(255, 87, 51, 0.1);
  color: var(--primary-accent);
  border: 1px solid rgba(255, 87, 51, 0.2);
}

.guides-tab-content {
  display: none;
}
.guides-tab-content.active {
  display: block;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 992px) {
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.guide-text h3 {
  font-family: var(--font-family-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.guide-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.step-item {
  display: flex;
  gap: 16px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(102, 252, 241, 0.15);
  border: 1px solid var(--secondary-accent);
  color: var(--secondary-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-item div {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pro-tip-box {
  background: rgba(102, 252, 241, 0.04);
  border: 1px solid rgba(102, 252, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 12px;
}

.pro-tip-icon {
  color: var(--secondary-accent);
  flex-shrink: 0;
}

.pro-tip-box strong {
  display: block;
  color: var(--secondary-accent);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.pro-tip-box div {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.visual-placeholder {
  background: #11151A;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.visual-caption {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Immersive Live Workout Timer Overlay */
.timer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #06080B;
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.timer-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--primary-accent-rgb), 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.timer-screen-container {
  max-width: 1000px;
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.timer-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
}

.badge-timer {
  background: rgba(255, 87, 51, 0.15);
  color: var(--primary-accent);
  border: 1px solid rgba(255, 87, 51, 0.3);
  margin-bottom: 6px;
}

#timer-workout-title {
  font-family: var(--font-family-display);
  font-size: 1.75rem;
  font-weight: 700;
}

.btn-outline-danger {
  background: transparent;
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.3);
}
.btn-outline-danger:hover {
  background: #ff4d4d;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.4);
}

.timer-body-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 850px) {
  .timer-body-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.timer-graphic-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-circle-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-ring-fill {
  transition: stroke-dashoffset 0.1s linear;
}

.timer-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.timer-sec {
  font-family: var(--font-family-display);
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.timer-state-label {
  font-family: var(--font-family-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-accent);
  margin-top: 4px;
}

.sound-control-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.timer-details-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timer-stage-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stage-tag.active {
  color: var(--secondary-accent);
}

.stage-sep {
  display: flex;
  align-items: center;
}
.stage-sep i {
  width: 14px;
  height: 14px;
}

.active-exercise-card {
  padding: 2rem;
  border: 1px solid rgba(102, 252, 241, 0.25);
  box-shadow: 0 0 20px rgba(102, 252, 241, 0.05);
}

.ex-progress-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary-accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

#timer-exercise-name {
  font-family: var(--font-family-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.ex-dosage-info {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.ex-guideline-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.workout-progress-card {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.prog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.prog-row strong {
  color: var(--text-primary);
  font-weight: 600;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-accent);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.progress-bar-accent {
  background: var(--secondary-accent);
}

.timer-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1rem;
}

.timer-skip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mt-4 {
  margin-top: 1rem;
}

/* Footer styles */
.app-footer {
  background: #06080B;
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.footer-brand .logo-icon {
  opacity: 0.6;
}

.footer-copyright {
  font-size: 0.8rem;
  max-width: 700px;
  line-height: 1.4;
  text-align: right;
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.85rem;
  }
  .creator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .modal-body-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
  }
  .app-nav {
    gap: 1rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero-banner {
    padding: 3rem 0 2rem 0;
    text-align: center;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-graphic {
    order: -1;
  }
  .hero-image-svg {
    max-width: 260px;
  }
  .hero-content {
    text-align: center;
  }
  .hero-title {
    font-size: 2.25rem;
    line-height: 1.2;
  }
  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .section-title-wrap h2 {
    font-size: 1.85rem;
  }
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .modal-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-container {
    padding: 1.5rem;
    max-height: 95vh;
  }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .timer-body-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .footer-copyright {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .main-container {
    padding: 1.5rem 1rem;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .radio-toggle {
    grid-template-columns: 1fr;
  }
  .modal-stats-grid {
    grid-template-columns: 1fr;
  }
  .modal-container {
    padding: 1rem;
  }
  .phase-table th, .phase-table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.8rem;
  }
  .timer-circle-wrap {
    transform: scale(0.8);
    margin-bottom: 0.5rem;
  }
  .timer-sec {
    font-size: 5rem;
  }
  .preview-doc {
    padding: 1rem;
  }
  .prev-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   8. DURATION SLIDER, TOOLBAR, LIST VIEW & PAGINATION STYLES
   ========================================================================== */

/* Duration Slider Filter */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.range-slider-wrapper {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
}

.slider-track {
  position: absolute;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  z-index: 1;
}

.range-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  border: none;
  padding: 0 !important;
  z-index: 2;
  margin: 0;
}

.range-slider::-webkit-slider-runnable-track {
  background: transparent;
  border: none;
}

.range-slider::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--secondary-accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(102, 252, 241, 0.4);
  transition: var(--transition-fast);
  position: relative;
  z-index: 3;
}

.range-slider::-webkit-slider-thumb:hover {
  background: #fff;
  box-shadow: 0 0 15px rgba(102, 252, 241, 0.8), 0 0 0 4px rgba(102, 252, 241, 0.15);
  transform: scale(1.1);
}

.range-slider::-moz-range-track {
  background: transparent;
  border: none;
}

.range-slider::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--secondary-accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(102, 252, 241, 0.4);
  transition: var(--transition-fast);
  position: relative;
  z-index: 3;
}

.range-slider::-moz-range-thumb:hover {
  background: #fff;
  box-shadow: 0 0 15px rgba(102, 252, 241, 0.8), 0 0 0 4px rgba(102, 252, 241, 0.15);
  transform: scale(1.1);
}

.slider-values {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  width: 100%;
}

.slider-values strong {
  color: var(--primary-accent);
  font-weight: 700;
}

/* Database Toolbar */
.database-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  background: rgba(21, 26, 34, 0.5);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.toolbar-select-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-select-group label {
  margin-bottom: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toolbar-select {
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 2.25rem 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA0A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

.toolbar-select:focus {
  outline: none;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 8px rgba(102, 252, 241, 0.15);
}

.view-toggles {
  display: flex;
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: var(--transition-fast);
}

.view-toggle-btn:hover {
  color: var(--text-primary);
}

.view-toggle-btn.active {
  background: rgba(102, 252, 241, 0.1);
  color: var(--secondary-accent);
}

.view-toggle-btn i {
  width: 16px;
  height: 16px;
}

/* List View Layout */
.workouts-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.workouts-grid.list-view .workout-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
}

.workouts-grid.list-view .workout-card .card-header-gradient {
  width: 6px;
  height: auto;
  align-self: stretch;
}

.workouts-grid.list-view .workout-card .card-body {
  display: grid;
  grid-template-columns: 250px 1fr 180px;
  column-gap: 2rem;
  row-gap: 0.5rem;
  align-items: start;
  padding: 1.25rem 1.75rem;
  flex: 1;
}

.workouts-grid.list-view .workout-card .card-body .card-badges {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0;
}

.workouts-grid.list-view .workout-card .card-body h3 {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.workouts-grid.list-view .workout-card .card-body h4 {
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.workouts-grid.list-view .workout-card .card-body p.desc {
  grid-column: 2;
  grid-row: 2;
  margin-bottom: 0;
}

.workouts-grid.list-view .workout-card .card-body .card-footer {
  grid-column: 3;
  grid-row: 1 / span 2;
  border-top: none;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  align-self: center;
}

.workouts-grid.list-view .workout-card .card-body .card-footer .card-goal {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .workouts-grid.list-view .workout-card {
    flex-direction: column;
    align-items: stretch;
  }
  .workouts-grid.list-view .workout-card .card-header-gradient {
    width: 100%;
    height: 6px;
  }
  .workouts-grid.list-view .workout-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1rem;
  }
  .workouts-grid.list-view .workout-card .card-body .card-badges {
    margin-bottom: 1rem;
  }
  .workouts-grid.list-view .workout-card .card-body h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }
  .workouts-grid.list-view .workout-card .card-body h4 {
    margin-bottom: 1rem;
  }
  .workouts-grid.list-view .workout-card .card-body p.desc {
    margin-bottom: 1.5rem;
  }
  .workouts-grid.list-view .workout-card .card-body .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Pagination Controls */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-family-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: rgba(102, 252, 241, 0.15);
  border-color: var(--secondary-accent);
  color: var(--secondary-accent);
  box-shadow: 0 0 10px rgba(var(--secondary-accent-rgb), 0.2);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   9. FRONTEND ADMIN PANEL DASHBOARD STYLES
   ========================================================================== */
#admin-section {
  padding-bottom: 5rem;
}

.admin-panel-card {
  border: 1px solid var(--border-color);
  background: rgba(21, 26, 34, 0.85);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
}

.admin-dashboard-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.admin-tabs {
  margin-top: 1rem;
}

.admin-tab-btn {
  font-family: var(--font-family-display);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.admin-tab-btn:hover {
  color: var(--text-primary) !important;
}

.admin-tab-btn.active {
  color: var(--secondary-accent) !important;
  border-bottom: 2px solid var(--secondary-accent) !important;
}

.admin-tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.admin-tab-content.active {
  display: block;
}

.admin-table {
  width: 100%;
  margin-top: 1rem;
}

.admin-table th {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.admin-table td {
  padding: 1rem 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.admin-table tr:hover td {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.admin-table-wrapper {
  background: rgba(10, 12, 16, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
}

/* Badge tags for audit actions */
.audit-badge {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.audit-badge.create { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.audit-badge.update { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.audit-badge.delete { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.audit-badge.login { background: rgba(102, 252, 241, 0.15); color: var(--secondary-accent); }
.audit-badge.config { background: rgba(155, 89, 182, 0.15); color: #9b59b6; }

/* Config grid form styles */
.admin-configs-grid textarea {
  resize: vertical;
}

/* Diff modals text styles */
pre#diff-old-values, pre#diff-new-values {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.action-row-btns {
  display: flex;
  gap: 0.5rem;
}

.action-row-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.action-row-btn.edit:hover {
  color: var(--secondary-accent);
}

.action-row-btn.delete:hover {
  color: #ff4d4d;
}
