/* =========================================================
   IRON WORKOUT — MASTER UI
   style.css  v3
   ========================================================= */

:root {
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --card: #0f0f0f;
  --card-2: #141414;
  --border: #232323;
  --text: #f2f2f2;
  --text-soft: #a8a8a8;
  --muted: #5c5c5c;
  --white: #f5f5f5;
  --black: #080808;
  --gold: #d8aa43;
  --gold-light: #f1cf72;
  --green: #6ed49a;
  --red: #e76c6c;
  --blue: #79aef5;
  --orange: #f0a05a;
  --purple: #b48cff;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgba(0,0,0,.4);
  --t: 180ms ease;
}

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

html { scroll-behavior: smooth; background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -12%, rgba(255,255,255,.05), transparent 40%),
    radial-gradient(circle at 90% 15%, rgba(216,170,67,.05), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button { border: none; background: none; cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
input, select, textarea { color: var(--text); }
img, video { max-width: 100%; display: block; }
.hidden { display: none !important; }

#app { width: 100%; min-height: 100vh; min-height: 100dvh; }
main { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px 120px; }


/* ========== HEADER ========== */
.top-header {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: var(--white);
}
.brand-logo span { margin-left: 2px; font-weight: 500; color: #6a6a6a; }
.brand-subtitle {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #454545;
}
.header-actions { display: flex; align-items: center; gap: 8px; }

.rank-badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #333;
  background: #121212;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  color: #bbb;
  display: flex;
  gap: 4px;
}
.rank-badge span:first-child { color: var(--gold-light); }

.avatar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid #2a2a2a;
  background: linear-gradient(135deg, #1a1a1a, #111);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t), transform var(--t);
}
.avatar-btn:hover { border-color: var(--gold); transform: translateY(-1px); }

.prime-badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(216,170,67,.35);
  background: linear-gradient(135deg, rgba(216,170,67,.12), rgba(216,170,67,.03));
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .3px;
  transition: transform var(--t), border-color var(--t);
}
.prime-badge:hover { border-color: var(--gold); transform: translateY(-1px); }
body.prime-active .prime-badge {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(216,170,67,.18);
}


/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: sticky;
  top: 8px;
  z-index: 100;
  width: min(680px, calc(100% - 18px));
  margin: 0 auto 16px;
  padding: 5px;
  display: flex;
  gap: 3px;
  background: rgba(10,10,10,.92);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
.nav-item {
  flex: 1;
  min-width: 0;
  padding: 8px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-radius: 12px;
  color: #5e5e5e;
  transition: background var(--t), color var(--t), transform var(--t);
}
.nav-item:hover { color: #999; }
.nav-item.active { background: var(--white); color: var(--black); }
.nav-item:active { transform: scale(.96); }
.nav-icon { font-size: 15px; line-height: 1; }
.nav-label { font-size: 9px; font-weight: 750; white-space: nowrap; }


/* ========== PAGE ========== */
.page { display: none; animation: pageIn .26s ease both; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin: 20px 0 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.header-btns { display: flex; gap: 6px; flex-wrap: wrap; }


/* ========== TYPOGRAPHY ========== */
.eyebrow {
  margin-bottom: 5px;
  color: #5a5a5a;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 2px;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -1.6px;
}
h2 { font-size: 19px; font-weight: 900; letter-spacing: -.3px; }
h3 { font-size: 14px; font-weight: 800; }
p { line-height: 1.55; }
.muted { color: var(--muted); font-size: 11px; }


/* ========== CARDS ========== */
.card {
  position: relative;
  margin-bottom: 12px;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.01)), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.02), transparent 35%);
}
.card > * { position: relative; z-index: 1; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}


/* ========== HERO ========== */
.hero-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background:
    radial-gradient(circle at 85% 8%, rgba(255,255,255,.07), transparent 26%),
    radial-gradient(circle at 8% 100%, rgba(216,170,67,.08), transparent 32%),
    linear-gradient(145deg, #131313, #080808 72%);
}
.hero-card h1 { margin-bottom: 10px; }
.hero-card p { max-width: 480px; color: var(--text-soft); font-size: 13px; }
.hero-actions { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }


