/* فندقا — Design System (Blue · Cyan gradient) */
:root {
  --primary: #016df7;
  --primary-dark: #223141;
  --primary-light: #016df7;
  --primary-soft: #e5f0fe;
  --accent: #016df7;
  --accent-soft: #e5f0fe;
  /* #00C6F7 فقط داخل گرادیان */
  --gradient: linear-gradient(135deg, #016df7 0%, #00c6f7 100%);

  --bg: #f8f8fb;
  --bg-mesh:
    radial-gradient(ellipse 90% 55% at 50% -18%, rgba(1, 109, 247, 0.12), transparent),
    radial-gradient(ellipse 55% 40% at 100% 20%, rgba(1, 109, 247, 0.08), transparent),
    radial-gradient(ellipse 45% 35% at 0% 85%, rgba(34, 49, 65, 0.04), transparent);

  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.94);
  --text: #223141;
  --text-secondary: #5a6878;
  --text-muted: #94a0ae;
  --border: rgba(34, 49, 65, 0.08);
  --border-strong: rgba(34, 49, 65, 0.14);

  --success: #2f9e6f;
  --success-bg: #eaf7f1;
  --danger: #d14343;
  --danger-bg: #fdf2f2;
  --rose-soft: #fce8e8;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 10px rgba(34, 49, 65, 0.04);
  --shadow-md: 0 10px 28px rgba(34, 49, 65, 0.08);
  --shadow-lg: 0 18px 48px rgba(1, 109, 247, 0.12);
  --shadow-nav: 0 -10px 36px rgba(34, 49, 65, 0.06);

  --nav-h: 72px;
  --topbar-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

html, body {
  font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
  background: var(--bg);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Shell ─── */
.app-shell {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 24px);
}

.lesson-shell {
  max-width: 520px;
  padding-bottom: 40px;
}

.lesson-body {
  overscroll-behavior-y: contain;
}

/* ─── Lesson pages ─── */
.lesson-content {
  padding-top: 8px;
}

.lesson-top {
  margin-bottom: 10px;
}

.lesson-header {
  margin: 0 0 12px;
}
.lesson-header h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 4px;
  line-height: 1.35;
}
.lesson-header p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-stage {
  display: flex;
  flex-direction: column;
}

.lesson-player-wrap {
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  background: var(--bg);
  background-image: var(--bg-mesh);
  padding-bottom: 10px;
  margin: 0 0 4px;
  box-shadow: 0 10px 18px -12px rgba(34, 49, 65, 0.28);
}

.lesson-player {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.lesson-player-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1220;
  overflow: hidden;
}

.lesson-player-media video,
.lesson-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0b1220;
  max-height: none;
}

.lesson-player-info {
  background: var(--surface);
  padding: 12px 14px 13px;
  min-height: 68px;
}

.lesson-player-info h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-player-info p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.55em;
}

.lesson-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 10px;
  padding-top: 2px;
}

.lesson-list-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0;
}

.lesson-list-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: right;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
  scroll-margin-top: calc(var(--topbar-h) + var(--lesson-sticky-offset, 240px) + 12px);
}

.lesson-item:active {
  transform: scale(0.985);
}

.lesson-item:hover { border-color: var(--primary-light); }
.lesson-item.is-active {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(1, 109, 247, 0.12);
  background: linear-gradient(135deg, #fff, var(--primary-soft));
}

.lesson-item-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-item.is-active .lesson-item-num {
  background: var(--primary);
  color: #fff;
}

.lesson-item-body { flex: 1; min-width: 0; }
.lesson-item-body strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lesson-item-body small {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lesson-item-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.lesson-item-time svg { width: 12px; height: 12px; }

.lesson-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  height: var(--topbar-h);
  padding: 0 12px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-slot {
  display: flex;
  align-items: center;
  min-height: 40px;
}
.topbar-slot-start {
  justify-content: flex-start;
}
.topbar-slot-end {
  justify-content: flex-end;
}

.topbar-back {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(1, 109, 247, 0.28);
  box-shadow: 0 2px 8px rgba(1, 109, 247, 0.08);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.topbar-back svg {
  width: 22px;
  height: 22px;
  transform: scaleX(-1);
}
.topbar-back:hover {
  background: var(--primary-soft);
  border-color: rgba(1, 109, 247, 0.45);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #1120F0;
  line-height: 0;
}
.brand-logo,
.brand-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-logo svg,
.brand-wordmark svg {
  display: block;
  width: auto;
  height: auto;
  fill: currentColor;
}
.brand-logo svg {
  width: 28px;
  height: 32px;
}
.brand-wordmark svg {
  width: 78px;
  height: 30px;
}
.brand-mark--login {
  flex-direction: column;
  gap: 10px;
  margin: 0 auto 14px;
}
.brand-mark--login .brand-logo svg {
  width: 52px;
  height: 60px;
}
.brand-mark--login .brand-wordmark svg {
  width: 140px;
  height: 54px;
}
.brand-mark--manage .brand-logo svg {
  width: 30px;
  height: 34px;
}
.brand-mark--about {
  flex-direction: column;
  gap: 12px;
  color: #FFDA00;
}
.brand-mark--about .brand-logo svg {
  width: 56px;
  height: 66px;
}
.brand-mark--about .brand-wordmark svg {
  width: 160px;
  height: 62px;
}
.about-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(1, 109, 247, 0.32);
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.page-header { padding: 18px 18px 4px; }

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

.page-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.65;
}

.app-content { padding: 10px 16px 20px; }
.lesson-content { padding-top: 6px; }

/* ─── Bottom nav ─── */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 412px;
  height: calc(var(--nav-h) - 2px);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  z-index: 100;
  box-shadow: var(--shadow-nav);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-md);
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  -webkit-user-select: none;
  user-select: none;
  transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), stroke 0.25s ease;
}

