/* ============================================================
   BLOCK BELLS™ — Member Area Styles v5
   assets/css/member.css
   Palette: Red #E50000 | Warm White #F0EEEB | Charcoal #1A1917
            Mid Grey #C8C5BF | Dark Grey #6B6966 | White #FFFFFF
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #F0EEEB;
  color: #1A1917;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── CSS VARIABLES ─────────────────────────────────── */
:root {
  --red:        #E50000;
  --red-dark:   #B80000;
  --red-glow:   rgba(229,0,0,0.2);
  --charcoal:   #1A1917;
  --warm-white: #F0EEEB;
  --grey-light: #E8E5E2;
  --grey-mid:   #C8C5BF;
  --grey-dark:  #6B6966;
  --white:      #FFFFFF;
  --sidebar-w:  248px;
  --font-head:  'Bebas Neue', sans-serif;
  --font-body:  'DM Sans', sans-serif;
}

/* ══════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #1A1917;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 26px 24px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
  display: block;
  flex-shrink: 0;
}
.sidebar-logo span { color: var(--red); }

.sidebar-member {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.member-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.member-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.member-plan {
  display: inline-block;
  background: rgba(229,0,0,0.12);
  border: 1px solid rgba(229,0,0,0.25);
  color: var(--red);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  padding: 14px 24px 6px;
  display: block;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s;
}
.nav-item:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.04);
}
.nav-item.active {
  color: #fff;
  background: rgba(229,0,0,0.1);
  border-left-color: var(--red);
  font-weight: 500;
}
.nav-icon {
  font-size: 16px;
  min-width: 22px;
  text-align: center;
  opacity: 0.7;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 18px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.sidebar-footer a:hover { color: var(--red); }

/* ══════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 40px;
  background: var(--warm-white);
}

/* ── TOP BAR ── */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}
.topbar-greeting h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 3.5vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.topbar-greeting h1 span { color: var(--red); }
.topbar-greeting p {
  font-size: 14px;
  font-weight: 300;
  color: var(--grey-dark);
}
.topbar-date {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: right;
  flex-shrink: 0;
}
.topbar-date strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 2px;
}
.topbar-date span {
  font-size: 13px;
  font-weight: 300;
  color: var(--grey-dark);
}

