:root{
  --background:transparent;
  --surface:rgba(255,255,255,0.05);
  --beige:rgba(216,209,192,0.12);
  --dark:rgba(20,22,28,0.6);
  --dark-2:rgba(32,35,43,0.7);
  --accent:#f5c928;
  --accent-red:#ef6a4c;
  --text:#f3f4f6;
  --muted:#a1a1aa;
  --border:rgba(255,255,255,0.08);
  --radius-lg:28px;
  --radius-md:20px;
  --radius-sm:14px;
  --shadow-soft:0 8px 32px rgba(0,0,0,0.25);
  --shadow-card:0 4px 16px rgba(0,0,0,0.15);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Inter',system-ui,sans-serif;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  font-weight:400;
  position:relative;
  min-height:100vh;
  overflow-x:hidden;
}

/* Glassmorphism blurred background image */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background:url('background.jpg') no-repeat center center;
  background-size:cover;
  filter:blur(5px);
  transform:scale(1.04); /* scale to conceal blurred edges */
}

/* Semi-transparent dark overlay to protect text readability */
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:rgba(15,17,22,0.52);
}

button, input, select{ font-family:inherit; }
h1,h2,h3,h4{ margin:0; font-weight:700; letter-spacing:-0.01em; text-shadow:0 2px 4px rgba(0,0,0,0.4); }
p{ margin:0; }
.hidden{ display:none !important; }
.muted{ color:var(--muted); font-size:13px; font-weight:500; }
.muted-sm{ color:var(--muted); font-size:11px; font-weight:500; }
::selection{ background:var(--accent); color:var(--dark); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

i[data-lucide]{ display:inline-flex; width:1em; height:1em; }
[data-lucide] svg{ width:100%; height:100%; }

/* ---------------- Layout Shell ---------------- */
.app-shell{
  display:flex;
  min-height:100vh;
  padding:20px;
  gap:20px;
  max-width:1440px;
  margin:0 auto;
}

/* ---------------- Sidebar ---------------- */
.sidebar{
  width:76px;
  flex-shrink:0;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.05);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-radius:32px;
  box-shadow:var(--shadow-soft);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:22px 0;
  position:sticky;
  top:20px;
  height:calc(100vh - 40px);
}
.sidebar-logo{
  width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  color:var(--text);
  font-size:22px;
  margin-bottom:36px;
}
.sidebar-nav{ display:flex; flex-direction:column; gap:14px; flex:1; }
.sidebar-bottom{ display:flex; flex-direction:column; gap:14px; align-items:center; }

.nav-item{
  width:44px; height:44px;
  border-radius:16px;
  border:none;
  background:transparent;
  color:var(--muted);
  display:flex; align-items:center; justify-content:center;
  font-size:19px;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, transform .1s ease;
}
.nav-item:hover{ background:rgba(255,255,255,0.08); color:var(--text); }
.nav-item.active{
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--accent);
}
.nav-item:active{ transform:scale(0.94); }
.avatar-item{ padding:0; overflow:hidden; }
.avatar-item img{ width:100%; height:100%; object-fit:cover; border-radius:14px; }
.avatar-item.active img{ box-shadow:0 0 0 2px var(--accent); }

/* ---------------- Main content ---------------- */
.main-content{ flex:1; min-width:0; padding-bottom:40px; }
.view{ animation:fadeIn .25s ease; }
@keyframes fadeIn{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:translateY(0);} }

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  margin-bottom:24px;
}
.topbar-greeting h1{ font-size:26px; }
.topbar-greeting p{ color:var(--muted); font-size:14px; margin-top:4px; }
.topbar-actions{ display:flex; align-items:center; gap:12px; }

.search-field{
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-radius:999px;
  padding:10px 16px;
  box-shadow:var(--shadow-card);
  min-width:220px;
}
.search-field i{ color:var(--muted); font-size:16px; }
.search-field input{
  border:none; outline:none; background:transparent; font-size:13px; width:100%;
  color:var(--text);
}
.search-field input::placeholder{ color:rgba(255,255,255,0.4); }