.nav-item:hover { color: var(--primary); }
.nav-item:active { transform: scale(0.94); }

.nav-item.active {
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(1, 109, 247, 0.28);
  animation: navSelect 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.nav-item.active svg {
  stroke: #fff;
  transform: scale(1.08);
}

@keyframes navSelect {
  0% { transform: scale(0.88); opacity: 0.85; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Hero ─── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 30px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.14), transparent 45%);
}

.hero > * { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.14);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.16);
}

.hero-badge-dot {
  width: 6px; height: 6px;
  background: #f8f8fb;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h2 {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 10px;
}

.hero p {
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.75;
}

.hero-compact { padding: 22px 18px; text-align: center; }
.hero-compact h2 { font-size: 18px; margin-bottom: 6px; }
.hero-compact p { font-size: 13px; }

/* ─── Feature grid ─── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
}

.feature-card-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.feature-card-icon.blue { background: var(--primary-soft); color: var(--primary); }
.feature-card-icon.sky { background: var(--accent-soft); color: var(--accent); }
.feature-card-icon svg { width: 20px; height: 20px; }

.feature-card h3 { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 3px; }
.feature-card p { font-size: 11px; color: var(--text-muted); }

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-link {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.card-link:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-link:active { transform: scale(0.985); }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(1, 109, 247, 0.26);
}

.card-icon svg { width: 24px; height: 24px; stroke: #fff; }

.card-body { flex: 1; min-width: 0; }
.card-body h3 { font-size: 15px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.card-body p { font-size: 12px; color: var(--text-secondary); line-height: 1.55; }

.card-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-arrow svg { width: 16px; height: 16px; }

.card-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
}

.card-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
}

/* ─── Course list card (image + text) ─── */
.course-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.course-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.course-card:active { transform: scale(0.985); }

.course-card-media {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gradient);
  position: relative;
}

.course-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-card-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.course-card-media.is-fallback .course-card-fallback { display: flex; }
.course-card-fallback svg { width: 34px; height: 34px; stroke: #fff; }

.course-card-body { flex: 1; min-width: 0; }
.course-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.course-card-body p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.course-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.course-card-arrow svg { width: 16px; height: 16px; }

/* ─── Course detail page ─── */
.course-detail { margin-bottom: 20px; }

.course-detail-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gradient);
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.course-detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-detail-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.course-detail-banner.is-fallback .course-detail-fallback { display: flex; }
.course-detail-fallback svg { width: 48px; height: 48px; stroke: #fff; }

.course-sessions-banner {
  margin-bottom: 14px;
}
.course-sessions-header {
  margin-bottom: 12px;
}
.course-sessions-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 6px;
}
.course-sessions-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.course-detail-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 6px;
}
.course-detail-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 8px;
}

.course-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.course-detail-meta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.course-detail-meta-item strong {
  display: block;
  font-size: 16px;
  color: var(--primary-dark);
  margin-bottom: 2px;
}
.course-detail-meta-item span {
  font-size: 11px;
  color: var(--text-muted);
}

.course-detail-desc p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.course-detail-desc p:last-child { margin-bottom: 0; }

.course-detail-actions {
  margin-top: 8px;
}
.course-detail-actions .btn { width: 100%; }
.course-detail-actions form { margin: 0; }

.course-price-box { margin-bottom: 14px; }
.course-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.course-price-row:last-child { border-bottom: 0; padding-bottom: 0; }
.course-price-row strong { color: var(--primary-dark); font-weight: 700; }
.course-price-row strong.is-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 600;
}
.course-price-row.is-final span,
.course-price-row.is-final strong {
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
}

.btn-success {
  background: linear-gradient(135deg, #2f9e6f 0%, #3cb882 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 158, 111, 0.28);
}
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid rgba(1, 109, 247, 0.28);
  box-shadow: none;
}

.course-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
}
.course-cta-row.course-cta-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.course-price-side {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 14px 6px;
  box-shadow: var(--shadow-sm);
}
.course-price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(34, 49, 65, 0.06);
}
.course-price-line:last-child { border-bottom: 0; }
.course-price-line span {
  font-weight: 600;
  color: var(--text-secondary);
}
.course-price-line strong {
  font-weight: 700;
  color: var(--primary-dark);
  direction: ltr;
  text-align: left;
}

/* مبلغ اصلی — کم‌رنگ و خط‌خورده */
.course-price-line.is-base span {
  color: #8b97a6;
  font-weight: 500;
}
.course-price-line.is-base strong {
  color: #6b7785;
  font-weight: 600;
}
.course-price-line.is-base strong.is-old {
  color: #a0aab6;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #b7c0cb;
}

/* تخفیف — قرمز */
.course-price-line.is-discount {
  border-bottom: 0;
}
.course-price-line.is-discount span {
  color: #c62828;
  font-weight: 700;
}
.course-price-line.is-discount strong {
  color: #d14343;
  font-weight: 800;
  background: #fdf2f2;
  border: 1px solid #f8d7d7;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
}

/* مبلغ نهایی — سبز */
.course-price-line.is-final {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px dashed rgba(47, 158, 111, 0.35);
  border-bottom: 0;
}
.course-price-line.is-final span {
  color: #1f7a54;
  font-size: 13px;
  font-weight: 800;
}
.course-price-line.is-final strong {
  color: #2f9e6f;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.course-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
}
.course-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.course-stat strong {
  display: block;
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.course-stat span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.course-session-list { padding: 0; overflow: hidden; }
.course-session-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.course-session-item:last-child { border-bottom: 0; }
.course-session-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-session-body {
  flex: 1;
  min-width: 0;
}
.course-session-body strong {
  display: block;
  font-size: 13px;
  color: var(--primary-dark);
  line-height: 1.45;
}
.course-session-body small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}
.course-session-time {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--text-secondary);
  direction: ltr;
  font-weight: 600;
}

