/* ═══════════════════════════════════════════════════
   FitForge — Dark Industrial PWA Stylesheet
   Fonts: Barlow Condensed (display), Barlow (body), DM Mono (data)
═══════════════════════════════════════════════════ */

:root {
  --bg:          #0a0a0a;
  --bg2:         #141414;
  --bg3:         #1e1e1e;
  --border:      #2a2a2a;
  --border-hi:   #3d3d3d;
  --accent:      #ff4500;
  --accent-dim:  #cc3700;
  --accent-glow: rgba(255,69,0,0.18);
  --text:        #f0f0f0;
  --text-dim:    #888;
  --text-muted:  #555;
  --green:       #22c55e;
  --yellow:      #eab308;
  --blue:        #3b82f6;
  --radius:      10px;
  --radius-lg:   16px;
  --nav-h:       72px;
  --header-h:    56px;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  /* subtle noise texture */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ff6633; }

img { max-width: 100%; display: block; }

/* ── Header ─────────────────────────────────────── */

.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 16px;
}

.app-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--text);
  text-transform: uppercase;
}
.app-logo span { color: var(--accent); }

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.header-icon {
  font-size: 20px;
  color: var(--text-dim);
  text-decoration: none;
}

/* ── Main ────────────────────────────────────────── */

.app-main {
  padding: 16px 16px 8px;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Flash Messages ──────────────────────────────── */

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid;
}
.flash-success { background: rgba(34,197,94,0.1);  border-color: var(--green);  color: #86efac; }
.flash-error   { background: rgba(255,69,0,0.12);  border-color: var(--accent); color: #fca5a5; }
.flash-info    { background: rgba(59,130,246,0.1); border-color: var(--blue);   color: #93c5fd; }

/* ── Bottom Nav ──────────────────────────────────── */

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(14,14,14,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:hover, .nav-item.active {
  color: var(--accent);
}
.nav-icon  { font-size: 20px; line-height: 1; }
.nav-label { font-size: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-center {
  position: relative;
  flex: 0 0 64px;
}
.nav-icon-big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  margin-top: -16px;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-center:hover .nav-icon-big {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255,69,0,0.35);
}

/* ── Cards ───────────────────────────────────────── */

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-hi); }

.card-body { padding: 16px; }
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Section Headers ─────────────────────────────── */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* ── Dashboard Hero ──────────────────────────────── */

.hero {
  background: linear-gradient(135deg, var(--bg3) 0%, #1a0f0a 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
}
.hero-sub {
  font-size: 14px;
  color: var(--text-dim);
}

/* ── Gym Grid ────────────────────────────────────── */

.gym-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.gym-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.gym-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.gym-card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.gym-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gym-card-info { padding: 10px 12px 12px; }
.gym-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gym-card-meta { font-size: 12px; color: var(--text-dim); }

/* ── Add New Card ────────────────────────────────── */

.add-card {
  background: var(--bg2);
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  aspect-ratio: unset;
  min-height: 100px;
}
.add-card:hover { border-color: var(--accent); color: var(--accent); }
.add-card-icon { font-size: 28px; }
.add-card-label { font-size: 12px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Buttons ─────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { background: #ff5a1f; color: white; box-shadow: 0 4px 20px rgba(255,69,0,0.3); }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn-secondary:hover { background: var(--border); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-hi); }

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; width: 100%; }

.btn-block { width: 100%; }

/* ── Forms ───────────────────────────────────────── */

.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
textarea { resize: vertical; min-height: 90px; }

select option { background: var(--bg3); }

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check-pill {
  position: relative;
}
.check-pill input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.check-pill label {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  transition: all 0.15s;
  margin: 0;
  text-transform: none;
}
.check-pill input:checked + label {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text);
}

/* Radio group (intensity) */
.radio-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.radio-card {
  position: relative;
}
.radio-card input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.radio-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-transform: none;
  color: var(--text-dim);
  margin: 0;
}
.radio-card label .ri-emoji { font-size: 18px; }
.radio-card label .ri-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.radio-card input:checked + label {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--text);
}

/* Photo Upload */
.photo-upload-zone {
  border: 1px dashed var(--border-hi);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.photo-upload-zone:hover { border-color: var(--accent); color: var(--accent); }
.photo-upload-zone input { display: none; }
.photo-upload-zone .puz-icon { font-size: 28px; margin-bottom: 6px; }
.photo-upload-zone .puz-label { font-size: 13px; font-weight: 500; }
.photo-upload-zone .puz-hint  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .photo-delete {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: white;
  font-size: 14px;
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Workout List ─────────────────────────────────── */

.workout-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.workout-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.workout-item:hover { border-color: var(--border-hi); color: var(--text); }
.workout-item.completed { opacity: 0.6; }

.wi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--accent-glow);
  border: 1px solid rgba(255,69,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.workout-item.completed .wi-icon { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.2); }

.wi-body { flex: 1; min-width: 0; }
.wi-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wi-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.wi-arrow { color: var(--text-muted); font-size: 18px; }

/* ── Workout View ─────────────────────────────────── */

.workout-header {
  background: linear-gradient(135deg, var(--bg3) 0%, #1a0f0a 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.workout-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 8px;
}
.workout-summary { font-size: 14px; color: var(--text-dim); margin-bottom: 14px; }
.workout-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--bg3);
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge-accent { background: var(--accent-glow); border-color: rgba(255,69,0,0.25); color: var(--text); }

.section-block {
  margin-bottom: 20px;
}
.section-block-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-block-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.exercise-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
}
.exercise-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.exercise-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 6px;
  padding: 3px 7px;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.exercise-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex: 1;
}
.exercise-quick {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.exercise-toggle { color: var(--text-muted); font-size: 16px; transition: transform 0.2s; }
.exercise-card.open .exercise-toggle { transform: rotate(180deg); }

.exercise-body {
  display: none;
  padding: 0 16px 16px;
}
.exercise-card.open .exercise-body { display: block; }

.exercise-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat-box {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
}
.stat-value { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--text); }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 1px; }

