/* ═══════════════════════════════════════════════
   IRONTRACK GYM  ·  Industrial Strength Design
   ═══════════════════════════════════════════════ */

/* ── THEME VARIABLES ─────────────────────────── */
:root {
  --bg: #0a0b0d;
  --surf: #111318;
  --surf2: #181b22;
  --surf3: #1e2229;
  --brd: #252830;
  --brd2: #2e3240;
  --tx: #f0f2f7;
  --tx2: #8892a4;
  --tx3: #4a5568;
  --acc: #e8a020;
  --acc2: #c4851a;
  --acc-glow: rgba(232,160,32,.18);
  --ok-bg: #0a2a14;
  --ok-tx: #68d391;
  --err-bg: #2a0a0a;
  --err-tx: #fc8181;
  --inp: #111318;
  --ov: rgba(0,0,0,.85);
  --r: 12px;
  --rs: 8px;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}



/* ── RESET ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--tx);
}

body { overflow-x: hidden; font-size: 15px; }
a { color: var(--acc); }

/* ── RTL SUPPORT ─────────────────────────────── */
[dir="rtl"] .wcard-arr { margin-left: 0; margin-right: .5rem; }
[dir="rtl"] .mem-av-wrap { margin-right: 0; margin-left: 10px; }
[dir="rtl"] .row { flex-direction: row-reverse; }
[dir="rtl"] .row.no-flip { flex-direction: row; }
[dir="rtl"] .sb { flex-direction: row-reverse; }
[dir="rtl"] .back-btn::before { content: '→'; }
[dir="rtl"] .fwd-btn::before { content: '←'; }

/* ── LOADING SCREEN ──────────────────────────── */
#ls {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity .5s ease;
}

#ls.gone { opacity: 0; pointer-events: none; }

.ls-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: logoPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 24px var(--acc-glow));
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.12); opacity: .85; }
}

/* ── LANG SWITCHER ───────────────────────────── */
.lang-bar {
  display: flex;
  gap: 4px;
  background: var(--surf2);
  border: 1px solid var(--brd);
  border-radius: 8px;
  padding: 3px;
}
.lang-btn {
  padding: 5px 10px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--tx2);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .15s;
}
.lang-btn.on {
  background: var(--acc);
  color: #000;
}
.lang-btn:hover:not(.on) { color: var(--tx); }

/* ── IDENTITY BAR (replaces topbar for members) ── */
.id-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
}
.id-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tx);
}
.id-logo span { color: var(--acc); }
.id-controls { display: flex; align-items: center; gap: 8px; }

/* ── ICON BUTTON ─────────────────────────────── */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--brd2);
  background: var(--surf2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
  color: var(--tx2);
}
.icon-btn:hover { border-color: var(--acc); color: var(--acc); }

/* ── LOGIN ───────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  position: relative;
}

/* Subtle background texture for login */
.login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,.012) 40px,
    rgba(255,255,255,.012) 41px
  );
  pointer-events: none;
}

.login-top-controls {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}
[dir="rtl"] .login-top-controls { right: auto; left: 1rem; }

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surf);
  border: 1px solid var(--brd);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: .75rem;
  filter: drop-shadow(0 4px 12px var(--acc-glow));
}
.login-logo h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.login-logo h1 span { color: var(--acc); }
.login-logo p { font-size: 13px; color: var(--tx2); margin-top: .35rem; }

/* ── FORMS ───────────────────────────────────── */
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--tx2);
  margin: 14px 0 5px;
  font-family: var(--font-display);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--brd2);
  border-radius: var(--rs);
  background: var(--inp);
  color: var(--tx);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-glow);
}

textarea { resize: vertical; min-height: 80px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  border: 1px solid var(--brd2);
  background: var(--surf2);
  color: var(--tx);
  padding: 11px 18px;
  border-radius: var(--rs);
  font-size: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .15s;
}
.btn:active { opacity: .7; transform: scale(.98); }
.btn:hover { border-color: var(--brd2); }

.btn-acc {
  background: var(--acc);
  color: #000;
  border-color: var(--acc);
  font-weight: 800;
}
.btn-acc:hover { background: var(--acc2); border-color: var(--acc2); }

.btn-red { background: #c53030; color: #fff; border-color: #c53030; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-block { width: 100%; padding: 14px; font-size: 16px; letter-spacing: 1px; }

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--surf);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-bottom: .75rem;
}

/* ── MESSAGES ────────────────────────────────── */
.msg-err {
  background: var(--err-bg);
  color: var(--err-tx);
  padding: 10px 13px;
  border-radius: var(--rs);
  font-size: 13px;
  margin-top: 10px;
  border: 1px solid rgba(197,48,48,.2);
}
.msg-ok {
  background: var(--ok-bg);
  color: var(--ok-tx);
  padding: 10px 13px;
  border-radius: var(--rs);
  font-size: 13px;
  margin-top: 10px;
  border: 1px solid rgba(104,211,145,.2);
}

/* ── SPINNER ─────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--brd2);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.load-pg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  color: var(--tx2);
}

/* ── MEMBER HERO ─────────────────────────────── */
.mem-hero {
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mem-hero::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--acc-glow), transparent 70%);
  pointer-events: none;
}

