/* ═══════════════════════════════════════════════════════════════
   سامانهٔ ثبت نمرات — تم «شیشهٔ مایع» سفید + آبی مدرن
   موبایل‌فرست (معلم‌ها با گوشی نمره می‌زنند) · 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-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --teal: #0d9488;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --glass-bg: rgba(255, 255, 255, 0.66);
  --glass-brd: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 10px 34px rgba(30, 64, 175, 0.10), 0 2px 8px rgba(30, 64, 175, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Vazirmatn', 'Tahoma', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #f8fbff 0%, #eef4ff 45%, #e8f6f4 100%);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- پس‌زمینهٔ زنده (حباب‌های شیشه‌ای) ---------- */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.bg-blobs .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.blob.b1 { width: 44vmax; height: 44vmax; top: -14vmax; right: -12vmax;
  background: radial-gradient(circle, rgba(59,130,246,.34), rgba(59,130,246,0) 68%);
  animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 38vmax; height: 38vmax; bottom: -12vmax; left: -10vmax;
  background: radial-gradient(circle, rgba(13,148,136,.22), rgba(13,148,136,0) 68%);
  animation: drift2 32s ease-in-out infinite alternate; }
.blob.b3 { width: 30vmax; height: 30vmax; top: 30%; left: 22%;
  background: radial-gradient(circle, rgba(147,197,253,.30), rgba(147,197,253,0) 68%);
  animation: drift3 24s ease-in-out infinite alternate; }
.blob.b4 { width: 22vmax; height: 22vmax; top: 8%; left: 4%;
  background: radial-gradient(circle, rgba(37,99,235,.18), rgba(37,99,235,0) 70%);
  animation: drift2 30s ease-in-out infinite alternate-reverse; }

@keyframes drift1 {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(-6vmax, 7vmax, 0) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate3d(0,0,0) scale(1.08); }
  to   { transform: translate3d(7vmax, -6vmax, 0) scale(0.94); }
}
@keyframes drift3 {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(5vmax, 5vmax, 0) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-blobs .blob { animation: none !important; }
}

/* ---------- شیشه ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.card { padding: clamp(16px, 3vw, 26px); margin-bottom: 18px; }
.card h2 {
  margin: 0 0 14px;
  font-size: clamp(17px, 2.6vw, 21px);
  color: var(--blue-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card h2 .h-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-100);
  display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--blue-700); }

.fade-in { animation: fadeUp .45s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- فرم ---------- */
label.field { display: block; margin-bottom: 12px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.input, .select, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.8);
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:focus, .select:focus {
  border-color: var(--blue-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}
.select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%232563eb' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 36px;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255,255,255,.7);
  transition: transform .15s, box-shadow .15s, background .15s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(30,64,175,.14); }
