:root {
  --or: #ff8a26;
  --or2: #ffa14f;
  --or-dim: #c96a15;
  --bg: #0c0c0c;
  --bg2: #141414;
  --card: #191919;
  --card2: #1f1f1f;
  --line: #2a2a2a;
  --line2: #3a3a3a;
  --fg: #f1f1f1;
  --mut: #9a9a9a;
  --err: #ff5d5d;
  --ok: #39d98a;
  --wa: #ffb020;
  --r: 14px;
  --sp: clamp(12px, 2vw, 20px);
  --nav-h: 62px;
  --side-w: 236px;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 Tahoma, "Segoe UI", Vazirmatn, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-wrap: anywhere;
}
img, svg { display: block; }
a { color: var(--or); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .4rem; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 .5rem; }
.ico { width: 18px; height: 18px; flex: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; border-radius: 4px; }

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main, .shell, .view, .card, .field, .auth-card, .topbar-actions { min-width: 0; }
input, textarea { min-width: 0; }
input[type="email"], input[type="number"], input[type="date"], .user-chip { direction: ltr; }
.connection-panel { max-width: 1440px; margin-inline: auto; padding-inline: var(--sp); }
.install-panel { margin: 0 var(--sp) calc(var(--nav-h) + var(--sb) + 20px); }
.hint { color: var(--mut); font-size: .8rem; }
.hero-kicker { color: var(--or2); font-size: .8rem; }
.hero-sub { color: #c9c9c9; font-size: .92rem; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 10px;
  overflow-wrap: normal; word-break: normal;
  padding: calc(10px + var(--st)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(12, 12, 12, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar * { min-width: 0; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; flex: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: var(--bg);
  background: linear-gradient(135deg, var(--or), var(--or2));
}
.topbar-actions {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 auto; justify-content: flex-end;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-latin { font: 8px Arial, sans-serif; letter-spacing: 2px; color: var(--mut); white-space: nowrap; }

.net-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: .74rem; color: var(--mut); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.net-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.net-badge.off .dot { background: var(--err); }
.net-badge.off { color: #f3b8b8; border-color: #4a2626; }

.user-chip {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .76rem; color: var(--mut); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 9px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .92rem;
  color: var(--fg); background: var(--card2);
  transition: background-color .15s, border-color .15s, transform .15s;
  touch-action: manipulation;
}
.btn:hover { background: #262626; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--or); color: #161006; font-weight: 700; }
.btn-primary:hover { background: var(--or2); }
.btn-ghost { background: transparent; border-color: var(--line2); }
.btn-ghost:hover { background: #1e1e1e; }
.btn-danger { background: transparent; border-color: #4c2222; color: var(--err); }
.btn-danger:hover { background: #241212; }
.btn-block { width: 100%; }
.topbar .btn { white-space: nowrap; flex: none; padding-inline: 14px; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: .84rem; }

input, textarea {
  width: 100%; min-height: 46px;
  background: #121212; color: var(--fg);
  border: 1px solid var(--line2); border-radius: 10px;
  padding: 10px 13px; font: inherit; font-size: 16px;
}
textarea { min-height: 220px; line-height: 1.8; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--or); }
input::placeholder, textarea::placeholder { color: #6d6d6d; }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: .85rem; color: #cfcfcf; margin-bottom: 6px; }
.err { color: var(--err); font-size: .8rem; margin: 6px 0 0; }
input.invalid, textarea.invalid { border-color: var(--err); }

.pw-row { position: relative; }
.pw-row input { padding-inline-end: 50px; }
.pw-toggle {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--mut); cursor: pointer;
}
.pw-toggle:hover { color: var(--fg); background: #1c1c1c; }
.pw-toggle svg { width: 21px; height: 21px; }

.alert { border-radius: 10px; padding: 10px 13px; font-size: .86rem; margin: 10px 0; }
.alert.error { background: #2a1212; border: 1px solid #5a2626; color: #ffb3b3; }
.alert.info { background: #14201a; border: 1px solid #245a40; color: #a9e8c9; }

.banner {
  display: flex; align-items: flex-start; gap: 9px;
  border-radius: 12px; padding: 11px 14px; font-size: .86rem; margin-bottom: 14px;
}
.banner.error { background: #2a1212; border: 1px solid #5a2626; color: #ffb3b3; }
.banner.info { background: #241708; border: 1px solid #5c3a10; color: #ffd9a3; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: #1d1608; border: 1px solid #4a3410; border-radius: 12px;
  padding: 12px 14px; font-size: .85rem; color: #e8d5ae;
}
.notice .ico { color: var(--or); margin-top: 3px; }

/* ---------- Auth ---------- */
.auth-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(16px + var(--st)) 16px calc(16px + var(--sb));
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.auth-hero { text-align: center; padding: 8px 0 18px; }
.auth-hero svg { color: var(--or); margin: 0 auto 10px; }
.auth-hero h1 { margin: 0; font-size: 1.5rem; }
.auth-hero p { color: var(--mut); font-size: .88rem; margin: 4px 0 0; }
.auth-tabs { margin-bottom: 16px; }
.auth-note { margin-top: 14px; font-size: .8rem; color: var(--mut); text-align: center; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; background: #101010; border: 1px solid var(--line); border-radius: 12px; padding: 5px; }
.tab {
  flex: 1; min-height: 44px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--mut); font: inherit; font-weight: 600; font-size: .9rem;
}
.tab.is-active { background: var(--or); color: #161006; }

/* ---------- Shell ---------- */
.shell { display: flex; flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; }
.sidebar {
  display: none;
  position: sticky; top: 57px; align-self: flex-start;
  width: var(--side-w); flex: none; height: calc(100vh - 57px); height: calc(100dvh - 57px);
  overflow-y: auto;
  padding: 18px 12px; border-inline-start: 1px solid var(--line);
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  min-height: 44px; padding: 10px 13px; border-radius: 11px;
  color: var(--mut); text-decoration: none; font-size: .92rem; font-weight: 600;
  border-inline-start: 3px solid transparent;
}
.nav-item:hover { background: #1b1b1b; color: var(--fg); }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(255, 138, 38, .14), rgba(255, 138, 38, .05));
  color: var(--or); border-inline-start-color: var(--or);
}
.side-note {
  margin-top: 18px; display: flex; gap: 9px; align-items: flex-start;
  font-size: .74rem; color: #7c7c7c; border-top: 1px dashed var(--line2); padding-top: 14px;
}
.side-note .ico { color: var(--or); flex: none; margin-top: 2px; }

.content { flex: 1; min-width: 0; padding: 18px var(--sp) calc(var(--nav-h) + var(--sb) + 28px); }

.view { animation: fade .25s ease; }

/* بخش در حال آماده‌سازی (بلور + پیام به‌زودی) */
.soon-content { filter: blur(5px) saturate(.75); opacity: .5; pointer-events: none; user-select: none; }
.soon { position: relative; }
.soon-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px 12px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 72%, transparent) 55%);
}
.soon-card {
  max-width: 26rem; text-align: center; padding: 28px 22px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line2); border-radius: 18px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: fade .35s ease;
}
.soon-ico { color: var(--or); }
.soon-card h2 { margin: 10px 0 6px; font-size: 1.08rem; }
.soon-badge {
  display: inline-block; vertical-align: middle; margin-inline-start: 10px; padding: 3px 12px;
  font-size: .74rem; font-weight: 600; color: var(--or);
  border: 1px solid var(--or); border-radius: 999px; background: color-mix(in srgb, var(--or) 12%, transparent);
  animation: soonPulse 2.4s ease-in-out infinite;
}
@keyframes soonPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .soon-badge { animation: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 26px 24px;
  background:
    radial-gradient(120% 150% at 85% -10%, rgba(255, 138, 38, .32), transparent 55%),
    radial-gradient(90% 120% at -10% 110%, rgba(255, 138, 38, .1), transparent 50%),
    linear-gradient(160deg, #1c1509, #121212 60%);
  border: 1px solid #3a2a12;
  margin-bottom: 22px;
}
.hero-copy { position: relative; z-index: 1; max-width: 34rem; }
.hero-copy .eyebrow { color: var(--or2); font-size: .8rem; font-weight: 700; margin-bottom: 2px; }
.hero-copy h1 { margin: 0 0 6px; font-size: 1.55rem; }
.hero-copy .lede { color: #c9c9c9; font-size: .92rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-art {
  display: none; position: absolute; inset-inline-end: 18px; top: 50%; transform: translateY(-50%);
  color: rgba(255, 138, 38, .2);
}
.hero-art svg { width: 170px; height: 170px; transform: rotate(-18deg); }

/* ---------- Cards / sections ---------- */
.sec-title { margin: 0 0 13px; font-size: 1.08rem; }
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: 1fr; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 16px; margin-bottom: 16px;
}
.card > h2 { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.chip {
  font-size: .7rem; color: #d7d7d7; background: #262626;
  border: 1px solid var(--line2); padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}

.stat-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.stat-head h3 { margin: 0; font-size: .9rem; color: #d9d9d9; }
.stat-val { font-size: 2rem; font-weight: 700; line-height: 1.25; color: var(--or); margin-top: 6px; }
.stat-val .unit { font-size: .95rem; font-weight: 400; color: var(--mut); margin-inline-start: 5px; }
.stat-val .sub { font-size: .85rem; font-weight: 400; color: var(--mut); margin-inline-start: 7px; }
.stat-foot { color: var(--mut); font-size: .8rem; margin: 6px 0 0; }
.stat.link { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.stat.link:hover { border-color: var(--or-dim); }
.stat.link .stat-foot.linky { color: var(--or); font-weight: 600; }

/* ring */
.ring-row { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.ring {
  --p: 0;
  width: 116px; height: 116px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--or) calc(var(--p) * 1%), #2b2b2b 0);
  display: grid; place-items: center;
}
.ring::before {
  content: ""; grid-area: 1/1; width: 88px; height: 88px; border-radius: 50%; background: var(--card);
}
.ring-in { grid-area: 1/1; position: relative; z-index: 1; text-align: center; font-weight: 700; font-size: 1.25rem; color: var(--or); }
.ring-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .84rem; }
.ring-legend .k { color: var(--mut); }
.ring-legend .v { font-weight: 700; }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #151515;
}
.day.today { border-color: var(--or); box-shadow: inset 0 0 0 1px var(--or); }
.day .dn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 2.75em; font-size: .68rem; color: var(--mut); line-height: 1.3; white-space: nowrap;
}
.day .dn.today { color: var(--or); font-weight: 700; }
.day .dd { font-size: .86rem; font-weight: 700; }
.day .dd.today { color: var(--or); }
.day .dm { width: 26px; height: 4px; border-radius: 2px; background: #2c2c2c; margin-top: 3px; }
.day .dm.on { background: var(--or); }
.day .dm.full { background: var(--ok); }
.week-leg { display: flex; gap: 16px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.week-leg span { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; color: var(--mut); }
.week-leg i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.week-leg .lg1 i { background: #2c2c2c; }
.week-leg .lg2 i { background: var(--or); }
.week-leg .lg3 i { background: var(--ok); }

/* forms */
.row-form { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.row-form .field { flex: 1 1 150px; margin-bottom: 0; }
.row-form .btn { margin-top: 25px; }
.grid-form .field { max-width: 420px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* table */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
caption { text-align: start; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: #1c1c1c; }
th { color: var(--mut); font-weight: 600; font-size: .78rem; }

/* chart */
#chart { width: 100%; height: auto; }
#chart .grid-l { stroke: #242424; stroke-width: 1; }
#chart .axis-l { fill: #8a8a8a; font-size: 12px; }
#chart .area { fill: rgba(255, 138, 38, .16); }
#chart .line { fill: none; stroke: var(--or); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
#chart .pt { fill: var(--or); stroke: #0c0c0c; stroke-width: 2; }
#chart .pt:hover + .pt-tip { opacity: 1; }
#chart .pt-tip { opacity: 0; transition: opacity .15s; fill: #f5f5f5; font-size: 12px; font-weight: 700; }
.alt-table { margin-top: 14px; border-top: 1px dashed var(--line2); padding-top: 12px; }
.alt-table summary { cursor: pointer; color: var(--or); font-size: .88rem; font-weight: 600; }

/* workout */
.wk-top { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.wk-top .field { margin-bottom: 0; max-width: 210px; }
.wk-top .chip { margin-bottom: 10px; }
.wk-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; }
.wk-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 14px;
}
.wk-item .txt { flex: 1; min-width: 0; }
.wk-item .txt .name { font-weight: 700; font-size: .93rem; }
.wk-item .txt .meta { color: var(--mut); font-size: .78rem; margin: 2px 0 0; }
.wk-check {
  appearance: none; width: 44px; height: 44px; margin: 0; flex: none; cursor: pointer;
  border: 2px solid var(--line2); border-radius: 12px; background: #121212;
  display: grid; place-items: center; color: transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.wk-check:hover { border-color: var(--or-dim); }
.wk-check:checked {
  background: var(--or); border-color: var(--or); color: #161006;
}
.wk-check:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.wk-empty { color: var(--mut); font-size: .88rem; background: #141414; border: 1px dashed var(--line2); border-radius: 12px; padding: 16px; text-align: center; margin-top: 12px; }
.card-note { color: var(--mut); font-size: .78rem; margin-top: 12px; }

/* empty */
.empty {
  display: grid; justify-items: center; text-align: center; gap: 8px;
  padding: 30px 16px; color: var(--mut); font-size: .9rem;
  border: 1px dashed var(--line2); border-radius: 14px; background: #131313;
}
.empty-ico { width: 40px; height: 40px; color: #3d3d3d; }

/* spinner */
.spin {
  width: 44px; height: 44px; margin: 0 auto;
  border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--or);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* install card */
#install-card { border-color: #3a2a12; background: linear-gradient(150deg, #1e1608, #191919 70%); }
#install-card .form-actions { margin-top: 12px; }
#install-card ul { margin: 8px 0 0; padding-inline-start: 18px; color: var(--mut); font-size: .84rem; }
#install-card li { margin-bottom: 4px; }

/* toast */
#toast {
  position: fixed; inset-inline: 0; bottom: calc(var(--nav-h) + var(--sb) + 18px);
  margin-inline: auto; width: max-content; max-width: min(92vw, 420px);
  background: #222; border: 1px solid var(--line2); color: var(--fg);
  padding: 11px 18px; border-radius: 12px; font-size: .88rem; z-index: 60;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; z-index: 40; inset-inline: 0; bottom: 0;
  display: flex; justify-content: space-around;
  background: rgba(16, 16, 16, .96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px var(--sb);
}
.bottom-nav[hidden] { display: none; }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 48px; min-width: 44px; padding: 5px 2px;
  color: var(--mut); text-decoration: none; font-size: .66rem; font-weight: 600;
  border-radius: 10px;
}
.bottom-nav a .ico { width: 21px; height: 21px; }
.bottom-nav a.is-active { color: var(--or); }

.chat-card .card-head { align-items: center; }
.chat-log {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 46vh; overflow-y: auto; overscroll-behavior: contain;
  margin: 12px 0; padding: 4px;
}
.chat-log:empty { display: none; }
.bubble {
  max-width: min(88%, 560px); padding: 10px 13px;
  border-radius: 14px; font-size: .9rem; line-height: 1.85;
  white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--line);
}
.bubble.ai { align-self: flex-start; background: var(--card2); color: var(--fg); border-start-start-radius: 4px; }
.bubble.me { align-self: flex-end; background: #2a1608; border-color: var(--or-dim); color: #ffd9b3; border-start-end-radius: 4px; }
#chat-form textarea { min-height: 88px; }

/* ---------- Subscription ---------- */
.sub-tabs { max-width: 420px; }
.sub-tabs .tab { display: flex; flex-direction: column; gap: 0; }
.sub-tabs .tab small { font-size: .62rem; color: inherit; opacity: .75; }
.sub-grid { display: grid; gap: 12px; margin: 14px 0 4px; }
.sub-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card2); border: 1px solid var(--line2); border-radius: 14px;
  padding: 14px 16px;
}
.sub-card.featured { border-color: var(--or-dim); background: linear-gradient(150deg, rgba(255,138,38,.08), var(--card2) 65%); }
.sub-card .sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sub-card .sc-head h3 { margin: 0; font-size: 1rem; }
.sub-card .sc-badge { font-size: .66rem; color: #161006; background: var(--or); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.sub-card .sc-price { font-size: 1.35rem; font-weight: 700; color: var(--or); }
.sub-card .sc-price .unit { font-size: .8rem; font-weight: 400; color: var(--mut); margin-inline-start: 5px; }
.sub-card .sc-old { color: var(--mut); font-size: .78rem; text-decoration: line-through; margin-inline-start: 6px; }
.sub-card ul { margin: 4px 0 2px; padding-inline-start: 18px; color: #cfcfcf; font-size: .84rem; }
.sub-card ul li { margin-bottom: 2px; }
.sub-card .sc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.sub-card .sc-foot .hint { flex: 1; min-width: 120px; }
.plan-status .chip { font-size: .78rem; }

/* ---------- Profile ---------- */
.profile-list { margin: 6px 0 2px; display: grid; gap: 8px; }
.profile-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.profile-row dt { color: var(--mut); font-size: .84rem; }
.profile-row dd { margin: 0; font-weight: 600; direction: ltr; }
.profile-row dd:dir(rtl), .profile-row .fa { direction: rtl; }
.profile-row .fa { font-weight: 600; }
.onboard-card { max-width: 560px; margin-inline: auto; }
.onboard-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  color: var(--or); background: rgba(255,138,38,.1); border: 1px solid var(--or-dim);
  margin-bottom: 4px;
}
.onboard-card .grid-2 { margin-top: 10px; }

/* ---------- Sidebar/desktop ---------- */
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sub-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .hero-copy h1 { font-size: 1.9rem; }
}
@media (min-width: 980px) {
  .sidebar { display: block; }
  .bottom-nav { display: none; }
  .content { padding-bottom: 40px; }
  .hero { padding: 34px 30px; }
  .hero-art { display: block; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  #toast { bottom: 26px; }
}
@media (min-width: 1240px) {
  .content { padding-inline: 30px; }
  .stats { gap: 18px; }
}

/* 320px */
@media (max-width: 360px) {
  .auth-card { padding: 18px 14px; }
  .hero { padding: 20px 16px; }
  .hero-copy h1 { font-size: 1.3rem; }
  .btn { padding: 9px 13px; }
  .day .dd { font-size: .74rem; }
  .week { gap: 4px; }
  .ring { width: 100px; height: 100px; }
  .ring::before { width: 74px; height: 88px; }
}

/* نوار بالا در گوشی‌های باریک: فقط چراغ وضعیت بدون متن */
@media (max-width: 480px) {
  .topbar { padding-inline: 12px; }
  .net-badge { padding: 6px; }
  .net-badge #net-label { display: none; }
  .user-chip { max-width: 110px; }
  .topbar .btn-sm { padding: 9px 12px; }
}

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

/* فیلد تمام‌عرض در گرید فرم‌ها */
.grid-2 .span-2 { grid-column: 1 / -1; }

/* برنامه غذایی هوشمند */
.diet-ai-text {
  white-space: pre-wrap; line-height: 1.95; font-size: .95rem;
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; max-height: 60vh; overflow-y: auto;
}

/* رژیم گیاهی (گیاهخواری) — ویژه اشتراک حرفه‌ای */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--or, #f60);
  cursor: pointer;
  flex: none;
}
.check-row.locked {
  cursor: not-allowed;
  opacity: 0.75;
}
.check-row.locked input[type="checkbox"] {
  cursor: not-allowed;
}
.vegan-badge {
  font-style: normal;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--or, #f60);
  border: 1px solid var(--or, #f60);
  border-radius: 999px;
  padding: 1px 8px;
  margin-inline-start: 6px;
  white-space: nowrap;
}
.vegan-upsell {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px dashed var(--or, #f60);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--or, #f60) 8%, transparent);
}
.vegan-upsell p { margin: 0; font-size: 0.9em; }
.plans .vegan-line,
.sub-grid .vegan-line {
  margin: 6px 0 0;
  font-size: 0.85em;
  color: var(--or, #f60);
}
.plans .vegan-line.dim,
.sub-grid .vegan-line.dim { color: inherit; opacity: 0.65; }

.btn.sm { padding: 6px 14px; font-size: 0.85em; }

/* منوی کشویی رژیم غذایی روزانه */
.diet-menu-wrap { margin-bottom: 14px; }
.diet-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.diet-menu-head label { font-weight: 700; }
.diet-menu-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#diet-menu {
  min-width: min(340px, 100%);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line, #333);
  background: var(--bg, transparent);
  color: inherit;
}
#diet-menu option[disabled] { color: var(--mut, #999); }
.diet-menu-rows { margin-top: 10px; display: grid; gap: 6px; }
.diet-menu-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.9em;
  padding: 7px 10px;
  border: 1px solid var(--line, #333);
  border-radius: 10px;
}
.diet-menu-meal {
  flex: none;
  font-weight: 700;
  min-width: 56px;
}
.diet-menu-food { color: var(--mut, #bbb); }

/* گزینه گیاهی با رنگ متمایز */
#diet-menu option.vegan { color: #2e9e5b; font-weight: 700; }
#diet-menu.vegan-picked { border-color: #2e9e5b; box-shadow: 0 0 0 1px #2e9e5b inset; }

/* بخش غیرفعال‌شده از پنل ادمین */
.feature-off-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px dashed var(--line, #444);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  background: rgba(127, 127, 127, 0.08);
}
.feature-off-card strong { font-size: 1.05em; }
.feature-off-card span { color: var(--mut, #999); font-size: 0.9em; }
#view-diet.feature-off > *:not(.feature-off-card),
#view-workout.feature-off > *:not(.feature-off-card) { display: none; }
.bottom-nav .nav-off { opacity: 0.4; }