/* ── BANNERS ── */
.plan-ready-banner {
  background: #f0faf4;
  border-radius: 10px;
  border: 1px solid rgba(39,174,96,0.35);
  border-left: 3px solid #27ae60;
  padding: 18px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.plan-ready-banner .icon { font-size: 28px; flex-shrink: 0; }
.plan-ready-banner h3 { font-size: 15px; font-weight: 600; color: #1a5c35; margin-bottom: 2px; }
.plan-ready-banner p { font-size: 13px; font-weight: 300; color: #2e7d50; }

.status-banner {
  background: #fff8f8;
  border-radius: 10px;
  border: 1px solid rgba(229,0,0,0.2);
  border-left: 3px solid var(--red);
  padding: 18px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.status-banner p { font-size: 14px; font-weight: 300; color: var(--charcoal); }
.status-banner a {
  background: var(--red);
  color: #fff;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.status-banner a:hover { background: var(--red-dark); }

/* ── WEIGH-IN BANNER (prominent) ── */
.weighin-banner {
  background: var(--charcoal);
  border-radius: 12px;
  border-left: 4px solid var(--red);
  padding: 20px 28px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.weighin-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.weighin-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.weighin-title {
  font-family: var(--font-head);
  font-size: 20px;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.weighin-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--grey-mid);
}
.weighin-last {
  font-size: 13px;
  color: var(--grey-mid);
  text-align: right;
}
.weighin-last strong {
  display: block;
  font-family: var(--font-head);
  font-size: 28px;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 2px;
}
.weighin-last strong em { color: var(--red); font-style: normal; font-size: 18px; }
.btn-weighin {
  background: var(--red);
  color: #fff;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-weighin:hover { background: var(--red-dark); }

/* Weigh-in inline form */
.weighin-form {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.weighin-form.show { display: flex; }
.weighin-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  width: 110px;
  outline: none;
  transition: border-color 0.2s;
}
.weighin-input:focus { border-color: var(--red); }
.weighin-input::placeholder { color: rgba(255,255,255,0.3); }

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  padding: 22px 18px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grey-light);
  transition: background 0.3s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--grey-mid); }
.stat-card:hover::before { background: var(--red); }
.stat-icon { font-size: 22px; margin-bottom: 12px; }
.stat-value {
  font-family: var(--font-head);
  font-size: 38px;
  line-height: 1;
  color: var(--charcoal);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.stat-value.red { color: var(--red); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── MAIN GRID ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* ── CARDS ── */
.card {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
}
.card-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.card-title {
  font-family: var(--font-head);
  font-size: 24px;
  letter-spacing: 0.03em;
  color: var(--charcoal);
}
.card-title span { color: var(--red); }
.card-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  transition: opacity 0.2s;
}
.card-link:hover { opacity: 0.75; }

/* ── EXERCISE LIST ── */
.exercise-list { padding: 4px 0; }
.exercise-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-bottom: 1px solid #F5F3F0;
  text-decoration: none;
  color: var(--charcoal);
  transition: background 0.15s;
}
.exercise-item:last-child { border-bottom: none; }
.exercise-item:hover { background: var(--warm-white); }
.ex-thumb {
  width: 48px; height: 48px;
  background: var(--warm-white);
  border: 1px solid var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ex-info { flex: 1; min-width: 0; }
.ex-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex-meta {
  font-size: 12px;
  font-weight: 300;
  color: var(--grey-dark);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ex-sets {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--red);
  text-align: right;
  min-width: 54px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  line-height: 1;
}
.ex-sets small {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 300;
  color: var(--grey-mid);
  display: block;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.no-workout {
  padding: 48px 28px;
  text-align: center;
}
.no-workout .icon { font-size: 44px; margin-bottom: 16px; }
.no-workout h3 {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.no-workout p {
  font-size: 14px;
  font-weight: 300;
  color: var(--grey-dark);
  margin-bottom: 24px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.workout-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--grey-light);
  background: var(--warm-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.day-badge {
  background: rgba(229,0,0,0.08);
  border: 1px solid rgba(229,0,0,0.2);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
}
.btn-start-workout {
  background: var(--red);
  color: #fff;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.btn-start-workout:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ── BUTTONS ── */
.btn-red {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-1px); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--charcoal);
  padding: 11px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1.5px solid var(--grey-mid);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--charcoal); }

/* ── SIDE CARDS ── */
.side-cards { display: flex; flex-direction: column; gap: 16px; }

/* Streak card */
.streak-card {
  background: var(--charcoal);
  border-radius: 12px;
  border-left: 4px solid var(--red);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.streak-card::before {
  content: '';
  position: absolute;
  top: -30px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(229,0,0,0.12), transparent 65%);
  pointer-events: none;
}
.streak-fire { font-size: 40px; margin-bottom: 6px; position: relative; }
.streak-number {
  font-family: var(--font-head);
  font-size: 68px;
  color: var(--red);
  line-height: 1;
  position: relative;
  letter-spacing: 0.02em;
}
.streak-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-top: 6px;
  position: relative;
}
.streak-sub {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  margin-top: 10px;
  position: relative;
  line-height: 1.5;
}

/* Profile card */
.profile-card {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  padding: 22px;
}
.profile-card-title {
  font-family: var(--font-head);
  font-size: 20px;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-light);
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid #F5F3F0;
}
.profile-row:last-of-type { border-bottom: none; }
.profile-row .plabel { color: var(--grey-dark); font-weight: 300; }
.profile-row .pvalue { font-weight: 600; color: var(--charcoal); }
.profile-row .pvalue.red { color: var(--red); }
.edit-profile-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.edit-profile-link:hover { color: var(--red); }

/* Quick links */
.quick-links {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 12px;
  overflow: hidden;
}
.quick-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #F5F3F0;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
}
.quick-link-item:last-child { border-bottom: none; }
.quick-link-item:hover { background: var(--warm-white); color: var(--red); }
.quick-link-item .ql-icon { font-size: 18px; min-width: 24px; }
.quick-link-item .ql-arrow { margin-left: auto; color: var(--grey-mid); font-size: 14px; }
.quick-link-item:hover .ql-arrow { color: var(--red); }

/* ── FORMS (member area) ── */
.form-group { display: flex; flex-direction: column; margin-bottom: 18px; }
.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--charcoal);
  background: #fff;
  border: 1.5px solid var(--grey-light);
  padding: 13px 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--red); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--grey-mid); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.form-hint { font-size: 12px; color: var(--grey-mid); margin-top: 4px; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  white-space: nowrap;
}
.badge-green  { background: #f0faf4; color: #1a7a40; border: 1px solid rgba(39,174,96,0.25); }
.badge-orange { background: #fff8ec; color: #b36200; border: 1px solid rgba(243,156,18,0.25); }
.badge-red    { background: rgba(229,0,0,0.07); color: var(--red); border: 1px solid rgba(229,0,0,0.2); }
.badge-grey   { background: var(--warm-white); color: var(--grey-dark); border: 1px solid var(--grey-light); }

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  border-left: 3px solid;
  margin-bottom: 20px;
}
.alert-success { background: #f0faf4; border-color: #27ae60; color: #1a5c35; }
.alert-error   { background: #fff8f8; border-color: var(--red); color: #7a1010; }
.alert-info    { background: #f0f4ff; border-color: #3b5bdb; color: #1e3a8a; }

/* ── DATA TABLES ── */
.data-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 14px; }
.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-dark);
  border-bottom: 1.5px solid var(--grey-light);
  white-space: nowrap;
  background: var(--warm-white);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #F5F3F0;
  color: var(--charcoal);
  font-weight: 300;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--warm-white); }