.course-reviews {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.course-review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.course-review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.course-review-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-review-avatar svg {
  width: 22px;
  height: 22px;
}
.course-review-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.course-review-author {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0;
}
.course-review-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.course-review-stars .star {
  display: inline-flex;
  color: #d7dde5;
}
.course-review-stars .star.is-on {
  color: #f5b301;
}
.course-review-stars .star svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: currentColor;
  stroke-width: 1;
}
.course-review-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.course-reviews-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 4px;
}

.course-accordions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.course-accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.course-accordion-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  user-select: none;
}
.course-accordion-head::-webkit-details-marker { display: none; }
.course-accordion-icon {
  display: inline-flex;
  color: var(--primary);
  transition: transform var(--transition);
}
.course-accordion-icon svg {
  width: 18px;
  height: 18px;
}
.course-accordion[open] .course-accordion-icon {
  transform: rotate(180deg);
}
.course-accordion-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.course-accordion-body.course-session-list {
  padding: 0;
  border-top: 1px solid var(--border);
}
.course-accordion-body.course-reviews {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 380px) {
  .course-cta-row { flex-direction: column-reverse; align-items: stretch; }
  .course-cta-row.course-cta-stack { flex-direction: column; }
  a.btn.course-cta-btn,
  .course-cta-row .btn.course-cta-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .course-stats-row { gap: 6px; }
  .course-stat { padding: 12px 6px; }
  .course-stat strong { font-size: 16px; }
  .course-review-meta { flex-wrap: wrap; }
}

.checkout-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 8px;
}
.checkout-summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.checkout-summary,
.checkout-discount,
.checkout-form {
  margin: 0;
}

.coupon-box {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.coupon-box > input[type="hidden"] {
  display: none;
}
.coupon-box input[type="text"],
.coupon-box input:not([type="hidden"]) {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.coupon-box input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}
.coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  color: #1f7a54;
  font-size: 12px;
  font-weight: 600;
}
.coupon-applied strong {
  font-weight: 800;
  letter-spacing: 0.02em;
}
.coupon-remove {
  border: none;
  background: transparent;
  color: #1f7a54;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
}

@media (max-width: 380px) {
  .course-cta-row { flex-direction: column-reverse; align-items: stretch; }
  a.btn.course-cta-btn,
  .course-cta-row .btn.course-cta-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .course-stats-row { gap: 6px; }
  .course-stat { padding: 12px 6px; }
  .course-stat strong { font-size: 16px; }
}

/* Manage panel */
.manage-body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(1, 109, 247, 0.1), transparent),
    #f3f6fb;
  min-height: 100vh;
}
.manage-shell {
  max-width: 820px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 32px;
}
.manage-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.manage-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.manage-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.manage-brand-text strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.3;
}
.manage-brand-text small {
  font-size: 11px;
  color: var(--text-muted);
}
.manage-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.manage-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.manage-link-btn.is-danger {
  color: var(--danger);
  border-color: rgba(209, 67, 67, 0.22);
  background: #fff7f7;
}
.manage-main {
  padding: 16px 16px 0;
}
.manage-page-head {
  margin-bottom: 14px;
}
.manage-page-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}
.manage-page-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.manage-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -4px 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.manage-tabs::-webkit-scrollbar { display: none; }
.manage-tab {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: #5a6878;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.manage-tab:active {
  transform: scale(0.98);
}
.manage-tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(1, 109, 247, 0.25);
}
.manage-panel {
  transition: opacity .18s ease, transform .18s ease;
}
.manage-panel.is-enter {
  animation: managePanelIn .22s ease;
}
@keyframes managePanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
body.manage-navigating .manage-panel {
  opacity: 0.42;
  transform: translateY(4px);
  pointer-events: none;
}
body.manage-navigating .manage-tabs {
  pointer-events: none;
}
.manage-panel .card {
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.manage-panel .section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
}
.manage-panel .section-title.is-spaced {
  margin-top: 20px;
}
.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.manage-actions .btn {
  width: auto;
  flex: 1 1 calc(50% - 4px);
  min-width: 120px;
  padding: 11px 14px;
  font-size: 13px;
}
.manage-actions .btn-block {
  flex: 1 1 100%;
}
.manage-shell .btn-sm,
.manage-panel .btn-sm {
  width: auto;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 10px;
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid rgba(209, 67, 67, 0.28);
  box-shadow: none;
}
.btn-danger:hover {
  background: var(--danger-bg);
}
.btn-ghost {
  background: #fff;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: none;
  width: auto;
  padding: 11px 14px;
  font-size: 13px;
  display: inline-flex;
}
.manage-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.manage-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(30, 64, 175, 0.08);
}
.manage-list-item:last-child { border-bottom: 0; }
.manage-list-main {
  min-width: 0;
  flex: 1;
}
.manage-list-main strong {
  display: block;
  font-size: 14px;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.manage-list-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}