.exercise-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; line-height: 1.5; }

.alts-label {
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.alt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.alt-chip {
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Warmup / cooldown simple list */
.simple-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.simple-list li {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
}
.simple-list .sl-name { font-weight: 600; margin-bottom: 1px; }
.simple-list .sl-meta { font-size: 12px; color: var(--text-dim); }

/* Tips */
.tips-list { display: flex; flex-direction: column; gap: 6px; }
.tip-item {
  display: flex;
  gap: 10px;
  background: rgba(255,69,0,0.05);
  border: 1px solid rgba(255,69,0,0.1);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
}
.tip-item::before { content: '💡'; flex-shrink: 0; }

/* ── Stats Row ────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  text-align: center;
}
.stat-card .sc-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-card .sc-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ── Settings ─────────────────────────────────────── */

.settings-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.settings-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.settings-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }

/* ── Empty State ─────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}
.empty-icon  { font-size: 48px; margin-bottom: 12px; }
.empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.empty-body  { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* ── Loader ──────────────────────────────────────── */

.loader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(4px);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.loader-overlay.show { display: flex; }

.loader-ring {
  width: 56px; height: 56px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.loader-sub { font-size: 13px; color: var(--text-muted); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:0.5} 50%{opacity:1} }

/* ── Utilities ───────────────────────────────────── */

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.text-dim    { color: var(--text-dim); }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 12px; }
.font-mono   { font-family: var(--font-mono); }

.flex        { display: flex; }
.flex-wrap   { flex-wrap: wrap; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Rest Timer ───────────────────────────────────── */

.rest-timer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.rest-timer-overlay.show { display: flex; }

.rest-timer-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.rest-timer-exercise {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
  text-align: center;
  padding: 0 24px;
}

.rest-timer-ring {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 32px;
}
.rest-timer-ring svg {
  transform: rotate(-90deg);
}
.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}
.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 8px rgba(255,69,0,0.5));
}
.rest-timer-count {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.rest-timer-num {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.rest-timer-sec {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rest-timer-actions {
  display: flex;
  gap: 12px;
}

/* Set tracking inside exercise cards */
.set-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  transition: border-color 0.2s, background 0.2s;
}
.set-row.done {
  background: rgba(34,197,94,0.07);
  border-color: rgba(34,197,94,0.2);
}
.set-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 36px;
}
.set-info {
  flex: 1;
  font-size: 13px;
  color: var(--text-dim);
}
.set-row.done .set-info { color: var(--text-muted); text-decoration: line-through; }
.set-done-btn {
  background: var(--bg2);
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.set-done-btn:hover { border-color: var(--accent); color: var(--accent); }
.set-row.done .set-done-btn {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: var(--green);
}

/* ── Split Suggestion Banner ──────────────────────── */

.split-banner {
  background: linear-gradient(135deg, rgba(255,69,0,0.08) 0%, rgba(255,69,0,0.03) 100%);
  border: 1px solid rgba(255,69,0,0.2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.split-banner-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.split-banner-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.split-banner-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.split-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.split-chip {
  padding: 4px 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(255,69,0,0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.split-chip:hover, .split-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.split-chip-rest {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.2);
  color: var(--blue);
}
.split-chip-rest:hover {
  background: rgba(59,130,246,0.15);
  border-color: var(--blue);
  color: var(--blue);
}
