@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --font-size: 16px;
  --primary: oklch(0.55 0.18 230);
  --primary-foreground: #ffffff;
  --accent: oklch(0.85 0.15 150);
  --accent-foreground: #000000;
  --background: oklch(0.98 0.02 50);
  --foreground: oklch(0.15 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.15 0 0);
  --muted: oklch(0.92 0.02 50);
  --muted-foreground: oklch(0.55 0 0);
  --destructive: oklch(0.50 0.18 25);
  --destructive-foreground: #ffffff;
  --border: oklch(0.88 0.02 50);
  --input-bg: oklch(0.96 0.02 50);
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

.dark {
  --background: oklch(0.16 0 0);
  --foreground: oklch(0.97 0 0);
  --card: oklch(0.21 0 0);
  --card-foreground: oklch(0.97 0 0);
  --muted: oklch(0.27 0 0);
  --muted-foreground: oklch(0.78 0 0);
  --primary: oklch(0.68 0.18 230);
  --accent: oklch(0.26 0 0);
  --accent-foreground: oklch(0.97 0 0);
  --border: oklch(0.35 0 0);
  --input-bg: oklch(0.24 0 0);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

html {
  font-size: var(--font-size);
  font-family: 'Outfit', sans-serif;
}

body {
  background: var(--background);
  background-image: 
    radial-gradient(ellipse at top left, oklch(0.55 0.18 230 / 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, oklch(0.55 0.18 230 / 0.04) 0%, transparent 50%);
  color: var(--foreground);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
  max-width: 100vw;
  overflow-x: hidden;
}

.dark body {
  background-image: 
    radial-gradient(ellipse at top left, oklch(0.68 0.18 230 / 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, oklch(0.68 0.18 230 / 0.04) 0%, transparent 50%);
}

.hidden {
  display: none !important;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#main-page {
  display: flex;
  flex-direction: column;
}

.login-container {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 
    0 0 40px oklch(0.55 0.18 230 / 0.15),
    0 4px 20px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
}

.app-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px oklch(0.55 0.18 230 / 0.5);
  font-size: 48px;
}

.login-container h1 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.form-group input::placeholder {
  color: var(--muted-foreground);
}

.form-group small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

button[type="submit"],
.btn-primary {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #ff4569 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button[type="submit"]:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--primary-glow);
}

button[type="submit"]:disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.error {
  color: var(--destructive);
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.success {
  color: #00e676;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  padding: 0 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.switch-link {
  text-align: center;
  color: var(--muted-foreground);
}

.switch-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.switch-link a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  box-sizing: border-box;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#logout-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

#logout-btn:hover {
  background: var(--muted);
}

/* Tab Bar */
.tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  position: sticky;
  top: 60px;
  z-index: 150;
  box-sizing: border-box;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 0;
}

.tab-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(255, 23, 68, 0.1);
}

.tab-icon {
  font-size: 1.25rem;
}

.tab-label {
  font-size: 0.7rem;
  font-weight: 500;
}

.content {
  padding: 1.5rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 1rem;
  padding-bottom: 5rem;
  box-sizing: border-box;
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
}

