:root {
  --ink: #f7f8fb;
  --ink-soft: #a8b1c7;
  --ink-muted: #77839e;
  --panel: rgba(19, 27, 49, 0.78);
  --panel-strong: #151e37;
  --panel-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --canvas: #080d1b;
  --canvas-two: #101731;
  --lime: #cfff58;
  --lime-strong: #b3ee38;
  --violet: #9e8cff;
  --cyan: #63e7e1;
  --orange: #ffb36c;
  --red: #ff7e91;
  --green: #8de4a3;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-rtl: "Vazirmatn", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 80% -10%, rgba(120, 112, 255, .17), transparent 34%),
    radial-gradient(circle at 12% 90%, rgba(89, 227, 214, .08), transparent 28%),
    linear-gradient(140deg, var(--canvas), var(--canvas-two));
  overflow-x: hidden;
}
body[dir="rtl"] { font-family: var(--font-rtl); }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app { position: relative; z-index: 2; min-height: 100vh; }
.ambient { position: fixed; z-index: 0; width: 32rem; height: 32rem; border-radius: 999px; filter: blur(70px); opacity: .12; pointer-events: none; }
.ambient-one { top: -18rem; right: -10rem; background: var(--violet); }
.ambient-two { bottom: -20rem; left: -12rem; background: var(--cyan); }