.manage-tutorial-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.manage-tutorial-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(30, 64, 175, 0.1);
  font-size: 12px;
  color: var(--text-muted);
}
.manage-tutorial-stat-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
}
.manage-list-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.manage-list-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.manage-list-actions .btn {
  width: 100%;
}
.manage-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.manage-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.manage-badge.is-ok {
  background: var(--success-bg);
  color: #1f7a54;
}
.manage-badge.is-warn {
  background: #fff7ed;
  color: #c2410c;
}
.manage-badge.is-muted {
  background: #f1f5f9;
  color: #64748b;
}
.manage-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.7;
}
.manage-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .manage-form-grid { grid-template-columns: 1fr; }
}
.manage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.manage-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.manage-filters {
  margin-bottom: 14px;
}
.manage-filters.is-spaced,
.manage-empty.is-spaced,
.section-title.is-spaced {
  margin-top: 18px;
}
.manage-finance-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.manage-finance-strip > div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.manage-finance-strip span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.manage-finance-strip strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
}
.manage-access-card .manage-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.manage-access-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(30,64,175,.08);
}
.manage-installment-box {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.enroll-installment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.enroll-installment-item {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.enroll-installment-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.enroll-installment-item-head strong {
  font-size: 14px;
  color: var(--primary-dark);
}
.manage-installments {
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
}
.manage-installment-row {
  margin-top: 4px;
}
.manage-details {
  margin-top: 10px;
  border-top: 1px solid rgba(30,64,175,.08);
  padding-top: 8px;
}
.manage-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.manage-inline-form {
  margin-bottom: 10px;
}
.manage-enroll-card .manage-badge {
  margin-inline-start: 4px;
  vertical-align: middle;
}

.enroll-scroll-hint {
  display: none;
  margin: 0 0 8px;
}
.enroll-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.enroll-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  direction: rtl;
}
.enroll-table th,
.enroll-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  vertical-align: middle;
  white-space: nowrap;
}
.enroll-table th {
  background: #f8fafc;
  font-weight: 800;
  color: #334155;
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 2;
}
.enroll-table td {
  color: #475569;
  font-weight: 600;
}
.enroll-table tbody tr:last-child td {
  border-bottom: 0;
}
.enroll-table .is-remain {
  color: #c2410c;
  font-weight: 800;
}
.enroll-table small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
}
.enroll-table .enroll-row-phone {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.enroll-table .enroll-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.enroll-table .enroll-row-actions .btn {
  min-height: 34px;
}
.enroll-table .enroll-row-actions form {
  margin: 0;
}
.enroll-sticky-start,
.enroll-sticky-end {
  background: #fff;
}
.enroll-table thead .enroll-sticky-start,
.enroll-table thead .enroll-sticky-end {
  background: #f8fafc;
}
.enroll-edit-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.manage-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.manage-page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.manage-page-num,
.manage-page-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.manage-page-num.is-active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}
.manage-page-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 720px) {
  .enroll-scroll-hint {
    display: block;
  }
  .enroll-sticky-start {
    position: sticky;
    right: 0;
    z-index: 3;
    box-shadow: -6px 0 8px -8px rgba(15, 23, 42, 0.35);
  }
  .enroll-sticky-end {
    position: sticky;
    left: 0;
    z-index: 3;
    box-shadow: 6px 0 8px -8px rgba(15, 23, 42, 0.35);
  }
  .enroll-table thead .enroll-sticky-start,
  .enroll-table thead .enroll-sticky-end {
    z-index: 4;
  }
  .enroll-table .enroll-row-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .enroll-table .enroll-row-actions .btn,
  .enroll-table .enroll-row-actions form .btn {
    width: 100%;
    min-height: 38px;
  }
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dash-grid--stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) {
  .dash-grid--stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.dash-chart-card {
  overflow: hidden;
}
.dash-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 160px;
  margin-top: 12px;
  padding: 8px 2px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dash-chart-col {
  flex: 1 0 14px;
  min-width: 14px;
  max-width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.dash-chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dash-chart-bar {
  width: 70%;
  min-height: 0;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}
.dash-chart-value {
  font-size: 9px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
  min-height: 12px;
}
.dash-chart-day {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.dash-card strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.dash-card span {
  font-size: 11px;
  color: var(--text-muted);
}
.dash-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.dash-quick a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 640px;
}
.manage-table th,
.manage-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(30,64,175,.08);
  text-align: right;
  white-space: nowrap;
}
.manage-table th {
  background: #f8fafc;
  color: #5a6878;
  font-weight: 700;
}
.discount-form label { font-size: 13px; font-weight: 700; }
.manage-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}
.manage-check input { width: 16px; height: 16px; }
.manage-media-box {
  margin: 4px 0 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(1, 109, 247, 0.35);
  background: #f5f9ff;
}
.manage-media-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.manage-media-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.manage-media-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.manage-media-preview {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.manage-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.manage-media-type {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
}
.manage-media-info {
  min-width: 0;
  flex: 1;
}
.manage-media-info strong {
  display: block;
  font-size: 13px;
  color: var(--primary-dark);
}
.manage-media-info small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manage-media-item .btn {
  width: auto;
  flex-shrink: 0;
}
.manage-cover-preview {
  margin-top: 8px;
}
.manage-cover-preview img {
  max-width: 180px;
  border-radius: 12px;
  display: block;
}
.tutorial-detail-body .tutorial-embed,
.tutorial-detail-body video,
.tutorial-detail-body audio {
  margin: 14px 0 18px;
}
.tutorial-detail-body .tutorial-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  display: block;
  background: #0f172a;
}
.tutorial-detail-body audio,
.tutorial-detail-body video {
  width: 100%;
  border-radius: 14px;
}
.tutorial-detail-body video {
  background: #0f172a;
}
.tutorial-detail-body audio::-webkit-media-controls-enclosure,
.tutorial-detail-body video::-webkit-media-controls-enclosure {
  overflow: hidden;
}
.tutorial-detail-body audio::-webkit-media-controls-download-button,
.tutorial-detail-body video::-webkit-media-controls-download-button {
  display: none !important;
}
.tutorial-detail-body audio::-internal-media-controls-download-button,
.tutorial-detail-body video::-internal-media-controls-download-button {
  display: none !important;
}

