/* ============================================================
   HeatMap Fitness — Design System
   ============================================================ */

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

:root {
  /* Core palette */
  --navy:          #060d1f;
  --navy-2:        #0d1b3e;
  --navy-3:        #162456;
  --blue:          #2563eb;
  --blue-dark:     #1d4ed8;
  --blue-light:    #3b82f6;
  --sky:           #0ea5e9;
  --indigo:        #4f46e5;

  /* Surfaces */
  --bg:            #f0f5ff;
  --surface:       #ffffff;
  --surface-2:     #f8faff;
  --border:        #e1eaf8;
  --border-strong: #c7d9f8;

  /* Text */
  --text:          #0d1b3e;
  --text-2:        #4a5b82;
  --text-3:        #8fa3c7;
  --text-inv:      #ffffff;

  /* Status */
  --success:       #10b981;
  --success-bg:    #ecfdf5;
  --warning:       #f59e0b;
  --warning-bg:    #fffbeb;
  --danger:        #ef4444;
  --danger-bg:     #fef2f2;

  /* Gradients */
  --grad-nav:      linear-gradient(160deg, #060d1f 0%, #0d1b3e 60%, #162456 100%);
  --grad-blue:     linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #0ea5e9 100%);
  --grad-card:     linear-gradient(145deg, #1d4ed8 0%, #1e3a8a 40%, #0d1b3e 100%);
  --grad-surface:  linear-gradient(145deg, #f8faff 0%, #eff6ff 100%);
  --grad-hero:     linear-gradient(135deg, #060d1f 0%, #0d1b3e 35%, #1d4ed8 75%, #0ea5e9 100%);

  /* Shape */
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --radius-pill:   999px;

  /* Shadows */
  --shadow-xs:     0 1px 2px rgba(6,13,31,0.04);
  --shadow-sm:     0 1px 3px rgba(6,13,31,0.06), 0 4px 12px rgba(37,99,235,0.06);
  --shadow:        0 2px 6px rgba(6,13,31,0.06), 0 8px 24px rgba(37,99,235,0.08);
  --shadow-lg:     0 4px 12px rgba(6,13,31,0.08), 0 16px 40px rgba(37,99,235,0.14);
  --shadow-blue:   0 4px 16px rgba(37,99,235,0.35);

  /* Transitions */
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --dur:           0.18s;
}

/* ── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* ── Layout ───────────────────────────────────────────────── */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */

.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--grad-nav);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: var(--shadow-blue);
}

.sidebar-brand-text {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sidebar-brand-text span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

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

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 0.5rem;
  margin-bottom: 0.375rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  margin-bottom: 2px;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,0.5) 0%, rgba(14,165,233,0.3) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(37,99,235,0.2);
}

.sidebar-link-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  background: var(--grad-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

/* ── Main content area ────────────────────────────────────── */

.app-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}

.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-content {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
}

/* ── Guest layout (top navbar) ────────────────────────────── */

.navbar.guest-nav {
  background: var(--grad-nav) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.875rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar.guest-nav .navbar-brand {
  font-weight: 800;
  font-size: 18px;
  color: #fff !important;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar.guest-nav .navbar-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--grad-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-blue);
}

.navbar.guest-nav .nav-link {
  color: rgba(255,255,255,0.65) !important;
  font-weight: 500;
  font-size: 14px;
  transition: color var(--dur) var(--ease);
  padding: 0.4rem 0.75rem;
}

.navbar.guest-nav .nav-link:hover,
.navbar.guest-nav .nav-link.active {
  color: #fff !important;
}

.navbar.guest-nav .btn-signup {
  background: var(--grad-blue);
  color: #fff !important;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  padding: 0.375rem 1rem;
  box-shadow: var(--shadow-blue);
  transition: all var(--dur) var(--ease);
  border: none;
}

.navbar.guest-nav .btn-signup:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
}

.guest-main > .container {
  padding-top: 80px;
  padding-bottom: 2rem;
}

/* ── Page headers ─────────────────────────────────────────── */

.page-header {
  margin-bottom: 2rem;
}

.page-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 0.25rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  background: var(--grad-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-title {
  font-weight: 600;
  color: var(--text);
  margin: 0;
  font-size: 15px;
}

.card-body { padding: 1.25rem; }

/* Blue gradient stat cards */
.stat-card {
  background: var(--grad-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #fff;
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.stat-card-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.stat-card-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-icon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 28px;
  opacity: 0.3;
}

/* Light stat cards */
.stat-card-light {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-blue);
}

.stat-card-light .stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.stat-card-light .stat-card-label {
  color: var(--text-2);
  font-size: 13px;
}

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

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
  font-size: 14px;
  line-height: 1.4;
}

.btn-primary {
  background: var(--grad-blue);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-blue);
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: var(--grad-blue);
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
  color: #fff;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-blue);
}

.btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(37,99,235,0.25), var(--shadow-blue);
}

.btn-outline-primary {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-outline-primary:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

.btn-outline-secondary {
  border-color: var(--border-strong);
  color: var(--text-2);
  background: var(--surface);
}

.btn-outline-secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.btn-success:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16,185,129,0.4);
  color: #fff;
}