/* Shared controls */
.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  color: #0b1020;
  background: var(--lime);
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.button:hover { transform: translateY(-2px); background: var(--lime-strong); box-shadow: 0 12px 26px rgba(207, 255, 88, .2); }
.button:active { transform: translateY(0); }
.button.secondary { color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.button.secondary:hover { background: rgba(255,255,255,.13); box-shadow: none; }
.button.ghost { color: var(--ink-soft); background: transparent; border: 1px solid transparent; }
.button.ghost:hover { color: var(--ink); background: rgba(255,255,255,.06); box-shadow: none; }
.button.danger { color: #fff; background: rgba(255, 126, 145, .19); border: 1px solid rgba(255,126,145,.28); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-soft); background: rgba(255,255,255,.05); font-size: .8rem; font-weight: 700; }
.pill.lime { color: #d9ff91; background: rgba(207,255,88,.1); border-color: rgba(207,255,88,.22); }
.pill.cyan { color: #a2fbf2; background: rgba(99,231,225,.1); border-color: rgba(99,231,225,.2); }
.pill.orange { color: #ffd1a9; background: rgba(255,179,108,.1); border-color: rgba(255,179,108,.23); }
.pill.red { color: #ffbec9; background: rgba(255,126,145,.1); border-color: rgba(255,126,145,.24); }
.muted { color: var(--ink-muted); }
.small { font-size: .8rem; }
.eyebrow { color: var(--lime); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hidden { display: none !important; }

/* Auth / landing */
.auth-layout { min-height: 100vh; padding: 28px; display: grid; place-items: center; }
.auth-shell { width: min(1120px, 100%); min-height: min(720px, calc(100vh - 56px)); display: grid; grid-template-columns: 1.02fr .98fr; border: 1px solid var(--line); border-radius: 34px; overflow: hidden; background: rgba(9, 14, 30, .73); box-shadow: var(--shadow); backdrop-filter: blur(22px); animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.auth-story { position: relative; padding: clamp(34px, 6vw, 74px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: linear-gradient(150deg, rgba(158,140,255,.24), rgba(72, 226, 214, .08) 52%, rgba(9,14,30,.1)); }
.auth-story::before { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(207,255,88,.24); border-radius: 50%; left: -200px; bottom: -270px; box-shadow: 0 0 0 26px rgba(207,255,88,.03), 0 0 0 53px rgba(207,255,88,.02); }
.auth-story > * { position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.04rem; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: #101827; border-radius: 12px; background: var(--lime); box-shadow: 0 10px 24px rgba(207,255,88,.2); }
.brand-mark svg { width: 22px; }
.story-copy { max-width: 490px; }
.story-copy h1 { margin: 22px 0 18px; font-size: clamp(2.5rem, 4.8vw, 4.7rem); line-height: 1.03; letter-spacing: -.055em; }
.story-copy h1 span { color: var(--lime); }
.story-copy p { margin: 0; max-width: 400px; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.9; }
.story-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 470px; }
.story-metric { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.06); }
.story-metric strong { display: block; font-size: 1.3rem; }
.story-metric span { color: var(--ink-muted); font-size: .72rem; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 72px); background: rgba(12, 18, 38, .74); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.panel-head h2 { margin: 0 0 8px; font-size: 1.85rem; letter-spacing: -.04em; }
.panel-head p { margin: 0; color: var(--ink-soft); line-height: 1.7; }
.lang-switch { min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 10px; font-size: .78rem; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { color: var(--ink-soft); font-size: .84rem; font-weight: 700; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 0 14px; color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 13px; outline: none; transition: border .2s ease, box-shadow .2s ease, background .2s ease; }
.textarea { min-height: 100px; padding: 13px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(207,255,88,.62); background: rgba(255,255,255,.08); box-shadow: 0 0 0 4px rgba(207,255,88,.1); }
.select option { background: #151e37; color: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-submit { width: 100%; margin-top: 9px; }
.auth-bottom { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--ink-muted); font-size: .82rem; }
.auth-bottom button { color: var(--lime); background: transparent; font-weight: 800; }
.preview-link { margin-top: 20px; color: var(--ink-muted); text-align: center; font-size: .8rem; }
.preview-link button { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; background: transparent; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.65; }
.consent input { accent-color: var(--lime); margin-top: 4px; }
.form-error { min-height: 20px; color: #ffb6c1; font-size: .82rem; }

/* App shell */
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 26px 18px; border-inline-end: 1px solid var(--line); background: rgba(10,16,34,.74); backdrop-filter: blur(24px); }
.sidebar .brand { padding: 0 10px; }
.sidebar-nav { display: grid; gap: 6px; }
.nav-item { min-height: 46px; padding: 0 13px; display: flex; align-items: center; gap: 12px; color: var(--ink-muted); border-radius: 13px; background: transparent; text-align: start; transition: color .2s ease, background .2s ease, transform .2s ease; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.06); transform: translateX(-2px); }
.nav-item.active { color: #071021; background: var(--lime); font-weight: 800; box-shadow: 0 10px 22px rgba(207,255,88,.14); }
.sidebar-footer { margin-top: auto; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.04); }
.safety-mini { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .78rem; }
.status-dot { width: 9px; height: 9px; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 5px rgba(141,228,163,.1); }
.status-dot.yellow { background: var(--orange); box-shadow: 0 0 0 5px rgba(255,179,108,.1); }
.status-dot.red { background: var(--red); box-shadow: 0 0 0 5px rgba(255,126,145,.1); }
.main { min-width: 0; padding: 28px clamp(18px, 4vw, 54px) 44px; }
.topbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.mobile-menu { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.topbar-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04); transition: background .2s ease, color .2s ease; }
.topbar-icon:hover { color: var(--ink); background: rgba(255,255,255,.09); }
.profile-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 9px 5px 5px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.045); }
.profile-avatar { width: 31px; height: 31px; display: grid; place-items: center; color: #101827; border-radius: 50%; background: linear-gradient(140deg, var(--lime), var(--cyan)); font-size: .74rem; font-weight: 900; }
.profile-chip span { max-width: 130px; overflow: hidden; color: var(--ink-soft); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.view { animation: rise .45s ease both; }
.view-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.view-header h1 { margin: 7px 0 6px; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.08; letter-spacing: -.05em; }
.view-header p { margin: 0; color: var(--ink-soft); line-height: 1.7; }
.header-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-card { position: relative; min-height: 252px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(230px, .9fr); gap: 20px; padding: clamp(24px, 4vw, 38px); overflow: hidden; border: 1px solid rgba(207,255,88,.17); border-radius: var(--radius-xl); background: linear-gradient(120deg, rgba(125, 108, 242, .27), rgba(23, 39, 72, .76) 55%, rgba(54, 92, 102, .37)); box-shadow: var(--shadow); }
.hero-card::before, .hero-card::after { content:""; position:absolute; border-radius:50%; pointer-events:none; }
.hero-card::before { width: 380px; height: 380px; top: -240px; right: -70px; border: 1px solid rgba(207,255,88,.25); box-shadow: 0 0 0 22px rgba(207,255,88,.04), 0 0 0 45px rgba(207,255,88,.025); }
.hero-card::after { width: 180px; height: 180px; bottom: -100px; left: 25%; background: rgba(99,231,225,.11); filter: blur(10px); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h2 { max-width: 600px; margin: 12px 0 12px; font-size: clamp(1.75rem, 3.2vw, 3.1rem); line-height: 1.08; letter-spacing: -.06em; }
.hero-card p { max-width: 560px; margin: 0; color: #c5cce0; line-height: 1.8; }
.hero-cta { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 25px; }
.ring-wrap { display: grid; place-items: center; align-self: center; justify-self: end; width: 210px; height: 210px; }
.progress-ring { width: 188px; height: 188px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lime) 0 72%, rgba(255,255,255,.1) 72% 100%); box-shadow: 0 0 0 10px rgba(255,255,255,.035), 0 0 40px rgba(207,255,88,.15); }
.progress-ring::before { content:""; position:absolute; width: 148px; height: 148px; border-radius: 50%; background: #1a2645; }
.ring-value { position: relative; display: grid; text-align: center; }
.ring-value strong { font-size: 2.4rem; letter-spacing: -.08em; }
.ring-value span { color: var(--ink-soft); font-size: .73rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-top: 15px; }
.stat-card { position: relative; min-height: 126px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(17, 26, 49, .74); }
.stat-card::after { content:""; position:absolute; width: 90px; height: 90px; border-radius: 50%; bottom: -55px; inset-inline-end: -20px; background: var(--stat-glow, rgba(207,255,88,.14)); filter: blur(2px); }
.stat-top { display:flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink-muted); font-size: .77rem; }
.stat-card strong { position: relative; z-index: 1; display: block; margin-top: 17px; font-size: 1.65rem; letter-spacing: -.06em; }
.stat-card p { position: relative; z-index: 1; margin: 5px 0 0; color: var(--ink-muted); font-size: .75rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 15px; margin-top: 15px; }
.three-col { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(17, 26, 49, .7); overflow: hidden; }
.panel-pad { padding: 21px; }
.panel-headline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 21px 0; }
.panel-headline h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.03em; }
.panel-headline a, .panel-headline button { color: var(--lime); background: transparent; font-size: .78rem; font-weight: 800; }
.workout-row { display: flex; align-items: center; gap: 13px; padding: 16px 21px; border-top: 1px solid var(--line); transition: background .2s ease; }
.workout-row:hover { background: rgba(255,255,255,.04); }
.workout-icon { width: 42px; height: 42px; display:grid; place-items:center; flex:0 0 auto; color: var(--lime); border-radius: 13px; background: rgba(207,255,88,.1); }
.workout-row-main { min-width:0; flex:1; }
.workout-row-main strong { display:block; margin-bottom: 4px; font-size: .9rem; }
.workout-row-main span { color: var(--ink-muted); font-size: .75rem; }
.workout-row .button { min-height: 36px; padding: 0 12px; font-size: .75rem; }
.insight { height: 100%; padding: 21px; background: linear-gradient(140deg, rgba(99,231,225,.15), rgba(158,140,255,.11)); }
.insight .quote { margin: 24px 0; color: #e4e9f5; font-size: 1.1rem; line-height: 1.8; }
.insight-foot { display:flex; align-items:center; justify-content:space-between; gap: 10px; color: var(--ink-muted); font-size:.72rem; }
.avatar-stack { display:flex; }
.mini-avatar { width: 27px; height: 27px; display:grid; place-items:center; margin-inline-start: -6px; border: 2px solid #182440; border-radius:50%; color:#101827; background:var(--lime); font-size:.6rem; font-weight:800; }
.mini-avatar:first-child { margin-inline-start:0; background:var(--cyan); }

/* plan */
.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.045); }
.segment { min-height: 34px; padding: 0 13px; color: var(--ink-muted); border-radius: 9px; background: transparent; font-size: .78rem; font-weight: 700; }
.segment.active { color: #0c1423; background: var(--lime); }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(56px, 1fr)); gap: 7px; margin-bottom: 15px; }
.day-chip { padding: 12px 7px; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); text-align: center; transition: transform .2s ease, background .2s ease, border .2s ease; }
.day-chip:hover { transform: translateY(-2px); background: rgba(255,255,255,.075); }
.day-chip.active { color: #071021; border-color: transparent; background: var(--lime); box-shadow: 0 9px 20px rgba(207,255,88,.13); }
.day-chip strong { display:block; font-size:.82rem; }
.day-chip span { display:block; margin-top:4px; font-size:.7rem; opacity:.76; }
.plan-day { display:grid; grid-template-columns: 1.1fr .9fr; gap: 15px; }
.exercise-item { display:flex; align-items:center; gap: 12px; padding: 16px 21px; border-top: 1px solid var(--line); }
.exercise-number { width: 31px; height: 31px; display:grid; place-items:center; color: var(--lime); border-radius: 10px; background: rgba(207,255,88,.11); font-size:.75rem; font-weight:800; }
.exercise-copy { min-width:0; flex:1; }
.exercise-copy strong { display:block; font-size:.88rem; }
.exercise-copy span { display:block; margin-top:4px; color:var(--ink-muted); font-size:.72rem; }
.exercise-meta { text-align:end; color: var(--ink-soft); font-size:.78rem; }
.exercise-meta strong { display:block; color:var(--ink); font-size:.86rem; }
.exercise-actions { display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.explain { width: 32px; height: 32px; display:grid; place-items:center; color:var(--ink-muted); border:1px solid var(--line); border-radius: 10px; background:transparent; }
.explain:hover { color:var(--lime); border-color:rgba(207,255,88,.3); }
.reason-list { display:grid; gap: 11px; margin-top: 18px; }
.reason { display:flex; gap: 10px; align-items:flex-start; color:var(--ink-soft); font-size:.78rem; line-height:1.65; }
.reason svg { flex:0 0 auto; color:var(--lime); margin-top: 3px; }

/* health / recovery / progress */
.safety-banner { display:flex; align-items:center; justify-content:space-between; gap: 15px; padding: 18px 20px; border:1px solid rgba(141,228,163,.22); border-radius: 18px; background: rgba(141,228,163,.08); }
.safety-banner.yellow { border-color: rgba(255,179,108,.25); background:rgba(255,179,108,.08); }
.safety-banner.red { border-color: rgba(255,126,145,.27); background:rgba(255,126,145,.08); }
.safety-label { display:flex; align-items:center; gap: 11px; }
.safety-label strong { display:block; font-size:.92rem; }
.safety-label span { display:block; margin-top:4px; color:var(--ink-muted); font-size:.73rem; }
.metric-list { display:grid; gap: 14px; margin-top: 18px; }
.metric-line { display:flex; align-items:center; gap: 12px; }
.metric-line-label { width: 98px; color:var(--ink-soft); font-size:.75rem; }
.bar { height: 8px; flex:1; border-radius:99px; background:rgba(255,255,255,.09); overflow:hidden; }
.bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--violet), var(--cyan)); }
.metric-line-value { width: 40px; color:var(--ink); font-size:.75rem; font-weight:800; text-align:end; }
.health-grid { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.health-tile { min-height: 130px; padding: 17px; border:1px solid var(--line); border-radius:17px; background:rgba(255,255,255,.035); }
.health-tile .tile-icon { width:38px; height:38px; display:grid; place-items:center; margin-bottom: 17px; color:var(--cyan); border-radius:12px; background:rgba(99,231,225,.1); }
.health-tile strong { display:block; font-size:.84rem; }
.health-tile span { display:block; margin-top:6px; color:var(--ink-muted); font-size:.72rem; line-height:1.5; }
.health-record-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.health-records { min-height:170px; }
.health-record { display:flex; justify-content:space-between; gap:12px; padding:13px 0; border-top:1px solid var(--line); }
.health-record strong, .health-record span { display:block; }
.health-record strong { font-size:.86rem; }
.health-record > span, .health-record div span { margin-top:4px; color:var(--ink-muted); font-size:.72rem; }
.chart { min-height: 270px; padding: 21px; }
.chart-bars { height: 180px; display:flex; align-items:flex-end; justify-content:space-between; gap: 10px; padding: 25px 7px 0; border-bottom:1px solid var(--line); }
.chart-col { height:100%; display:flex; flex:1; flex-direction:column; align-items:center; justify-content:flex-end; gap:8px; }
.chart-col i { width: 100%; max-width: 35px; min-height: 8px; border-radius: 8px 8px 2px 2px; background:linear-gradient(180deg, var(--cyan), var(--violet)); animation: grow .7s ease both; transform-origin:bottom; }
.chart-col:nth-child(2) i { background:linear-gradient(180deg, var(--lime), #6cb5bd); }
.chart-col span { color:var(--ink-muted); font-size:.67rem; }
.legend { display:flex; gap: 18px; margin-top:15px; color:var(--ink-muted); font-size:.7rem; }
.legend span { display:flex; align-items:center; gap:7px; }
.legend i { width:8px; height:8px; border-radius:50%; background:var(--cyan); }
.legend i.lime { background:var(--lime); }

/* workout */
.workout-stage { display:grid; grid-template-columns:minmax(0,1.18fr) minmax(300px,.82fr); gap:15px; }
.workout-hero { min-height: 520px; display:flex; flex-direction:column; justify-content:space-between; padding: clamp(24px,4vw,38px); border:1px solid rgba(99,231,225,.2); border-radius:var(--radius-xl); background:linear-gradient(145deg, rgba(49,88,107,.65), rgba(21,29,56,.88)); }
.workout-hero h2 { margin: 14px 0 9px; font-size:clamp(1.8rem,3vw,3rem); letter-spacing:-.06em; }
.workout-hero p { margin:0; color:var(--ink-soft); line-height:1.75; }
.timer { display:grid; place-items:center; width:210px; height:210px; margin: 30px auto; border:1px solid rgba(99,231,225,.24); border-radius:50%; background:radial-gradient(circle, rgba(99,231,225,.17), rgba(99,231,225,.02) 65%); box-shadow:0 0 0 14px rgba(99,231,225,.04), 0 0 70px rgba(99,231,225,.12); }
.timer strong { font-size:2.6rem; letter-spacing:-.08em; }
.timer span { color:var(--ink-muted); font-size:.72rem; }
.timer-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:5px; margin-top:10px; }
.workout-actions { display:flex; gap:9px; flex-wrap:wrap; }
.exercise-list-card { min-height: 520px; }
.exercise-list-card .exercise-item { padding-inline: 21px; }
.exercise-item.active { background:linear-gradient(90deg, rgba(207,255,88,.1), transparent); }
.check { width:27px; height:27px; display:grid; place-items:center; color:#071021; border-radius:9px; background:var(--lime); }
.check.empty { color:var(--ink-muted); border:1px solid var(--line); background:transparent; }

/* coach */
.coach-card { min-height: 400px; padding: clamp(25px, 4vw, 42px); border:1px solid rgba(158,140,255,.25); border-radius:var(--radius-xl); background:linear-gradient(140deg, rgba(85,74,157,.35), rgba(16,24,48,.82)); }
.coach-orb { width:58px; height:58px; display:grid; place-items:center; color:#101827; border-radius:20px; background:linear-gradient(140deg,var(--lime),var(--cyan)); box-shadow:0 15px 35px rgba(99,231,225,.17); }
.coach-card h2 { margin:22px 0 11px; font-size:clamp(1.8rem,3vw,2.8rem); letter-spacing:-.06em; }
.coach-card p { max-width:600px; margin:0; color:var(--ink-soft); line-height:1.8; }
.coach-questions { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.question-chip { padding:10px 13px; color:var(--ink-soft); border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.055); font-size:.78rem; }
.question-chip:hover { color:var(--ink); border-color:rgba(207,255,88,.35); background:rgba(207,255,88,.08); }
.chat-response { margin-top:24px; padding:17px; border:1px solid rgba(207,255,88,.18); border-radius:16px; background:rgba(207,255,88,.07); color:#e8f4ca; line-height:1.8; }
.coach-input { display:flex; gap:8px; margin-top:20px; }
.coach-input .input { flex:1; }

/* settings / admin */
.settings-grid { display:grid; grid-template-columns: minmax(0,1fr) minmax(290px,.72fr); gap:15px; }
.setting-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 21px; border-top:1px solid var(--line); }
.setting-row:first-child { border-top:0; }
.setting-copy strong { display:block; font-size:.86rem; }
.setting-copy span { display:block; margin-top:5px; color:var(--ink-muted); font-size:.72rem; }
.toggle { width:44px; height:25px; position:relative; flex:0 0 auto; border-radius:99px; background:rgba(255,255,255,.14); transition:background .2s ease; }
.toggle::after { content:""; position:absolute; top:4px; right:22px; width:17px; height:17px; border-radius:50%; background:#fff; transition:transform .2s ease; }
.toggle.on { background:var(--lime); }
.toggle.on::after { transform:translateX(19px); background:#0a1120; }
.admin-table { width:100%; border-collapse:collapse; }
.admin-table th, .admin-table td { padding:14px 21px; border-top:1px solid var(--line); color:var(--ink-soft); font-size:.77rem; text-align:start; }
.admin-table th { color:var(--ink-muted); font-size:.7rem; font-weight:700; }
.admin-table strong { color:var(--ink); }
.admin-table .actions { display:flex; gap:6px; }
.table-scroll { overflow-x:auto; }
.admin-content-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; margin-top:15px; }
.content-panel { min-width:0; }
.empty-state { display:flex; flex-direction:column; gap:5px; align-items:flex-start; padding:16px 0; color:var(--ink-soft); }
.empty-state strong { color:var(--ink); }
.inline-error { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; padding:12px 14px; border:1px solid rgba(255,126,145,.3); border-radius:14px; color:#ffd0d8; background:rgba(255,126,145,.08); }
.skeleton-line { height:11px; margin:8px 0; border-radius:999px; background:linear-gradient(90deg,rgba(255,255,255,.06),rgba(255,255,255,.16),rgba(255,255,255,.06)); background-size:220% 100%; animation:shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position:200% 0; } 100% { background-position:-20% 0; } }
.mini-button { min-height:30px; padding:0 9px; color:var(--ink-soft); border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.04); font-size:.7rem; }
.mini-button:hover { color:var(--ink); background:rgba(255,255,255,.09); }

/* modal / toast */
.modal-backdrop { position:fixed; z-index:20; inset:0; display:grid; place-items:center; padding:20px; background:rgba(4,7,16,.72); backdrop-filter:blur(11px); animation:fade .2s ease both; }
.modal { width:min(560px,100%); max-height:90vh; overflow:auto; border:1px solid var(--line-strong); border-radius:24px; background:#151e37; box-shadow:var(--shadow); animation:rise .35s ease both; }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:21px 22px; border-bottom:1px solid var(--line); }
.modal-head h3 { margin:0; font-size:1.05rem; }
.modal-close { width:34px; height:34px; display:grid; place-items:center; color:var(--ink-muted); border-radius:10px; background:rgba(255,255,255,.06); }
.modal-body { padding:22px; }
.substitution-list { display:grid; gap:8px; margin-top:16px; }
.substitution-choice { width:100%; justify-content:space-between; gap:12px; text-align:start; }
.modal-foot { display:flex; justify-content:flex-end; gap:9px; padding:16px 22px 22px; }
.toast-region { position:fixed; z-index:30; bottom:20px; left:20px; display:grid; gap:10px; max-width:min(390px,calc(100vw - 40px)); }
.toast { padding:13px 15px; border:1px solid var(--line-strong); border-radius:14px; background:#182340; box-shadow:var(--shadow); color:var(--ink-soft); font-size:.8rem; animation:slide-in .35s ease both; }
.toast.success { color:#e2fbc0; border-color:rgba(207,255,88,.25); }
.toast.error { color:#ffd0d8; border-color:rgba(255,126,145,.3); }

/* RTL corrections */
[dir="rtl"] .nav-item:hover { transform: translateX(2px); }
[dir="rtl"] .toggle::after { right:auto; left:22px; }
[dir="rtl"] .toggle.on::after { transform:translateX(-19px); }

@keyframes rise { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes fade { from { opacity:0; } to { opacity:1; } }
@keyframes slide-in { from { opacity:0; transform:translateX(-18px); } to { opacity:1; transform:translateX(0); } }
@keyframes grow { from { transform:scaleY(0); } to { transform:scaleY(1); } }

@media (max-width: 1080px) {
  .dashboard-shell { grid-template-columns: 220px minmax(0,1fr); }
  .admin-content-grid { grid-template-columns:1fr; }
  .hero-card { grid-template-columns: minmax(0,1fr) 190px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-col, .plan-day, .workout-stage, .settings-grid { grid-template-columns: 1fr; }
  .health-record-grid { grid-template-columns:1fr; }
  .ring-wrap { width:180px; height:180px; }
}
@media (max-width: 760px) {
  .auth-layout { padding: 0; }
  .auth-shell { min-height:100vh; border:0; border-radius:0; grid-template-columns:1fr; }
  .auth-story { min-height: 330px; padding: 29px 24px; }
  .story-copy h1 { font-size:2.65rem; }
  .story-copy p { font-size:.9rem; }
  .story-metrics { gap:7px; }
  .story-metric { padding:10px; }
  .story-metric strong { font-size:1.05rem; }
  .story-metric span { font-size:.63rem; }
  .auth-panel { padding:28px 24px 38px; }
  .dashboard-shell { display:block; }
  .sidebar { position:fixed; z-index:15; top:0; bottom:0; inset-inline-start:0; width:270px; height:100vh; transform:translateX(105%); transition:transform .25s ease; box-shadow:var(--shadow); }
  [dir="ltr"] .sidebar { transform:translateX(-105%); }
  .sidebar.open, [dir="ltr"] .sidebar.open { transform:translateX(0); }
  .mobile-menu { width:40px; height:40px; display:grid; place-items:center; color:var(--ink-soft); border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.04); }
  .main { padding:18px 16px 86px; }
  .topbar { margin-bottom:25px; }
  .topbar .eyebrow { display:none; }
  .profile-chip span { max-width:75px; }
  .view-header { display:block; }
  .header-actions { margin-top:16px; }
  .hero-card { display:block; min-height:0; padding:24px; }
  .ring-wrap { display:none; }
  .hero-card h2 { font-size:2rem; }
  .stat-grid { gap:8px; }
  .stat-card { min-height:112px; padding:14px; }
  .stat-card strong { font-size:1.35rem; }
  .health-grid { grid-template-columns:1fr 1fr; }
  .week-strip { overflow:auto; grid-template-columns:repeat(7, 70px); padding-bottom:5px; }
  .three-col { grid-template-columns:1fr; }
  .coach-input { display:grid; grid-template-columns:1fr; }
  .coach-input .button { width:100%; }
}
@media (max-width: 420px) {
  .field-row { grid-template-columns:1fr; gap:0; }
  .auth-bottom { display:grid; gap:6px; }
  .health-grid { grid-template-columns:1fr; }
  .workout-actions { display:grid; }
  .workout-actions .button { width:100%; }
  .exercise-meta { display:none; }
}

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