.btn:active { transform: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-ghost { background: rgba(255,255,255,.55); border-color: rgba(148,163,184,.4); }
.btn-danger { color: #fff; background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn-sm { padding: 6px 14px; min-height: 34px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- نشان‌ها ---------- */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--blue-100); color: var(--blue-700);
  white-space: nowrap;
}
.pill.ok  { background: #dcfce7; color: #15803d; }
.pill.off { background: #f1f5f9; color: #64748b; }
.pill.warn { background: #fef3c7; color: #b45309; }
.pill.err { background: #fee2e2; color: #b91c1c; }

/* ---------- پیام‌ها ---------- */
.notice {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px;
  font-size: 14px; background: #dbeafe; color: #1e40af; border: 1px solid rgba(59,130,246,.3);
}
.notice.err   { background: #fee2e2; color: #991b1b; border-color: rgba(220,38,38,.3); }
.notice.ok    { background: #dcfce7; color: #166534; border-color: rgba(22,163,74,.3); }
.notice.warn  { background: #fef3c7; color: #92400e; border-color: rgba(217,119,6,.3); }

/* ---------- توست شناور ---------- */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92); color: #fff;
  padding: 12px 22px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 999; max-width: min(92vw, 480px); text-align: center;
  backdrop-filter: blur(8px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { background: rgba(22,101,52,.94); }
#toast.err { background: rgba(153,27,27,.94); }

/* ---------- ورود ---------- */
.login-body { display: flex; align-items: center; justify-content: center; padding: 24px; min-height: 100vh; }
.login-card { width: min(430px, 94vw); padding: clamp(26px, 5vw, 40px); animation: fadeUp .5s ease both; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.brand img { width: 62px; height: 62px; object-fit: contain; border-radius: 14px;
  background: #fff; padding: 4px; box-shadow: 0 4px 14px rgba(30,64,175,.14); }
.brand h1 { font-size: 19px; margin: 0; color: var(--blue-900); }
.brand p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.login-foot { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--ink-3); }

/* ---------- پوستهٔ مدیر: سایدبار راست + تمام‌صفحه ---------- */
.shell { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: 258px; flex: none;
  display: flex; flex-direction: column;
  padding: 20px 14px;
  margin: 14px 14px 14px 0;
  position: sticky; top: 14px;
  height: calc(100vh - 28px);
  overflow-y: auto;
  z-index: 50;
}
.sidebar .side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.sidebar .side-brand img { width: 50px; height: 50px; object-fit: contain; background: #fff;
  border-radius: 12px; padding: 3px; box-shadow: 0 4px 12px rgba(30,64,175,.16); }
.sidebar .side-brand b { color: var(--blue-900); font-size: 15px; display: block; line-height: 1.4; }
.sidebar .side-brand span { font-size: 11.5px; color: var(--ink-3); }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 14px;
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: background .16s, color .16s, transform .16s;
}
.side-nav a svg { width: 20px; height: 20px; flex: none; }
.side-nav a:hover { background: rgba(219, 234, 254, 0.6); color: var(--blue-700); transform: translateX(-3px); }
.side-nav a.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(148,163,184,.25); }
.side-foot .who { font-size: 12.5px; color: var(--ink-2); padding: 0 8px 10px; }
.side-foot .who b { color: var(--ink); }

.main {
  flex: 1;
  min-width: 0;
  padding: clamp(14px, 3vw, 28px);
  padding-inline-start: 0;
}

/* نوار بالای موبایل */
.topbar {
  display: none;
  position: sticky; top: 10px; z-index: 60;
  margin: 10px 10px 0;
  padding: 10px 14px;
  align-items: center; gap: 12px;
}
.topbar img { width: 38px; height: 38px; object-fit: contain; }
.topbar b { font-size: 14.5px; color: var(--blue-900); }
.topbar .menuBtn {
  margin-inline-start: auto;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid rgba(148,163,184,.4); background: rgba(255,255,255,.7);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.topbar .menuBtn svg { width: 20px; height: 20px; color: var(--blue-700); }

@media (max-width: 940px) {
  .topbar { display: flex; }
  .main { padding-inline-start: clamp(14px, 3vw, 28px); }
  .sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; height: 100vh;
    margin: 0; border-radius: 0; width: 272px;
    transform: translateX(105%);
    transition: transform .28s ease;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  }
  .sidebar.open { transform: none; }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.32); z-index: 49;
    opacity: 0; pointer-events: none; transition: opacity .25s; }
  .sidebar-scrim.show { opacity: 1; pointer-events: auto; }
}

/* ---------- سربرگ صفحه ---------- */
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(19px, 3.4vw, 26px); color: var(--blue-900); margin: 0; }
.page-head .sub { width: 100%; font-size: 13px; color: var(--ink-2); margin-top: -4px; }
.page-head .spacer { flex: 1; }

/* ---------- کارت‌های آمار ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.stat-card::after {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--blue-500), var(--teal));
  border-radius: 4px 0 0 4px;
}
.stat-num { font-size: clamp(24px, 4vw, 32px); font-weight: 800; color: var(--blue-700); }
.stat-lbl { font-size: 12.5px; color: var(--ink-2); }

/* ---------- تب‌های دوره‌ها (مثل برنامه) ---------- */
.tabs {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: thin;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { height: 5px; }
.tabs::-webkit-scrollbar-thumb { background: rgba(59,130,246,.35); border-radius: 99px; }
.tab {
  flex: none;
  padding: 9px 18px; min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(255,255,255,.66);
  color: var(--ink-2);
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all .16s;
  -webkit-tap-highlight-color: transparent;
}
.tab:hover { border-color: var(--blue-500); color: var(--blue-700); }
.tab.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* ---------- جدول‌ها ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.tbl th {
  text-align: right; font-size: 12px; color: var(--blue-700);
  background: rgba(219, 234, 254, 0.65);
  padding: 10px 12px; white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 10px 12px; border-top: 1px solid rgba(148,163,184,.22); vertical-align: middle; }
table.tbl tbody tr { transition: background .15s; }
table.tbl tbody tr:hover { background: rgba(239, 246, 255, 0.7); }
.sticky-col { position: sticky; inset-inline-end: 0; background: rgba(255,255,255,.92); z-index: 1;
  box-shadow: -8px 0 12px -8px rgba(30,64,175,.15); }

/* ---------- ورود نمره (معلم) ---------- */
.gtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.gtable th {
  text-align: center; font-size: 12px; color: var(--blue-700);
  background: rgba(219, 234, 254, 0.75);
  padding: 9px 6px; position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
.gtable td { padding: 8px 6px; border-top: 1px solid rgba(148,163,184,.2); text-align: center; position: relative; }
.gtable td.stu-name {
  text-align: right; font-weight: 600; white-space: nowrap;
  position: sticky; inset-inline-end: 0; z-index: 1;
  background: rgba(255,255,255,.94);
  box-shadow: -10px 0 14px -10px rgba(30,64,175,.18);
  max-width: 190px;
}
.gtable td.stu-name .num {
  display: inline-flex; width: 22px; height: 22px; margin-inline-end: 8px;
  align-items: center; justify-content: center; flex: none;
  background: var(--blue-100); color: var(--blue-700);
  border-radius: 7px; font-size: 11px; font-weight: 700;
}
.gtable td.stu-name .fth { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; }

.ginput {
  width: 58px; max-width: 100%;
  padding: 8px 4px;
  text-align: center;
  border-radius: 10px;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: rgba(255,255,255,.85);
  font-family: var(--font); font-size: 15px; font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ginput:focus { border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.16); }
.ginput.dirty { border-color: var(--warn); background: #fffbeb; }
.ginput.saving { border-color: var(--blue-500); background: #eff6ff; }
.ginput.saved { border-color: var(--ok); background: #f0fdf4; }
.ginput.err { border-color: var(--err); background: #fef2f2; }

.mods { display: inline-flex; gap: 5px; align-items: center; }

.mean-badge {
  display: inline-flex; min-width: 34px; justify-content: center;
  padding: 3px 8px; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  background: var(--blue-100); color: var(--blue-700);
}
.mean-badge.low { background: #fee2e2; color: #b91c1c; }
.mean-badge.mid { background: #fef3c7; color: #b45309; }
.mean-badge.good { background: #dcfce7; color: #15803d; }

.savebar {
  position: sticky; bottom: 12px; z-index: 40;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 16px; margin-top: 14px;
}
.savebar .cnt { font-size: 12.5px; color: var(--ink-2); }

.status-dot { position: absolute; top: 6px; inset-inline-start: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); margin: 0; }
.status-dot.saving { background: var(--blue-500); animation: pulse 1s infinite; }
.status-dot.saved { background: var(--ok); }
.status-dot.err { background: var(--err); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- چیدمان کارتی موبایل برای جدول نمره ---------- */
@media (max-width: 640px) {
  .gtable thead { display: none; }
  .gtable, .gtable tbody { display: block; width: 100%; }
  /* درس تخصصی: ۵ پودمان + میانگین در یک ردیف شش‌ستونه */
  .gtable.gmod tr {
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 14px;
    margin-bottom: 10px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
  }
  .gtable.gmod td { border: none; padding: 0; }
  .gtable.gmod td.stu-name {
    grid-column: 1 / -1;
    position: static; box-shadow: none; max-width: none;
    border-bottom: 1px dashed rgba(148,163,184,.3); padding-bottom: 8px; margin-bottom: 2px;
  }
  .gtable.gmod .ginput { width: 100%; min-width: 0; padding: 8px 2px; }
  .gtable.gmod .status-dot { display: none; }
  /* درس عمومی: نام + یک نمره */
  .gtable:not(.gmod) tr {
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 14px;
    margin-bottom: 10px;
    padding: 10px;
    display: flex; flex-direction: column; gap: 8px;
  }
  .gtable:not(.gmod) td { border: none; padding: 2px; }
  .gtable:not(.gmod) td.stu-name {
    position: static; box-shadow: none; max-width: none;
    border-bottom: 1px dashed rgba(148,163,184,.3); padding-bottom: 8px;
  }
}

/* ---------- جستجو و ابزار ---------- */
.searchbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.searchbar .input { flex: 1 1 220px; max-width: 420px; }

.empty { text-align: center; padding: 40px 18px; color: var(--ink-2); }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- لیست‌ها ---------- */
.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.22);
  transition: background .15s, border-color .15s;
}
.item-row:hover { background: rgba(255,255,255,.95); border-color: rgba(59,130,246,.4); }
.item-row .grow { flex: 1; min-width: 140px; }
.item-row b { color: var(--ink); font-size: 14.5px; }
.item-row .meta { font-size: 12px; color: var(--ink-3); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; background: rgba(255,255,255,.8);
  border: 1px solid rgba(148,163,184,.3);
}
.chip .x { cursor: pointer; color: var(--err); font-weight: 700; padding: 0 2px; }

/* ---------- مودال ---------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(15,23,42,.4);
  z-index: 90; display: none; align-items: center; justify-content: center; padding: 18px;
  backdrop-filter: blur(3px);
}
.modal-scrim.show { display: flex; }
.modal {
  width: min(520px, 94vw); max-height: 88vh; overflow-y: auto;
  padding: clamp(18px, 4vw, 28px);
  animation: fadeUp .3s ease both;
}
.modal h3 { margin: 0 0 14px; color: var(--blue-900); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 16px; flex-wrap: wrap; }

/* ---------- سوئیچ ---------- */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(148,163,184,.5); transition: .2s; cursor: pointer;
}
.switch .slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  right: 3px; top: 3px; background: #fff; transition: .2s;
  box-shadow: 0 2px 6px rgba(15,23,42,.25);
}
.switch input:checked + .slider { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.switch input:checked + .slider::before { transform: translateX(-18px); }

/* ---------- صفحهٔ فرود ---------- */
.hero { max-width: 860px; margin: 0 auto; padding: clamp(20px, 6vw, 60px) 18px; text-align: center; }
.hero img.logo { width: clamp(90px, 18vw, 130px); height: auto; object-fit: contain; margin-bottom: 14px; }
.hero h1 { font-size: clamp(22px, 5vw, 34px); color: var(--blue-900); margin: 0 0 8px; }
.hero p.sub { color: var(--ink-2); font-size: clamp(14px, 2.6vw, 16px); margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 34px; text-align: right; }
.feature { padding: 18px; }
.feature b { display: block; color: var(--blue-900); margin-bottom: 6px; }
.feature p { margin: 0; font-size: 13px; color: var(--ink-2); }

/* ---------- ابزارهای کوچک ---------- */
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: embed; }
code.k { background: rgba(219,234,254,.7); padding: 2px 8px; border-radius: 8px;
  font-size: 12.5px; color: var(--blue-700); direction: ltr; unicode-bidi: embed; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