/* ========== BUTTONS ========== */
.btn {
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  transition: transform var(--t), background var(--t), border-color var(--t);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--white); color: var(--black); }
.btn-primary:hover { background: #fff; }
.btn-secondary {
  background: #161616;
  border: 1px solid #2c2c2c;
  color: #d0d0d0;
}
.btn-secondary:hover { background: #1c1c1c; border-color: #3a3a3a; }
.btn-danger {
  background: #1a1010;
  border: 1px solid #3a2020;
  color: #e88989;
}
.btn-full { width: 100%; }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.text-btn {
  background: transparent;
  color: #888;
  font-size: 11px;
  font-weight: 800;
}
.text-btn:hover { color: #fff; }
.file-label { cursor: pointer; }


/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #333;
  border-radius: 999px;
  background: #141414;
  color: #999;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .5px;
}
.prime-mini {
  padding: 5px 9px;
  border: 1px solid rgba(216,170,67,.25);
  border-radius: 999px;
  background: rgba(216,170,67,.06);
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
}


/* ========== IRON SCORE ========== */
.iron-score-card {
  background:
    radial-gradient(circle at 50% 0, rgba(216,170,67,.1), transparent 50%),
    linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.01)),
    var(--card);
}
.iron-score-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 8px 0 16px;
}
.iron-score-main strong {
  font-size: 56px;
  font-weight: 950;
  letter-spacing: -3px;
  color: var(--gold-light);
  line-height: 1;
}
.iron-score-main span { color: #666; font-size: 14px; }
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.score-pill {
  padding: 10px 8px;
  text-align: center;
  background: rgba(255,255,255,.025);
  border: 1px solid #222;
  border-radius: 12px;
}
.score-pill span {
  display: block;
  margin-bottom: 4px;
  color: #666;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.score-pill b { color: #eee; font-size: 16px; font-weight: 900; }


/* ========== DASH ROW / MINI CARDS ========== */
.dash-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.mini-card { min-height: 100px; padding: 12px; }
.stat-label {
  color: #5a5a5a;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.4px;
}
.stat-value {
  margin: 8px 0 3px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.6px;
}
.stat-desc { color: #4a4a4a; font-size: 10px; }


/* ========== MACRO BARS ========== */
.macro-bars { display: flex; flex-direction: column; gap: 12px; }
.macro-bar-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 12px;
}
.macro-bar-top span { color: #777; font-weight: 600; }
.macro-bar-top strong { color: #eee; font-weight: 800; }
.bar-track {
  height: 7px;
  background: #181818;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.bar-fill.cal { background: linear-gradient(90deg, #d8aa43, #f1cf72); }
.bar-fill.pro { background: linear-gradient(90deg, #6ed49a, #9aefb8); }
.bar-fill.carb { background: linear-gradient(90deg, #79aef5, #a8d0ff); }
.bar-fill.fat { background: linear-gradient(90deg, #f0a05a, #ffc48a); }

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}
.macro-box {
  padding: 12px 6px;
  text-align: center;
  background: rgba(255,255,255,.025);
  border: 1px solid #222;
  border-radius: 12px;
}
.macro-box strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}
.macro-box span {
  color: #555;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}


/* ========== FOCUS + QUICK ========== */
.focus-card {
  background:
    radial-gradient(circle at 80% 0, rgba(216,170,67,.07), transparent 40%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.01)),
    var(--card);
}
.focus-text { color: #999; font-size: 13px; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.quick-item {
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  color: #999;
  font-size: 10px;
  font-weight: 700;
  transition: background var(--t), border-color var(--t), transform var(--t);
}
.quick-item span:first-child { font-size: 18px; }
.quick-item:hover { background: #151515; border-color: #333; color: #ddd; }
.quick-item:active { transform: scale(.97); }


/* ========== FORMS ========== */
.form-row, .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #777;
  font-size: 11px;
  font-weight: 700;
}
.field small { color: #4a4a4a; font-size: 9px; }
.field textarea {
  min-height: 60px;
  padding: 10px 12px;
  background: #131313;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  resize: vertical;
  color: var(--text);
}
input, select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: #131313;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  outline: none;
  transition: border-color var(--t), background var(--t);
}
input::placeholder { color: #444; }
input:focus, select:focus, textarea:focus {
  background: #161616;
  border-color: #4a4a4a;
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position: calc(100% - 14px) 18px, calc(100% - 10px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.search-input {
  min-height: 46px;
  margin-bottom: 8px;
  padding-left: 14px;
  background: linear-gradient(90deg, #141414, #101010);
  border-radius: 12px;
}


/* ========== WORKOUT ========== */
#exerciseList { display: flex; flex-direction: column; gap: 9px; }

.exercise {
  padding: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid #242424;
  border-radius: 14px;
}
.exercise-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.exercise-name {
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  min-height: auto !important;
  color: #eee !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}
.sets {
  display: grid;
  grid-template-columns: 1fr 1fr 40px 40px;
  gap: 5px;
  margin-bottom: 6px;
  align-items: center;
}
.sets input { min-height: 38px; padding: 7px; font-size: 13px; }

.set-confirm {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #555;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}
.set-confirm.confirmed {
  background: rgba(110,212,154,.15);
  border-color: rgba(110,212,154,.4);
  color: var(--green);
}
.remove {
  width: 38px; min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #382020;
  border-radius: 9px;
  background: #1a1010;
  color: #e88989;
  font-size: 17px;
}
.remove:hover { background: #261414; }

.workout-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.workout-footer strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}
.timer-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timer-box strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
}


/* ========== LISTS ========== */
.list { display: flex; flex-direction: column; }
.list-item, .history-item, .food-item {
  padding: 12px 0;
  border-bottom: 1px solid #1c1c1c;
}
.list-item:last-child,
.history-item:last-child,
.food-item:last-child { border-bottom: none; }
.list-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.list-main b { color: #eee; font-size: 13px; }
.list-main span { color: #555; font-size: 11px; }
.list-main strong { color: var(--gold-light); font-size: 13px; }
.empty-state {
  padding: 22px 8px;
  text-align: center;
  color: #4a4a4a;
  font-size: 12px;
}


/* ========== FOOD ========== */
.meal-tabs {
  display: flex;
  gap: 4px;
  margin: 10px 0 8px;
  overflow-x: auto;
}
.meal-tab {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #777;
  font-size: 11px;
  font-weight: 700;
}
.meal-tab.active {
  background: var(--white);
  color: var(--black);
  border-color: transparent;
}
.food-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #1c1c1c;
}
.food-result:last-child { border-bottom: none; }
.food-result b { display: block; margin-bottom: 2px; color: #eee; font-size: 13px; }
.food-result small { color: #555; font-size: 10px; }
.add-food {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--white);
  color: var(--black);
  font-size: 11px;
  font-weight: 900;
}


/* ========== SLEEP ========== */
.sleep-score-box {
  margin-top: 14px;
  padding: 22px;
  text-align: center;
  background: radial-gradient(circle at 50% 0, rgba(216,170,67,.12), transparent 55%), #12100c;
  border: 1px solid rgba(216,170,67,.25);
  border-radius: 16px;
}
.score-label {
  color: #5a5a5a;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 2px;
}
.score-number {
  margin: 4px 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
}
.score-number strong {
  color: var(--gold-light);
  font-size: 56px;
  font-weight: 950;
  letter-spacing: -3px;
  line-height: 1;
}
.score-number span { color: #5a5a5a; font-size: 13px; }

.sleep-chart {
  height: 160px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 10px 2px 20px;
  overflow-x: auto;
  border-bottom: 1px solid #1c1c1c;
  margin-bottom: 6px;
}
.sleep-chart:empty::before {
  content: "Nessun dato";
  width: 100%;
  align-self: center;
  text-align: center;
  color: #4a4a4a;
  font-size: 11px;
}
.bar {
  position: relative;
  flex: 1 1 0;
  min-width: 11px;
  max-width: 36px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, #444, #aaa);
  opacity: .9;
}
.bar i {
  position: absolute;
  left: 0; right: 0; bottom: -16px;
  text-align: center;
  color: #4a4a4a;
  font-size: 7px;
  font-style: normal;
}


/* ========== COACH ========== */
.coach-main {
  padding: 28px 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(216,170,67,.09), transparent 45%),
    linear-gradient(145deg, #131313, #090909);
}
.coach-symbol {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216,170,67,.3);
  border-radius: 16px;
  background: rgba(216,170,67,.07);
  color: var(--gold-light);
  font-size: 26px;
}
.coach-main h2 { margin-bottom: 6px; font-size: 22px; }
.coach-main p { max-width: 520px; margin: 0 auto; color: #6a6a6a; font-size: 13px; }

.coach-chat-card { padding-bottom: 12px; }
.coach-chat {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 80px;
}
.chat-msg {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 92%;
}
.chat-msg.user {
  align-self: flex-end;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #ddd;
}
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(216,170,67,.08);
  border: 1px solid rgba(216,170,67,.2);
  color: #e0d0a0;
}
.coach-input-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.coach-input-row .search-input { margin-bottom: 0; flex: 1; }
.coach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.coach-suggestions button {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #888;
  font-size: 11px;
  font-weight: 700;
}
.coach-suggestions button:hover { border-color: #444; color: #ccc; }

.coach-modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.coach-mod { min-height: 120px; }
.coach-mod h3 { margin-bottom: 6px; }
.coach-mod div { color: #777; font-size: 12px; line-height: 1.5; }


/* ========== MUSCLE MAP ========== */
.muscle-map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.muscle-item {
  padding: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid #222;
  border-radius: 12px;
}
.muscle-item b { display: block; margin-bottom: 4px; color: #eee; font-size: 13px; }
.muscle-item span { color: #666; font-size: 11px; }
.muscle-item .vol {
  margin-top: 6px;
  height: 5px;
  background: #1a1a1a;
  border-radius: 999px;
  overflow: hidden;
}
.muscle-item .vol > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 999px;
}


/* ========== GOALS / ACHIEVEMENTS ========== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ach-item {
  padding: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid #222;
  border-radius: 12px;
  text-align: center;
}
.ach-item.locked { opacity: .45; }
.ach-item .ach-icon { font-size: 22px; margin-bottom: 4px; }
.ach-item b { display: block; font-size: 12px; color: #ddd; }
.ach-item span { font-size: 10px; color: #555; }


/* ========== PROFILE ========== */
.bmi-row {
  margin-top: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid #222;
  border-radius: 11px;
}
.bmi-row strong { color: #fff; font-size: 18px; font-weight: 900; }

.prime-card {
  padding: 28px 18px;
  text-align: center;
  background: radial-gradient(circle at 50% 0, rgba(216,170,67,.14), transparent 48%), #0e0e0e;
}
.prime-icon {
  width: 58px; height: 58px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216,170,67,.35);
  border-radius: 16px;
  background: rgba(216,170,67,.08);
  color: var(--gold-light);
  font-size: 28px;
}
.prime-card h2 { margin-bottom: 6px; font-size: 22px; }
.prime-card p { margin-bottom: 14px; color: #5a5a5a; font-size: 12px; }
.prime-status {
  min-height: 16px;
  margin-top: 10px;
  color: var(--green);
  font-weight: 800;
  font-size: 12px;
}

.data-actions { display: flex; flex-direction: column; gap: 7px; }

.info-list { margin-top: 10px; }
.info-list > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #1c1c1c;
  font-size: 13px;
}
.info-list > div:last-child { border-bottom: none; }
.info-list span { color: #5a5a5a; }
.info-list strong { color: #ddd; }


/* ========== MORE ========== */
.more-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.more-item {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #ccc;
  font-size: 14px;
  font-weight: 700;
  transition: background var(--t), border-color var(--t);
}
.more-item span:first-child { font-size: 18px; }
.more-item:hover { background: #151515; border-color: #333; }


/* ========== MODAL ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalIn .2s ease both;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px;
  background: linear-gradient(145deg, #121212, #090909);
  border: 1px solid #282828;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,.7);
  animation: modalUp .24s ease both;
}
@keyframes modalUp {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.modal-header h2 { font-size: 18px; }
.close-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid #2a2a2a;
  background: #151515;
  color: #888;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn:hover { background: #1e1e1e; color: #fff; }


/* ========== SCANNER ========== */
.camera-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
  border-radius: 14px;
  border: 1px solid #252525;
}
.camera-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-overlay { position: absolute; inset: 0; pointer-events: none; }
.scan-frame {
  position: absolute;
  top: 22%; left: 12%;
  width: 76%; height: 52%;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 8px;
}
.scan-line {
  position: absolute;
  left: 14%; right: 14%; top: 50%;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,.7);
  animation: scanMove 2s ease-in-out infinite;
}
@keyframes scanMove {
  0%, 100% { transform: translateY(-50px); opacity: .4; }
  50% { transform: translateY(50px); opacity: 1; }
}
.scanner-status {
  margin: 10px 2px;
  color: #5a5a5a;
  font-size: 11px;
  line-height: 1.45;
}
.row-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.manual-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid #222; }


/* ========== TOAST ========== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 2000;
  max-width: calc(100% - 24px);
  padding: 11px 16px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #333;
  border-radius: 999px;
  background: rgba(245,245,245,.97);
  color: #080808;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #080808; }
::-webkit-scrollbar-thumb { background: #262626; border-radius: 999px; }


/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .dash-row { grid-template-columns: repeat(2, 1fr); }
  .score-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  main { padding: 0 11px 110px; }
  .top-header { padding: 14px 11px 10px; }
  .brand-logo { font-size: 18px; }
  .bottom-nav {
    position: fixed;
    top: auto;
    left: 9px; right: 9px; bottom: 9px;
    width: auto;
    margin: 0;
  }
  .hero-card { min-height: 210px; padding: 20px; }
  .hero-card h1 { font-size: 32px; }
  .hero-actions .btn { flex: 1; }
  .dash-row { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .mini-card { min-height: 90px; padding: 11px; }
  .stat-value { font-size: 18px; }
  .form-row, .form-grid { grid-template-columns: 1fr; }
  .coach-modules { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .quick-item { padding: 10px 4px; font-size: 9px; }
  .page-header h1 { font-size: 30px; }
  .card { padding: 14px; border-radius: 15px; }
  .iron-score-main strong { font-size: 48px; }
  .sets { grid-template-columns: 1fr 1fr 36px 36px; }
  .set-confirm, .remove { width: 36px; min-height: 36px; }
  .muscle-map { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .brand-logo { font-size: 16px; }
  .prime-badge { padding: 6px 8px; font-size: 9px; }
  .nav-label { font-size: 8px; }
  .nav-icon { font-size: 13px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