/* Workout Exercise Card */
.workout-exercise-card {
  background: var(--card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.btn-remove-exercise {
  background: var(--destructive);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Exercise Results Dropdown */
.exercise-results {
  max-height: 200px;
  overflow-y: auto;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
}

.exercise-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  color: var(--foreground);
}

.exercise-result-item:last-child {
  border-bottom: none;
}

.exercise-result-item:hover {
  background: var(--muted);
  color: var(--primary);
}

.selected-exercise-name {
  font-weight: 600;
  color: var(--primary);
  padding: 0.5rem;
  background: var(--muted);
  border-radius: var(--radius-sm);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* List */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  background: var(--card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.list-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.list-item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.list-item-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

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

.card {
  background: var(--card);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filters input,
.filters select {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 0.875rem;
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Timer */
.timer-section {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  text-align: center;
  border: 1px solid var(--border);
}

.timer-section h3 {
  margin-top: 0;
  color: var(--primary);
}

.timer-display {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Outfit', monospace;
  margin: 1rem 0;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow);
}

.timer-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.timer-btn {
  padding: 0.75rem 1.25rem;
  background: var(--muted);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.timer-btn:hover,
.timer-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

#stop-timer-btn {
  background: var(--destructive);
  border-color: var(--destructive);
}

#stop-timer-btn:hover {
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.modal-content h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Responsive */
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .timer-controls {
    flex-wrap: wrap;
  }
  
  .tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    justify-content: space-evenly;
    padding: 0.5rem 0.25rem;
    border-bottom: none;
    border-top: 1px solid var(--border);
    z-index: 200;
    width: 100%;
  }
  
  .tab-btn {
    padding: 0.5rem 0.25rem;
  }
  
  .tab-label {
    display: none;
  }
  
  .tab-icon {
    font-size: 1.5rem;
  }
  
  .content {
    padding-bottom: 5rem;
    padding-top: 1rem;
  }
  
  .header {
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 200;
  }
  
  .app-title {
    font-size: 1rem;
  }
}

/* Active Workout Header */
.workout-header {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}

.workout-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1rem;
}

.workout-stat {
  text-align: center;
}

.workout-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.workout-stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.workout-actions {
  display: flex;
  gap: 0.5rem;
}

.workout-actions button {
  flex: 1;
}

/* Active Exercise Card */
.active-exercise-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}

.btn-danger {
  background: var(--destructive);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #ff4569;
}

/* Set Rows */
.sets-container {
  margin: 1rem 0;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--muted);
  border-radius: var(--radius-md);
}

.set-number {
  font-weight: 600;
  color: var(--primary);
  min-width: 1.5rem;
  text-align: center;
}

.set-value {
  display: inline-block;
  min-width: 40px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.set-value:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.set-edit-input {
  width: 50px;
  padding: 0.4rem 0.5rem;
  text-align: center;
  background: var(--input-bg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--foreground);
  font-size: 0.9rem;
}

.set-x,
.set-kg {
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.btn-add-set {
  background: transparent;
  border: 2px dashed var(--border);
  color: var(--muted-foreground);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-set:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-remove-set {
  background: transparent;
  border: none;
  color: var(--destructive);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  margin-left: auto;
}

/* Écrans d’authentification harmonisés avec Goodwater Task et Recipes. */
#login-page,
#register-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#login-page::before,
#login-page::after,
#register-page::before,
#register-page::after {
  content: '';
  position: fixed;
  z-index: -1;
  width: 23rem;
  height: 23rem;
  border-radius: 50%;
  pointer-events: none;
}

#login-page::before,
#register-page::before {
  top: -9rem;
  left: -8rem;
  background: oklch(0.84 0.09 230 / 0.38);
}

#login-page::after,
#register-page::after {
  right: -9rem;
  bottom: -10rem;
  background: oklch(0.87 0.09 153 / 0.3);
}

#login-page .login-container,
#register-page .login-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border: 1px solid color-mix(in oklch, white 74%, var(--border));
  border-radius: 28px;
  background: color-mix(in oklch, var(--card) 94%, transparent);
  box-shadow: 0 22px 60px rgb(25 75 92 / 0.14), 0 3px 14px rgb(25 75 92 / 0.06);
  backdrop-filter: blur(18px);
}

.dark #login-page .login-container,
.dark #register-page .login-container { border-color: var(--border); }

#register-page .login-container { margin-block: 1rem; }

#login-page .app-icon,
#register-page .app-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.35rem;
  border-radius: 23px;
  background: transparent;
  box-shadow: none;
}

.login-logo,
.login-logo svg { width: 76px; height: 76px; }
.login-logo svg { display: block; filter: drop-shadow(0 12px 20px oklch(0.56 0.16 220 / 0.22)); }