.btn-upgrade{
  background:rgba(255,255,255,0.08);
  color:#fff;
  border:1px solid rgba(255,255,255,0.12);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  border-radius:999px;
  padding:12px 22px; font-weight:600; font-size:13px; cursor:pointer;
  transition:transform .12s ease, background-color .12s ease;
}
.btn-upgrade:hover{ background:rgba(255,255,255,0.16); }
.btn-upgrade:active{ transform:scale(0.96); }

.search-results{
  background:rgba(20,22,28,0.85);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:var(--radius-sm); box-shadow:var(--shadow-soft);
  padding:14px 18px; margin-bottom:18px; font-size:13px;
}
.search-results .sr-item{ padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); }
.search-results .sr-item:last-child{ border-bottom:none; }
.search-results .sr-title{ font-weight:600; }

/* ---------------- Cards / grid ---------------- */
.card{
  border-radius:var(--radius-lg);
  padding:24px;
}
.card-white{
  background:rgba(255,255,255,0.05);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:var(--shadow-card);
}
.card-beige{
  background:rgba(216,209,192,0.12);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:var(--shadow-card);
}
.card-dark{
  background:rgba(20,22,28,0.6);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:1px solid rgba(255,255,255,0.05);
  box-shadow:var(--shadow-soft);
  color:#fff;
}

