/* ============================================================
   Coachini — هویت بصری «قدرت و انرژی» | نسخه تم زغالی کامل
   مشکی زغالی + نارنجی آتشین | فونت: وزیرمتن | RTL | نشانگر دمبل
   ============================================================ */

/* ---------- فونت ---------- */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/* ---------- متغیرها ---------- */
:root {
  --bg: #12151B;
  --bg-deep: #0E1116;
  --surface: #1A1F29;
  --surface-2: #212836;
  --dark: #12151B;
  --dark-2: #1A1F29;
  --dark-3: #2A3140;
  --accent: #FF4D2E;
  --accent-hover: #FF6A4E;
  --accent-soft: rgba(255, 77, 46, .14);
  --accent-2: #FFB347;
  --text: #E9ECF2;
  --text-2: #99A3B4;
  --text-3: #6B7488;
  --line: #2A3140;
  --success: #34D399;
  --success-soft: rgba(52, 211, 153, .13);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, .13);
  --info: #60A5FA;
  --info-soft: rgba(96, 165, 250, .13);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
  --glow: 0 0 0 1px rgba(255, 77, 46, .35), 0 12px 34px rgba(255, 77, 46, .18);
  color-scheme: dark;
}

/* ---------- انیمیشن‌ها ---------- */
@keyframes mf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mf-slide-down { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes mf-fade-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes mf-pop { 0% { opacity: 0; transform: scale(.92); } 60% { transform: scale(1.015); } 100% { opacity: 1; transform: scale(1); } }
@keyframes mf-breathe { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: .95; transform: scale(1.06); } }
@keyframes mf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes mf-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes mf-flashbar { from { width: 100%; } to { width: 0; } }
@keyframes mf-spin { to { transform: rotate(360deg); } }
@keyframes mf-pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: .68; } }

/* ---------- نشانگر دمبل (ثابت، بدون انیمیشن) ---------- */
:root {
  --mf-cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3E%3Crect%20x='10'%20y='14'%20width='12'%20height='4'%20rx='2'%20fill='%23555D6E'/%3E%3Crect%20x='1'%20y='8'%20width='7'%20height='16'%20rx='2.5'%20fill='%23FF4D2E'/%3E%3Crect%20x='24'%20y='8'%20width='7'%20height='16'%20rx='2.5'%20fill='%23FF4D2E'/%3E%3Crect%20x='8'%20y='11'%20width='4'%20height='10'%20rx='1.5'%20fill='%23C93A1E'/%3E%3Crect%20x='20'%20y='11'%20width='4'%20height='10'%20rx='1.5'%20fill='%23C93A1E'/%3E%3C/svg%3E") 16 16;
}
body, a, button, select, label, .btn, .cat-tab, .item-toggle, .flash-close,
.sel-order button, .sel-remove, .modal-close, summary, [data-copy] {
  cursor: var(--mf-cursor), auto;
}