/* Manage panel — mobile optimizations */
.manage-body {
  min-height: 100dvh;
  overflow-x: hidden;
}
.manage-shell {
  min-height: 100dvh;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
.manage-topbar {
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
.manage-tabs {
  position: sticky;
  top: 56px;
  z-index: 35;
  padding: 8px 14px 10px;
  margin: 0 -14px 14px;
  background: rgba(243, 246, 251, 0.96);
  border-bottom: 1px solid rgba(34, 49, 65, 0.06);
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}
.manage-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.manage-main { padding: 14px 14px 0; }
.manage-page-head h1 { font-size: 20px; }
.manage-page-head p { font-size: 12px; line-height: 1.6; }
.manage-panel .card { padding: 14px; }
.manage-body input,
.manage-body select,
.manage-body textarea {
  font-size: 16px; /* prevent iOS zoom */
}
.manage-body .form-group textarea { min-height: 120px; }
.manage-actions .btn { min-height: 44px; }
.manage-shell .btn-sm,
.manage-panel .btn-sm { min-height: 38px; }
.dash-quick a {
  min-height: 44px;
  text-align: center;
}
.manage-list-main strong,
.manage-list-meta,
.manage-list-desc {
  word-break: break-word;
}
.manage-table-wrap {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: auto;
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.manage-enroll-cards { display: block; }
.manage-cover-preview img { max-width: min(180px, 100%); }

@media (max-width: 720px) {
  .manage-form-grid { grid-template-columns: 1fr; }
  .manage-list-item {
    flex-direction: column;
    align-items: stretch;
  }
  .manage-list-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .manage-list-actions .btn,
  .manage-list-actions form {
    flex: 1 1 calc(50% - 4px);
    min-width: 110px;
  }
  .manage-list-actions form .btn { width: 100%; }
  .manage-media-item { flex-wrap: wrap; }
  .manage-media-item .btn { width: 100%; }
  .manage-actions .btn { flex: 1 1 100%; }
}

@media (min-width: 721px) {
  .manage-enroll-cards { display: block; }
  .manage-table-wrap { display: block; }
  .manage-page-head h1 { font-size: 22px; }
  .manage-page-head p { font-size: 13px; }
  .manage-main { padding: 16px 16px 0; }
  .manage-tabs {
    top: 57px;
    margin: 0 -16px 14px;
    padding: 8px 16px 10px;
  }
}

@media (max-width: 380px) {
  .manage-brand-text small { display: none; }
  .manage-link-btn { padding: 8px 10px; font-size: 11px; }
  .dash-quick { grid-template-columns: 1fr; }
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.6;
}

.info-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.info-card-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card-icon svg { width: 26px; height: 26px; }
.info-card h3 { font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.info-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.info-card-soft { background: var(--primary-soft); border-color: transparent; }
.info-card-soft p { margin: 0; color: var(--primary-dark); }

/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
}

.empty-state-icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg { width: 28px; height: 28px; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; max-width: 260px; margin: 0 auto; }

.coming-soon {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--primary-dark);
}

/* ─── Profile ─── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.profile-avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.28);
  flex-shrink: 0;
}
.profile-avatar svg {
  width: 30px;
  height: 30px;
  stroke: #fff;
}

.profile-hero-text {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.profile-hero-text h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: right;
}
.profile-phone {
  display: block;
  font-size: 13px;
  opacity: 0.85;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

.settings-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

button.settings-row {
  width: 100%;
  margin: 0;
  font: inherit;
  font-family: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.settings-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.settings-row:active { transform: scale(0.99); }

.settings-row-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-row-icon svg { width: 20px; height: 20px; }
.settings-row-icon.blue { background: var(--primary-soft); color: var(--primary); }
.settings-row-icon.sky { background: var(--accent-soft); color: var(--accent); }
.settings-row-icon.indigo { background: var(--primary-soft); color: var(--primary); }
.settings-row-icon.slate { background: #eef0f4; color: #5a6878; }
.settings-row-icon.rose { background: var(--rose-soft); color: var(--danger); }

.settings-row-body { flex: 1; min-width: 0; }
.settings-row-body strong { display: block; font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.settings-row-body small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.settings-row-arrow { color: var(--text-muted); display: flex; }
.settings-row-arrow svg { width: 16px; height: 16px; }

.settings-row-logout:hover { border-color: rgba(209, 67, 67, 0.28); }

.confirm-dialog {
  border: none;
  border-radius: var(--radius-xl);
  padding: 0;
  background: transparent;
  max-width: 340px;
  width: calc(100% - 40px);
  margin: auto;
  position: fixed;
  inset: 0;
  height: fit-content;
  max-height: calc(100% - 40px);
}
.confirm-dialog::backdrop {
  background: rgba(34, 49, 65, 0.45);
  backdrop-filter: blur(4px);
}
.confirm-dialog-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.confirm-dialog-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.confirm-dialog-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.6;
}
.confirm-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.confirm-dialog-actions .btn { width: 100%; }

.about-hero {
  text-align: center;
  padding: 28px 16px;
  margin-bottom: 14px;
  background: #1120F0;
  border-radius: var(--radius-xl);
}

.about-hero-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.about-hero-icon svg { width: 26px; height: 26px; }
.about-hero h2 { display: none; }

/* ─── Forms & buttons ─── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(1, 109, 247, 0.14);
}
.form-group input:disabled { background: #eef0f4; color: var(--text-muted); }
.form-group textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 18px rgba(1, 109, 247, 0.28);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn-danger-solid {
  background: var(--danger);
  box-shadow: 0 6px 18px rgba(209, 67, 67, 0.28);
}
.btn-success {
  background: linear-gradient(135deg, #2f9e6f 0%, #3cb882 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 158, 111, 0.28);
}
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid rgba(1, 109, 247, 0.28);
  box-shadow: none;
}

a.btn.course-cta-btn,
.course-cta-row .btn.course-cta-btn {
  width: 100%;
  flex: 0 0 auto;
  min-width: 0;
  max-width: none;
  align-self: stretch;
  padding: 14px 18px;
  white-space: nowrap;
  text-align: center;
}

.coupon-box .btn.coupon-btn {
  width: auto;
  flex: 0 0 auto;
  min-width: 88px;
  max-width: 110px;
  padding: 11px 14px;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}
.alert-success { background: var(--success-bg); color: #1f7a54; border: 1px solid rgba(47, 158, 111, 0.18); }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(209, 67, 67, 0.16); }

.support-list { display: flex; flex-direction: column; gap: 8px; }

.support-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
}

.support-link:hover { border-color: var(--primary-light); }

.support-link-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.support-link-icon::before {
  content: '';
  width: 22px;
  height: 22px;
  display: block;
  background-color: currentColor;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.support-link-icon.support-eitaa {
  background: rgba(220, 114, 0, 0.14);
  color: #dc7200;
}
.support-link-icon.support-eitaa::before {
  -webkit-mask-image: url('../images/support/eitaa.svg');
  mask-image: url('../images/support/eitaa.svg');
}

.support-link-icon.support-bale {
  background: rgba(10, 202, 155, 0.14);
  color: #0aca9b;
}
.support-link-icon.support-bale::before {
  -webkit-mask-image: url('../images/support/bale.svg');
  mask-image: url('../images/support/bale.svg');
}

.support-link-icon.support-instagram {
  background: rgba(247, 62, 128, 0.14);
  color: #f73e80;
}
.support-link-icon.support-instagram::before {
  -webkit-mask-image: url('../images/support/instagram.svg');
  mask-image: url('../images/support/instagram.svg');
}

.support-link-icon.support-telegram {
  background: rgba(38, 165, 228, 0.14);
  color: #26a5e4;
}
.support-link-icon.support-telegram::before {
  -webkit-mask-image: url('../images/support/telegram.svg');
  mask-image: url('../images/support/telegram.svg');
}

.support-link-icon svg { width: 18px; height: 18px; }
.support-link-text { flex: 1; }
.support-link-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.support-link-text small { display: block; font-size: 11px; color: var(--text-muted); }
.support-link-arrow svg { width: 16px; height: 16px; color: var(--text-muted); }

.support-hours {
  text-align: center;
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: var(--gradient);
  box-shadow: 0 6px 16px rgba(1, 109, 247, 0.22);
  color: #fff;
}
.support-hours p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
  color: #fff;
}

.about-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0 0 14px;
}
.about-card .about-text:last-child {
  margin-bottom: 0;
}

.enamad-wrap {
  text-align: center;
  margin-top: 16px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.enamad-wrap img { max-width: 88px; margin: 0 auto; }

/* ─── Home redesign (home only) ─── */
html:has(body.page-home),
body.page-home,
body:has(.home-page) {
  background-color: #0024c0;
  background-image: linear-gradient(165deg, #0054ff 0%, #0024c0 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100%;
}
body.page-home .app-shell,
body:has(.home-page) .app-shell {
  background: transparent;
  min-height: 100vh;
}
body.page-home .app-topbar,
body:has(.home-page) .app-topbar {
  background: rgba(255, 255, 255, 0.14);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}
body.page-home .brand-name,
body:has(.home-page) .brand-name {
  color: #FFDA00;
}
body.page-home .brand-mark,
body:has(.home-page) .brand-mark {
  color: #FFDA00;
}
body.page-home .app-content,
body:has(.home-page) .app-content {
  padding-top: 12px;
}

.home-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 10px;
  min-height: calc(100vh - var(--topbar-h) - var(--nav-h) - 40px);
}

.home-hero {
  padding: 36px 4px 4px;
  color: #fff;
}
.home-hero h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.5;
  font-weight: 800;
  color: #fff;
}
.home-hero-lead {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}
.home-hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.home-hero-actions .btn {
  width: 100%;
  padding: 12px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.home-btn-ghost {
  background: #f97316;
  color: #fff;
  border: 1.5px solid #ea580c;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
}
.home-btn-ghost:hover {
  background: #ea580c;
  border-color: #c2410c;
  color: #fff;
}

.home-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.home-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.home-section-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}
.home-section-link {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: #0054ff;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 6px 12px;
  border-radius: 999px;
}

.home-tutorials {
  margin: 0 -4px;
}
.home-tutorials-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(1, 109, 247, 0.12);
  border-radius: 18px;
}
.home-tutorials-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.home-tutorials-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 4px 4px 10px;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}
.home-tutorials-track::-webkit-scrollbar {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .home-tutorials-track {
    cursor: grab;
  }
  .home-tutorials-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
  }
  .home-tutorials-track.is-dragging a {
    pointer-events: none;
  }
}
.home-tutorial-card {
  flex: 0 0 78%;
  max-width: 340px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(1, 109, 247, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(1, 109, 247, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}
@media (hover: hover) and (pointer: fine) {
  .home-tutorial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(1, 109, 247, 0.14);
  }
}
.home-tutorial-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #e5f0fe, #d8f5ff);
  overflow: hidden;
}
.home-tutorial-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.home-tutorial-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: linear-gradient(145deg, #e5f0fe, #d8f5ff);
}
.home-tutorial-media.is-fallback .home-tutorial-fallback { display: flex; }
.home-tutorial-fallback svg { width: 36px; height: 36px; }
.home-tutorial-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 12px 14px;
  flex: 1;
}
.home-tutorial-body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.5;
}
.home-tutorial-body > span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}
.home-tutorial-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.home-tutorial-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.home-tutorial-meta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.home-featured-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-featured-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gradient);
  box-shadow: 0 12px 28px rgba(0, 20, 120, 0.28);
}
.home-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-featured-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 800;
  color: #fff;
}
.home-featured-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}
.home-featured-text {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.9);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.home-featured-cta {
  width: 100%;
  padding: 13px 16px;
  font-size: 14px;
}