.mem-hero:active { opacity: .85; }

.hero-av {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--acc);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-display);
  margin: 0 auto .75rem;
  border: 2px solid rgba(232,160,32,.3);
}

.hero-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.hero-badge {
  display: inline-block;
  padding: 5px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.b-act { background: var(--ok-bg); color: var(--ok-tx); }
.b-exp { background: var(--err-bg); color: var(--err-tx); }

.hero-hint { font-size: 11px; color: var(--tx3); margin-top: .25rem; letter-spacing: .3px; }

/* ── TAB SWITCH ──────────────────────────────── */
.tab-sw {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: .65rem 1rem;
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
}

.tsw-btn {
  padding: 10px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--tx2);
  cursor: pointer;
  border: 1.5px solid var(--brd2);
  background: var(--surf2);
  border-radius: var(--rs);
  transition: all .15s;
}
.tsw-btn.on {
  background: var(--acc);
  color: #000;
  border-color: var(--acc);
  font-weight: 900;
}
.tsw-btn:active { opacity: .7; transform: scale(.97); }

/* ── STICKY HEADER ───────────────────────────── */
.sticky-hdr {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg);
}

/* ── DAY TABS ────────────────────────────────── */
.day-tabs {
  display: flex;
  gap: 6px;
  padding: .7rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
}
.day-tabs::-webkit-scrollbar { display: none; }

.dtab {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--surf2);
  color: var(--tx2);
  border: 1.5px solid var(--brd);
  transition: all .15s;
}
.dtab.on { background: var(--acc); color: #000; border-color: var(--acc); }
.dtab.today:not(.on) { border-color: var(--acc); color: var(--acc); }

/* ── WORKOUT CARDS ───────────────────────────── */
.wcard {
  background: var(--surf);
  border: 1.5px solid var(--brd);
  border-radius: var(--r);
  margin: .6rem 1rem;
  cursor: pointer;
  transition: border-color .2s;
  overflow: hidden;
}
.wcard:active { opacity: .85; }
.wcard.open { border-color: var(--acc); }

.wcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  gap: .5rem;
}

.wcard-left { flex: 1; min-width: 0; }

.wcard-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.wcard-meta { font-size: 13px; color: var(--tx2); margin-top: 3px; }

.wcard-arr {
  font-size: 10px;
  color: var(--tx3);
  flex-shrink: 0;
  margin-left: .5rem;
  background: var(--surf2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brd);
}
.wcard.open .wcard-arr { background: var(--acc-glow); border-color: var(--acc); color: var(--acc); }

.wcard-body { border-top: 1px solid var(--brd); padding: 1rem; }
.wcard-desc { font-size: 14px; color: var(--tx2); line-height: 1.7; margin-bottom: .75rem; }

.yt-wrap { width: 100%; aspect-ratio: 16/9; border-radius: var(--rs); overflow: hidden; margin-top: .5rem; }
.yt-wrap iframe { width: 100%; height: 100%; border: none; }

.yt-soon {
  background: var(--surf2);
  border: 1px dashed var(--brd2);
  border-radius: var(--rs);
  padding: 1rem;
  text-align: center;
  font-size: 13px;
  color: var(--tx3);
}

/* ── EMPTY MESSAGE ───────────────────────────── */
.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--tx3);
  font-size: 14px;
  line-height: 1.6;
}

/* ── MEALS ───────────────────────────────────── */
/* ── MEALS (todo style) ──────────────────────── */
.meal-list {
  margin: .6rem 1rem 2rem;
}

.meal-list-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}

.meal-list-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tx3);
}

.meal-list-sub {
  font-size: 12px;
  color: var(--tx3);
  margin-top: 2px;
}

.meal-cal-badge {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--tx);
  line-height: 1;
}
.meal-cal-badge span {
  font-size: 11px;
  font-weight: 600;
  color: var(--tx3);
  letter-spacing: .5px;
}

.meal-progress {
  height: 3px;
  background: var(--surf2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .85rem;
}
.meal-progress-bar {
  height: 100%;
  background: var(--acc);
  border-radius: 2px;
  transition: width .4s ease;
}

.meal-task {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  border-radius: var(--rs);
  background: var(--surf);
  border: 1.5px solid var(--brd);
  margin-bottom: .45rem;
  cursor: pointer;
  transition: border-color .15s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.meal-task:active { opacity: .75; }
.meal-task.done { opacity: .55; border-color: var(--brd); }

.meal-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--brd2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  color: #000;
}
.meal-task.done .meal-check {
  background: var(--acc);
  border-color: var(--acc);
}
.meal-check svg { width: 12px; height: 12px; }

.meal-task-body { flex: 1; min-width: 0; }

.meal-task-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--acc);
  font-family: var(--font-display);
  margin-bottom: 2px;
}
.meal-task.done .meal-task-label { color: var(--tx3); }

.meal-task-food {
  font-size: 14px;
  font-weight: 500;
  color: var(--tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meal-task.done .meal-task-food {
  text-decoration: line-through;
  color: var(--tx3);
}

.meal-task-cal {
  font-size: 12px;
  color: var(--tx3);
  margin-top: 2px;
}

.meal-task-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--brd2);
  flex-shrink: 0;
}
.meal-task.done .meal-task-num { color: var(--acc); }