/* ---------- پایه ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
}
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--dark-3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
.container { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.container.narrow { max-width: 860px; }
.container.wide { max-width: 1360px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--text-2); }
.muted-light { color: rgba(233, 236, 242, .55); }
.accent-text { color: var(--accent); }
.center { text-align: center; }
.req { color: var(--accent); font-style: normal; }
.row-muted { opacity: .5; }
.en-name { display: block; direction: ltr; text-align: right; font-size: 11px; font-weight: 500; letter-spacing: .3px; color: var(--text-3); }
.contact-cell { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.perm-hints { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- ظاهرشدن هنگام اسکرول ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal-in { opacity: 1; transform: none; }
.steps-grid .reveal:nth-child(2), .cat-grid .reveal:nth-child(2), .quick-grid .reveal:nth-child(2) { transition-delay: .12s; }
.steps-grid .reveal:nth-child(3), .cat-grid .reveal:nth-child(3), .quick-grid .reveal:nth-child(3) { transition-delay: .24s; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: var(--mf-cursor), auto; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(255, 77, 46, .28); }
.btn-accent:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 8px 26px rgba(255, 77, 46, .42); transform: translateY(-1px); }
.btn-accent::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .35) 50%, transparent 68%);
  transform: translateX(130%);
  transition: transform .55s ease;
}
.btn-accent:hover::after { transform: translateX(-130%); }
.btn-soft { background: var(--accent-soft); color: #FF8A73; }
.btn-soft:hover { background: rgba(255, 77, 46, .24); color: #FFA38F; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--dark-3); }
.btn-ghost:hover { color: var(--text); border-color: #47536A; background: rgba(255, 255, 255, .03); }
.btn-outline-light { background: transparent; color: #F5F6F8; border-color: rgba(245, 246, 248, .35); }
.btn-outline-light:hover { border-color: rgba(245, 246, 248, .85); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: rgba(248, 113, 113, .35); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: var(--mf-cursor), auto; }

/* ---------- هدر ---------- */
.site-header {
  background: rgba(14, 17, 22, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  animation: mf-slide-down .55s cubic-bezier(.2, .7, .3, 1) both;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; flex-wrap: wrap; padding-block: 8px; }
.brand { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: .2px; }
.brand span { color: var(--accent); }
.brand.big { font-size: 30px; }
.brand.small { font-size: 18px; }
.main-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: rgba(233, 236, 242, .72); font-weight: 500; font-size: 14px; transition: color .18s ease; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a.active { position: relative; }
.main-nav a.active::after {
  content: ''; position: absolute; right: 0; left: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-size: 200% 100%;
  animation: mf-gradient 3s linear infinite;
}
.main-nav .btn-accent.active::after { display: none; }
.user-chip {
  background: var(--surface-2); border: 1px solid var(--dark-3);
  color: var(--text); font-size: 13px; font-weight: 600;
  padding: 5px 14px; border-radius: 999px;
}

/* ---------- پیام فلش ---------- */
.flash {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
  z-index: 100; min-width: 300px; max-width: 520px;
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  overflow: hidden; backdrop-filter: blur(8px);
  animation: mf-slide-down .4s cubic-bezier(.2, .7, .3, 1.1);
}
.flash::after {
  content: ''; position: absolute; bottom: 0; right: 0; height: 3px;
  background: currentColor; opacity: .65;
  animation: mf-flashbar 6s linear forwards;
}
@keyframes flashIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.flash-success { background: rgba(20, 45, 34, .92); color: var(--success); border: 1px solid rgba(52, 211, 153, .35); }
.flash-error { background: rgba(52, 22, 22, .92); color: var(--danger); border: 1px solid rgba(248, 113, 113, .35); }
.flash-info { background: rgba(18, 34, 56, .92); color: var(--info); border: 1px solid rgba(96, 165, 250, .35); }
.flash-close { margin-inline-start: auto; background: none; border: 0; font-size: 18px; color: inherit; line-height: 1; }
.flash.hide { opacity: 0; transform: translate(-50%, -10px); transition: opacity .4s ease, transform .4s ease; }

/* ---------- صفحه ---------- */
.page { min-height: calc(100vh - 210px); padding-block: 28px 48px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; animation: mf-fade-up .5s ease both; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.back-link:hover { color: var(--accent); }
.list-title { font-size: 18px; font-weight: 800; margin: 30px 0 14px; display: flex; align-items: center; gap: 8px; }

/* ---------- هیرو ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 480px at 88% -10%, rgba(255, 77, 46, .3), transparent 62%),
    radial-gradient(800px 380px at 6% 112%, rgba(255, 179, 71, .1), transparent 55%),
    var(--bg-deep);
  color: #F5F6F8;
  padding-block: 72px 80px;
  margin-block: -28px 0;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  top: -220px; left: -140px; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 77, 46, .17), transparent 65%);
  animation: mf-breathe 7s ease-in-out infinite;
}
.hero::after {
  content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  bottom: -200px; right: -120px; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 179, 71, .1), transparent 65%);
  animation: mf-breathe 9s ease-in-out infinite reverse;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-title {
  font-size: 68px; font-weight: 900; line-height: 1.15; letter-spacing: .5px;
  animation: mf-fade-up .6s ease .05s both;
}
.hero-title .accent, .hero-copy .accent {
  background: linear-gradient(90deg, #FF4D2E, #FFB347, #FF4D2E);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: mf-gradient 5s ease infinite;
}
.hero-tag { font-size: 24px; font-weight: 800; margin-top: 12px; color: #fff; animation: mf-fade-up .6s ease .18s both; }
.hero-desc { margin-top: 14px; max-width: 480px; color: rgba(233, 236, 242, .7); animation: mf-fade-up .6s ease .3s both; }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; animation: mf-fade-up .6s ease .4s both; }
.hero-stats { margin-top: 30px; display: flex; gap: 26px; flex-wrap: wrap; animation: mf-fade-up .6s ease .5s both; }
.hero-stats .stat {
  display: flex; flex-direction: column; gap: 2px;
  border-inline-start: 3px solid var(--accent); padding-inline-start: 12px;
  transition: transform .25s ease;
}
.hero-stats .stat:hover { transform: translateY(-4px); }
.hero-stats b { font-size: 22px; font-weight: 900; color: #fff; }
.hero-stats span { font-size: 12.5px; color: rgba(233, 236, 242, .6); }

/* ---------- کارت ورود ---------- */
.login-card {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px; padding: 28px;
  box-shadow: var(--shadow-lg);
  scroll-margin-top: 90px;
  animation: mf-pop .6s cubic-bezier(.2, .7, .3, 1.1) .35s both;
}
.login-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-hint {
  font-size: 12.5px; margin-top: 14px;
  color: var(--accent); font-weight: 700; line-height: 1.9;
}
/* جمله‌ی بالای فرم ثبت‌نام — نارنجی برای جلب توجه */
.register-note {
  font-size: 13px; font-weight: 700; line-height: 1.9;
  color: var(--accent);
  background: rgba(255, 77, 46, .08);
  border: 1px solid rgba(255, 77, 46, .25);
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 16px;
}
.register-link {
  display: block; text-align: center; margin-top: 12px;
  font-size: 13.5px; font-weight: 800; color: var(--accent);
  border: 1.5px dashed rgba(255, 77, 46, .4); border-radius: 999px;
  padding: 8px 16px; transition: all .15s ease;
}
.register-link:hover { background: var(--accent-soft); color: var(--accent); transform: translateY(-1px); }
.auth-wrap { display: flex; justify-content: center; padding-block: 40px; }
.login-card.standalone { width: 100%; max-width: 430px; }

/* ---------- سکشن‌ها ---------- */
.section { padding-block: 56px; }
.section-alt { background: var(--bg-deep); border-block: 1px solid rgba(255, 255, 255, .04); }
.section-title { font-size: 26px; font-weight: 900; text-align: center; }
.section-sub { text-align: center; color: var(--text-2); margin-top: 6px; }
.steps-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  border-top: 3px solid var(--accent);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.step-card:hover, .cat-card:hover, .quick-card:hover {
  transform: translateY(-5px); box-shadow: var(--glow); border-color: rgba(255, 77, 46, .4);
}
.step-num {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--dark-2), var(--dark-3)); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .25);
}
.step-card h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 6px; }
.step-card p { color: var(--text-2); font-size: 14px; }
/* auto-fit: با پنج دسته همه در یک ردیف می‌مانند و ردیف ناقص وسط‌چین می‌شود */
.cat-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; justify-content: center; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cat-icon { font-size: 34px; margin-bottom: 8px; display: inline-block; animation: mf-float 4s ease-in-out infinite; }
.cat-card:nth-child(2) .cat-icon { animation-delay: .6s; }
.cat-card:nth-child(3) .cat-icon { animation-delay: 1.2s; }
.cat-card h3 { font-size: 18px; font-weight: 800; }
.cat-card p { color: var(--text-2); font-size: 13.5px; margin-block: 4px 12px; }