.btn-lg {
  padding: 0.625rem 1.5rem;
  font-size: 15px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 13px;
  border-radius: 6px;
}

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

.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 0.5rem 0.875rem;
  transition: all var(--dur) var(--ease);
}

.form-control:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.form-control.form-control-sm, .form-select.form-select-sm {
  font-size: 13px;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}

.form-label {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 0.375rem;
  letter-spacing: 0.01em;
}

.input-group .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* ── Tables ───────────────────────────────────────────────── */

.table {
  font-size: 14px;
  color: var(--text);
}

.table th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  background: var(--surface-2);
  border-bottom: 1.5px solid var(--border);
  padding: 0.625rem 0.875rem;
}

.table td {
  padding: 0.6rem 0.875rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table-light { background: var(--surface-2) !important; }

/* ── Badges ───────────────────────────────────────────────── */

.badge {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.02em;
  border-radius: 99px;
  padding: 0.25em 0.6em;
}

.badge.bg-primary { background: rgba(37,99,235,0.12) !important; color: var(--blue) !important; }
.badge.bg-secondary { background: rgba(74,91,130,0.1) !important; color: var(--text-2) !important; }
.badge.bg-success { background: rgba(16,185,129,0.12) !important; color: #059669 !important; }
.badge.bg-warning { background: rgba(245,158,11,0.12) !important; color: #b45309 !important; }
.badge.bg-danger { background: rgba(239,68,68,0.1) !important; color: #dc2626 !important; }
.badge.bg-light { background: var(--surface-2) !important; color: var(--text-2) !important; border: 1px solid var(--border); }
.badge.bg-dark { background: rgba(13,27,62,0.08) !important; color: var(--text) !important; }

/* ── Alerts ───────────────────────────────────────────────── */

.alert {
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  padding: 0.875rem 1.125rem;
}

.alert-success {
  background: var(--success-bg);
  color: #065f46;
  border-left: 3px solid var(--success);
}

.alert-danger {
  background: var(--danger-bg);
  color: #991b1b;
  border-left: 3px solid var(--danger);
}

.alert-warning {
  background: var(--warning-bg);
  color: #92400e;
  border-left: 3px solid var(--warning);
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border-left: 3px solid var(--blue);
}

.alert-light {
  background: var(--surface-2);
  color: var(--text-2);
  border-left: 3px solid var(--border-strong);
}

/* ── List groups ──────────────────────────────────────────── */

.list-group { border-radius: var(--radius); overflow: hidden; }

.list-group-item {
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  transition: background var(--dur) var(--ease);
}

.list-group-item:last-child { border-bottom: none; }

.list-group-item.list-group-item-action:hover {
  background: var(--surface-2);
  color: var(--text);
}

.list-group-item-action {
  cursor: pointer;
}

/* ── Breadcrumb ───────────────────────────────────────────── */

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
  font-size: 13px;
}

.breadcrumb-item { color: var(--text-2); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-3); }
.breadcrumb-item.active { color: var(--text-2); }
.breadcrumb-item a { color: var(--text-2); font-weight: 500; }
.breadcrumb-item a:hover { color: var(--blue); }

/* ── Hero section (landing page) ─────────────────────────── */

.hero-section {
  background: var(--grad-hero);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,0.25) 0%, transparent 60%);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(79,70,229,0.2) 0%, transparent 60%);
  border-radius: 50%;
}

.hero-section .hero-inner {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  padding: 0.25rem 0.875rem;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #60a5fa, #a5f3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.btn-hero-primary {
  background: #fff;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 15px;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all var(--dur) var(--ease);
  display: inline-block;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  color: var(--blue-dark);
  text-decoration: none;
}

.btn-hero-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.25);
  transition: all var(--dur) var(--ease);
  display: inline-block;
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Feature cards (landing) ──────────────────────────────── */

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(37,99,235,0.12);
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

/* ── Auth cards ───────────────────────────────────────────── */

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-card-header {
  background: var(--grad-hero);
  padding: 2rem;
  text-align: center;
  color: #fff;
}

.auth-card-body {
  padding: 2rem;
}

.auth-logo {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 1rem;
  border: 1px solid rgba(255,255,255,0.25);
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.auth-subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  margin-top: 0.25rem;
}

/* ── Workout log specific ─────────────────────────────────── */

.workout-entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  transition: box-shadow var(--dur) var(--ease);
}

.workout-entry-card:hover {
  box-shadow: var(--shadow);
}

.workout-entry-header {
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workout-entry-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.set-row {
  transition: background var(--dur) var(--ease);
}

.set-row:hover {
  background: var(--surface-2);
}

.set-number-badge {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────── */

.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================================================
   MOBILE-FIRST OVERHAUL — Appended to site.css
   ============================================================ */

/* ── Mobile header bar ────────────────────────────────────── */

.mobile-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: 54px;
}

.mobile-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background var(--dur) var(--ease);
}

.mobile-hamburger:hover,
.mobile-hamburger:active {
  background: rgba(255,255,255,0.08);
}