/* ── PROFILE POPUP (bottom sheet) ────────────── */
.popup-bg {
  position: fixed;
  inset: 0;
  background: var(--ov);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: fadein .2s ease;
}

.popup-sheet {
  width: 100%;
  background: var(--surf);
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1.5rem 2.5rem;
  max-height: 88vh;
  overflow-y: auto;
}

.popup-handle {
  width: 40px;
  height: 3px;
  background: var(--brd2);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--brd);
  font-size: 14px;
}
.popup-row:last-child { border-bottom: none; }
.popup-lbl { color: var(--tx2); font-size: 12px; font-weight: 600; letter-spacing: .3px; }

.popup-sec {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--tx3);
  text-transform: uppercase;
  margin: 1.25rem 0 .5rem;
  font-family: var(--font-display);
}

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

/* ── BADGE ───────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.b-on { background: var(--ok-bg); color: var(--ok-tx); }
.b-off { background: var(--err-bg); color: var(--err-tx); }

/* ── MANAGER NAV TABS ────────────────────────── */
.mgr-tabs {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  gap: 6px;
  padding: .7rem 1rem;
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
  overflow-x: auto;
  scrollbar-width: none;
}
.mgr-tabs::-webkit-scrollbar { display: none; }

/* Manager topbar (logo + controls) */
.mgr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
}
.mgr-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.mgr-logo span { color: var(--acc); }

.mtab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--surf2);
  color: var(--tx2);
  border: 1.5px solid var(--brd);
  transition: all .15s;
}
.mtab.on { background: var(--acc); color: #000; border-color: var(--acc); }

/* ── PAGE LAYOUT ─────────────────────────────── */
.pg { padding: 1rem; max-width: 640px; margin: 0 auto; }

/* ── STAT CARDS ──────────────────────────────── */
.stats-g {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
  margin-bottom: .75rem;
}

.stat-c {
  background: var(--surf);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1rem .75rem;
  text-align: center;
}

.stat-n {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
}
.stat-l {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx2);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: var(--font-display);
}

/* ── MEMBER LIST ITEM ────────────────────────── */
.mem-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--brd);
  gap: .5rem;
}
.mem-item:last-child { border-bottom: none; }

.mem-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--acc);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  font-family: var(--font-display);
  flex-shrink: 0;
}

/* ── UTILITY ─────────────────────────────────── */
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.no-flip { flex-direction: row !important; }
.sb { display: flex; align-items: center; justify-content: space-between; }
.mt1 { margin-top: .5rem; }
.mt2 { margin-top: 1rem; }
.mb1 { margin-bottom: .5rem; }

/* Routine workout item */
.rw-item {
  background: var(--surf2);
  border: 1px solid var(--brd);
  border-radius: var(--rs);
  padding: .85rem;
  margin-bottom: .5rem;
}

/* Section heading inside pages */
.sec-hd {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tx3);
  margin: 1.25rem 0 .6rem;
}

/* ── CUSTOM SELECT ───────────────────────────── */
.csel {
  position: relative;
  user-select: none;
}

.csel-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--brd2);
  border-radius: var(--rs);
  background: var(--inp);
  color: var(--tx);
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.csel-trigger.open,
.csel-trigger:hover {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-glow);
}

.csel-val { flex: 1; }
.csel-val.placeholder { color: var(--tx3); }

.csel-arr {
  font-size: 9px;
  color: var(--tx3);
  margin-left: 8px;
  flex-shrink: 0;
  transition: color .15s;
}
.csel-trigger.open .csel-arr { color: var(--acc); }

.csel-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surf2);
  border: 1px solid var(--acc);
  border-radius: var(--rs);
  z-index: 200;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: dropIn .12s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.csel-opt {
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--tx);
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid var(--brd);
}
.csel-opt:last-child { border-bottom: none; }
.csel-opt:hover { background: var(--surf3); }
.csel-opt.sel {
  background: var(--acc);
  color: #000;
  font-weight: 700;
}

/* ── EDIT EXERCISE FORM ──────────────────────── */
.rw-editing {
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 3px var(--acc-glow);
}

/* ── CONFIRM DIALOG ──────────────────────────── */
.cdlg-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadein .15s ease;
}

.cdlg {
  background: var(--surf);
  border: 1px solid var(--brd2);
  border-radius: 18px;
  padding: 2rem 1.75rem 1.5rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
  animation: dlgIn .18s cubic-bezier(.34,1.56,.64,1);
}

@keyframes dlgIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}

.cdlg-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--err-tx);
  margin-bottom: .6rem;
}

.cdlg-msg {
  font-size: 15px;
  color: var(--tx);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.cdlg-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.cdlg-cancel {
  background: var(--surf2);
  border-color: var(--brd2);
  color: var(--tx2);
}
.cdlg-cancel:hover { color: var(--tx); border-color: var(--tx3); }

.cdlg-confirm {
  font-size: 13px;
  letter-spacing: .3px;
}