/* ---------- بج و چیپ ---------- */
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: #FF8A73; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-muted { background: var(--surface-2); color: var(--text-2); }
.badge-soft { background: var(--surface-2); color: var(--text-2); }
.badge-info { background: var(--info-soft); color: var(--info); }
.chip { display: inline-block; background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; }
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding-inline: 6px; margin-inline-start: 4px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, .08); color: inherit;
}
.cat-tab.active .tab-count { background: rgba(255, 77, 46, .3); }

/* ---------- کارت و جدول ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.no-margin { margin-bottom: 0; }
.table-wrap { padding: 6px 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: right; font-size: 12px; font-weight: 700; color: var(--text-2);
  padding: 10px 16px; white-space: nowrap;
}
.table thead tr { border-bottom: 1px solid var(--line); }
.table td { padding: 10px 16px; vertical-align: middle; }
.table tbody tr { border-bottom: 1px solid var(--line); transition: background .18s ease; }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table .nowrap { white-space: nowrap; }
.table td > .btn, .table td > .inline-form, .table td > form { vertical-align: middle; }
.table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.table-actions .btn { line-height: 1.5; }
.contact-cell { display: flex; flex-direction: column; justify-content: center; gap: 0; font-size: 12px; line-height: 1.7; }
.contact-cell span { display: block; white-space: nowrap; }
.perm-hints { display: flex; gap: 4px; margin-top: 2px; flex-wrap: wrap; }
.perm-hints .badge { font-size: 10.5px; padding: 1px 8px; }
.inline-pass { width: 110px; padding: 5px 8px !important; font-size: 12.5px !important; }
.row-link { color: var(--text); font-weight: 700; }
.row-link:hover { color: var(--accent); }
.row-name { font-weight: 700; white-space: nowrap; }
.table .row-link { white-space: nowrap; }
.table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-pass { width: 110px; }
.conditions { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; max-width: 480px; }
.search-bar input { flex: 1; }
.empty-state {
  background: var(--surface); border: 1.5px dashed #39414F; border-radius: var(--radius);
  padding: 48px 24px; text-align: center; margin-top: 8px;
  animation: mf-fade-up .5s ease both;
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 8px; display: inline-block; animation: mf-float 4s ease-in-out infinite; }
.empty-state h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.empty-state p { color: var(--text-2); margin-bottom: 16px; }
.empty-inline { padding: 18px 0; text-align: center; }

/* ---------- هشدار ---------- */
.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 18px; font-size: 14px; animation: mf-pop .35s ease both; }
.alert ul { margin-inline-start: 18px; }
.alert-error { background: var(--danger-soft); color: #FCA5A5; border: 1px solid rgba(248, 113, 113, .3); }

/* ---------- فرم ---------- */
.form-card { padding: 26px; animation: mf-fade-up .45s ease both; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.field > span { font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea, .search-bar input, .link-box input, .inline-pass {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: #141821; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; outline: none; width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input:focus, .field select:focus, .field textarea:focus, .search-bar input:focus, .inline-pass:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 46, .18); background: #171C26;
}
.field textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-full { grid-column: 1 / -1; }
.checkbox-field { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.checkbox-field > span { line-height: 1.7; }
/* گروه چک‌باکس‌های دسته‌بندی حرکت (چندانتخابی) */
.cats-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 4px 2px; }
.form-actions { margin-top: 22px; display: flex; gap: 12px; }
.perms-box {
  margin-top: 18px; border: 1px dashed var(--dark-3); border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 14px;
}
.perms-box legend { font-size: 13px; font-weight: 700; color: var(--text-2); padding-inline: 6px; }
.jdate { display: flex; gap: 8px; }
.jdate select { font-family: inherit; padding: 10px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #141821; color: var(--text); font-size: 14px; }
.jdate .jdate-day { width: 74px; }
.jdate .jdate-month { flex: 1; }
.jdate .jdate-year { width: 90px; }

/* ---------- پروفایل ---------- */
.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.profile-grid.wide-grid { grid-template-columns: 1.3fr .7fr; }
.info-card h3, .share-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.info-list > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.info-list dt { color: var(--text-2); font-size: 13px; }
.info-list dd { font-weight: 700; font-size: 13.5px; }
.conditions-title { margin-top: 18px; font-size: 14px; font-weight: 800; }
.conditions-text { color: var(--text-2); font-size: 13.5px; margin-top: 4px; white-space: pre-wrap; }
.share-card p { font-size: 13px; }
.link-box { display: flex; gap: 8px; margin-block: 12px; }
.link-box input { font-size: 12.5px; direction: ltr; }
.link-box.slim { margin-block: 0; max-width: 420px; }
.share-card form { margin-top: 4px; }

/* ---------- لیست برنامه‌ها ---------- */
.programs-list { display: flex; flex-direction: column; gap: 14px; }
.program-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.program-card:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.program-card.is-archived { opacity: .65; }
.program-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.program-title { font-size: 16.5px; font-weight: 800; }
.program-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 12.5px; margin-top: 6px; align-items: center; }

/* ---------- صفحه‌ی برنامه ---------- */
.program-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; animation: mf-fade-up .45s ease both; }
.program-header h1 { font-size: 22px; font-weight: 900; }
.program-sub { color: var(--text-2); margin-top: 2px; }
.program-meta { margin-top: 10px; }
.program-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.notes-card { margin-top: 16px; }
.notes-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.notes-card p { color: var(--text-2); white-space: pre-wrap; }
.items-card { margin-top: 16px; }
.items-card.bare { margin-top: 14px; box-shadow: none; }

.prog-section { margin-bottom: 8px; }
.prog-cat { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 800; margin: 18px 0 10px; }
.cat-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cat-upper { background: var(--accent); box-shadow: 0 0 10px rgba(255, 77, 46, .6); }
.cat-lower { background: var(--accent-2); box-shadow: 0 0 10px rgba(255, 179, 71, .5); }
.cat-full { background: var(--success); box-shadow: 0 0 10px rgba(52, 211, 153, .5); }
.cat-corrective { background: #A78BFA; box-shadow: 0 0 10px rgba(167, 139, 250, .5); }
.cat-home { background: #38BDF8; box-shadow: 0 0 10px rgba(56, 189, 248, .5); }

.prog-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: #1B212B;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: mf-fade-up .45s ease both;
}
.prog-item:hover { border-color: #3A4354; }
.prog-item.open { background: var(--surface-2); box-shadow: var(--shadow); border-color: rgba(255, 77, 46, .3); }
.prog-item-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.item-toggle {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px;
  background: none; border: 0; font-family: inherit; text-align: right; padding: 2px 0;
}
.item-idx {
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, var(--dark-2), var(--dark-3)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.item-title { font-weight: 700; font-size: 14.5px; color: var(--text); }
.item-toggle:hover .item-title { color: var(--accent); }
.item-chev { color: var(--text-2); font-size: 12px; transition: transform .25s ease; }
.prog-item.open .item-chev { transform: rotate(180deg); }
.item-meta { display: flex; gap: 8px; }
.meta-box {
  display: flex; flex-direction: column; align-items: center; min-width: 64px;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px 10px;
}
.meta-box small { color: var(--text-2); font-size: 10.5px; }
.meta-box b { font-size: 14px; }
.item-details { display: none; border-top: 1px dashed var(--line); padding: 14px 16px 16px; font-size: 13.5px; }
.prog-item.open .item-details { display: block; animation: mf-fade-in .3s ease; }
.item-note { background: var(--accent-soft); color: #FFA38F; border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 10px; }
.item-muscles { color: var(--text-2); margin-bottom: 10px; }
.item-details h4 { font-size: 13px; font-weight: 800; margin-block: 12px 6px; }
.steps-list, .mist-list, .tips-list { margin-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; }
.sub-mist { color: var(--danger); }
.sub-tips { color: var(--success); }
.mist-list li::marker { color: var(--danger); }
.tips-list li::marker { color: var(--success); }

/* ---------- سازنده‌ی برنامه ---------- */
.builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.athlete-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; font-size: 13.5px; animation: mf-fade-up .45s ease both; }
.athlete-strip b { font-size: 15px; }
.cond-badge { background: var(--info-soft); color: var(--info); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600; }
.cat-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.builder-search { margin-bottom: 14px; }
.builder-search input {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: #141821; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 16px; outline: none; width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.builder-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 46, .18); }
.ex-cat { display: inline-block; background: rgba(255, 179, 71, .15); color: var(--accent-2); border-radius: 999px; padding: 1px 10px; font-size: 10.5px; font-weight: 700; margin-inline-start: 6px; }
.cat-tab {
  font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 9px 22px; border-radius: 999px;
  background: var(--surface); color: var(--text-2); border: 1.5px solid var(--line);
  display: inline-flex; align-items: center;
  transition: all .2s ease;
}
.cat-tab:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.cat-tab:active { transform: scale(.96); }
.cat-tab.active { background: var(--dark); color: #fff; border-color: var(--accent); box-shadow: var(--glow); }
.exercise-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.loading-note { grid-column: 1 / -1; text-align: center; padding: 30px 0; color: var(--text-2); }
.loading-note::after {
  content: ''; display: block; width: 26px; height: 26px; margin: 12px auto 0;
  border: 3px solid var(--dark-3); border-top-color: var(--accent); border-radius: 50%;
  animation: mf-spin .8s linear infinite;
}
.ex-card {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  animation: mf-pop .35s ease both;
}
.ex-card:hover { border-color: rgba(255, 77, 46, .5); box-shadow: var(--glow); transform: translateY(-3px); }
.ex-card.selected { border-color: var(--accent); background: rgba(255, 77, 46, .07); }
.ex-title { font-weight: 700; font-size: 14.5px; }
.ex-equip { font-size: 12px; color: var(--text-2); }
.ex-actions { display: flex; gap: 8px; margin-top: 2px; }
.builder-side { position: sticky; top: 84px; }
.side-card { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 104px); overflow: hidden; padding: 18px; }
.side-head { display: flex; align-items: center; justify-content: space-between; }
.side-head h3 { font-size: 15.5px; font-weight: 800; }
.selected-list { overflow-y: auto; flex: 1; min-height: 120px; display: flex; flex-direction: column; gap: 8px; padding-inline-end: 4px; }
.side-empty { font-size: 13px; text-align: center; padding: 20px 8px; }
.sel-group {
  font-size: 12px; font-weight: 800; color: var(--text-2); margin-top: 6px;
  display: flex; align-items: center; gap: 8px;
}
.sel-group::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.selected-item {
  display: flex; flex-direction: column; gap: 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: #171C26;
  animation: mf-pop .3s ease both;
}
.selected-item .sel-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.selected-item .sel-title { font-weight: 700; font-size: 13.5px; }
.sel-order { display: flex; gap: 5px; }
.sel-order button {
  width: 34px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text-2); font-size: 13px; line-height: 1; cursor: pointer;
  transition: all .15s ease;
}
.sel-order button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.sel-order button:active { transform: scale(.94); }
.sel-remove { background: none; border: 0; color: var(--danger); font-size: 16px; line-height: 1; padding: 2px 6px; }
.sel-remove:hover { color: #FCA5A5; }
.sel-inputs { display: flex; gap: 8px; }
.sel-inputs label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--text-2); flex: 1; }
.sel-inputs input { font-family: inherit; font-size: 13px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 7px; background: #141821; color: var(--text); width: 100%; }
.sel-inputs input:focus { outline: none; border-color: var(--accent); }
.side-meta { border-top: 1px dashed var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.save-status { font-size: 12.5px; min-height: 18px; }
.save-status.error { color: var(--danger); }
.save-status.ok { color: var(--success); }
#save-program.saving { animation: mf-pulse-soft 1.2s ease infinite; }

/* ---------- مودال ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 10, 14, .68); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
  animation: mf-fade-in .22s ease;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 640px; width: 100%; max-height: 84vh; overflow-y: auto; padding: 24px; position: relative;
  box-shadow: var(--shadow-lg);
  animation: mf-pop .32s cubic-bezier(.2, .7, .3, 1.15);
}
.modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal-close {
  position: absolute; top: 12px; left: 12px; width: 32px; height: 32px;
  border-radius: 9px; border: 0; background: var(--surface-2); font-size: 18px; color: var(--text-2);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.modal-close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
.modal .ex-equip { margin-bottom: 10px; }
.modal h4 { font-size: 13.5px; font-weight: 800; margin-block: 14px 6px; }

/* ---------- صفحه عمومی ---------- */
.public-page { background: var(--bg); }
.public-bar { background: var(--bg-deep); padding-block: 14px; border-bottom: 1px solid var(--line); }
.public-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.public-main { padding-block: 26px 50px; }
.public-hero-card { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; animation: mf-fade-up .5s ease both; }
.public-hero-card h1 { font-size: 24px; font-weight: 900; }
.public-avatar {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--dark-2), var(--dark-3)); color: var(--accent-2);
  font-size: 28px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .25);
}
.program-public-card { margin-bottom: 18px; animation: mf-fade-up .5s ease both; }

/* ---------- PDF (کاغذ سفید برای چاپ) ---------- */
.pdf-body { background: var(--bg-deep); }
.pdf-toolbar { background: var(--bg-deep); padding-block: 12px; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.pdf-toolbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pdf-toolbar-actions { display: flex; gap: 10px; }
.pdf-doc {
  /* بازتعریف متغیرها در محدوده‌ی کاغذ تا سفید و خوانا بماند */
  --bg: #fff; --surface: #fff; --surface-2: #F5F6F8;
  --text: #1A1D23; --text-2: #5A6270; --text-3: #8A93A3; --line: #E4E7EC;
  color-scheme: light;
  background: #fff; color: #1A1D23;
  max-width: 820px; margin: 26px auto 60px; padding: 44px 48px;
  box-shadow: var(--shadow-lg); border-radius: 4px;
}
.pdf-brand { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--accent); padding-bottom: 14px; }
.pdf-logo { font-size: 26px; font-weight: 900; color: var(--dark); }
.pdf-logo span { color: var(--accent); }
.pdf-doc-label { font-size: 15px; font-weight: 800; color: #5A6270; background: #F5F6F8; border-radius: 999px; padding: 4px 18px; }
.pdf-headline { margin-top: 22px; }
.pdf-headline h1 { font-size: 21px; font-weight: 900; }
.pdf-meta { color: #5A6270; font-size: 12.5px; margin-top: 6px; }
.pdf-info { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 12.5px; }
.pdf-info th { background: #F5F6F8; font-weight: 700; text-align: right; padding: 7px 12px; border: 1px solid var(--line); width: 90px; white-space: nowrap; color: #1A1D23; }
.pdf-info td { border: 1px solid var(--line); padding: 7px 12px; }
.pdf-cat { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin: 24px 0 8px; }
.pdf-cat .cat-dot { box-shadow: none; }
.pdf-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pdf-table th { background: var(--dark); color: #fff; font-weight: 700; padding: 8px 10px; text-align: right; border: 1px solid var(--dark); }
.pdf-table td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.pdf-table tbody tr:nth-child(even) { background: #FAFBFC; }
.pdf-table .w-idx { width: 34px; text-align: center; }
.pdf-table .w-num { width: 70px; text-align: center; white-space: nowrap; }
.pdf-table .cell-title { font-weight: 700; }
.pdf-en { display: block; direction: ltr; text-align: right; font-size: 10.5px; font-weight: 500; color: #8A93A3; }
.pdf-notes { margin-top: 24px; background: #FFF7F4; border: 1px solid #FFD9CE; border-radius: var(--radius-sm); padding: 14px 18px; }
.pdf-notes h3 { font-size: 13.5px; font-weight: 800; margin-bottom: 4px; color: #C63A20; }
.pdf-footer { margin-top: 40px; border-top: 1.5px dashed var(--line); padding-top: 18px; }
.pdf-sign { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.pdf-sign-line { flex: 1; border-bottom: 1.5px solid #5A6270; max-width: 220px; transform: translateY(6px); }
.pdf-brand-line { margin-top: 22px; text-align: center; font-size: 12px; color: #5A6270; }
.pdf-brand-line span { color: var(--accent); font-weight: 900; }

/* ---------- پنل مدیریت ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { text-align: center; padding: 22px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; animation: mf-fade-up .45s ease both; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.stat-num { display: block; font-size: 30px; font-weight: 900; color: var(--accent); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.quick-card { display: block; color: var(--text); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.quick-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.quick-card p { font-size: 13px; }
.role-guide { margin-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.tabs-row { display: flex; gap: 8px; margin-block: 8px 16px; flex-wrap: wrap; }

/* ---------- نصب ---------- */
.install-body { background: radial-gradient(900px 420px at 90% -10%, rgba(255, 77, 46, .25), transparent 60%), var(--bg-deep); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; }
.install-wrap { width: 100%; max-width: 620px; }
.install-card { padding: 34px; animation: mf-pop .5s ease both; }
.install-card h2 { font-size: 21px; font-weight: 900; margin-block: 14px 8px; }
.install-checks { list-style: none; margin-block: 16px; display: flex; flex-direction: column; gap: 8px; }
.install-checks li { background: #141821; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 14px; font-size: 14px; }
.install-checks li.pass { border-color: rgba(52, 211, 153, .4); color: var(--success); font-weight: 700; }
.install-checks li.fail { border-color: rgba(248, 113, 113, .4); color: var(--danger); font-weight: 700; }
.install-log { list-style: none; margin-block: 14px; display: flex; flex-direction: column; gap: 8px; }
.install-log li { border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13.5px; background: #141821; border: 1px solid var(--line); }
.install-log li.log-ok { border-color: rgba(52, 211, 153, .4); }
.install-log li.log-warn { border-color: rgba(255, 179, 71, .4); background: rgba(255, 179, 71, .07); }
.install-log li.log-skip { color: var(--text-2); }
.install-actions { display: flex; gap: 12px; margin-top: 16px; }
.install-note { font-size: 12px; margin-top: 12px; text-align: center; }
.db-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12px; direction: ltr; text-align: left; overflow-x: auto; }
.install-card form { margin-top: 20px; }

/* ---------- پاصفحه ---------- */
.site-footer { background: var(--bg-deep); color: rgba(233, 236, 242, .55); margin-top: 40px; padding-block: 22px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 48px; }
  .builder-layout { grid-template-columns: 1fr; }
  .builder-side { position: static; }
  .side-card { max-height: none; }
  .profile-grid, .profile-grid.wide-grid { grid-template-columns: 1fr; }
  .steps-grid, .cat-grid, .quick-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-block: 44px 52px; }
  .hero-title { font-size: 38px; }
  .steps-grid, .cat-grid, .quick-grid { grid-template-columns: 1fr; }
  .exercise-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .info-list { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-head { flex-direction: column; }
  .pdf-doc { padding: 26px 20px; margin: 14px auto 40px; }
  .program-header, .program-card-head { flex-direction: column; }
  .program-actions { justify-content: flex-start; }
}

/* ---------- احترام به تنظیم کاهش حرکت ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- پیام‌ها ---------- */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding-inline: 5px; margin-inline-start: 2px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1;
  animation: mf-pulse-soft 2.2s ease infinite;
}
.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-row {
  display: flex; align-items: center; gap: 14px; color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.msg-row:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--glow); border-color: rgba(255, 77, 46, .4); }
.msg-row-main { flex: 1; min-width: 0; }
.msg-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-row-top b { font-size: 15px; }
.msg-preview { color: var(--text-2); font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; margin-top: 4px; }
.msg-row-arrow { font-size: 18px; color: var(--text-3); transition: transform .2s ease, color .2s ease; }
.msg-row:hover .msg-row-arrow { transform: translateX(-4px); color: var(--accent); }

.coach-tag-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 20px; animation: mf-fade-up .45s ease both; }
.coach-tag-card.in-profile { margin-bottom: 16px; padding: 12px 14px; background: var(--surface-2); box-shadow: none; }
.coach-label { font-weight: 700; color: var(--text-2); font-size: 13.5px; }
.coach-tag {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-soft); color: #FF8A73; border: 1px solid rgba(255, 77, 46, .3);
  border-radius: 999px; padding: 5px 16px 5px 8px; font-weight: 700; font-size: 14px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.coach-tag:hover { transform: translateY(-1px); box-shadow: var(--glow); color: #FFA38F; }
.coach-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #E8401F); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900;
}
.tickets-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.tickets-cta h3 { font-size: 15.5px; font-weight: 800; }

.thread-box { display: flex; flex-direction: column; gap: 12px; max-height: 55vh; overflow-y: auto; animation: mf-fade-up .45s ease both; }

/* ---------- روزهای هفته در سازنده ---------- */
.days-block { margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; animation: mf-fade-up .45s ease both; }
.days-block-title { font-size: 13.5px; font-weight: 800; margin-bottom: 10px; }
.days-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.day-chip {
  position: relative; min-width: 86px; text-align: center;
  background: #141821; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 7px 12px; cursor: var(--mf-cursor), auto;
  transition: border-color .18s ease, background .18s ease, transform .15s ease;
  user-select: none;
}
.day-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.day-chip.selected { border-color: var(--accent); background: var(--accent-soft); }
.day-chip.active { border-color: var(--accent); background: var(--accent); }
.day-chip.active .day-name, .day-chip.active .day-tag { color: #fff; }
.day-name { display: block; font-weight: 800; font-size: 13px; color: var(--text); }
.day-tag { display: block; font-size: 10.5px; font-weight: 700; color: var(--accent-2); margin-top: 1px; }
.day-remove {
  position: absolute; top: -7px; left: -7px; width: 18px; height: 18px;
  border-radius: 50%; border: 0; background: var(--danger); color: #fff;
  font-size: 12px; line-height: 1; cursor: var(--mf-cursor), auto;
  display: none; align-items: center; justify-content: center;
}
.day-chip:hover .day-remove { display: inline-flex; }
.tag-picker { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tag-picker-label { font-size: 13px; font-weight: 700; }
.tag-option {
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 5px 16px; border-radius: 999px; cursor: var(--mf-cursor), auto;
  background: var(--surface-2); color: var(--text-2); border: 1.5px solid var(--line);
  transition: all .15s ease;
}
.tag-option:hover { border-color: var(--accent); color: var(--accent); }
.tag-option.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sel-group-day { color: var(--accent-2); font-size: 13px; }
.day-tag-badge {
  display: inline-block; background: rgba(255, 179, 71, .16); color: var(--accent-2);
  border-radius: 999px; padding: 1px 10px; font-size: 10.5px;
}
.sel-count-mini { font-weight: 500; color: var(--text-3); font-size: 11px; }
.sel-inputs select { font-family: inherit; font-size: 13px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 7px; background: #141821; color: var(--text); width: 100%; }
.sel-inputs select:focus { outline: none; border-color: var(--accent); }

/* ---------- نمایش روزبندی در صفحه برنامه ---------- */
.day-section { margin-bottom: 22px; }
.day-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--dark); color: #fff; border-radius: var(--radius-sm);
  padding: 9px 16px; margin-bottom: 12px;
  border-inline-start: 4px solid var(--accent);
}
.day-head-name { font-size: 15.5px; font-weight: 900; }
.day-head-tag {
  font-size: 11.5px; font-weight: 800; background: var(--accent-soft); color: #FF8A73;
  border-radius: 999px; padding: 2px 12px;
}

/* ---------- لودینگ دمبل چرخان ---------- */
#mf-loading {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(14, 17, 22, .72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: mf-fade-in .18s ease;
}
.mf-loading-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 40px; box-shadow: var(--shadow-lg);
}
.mf-dumbbell { width: 46px; height: 46px; animation: mf-spin 1.1s cubic-bezier(.6,.1,.4,.9) infinite; }
.mf-loading-box span { font-size: 14px; font-weight: 700; color: var(--text-2); }

/* ---------- سوپر ست ---------- */
.ss-toggle {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  color: #fff; font-family: inherit; font-size: 11.5px; font-weight: 700; padding: 4px 12px;
  box-shadow: 0 3px 10px rgba(255, 77, 46, .25);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.ss-toggle:hover { background: var(--accent-hover); transform: translateY(-1px); }
.ss-toggle:active { transform: scale(.95); }
.ss-toggle.active { background: var(--accent-2); color: var(--dark); box-shadow: 0 3px 10px rgba(255, 179, 71, .35); }
.selected-item.in-superset { border-color: rgba(255, 179, 71, .5); background: rgba(255, 179, 71, .07); }
.ss-badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  background: rgba(255, 179, 71, .18); color: var(--accent-2);
  border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px;
}
.superset-box {
  border: 1.5px dashed rgba(255, 179, 71, .55); border-radius: var(--radius-sm);
  padding: 10px; margin-bottom: 14px; background: rgba(255, 179, 71, .04);
}
.superset-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; font-weight: 700; color: var(--accent-2); margin-bottom: 8px;
}
.pdf-ss { display: inline-block; font-size: 10px; font-weight: 800; color: #B26A00; background: #FFF3D6; border-radius: 999px; padding: 1px 8px; margin-top: 3px; }

/* ---------- آیکون‌های اشتراک‌گذاری ---------- */
.share-icons { display: inline-flex; gap: 8px; align-items: center; }
.share-icons a {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.share-icons a:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: var(--shadow); }
.share-icons svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.si-wa { background: #25D366; color: #fff; }
.si-tg { background: #229ED9; color: #fff; }
.si-sms { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.share-cred-card { margin-top: 18px; }
.share-cred-card h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 6px; }
.cred-box { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.cred-pass { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cred-pass code {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 14px; font-size: 16px; letter-spacing: 2px; color: var(--accent-2); font-weight: 700;
}
.notes-inline { margin-top: 14px; background: var(--accent-soft); border: 1px solid rgba(255, 77, 46, .25); border-radius: var(--radius-sm); padding: 10px 14px; }
.notes-inline h3 { font-size: 13px; font-weight: 800; color: #FF8A73; margin-bottom: 4px; }
.notes-inline p { font-size: 13.5px; white-space: pre-wrap; }
.msg { display: flex; }
.msg.mine { justify-content: flex-start; }
.msg.theirs { justify-content: flex-end; }
.msg-bubble {
  max-width: 82%; border-radius: 14px; padding: 10px 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  animation: mf-pop .3s ease both;
}
.msg.mine .msg-bubble { background: var(--accent-soft); border-color: rgba(255, 77, 46, .3); border-radius: 14px 14px 14px 4px; }
.msg.theirs .msg-bubble { border-radius: 14px 14px 4px 14px; }
.msg-head { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.msg.mine .msg-head b { color: #FF8A73; }
.msg-bubble p { font-size: 14px; word-wrap: break-word; }
.reply-box { margin-top: 16px; }

/* ---------- چاپ ---------- */
@media print {
  .site-header, .site-footer, .flash, .pdf-toolbar, .no-print, .search-bar, .page-head .btn, .table-actions { display: none !important; }
  body { background: #fff; }
  .pdf-doc { box-shadow: none; margin: 0 auto; max-width: 100%; border-radius: 0; padding: 10mm 6mm; }
  .pdf-table { page-break-inside: auto; }
  .pdf-table tr { page-break-inside: avoid; }
  .prog-item { page-break-inside: avoid; box-shadow: none; }
  @page { size: A4; margin: 12mm; }
}