.mobile-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-brand {
  font-weight: 800;
  font-size: 17px;
  color: #fff !important;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-avatar {
  width: 34px;
  height: 34px;
  background: var(--grad-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-blue);
  flex-shrink: 0;
}

/* ── Mobile bottom tab bar ────────────────────────────────── */

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 110;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(6,13,31,0.1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  align-items: stretch;
  justify-content: stretch;
}

.mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 6px;
  text-decoration: none !important;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  min-height: 54px;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.mobile-tab:hover,
.mobile-tab.active {
  color: var(--blue);
  text-decoration: none !important;
}

.mobile-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--blue);
  border-radius: 0 0 2px 2px;
}

.mobile-tab-icon {
  font-size: 21px;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
}

.mobile-tab.active .mobile-tab-icon {
  transform: scale(1.1);
}

/* Center CTA tab */
.mobile-tab.cta {
  color: var(--text-2);
}

.mobile-tab.cta::before { display: none; }

.mobile-tab-cta-btn {
  width: 46px;
  height: 46px;
  background: var(--grad-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-blue);
  margin-bottom: 1px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  margin-top: -8px;
}

.mobile-tab.cta:hover .mobile-tab-cta-btn,
.mobile-tab.cta:active .mobile-tab-cta-btn {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
}

/* ── Comprehensive mobile layout overrides ────────────────── */

@media (max-width: 991px) {

  /* Fix app-main margin (no sidebar on mobile) */
  .app-main { margin-left: 0 !important; }

  /* Content: account for bottom nav */
  .app-content {
    padding: 1rem 1rem calc(68px + env(safe-area-inset-bottom, 0px));
    max-width: 100%;
  }

  /* Page title */
  .page-title { font-size: 1.375rem; letter-spacing: -0.02em; }

  /* Page header — stack on mobile */
  .page-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
  }
  .page-header { margin-bottom: 1.25rem; }

  /* Stat cards */
  .stat-card, .stat-card-light {
    padding: 1rem 1.125rem;
  }
  .stat-card-value       { font-size: 1.875rem; }
  .stat-card-light .stat-card-value { font-size: 1.75rem; }
  .stat-card-icon        { font-size: 22px; top: 0.875rem; right: 0.875rem; }

  /* Cards */
  .card-body   { padding: 0.875rem; }
  .card-header { padding: 0.75rem 0.875rem; }
  .card        { border-radius: 12px; }

  /* Hero section */
  .hero-section {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
  }
  .hero-title { font-size: 1.875rem; }
  .hero-subtitle { font-size: 0.9rem; }
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn-hero-primary,
  .btn-hero-secondary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.875rem;
  }

  /* Auth */
  .auth-card-header { padding: 1.5rem 1.125rem; }
  .auth-card-body   { padding: 1.125rem; }

  /* Forms — prevent iOS zoom & bigger touch targets */
  .form-control,
  .form-select {
    font-size: 16px !important; /* prevents iOS auto-zoom */
    min-height: 46px;
    padding: 0.625rem 0.875rem;
  }
  .form-control-sm { min-height: 38px; font-size: 14px !important; }

  .btn {
    min-height: 44px;
    padding: 0.625rem 1rem;
  }
  .btn-sm  { min-height: 36px; padding: 0.375rem 0.75rem; font-size: 13px; }
  .btn-lg  { min-height: 50px; padding: 0.75rem 1.5rem; font-size: 16px; }

  /* Larger list items */
  .list-group-item {
    padding: 0.875rem 1rem;
    min-height: 52px;
    display: flex;
    align-items: center;
  }

  /* Tables: hide RPE and Type columns on very small screens */
  .table { font-size: 13px; }
  .table th, .table td { padding: 0.5rem 0.625rem; }

  /* Workout entry card */
  .workout-entry-card { margin-bottom: 0.75rem; }

  /* Feature cards */
  .feature-card { padding: 1.25rem; }
}

@media (max-width: 575px) {
  .hero-title    { font-size: 1.625rem; }
  .app-content   { padding: 0.875rem 0.875rem calc(68px + env(safe-area-inset-bottom, 0px)); }

  /* Row gutters */
  .row.g-4 { --bs-gutter-x: 0.75rem; --bs-gutter-y: 0.75rem; }
  .row.g-3 { --bs-gutter-x: 0.625rem; --bs-gutter-y: 0.625rem; }

  /* Stat card value even more compact */
  .stat-card-value { font-size: 1.625rem; }
}

/* ── iOS safe area ────────────────────────────────────────── */

@supports (padding: env(safe-area-inset-bottom)) {
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── Settings mobile: horizontal scroll tabs ─────────────── */

@media (max-width: 767px) {
  /* Hide settings vertical nav on mobile, show horizontal scroll */
  .settings-side-nav { display: none; }
  .settings-horizontal-nav {
    display: flex !important;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.5rem 0 0.75rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.75rem;
  }
  .settings-horizontal-nav::-webkit-scrollbar { display: none; }
  .settings-horizontal-nav a {
    white-space: nowrap;
    padding: 0.4375rem 0.875rem;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text-2);
    text-decoration: none;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all var(--dur) var(--ease);
  }
  .settings-horizontal-nav a.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
  }
}