#login-page .login-container h1,
#register-page .login-container h1 {
  margin-bottom: 0.4rem;
  color: var(--foreground);
  font-size: 1.75rem;
  letter-spacing: -0.035em;
  background: none;
  -webkit-text-fill-color: currentColor;
}

#login-page .login-subtitle,
#register-page .login-subtitle { margin-bottom: 2rem; font-size: 0.94rem; }
#login-page .form-group label,
#register-page .form-group label { color: var(--foreground); font-weight: 600; }
#login-page .form-group input,
#register-page .form-group input { min-height: 48px; background: var(--input-bg); border-width: 1px; }
#login-page #login-submit,
#register-page #register-submit {
  min-height: 49px;
  background: linear-gradient(135deg, var(--primary), oklch(0.61 0.15 157));
  box-shadow: 0 9px 20px oklch(0.56 0.16 220 / 0.22);
  text-transform: none;
  letter-spacing: 0;
}

.login-register-link {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (max-width: 520px) {
  #login-page,
  #register-page { padding: 1rem; }
  #login-page .login-container,
  #register-page .login-container { padding: 2rem 1.3rem; border-radius: 24px; }
  #login-page .login-container h1,
  #register-page .login-container h1 { font-size: 1.55rem; }
}

/* Interface Goodwater Gym 2026 */
:root {
  --primary-soft: oklch(0.93 0.045 225);
  --success-soft: oklch(0.94 0.055 155);
  --warning-soft: oklch(0.95 0.06 82);
  --shadow-sm: 0 5px 18px rgb(26 67 82 / 0.07);
  --shadow-md: 0 18px 50px rgb(26 67 82 / 0.11);
}
.dark {
  --background: oklch(0.2 0.018 235);
  --card: oklch(0.25 0.02 235);
  --muted: oklch(0.3 0.018 235);
  --border: oklch(0.38 0.025 230);
  --input-bg: oklch(0.28 0.018 235);
  --primary-soft: oklch(0.31 0.055 225);
  --success-soft: oklch(0.3 0.045 155);
  --warning-soft: oklch(0.31 0.04 82);
}
body { background-attachment: fixed; }
.dark body { background-image: radial-gradient(circle at 8% 0%, oklch(0.36 0.07 225 / .3), transparent 30rem), radial-gradient(circle at 95% 20%, oklch(0.34 0.06 155 / .2), transparent 26rem); }

.top-banner {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 max(3%, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid color-mix(in oklch, var(--border) 75%, transparent);
  background: color-mix(in oklch, var(--card) 90%, transparent);
  backdrop-filter: blur(18px);
}
.banner-left,.banner-right { display:flex; align-items:center; gap:.8rem; }
.banner-logo,.banner-logo svg { display:block; width:40px; height:40px; }
.app-name { font-weight:700; letter-spacing:-.025em; }
.user-name { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted-foreground); font-size:.86rem; font-weight:600; }
.icon-btn,.settings-grid-btn { display:grid; place-items:center; width:40px; height:40px; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--foreground); cursor:pointer; }
.icon-btn:hover,.settings-grid-btn:hover { background:var(--primary-soft); color:var(--primary); }
.settings-grid-btn { grid-template-columns:repeat(3,4px); grid-template-rows:repeat(3,4px); gap:3px; }
.settings-grid-btn span { width:4px; height:4px; border-radius:50%; background:currentColor; }

.tab-bar {
  position:sticky; top:68px; z-index:90; display:flex; justify-content:center; gap:.35rem;
  width:min(100% - 2rem, 720px); margin:1rem auto 0; padding:.35rem;
  border:1px solid var(--border); border-radius:17px; background:color-mix(in oklch,var(--card) 92%,transparent); box-shadow:var(--shadow-sm); backdrop-filter:blur(15px);
}
.tab-btn { flex:1; min-width:0; display:flex; align-items:center; justify-content:center; gap:.45rem; padding:.68rem .75rem; border:0; border-radius:12px; background:transparent; color:var(--muted-foreground); font:inherit; font-size:.82rem; font-weight:600; cursor:pointer; }
.tab-btn:hover { color:var(--foreground); background:var(--muted); }
.tab-btn.active { color:var(--primary); background:var(--primary-soft); box-shadow:none; }
.tab-icon { font-size:1rem; }