/* ── PROGRESS BAR ── */
.progress-track {
  height: 6px;
  background: var(--grey-light);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--red);
  transition: width 0.5s ease;
}

/* ── EXERCISE / WORKOUT SPECIFIC ── */
.day-card {
  background: #fff;
  border: 1px solid var(--grey-light);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  margin-bottom: 12px;
}
.day-card:hover { border-color: var(--grey-mid); transform: translateY(-1px); }
.day-card.today-card { border-color: var(--red); border-left-width: 3px; }
.day-card.completed-card { border-color: rgba(39,174,96,0.4); }

.set-btn {
  width: 46px; height: 46px;
  background: var(--warm-white);
  border: 1.5px solid var(--grey-light);
  color: var(--charcoal);
  font-family: var(--font-head);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.set-btn:hover { border-color: var(--red); color: var(--red); background: rgba(229,0,0,0.05); }
.set-btn.set-done { background: rgba(229,0,0,0.08); border-color: var(--red); color: var(--red); }

.rest-timer {
  display: none;
  background: var(--warm-white);
  border: 1px solid var(--grey-light);
  border-left: 3px solid var(--red);
  padding: 12px 18px;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.rest-timer.show { display: flex; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card { animation: fadeUp 0.4s ease both; }
.stat-card:nth-child(1) { animation-delay: 0.04s; }
.stat-card:nth-child(2) { animation-delay: 0.09s; }
.stat-card:nth-child(3) { animation-delay: 0.14s; }
.stat-card:nth-child(4) { animation-delay: 0.19s; }

/* ── MOBILE HAMBURGER ── */
.hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,0.1);
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #fff;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 40;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Sidebar */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.3); }
  .sidebar-overlay.open { display: block; }
  .hamburger { display: flex; }

  /* Main content */
  .main-content { margin-left: 0 !important; padding: 70px 16px 40px !important; }

  /* Stats */
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  /* Dashboard grid */
  .dash-grid { grid-template-columns: 1fr; }

  /* Weigh-in banner */
  .weighin-banner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .weighin-last { text-align: left; }
  .weighin-banner::before { font-size: 50px; right: 12px; }

  /* Topbar */
  .topbar { flex-direction: column; gap: 10px; }
  .topbar-date { text-align: left; width: 100%; }

  /* Exercise items - prevent overflow */
  .exercise-item { flex-wrap: wrap; }
  .ex-info { min-width: 0; flex: 1; }
  .ex-sets { flex-shrink: 0; }

  /* Progress ring - scale down */
  .progress-ring-wrap { width: 160px !important; height: 160px !important; }

  /* Data tables - scroll horizontally */
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 500px; }

  /* Nav items with nowrap - allow wrap */
  .nav-label { white-space: normal; }

  /* Workout footer */
  .workout-footer { flex-direction: column; gap: 10px; }
  .btn-start-workout { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  /* Tighter padding */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .main-content { padding: 66px 12px 32px !important; }

  /* Cards */
  .card-header { padding: 16px 18px 14px; }
  .card-body { padding: 16px 18px; }

  /* Stat cards */
  .stat-card { padding: 16px 14px; }
  .stat-value { font-size: 28px; }

  /* Page titles */
  .page-title { font-size: clamp(28px, 8vw, 48px); }

  /* Quick links grid */
  .quick-links-grid { grid-template-columns: repeat(2, 1fr); }

  /* Progress ring */
  .progress-ring-wrap { width: 140px !important; height: 140px !important; }

  /* Topbar date */
  .topbar-date { padding: 10px 14px; }
}