.home-trust {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-parents-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(1, 109, 247, 0.1);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(1, 109, 247, 0.08);
}
.home-parents-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f2ff, #d8f6ff);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-parents-icon svg { width: 22px; height: 22px; }
.home-parents-card strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}
.home-parents-card span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.home-reviews {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 4px 4px 10px;
  margin: 0 -4px;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}
.home-reviews::-webkit-scrollbar {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .home-reviews {
    cursor: grab;
  }
  .home-reviews.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
  }
}
.home-review-card {
  position: relative;
  flex: 0 0 min(84%, 300px);
  min-width: 240px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 248, 255, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  padding: 12px 14px 12px;
  box-shadow:
    0 10px 24px rgba(0, 20, 120, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.home-review-card::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(180deg, #5aa2ff, #0054ff);
  border-start-end-radius: 4px;
  border-end-end-radius: 4px;
}
.home-review-text {
  margin: 0;
  padding-top: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: #3a4a5c;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}
.home-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(1, 109, 247, 0.1);
}
.home-review-author {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.home-review-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, #4d8dff, #0054ff);
  box-shadow: 0 4px 10px rgba(0, 84, 255, 0.22);
  overflow: hidden;
  text-align: center;
  margin: 0;
}
.home-review-author strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.home-review-author > div span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.home-review-stars {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}
.home-review-stars .star { color: #d7dde5; display: inline-flex; }
.home-review-stars .star.is-on { color: #f5b301; }
.home-review-stars .star svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1;
}

.home-social-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.home-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 4px;
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(0, 20, 120, 0.12);
  text-align: center;
  min-width: 0;
}
.home-social-btn--eitaa {
  background: #fff3e6;
  border-color: #ffd7a8;
}
.home-social-btn--bale {
  background: #e6faf4;
  border-color: #a8efd9;
}
.home-social-btn--telegram {
  background: #e8f7fd;
  border-color: #a9dff5;
}
.home-social-btn--instagram {
  background: #ffeaf2;
  border-color: #ffc2d6;
}
.home-social-btn strong {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-dark);
}
.home-social-btn .support-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: transparent;
}
.home-social-btn .support-link-icon::before {
  width: 28px;
  height: 28px;
}