.card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:6px; }
.card h3{ font-size:16px; }
.card-dark h3{ color:#fff; }

.dash-grid{
  display:grid;
  grid-template-columns:1.35fr 0.9fr;
  gap:20px;
}
.dash-left-col{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.card-weightgoal{ cursor:pointer; }

/* ---- Workout results card ---- */
.lock-badge{
  width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.1);
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:14px;
}
.workout-viz{ position:relative; height:210px; margin:6px 0 4px; display:flex; justify-content:center; }
.viz-content{ position:relative; height:100%; aspect-ratio:300/220; }
.viz-svg{ width:100%; height:100%; display:block; }
.blob-yellow{ fill:var(--accent); opacity:0.8; }
.blob-red{ fill:var(--accent-red); opacity:0.8; }
.viz-label{ position:absolute; display:flex; flex-direction:column; align-items:center; }
.viz-label-hours{ left:17%; top:32%; transform:translate(-50%,-50%); color:#fff; }
.viz-label-hours .viz-num{
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.15);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700;
}
.viz-label-kcal{ left:45%; top:41%; transform:translate(-50%,-50%); }
.viz-label-kcal .viz-num{ font-size:20px; font-weight:700; text-shadow:0 2px 8px rgba(0,0,0,0.6); }
.viz-label-burned{ left:31.7%; top:68%; transform:translate(-50%,-50%); color:#fff; }
.viz-label-burned .viz-num{ font-size:16px; font-weight:700; text-shadow:0 2px 8px rgba(0,0,0,0.6); }
.viz-sub{ font-size:11px; font-weight:500; opacity:.85; }

.legend{ display:flex; gap:18px; flex-wrap:wrap; margin-top:14px; }
.legend-item{ display:flex; align-items:center; gap:6px; font-size:12px; font-weight:500; color:var(--text); }
.legend-dark .legend-item{ color:#e4e4e7; }
.dot{ width:9px; height:9px; border-radius:50%; display:inline-block; }
.dot-yellow{ background:var(--accent); }
.dot-red{ background:var(--accent-red); }
.dot-dark{ background:rgba(255,255,255,0.3); }
.ring{ width:9px; height:9px; border-radius:50%; display:inline-block; border:2px solid; }
.ring-current{ border-color:#fff; }
.ring-scheduled{ border-color:rgba(255,255,255,0.4); }

/* ---- Calendar card ---- */
.month-nav{ display:flex; align-items:center; gap:10px; font-size:13px; font-weight:600; color:#fff; }
.month-nav button{ background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.05); color:#fff; width:24px; height:24px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; }
.month-nav button:hover{ background:rgba(255,255,255,0.18); }
.cal-weekdays{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-top:16px; }
.cal-weekdays span{ text-align:center; font-size:11px; color:#a1a1aa; font-weight:600; }
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; margin-top:8px; }
.cal-day{
  aspect-ratio:1/1; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:600; color:rgba(255,255,255,0.65); cursor:pointer; position:relative;
  background:transparent; border:1.5px solid transparent;
}
.cal-day:hover{ background:rgba(255,255,255,0.08); }
.cal-day.other-month{ color:rgba(255,255,255,0.2); cursor:default; }
.cal-day.is-today{ border-color:#fff; color:#fff; }
.cal-day.is-done{ background:var(--accent); color:var(--dark); }
.cal-day.is-scheduled{ border-color:rgba(255,255,255,0.3); color:#fff; }
.cal-day.is-missed{ background:rgba(239,106,76,0.35); border:1px solid rgba(239,106,76,0.4); color:#fff; }
.cal-day-info{ margin-top:14px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.06); border-radius:14px; padding:12px 14px; font-size:12px; }
.cal-day-info .cdi-title{ font-weight:700; font-size:13px; margin-bottom:4px; }

/* ---- Steps card ---- */
.steps-body{ display:flex; align-items:center; gap:16px; margin-top:14px; }
.steps-ring-wrap{ position:relative; width:96px; height:96px; flex-shrink:0; }
.steps-ring{ width:100%; height:100%; transform:rotate(-90deg); }
.ring-bg{ fill:none; stroke:rgba(255,255,255,0.08); stroke-width:10; }
.ring-fg{ fill:none; stroke:var(--accent-red); stroke-width:10; stroke-linecap:round; transition:stroke-dashoffset .5s ease; }
.steps-ring-center{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ring-goal-label{ font-size:10px; color:var(--muted); font-weight:600; }
.ring-goal-val{ font-size:13px; font-weight:700; }
.steps-count{ display:flex; flex-direction:column; gap:10px; }
.steps-num{ font-size:28px; font-weight:700; }
.btn-ghost-sm{
  display:flex; align-items:center; gap:6px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:999px;
  padding:8px 12px; font-size:12px; font-weight:600; cursor:pointer; color:#fff;
  transition:background-color .15s;
}
.btn-ghost-sm:hover{ background:rgba(255,255,255,0.16); }

/* ---- Habits card ---- */
.btn-add{
  display:flex; align-items:center; gap:6px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--accent);
  border-radius:999px;
  padding:8px 14px; font-size:12px; font-weight:600; cursor:pointer;
  transition:background-color .15s;
}
.btn-add:hover{ background:rgba(255,255,255,0.16); }
.habits-list{ display:flex; flex-direction:column; gap:4px; margin-top:10px; }
.habit-row{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,0.06); }
.habit-row:last-child{ border-bottom:none; }
.habit-avatar{ width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.08); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:14px; color:#fff; font-weight:700; }
.habit-info{ flex:1; min-width:0; }
.habit-name{ font-size:13.5px; font-weight:600; }
.habit-trainer{ font-size:11.5px; color:var(--muted); margin-top:1px; }
.habit-progress{ display:flex; align-items:center; gap:8px; }
.habit-bar{ display:flex; gap:2px; }
.habit-seg{ width:6px; height:14px; border-radius:2px; background:rgba(255,255,255,0.1); }
.habit-seg.filled{ background:var(--accent-red); }
.habit-frac{ font-size:11px; color:var(--muted); font-weight:600; white-space:nowrap; }
.habit-actions{ display:flex; gap:4px; }
.habit-actions button{ background:none; border:none; color:var(--muted); cursor:pointer; font-size:14px; padding:4px; border-radius:6px; }
.habit-actions button:hover{ background:rgba(255,255,255,0.08); color:#fff; }

/* ---- Weight goal card ---- */
.goal-pct{ font-size:20px; font-weight:700; }
.weight-slider{ margin-top:20px; }
.weight-track{ position:relative; height:8px; background:rgba(255,255,255,0.08); border-radius:99px; }
.weight-fill{ position:absolute; left:0; top:0; height:100%; background:var(--accent); border-radius:99px; }
.weight-thumb{
  position:absolute; top:50%; transform:translate(-50%,-50%); width:auto; height:24px;
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.25);
  backdrop-filter:blur(4px);
  color:#fff; border-radius:999px; padding:0 10px; display:flex; align-items:center;
  font-size:11px; font-weight:700; white-space:nowrap;
}
.weight-ends{ display:flex; justify-content:space-between; margin-top:22px; font-size:12px; color:var(--muted); font-weight:600; }

/* ---------------- Workouts view ---------------- */
.workouts-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:20px; }
.workout-card{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.06);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-radius:var(--radius-lg); padding:22px; box-shadow:var(--shadow-card); display:flex; flex-direction:column; gap:12px;
}
.workout-card-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.workout-card-top h3{ font-size:17px; }
.status-pill{ font-size:10.5px; font-weight:700; padding:5px 10px; border-radius:999px; white-space:nowrap; text-transform:uppercase; letter-spacing:.02em; }
.status-assigned{ background:rgba(238,240,236,0.15); color:#d2dccb; }
.status-scheduled{ background:rgba(255,243,209,0.15); color:#e2cb7f; }
.status-in-progress{ background:rgba(253,233,216,0.15); color:#efaf88; }
.status-completed{ background:rgba(223,243,227,0.15); color:#9cdfb4; }
.status-missed{ background:rgba(251,225,222,0.15); color:#f7aca3; }
.workout-trainer{ font-size:13px; color:var(--muted); }
.workout-meta-row{ display:flex; gap:14px; font-size:12.5px; color:var(--muted); font-weight:600; flex-wrap:wrap; }
.workout-meta-row span{ display:flex; align-items:center; gap:5px; }
.muscle-tags{ display:flex; gap:6px; flex-wrap:wrap; }
.muscle-tag{ background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.04); border-radius:999px; padding:4px 10px; font-size:11px; font-weight:600; color:#fff; }
.workout-progress-wrap{ margin-top:2px; }
.workout-progress-label{ display:flex; justify-content:space-between; font-size:11px; color:var(--muted); font-weight:600; margin-bottom:5px; }
.workout-progress-track{ height:7px; background:rgba(255,255,255,0.08); border-radius:99px; }
.workout-progress-fill{ height:100%; background:var(--accent-red); border-radius:99px; }
.workout-card-btn{
  margin-top:4px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  color:#fff;
  border-radius:14px; padding:12px; font-size:13px;
  font-weight:600; cursor:pointer;
  transition:background-color .15s;
}
.workout-card-btn:hover{ background:rgba(255,255,255,0.16); }
.workout-card-btn.completed{ background:rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.04); color:rgba(255,255,255,0.3); cursor:default; }

/* ---------------- Training view ---------------- */
.training-header{ display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.btn-back{ width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.08); box-shadow:var(--shadow-card); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:16px; color:#fff; }
.btn-back:hover{ background:rgba(255,255,255,0.16); }
.training-header > div:nth-child(2){ flex:1; }
.training-header h2{ font-size:18px; }
.training-timer{
  text-align:right;
  background:rgba(20,22,28,0.85);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,0.08);
  color:#fff; border-radius:16px; padding:10px 18px;
}
.training-timer span:first-child{ display:block; font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.training-timer .muted-sm{ color:#b8b9c2; }

.training-progressbar{ height:8px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.04); border-radius:99px; margin-bottom:24px; box-shadow:var(--shadow-card); overflow:hidden; }
.training-progressbar-fill{ height:100%; background:var(--accent); border-radius:99px; transition:width .35s ease; }

.training-body{ display:flex; flex-direction:column; align-items:center; gap:20px; }
.exercise-card{
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-soft); padding:36px; width:100%; max-width:560px; text-align:center;
}
.exercise-illustration{
  width:96px; height:96px; margin:0 auto 18px; border-radius:50%; background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.06);
  display:flex; align-items:center; justify-content:center; font-size:38px; color:#fff;
}
.exercise-card h2{ font-size:24px; }
.exercise-meta{ color:var(--muted); font-weight:600; margin-top:6px; font-size:14px; }
.exercise-instructions{ color:var(--muted); font-size:13px; margin-top:14px; line-height:1.6; }

.sets-row{ display:flex; gap:8px; justify-content:center; margin-top:22px; flex-wrap:wrap; }
.set-pill{
  width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,0.06); display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; color:rgba(255,255,255,0.5); border:2px solid transparent; transition:all .15s ease;
}
.set-pill.done{ background:var(--accent); color:var(--dark); }
.set-pill.current{ border-color:#fff; color:#fff; }

.prev-performance{ margin-top:16px; font-size:12px; color:var(--muted); }

.rest-panel{
  margin-top:22px;
  background:rgba(20,22,28,0.85);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,0.08);
  color:#fff; border-radius:20px; padding:20px; display:flex; flex-direction:column; align-items:center; gap:10px;
}
.rest-label{ font-size:12px; letter-spacing:.1em; font-weight:700; color:var(--accent); }
.rest-time{ font-size:34px; font-weight:700; font-variant-numeric:tabular-nums; }
.rest-actions{ display:flex; gap:8px; }
.rest-actions button{ background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.08); color:#fff; border-radius:999px; padding:8px 14px; font-size:12px; font-weight:600; cursor:pointer; }
.rest-actions button:hover{ background:rgba(255,255,255,0.2); }

.exercise-actions{ display:flex; gap:10px; margin-top:26px; flex-wrap:wrap; justify-content:center; }
.btn-primary{
  background:rgba(245,201,40,0.25);
  border:1px solid rgba(245,201,40,0.5);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  color:var(--accent); border-radius:14px; padding:13px 22px; font-size:13.5px; font-weight:700; cursor:pointer;
  transition:background-color .15s;
}
.btn-primary:hover{ background:rgba(245,201,40,0.38); }
.btn-primary:disabled{ opacity:.4; cursor:not-allowed; }
.btn-secondary{
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  color:#fff; border-radius:14px; padding:13px 22px; font-size:13.5px; font-weight:700; cursor:pointer;
  transition:background-color .15s;
}
.btn-secondary:hover{ background:rgba(255,255,255,0.16); }
.btn-secondary:disabled{ opacity:.4; cursor:not-allowed; }

.training-nav{ display:flex; gap:12px; width:100%; max-width:560px; }
.btn-nav{
  flex:1;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.06);
  color:#fff;
  border-radius:14px; padding:13px; font-size:13px; font-weight:600; cursor:pointer; box-shadow:var(--shadow-card); display:flex; align-items:center; justify-content:center; gap:6px;
  transition:background-color .15s;
}
.btn-nav:hover{ background:rgba(255,255,255,0.12); }
.btn-nav:disabled{ opacity:.4; cursor:not-allowed; }

/* ---------------- Complete view ---------------- */
.complete-screen{
  text-align:center; max-width:480px; margin:60px auto 0;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-radius:var(--radius-lg); padding:48px 36px; box-shadow:var(--shadow-soft);
}
.complete-emoji{ font-size:48px; }
.complete-screen h1{ font-size:22px; margin-top:8px; }
.complete-screen h2{ font-size:16px; color:var(--muted); font-weight:600; margin-top:4px; }
.complete-stats{ display:flex; justify-content:space-around; margin:32px 0; }
.complete-stat{ display:flex; flex-direction:column; gap:4px; }
.complete-num{ font-size:22px; font-weight:700; }
.complete-msg{ font-size:14px; color:var(--muted); margin-bottom:24px; }

/* ---------------- Progress view ---------------- */
.progress-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px; margin-bottom:20px; }
.stat-card{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.stat-icon{ width:38px; height:38px; border-radius:12px; background:rgba(255,255,255,0.08); display:flex; align-items:center; justify-content:center; font-size:17px; color:#fff; margin-bottom:4px; }
.stat-num{ font-size:24px; font-weight:700; }
.weekly-card{ }
.weekly-bars{ display:flex; align-items:flex-end; gap:14px; height:160px; margin-top:20px; }
.weekly-bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:8px; height:100%; }
.weekly-bar{ width:100%; max-width:32px; background:rgba(255,255,255,0.08); border-radius:8px 8px 4px 4px; position:relative; }
.weekly-bar-fill{ position:absolute; bottom:0; left:0; right:0; background:var(--accent); border-radius:8px 8px 4px 4px; transition:height .4s ease; }
.weekly-bar-label{ font-size:11px; color:var(--muted); font-weight:600; }

/* ---------------- History view ---------------- */
.history-list{ display:flex; flex-direction:column; gap:10px; }
.history-item{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.05);
  border-radius:18px; padding:16px 20px; display:flex; align-items:center; justify-content:space-between; box-shadow:var(--shadow-card); gap:12px; flex-wrap:wrap;
}
.history-left h4{ font-size:14.5px; }
.history-left p{ font-size:12px; color:var(--muted); margin-top:3px; }
.history-right{ display:flex; align-items:center; gap:18px; font-size:12.5px; color:var(--muted); font-weight:600; }

/* ---------------- Profile view ---------------- */
.profile-card{ max-width:640px; }
.profile-top{ display:flex; align-items:center; gap:16px; margin-bottom:24px; }
.profile-top img{ width:64px; height:64px; border-radius:50%; background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.08); }
.profile-top h2{ font-size:19px; }
.profile-form{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.profile-form label{ display:flex; flex-direction:column; gap:6px; font-size:12.5px; font-weight:600; color:var(--muted); margin-bottom:14px; }
.profile-form input, .profile-form select{
  border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.05); border-radius:12px; padding:11px 12px; font-size:13.5px; color:#fff;
}
.profile-form input:focus, .profile-form select:focus{ outline:2px solid var(--accent); background:rgba(255,255,255,0.1); }
.profile-form button{ grid-column:1/-1; margin-top:6px; justify-self:start; }

/* ---------------- Settings view ---------------- */
.settings-card{ max-width:640px; }
.settings-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.settings-row h4{ font-size:14px; }
.settings-row p{ font-size:12.5px; color:var(--muted); margin-top:4px; }

/* ---------------- Filter select ---------------- */
.filter-select{
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:var(--shadow-card); border-radius:999px; padding:10px 16px; font-size:13px; font-weight:600; color:#fff;
}
.filter-select option{
  background:#14161c;
  color:#fff;
}

/* ---------------- Modal ---------------- */
.modal-overlay{
  position:fixed; inset:0; background:rgba(15,17,22,0.6); backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center; z-index:100; padding:20px;
}
.modal{
  background:rgba(20,22,28,0.75);
  backdrop-filter:blur(24px);
  -webkit-backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:var(--radius-lg); padding:28px; width:100%; max-width:380px; box-shadow:var(--shadow-soft);
  color:#fff;
}
.modal.modal-wide {
  max-width: 580px;
}
.modal h3{ font-size:17px; margin-bottom:16px; }
.modal label{ display:flex; flex-direction:column; gap:6px; font-size:12.5px; font-weight:600; color:var(--muted); margin-bottom:14px; }
.modal input, .modal select{ border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.05); border-radius:12px; padding:11px 12px; font-size:13.5px; color:#fff; }
.modal input:focus, .modal select:focus{ outline:2px solid var(--accent); background:rgba(255,255,255,0.1); }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:6px; }

/* ---------------- Bottom nav (mobile) ---------------- */
.bottom-nav{
  display:none;
  position:fixed; bottom:14px; left:50%; transform:translateX(-50%);
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-radius:999px; box-shadow:var(--shadow-soft);
  padding:8px; gap:4px; z-index:50;
}
.bottom-nav .nav-item{ width:46px; height:46px; }

@media (max-width: 1080px){
  .dash-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .app-shell{ padding:14px; padding-bottom:90px; flex-direction:column; }
  .sidebar{ display:none; }
  .bottom-nav{ display:flex; }
  .dash-grid{
    grid-template-columns:1fr;
  }
  .topbar{ flex-direction:column; align-items:stretch; }
  .topbar-actions{ justify-content:space-between; }
  .search-field{ flex:1; min-width:0; }
  .profile-form{ grid-template-columns:1fr; }
  .training-header{ flex-wrap:wrap; }
  .training-timer{ order:3; width:100%; text-align:left; display:flex; justify-content:space-between; align-items:center; }
  .exercise-card{ padding:24px; }
  .workouts-grid{ grid-template-columns:1fr; }
}

@media (min-width: 761px){
  .bottom-nav{ display:none; }
}

/* ============================================================
   Login & Signup portal styles
   ============================================================ */
.login-viewport {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 11, 14, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

.login-container {
  display: flex;
  width: 100%;
  max-width: 960px;
  min-height: 540px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login-left-panel {
  width: 45%;
  background: linear-gradient(135deg, rgba(20, 22, 28, 0.9) 0%, rgba(10, 11, 14, 0.95) 100%);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-size: 24px;
  color: var(--accent);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 10px rgba(245, 201, 40, 0.3);
}

.perspective-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.perspective-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.art-slider-indicators {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.art-slider-indicators .indicator {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  transition: background-color 0.3s;
}

.art-slider-indicators .indicator.active {
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.login-right-panel {
  width: 55%;
  padding: 50px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(20, 22, 28, 0.3);
}

.top-nav-action {
  align-self: flex-end;
  font-size: 13px;
}

.top-nav-action .muted-text {
  color: var(--muted);
}

.btn-create-profile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 12px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-create-profile:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-create-profile:active {
  transform: scale(0.96);
}

.form-container {
  margin: auto 0;
  max-width: 420px;
  width: 100%;
}

.form-container h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 32px;
  color: #fff;
  line-height: 1.3;
}

.input-underline-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
  padding: 8px 0;
  transition: border-color 0.3s;
}

.input-underline-group .input-icon {
  color: var(--muted);
  font-size: 16px;
  margin-right: 12px;
  display: flex;
  align-items: center;
}

.input-underline-group input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14.5px;
  color: #fff;
}

.input-underline-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.underline-highlight {
  position: absolute;
  bottom: -1.5px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.35s ease;
  box-shadow: 0 1px 6px var(--accent);
}

.input-underline-group input:focus ~ .underline-highlight {
  width: 100%;
}

.input-underline-group:focus-within .input-icon {
  color: var(--accent);
}

.btn-login-gradient {
  width: 100%;
  background: linear-gradient(135deg, #1b6af5 0%, #683ef5 100%);
  border: none;
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 10px 20px rgba(104, 62, 245, 0.25);
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.btn-login-gradient:hover {
  opacity: 0.95;
  box-shadow: 0 10px 25px rgba(104, 62, 245, 0.4);
}

.btn-login-gradient:active {
  transform: scale(0.98);
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #fff;
}

.social-login-separator {
  display: flex;
  align-items: center;
  margin: 32px 0 20px;
}

.social-login-separator .separator-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.social-login-separator .separator-text {
  padding: 0 12px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.social-buttons {
  display: flex;
  justify-content: center;
}

.btn-social-google {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-social-google:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-social-google:active {
  transform: scale(0.9);
}

.google-icon-svg {
  width: 20px;
  height: 20px;
}

.auth-select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.auth-select option {
  background: #14161c;
  color: #fff;
}
.input-underline-group.select-group::after {
  content: '▼';
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  position: absolute;
  right: 5px;
  pointer-events: none;
}

/* Responsive adjustments for Login Screen */
@media (max-width: 840px) {
  .login-left-panel {
    display: none;
  }
  .login-right-panel {
    width: 100%;
    padding: 40px;
  }
  .login-container {
    max-width: 480px;
    min-height: auto;
  }
}