.content { width:min(100% - 2rem,1120px); margin:0 auto; padding:2rem 0 5rem; }
.workspace-hero { display:flex; align-items:center; justify-content:space-between; gap:2rem; padding:2.2rem 2.4rem; border:1px solid var(--border); border-radius:26px; background:linear-gradient(135deg,color-mix(in oklch,var(--card) 95%,transparent),color-mix(in oklch,var(--primary-soft) 72%,var(--card))); box-shadow:var(--shadow-md); }
.workspace-hero h1,.page-heading h1 { margin:.25rem 0 .45rem; font-size:clamp(1.75rem,4vw,2.45rem); line-height:1.05; letter-spacing:-.045em; }
.workspace-hero p,.page-heading p,#start-workout-section>p { color:var(--muted-foreground); }
.eyebrow { color:var(--primary); font-size:.72rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.hero-action { width:auto; min-width:165px; text-transform:none; letter-spacing:0; }
.stats-grid { gap:1rem; margin:1.2rem 0 2rem; }
.stat-card { position:relative; align-items:flex-start; min-height:138px; padding:1.35rem; border:1px solid var(--border); border-radius:20px; background:var(--card); box-shadow:var(--shadow-sm); overflow:hidden; }
.stat-card::after { content:''; position:absolute; width:90px; height:90px; right:-35px; bottom:-45px; border-radius:50%; background:var(--primary-soft); }
.stat-value { color:var(--foreground); font-size:2rem; letter-spacing:-.04em; }
.stat-label { font-size:.8rem; }
.section-heading,.page-heading-row { display:flex; justify-content:space-between; align-items:end; gap:1rem; }
.section-heading { margin-bottom:1rem; }
.section-heading h2 { margin:.15rem 0 0; font-size:1.35rem; }
.text-btn { border:0; background:transparent; color:var(--primary); font:inherit; font-size:.85rem; font-weight:700; cursor:pointer; }
.page-heading { margin-bottom:1.5rem; }
.compact-btn { width:auto; padding:.78rem 1rem; text-transform:none; letter-spacing:0; }

.list { display:grid; gap:.65rem; }
.list-item { position:relative; padding:1rem 1.1rem; border:1px solid var(--border); border-radius:16px; background:var(--card); box-shadow:var(--shadow-sm); cursor:pointer; transition:transform .18s,border-color .18s,box-shadow .18s; }
.list-item:hover { transform:translateY(-2px); border-color:color-mix(in oklch,var(--primary) 45%,var(--border)); box-shadow:var(--shadow-md); }
.list-item-title { font-weight:650; }
.list-item-subtitle { margin-top:.3rem; color:var(--muted-foreground); font-size:.8rem; }
.empty-state { display:grid; place-items:center; min-height:190px; padding:2rem; border:1px dashed var(--border); border-radius:18px; background:color-mix(in oklch,var(--card) 80%,transparent); text-align:center; color:var(--muted-foreground); }
.empty-state strong { display:block; margin-bottom:.3rem; color:var(--foreground); }

#start-workout-section { max-width:600px; margin:2rem auto; padding:2rem; border:1px solid var(--border); border-radius:24px; background:var(--card); box-shadow:var(--shadow-md); text-align:center; }
#start-workout-section .form-group { margin:1.5rem 0 1rem; text-align:left; }
.start-workout-icon { display:grid; place-items:center; width:58px; height:58px; margin:0 auto 1rem; border-radius:18px; background:var(--primary-soft); color:var(--primary); font-size:1.7rem; }
.filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,240px); gap:.75rem; padding:.75rem; margin-bottom:1rem; border:1px solid var(--border); border-radius:17px; background:var(--card); }
.search-field { display:flex; align-items:center; gap:.5rem; padding:0 .8rem; border:1px solid var(--border); border-radius:12px; background:var(--input-bg); color:var(--muted-foreground); }
.search-field input { min-height:44px; padding:0; border:0; background:transparent; color:var(--foreground); font:inherit; }
.search-field input:focus { outline:0; box-shadow:none; }
.grid { gap:.8rem; }
.exercise-card { border:1px solid var(--border); border-radius:18px; background:var(--card); box-shadow:var(--shadow-sm); transition:.18s; }
.exercise-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }

.modal { background:rgb(10 29 38 / .56); backdrop-filter:blur(7px); }
.modal-content { border:1px solid var(--border); border-radius:24px; background:var(--card); box-shadow:0 25px 70px rgb(0 0 0 / .25); }
.settings-panel { position:relative; max-width:460px; }
.settings-panel>.btn-close { position:absolute; top:1rem; right:1rem; }
.settings-profile { display:flex; align-items:center; gap:1rem; padding-right:2rem; }
.settings-profile h2 { margin:0; }
.settings-profile p { margin:.2rem 0 0; color:var(--muted-foreground); font-size:.82rem; }
.settings-avatar { display:grid; place-items:center; width:54px; height:54px; border-radius:17px; background:linear-gradient(135deg,var(--primary),oklch(.61 .15 157)); color:white; font-size:1.2rem; font-weight:700; }
.settings-section { margin-top:1.25rem; padding-top:1.15rem; border-top:1px solid var(--border); }
.settings-label { display:block; margin-bottom:.65rem; color:var(--muted-foreground); font-size:.7rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.settings-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; width:100%; padding:.85rem; border:1px solid var(--border); border-radius:14px; background:var(--background); color:var(--foreground); text-align:left; }
.settings-row strong,.settings-row small { display:block; }.settings-row small { margin-top:.22rem; color:var(--muted-foreground); }
.settings-action { cursor:pointer; font:inherit; }.settings-action:hover { border-color:var(--primary); }
.logout-action { width:100%; margin-top:1.25rem; padding:.85rem; border:1px solid color-mix(in oklch,var(--destructive) 40%,var(--border)); border-radius:14px; background:transparent; color:var(--destructive); font:inherit; font-weight:700; cursor:pointer; }
.toast-region { position:fixed; right:1rem; bottom:1rem; z-index:2000; display:grid; gap:.5rem; }
.app-toast { min-width:250px; padding:.85rem 1rem; border-radius:13px; background:var(--foreground); color:var(--background); box-shadow:var(--shadow-md); animation:toast-in .2s ease-out; }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } }

@media (max-width:720px) {
  .top-banner { height:60px; padding:0 .85rem; }.app-name { font-size:.9rem; }.user-name { display:none; }
  .tab-bar { top:auto; bottom:0; position:fixed; z-index:500; width:100%; margin:0; padding:.4rem max(.5rem,env(safe-area-inset-right)) calc(.4rem + env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left)); border-width:1px 0 0; border-radius:0; }
  .tab-btn { flex-direction:column; gap:.12rem; padding:.35rem .2rem; font-size:.66rem; }.tab-icon { font-size:1.12rem; }
  .content { width:min(100% - 1.5rem,1120px); padding:1.2rem 0 calc(6rem + env(safe-area-inset-bottom)); }
  .workspace-hero { display:block; padding:1.45rem; border-radius:22px; }.hero-action { width:100%; margin-top:1.25rem; }
  .stats-grid { grid-template-columns:repeat(3,1fr); gap:.5rem; }.stat-card { min-height:112px; padding:.9rem .75rem; border-radius:16px; }.stat-value { font-size:1.55rem; }.stat-label { font-size:.68rem; }
  .page-heading-row { align-items:center; }.compact-btn { padding:.7rem .8rem; font-size:.78rem; }
  .filters { grid-template-columns:1fr; padding:.6rem; }.settings-panel { max-height:calc(100vh - 2rem); overflow:auto; }
  .toast-region { left:.75rem; right:.75rem; bottom:5.5rem; }.app-toast { min-width:0; }
}