.home-about-card {
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
}
.home-about-card:hover {
  transform: none;
  box-shadow: none;
}
.home-about-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-about-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.home-enamad {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.88);
}

@media (max-width: 380px) {
  .home-hero h1 { font-size: 20px; }
  .home-hero-actions .btn { font-size: 12px; padding: 11px 8px; }
}

/* ─── Teachers ─── */
.teacher-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.teacher-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }

.teacher-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-soft);
  flex-shrink: 0;
}

.teacher-info { flex: 1; min-width: 0; }
.teacher-name { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 3px; }
.teacher-bio { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.teacher-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.teacher-arrow svg { width: 16px; height: 16px; }

/* ─── Login prompt & page ─── */
.login-prompt {
  text-align: center;
  padding: 44px 22px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.login-prompt-icon {
  width: 68px; height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-prompt-icon svg { width: 30px; height: 30px; }
.login-prompt h3 { font-size: 17px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.login-prompt p { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.6; }
.login-prompt .btn { max-width: 260px; margin: 0 auto; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: var(--bg);
  background-image: var(--bg-mesh), var(--gradient);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 34px 26px;
  box-shadow: var(--shadow-lg);
}

.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand {
  text-align: center;
  margin-bottom: 8px;
}
.login-brand .brand-mark {
  margin-bottom: 12px;
}
.login-brand h1 {
  margin-top: 4px;
}
.login-brand h1 { font-size: 21px; font-weight: 800; color: var(--primary-dark); margin-bottom: 6px; }
.login-brand .subtitle { font-size: 13px; color: var(--text-secondary); }

.login-card label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.login-card input[type="tel"],
.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  direction: ltr;
  text-align: center;
  margin-bottom: 14px;
  background: var(--bg);
}
.login-card input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(1, 109, 247, 0.14);
}
.login-card .btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  margin-top: 10px;
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.login-card .error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
  text-align: center;
}
.login-card .remember { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--text-secondary); }
.login-card .phone-display {
  text-align: center;
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  direction: ltr;
  margin-bottom: 14px;
  padding: 10px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
}
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--text-muted); }
.login-footer a { color: var(--primary-light); font-weight: 700; }

@media (max-width: 380px) {
  .form-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ─── Tutorials blog ─── */
.tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tutorial-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tutorial-card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #e8f1ff, #d9f4ff);
}
.tutorial-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tutorial-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.tutorial-card-fallback svg { width: 36px; height: 36px; }
.tutorial-card-body { padding: 14px; }
.tutorial-card-body h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.5;
}
.tutorial-card-body p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tutorial-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}
.tutorial-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tutorial-card-meta-likes {
  color: inherit;
  font-weight: inherit;
}
.tutorial-card-meta-likes svg {
  fill: currentColor;
  stroke: none;
}
.tutorial-card-meta-date svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.tutorial-card-meta svg,
.tutorial-detail-meta svg,
.tutorial-action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}
.tutorial-card-meta svg { width: 14px; height: 14px; }
.tutorial-card-meta-likes svg {
  fill: currentColor;
  stroke: none;
}
.tutorial-card-meta-date svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.tutorial-action-btn svg { width: 18px; height: 18px; }
.tutorial-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  font-size: 13px;
}
.tutorial-pagination a {
  color: var(--primary);
  font-weight: 700;
}
.tutorial-pagination .is-disabled { color: var(--text-muted); }

.tutorial-login-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  margin-top: 18px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.tutorial-login-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--primary-soft);
}
.tutorial-login-cta-icon svg { width: 24px; height: 24px; }
.tutorial-login-cta-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.tutorial-login-cta-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 320px;
}
.tutorial-login-cta .btn {
  min-width: 220px;
  min-height: 44px;
}
.tutorial-login-gate .tutorial-login-gate-back {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.tutorial-detail {
  padding-bottom: 8px;
}
.tutorial-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.tutorial-detail-cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #e8f1ff, #d9f4ff);
  margin: 0;
  border-radius: 0;
}
.tutorial-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tutorial-detail-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.tutorial-detail-cover-fallback svg { width: 42px; height: 42px; }
.tutorial-detail-inner {
  padding: 16px 16px 20px;
}
.tutorial-detail-title {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--primary-dark);
  font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
}
.tutorial-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
}
.tutorial-detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.tutorial-detail-meta span b {
  font-weight: 700;
  color: var(--text-secondary);
}
.tutorial-detail-meta svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.tutorial-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
@media (max-width: 400px) {
  .tutorial-detail-actions {
    gap: 6px;
  }
  .tutorial-action-btn {
    padding: 10px 6px;
    font-size: 12px;
    gap: 5px;
  }
  .tutorial-action-btn span {
    display: none;
  }
}
.tutorial-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f7f9fc;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
  cursor: pointer;
  line-height: 1.4;
}
.tutorial-views-btn {
  cursor: default;
  pointer-events: none;
}
.tutorial-action-btn span,
.tutorial-action-btn strong {
  font-family: inherit;
  font-weight: 700;
}
.tutorial-action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}
.tutorial-like-btn svg {
  fill: none;
  stroke: currentColor;
}
.tutorial-like-btn.is-liked {
  border-color: rgba(225, 29, 72, 0.28);
  background: #ffeaf0;
  color: #e11d48;
}
.tutorial-like-btn.is-liked svg {
  fill: #e11d48;
  stroke: #e11d48;
}
.tutorial-share-btn:active {
  background: var(--primary-soft);
}
.tutorial-detail-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-secondary);
  font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
  padding: 12px 14px;
  background: #f5f8fc;
  border-radius: 14px;
  border-right: 3px solid var(--primary);
}
.tutorial-detail-body {
  font-size: 14px;
  line-height: 2;
  color: #334155;
  font-family: 'IRANSansXFaNum', Tahoma, sans-serif;
}
.tutorial-detail-body p { margin: 0 0 14px; }
.tutorial-detail-body a { color: var(--primary); font-weight: 700; word-break: break-word; }
.tutorial-detail-body img,
.tutorial-detail-body iframe,
.tutorial-detail-body video,
.tutorial-detail-body audio {
  max-width: 100%;
  border-radius: 14px;
  margin: 10px 0 16px;
  display: block;
}
.tutorial-detail-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #0f172a;
}

.tutorial-cta-wrap,
.tutorial-download-wrap {
  margin: 16px 0 20px !important;
}
.tutorial-cta-btn,
.tutorial-download-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  color: #fff !important;
  width: 100%;
  box-sizing: border-box;
}
.tutorial-cta-btn {
  background: linear-gradient(135deg, #0054ff, #0039c7);
  box-shadow: 0 10px 22px rgba(0, 84, 255, 0.22);
}
.tutorial-download-btn {
  background: linear-gradient(135deg, #0f9f6e, #067a54);
  box-shadow: 0 10px 22px rgba(6, 122, 84, 0.2);
}

/* Tutorial block builder (manage) */
.tb-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}
.tb-section {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5eaf1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 6px 16px rgba(15, 23, 42, 0.05));
}
.tb-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid rgba(34, 49, 65, 0.06);
}
.tb-step {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary, #0054ff);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.tb-section-head h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark, #0b2a66);
}
.tb-section-head p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted, #7a8799);
  line-height: 1.6;
}
.tb-section-body {
  padding: 14px 16px 16px;
}
.tb-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.tb-block {
  border: 1px solid rgba(1, 109, 247, 0.14);
  border-radius: 14px;
  background: #fbfcfe;
  overflow: hidden;
}
.tb-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(1, 109, 247, 0.05);
  border-bottom: 1px solid rgba(1, 109, 247, 0.08);
}
.tb-block-type {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark, #0b2a66);
}
.tb-block-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tb-tool {
  min-height: 32px;
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, #e5eaf1);
  background: #fff;
  color: var(--text-secondary, #556274);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.tb-tool.is-danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.25);
  background: #fff5f4;
}
.tb-block-body {
  padding: 12px;
}
.tb-block-body .form-group:last-child {
  margin-bottom: 0;
}
.tb-picker {
  margin-top: 4px;
}
.tb-picker-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #7a8799);
  margin-bottom: 8px;
}
.tb-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tb-picker-btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px dashed rgba(1, 109, 247, 0.35);
  background: rgba(1, 109, 247, 0.04);
  color: var(--primary, #0054ff);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.tb-picker-btn:hover {
  background: rgba(1, 109, 247, 0.1);
  border-color: rgba(1, 109, 247, 0.55);
}
.tb-empty-hint {
  margin-top: 10px;
}
.tb-advanced {
  margin-top: 4px;
  border: 1px solid var(--border, #e5eaf1);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafbfd;
}
.tb-advanced summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark, #0b2a66);
}
.tb-publish-modes {
  display: grid;
  gap: 8px;
}
.tb-publish-mode {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border, #e5eaf1);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.tb-publish-mode:has(input:checked) {
  border-color: rgba(1, 109, 247, 0.45);
  background: rgba(1, 109, 247, 0.06);
  box-shadow: inset 0 0 0 1px rgba(1, 109, 247, 0.15);
}
.tb-publish-mode input {
  margin-top: 3px;
  flex-shrink: 0;
}
.tb-publish-mode strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark, #0b2a66);
  margin-bottom: 2px;
}
.tb-publish-mode small {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #7a8799);
  line-height: 1.5;
}
.tb-schedule-fields {
  margin-top: 12px;
}
.tb-actions {
  margin-top: 4px;
  margin-bottom: 8px;
}
.tb-form input,
.tb-form select,
.tb-form textarea {
  font-size: 16px;
}

@media (min-width: 640px) {
  .tb-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tb-publish-modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tutorial-cta-btn,
  .tutorial-download-btn {
    width: auto;
    min-width: 200px;
  }
}
@media (min-width: 900px) {
  .tb-picker-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
